Write Java program to find the factorial of number. Input number should be given by user. )
Question:
Write Java program to find the factorial of number. Input number should be given by user. ) Write Java program to read a file content line by line.
Simple natural language words are very basic index keys for retrieval systems. Since the topics for which users seek to retrieve documents are often complex, it is frequently claimed that simply looking for matches on any subset of a set of submitted single-word keys is not a discriminating enough approach to retrieval. Describe three different ways in which the relations between words can be defined so as to form compound index terms. You should describe in detail how each is implemented and what its advantages and disadvantages are by comparison with (a) single terms, and (b) the other two types of compound. [6 marks for each method] Which would you implement in a general-purpose system, and why? [2 marks] 7 Artificial Intelligence This question considers the monkey-and-bananas problem, in which there is a monkey in a room with some bananas hanging out of reach from the ceiling, but a box is available that will enable the monkey to reach the bananas if he climbs onto it. Initially the monkey is at location A, the bananas at B and the box at C. The monkey and box have height x, but if the monkey climbs onto the box he will have height y, the same as the bananas. The actions available to the monkey include Go from one place to another, Push an object from one place to another, Climb onto an object, and Grasp an object. Grasping results in holding the object if the monkey and object are in the same place at the same height. (a) Write the initial state description using a representation of your choice. [4 marks] (b) Write definitions of the four actions, providing at least some obvious preconditions, additions and deletions. [10 marks] (c) Suppose the monkey wants to fool the observers, who have gone to lunch, by grabbing the bananas but leaving the box in its original place. Write this as a goal (but not assuming the box is necessarily at location C) in the language of situation calculus. [3 marks] (d) If the box is filled with bricks, its position will remain the same when the Push operator is applied. Is this an example of the frame problem or the circumscription problem? Justify your answer. [3 marks] 8 Neural Computing (a) (i) Define generalization in neural networks that learn from training data, and then are tested on new data. Why should not all the available data be used in the training set? [4 marks] (ii) Draw a simple connectivity diagram that illustrates the idea of lateral inhibition in a competitive neural network. [2 marks] (iii) With another diagram showing plots for input and output, illustrate how lateral inhibition in such a competitive network sharpens any input signal by effectively amplifying its first derivative. [2 marks] (iv) What class of multi-layer neural network can be used to overcome the mathematical difficulties caused by intrinsic non-orthogonality of representation in many sensory and control systems? (b) The study of neurological trauma to the brain gives clues about its modular organisation and specialisations of function, which may reveal some computational principles.
Consider the IntServ (RSVP based) and DiffServ QoS Architectures. (a) Compare the nature of "guarantee" that is made in each and the time scale on which these are altered. [6 marks] (b) Compare where state resides in each case, and how much state there is. [3 marks] (c) Compare the number of control interactions that a core router in each architecture would engage in. [3 marks] (d) Compare the resource efficiency of each scheme in terms of link bandwidth. [Hint: consider single-ended Service-Level Agreements (SLAs).] [3 marks] (e) Describe the architecture of a core router in a DiffServ environment, recalling that each packet will have a Type of Service field describing its designated Per Hop Behaviour. [5 marks] 4 Advanced Graphics and HCI (a) Show how you would calculate the first intersection point between an arbitrary ray and a finite length open cylinder of unit radius aligned along the x-axis. [Note: an open cylinder is one which has no end caps.] Having calculated the intersection point, how would you calculate the normal vector? [7 marks] (b) A non-rational B-spline has knot vector [1, 2, 4, 7, 8, 10, 12]. Derive the first of the third order (second degree) basis functions, N1,3(t), and graph it. If this knot vector were used to draw a third order B-spline, how many control points would be required? [7 marks] (c) Describe how an object built using constructive solid geometry (CSG) can be represented using a binary tree. Given the intersection points of a ray with each primitive in the tree, show how to calculate the first intersection point of the ray with the entire CSG object. [6 marks] 5 Business Studies What is meant by a critical path? [5 marks] The village bakery has asked you to advise them about setting up a web site, including a trading function. Draw up a project plan, illustrated by a GANTT chart, and indicate the critical path. [5 marks] Make an estimate of the costs involved, and estimate how much working capital you would need. [5 marks] What other advice would you give them? [5 marks] 6 Security The owner of a banking system which previously used manually distributed shared keys to compute MACs on transactions decides to use public key cryptography to distribute MAC keys in future. The proposed protocol is A B : { {TA, KAB}K1 A KB } Explain the symbolism used in this description. [2 marks] What is wrong with this protocol? [6 marks] The protocol is changed to A B : { {A, TA, KAB}K1 A KB } What attacks might there be on the system now? [12 marks] 7 Computer System Modelling A database system has a central processor and three (different) discs. Measurements are taken for 1000 transactions on a lightly loaded system and the following observations are made. The CPU scheduler initiated or resumed transaction processing 10,000 times. The total CPU usage was 25 seconds. Disc 1 made 5000 transfers with an average transfer time of 10 ms. Disc 2 made 2000 transfers with an average transfer time of 50 ms. Disc 3 made 2000 transfers with an average transfer time of 20 ms. Derive the visit counts, service times and transaction service demands. What is the bottleneck device? What is the maximum throughput of the system measured in transactions per second? [6 marks] Describe two balanced systems which bound the throughput of the system. What is the maximum throughput of these systems? [7 marks] Recall that the throughput of a balanced system with K (i) What two fundamental principles of brain function did Karl Lashley's neurological research seem to reveal? [2 marks] (ii) What are generally the differences between recovery prospects after a sudden brain trauma (in which all the damage is done at once), versus the same damage done more gradually (e.g. by a growing tumour)?You have designed a digital water-level display installed on the River Cam. A sensor measures the current height of a small floating ball once every minute. In order to reduce the fluctuations that small waves would otherwise cause in the displayed value, you implemented a digital filter yi = 0.8yi1 + 0.2xi , where the xi are the measured and the yi are the displayed water levels.
A program is required to draw an arc from (0, 1) to (1, 0) of the circle centred t the origin with unit radius. (a) One approach would be to draw a segment of the cubic Overhauser curve defined by (1, 0), (0, 1), (1, 0) and (0, 1). (i) Explain how a segment of an Overhauser curve in general can be represented as an Hermite cubic and so as a Bezier cubic. [4 marks] (ii) Derive the formula for the resulting Bezier curve, P(t). [3 marks] (iii) Calculate the coordinates of P( 1 2 ). How large is the error? [Hint: 2 1.414.] [3 marks] (b) Calculate revised control points for the Bezier curve so that it models the circular arc more accurately. [4 marks] (c) Describe in outline an alternative way of efficiently drawing the arc by calculating the pixels that lie on it directly.
Principles of Communications Systems, Modulation and Noise
ISBN: 978-8126556793
7th edition
Authors: Rodger E. Ziemer, William H. Tranter