What the turing machine actually does

Assignment Help Data Structure & Algorithms
Reference no: EM132868713

Question 1.(a) Show that {A, B, C, D}∗ is enumerable by describing a listing of all its elements that qualifies as an enumeration by the definition in the lecture notes

(b) Based on the listing you provided in question (a), give an ordering on the set {A, B, C, D}∗. That is, define mathematically when a strings from {A, B, C, D}∗ appears before another string s' from {A, B, C, D}∗.

(c) Assume that in dictionary ordering, A comes before B which comes before C which comes before D and hence A B C D comes before B A A A, etc. Is the listing of A, B, C, D ∗ in dictionary ordering an enumeration according to the definition in the lecture notes? Justify your answer.

(d) Give an encoding function for A, B, C, D ∗. (Hint, you could use the Fundamental Theorem of Arithmetic and prime numbers.)

(e) Show that the function you gave in question (d) above is indeed an encoding of {A, B, C, D}∗.

(f) Give the encoding of each of the strings ABCD and BAAA according to the function you gave in question (d) above and calculate the resulting number.

(g) Give a Gödel numbering of {A, B, C, D}∗. Fully justify your answer.

Question 2. Consider the Turing machine M whose graph is given in the attached DATASHEET.

(a) Give the formal definition of this Turing machine.

(b) Consider the following tape contents t:

1643_figure.jpg

Remember that we always start at location 0. Does the Turing machine M halt with input tape t? If it does not, explain in detail why not. If it does, give all the computation sequence (i.e., all the computation configurations from initial to last) and clearly specify the final configuration.

(c) For machine M and input tape t of question (b), give the output tape.

(d) Repeat questions (b) and (c) for tape contents t' where t' is:

1515_figure1.jpg

(e) Say what the Turing machine actually does when given one single input as a unary number.

(f) Show that the function g from N to N is Turing-Computable where:

g(n) = n - 1 if n ∈ N and n > 0
g(n) =  0 otherwise

(g) Let pre be the function from N2 to {0, 1} such that

pre(n, m) = 1 if n, m ∈ N and n = m - 1

pre(n, m) = 0 Otherwise

Is the decision problem pre solvable or unsolvable? Fully justify your answer.

Question 3. We Gödel number the possible moves by a Turing machine as follows:

GNm(R) = 0 GNm(L) = 1 GNm(0) = 2.

We Gödel number an action A = ((qi, sj) ›→ (qk, sl, X)) of a Turing machine as follows:

GNa(A) = 11i × 7j × 5k × 3l × 2GNm(X) .

For a Turing machine TM with action table A1, A2, • • • An, we calculate GNa(Ai) for each 1 ≤ i ≤ n and then order the GNa(Ai)s (which are all natural numbers) in descending order B1 > B2 > • • • > Bn and use these to Gödel number the Turing machine TM as follows: GN (TM ) = p1B1 × p2B2 × .... pnBn where p1 is the first prime (it is 2 and not 1), p2 is the second prime (it is 3), p3 is the third prime (it is 5), p4 is the fourth prime (it is 7),
etc.

(a) Give the graph of a Turing machine M' that takes a number given in unary notation, and returns the number and its triple (again in unary notation) separated by a blank space. Here is an example of an input/output of machine M':

1944_figure2.jpg

(b) Show that the problem q given below is related by the reducibility relation to a decision problem you have already seen in this paper and decide whether q is solvable or not justifying your answer.

Instances of q: every pair (i, j) ∈ N2
Question of q: Is j = i + 1?

(c) Use GNm, GNa and GN to Gödel number the Turing machine M given in your DATASHEET showing all the steps of numbering the moves, the actions and the machine itself.

(d) For each of the numbers 21 and 13, state whether it is the Gödel number by GNa of an action and if so give the action. If not state why not.

(e) For each of the numbers 1621 and 43, state whether it is the Gödel number by GN of a Turing machine and if so give the Turing machine. If not state why not.

Attachment:- DSA.rar

Reference no: EM132868713

Questions Cloud

What is the warranty expense : On January 1, 2016, the warranty liability was P60,000 and the warranty payments during 2016 totaled P50,000. What is the warranty expense for 2016
Compute Graham Incs basic earnings per share : The company issued 6,000 shares on December 1. Net income for 2017 was $175,600. Compute Graham, Inc.'s basic earnings per share for 2017
Prepare the shareholders equity section of the SFP : The Retained Earnings balance is $190,000 before considering the transactions above. Prepare the shareholders' equity section of the SFP in good form
Ict networking consultant project : Design and build small to medium networks and Understand the services which enable the Network to connect end users
What the turing machine actually does : What the Turing machine actually does when given one single input as a unary number - reducibility relation to a decision problem
How much work much finished goods is and work in process : Collegiate Publishing Inc. began printing operations on March 1. How much work much finished goods is and work in process
What would the impact of this amortization : What would the impact of this amortization be on operating cash flows for the 2020 fiscal year (ignoring the impact of taxes)
What is the book value per ordinary share : If the preference share is cumulative and fully participating and has a liquidation value of 55, what is the book value per ordinary share
Calculate the annual equivalent of the cash amounts : Calculate the Annual Equivalent of the cash amounts above, to determine the annual rental income needed to break even on the project, with discount rate of 15%

Reviews

len2868713

4/26/2021 9:22:20 PM

Hello kindly provide quote for completing Turing Machine Qns (No.2 and No.3) of the attached pdf. Please give reasonable price and let me know if you can answer them appropriately score full marks for those two questions

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd