Construct a Turing machine with two tapes that receives as i

Construct a Turing machine with two tapes that receives as input two non-negative integers x and y, and returns as output the integer x + y. Integers are represented as binary strings. Start of the computation: The first tape contains the binary representation of x and its head is on the rightmost symbol of x. The second tape contains the binary representation of y and its head is on the rightmost bit of y. At the start, the Turing machine is in the start state q_0. End of the computation: The first tape contains the binary representation of x and its head is on the rightmost symbol of x. The second tape contains the binary representation of the integer x + y (thus, the integer y is \"gone\"). The head of the second tape is on the rightmost bit of x + y. The Turing machine is in the final state q_1.

Solution

Below is the Turning machine written for the Addition of two numbers

The two number which are considered , they are X and Y on a Tape which is in that order..

Ex: Turning machine Pseudocode:

Repeat : Match 1 from X with a 1 from y

UNTIL all of X or Y is matched

If a 1 from X is not matched

Erase tape , write 1 (x>y)

else

erase tape , write 0 (X<=Y)

So any computation carried out by mechanical means can be prformed by a turning machine.

There is no more known model of computation more powerful that Turning Machines.

An algorithm for function f(W) is a Turning machine which computes f(W)

Thus the state of progress of the computation is fully determined at any stage and the symbols on the tape. That is the state of thesystem may be described by a single expression ( Sequence of symbols) consisting of the symbols on the tape followed by delta ( which we suppose not to appear elsewear and then by the note of instructions. This is the called the \" State formula\".

 Construct a Turing machine with two tapes that receives as input two non-negative integers x and y, and returns as output the integer x + y. Integers are repre

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site