) Suppose we have a representation of a computer system, either as…

Question Answered step-by-step ) Suppose we have a representation of a computer system, either as… ) Suppose we have a representation of a computer system, either as a set of axioms Γ specifying its behaviour or as a model M, along with a property φ which we expect to hold (but which may not hold due to programming errors). Give two reasons why we might prefer to model-check M |= φ rather than use logical inference to prove Γ ` φ. [2 marks] (b) Assuming a given set AP of atomic properties, ranged over by p, give the syntax of LTL formulae φ. (It is not necessary to be encyclopaedic—full marks can be obtained by including four constructs not present in classical logic.) Explain how an LTL formula is interpreted as true or false in a model. It suffices to consider two temporal operators along with conjunction and an atomic property p. [7 marks] (c) Suppose p is an atomic property. Give informal explanations of the two properties G(F p) and F(G p). State, giving reasons, whether the properties are equivalent or whether one implies the other. [3 marks] (d) Consider a program consisting of the following two threads where WORK is an unspecified unit of work not involving variables A or B. The threads are executed on a scheduler which first sets A and B to zero and then repeatedly and non-deterministically chooses to execute a whole line of code from either the left or right thread. An AWAIT e statement can only be scheduled if its condition e evaluates to true. L: AWAIT A=0; A:=1; M: AWAIT B=0; B:=1; AWAIT B=0; B:=1; AWAIT A=0; A:=1; WORK; WORK; A:=0; B model for this program, and draw it as a finite-state automaton. You should label one or more states of the automaton as satisfying the atomic property of deadlock. [5 marks] (e) Give a temporal logic formula expressing that deadlock does not occur. For the program in Part (d), would a model checker prove this formula or produce a counterexample trace? [3 marksConsider a database with one binary relation B. (a) Write programs in stratified Datalog for the following queries: (i) Give the set of elements x for which there are fewer than three elements y such that B(x, y). [3 marks] (ii) Give the set of elements x such that there is no path (in the  formed by B) from x back to itself. [3 marks] (iii) Give the set of elements x such that B(x, y) for every y. [3 marks] (b) Which of the queries defined in part (a) is: (i) safe? [3 marks] (ii) domain independent? [4 marks] (iii) monotone? [4 marks] In each case, justify your answer fully. (b) Briefly describe how to generate values which are distributed exponentially for use in the simulator. [3 marks] (c) State Little’s Law. Outline a proof of Little’s Law with the aid of a diagram. [7 marks] 4 VLSI chip: (a) single global clock (b) two-phase clock (c) synchronised clock using an on-chip phase-locked loop (d) self-timed logic (no clock) [5 marks each]Business Studies Describe the rˆoles and relationships of the members of a Chief Programmer team. [5 marks] Describe Maslow’s Hierarchy of Needs. [5 marks] Discuss stages of group formation. How does belonging to a group satisfy some of the needs described by Maslow? [5 marks] “The problems of co-ordination mean that there is a limit on the size of any software system that can be successfully built.” Discuss. [5 marks] 6 Advanced Algorithms Describe the structure of a Fibonacci heap and explain how to perform the following operations: (a) create an empty heap (b) add a single new node to a heap (c) form the union of two existing heaps  Discuss how neural operators which encode, analyse and represent image structurein natural visual systems can be implemented in artificial neural networks. Includefour of the following issues in your discussion:• receptive field structure• adaptiveness and perceptual learning• hierarchies of tuning variables in successive layers of the visual pathway• wavelet codes for extracting pattern information in highly compressed form• self-similarity of weighting functions• associative memory or content-addressable memory for recognising patternssuch as faces and eliciting appropriate response sequences[20 marks]9 SecurityWrite brief notes on each of the following:(a) the Internet Worm(b) Trojan horses(c) polymorphic viruses(d) virus exploitation of covert channels(e) the distinguishing characteristics of viruses written in interpreted languages  Discuss two possible strategies that you might use to translate the abstract syntaxtree corresponding to an integer expression composed of simple variables, integerconstants and the usual integer operators +, −, ∗ and / into reasonable qualitycode for a machine with eight general-purpose registers.You should pay particular attention to how you would control the allocation ofregisters and anonymous store locations, and you should outline what optimisationsare convenient to perform. [20 marks]7 Artificial Intelligence IIExplain how genetic algorithms differ from conventional mathematical methods foroptimisation. [10 marks]What are the advantages and disadvantages of genetic algorithms? [10 marks]2CST.94.13.38 DatabasesDescribe how a data model is represented in a relational database, and explain howone 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%. Mostof the pressure falls on a limited number of identified sites in the city centre. TheTourist Board has restricted the size of any group visiting such a site to 20, andrequires a group of ten people or more to get a permit in advance. Most bookingsare made either by tour operators or directly by independent guides: the TouristBoard will arrange guides for groups if asked to do so.A database is being installed to coordinate bookings and to provide informationabout the opening times of sites. Each site has separate opening times for summerand 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 eitherfor 1 hour or for 2 hours, the duration being fixed for each site. The final permitsof each day are timed to expire at the site’s closing time. Each site has a fixedcapacity, and no booking can be accepted that would cause it to be exceeded. Thecharge for a permit depends only on the site and the season. (Occasionally sitesare closed for several hours during the normal opening period, for example whenrecording is taking place in King’s College Chapel. The protocol is to inform theTourist Board at least 6 months in advance.)The Tourist Board issues permits to visit an identified site at a given time on agiven day, specifying the booking agent and the number in the group. Bookingscan be made up to 6 months beforehand. Permits are issued to registered touroperators and guides on account, but in all other cases payment must be made inadvance. The data held for registered guides includes not only account details butalso their working hours and charges.Design a schema for the relational database that is to record this information forthe Tourist Board. You may find it helpful to use domain types DATE, TIME andMONEY in addition to standard programming language datatypes. You do not needto specify the transactions that maintain the database, but you should state clearlyany assumptions that influence the schema design. [12 marks]3 [TURN OVERCST.94.13.49 Specification and Verification of HardwareDiscuss the problems of providing tractable models of transistors suitable forhardware verification by formal proof. Compare and contrast at least two differentmodels. Illustrate your discussion with concrete examples of transistor circuits.[20 marks]10 ComplexityFor each of the following statements state whether the claim made is true, false orif more information is needed before a judgement can be made. Give one-sentencejustifications 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 quicklycome 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 spaceand exponential time.(e) The problem of determining whether a k-clique is present in a graph is knownto be NP-complete. Therefore for large graphs and large values of k it willalways be impossible (in practice) to find such a clique even if it is known thatone exists.(f ) For the purposes of complexity theory each of the cost functions n log n, n1.573and n! counts as polynomial growth.[20 marks]11 Computation TheoryExplain Turing’s Thesis. [5 marks](a) What is meant by saying that a Turing machine has searching states? Showthat any Turing machine computation can be effected by a machine withsearching states, equivalent in the sense that the head movements are identicaland the same symbols are written to the tape. [5 marks](b) Show that, subject to suitable encoding, any computation can be carried outby a Turing machine having only two states. Define the types and terms of the language PCF. Describe the denotationalsemantics of PCF using domains and continuous functions. In what sense is thedenotational semantics of PCF compositional? [12 marks]Explain the soundness and adequacy properties of the denotational semantics withrespect to the operational semantics of PCF. (A definition of the PCF operationalsemantics need not be given.) [4 marks]Define the notion of contextual equivalence for PCF terms. Explain why thecompositional, soundness and adequacy properties mentioned above imply thatif two closed PCF terms of the same type have equal denotation, then they arecontextually equivalent. [4 marks]11 Information Theory and CodingThe information in continuous but bandlimited signals is quantised, in that suchcontinuous signals can be completely represented by a finite set of discrete numbers.Explain this principle in each of the following four important contexts or theorems.Be as quantitative as possible:(a) The Nyquist Sampling Theorem. [5 marks](b) Logan’s Theorem. [5 marks](c) Gabor Wavelet Logons and the Information Diagram. [5 marks](d) The Noisy Channel Coding Theorem (relation between channel bandwidthW, noise power spectral density N0, signal power P or signal-to-noise ratioP/N0W, and channel capacity C in bits/second). [5 marks]12 Computer VisionDiscuss the rˆole of non-linear operators in vision for the extraction of motioninformation, texture information, colour information, and stereo information.What are the limitations of linear operators (such as filters) compared withnon-linear ones? What is a quadrature pair, and what is a Hilbert pair?What is a Hilbert Transform, and what is a natural way to build a usefulnon-linear operator from it? [20 marks]6CST.97.9.713 TypesGive the syntax of (types and terms of) the second-order polymorphic lambdacalculus λ2 whose five ways of constructing terms, M, are: identifiers, lambdaabstraction, application, type abstraction and type application. (The last two aresometimes known as generalisation and specialisation.) Make it clear which, if any,sub-phrases of terms represent types or type variables. [4 marks]Give a term M conforming to the syntax of λ2 which is not well-typed accordingto the usual inference rules for λ2. [2 marks]Let λU be the untyped lambda calculus whose terms N have syntax:N ::= x | λx.N1| N1N2.Define a function erase : λ2 → λU which removes all types from a λ2 term, butwhich preserves the rest of it.[Hint: erase(Λα.M) = erase(M).] [3 marks]Now find (or briefly justify why this is impossible):(a) two well-typed λ2 terms M1 and M2 without free type variables such thaterase(M1) = erase(M2) = λx.x and that M1 and M2 differ by more than typevariable renaming;(b) a well-typed λ2 term M3 such that erase(M3) = λx.xx;(c) a well-typed λ2 term M4 such that erase(M4) = (λx.xx)(λx.xx);(d) a well-typed λ2 term M5 such that N5 = erase(M5) has no ML type;(e) a λU term N6 which has an ML type, but such that there is no well-typed λ2term M6 with erase(M6) = N6.  using c programing Write program to calculate the average of a set of students (we don’t know their count) (using functions)write program to print Hello world in C language. post screen shot after doing in computer Explain the term positive semi-definite. [1 mark]Let A be a square matrix. State Schwarz’s inequality for the product Ax. Whatare the singular values of A, and how are they related to the `2 norm of A?[4 marks]Describe briefly the singular value decomposition of the matrix A, and how it maybe used to solve the linear equations Ax = b. [4 marks]Let xˆ be an approximate solution of Ax = b, and write r = b − Axˆ, e = x − xˆ.Find an expression for the relative error kek/kxk in terms of computable quantities.Show how your formula is related to the singular values of A. [8 marks]How may this formula be used if some singular values are very small? [3 marks]15 Communicating Automata and Pi CalculusDefine the notions of sort and sorting for the π-calculus, and explain what is meantby the assertion that a process P respects a sorting. Give two reasons why sortingis useful. Simple data values can be represented as abstractions in the π-calculus. Inparticular, if True and False are abstractions representing the two truth-values,then b.True, b.False are processes in which each truth-value is located at b.Define the abstractions True and False. Also, for arbitrary processes P and Q,define the abstraction CASES(P, Q) such thatCASES(P, Q)hbi | b.True −→∗PCASES(P, Q)hbi | b.False −→∗ Qand demonstrate these reductions. Give a sorting respected by all theseconstructions.  ) A data object exists in persistent memory.(i) A single operation is invoked on it in response to a request from a client.The result of the invocation is output to the client.How can the operation be made atomic? [4 marks](ii) A client requests a high-level operation which comprises more than oneof the type operations on the data object.How can the high-level operation be made atomic? [8 marks]3 [TURN OVERCST.93.5.48 DatabasesDescribe the relational model of data. [4 marks]What is meant by a candidate key? [2 marks]Explain what it means for a relational data model to be presented in(a) Third Normal Form (3NF) [5 marks](b) Fourth Normal Form (4NF) [5 marks]in each case illustrating your answer with a suitable example data model.In what circumstances might it not be sensible to hold relational data according tothese normal forms? [4 marks]SECTION C9 Foundations of Functional ProgrammingDescribe how the λ-calculus models the operations of addition, test for zero andsuccessor, representing the natural numbers by Church numerals. [4 marks]The Fibonacci sequence is defined by F0 = 0, F1 = 1 and Fk = Fk−1 + Fk−2for k > 2. Present a λ-term fib that computes the Church numeral for Fk giventhe Church numeral for k, for all k > 0. Do not use Y or any other fixed pointcombinator. You may take as primitive the λ-calculus encodings of standard datastructures. [6 marks]Describe how to assign G¨odel numbers to λ-terms and explain the notation pMq.Describe an application of these techniques. [3 marks]Present a λ-term iszero, such thatiszeropMq =true if M = 0false if M 6= 0or prove that no such term exists. [7 marks]4CST.93.5.510 Computation TheoryShow that there is no way of deciding by algorithms whether a general registermachine program with code p will terminate when started with initial data of 0 inevery register. [10 marks]Show that there is no way of deciding by algorithm whether the blank character willbe printed during the course of a general Turing machine computation. [10 marks]Note: any standard form of the undecidability result for the general halting problemmay be assumed, but should be stated clearly.11 Complexity TheoryExplain how to measure the size of a problem in complexity theory. [3 marks]What is meant by reducing one problem to another? [4 marks]Given that the Boolean Satisfiability Problem is NP-complete, show that theHamiltonian Circuit Problem for undirected graphs is also NP-complete.[13 marks]12 Formal Languages and AutomataExplain what is meant by a regular expression over an alphabet Σ, and by thelanguage L(r) denoted by such a regular expression r. [5 marks]For any regular expressions r, s, t, show that if L(r) contains L(t|sr) then it alsocontains L(s*t). [5 marks]Assuming that the empty string ε is not in L(s), show that if L(r) = L(t|sr) thenL(r) = L(s*t). Hint: argue by induction on the length of strings in L(r). [5 marks]Give an example to show that the above assumption ε 6∈ L(s) is necessary.[3 marks]Deduce that when ε 6∈ L(s), r and t|sr denote the same language if and only if r ands*t denote the same language.kindly answer all the questions Computer Science Engineering & Technology C++ Programming TELECOM 22 Share QuestionEmailCopy link Comments (0)