Equivalence of TMs and NTMs Theorem 3.16 and Corollary 3.18 Austin - - PowerPoint PPT Presentation

equivalence of tms and ntms
SMART_READER_LITE
LIVE PREVIEW

Equivalence of TMs and NTMs Theorem 3.16 and Corollary 3.18 Austin - - PowerPoint PPT Presentation

Equivalence of TMs and NTMs Theorem 3.16 and Corollary 3.18 Austin Herring Turing Machines A Turing machine is a 7-tuple: ( Q , , , , q 0 , q accept , q reject ) Q is the set of states is the input alphabet is the tape


slide-1
SLIDE 1

Equivalence of TMs and NTMs

Theorem 3.16 and Corollary 3.18 Austin Herring

slide-2
SLIDE 2

Turing Machines

  • A Turing machine is a 7-tuple: (Q, Σ, Γ, δ, q0, qaccept, qreject)

– Q is the set of states – Σ is the input alphabet – Γ is the tape alphabet – δ: Q x Γ → Q x Γ x {L, R} is the transition function – q0 ∈ Q is the start state – qaccept ∈ Q is the accept state – qreject ∈ Q is the reject state

slide-3
SLIDE 3

Nondeterministic Turing Machines

  • An NTM is a 7-tuple: (Q, Σ, Γ, δ, q0, qaccept, qreject)

Q is the set of states

Σ is the input alphabet

Γ is the tape alphabet

δ: Q x Γ → P(Q x Γ x {L, R}) is the transition function

q0 ∈ Q is the start state

qaccept ∈ Q is the accept state

qreject ∈ Q is the reject state

  • Note that the only difference is the transition function

For an NTM, in any state, it can nondeterministically choose any transition from the set of transitions returned by δ

  • Can be considered a tree – each choice of transition in the transition function is a new

branch in the tree

slide-4
SLIDE 4

Proof Introduction

  • Want to prove:

– Every nondeterministic Turing machine has an

equivalent Turing machine

  • Proof method:

– Use the view of the NTM N's computation as a tree – Have a deterministic Turing machine D perform a

breadth-first search on this tree

slide-5
SLIDE 5

Proof

  • Let D be a three tape Turing machine

– Tape 1 contains the input string w – Tape 2 contains a copy of N's tape on some branch of computation – Tape 3 maintains information on where D is in N's tree

  • A string of numbers represents following that path in the tree –

e.g., 123 means the root's first child, then that node's second child, then that node's third child

  • Note that some strings may not correspond to real

computations in N

slide-6
SLIDE 6

Proof

  • 1. Initially, tape 1 will contain w and tapes 2 and 3 will be empty
  • 2. Copy the contents of tape 1 to tape 2
  • 3. Simulate N on tape 2 along a particular branch using input

w. a)Before each step of N, look at the next symbol on tape 3 to determine which choice of transition to make. b)If tape 3 has no more symbols, a reject state is found, or the string on tape 3 is invalid, go to stage 4 c) If an accept state is found, accept

  • 4. Replace the string on tape 3 with the next string in

lexicographical order. Simulate this new branch by going to stage 2

slide-7
SLIDE 7

Corollary

  • A language is Turing-recognizable if and only if some

nondeterministic Turing machine recognizes it

  • Proof:

– A deterministic TM is a nondeterministic TM that only

ever has one element in the set returned by δ

  • Means that NTMs can recognize all languages TMs

recognize

– Other direction follows from prior proof, i.e., TMs can

simulate NTMs

  • Means that TMs recognize all languages NTMs

recognize

slide-8
SLIDE 8

Questions