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

  To sort a list of integer using the selection sort algorithm

Identify the least frequent letter in the above text. Implement a separate function void getLeastFreqLetter() for this task.

  Discuss the advantages of declaring and instantiating data

Discuss the advantages of declaring and instantiating data in multidimensional arrays. Show an example that you can use in one of your programs or any program.

  Execute the given stack operation

For each part of this problem, assume the "before" values when the given instruction is executed. Give the requested "after" values.

  Simulate an operating system process planner again

Simulate an operating system process planner again - busy with the highest priority process that requires that resource

  Give an algorithm for finding the preorder successor

Give an algorithm for finding the preorder successor of a given node in such an injured rethreaded binary tree.

  How many parameters must be estimated to train

Consider a naive Bayes classifier with 3 boolean input variables, X1, X2 and X3, and one boolean output, Y. How many parameters must be estimated to train such a naive Bayes classifier? (you need not list them unless you wish to, just give the tota..

  Dhcp server at each network segment

Discuss the drawbacks and benefits of having a DHCP server on each network section, versus having some of the network sectionsreceive their IP address and network configuration via a router using a DHCP relay agent?

  Creating database for a human resources group

Construct a database for a human resources group. List a few different tables and columns to store the HR information.

  In addition make a flow-chart to show how to sort using one

there are many additional algorithms available. choose 2 sorting and 2 searching algorithms and describe them in

  Develop an algorithm to fins a subset of sorted elements

Develop an algorithm to fins a subset of sorted elements within a bigger set. Our customer does not care about how the algorithm is implemented as far as it is

  Implementing a pseudocode of quicksort algorithm

Present a formal mathematical proof that an even split of an array into two subarrays results in the best performance of the quicksort algorithm

  Develop class templates for various trees

Develop a class template for general search trees that uses a binary tree to represent the tree as described in the text.

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