Question

In: Computer Science

What is the possible transition diagram of Turing Machine for the given expression? M (x, y)...

What is the possible transition diagram of Turing Machine for the given expression? M (x, y) = x + y

where x and y are integers expressed in unary notation

to calculate f (2,3), then the input will be 110111

Solutions

Expert Solution

Input:

Here 2 + 3 given as 110111, the number 2 is represented with two 1"s and 3 is represented with three 1's.

and 0 inbetween 1's represented for addition or like a delimiter for the sepearting the operators for the given operation.

Output:

so output will be 11111 that is 2+3= 5 represented with five 1's.

Method:
Convert a 1 in the first number in to a symbol $ and then traverse entire input and convert the first blank encountered into 1. Then move towards left ignoring all 1’s and “0”. Come the position just next to $ and then repeat the same procedure till the time we get a “0” instead of $ on returning. Convert the 0 into blank and addition is completed.

Steps:

Step-1: Convert 1 into $ and goto step 2. If symbol is “0” then convert it into blank(B), move right and goto step-6.

Step-2: Keep ignoring 1’s and move towards right. Ignore “0”, move right and goto step-3.

Step-3: Keep ignoring 1’s and move towards right. Convert a blank(B) into 1, move left and goto step-4.

Step-4: Keep ignoring 1’s and move towards left. Ignore “0”, move left and goto step-3.

Step-5: Keep ignoring 1’s and move towards left. Ignore a $, move left and goto step-1.

Step-6: End.

Transition Diagram:

For more clarrifiaction of working:


Related Solutions

What is a Turing Machine? Be able to describe its parts. Given a Turing Machine description,...
What is a Turing Machine? Be able to describe its parts. Given a Turing Machine description, be able to carry out a computation and show the resultant tape. What is the halting problem? Is the halting problem decidable? What is Hoare Logic? When proving a program correct, we must look at the initial assertion and final assertion. What are these? What is a loop invariant?
In a state machine diagram with composite states, what is the meaning of a transition that...
In a state machine diagram with composite states, what is the meaning of a transition that goes from the boundary of a state? What is the meaning of a transition that goes to the boundary of a state?
In a state machine diagram with composite states, what is the meaning of a transition that...
In a state machine diagram with composite states, what is the meaning of a transition that goes from the boundary of a state? What is the meaning of a transition that goes to the boundary of a state?
Given two functions, M(x, y) and N(x, y), suppose that (∂N/∂x − ∂M/∂y)/(M − N) is...
Given two functions, M(x, y) and N(x, y), suppose that (∂N/∂x − ∂M/∂y)/(M − N) is a function of x + y. That is, let f(t) be a function such that f(x + y) = (∂N/∂x − ∂M/∂y)/(M − N) Assume that you can solve the differential equation M dx + N dy = 0 by multiplying by an integrating factor μ that makes it exact and that it can also be written as a function of x + y,...
If x=3, y=4 what is the value of this Java expression? (double) (x/y) What is the...
If x=3, y=4 what is the value of this Java expression? (double) (x/y) What is the value of this Java expression? (int)(1.0 / 2.0) + (double)(1 / 2) True or False: (double)(x)/y is the same as double (x/y) What is the value of this Java expression? (double)3  
Prove that the language L={(M, N): M is a Turing machine and N is a DFA...
Prove that the language L={(M, N): M is a Turing machine and N is a DFA with L(M) =L(N)} is undecidable. You need to derive a reduction from Atm={(M, w)|Turing machine M accepts w} to L. (In layman's terms please, no other theorems involved)
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements}...
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements} is not Turing recognizable.
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M...
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M eventually halts when started on a blank tape, no otherwise Input: A Turing machine M and a tape symbol a. Output: Yes if M eventually writes a when started on an blank tape, no otherwise. Input: A Turing machine M. Output: Yes if M ever writes a nonblank symbol when started on a blank tape, No otherwise. Input: A Turing machine M and a...
What is a finite-state machine ? What is a pushdown automaton ? What is a Turing...
What is a finite-state machine ? What is a pushdown automaton ? What is a Turing machine? What is a Turing complete language? Compare the finite-state machine , pushdown automaton , and Turing machine.?
Design a Turing machine that, given a positive binary number n greater than or equal to...
Design a Turing machine that, given a positive binary number n greater than or equal to 2, subtracts 2 from this number. Test it, step-by-step, on the example of n = 2.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT