Question

In: Computer Science

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 two integer numbers w and v on the third tape and then accepts the input. If one of w or v is the empty word, the Turing machine does not write anything on the third tape and rejects the input. If machine A outputs something, it outputs the binary representation of the sum in such a way that the left-most bit contains the most significant bit of the sum. Be careful: w and v may be of different length.

Q: Define a 3-tape Turing machine M that implements multiplication, in a manner similar to how A implements addition

Solutions

Expert Solution

3-tape Turing machine M that implements multiplication

• Infinitely long tape, divided into cells, for memory

• Tape initially contains input string followed by all blanks

• Tape head (↓) can move both right and left

• Can read from and write to tape

• Finite control based on current state, current symbol that head reads from tape.

• Machine has one accept state and one reject state.

• Machine can run forever: infinite loop

• The multi-tape Turing machine has multiple tapes and multiple heads

• Each tape controlled by separate head

• Multi-Tape Multi-head Turing machine can be simulated by standard Turing machine.

• It has multi-dimensional tape where head can move any direction that is left, right, up or down.

• Multi dimensional tape Turing machine can be simulated by one-dimensional Turing machine

• It has multiple tapes and controlled by a single head

• The Multi-tape Turing machine is different from k-track Turing machine but expressive power is same.

• Multi-tape Turing machine can be simulated by single-tape Turing machine.


Related Solutions

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.
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.
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)
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.
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.
Describe a non-deterministic two-tape TM for testing whetehr the string on the first tape is a...
Describe a non-deterministic two-tape TM for testing whetehr the string on the first tape is a substring of the string in the second a tape. choose your own test cases
Assume that a procedure is formalized as a Turing machine that can be represented as a...
Assume that a procedure is formalized as a Turing machine that can be represented as a finite length string from a finite alphabet. Thus any string over this alphabet is a Turing machine. Is the set of all Turing machines countable? Explain. Give an effective enumeration of all Turing machines (that is, show a “procedure” that will list all Turing machines).
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT