# Let r and s be solutions to the quadratic equation x 2 b x + c =

## Question:

Let r and s be solutions to the quadratic equation x 2 b x + c = 0. For n N, define d0 = 0 d1 = r s dn = b dn1 c dn2 (n 2) Prove that dn = r n s n for all n N. [4 marks] (b) Recall that a commutative monoid is a structure (M, 1, ) where M is a set, 1 is an element of M, and is a binary operation on M such that x 1 = x , x y = y x , (x y) z = x (y z) for all x, y, z in M. For a commutative monoid (M, 1, ), consider the structure (P(M), I, ~) where P(M) is the powerset of M, I in P(M) is the singleton set {1}, and ~ is the binary operation on P(M) given by X ~ Y = { m M | x X. y Y. m = x y } for all X and Y in P(M). Prove that (P(M), I, ~) is a commutative monoid. [10 marks] (c) Define a section-retraction pair to be a pair of functions (s s = idA. (i) Prove that for every section-retraction pair (s, r), the section s is injective and the retraction r is surjective. [4 marks] (ii) Exhibit two sets A and B together with an injective function f : A B such that there is no function g : B A for which (f, g) is a sectionretraction pair. [

Prove Arden's Rule for events, that X = A*B is the least solution of the inequality X > B + AX. [6 marks] (b) Let M = A B C D be a (2 2) event matrix. Show that the matrix Y = (A + BD*C)* A*B(D + CA*B)* D*C(A + BD*C)* (D + CA*B)* satisfies the equation Y = I + MY . [4 marks] (c) The deterministic finite automaton M has a 2-symbol alphabet {a, b}, and a single accepting state , the initial state. The transition diagram is as follows: b a a a b b Show that the event accepted by M can be denoted by the regular expression

Discuss two possible strategies that you might use to translate the abstract syntax tree corresponding to an integer expression composed of simple variables, integer constants and the usual integer operators +, , and / into reasonable quality code for a machine with eight general-purpose registers. You should pay particular attention to how you would control the allocation of registers and anonymous store locations, and you should outline what optimisations are convenient to perform. [20 marks] 7 Artificial Intelligence II Explain how genetic algorithms differ from conventional mathematical methods for optimisation. [10 marks] What are the advantages and disadvantages of genetic algorithms? [10 marks] 2 CST.94.13.3 8 Databases Describe how a data model is represented in a relational database, and explain how one might specify a relational database schema. [5 marks] What is meant by a referential integrity constraint in a relational database? [3 marks] Each year the number of tourists coming to Cambridge increases by 10%. Most of the pressure falls on a limited number of identified sites in the city Board has restricted the size of any group visiting such a site to 20, and requires a group of ten people or more to get a permit in advance. Most bookings are made either by tour operators or directly by independent guides: the Tourist Board will arrange guides for groups if asked to do so. A database is being installed to coordinate bookings and to provide information about the opening times of sites. Each site has separate opening times for summer and winter (owing to college autonomy, changes of season differ from site to site). Permits are issued to start on the hour or on the half-hour: they are valid either for 1 hour or for 2 hours, the duration being fixed for each site. The final permits of each day are timed to expire at the site's closing time. Each site has a fixed capacity, and no booking can be accepted that would cause it to be exceeded. The charge for a permit depends only on the site and the season. (Occasionally sites are closed for several hours during the normal opening period, for example when recording is taking place in King's College Chapel. The protocol is to inform the Tourist Board at least 6 months in advance.) The Tourist Board issues permits to visit an identified site at a given time on a given day, specifying the booking agent and the number in the group. Bookings can be made up to 6 months beforehand. Permits are issued to registered tour operators and guides on account, but in all other cases payment must be made in advance. The data held for registered guides includes not only account details but also their working hours and charges. Design a schema for the relational database that is to record this information for the Tourist Board. You may find it helpful to use domain types DATE, TIME and MONEY in addition to standard programming language datatypes. You do not need to specify the transactions that maintain the database, but you should state clearly any assumptions that influence the schema design. [12 marks] 3 [TURN OVER CST.94.13.4 9 Specification and Verification of Hardware Discuss the problems of providing tractable models of transistors suitable for hardware verification by formal proof. Compare and contrast at least two different models. Illustrate your discussion with concrete examples of transistor circuits. [20 marks] 10 Complexity For each of the following statements state whether the claim made is true, false or if more information is needed before a judgement can be made. Give one-sentence justifications of your assertions. (a) Sorting a list of numbers into ascending order is an NP problem. (b) Sorting a collection of programs into order so that the ones that finish quickly come before those that run for a long time is an NP-complete problem. (c) To be NP-complete is to be as difficult as any solvable problem can be. (d) Any NP problem can be solved (on an ordinary computer) in polynomial space and exponential time. (e) The problem of determining whether a k-clique is present in a graph is known to be NP-complete. Therefore for large graphs and large values of k it will always be impossible (in practice) to find such a clique even if it is known that one exists. (f ) For the purposes of complexity theory each of the cost functions n log n, n 1.573 and n! counts as polynomial growth. [20 marks] 11 Computation Theory Explain Turing's Thesis. [5 marks] (a) What is meant by saying that a Turing machine has searching states? Show that any Turing machine computation can be effected by a machine with searching states, equivalent in the sense that the head movements are identical and the same symbols are written to the tape. [5 marks] (b) Show that, subject to suitable encoding, any computation can be carried out by a Turing machine having only two states. [10 marks] 4 CST.94.13.5 12 Professional Practice and Ethics Discuss the relations among the following concepts: (a) secrecy (b) confidentiality (c) anonymity (d) control of personal information (e) privacy

Consider the following NFA , whose input alphabet is {a, b, c}. (i) For each of the two strings abc and bba, state whether the automaton accepts it, with justification. [2 marks] (ii) Using the subset construction, produce the full unoptimized state transition table of an equivalent DFA, listing its states in lexicographic order (important!) and indicating the starting and accepting states. [6 marks] (iii) Give a regular expression, no longer than six symbols (metacharacters included), that describes the strings accepted by the automaton, together with an intuitive explanation for it. [Hint: Part (a)(ii) helps.] [4 marks] (b) Consider language L1 of strings over alphabet {0, 1}, defined inductively as follows. (0) 00 w (1) 1w w (2) w1 (i) Draw the diagram of a DFA that recognizes L1 in no more than four states. [4 marks] (ii) Considering the words in L1 as unsigned binary numerals, let language L2 of strings over {0, 1} be the set of all and only the binary numerals obtained by adding 1 to any numeral in L1 and removing any leading zeros. NB: "adding" here means arithmetic addition, not string concatenation. Produce a regular expression no longer than 11 symbols that recognizes L2, with a clear and convincing explanation of how you derived it. [4 marks

A partial order (P, ) comprises a set P together with a binary relation which is reflexive, transitive and antisymmetric. Explain what the terms reflexive, transitive and antisymmetric mean. [3 marks] (b) The relation on natural numbers n, that is m k = n for some integer k . Invoking standard facts about division, establish that is a partial order. If in the definition of we used the set of all integers Z, instead of N, would (Z, ) be a partial order? Explain your answer briefly. [5 marks] (c) Draw the Hasse diagram for on the set {1, 2, , 13}. Identify the greatest lower bound (glb) and least upper bound (lub) of {4, 6}. Does the partial order (N, ) have greatest lower bounds and least upper bounds of all subsets of N, including all infinite subsets? Explain your answers briefly. [6 marks] (d) An atom of the partial order (N, ) is an element a N suchIdentify the atoms in your Hasse diagram, and more generally in N. [3 marks] (e) Explain, without proof, why a partial order that has least upper bounds of all subsets also has greatest lower bounds of all subsets. [3 marks]

The Domain Name System (DNS) is a large, successful distributed system. Its principal service is to map keys (such as host names) to values. (i) What are the major components of the DNS and how do they interact? [3 marks] (ii) Why does DNS impose a limit on the key length? [2 marks] (iii) Describe three aspects of the system that would need to be changed in order to support unlimited key length. [2 marks each] (b) A distributed component-based event middleware supports role-based access control. When the system is started, principal A has role B and principals having role B may carry out action C. At time T, according to its local clock, a component receives a message that means "principal A no longer has role B." At time T + 10ms, this component receives a message that means "perform action C as principal A." (i) Based solely on this information, immediately after the second message is received, why can the component not determine whether A may carry out C? [3 marks] (ii) What data structures should be placed within the two messages described above so that the component can determine, in this situation, whether A may perform C? What algorithms would need to be applied by the middleware to make these data structures useful? [6 marks]

Precisely define the concept of the Most General Unifier (MGU) of two terms, Explain (a) a technique that you could use to implement a pure functional programming language using applicative order (eager) evaluation; [6 marks] (b) a technique suitable if your implementation must use some form of lazy or normal-order evaluation. [6 marks] Comment on whether the behaviour of your implementation (b) is strictly and exactly the same as normal order evaluation in lambda-calculus. [3 marks] Comment about similarities and differences between your two techniques and any predictions you can make about their relative simplicity, performance or convenience.

(a) Describe three criteria a UK patent must exhibit. [3 marks] (b) What is the difference between the protection granted by a patent and that granted by copyright? Is this different in the UK from the USA? How might a computer program be protected? [5 marks] (c) Explain why giving away software might be a good thing. [6 marks] (d) A University Technology Transfer Office (TTO) is established to generate income from patenting and subsequently licensing intellectual property developed in a certain University. By drawing up a 5-year outline cash flow or otherwise, indicate whether this is a viable activity. How else might a University benefit from the IPR it generates? [6 marks] 13 E-Commerce Imagine you have written a program that you want to commercialise. (a) Outline a design for a web-site for the wider dissemination and/or sale of the program. Actual HTML is not required, nor details of the program. Your answer should include: (i) Elements of the business model, and a description of any mechanism or legal framework needed. [5 marks] (ii) A high-level site map. Outline any special features, such as registration, tracking or subscriptions that you will need to implement. [5 marks] (iii) A sketch of a typical page. Explain any features you use to enhance performance. [5 marks] (b) How could you market the site and drive traffic to it? [5 marks] 9 [TURN OVER CST.2003.7.10 14 Additional Topics (a) Give three methods of computing location of cell phones and indicate the accuracy in each case. [10 marks] (b) What is the location accuracy of GPS (Global Positioning System) and how can it be improved? [5 marks] (c) Give the accuracy of the ultrasonic Active Bat location system and discuss how it might compare with radio-based ultra wideband location systems. [5 marks] 15 Additional Topics (a) In relation to the locational privacy problem for the Active Badge system: (i) Define location privacy. (ii) Define a sensible security policy for the system with respect to location privacy. (iii) What elements of the system does a user need to trust? (iv) What if one does not want to be tracked? [6 marks] (b) In the Active Badge system, the badge emits its identifier and the building infrastructure picks it up. To protect location privacy, some have suggested to reverse this architecture: the room would transmit its identifier and the badge would pick it up. Discuss advantages and disadvantages of this arrangement. [2 marks] (c) You are required to design the security architecture for a location-based system. You are the cellular phone operator, so you know the location of users; application providers selling their location-based services to users must go through you. Of course you know the position of all active phones at all times, but you want to reassure your users that application providers can't track them. State your security policy and describe your implementation that enforces it. [6 marks] (d) Describe at least two attacks against the system you designed in part (c).

(a) In the Burrows-Wheeler Block Compression algorithm it is necessary to sort all the suffixes of a vector of possibly tens of millions of bytes. (i) Explain why Shell sort using a simple character by character string comparison function is unlikely to be satisfactory. [2 marks] (ii) Describe in detail the data structures and algorithms you would use to sort the suffixes and explain why your method is an improvement. You may assume that you have plenty of RAM available. [8 marks] (b) In the Burrows-Wheeler Block Compression algorithm a sequence of small positive integers are transmitted using Huffman encoding. (i) Describe how the Huffman code is constructed. [4 marks] (ii) Outline how it can be represented compactly in the compressed file. [6 marks] 2 Computer Design (a) Briefly describe the differences between a microprocessor's interface bus, a system I/O bus (such as PCI), and a peripheral interface. Consider the bandwidth characteristics and physical implementation of each. [8 marks] (b) Show how four 64Mbit byte-wide DRAM chips could be interfaced to a simple 32-bit microprocessor. Give a schematic diagram showing the connections, and a timing diagram to demonstrate the operation of the control signals. [8 marks] (c) Why might accesses to sequential DRAM addresses be treated differently from non-sequential ones? [4 marks] 2 CST.2003.6.3 3 Digital Communication I (a) Define the term multiplexing as applied to communication systems. [4 marks] (b) Describe three types of multiplexing, identifying in each case (i) mechanisms by which symbols are associated with particular channels; (ii) mechanisms by which transmitters are assigned channel resource; (iii) characteristics of the multiplexed channels; (iv) applications which are suited to the type of multiplexing.

Give a brief description of the main features of either Lex and Yacc or the corresponding Java tools JLex and Cup. [5 + 5 marks] Illustrate their use by outlining how you would construct a parser for expressions composed of identifiers, integers, unary minus and binary operators +, , and /. Your parser is expected to create a parse tree in a format of your choice representing the expression that is presented to it. If it helps, you may assume that expressions will be terminated by writing a semicolon after them.

Describe in detail both Prim's and Kruskal's algorithms for finding a minimum cost spanning tree of an undirected graph with edges labelled with positive costs, and explain why they are correct. [7 marks each] Compare the relative merits of the two algorithms. [6 marks] 7 Operating System Functions Why is it important for an operating system to schedule disc requests? [4 marks] Briefly describe each of the SSTF, SCAN and C-SCAN disc scheduling algorithms. Which problem with SSTF does SCAN seek to overcome? Which problem with SCAN does C-SCAN seek to overcome? [5 marks] Consider a Winchester-style hard disc with 100 cylinders, 4 double-sided platters and 25 sectors per track. The following is the (time-ordered) sequence of requests for disc sectors: { 3518, 1846, 8924, 6672, 1590, 4126, 107, 9750, 158, 6621, 446, 11 } The disc arm is currently at cylinder 10, moving towards 100. For each of SSTF, SCAN and C-SCAN, give the order in which the above requests would be serviced. [3 marks] Which factors do the above disc arm scheduling algorithms ignore? How could these be taken into account? [4 marks] Discuss ways in which an operating system can construct logical volumes which are (a) more reliable and (b) higher performance than the underlying hardware.

Let N be the natural numbers {0, 1, 2 . . .}. What is meant by each of the following statements? The subset S N is recursive. The subset S N is recursively enumerable. [5 marks] How would you extend the definition of recursive enumeration to sets of computable functions? [3 marks] A sequence of natural numbers is a total function s : N N. The sequence is recursive if and only if s is computable. A finite sequence of natural numbers is specified by a pair (l, x), where l N is the number of elements, and x : [1, l] N is a function that defines those elements. The case l = 0 defines the null sequence. In each of the following cases, establish whether the set defined is recursively enumerable: (a) the set of all recursive subsets of N [5 marks] (b) the set of all recursive sequences of natural numbers [2 marks] (c) the set of all finite sequences of natural numbers

: Write program that reads a sequence of integers into an array and that computes the alternating sum of all elements in the array. a Java program that reads a 1D array of integers from standard input and returns it.

Define the absolute error x and relative error x in representing a number x. How are these errors related? Which type of error is associated with the term loss of significance? Define machine epsilon m.

Consider the following problem to be solved using a Prolog program: Given a closed planar polygon chain represented as a list of n vertices [v(x1,y1), v(x2,y2), . . . , v(xn,yn)] compute the area of the enclosed polygon, and the orientation of the chain. The area is computed by the line integral 1/2 R x dyy dx where the integral is over the polygon chain. A nave solution is given by the following program, which defines the predicate area. The goal area(Chain,Area) succeeds when Chain is the list of vertices, and the magnitude of Area is the area of the polygon bounded by the chain. The sign of Area is positive if the orientation of the polygon is anticlockwise and negative if it is clockwise: area([X],0). area([v(X1,Y1),v(X2,Y2)|VS],Area):- area([v(X2,Y2)|VS],Temp), Area is Temp + (X1 * Y2 - Y1 * X2) / 2. Explain how vertices are processed by this procedure. [4 marks] Why does this program execute inefficiently? [3 marks] Write an alternative definition that is tail-recursive and makes use of accumulator variables. [10 marks] Explain why your alternative definition executes more efficiently.

A distributed system is being designed to hold details of appointments on behalf of its users. The system comprises a single server holding the appointments and a number of clients which interact with the server over a network supporting an unreliable datagram-based protocol such as UDP. (a) The server is to provide operations using a remote procedure call (RPC) interface with exactly-once semantics. For instance, boolean addEntry (Client c, Client d, Appointment a); is used by client c to add an entry to the diary of client d. Describe how this RPC system can be implemented, including (i) how parameters are marshalled and unmarshalled; (ii) how exactly-once semantics are achieved; (iii) how threads are used, both within a client and within the server. You may assume that the clients already know an appropriate network address to contact the server and that separate mechanisms are used for authentication and for security in general. (b) The system is to be extended to support transactional-style accesses by providing three further operations, void startTransaction (Client c); void abortTransaction (Client c); boolean commitTransaction (Client c); Define strict isolation and describe how, in this case, it could be enforced by timestamp ordering

A leave status of zero shows ordinary end and a non-zero status demonstrates unusual end. The various types of pish order are: skip (prompt ordinary end) C ; C 0 (execute C and in the event that it ends regularly go on with C 0 ), if B, C else C 0 (execute C or C 0 as per the worth of the boolean articulation B) assuming B return n (return leave status n assuming B is valid, in any case end ordinarily) C handle n with C 0 (execute C and assuming it ends with status n, execute C 0 ) In all cases the last leave status and state is that created by the last order executed. Characterize the primary functional semantics of these orders by giving an inductive meaning of (). You might expect there is a connection of the structure B, s b (where b {true,false}) which characterizes the worth of each boolean articulation B in state s. [7 marks] Write C = C 0 to truly intend that for all s, n and s 0 , it is the situation that C, s n, s0 holds if and provided that C 0 , s n, s0 does. Tell the best way to develop pish orders C1, C2 and C3 from C, C 0 , B and genuine simply utilizing the "if return " and " handle with " builds so that (a) C1 = skip [2 marks] (b) C2 = C ; C 0 [4 marks] (c) C3 = on the off chance that B, C else C 0 [7 marks] Justify your response for each situation. 6 CST.2000.5.7 10 Foundations of Functional Programming Give a short record of how four of the accompanying highlights of general programming frameworks can be displayed as far as a type of un-composed utilitarian programming where the referenced offices are not really given as inherent elements. While choosing your models and setting up your clarifications, organize that something like one of the four cases could be completed utilizing a normal polymorphically composed utilitarian language while no less than one would prompt sort really looking at issues. (a) Tuples (considering only the instance of pairs will be adequate). (b) Boolean amounts and an on the off chance that//else develop. (c) Lists (both void and non-void). (d) Recursive capacity definitions. (e) The numbers 0, 1, 2, . . . , with the related tasks of a zero test, expansion and increase. [4 marks each] Explain the issues about type checking for every one of the models you have given. [4 marks] 11 Logic and Proof Given a propositional recipe, we wish to test whether it is a redundancy and, in the event that it isn't, to figure an understanding that makes it bogus. Two strategies for doing this are the sequent math and requested paired choice charts. Give a short framework of these methods, applying the two of them to the formulae (A B) (B A) and (A B) (B A) [7 + 7 marks] It is proposed to supplant the typical sequent math rule for disjunction on the left by this standard: , A , B , A , A B Is this standard sound? Legitimize your response. [3 marks] Give a guide to show that utilizing this standard rather than the typical one makes a few confirmations more limited. [3 marks] 7 [TURN OVER CST.2000.5.8 12 Complexity Theory Give exact meanings of polynomial time decreases and NP-fulfillment. [2 marks each] Consider the accompanying two choice issues on undirected diagrams. 3-hub colourability: the assortment of diagrams G = (V, E) for which there is a planning : V {r, g, b} with the end goal that in the event that (u, v) E, (u) 6= (v). 3-edge-colourability: the assortment of diagrams G = (V, E) for which there is a planning : E {r, g, b} to such an extent that if (u, v),(u, v0 ) E, with v 6= v 0 , then (u, v) 6= (u, v0 ). Show that there is a polynomial time decrease from 3-edge-colourability to 3-hub colourability. [8 marks] The issue 3-edge-colourability is known to be NP-finished. Utilizing this data, for every one of the accompanying assertions, state if it is valid. For each situation, offer total defense for your response. (a) There is a polynomial time decrease from 3-hub colourability to 3-edgecolourability. [3 marks] (b) 3-hub colourability is NP-finished. [3 marks] (c) 3-edge-colourability is in PSPACE.

1 Distributed Systems For an enormous scope dispersed framework or application: (a) Describe elective ways to deal with making special names. Incorporate a conversation of the data conveyed by a name. [5 marks] (b) Discuss name to area restricting under the headings (I) accessibility of the limiting assistance [5 marks] (ii) consistency of the naming information [5 marks] (iii) versatility of named objects [5 marks] 1 [TURN OVER CST.98.12.2 2 Computer Design Early PCs (and early chip) were gatherer machines. RISC PCs supplanted the collector with a register record. (a) What is a register document and for what reason is it desirable over an aggregator? Show your response by composing a circle to work out factorial of 10 for a gatherer and a RISC processor (you might develop guidance sets and accept that a duplicate guidance is accessible). [12 marks] (b) Why is the Intel x86 processor family frequently alluded to similar to a drawn out gatherer machine? [4 marks] (c) The Intel x86 LOOP guidance decrements the CX register and, on the off chance that the outcome isn't zero, leaps to a given name. For what reason is a compiler prone to find it difficult to take advantage of this guidance, particularly for settled circles? [4 marks] 3 Digital Communication I How could bundle misfortune at any point happen in an organization? [5 marks] Outline a manner by which parcel misfortune can be diminished. Could it at any point be dispensed with totally? [5 marks] How does an ARQ framework manage bundle misfortune? [5 marks] "An ARQ execution ought to keep as much information on the way as the collector will get." Discuss. [5 marks] 2 CST.98.12.3 4 Computer Graphics and Image Processing Describe a calculation for cutting a line against a square shape. [9 marks] Show that it works utilizing the over three models. [3 marks] x y 1 1 2 2 B(0,0) A(0,1) B'(3,2) A' 30 The above graph shows a confounded 2D change applied to a unit square. The general change can be depicted regarding various easier changes. Depict every one of these straightforward changes and give a network portrayal of each utilizing homogeneous directions. [6 marks] Use the frameworks from the past part to view as the (x, y) directions of point A0 , the picture of point An under the general change. [2 marks] 3 [TURN OVER CST.98.12.4 5 Business Studies The figure shows a part of a PERT graph for a little programming project, along with the quantity of software engineer days each errand is assessed to take. (a) What is the basic way in a PERT chart and for what reason is it significant? What is the basic way in the PERT chart displayed beneath? [5 marks] (b) One expert and two developers are relegated to the undertaking, notwithstanding the chief. What amount of time will the undertaking require? [5 marks] (c) Derive the same GANTT outline for the task. [5 marks] (d) Task 8 sneaks past 2 days. How does this influence the undertaking? What activities, assuming that any are required, can be taken to lighten the slippage? [5 marks] Task 1 3 days Task 2 10 days Task 3 5 days Task 4 5 days Task 5 7 days Task 6 5 days Task 10 5 days Task 7 5 days Task 8 7 days Task 9 5 days Task 11 5 days Task 12 25 days Analysis Code Test Analysis 2 Code 2 Test 2 Integrate Specify last tests Code test outfit Test the test bridle Final tests Management 4 CST.98.12.5 6 Introduction to Security Some banks issue their Automatic Teller Machine (ATM) card clients with a haphazardly chosen individual indentification number (PIN). Others issue their clients with an underlying PIN just, and let the clients pick their own PIN whenever they first utilize the card in an ATM. Portray the benefits and burdens of these methodologies. [5 marks] Again, a few banks register the client PIN by scrambling the record number utilizing DES and a key known uniquely to their focal frameworks and ATMs, taking the initial four hex digits of the outcome, supplanting the digits A, . . . , F with 0, . . . , 5 separately, lastly, assuming that the main digit of the outcome is 0, supplanting it with a 1. What is the likelihood that a crook can get the PIN right given three conjectures? [5 marks] Yet different banks have utilized DES, and a key known uniquely to their focal frameworks and ATMs, to encode the PIN (whether haphazardly produced or client chose); they then, at that point, compose the outcome on the attractive strip on the client's card, so the ATM can check it without reference to the focal framework. Depict the hindrances of this course of action. [5 marks] In request to forestall assaults in view of controlling attractive strips, banks in certain nations have moved to utilizing shrewd cards. What impact could you anticipate that such a move should have on the frequency of card-based extortion?

**kindly answer all the questions**

**Related Book For**

**Posted Date:**