Docsity

Simulating Non-Deterministic Machines: NTM to DTM and NP Machine to Polynomial Verifier, Study notes of Computer Science

Toggle sidebar
bg1
Simulating an NTM machine by a DTM
Theorem: Every t(n) time 1-tape NTM has an equivalent 2O(t(n)) time 1-tape DTM.
Nbe a 1-tape NTM.
δN: its transition function.
Assume: two or zero transitions from each configuration.
Order the two transitions as the first and the second.
On input w, a 3-tape DTM Dsimulates Nas described below.
Tape 1 of D: the input w.
Tape 3 of D: a bit string that describes a path of N’s computation tree.
Tape 2 of D: contents of N’s tape
(along the computation path described by the address on Tape 3)
1
pf3
pf4

Partial preview of the text

Download Simulating Non-Deterministic Machines: NTM to DTM and NP Machine to Polynomial Verifier and more Study notes Computer Science in PDF only on Docsity!

Simulating an NTM machine by a DTM

Theorem: Every t(n) time 1-tape NTM has an equivalent 2O(t(n))^ time 1-tape DTM.

N be a 1-tape NTM. δN : its transition function. Assume: two or zero transitions from each configuration. Order the two transitions as the first and the second. On input w, a 3-tape DTM D simulates N as described below. Tape 1 of D: the input w. Tape 3 of D: a bit string that describes a path of N ’s computation tree. Tape 2 of D: contents of N ’s tape (along the computation path described by the address on Tape 3)

Simulating an NTM by a DTM

  1. Tape 3 ← 0;
  2. Set RejectedSoFar to TRUE;
  3. Tape 1 ← Tape 2 ; CurrentState ← start state of N ;
  4. Simulate N on w guided by the contents of Tape 3:

(a) Repeat until all the bits on Tape 3 are read: δN not defined for CurrentState and symbol: go to step 5; δN is defined for CurrentState and symbol: update CurrentState and Tape 2; (if current address bit is 0 (1), use the first (second) transition) move right one position on Tape 3; (b) CurrentState is Accepting state of N : HALT and ACCEPT; (c) CurrentState is Rejecting state of N : go to step 5; (d) Current state is neither: RejectedSoFar ← FALSE; go to step5;

  1. IF Tape 3 contains all 1’s THEN

IF RejectedSofar is TRUE THEN HALT and REJECT;

ELSE Tape 3 ← next string; go to step 2;

ELSE Tape 3 ← next string; go to step 3;

Simulating a polynomial time verifier by an N P machine

On input w, an N P machine simulates a polynomial time verifier V as follows:

Nondeterministically Guess a bit string c of length t(n) where t(n) is the running time of the verifier.

Simulate V on 〈w, c〉 and accept iff V accepts.