|
3 | 3 |
|
4 | 4 | ======= Non Deterministic Turing Machines =======
|
5 | 5 |
|
6 |
| - |
7 |
| - |
8 |
| - |
9 |
| - |
10 |
| - |
11 |
| - |
12 |
| -======= NP and Search Problems ======= |
| 6 | +Last lecture we saw that TM's can be encoded as strings and simulated by a |
| 7 | +universal TM using the configurations. We also saw that simulation of a TM, |
| 8 | +is essentialy tracing a path in the configuration space. But in the TMs that |
| 9 | +we defined, the out degree of any node (a configuration) |
| 10 | +in the graph (in the configuration space) is one. |
| 11 | + |
| 12 | +Similar to the Nondeterministic finite automata, we can also define TMs |
| 13 | +with delta rules that results in multiple next states |
| 14 | +(called Nondeterministic Turing Machines or NTMs). Then the delta rules |
| 15 | +will be of the form $\delta:\Omega\times \mathcal{T} \rightarrow \mathcal{P}(\Omega\times \mathcal{T}\times \{\langle, \rangle, -\})$. |
| 16 | +($\mathcal{P}$ denotes the power set). So the configuration graph of a |
| 17 | +NTM can have out degree greater than $1$. However the it still has to be a finite |
| 18 | +number since the size of $\mathcal{P}(\Omega\times \mathcal{T}\times \{\langle, \rangle, -\})$ is |
| 19 | +finite. Following the different paths, an NTM could accept, reject or keep looping. |
| 20 | +So we need to define what is meant by deciding a language by an NTM. |
| 21 | + |
| 22 | +An NTM is said to decide a language (a descision problem) $L$ iff, |
| 23 | +for all strings in the language, there exists one path in the configuration |
| 24 | +space that results in accept state. For strings not in the language, all |
| 25 | +paths in the configuration space should result in reject state. |
| 26 | + |
| 27 | +We know that NFA (Nondeterministic Finite automata) can always be converted to |
| 28 | +a deterministic one. However for Pushdown Automaton this coverstion is not possible |
| 29 | +always. We will see that for TMs, this conversion can always be done. That is the |
| 30 | +set of languages that can be decided by TMs does not change by allowing |
| 31 | +nondeterminism. |
| 32 | + |
| 33 | +Recall that UTM simulated a deterministic TM, by tracing the path in the configuration |
| 34 | +space. But for NTMs, the graph in the configuration space is a tree. A simple |
| 35 | +idea is for a UTM to do a graph traversal. DFS might be a bad idea, because |
| 36 | +some of the paths go into infinite loops. Hence it can to BFS. The first time, |
| 37 | +it finds that the NTM has reached the accept state, the UTM can also accept. |
| 38 | +If it never finds an accept state, the simulating TM rejects. |
| 39 | + |
| 40 | +======= NP and Search Problems ======= |
| 41 | + |
| 42 | +As we disscussed earlier, an NTM can take different paths in the configuration space. |
| 43 | +The length of the path is essentialy the number of steps. Now we will define |
| 44 | +the worst case running time for a NTM. |
| 45 | + |
| 46 | +For a language $L$, on inputs of size $n$, the worst case running time of an NTM |
| 47 | +is the length of the longest path in the configuration space on any of the inputs |
| 48 | +of size $n$. |
| 49 | + |
| 50 | +NP or Nondeterministic Polynomial time is the class of descision problems for which, |
| 51 | +there is an NTM which decides it in worst case polynomial time. |
0 commit comments