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

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,...
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.
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.
Given a list of numbers, could you build a Turing machine to sort them into non-decreasing...
Given a list of numbers, could you build a Turing machine to sort them into non-decreasing order? Non-decreasing order is essentially the same thing as increasing order, except that it recognizes that some of the numbers might be repeated. Explain why this is or why this is not possible. Do not try to give an algorithm or even a description of how the machine would work--just an explanation as to why it is or is not possible.
In what respects does a UML state diagram differ from a state transition diagram?
In what respects does a UML state diagram differ from a state transition diagram?
Draw PDA transition diagram for the following language: The set of strings over the alphabet {x,...
Draw PDA transition diagram for the following language: The set of strings over the alphabet {x, y} where 2 * (# of x's) = 3 * (#y's) That is, if we let nx be the number of x's and ny be the number of y's, then the strings in these language are those where 2nx = 3ny Try to find a PDA that is as simple and elegant as possible (do not convert from CFG). ------------------------------------------------------------------------------------------------------------------ USE Notation between transition:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT