1. Homepage
  2. Writing
  3. COMP2022 Models of Computation - Assignment 3: Turing Machine and Morphett notation
This question has been solved

COMP2022 Models of Computation - Assignment 3: Turing Machine and Morphett notation

Order Now
SydneyCOMP2022Models of ComputationTuring MachineMorphett notation

comp2022 Assignment 3 (70 marks) s2 2024 This assignment is due in Week 10 and should be submitted to Gradescope. Assignment Writing Service

All work must be done individually without consulting anyone else’s solutions in accordance with the University’s “Academic Dishonesty and Plagiarism” policies. Assignment Writing Service

Go to the last page of this document and read the Submission Instructions. For clarifications and updates, monitor “Assignment FAQ”. Assignment Writing Service

Problem 1. (10 marks) Consider the following deterministic Turing Machine M over input alphabet Σ = {a, b}: Assignment Writing Service

0__L1 0**R0 Assignment Writing Service

1b_L2 2a_L3 Assignment Writing Service

1 _ _ * halt_accept

3__R0 3**L3 Assignment Writing Service

  1. (5 marks) State five strings that are in L(M), and five that are not. The strings should be over Σ. Assignment Writing Service

  2. (5 marks) Provide a low level description in Morphett notation of a (1-tape deterministic) Turing Machine for the language that has time complexity at most 5n + 5. Assignment Writing Service

Problem 2. (10 marks) Consider the following nondeterministic Turing Machine N over input alphabet Σ = {a, b}: Assignment Writing Service

0 _ _ * halt-reject 0aar0
0bbr0
0bxl1
Assignment Writing Service

1xxl1 1axr2 1bxr2 1__r4 Assignment Writing Service

comp2022 Assignment 3 (70 marks) s2 2024 Assignment Writing Service

2xxr2
2axr3
2bxr3
2 _ _ * halt-reject
Assignment Writing Service

3xxr3
3axl1
3bxl1
3 _ _ * halt-reject
Assignment Writing Service

4xxr4
4 a a * halt-reject 4 b b * halt-reject 4 _ _ * halt-accept
Assignment Writing Service

  1. (5 marks) State five strings that are in L(N), and five that are not. The strings should be over Σ. Assignment Writing Service

  2. (5 marks) Provide a low level description in Morphett notation of a (1-tape deterministic) Turing Machine for the language. Assignment Writing Service

Note: Morphett’s simulator of nondeterministic TMs uses randomness to resolve nondeterminism. This is not the semantics of NTMs. Assignment Writing Service

Problem 3. (30 marks) For each of the following languages over the input al- phabet Σ = {a, b, c}, provide a low level description in Morphett notation of a (1-tape deterministic) TM for the language. Assignment Writing Service

  1. The language of non-empty strings where the final character appears at most 3 times in the string (including the final character). Assignment Writing Service

    E.g., abccaba is in the language, while abcbcbab is not. Assignment Writing Service

  2. The language of strings of the form anbncnan for n 1. Assignment Writing Service

    E.g., aabbccaa is in the language, while abc is not. Assignment Writing Service

  3. The language of strings that can be turned into a palindrome by replacing Assignment Writing Service

    at most two characters by other characters. Assignment Writing Service

    E.g., aba is in the language because it is a palindrome, abb is in the lan- guage because we can change one character to get a palindrome (e.g., aba), and aabc is in the language because we can change two characters to get a palindrome (e.g., aaaa); however aabbccc is not in the language. Assignment Writing Service

  4. The language of strings for which the longest substring that matches ais longer than the longest substring that matches b. Assignment Writing Service

    E.g., caaaccbbaabaaac, baaacbbcaaabb and aaaa are in the language, while aabbbcacacacaca is not. Assignment Writing Service

comp2022 Assignment 3 (70 marks) s2 2024 Assignment Writing Service

  1. The language of strings of the form uvcvu where u, v ∈ {a, b}. Assignment Writing Service

    E.g., aabbacbaaab is in the language (take u = aab, v = ba), while aabbcabab is not. Assignment Writing Service

  2. The language of strings of the form uvw where v is a non-empty string with the same number of as, bs, and cs. E.g., bbaabbbccaccbc is in the language, while bbaabbbcc is not. Assignment Writing Service

Problem 4. (5 marks + 5 bonus marks) Assignment Writing Service

Your robot buddy GNPT-4 has come up with a revolutionary new strategy to prove that it is in fact equal in computational power to its more well-known cousin. It has a simple yet brilliant proof strategy: it will start by proving that P in fact equals the set of Turing-decidable languages, by showing that every decider runs in polynomial time. Once it has done this, it will obtain as a corol- lary that NP is also equal to this set, and the result will follow. GNPT-4 would like you to check its generated proof, and has generously offered you half of the million dollar bounty for doing so. Assignment Writing Service

Unfortunately, you’re starting to have some concerns about the claim that every decider runs in polynomial time. GNPT-4’s proof of this claim is 2123 pages long, so you don’t really feel like checking it in detail for a flaw. Instead, you have a much better idea: you’ll provide an explicit counterexample of a machine that does not run in polynomial time. Assignment Writing Service

  1. (5 marks) Provide a low level description in Morphett notation of a (1-tape deterministic) TM over input alphabet Σ = {a} that accepts every string, has at most 20 states, and has time complexity f (n) such that 2n f (n) 22n+1 for all n. Assignment Writing Service

  2. (5 bonus marks) Provide a low level description in Morphett notation of a (1-tape deterministic) TM over input alphabet Σ = {a} that accepts every string, has at most 40 states, and has time complexity exactly 2n. Assignment Writing Service

Problem 5. (15 marks) Assignment Writing Service

You’re a budding cartoonist, trying to create the next great TV animation. You’ve come up with the perfect idea, but now you need to pitch it to the executives. You know from your experience in the industry how the process works: you make a proposal with a string over Σ = {a, b} and the network runs a Turing machine Q on it. If Q accepts, your show will be ready for broadcast, but if it doesn’t, you will be shown the door, filled with eternal regret at what could have been. Of course, as Q is a Turing machine, there is also the possibility that Q will diverge. (For example, this is what happened after season 7 of Futurama.) Assignment Writing Service

One of your shady contacts (apparently they’re a secret agent who uses finite au- tomata, or something?) has managed to obtain a copy of the network’s machine Q for you. You now want to analyse Q to figure out how to pitch your show Assignment Writing Service

comp2022 Assignment 3 (70 marks) s2 2024 Assignment Writing Service

so it will be accepted. Furthermore, you’ve heard that it’s considered especially fortuitous if Q runs in a number of steps that is a multiple of 77, and such shows will be given air during the network’s prime timeslots. So you’d like a machine that will analyse Q and your proposal to see if that will be the case. Assignment Writing Service

1. (5 marks) Prove that the language {M, x: M halts on x in exactly 77n steps for some integer n > 0} is undecidable. Assignment Writing Service

Okay, so that was a bust. You’ve set your sights lower: at this point you just want any description that will be accepted, and you’re willing to retool your proposal to make it work. Rather than focusing on your specific string, you’d like a machine that will analyse just Q, and find some string, any string, that it will accept. There is, however, the possibility that Q doesn’t accept any string. (That would explain why there are no decent new shows these days.) In this event, your endeavour is doomed and you don’t care about the output, but you’d like the analysing machine to at least halt, so you’re not stuck waiting forever. Assignment Writing Service

2. (10 marks) Consider the following specification. The inputs are Turing ma- chines over input alphabet Σ = {a, b}. Assignment Writing Service

  1. (a)  If the input is a Turing machine M that accepts some input, the output should be any string x that M accepts. Assignment Writing Service

  2. (b)  If the input is a Turing machine M that does not accept any input, the output should be any string x. (There still must be an output, ie. the machine satisfying this specification must halt.) Assignment Writing Service

Prove or disprove whether there exists a Turing Machine that halts on every input and satisfies this specification. Assignment Writing Service

Assignment Writing Service

comp2022 Assignment 3 (70 marks) s2 2024 Submission Instructions Assignment Writing Service

You will submit answers to all the problems on Gradescope. Assignment Writing Service

Problems 1, 2, 3 and 4 are autograded. Assignment Writing Service

It is essential that you ensure that your submission is formatted so that the autograder can understand it. Upon submitting your responses, you should wait for the autograder to provide feedback on whether your submission format was correct. An incorrectly formatted submission for a question will receive zero marks for that question. A scaffold will be provided on Ed with the file names the autograder expects. Assignment Writing Service

Problem 1.1, 2.1 format: Assignment Writing Service

The first line of each answer should contain a comma separated sequence of five strings that are in the language, and the second line should contain a comma separated sequence of five strings that are not in the language. For example, if the language consists of all strings that only contain b’s, an example of a correct text file would be: Assignment Writing Service

Problem 1.2, 2.2, 3, 4 format (TMs): Assignment Writing Service

All TMs that you are required to provide in this assignment are deterministic and have a single tape, and that tape is doubly-infinite. When asked to give a low-level description use Morphett’s format. The initial state must be 0 Assignment Writing Service

Note that your machine should use an explicit transition to halt-reject when rejecting a string. If the machine has no transition on a (state, input) pair, this will be treated as an error, and will not be treated as rejecting the string. You may wish to include the following line in your machines, to treat all undefined transitions as rejects: * * * * halt-reject Assignment Writing Service

Problem 5 format: Assignment Writing Service

Problem 5 is handgraded. You will submit a single typed pdf (no pdf containing text as images, no handwriting). Start by typing your student ID at the top of the first page of each pdf. Do not type your name. Do not include a cover page. Submit only your answers to the questions. Do not copy the questions. Your pdf must be readable by Turnitin. Assignment Writing Service

epsilon, b, bb, bbb, bbbb
a, aa, aaa, aaaa, aaaaa
联系辅导老师!
私密保护
WeChat 微信
Sydney代写,COMP2022代写,Models of Computation代写,Turing Machine代写,Morphett notation代写,Sydney代编,COMP2022代编,Models of Computation代编,Turing Machine代编,Morphett notation代编,Sydney代考,COMP2022代考,Models of Computation代考,Turing Machine代考,Morphett notation代考,Sydney代做,COMP2022代做,Models of Computation代做,Turing Machine代做,Morphett notation代做,Sydneyhelp,COMP2022help,Models of Computationhelp,Turing Machinehelp,Morphett notationhelp,Sydney作业代写,COMP2022作业代写,Models of Computation作业代写,Turing Machine作业代写,Morphett notation作业代写,Sydney编程代写,COMP2022编程代写,Models of Computation编程代写,Turing Machine编程代写,Morphett notation编程代写,Sydney作业答案,COMP2022作业答案,Models of Computation作业答案,Turing Machine作业答案,Morphett notation作业答案,