A Turing Machine with Left Reset is similar to an ordinary Turing Machine, but the transition function has the form:
δ: Q x τ x {R,RESET}
If δ(q,a) = {r,b,RESET} when the turing machine is in state q reading an a, the machine's head jumps to the left-hand end of the tape after it writes b on thetape and enters state r.Note that these machines do not have the usual ability to move the head one symbol left.Show that turing machines with leftreset with left reset recognize the class of Turing-recognizable languages.
Given a Turing-recognizable language, by definition there exists a standard Turing
Machine M1 that recognizes it. We need to convert M1 into a TM with left reset; call it M2. Since
it can’t move left and often gets confused, M2 will keep track of where its head is supposed to be
by marking that square with a dot. After each transition is complete, there is exactly one dot on
the tape, but during the transition procedure, there can be more than one dot on the tape.
For rules in M1 of the form x → y, R, M2 performs the following procedure:
Step 1. Read an x, overwrite it with a dotted y (this dot will help it find the correct final position
and will be erased later), and move right.
Step 2. Mark the current square (one square to the right of the original square) with a dot, but
then it must move (because it can only move right or reset left, not stay in one position), so reset
left.
Step 3. To get its head back to the correct place, move right until you read a dotted square
(this will be the square with the dotted y). Erase the dot and move right. Now the head is over the
correct square, and this square already has a dot on it (it was marked in Step 2).
For rules in M1 of the form x → y, L, M2 performs the following procedure:
Stage 1 (during which M2 marks the eventual destination square, i.e., the square to the left of
the original square, with a dot)
Step 1. Read an x, overwrite it with a dotted y, then reset left. If this square (the square at the
left end of the tape) is dotted, then it must be the dotted y, so quit (because M1 would also have
failed to move left, so we have successfully simulated the behavior of M1). If this square is not
dotted, mark this square with a dot; the move right that must accompany this marking is part of
Step 2.
Step 2. Move right. Read the current square; if it is dotted, it must be the dotted y, so erase
the dot over the y, reset left, and go to Stage 2, Step 1 (because the destination square has been
successfully marked). If this square is not dotted, mark it with a dot (it is our new candidate for
the destination square) and reset left.
Step 3. Move right until you read a dotted square. (Note that this first dotted square keeps track
of the extent of your search thus far.) Erase the dot and move right (onto the current candidate
square). Go to step 2.
Stage 2 (during which M2 positions its head on the destination square by first dotting the square
to the left of the destination square)
Step 1. (Note that we have arrived here from Stage 1, Step 2, so the current head position is
the square at the left end of the tape.) Read the current square; if it is dotted, it is the destination
square, so reset left and quit. If it is not dotted, mark it with a dot (this is our first candidate for the
square-to-the-left-of-the-destination-square, or STTLOTDS for short); again, the move right that
must accompany this marking is part of Step 2.
Step 2. Move right. Read the current square; if it is dotted, it is the destination square, so
reset left and go to step 4. If it is not dotted, mark it with a dot (this is the new candidate for the
STTLOTDS) and reset left.
Step 3. Move right until you read a dotted square (this is the square marking the extent of our
search so far). Erase the dot and move right. Go to step 2.
Step 4. Move right until you read a dotted square (this is the STTLOTDS). Erase the dot, move
right, and quit.
A Turing machine with doubly infinite tape (TMDIT) is similar to an ordinary Turing machine except that its tape is infinite to the left as well as to the right. The tape is initially filled with blanks except for the portion that contains the input. Computation is defined as usual except that the head never encounters an end to the tape as it moves leftward. Show that the class of languages recognized by TDMITs is the same as the class...
Construct a Turing achine with on tape thai rcccivs as input an integer x 〉 1 and returns as output the integer x-1 . Integers are represented in binary. Start of the computation: The tape contains the binary representation of the input r. The tape head is on the rightmost symbol of r and the Turing machine is in the start state o End of the computation: The tape contains the binary representation of the integer r - 1. The...
40 points) Please design a Turing machine T to recognize the union of the languages of two Turing machines Mi and M2. That is, T accepts an input string w, if and only if either Mi or M2 or both accept string w. Please describe the high-level idea (or algorithm) of your Turing machine T. You do not need to draw the low-level state transition diagram of your Turing machine. Note that the difficulty is that Mi or M2 may...
Give an informal description (in plain English) of a Turing machine with three tapes that receives as input two non-negative integers x and y, and returns as output the integer xy. Integers are represented as binary strings.Start of the computation: The first tape contains the binary representation of x and its head is on the rightmost symbol of x. The second tape contains the binary representation of y and its head is on the rightmost symbol of y. The third...
rarisition written in the format of the Turing Machine simulator is a special state H which means halt. For the given Below is a Turing machine program where each line is a transition writen current state, read symbol, new state, write symbol, drection e-d. wmeans to state 4, write a 1 and move the tape head left. Notc there is a special state a os on the leftmost n nanks , write the resulting bitstring when the TM reaches the...
Technical Review -Turing Machines 1. Machine #1 is very simple. State Read Symbols Write Symbol RAL Read 0 New State q Halt (L Read 1 L Read 1 0 L Run this machine on the following tapes and produce the result. Determine what this machine does The starting head position is marked by the arrow. 0011 100162 a) 1 † 1 10100 101112 0 0 b) 101 + 11000L 11000 safler halt, all reading Symbol remain some and stoping Adding...
1) Write a transition diagram for a Turing Machine that satisfies the following specifications. Do not make it skeletal -- show all possible transitions. (That means 3 transitions from each state (except the halt state) since Γ = {x, y, Δ} for this problem.) Pre: |Δ alpha Δ .... where alpha is a string of letters from {x,y} and ... are all Δ Post: if alpha is in the language described by regular expression (xy)* halt in the leftmost cell...
3. (1 point) Which of the following is true of PDA's? A. The stack of a PDA is unbounded in terms of the numbers of symbols it can store. B. A transition of the form (q, a, 8) = (r,c) corresponds to the PDA transitioning from state q to state s by reading a from the input string, popping nothing from the stack, and pushing r on the stack. Page 2 of 8 C. A transition of the form 8(q,a,s)...
Turing Machines - Models of Language and Computation
8. (7 points) Consider the deterministic Turing machine M (s, t, h), includes fa, b, u) and possibly other symbols, H following rules, along with possibly other rules: (K, Σ, δ, s,H), where K (h), and includes the 6(s,凵) = (t,-) δ(t, a) = (t,-) 6(r,L) = (h, a) Here凵represents a blank. Suppose M is started in the configuration 凵aababaa in the start state with the read write head scanning the blank...
Write a TM (Turing Machine) program that adds two base two numbers. Input is two nonnegative integers in base 2 with a plus sign between them. Output is their sum in base 2, with nothing else left on the tape. So first decrement, then increment. Use an online Turing Machine Simulator to see how it works. Use the following language for the program: current state, read symbol, next state, write symbol, direction [directions are (< left, > right, s stay)]...