View the step-by-step solution to:

# A RAM Turing Machine is a Turing machine that has random access memory, along with one or more work tapes. This can be formalized as follows:

1. A RAM Turing Machine is a Turing machine that has random access memory, along with one or more work tapes.

This can be formalized as follows: The machine has an inﬁnite array A that is initially ﬁlled with blanks. It accesses this array as follows:

• One of the machine's work tapes is designated the address tape. • The machine's tape alphabet Γ includes the symbols

0,1,2,3,4,5,6,7,8,9,R,W.

The symbols R and W should not belong to the input alphabet Σ; it does not really matter whether the others are. Of course, Γ may include other symbols as well. • The machine also has two special states, qaccess and qcomplete, that are each different from its start state q0, accept state qaccept, or reject state qreject, and different from each other. (The machine may have other states too.)

1

• If the machine enters state qaccess, then - If the non-blank part of the address tape stores a string

µR

where µ ∈ {0,1,2,3,4,5,6,7,8,9}⋆ is the unpadded decimal representation of some integer i ≥ 0, then the address tape is erased (that is, ﬁlled with blanks), and the symbol σ currently stored in the array entry A[i] is then written onto the leftmost cell of this tape — with the tape head pointing to this symbol. The Turing machine moves to qcomplete, after having completed this read operation. - If the non-blank part the address tape stores a string

µWσ

where µ ∈ {0,1,2,3,4,5,6,7,8,9}⋆ is the unpadded decimal representation of some integer i ≥ 0, and σ is a symbol in Γ that is not in {R,W}, then A[i] is set to be (i.e., overwritten with) σ. The address tape is erased, with the tape head pointing to the leftmost cell on this tape. The Turing machine moves to qcomplete, after having completed this write operation. - Finally, if the non-blank part of the address tape stores anything else, then the instructions on it are considered to be invalid — so the address tape is erased (without the array A being either accessed or modiﬁed), and its tape head is moved to the leftmost cell on the tape. The machine moves to state qcomplete, once again.

Note: You may assume that the above instruction (beginning with the machine entering state qaccess) takes one move of the machine. • The machine behaves like an ordinary (deterministic) multi-tape Turing machine in all other respects.

(a) Show that if there is a (standard) multi-tape Turing machine M with a given language L ⊆ Σ⋆ then there is a RAM Turing machine c M with language L as well. Furthermore, if M decides L then c M decides L as well.

(b) Conversely, show that if there is RAM Turing machine M with a given language L ⊆ Σ⋆ then there is a (standard) multi-tape Turing machine f M with language L as well. Furthermore, if M decides L then f M decides L then f M decides L as well

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents