Give the axiom and rules of the type system for polymorphic lambda…

Question Answered step-by-step Give the axiom and rules of the type system for polymorphic lambda… Give the axiom and rules of the type system for polymorphic lambda calculus (PLC). [6 marks] Given any function ? mapping type variables ? to boolean values b ? {true,false}, we extend ? to a function on all PLC types by defining ?(? ? ? 0 ) = ?(? ) ? ?(? 0 ) ?(??(? )) = ?[? 7? true](? ) & ?[? 7? false](? ) where ? and & are the usual boolean operations of implication and conjunction, and where ?[? 7? b] is the function mapping ? to b and otherwise acting like ?. For example, show that for any ? we have ?(??(? ? ?)) = true and ?(??(?)) = false. [2 marks] Let ?(?, M, ? ) be the following property of PLC typing judgements ? ` M : ? . “For all ?, if ?(? ) = false then ? contains a type assignment xi : ?i with ?(?i) = false.” Show that ?(?, M, ? ) is closed under the axiom and rules of the PLC type system. (You may assume without proof that if ? is not free in ? then ?[? 7? b](? ) = ?(? ); and also that type substitutions ? 0 [? /?] satisfy ?(? 0 [? /?]) = ?[? 7? ?(? )](? 0 ).) [10 marks] Deduce that there is no closed PLC expression of type ??(?).Give a precise definition of each of the complexity classes NP and co-NP.[4 marks](b) Give an example each of(i) an NP-complete language; and(ii) a co-NP-complete language,in each case giving a precise statement of the decision problem involved.[4 marks](c) If A and B are the two languages identified in Part (b), give an example ofa language that is polynomial-time reducible to both A and B. Justify youranswer. [4 marks](d) Consider the following statement:There is a polynomial p such that every valid Boolean formula oflength n has a proof of length at most p(n). Moreover, there is apolynomial-time algorithm that can check the correctness of the proofs.This statement is not known to be true or false. Explain what would be theconsequences of this statement being true or false for the relationship betweenNP and co-NP, giving full justification for your answer. (a) Describe the characterists of debt and equity financing, highlighting thedifferences between them.(b) What is the difference between a loan and an overdraft?Your software company is contracted to create a new control system for chocolatebar delivery in Cambridge. The contract is for a 6 month period, with payment of£400k against milestones in months 1, 3 and 6.(c) Create b an outline cashflow for the project assuming staff costs of £75k per monthand overheads of £60k per month.(d) What is your working capital requirement for the project allowing a contingencyof a two month delay to one of either the second or third delivery milestones?[5 marks](e) How would you suggest to finance this working capital requirement (a) Describe the DPLL method, explaining briefly each of its four steps. [4 marks](b) Use the DPLL method to find a model satisfying the following set of clauses, orto prove that no such model exists.{P, Q} {R} {Q, ¬S, ¬Q} {¬Q, ¬R, S} {P, ¬Q} {P, Q, ¬S} {P, ¬R, S} {¬P, ¬S}[6 marks](c) Describe briefly the procedure for constructing a BDD. Illustrate your answerby constructing the BDD (using the variable order P < Q < R < S) for:(¬P ? (Q ? S)) ? (S ? (¬R ? S)) : Write  full C++ program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once.Write  C++ program which reads three values of types char, int, double and string from the keyboard and primis, appropriately formatted, assigned values and variable types.Write  program that reads a string and a character from the keyboard. The program should output how many times the character appears in the string.Write  menu based program implementing the following functions:   (a) Given two signed distance field functions f and g, give the formula fortheir . . .(i) Union (f?g)(ii) Intersection (f?g)(iii) Difference (f?g)[3 marks](b) Give clear definitions for the Virtual Reality industry's principles of immersionand presence. Compare the two concepts and explain the difference betweenthem with examples demonstrating each. [5 marks](c) The Doo-Sabin subdivision scheme has kernel (1/4)[. . . , 0, 0, 1, 3, 3, 1, 0, 0, . . .],defining a scheme in which each face is replaced by four new vertices.(i) Give an expression for computing the position of a new vertex given thepositions of the four old vertices of a face. [2 marks](ii) If the face does not have 4 vertices then you must weight each parent vertexdifferently to find the position of the child. Suggest possible weights for thevertices of faces with 3, 5, and n vertices, and justify your answer.[3 marks](d) There are several ray-tracing-friendly acceleration structures.(i) Explain the BSP tree data structure. Explain how it is constructed andtraversed. [3 marks](ii) Explain the kd-tree data structure. Explain how it is constructed andtraversed. [3 marks](iii) Which of the two data structures is best-suited to ray-tracing a game ofchess in real time? Most large programs that have been written with considerable care and thoroughlychecked still seem to contain bugs at a rate of over one per 3000 lines of sourcecode. Systems involving hundreds of millions of lines of code can thus be expectedto contain tens of thousands of potentially catastrophic errors.(a) List several kinds of programming errors that can appear in programs anddiscuss their relative importance in relation to the long-term reliability of alarge application program. [7 marks](b) Suggest potential ways by which programmers may reduce the number ofprogramming errors they make, paying particular attention to languagefeatures that might help, extra features in program development systems andpossible changes in overall system architecture. [8 marks](c) In what ways would you expect languages 25 years from now to differ fromthose that are currently popular?Image transcription text2. Problem 2. The following (4 x4)-matrix, known as the Hadamard ma-trix, is well-known in quan... Show more... Show moreImage transcription textCharge Qubits e.g., a H atom or quantum wells. 1 1>E1 Eo Eo Ucos(wt) H = H + H’ = Ucos (wt) E1 U = -P .& Q = U/h… Show more  Computer Science Engineering & Technology Networking NETW 12 Share QuestionEmailCopy link Comments (0)