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?
prove or disprove A Turing machine with two tapes is no more powerful than a Turing...
prove or disprove A Turing machine with two tapes is no more powerful than a Turing machine with one tape. (That is, both types of machines can compute the same set of functions.) The cardinality of the set of irrational numbers is greater than the cardinality of the set of all rational numbers. The cardinality of the set of all algebraic numbers is exactly the same as the cardinality of all real numbers.
In the short run, when the firm produces zero units of output, which of the following...
In the short run, when the firm produces zero units of output, which of the following is always equals to zero? a. total cost b. total variable cost c. economic profit d. total fixed cost e. economic loss
Short-run economic fluctuations occur when a shock moves a short-run equilibrium not at potential output when...
Short-run economic fluctuations occur when a shock moves a short-run equilibrium not at potential output when potential output increases when potential output decreases prices have fully adjusted to a shock A key feature of Keynesian economics is the prices are _______________. Therefore, if the economy goes into recession, without an policy intervention recovery will be ____________. sticky, slow flexible, fast stickly, quick flexible, slow Economic fluctuations that cause lower production, higher unemployment and lower inflation are caused by which of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT