Download presentation
Presentation is loading. Please wait.
Published byClyde Cole Modified over 9 years ago
1
ATM, Halting Problem, P vs. NP Chapter 4, 5 & 7
2
Russel’s Paradox http://www.jimloy.com/logic/russell.htm An Index is a book that lists other books in the library – Index of all biology text books in the library. Consider the index of all indices, i.e., book that lists other indices. – It would contain itself. – Called a self-referential index (form of recursion). Consider the index of all non self-referential indices. – The book that lists all indices that are non self-referential. – Call it the non-recursive index 1.If the non-recursive index lists itself then its recursive and shouldn’t be in the list. 2.But if it doesn’t list itself, then it is non-recursive and it should be listed as one of the non self-referential books.
26
A TM reduces to HALT TM Proof by Contradiction – Assume we have a Turing Machine R that decides HALT TM. In other words, we can design an algorithm that determines of another algorithm (M) will halt on a given input (w).
27
A TM reduces to HALT TM Proof by Contradiction – Assume we have a Turing Machine R that decides HALT TM. – Then, use R to construct a new machine S that can decide A TM. – We have already proven that is NOT decidable. – So, if we can construct a machine S that can decide A TM based on HALT TM then we must conclude that cannot be decidable.
28
A TM reduces to HALT TM Proof by Contradiction – Assume we have a Turing Machine R that decides HALT TM. – Then, use R to construct a new machine S that can decide A TM. – We have already proven that A TM is NOT decidable. – So, if we can construct a machine S that can decide A TM based on HALT TM then we must conclude that cannot be decidable.
29
Deeply Understanding A TM A TM is just a set of strings where part of the string is the encoding of a Turing Machine (M) and the other part is an input string (w). – The string in A TM are the ones were the input w is accepted by the Machine M. – The string in the complement of are the ones the input w is rejected by the Machine M. A decider for A TM cannot exist because there are absurd Turing Machines infinite loop or output nothing. Detecting such absurdity is impossible because you are limited by the power of the same machine that allows for such absurdity. – Simulating an absurd Turing Machine with another Turing Machine cannot “undo” it absurdity and allow it to always produce an answer (accept or reject).
31
Chapter 7 Time Complexity
32
Big-O
33
Little-o
34
O(n 2 )
35
O(n log 2 n)
36
O(n)
38
Non-determinism
39
The Cost of Non-determinism
40
The Class P
41
Example of a problem in P
42
PATH is polynomial
43
The Class NP
44
Polynomial Verification Some problems (Hamiltonian Path) cannot be solved in Polynomial Time (P), but… If we could somehow obtain a solution (ask an oracle), the solution could be verified in P- time.
45
Hamiltonian Path: Decider vs. Verifier There is very subtle difference: Hamiltonian Decider – Input: Graph – Output: Hamiltonian Path Hamiltonian Verifier – Input: Graph, Hamiltonian Path – Output: Accept/Reject
46
Hamiltonian Path Algorithm – Non- deterministic
48
Understand NP in English Problems where the solutions can be verified in P-Time, but cannot be “discovered” in P- time Problems where the solutions can be “discovered” P-Time using a Non- deterministic Turing Machine Note: Every non-deterministic Turing machine can be made deterministic by adding O(k n )
54
Non-determinism O(k n ) k is usually 2 – Given a graph with n vertices, there are 2 n possible subsets. 2 options for each vertex Either you are in the subset (1) on not (0) Binary state condition – Given a list with n value, there are 2 n possible subsets
55
Non-determinism O(k n ) “Non deterministically select a subset implies 2n operations.” This is a loop through a Turing machine state that has a branching non-deterministic transition For each n vertex regardless of the tape symbol – Add (1) the vertex to the subset and continue – Don’t add (2) the vertex and continue
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.