Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define the notions of Turing-recognisable language and undecidable language. b) Is L Turing- recognisable? Justify your answer with an informal argument. c) Justify with a

Define the notions of Turing-recognisable language and undecidable language. b) Is L Turing- recognisable? Justify your answer with an informal argument. c) Justify with a formal proof your answer to b) d) Prove that L is undecidable. (Hint: use Rice's theorem.) e) Modify your answer to b) when instead of L you have the language Ln = {(M);: M is a Turing machine that accepts more than n strings). where n is a fixed positive integer.


(a) For each n, e N, let (n) e denote the partial function N n*N computed by the register machine with index e using registers R1, . . . , Rn to store the n arguments and register R0 to store the result, if any. Explain why for each m, n N there is a totally defined register machine computable function Sm,n : N 1+m N with the property that for all (e, ~x) N 1+m and ~y N n (n) Sm,n(e,~x) (~y) (m+n) e (~x, ~y) (1) where denotes Kleene equivalence: for all z N, the left-hand side is defined and equal to z if and only if the right-hand side is defined and equal to z. Your explanation should make clear what assumptions you are making about the relationship between numbers and register machine programs. [10 marks] (b) Let f : N 1+m+n*N be a register machine computable partial function of 1+m+n arguments for some m, n N. (i) Why is the partial function f : N 1+m+n*N satisfying for all (z, ~x, ~y) N 1+m+n f(z, ~x, ~y) f(S1+m,n(z, z, ~x), ~x, ~y) (2) register machine computable? [3 marks] (ii) By considering S1+m,n(e, e, ~x) where e is an index for the partial function f in part (b)(i), prove that there is a totally-defined register machine computable function fix f : N m N with the property that for all ~x N m and ~y N n (n) fix f(~x) (~y) f(fix f(~x), ~x, ~y)

A set A equipped with a binary operation @ : A A A is a combinatory algebra if there are elements K, S A satisfying for all a, b, c A @(@(K, a), b) = a (1) @(@(@(S, a), b), c) = @(@(a, c), @(b, c)) (2) (a) Show that there is a binary operation on the set of equivalence classes of closed -terms for the equivalence relation of -conversion that makes it a combinatory algebra. [5 marks] (b) Show that every combinatory algebra A contains an element I satisfying @(I, a) = a (3) for all a A. [Hint: what does (2) tell us a = b = K?] [2 marks] (c) For an arbitrary combinatory algebra A, let A[x] denote the set of expressions given by the grammar e ::= x | paq | (ee) where x is some fixed symbol not in A and a ranges over the elements of A. Given e A[x] and a A, let e[x := a] denote the element of A resulting from interpreting occurrences of x in e by a, interpreting the expressions of the form pa 0q by a 0 and interpreting expressions of the form (ee0 ) using @. (i) Give the clauses in a definition of e[x := a] by recursion on the structure of e. [2 marks] (ii) For each e A[x] show how to define an element xe A with the property that @(xe, a) = e[x := a] (7) for all a A. [6 marks] (d) Recall the usual encoding of Booleans in -calculus. Using Part (c)(ii), show that in any combinatory algebra A there are elements True, False A and a function If : A A A satisfying @(If (a, b), True) = a (11) @(If (a, b), False) = b (12) for all a, b A [5 marks]


Consider a directed graph in which each edge is labelled by a pair of non-negative costs, for example a distance and a travel time. A path between a pair of nodes is called 'Pareto efficient' (after the economist Vilfredo Pareto) if there is no other path for which both costs are lower. (a) In the graph shown here, find all Pareto efficient paths from s to t, and state their costs. [1 mark] (b) Show that, if v0 v1 vk is a Pareto efficient path from v0 to vk, then v0 vk1 is a Pareto efficient path from v0 to vk1. [3 marks] (c) Let v0 vk be a Pareto efficient path from v0 to vk, and let its costs be (ca, cb). Show that there is a Pareto efficient path from v0 to vk with costs (ca, cb) that has V 1 edges, where V is the number of vertices in the graph. [3 marks] (d) We are given a start vertex s. Give an algorithm to compute all costs achievable by Pareto efficient paths from s to every other vertex. [6 marks] (e) Prove that your algorithm is correct.

(a) Consider the layer-2 switch topology shown below. Switch A Switch B Switch C Host X Host Y Host Z Port number Port number Port number 1 2 7 3 4 5 6 Assuming all switches start with empty switch-forwarding tables; Host X (with physical address X) sends a packet destined for Host Z. Enumerate in the style below, all packets sent across the network until the message arrives at Host Z. You may assume packet-processing, latency and transmission time are negligible. Additionally, indicate packets transmitted simultaneously. [5 marks] Time Sent Frame Step by Device on Link Source Destination 0 X X-A1 X Z . . . . . . . . . . . . . . . ? C C7-Z X Z (b) Enumerate in the style below, the forwarding table of Switch B at the end of Part (a). Destination Port . . . . . . [2 marks] (c) Consider a layer-2 network consisting of S+1 switches, S directly attached to H hosts. Each host runs V virtual machines, each with a single address. S switches are connected using a star topology with a single switch C at the centre. Each host exchanges data with a selected and stable subset of other hosts. Estimate the worst case number of entries in the forwarding table for any typical switch S and the number of entries in the forwarding table for switch C. [3 marks] (d) Users of this cluster of machines complain of occasional misbehaviour attributed to network timeouts and network slowdown. Outline two plausible chains of events causing the problem. Describe two appropriate, cost-effective, strategies for overcoming the issues faced by the users. You may assume the switches are state-of-the-art and buying more hosts is not the answer. [10 marks


Complete following coding tasks using the ORM framework Sequelize discussed in class. Part A. Write code to set up sequelize to point to a Postgres database in the cloud. The database credentials are listed here: [3 marks] Host: ec1-51-207-74-101.compute-1.amazonaws.com Database: a1sdhm8msueula User: upyylykcbzelaa Port: 5432 Password: 9161e64a460775e9fcf45edc3b28b33147905461667a249b3b22b54da86aa4511 Heroku CLI: heroku pg:psql postgresql-round-13482 --app web322-93-2221 Part B. Write code to specify a new "Vehicle" Model that will correctly capture the following data (represented as a JavaScript Object). NOTE: Any special details about the data will be listed as comments beside the related properties: [4 marks] let data = { vehicleID: "045678123", // primary key make: 'Honda Civic', description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", // unlimited length release Date: 15/06/2021, isPreOwned: true, price: 13900 Part C. Write valid code to work with the "Vehicle" Model defined in Part B according to the following specification: Synchronize the Database with our models and read all make and release Date of the data in the "Vehicle" model whose isPreOwned is false. Once the operation is completed successfully, output the full results using console.log(). [4 marks] Part D. Write valid code to work with the "Vehicle" Model defined in Part B according to the following specification: Synchronize the Database with our models and delete all preowned Vehicles whose price is 5000. Once this operation completes successfully, output the confirmation message "Vehicle(s) deleted." using console.log() [3 marks) Note: You must label/comment your code with "//Part A", "//Part B", "//Part C", "//Part D"; unrelated code may result in deduction or even 0 mark for the question.


1) Write Fraction class for operations with simple fractions. The class has two private fields: int numerator and unsigned int denominator (minus sign can be written only in front of the counter). 2) Write constructor with parameters 0, 1, 2. Check that the parameters are correct, for example, the denominator is not 0. If the parameters are incorrect, generate an exception. 3) Write private method Simplify, simplify the fraction. This method is called each time a fraction is rearranged or created. Note: If this point seems too complicated, postpone it until the end of the session. Fraction you can simplify in several ways, come up with or find something you like. 4) Write public method toString that converts a fraction to a string of the form string numerator / denominator. 5) Write add method that adds another fraction. Restart operator +. Compare functionality. Make sure the results are simplified. 6) Restart the operator: + =, -, - =. Make sure the results are simplified. Make sure, that the following types of operators are correct: t + = t; t1 + = t2 + = t3; (right to left). 7) Reload the comparison operator: <,>. Program so that there is no repetition of the code. 8) Reload the operator << as a friend method for the class Fraction. Transhipment must allow print fractions to the ostream class (file or cout) in the form numerator / denominator. Make sure to make the cout work properly << trupmena1 << trupmena2. 9) Reload the prefix and post-fix operator ++ so that the fraction is appended units. Ensure fraction1 = fraction ++ works correctly;

Additional instructions from the student:

(a) Give a call-by-name small-step operational semantics and typing rules for the syntax below. e ::= fn x e | e1 e2 | x [5 marks] (b) State and prove Determinacy. [6 marks] (c) State and prove Type Preservation. [9 marks] Any standard lemmas you use must be stated precisely, but need not be proved

(a) Suppose that l : intref . Now, consider the following program equivalence for L1: (if !l 0 then e1 else e2); e3 ' unit (if !l 0 then e1; e3 else e2; e3) (i) Explain informally but carefully why this equivalence holds. [3 marks] (ii) Using the definition of semantic equivalence, prove that this equivalence holds. [7 marks] (b) Now, consider the following non-equivalence: e3; (if !l 0 then e1 else e2) 6' unit (if !l 0 then e3; e1 else e3; e2) (i) Give a well-typed example exhibiting a counterexample of this equivalence. [5 marks] (ii) Give a statically decidable condition under which the transformation is valid. [5 marks


i need help for this project (if You are expected to investigate a case study (either drawn from your work site, or alternatively being secured through formal access) to analysis only two business processes from commencement to completion, with a focus on the more important or interesting tasks within the process. Be careful to select business processes of appropriate size. If you choose the processes which are too simple, you will find it hard to demonstrate your mastery of MIS concepts. Conversely, if you choose processes that are too complex, you may find it difficult to complete the assignment within the specified time. Consider discussing your choice with me before you begin work. The central premise of this project is that you are able to develop familiarity with describing the functional activities of the organization of your chosen case study, investigating the functional problems, and suggesting remedial actions in view of the IS and its capabilities to improve outdated business process. should be focus may be based on the following:

Providing background information of your chosen organization/system. Identify the kind of systems (software). Describing TWO business processes; including all related business functions -Please draw on wide sets of process mapping tools, i.e. a cross-functional diagram or alternatively flowchart. Therein, for rigors and coherence purposes, you will need to draw on relevant literature and modelling techniques to the issues raised in your chosen case study. Describing the technology and its main IT infrastructure components in your chosen case. Outlining organizational benefit from the extant IS application in the chosen process. Articulating the management level involved in using the system. Discussing the business and IS strategies influenced by this kind of technology. Commenting on any issues\ dysfunctional areas that arose during research of the case study. it should be for example like SAP or oracle for example in any organization for example in HR what is the process with the follow diagram


4. Let L = {(A) M is a Turing machine that accepts more than one string} a) Define the notions of Turing-recognisable language and undecidable language. b) Is L Turing- recognisable? Justify your answer with an informal argument. c) Justify with a formal proof your answer to b) d) Prove that L is undecidable. (Hint: use Rice's theorem.) e) Modify your answer to b) when instead of L you have the language Ln = {(M);: M is a Turing machine that accepts more than n strings). where n is a fixed positive integer.

kindly answer all the questions

Step by Step Solution

3.47 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

Certainly Lets address each question step by step a Definitions Turingrecognizable language A langua... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistics The Exploration & Analysis Of Data

Authors: Roxy Peck, Jay L. Devore

7th Edition

0840058012, 978-0840058010

More Books

Students also viewed these Programming questions

Question

6. What is the function of Golgi tendon organs?

Answered: 1 week ago