Question: # Given input x , your TM will output x times 3 , i . e . , 3 x . input = 1

# Given input x, your TM will output x times 3, i.e.,3x.
input ="111";
blank ="";
start = q0;
accept = qf;
-q01[x, r, q1] # Mark first 1 as x
x [x, r, q0] # Skip already marked
y [y, r, q0] # If we hit y, go back to start
""["", l, q3]; # If blank, go back to start
-q11[1, r, q1] # Move right past remaining 1s
x [x, r, q1] # Skip any x
y [y, r, q1] # Skip any y
""[y, l, q2]; # At blank, mark y and go back
-q21[1, l, q2] # Move left through unmarked 1s
x [x, l, q2] # Move left through marked x
y [y, l, q2] # Skip any y while moving left
""["", r, q0]; # At start, go back to q0 for next pass
-q31[1, l, q3] # Move left over 1s
x [x, l, q3] # Move left over x
y [y, l, q3] # Move left over y
""["", r, q4]; # At start, begin left-to-right conversion
-q4 x [1, r, q4] # Convert x to 1 going right
y [1, r, q4] # Convert y to 1 going right
1[1, r, q4] # Keep 1s moving right
""["", r, qf]; # When done, finish
-qf;
correct it, if its not good, fix it please?

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 Programming Questions!