Question: In the exercise, we consider the problem of adding two non-negative numbers. That is, we work towards constructing a Turing machine that computes the function

 In the exercise, we consider the problem of adding two non-negative

In the exercise, we consider the problem of adding two non-negative numbers. That is, we work towards constructing a Turing machine that computes the function f(n1,11) = n1 +n2 (i.e., add ny and mo). To do this we use unary representation of integers. That is, we represent integer n by a string of n +1 1s (e.g., we represent 4 as 11111 and 2 as 111.) To represent the tuple (n1, n2) we use a string of ni+1 1s, followed by an *, followed by a string of n2 +1 1s. For example, we represent the tuple (4,2) as 11111 * 111. a. Describe how a Turing machine, M1, would compute the function f(4,2) = 4+2. That is, we begin with a tape ... U11|11|1 * 111u... and need produce a tape with 4+2+1 = 7 1s, i.e.. ...DD1|11|11|11 UU... b. Construct a state diagram for Turing machine M1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!