Question

In: Computer Science

Find the output for the following Turing machine when run on the tape b1001b, assuming that...

Find the output for the following Turing machine when run on the tape b1001b, assuming that the machine begins in state 1 and on the left side of the tape.

(1, 1, 1, 2, R)

(1, 0, 0, 2, R)

(1, b, 1, 2, R)

(2, 0, 0, 2, R)

(2, 1, 0, 1, R)

Solutions

Expert Solution

The initial configuration of the tape is given as b1001b.

The output of the turing machine is traced as follows :

Step 1 :

The first symbol scanned is the blank symbol b and the initial state given is state 1.

Using the transition (1, b, 1, 2, R), state 1 on seeing b goes to state 2,  replaces the blank symbol b by symbol 1 and the head moves towards the right.

The updated configuration is :

11001b

Step 2 :

The next symbol to be scanned is 1.

Using the transition (2, 1, 0, 1, R), state 2 on seeing 1 goes to state 1, changes the symbol 1 to symbol 0 and moves the head towards the right.

The updated configuration is :

10001b

Step 3 :

The next symbol to be scanned is 0.

Using the transition (1, 0, 0, 2, R), state 1 on seeing 0 goes to state 2, keeps the symbol 0 as it is and moves the head towards the right.

The updated configuration is :

10001b

Step 4 :

The next symbol to be scanned is 0.

Using the transition (2, 0, 0, 2, R), state 2 on seeing 0 remains in same state, keeps the symbol 0 as it is and moves the head towards the right.

The updated configuration is :

10001b

Step 5 :

The next symbol to be scanned is 1.

Using the transition (2, 1, 0, 1, R), state 2 on seeing 1 goes to state 1, changes the symbol 1 to 0 and moves the head towards the right.

The updated configuration is :

10000b

Step 6 :

The next symbol to be scanned is b.

Using the transition (1, b, 1, 2, R), state 1 on seeing b goes to state 2, changes the symbol from b to 1 and moves the head towards the right.

The updated configuration is :

100001

Hence, the required output of the given turing machine is :

100001


Related Solutions

Turing machine A that does the following: • On its first and second tape, A receives...
Turing machine A that does the following: • On its first and second tape, A receives two strings w and v, w, v ∈ {0, 1}? , representing two integer numbers. When machine A is started, the tape heads are located on the left-most position, on the most significant bits of w and v. • If none of the inputs w and v is the empty word, the Turing machine A writes the binary representation of the sum of the...
Explain how a Turing Machine can simulate an arbitrary DFA. Use a 2-tape Turing Machine. It...
Explain how a Turing Machine can simulate an arbitrary DFA. Use a 2-tape Turing Machine. It can be done with a 1-Tape Turing Machine, but 2-tape will likely make the explanation more intuitive.
Create a 3-tape Turing machine that implements multiplication with binary numbers. The first tape and the...
Create a 3-tape Turing machine that implements multiplication with binary numbers. The first tape and the second tape hold the numbers being multiplied and the third tape holds the product of the first two tapes. The two binary numbers may be different lengths.
If you have a Turing machine with a tape that is not just linear at each...
If you have a Turing machine with a tape that is not just linear at each move, instead you have the ability to move up, down, left, or right. There is a single read/write head. The transition function looks like. The tape extends up and right infinitely. That is, you can never go left or down of where you start, but you can go infinitely up and to the right. Is this machine equivalent to the standard Turing machine model?...
Prove that a single-tape Turing Machine that is not allowed to write on the input portion...
Prove that a single-tape Turing Machine that is not allowed to write on the input portion of the tape can only recognize regular languages.
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 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?
Question ::: A Forgetful Turing Machine (FTM) operates just like a normal Turing Machine except that,...
Question ::: A Forgetful Turing Machine (FTM) operates just like a normal Turing Machine except that, in every instruction (it, transition) the  letter written in the tape cell is always the letter 'a', regard less of the current state and the current letter (although the read/write head is still allowed to move either Left or Right, according to the instruction). What class of the languages is recognised by FTMs? Justify the answer. Could u explain why it is regular language?
Turing Machine and Closure Operations Show that Turing-recognizable languages are closed under the following operations: union...
Turing Machine and Closure Operations Show that Turing-recognizable languages are closed under the following operations: union concatenation star Each answer needs only be a short informal description of a Turing Machine (but it must still be sufficiently precise so someone could reconstruct a formal machine if needed). Also, be careful with non-termination (when appropriate)!
Turing Machine and Closure Operations Show that Turing-decidable languages are closed under the following operations: union...
Turing Machine and Closure Operations Show that Turing-decidable languages are closed under the following operations: union concatenation star
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT