FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY


 Oliver Blake
 1 years ago
 Views:
Transcription
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
2 THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8
3 Definition: A Turing Machine is a 7tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a finite set of states Σ is the input alphabet, where Σ Γ is the tape alphabet, where Γ and Σ Γ δ : Q Γ Q Γ {L,R} q Q is the start state q accept Q is the accept state q reject Q is the reject state, and q reject q accept
4 TURING MACHINE FINITE STATE q CONTROL I N P U T INFINITE TAPE
5 CONFIGURATIONS 111q 7 11 q
6 COMPUTATION HISTORIES An accepting computation history is a sequence of configurations C 1,C,,C k, where 1. C 1 is the start configuration, C 1 =q w. C k is an accepting configuration, C k =uq accept v 3. Each C i follows from C i1 via the transition function δ A rejecting computation history is a sequence of configurations C 1,C,,C k, where 1. C 1 is the start configuration,. C k is a rejecting configuration, C k =uq reject v 3. Each C i follows from C i1
7 M accepts w if and only if there is an accepting computation history that starts with C 1 =q w
8 We can encode a TM as a string of s and 1s n states start state reject state n 1 m 1 k 1 s 1 t 1 r 1 u 1 m tape symbols (first k are input symbols) accept state blank symbol ( (p,a), (q,b,l) ) = p 1 a 1 q 1 b 1
9 NB. We assume a given convention of describing TMs by strings in Σ*. We may assume that any string in Σ* describes some TM: Either the string describes a TM by the convention, or if the string is gibberish at some point then the machine just halts if/when a computation gets to that point.
10 A language is called Turingrecognizable or semidecidable or recursively enumerable (r.e.) if some TM recognizes it A language is called decidable or recursive if some TM decides it Languages over {,1} semidecidable (r.e.) languages decidable (recursive) languages
11 A TM = { (M,w) M is a TM that accepts string w } A TM is undecidable: (proof by contradiction) Assume machine H decides A TM H( (M,w) ) = Accept Reject if M accepts w if M does not accept w Construct a new TM D as follows: on input M, run H on (M,M) and output the opposite of H D( M ) = Reject Accept if M accepts M i.e. if H(M,M) accepts if M does not accept M i.e. if H(M,M) rejects
12 A TM = { (M,w) M is a TM that accepts string w } A TM is undecidable: (proof by contradiction) Assume machine H decides A TM H( (M,w) ) = Accept Reject if M accepts w if M does not accept w Construct a new TM D as follows: on input M, run H on (M,M) and output the opposite of H D( M D ) = Reject Accept if M D accepts D M if M D does not accept D M
13 A TM = { (M,w) M is a TM that accepts string w } A TM is undecidable: (constructive proof & subtle) Assume machine H SEMIDECIDES A TM H( (M,w) ) = Accept if M accepts w Rejects or Loops otherwise Construct a new TM D H as follows: on input M, run H on (M,M) and output the opposite of H whenever possible.
14 D H Reject if M accepts M (i.e. if H( M, M ) = Accept) D H D H D H D H ( M ) = D H D H D H D H Accept if M rejects M (i.e. if H( M, M ) = Reject) D H D H D H Loops if M loops on M (i.e. if H( M, M ) loops) D H D H Note: There is no contradiction here! D H loops on D H We can effectively construct an instance which does not belong to A TM (namely, (D H, D H ) ) but H fails to tell us that.
15 THE RECURSION THEOREM Theorem: Let T be a Turing machine that computes a function t : Σ* Σ* Σ*. Then there is a Turing machine R that computes a function r : Σ* Σ*, where for every string w, r(w) = t(<r>, w)
16 THE RECURSION THEOREM Theorem: Let T be a Turing machine that computes a function t : Σ* Σ* Σ*. Then there is a Turing machine R that computes a function r : Σ* Σ*, where for every string w, r(w) = t(<r>, w) (a,b) T t(a,b) w R t(<r>,w)
17 Recursion Theorem says: A Turing machine can obtain its own description (code), and compute with it. We can use the operation: Obtain your own description in pseudocode! Given a computable t, we can get a computable r such that r(w) = t(<r>,w) where <R> is a description of r INSIGHT: T (or t) is really R (or r)
18 Theorem: A TM is undecidable Proof (using the Recursion Theorem): Assume H decides A TM (Informal Proof) Construct machine R such that on input w: 1. Obtains its own description < R>. Runs H on (<R>, w) and flips the output Running R on input w always does the opposite of what H says it should!
19 Theorem: A TM is undecidable Proof (using the Recursion Theorem): Assume H decides A TM (Formal Proof) Let T H (x, w) = Reject if H (x, w) accepts Accept if H (x, w) rejects (Here x is viewed as a code for a TM) By the Recursion Theorem, there is a TM R such that: Reject if H (<R>, w) accepts R(w) = T H (<R>, w) = Accept if H (<R>, w) rejects Contradiction!
20 MIN TM = {<M> M is a minimal TM, wrt <M> } Theorem: MIN TM is not RE. Proof (using the Recursion Theorem):
21 MIN TM = {<M> M is a minimal TM, wrt <M> } Theorem: MIN TM is not RE. Proof (using the Recursion Theorem): Assume E enumerates MIN TM (Informal Proof) Construct machine R such that on input w: 1. Obtains its own description <R>. Runs E until a machine D appears with a longer description than of R 3. Simulate D on w Contradiction. Why?
22 MIN TM = {<M> M is a minimal TM, wrt <M> } Theorem: MIN TM is not RE. Proof (using the Recursion Theorem): Assume E enumerates MIN TM (Formal Proof) Let T E (x, w) = D(w) where <D> is first in E s enumeration s.t. <D> > x By the Recursion Theorem, there is a TM R such that: R(w) = T E (<R>, w) = D(w) where <D> is first in E s enumeration s.t. <D> > <R> Contradiction. Why?
23 THE FIXEDPOINT THEOREM Theorem: Let f : Σ* Σ* be a computrable function. There is a TM R such that f(<r>) describes a TM that is equivalent to R. Proof: Pseudocode for the TM R: On input w: 1. Obtain the description <R>. Let g = f(<r>) and interpret g as a code for a TM G 3. Accept w iff G(w) accepts (Informal Proof)
24 THE FIXEDPOINT THEOREM Theorem: Let f : Σ* Σ* be a computrable function. There is a TM R such that f(<r>) describes a TM that is equivalent to R. Proof: Let T f (x, w) = G(w) where <G> = f (x) (Here f(x) is viewed as a code for a TM) By the Recursion Theorem, there is a TM R such that: R(w) = T f (<R>, w) = G(w) where <G> = f (<R>) Hence R G where <G> = f (<R>), ie <R> f (<R>) So R is a fixed point of f!
25 THE FIXEDPOINT THEOREM Theorem: Let f : Σ* Σ* be a computrable function. There is a TM R such that f(<r>) describes a TM that is equivalent to R. Example: Suppose a virus flips the first bit of each word w in Σ* (or in each TM). Then there is a TM R that remains uninfected.
26 THE RECURSION THEOREM Theorem: Let T be a Turing machine that computes a function t : Σ* Σ* Σ*. Then there is a Turing machine R that computes a function r : Σ* Σ*, where for every string w, r(w) = t(<r>, w) (a,b) T t(a,b) w R t(<r>,w)
27 THE RECURSION THEOREM Theorem: Let T be a Turing machine that computes a function t : Σ* Σ* Σ*. Then there is a Turing machine R that computes a function r : Σ* Σ*, where for every string w, r(w) = t(<r>, w) So first, need to show how to construct a TM that computes its own description (ie code).
28 Lemma: There is a computable function q : Σ* Σ*, where for any string w, q(w) is the description (code) of a TM P w that on any input, prints out w and then accepts s w Q <P w > P w TM Q computes q w
29 A TM SELF THAT PRINTS <SELF> <B> B w B P <B> (<B>) B B (<M>) = < P <M> M> where P <M> M (w ) = M (<M>) So, B (<B>) = < P <B> B > where P <B> B (w ) = B (<B>) Now, P <B> B (w )= B(<B>) = <P <B> B > > So, let SELF = P <B> B
30 A TM SELF THAT PRINTS <SELF> <M> B w P <M> M (<M>) M SELF w P <B> <B> B w P <B> B (<B>) B
31 A TM SELF THAT PRINTS <SELF> <M> B w P <M> M SELF w P <B> <B> B w P <B> B
32 A NOTE ON SELF REFERENCE Suppose in general we want to design a program that prints its own description. How? Print this sentence. Print two copies of the following (the stuff inside quotes), and put the second copy in quotes: Print two copies of the following (the stuff inside quotes), and put the second copy in quotes: = B = P <B>
33 Let f : Σ* Σ* be a computable function such that w A f(w) B Σ* Σ* A f B A m B f Say: A is Mapping Reducible to B Write: A m B (also, A m B (why?) )
34 Let f : Σ* Σ* be a computable function such that w A f(w) B Σ* Σ* A f B A m B f So, if B is (semi) decidable, then so is A (And if B is (semi) decidable, then so is A)
35 A TM = { (M,w) M is a TM that accepts string w } HALT TM = { (M,w) M is a TM that halts on string w } Σ* Σ* f A TM A TM m HALT TM f HALT TM f: (M,w) (M, w) where M (s) = M(s) if M(s) accepts, Loops otherwise So, (M, w) A TM (M, w) HALT TM s Σ*
36 A TM = { (M,w) M is a TM that accepts string w } E TM = { M M is a TM and L(M) = } Σ* Σ* f A TM A TM m E TM f E TM f: (M,w) M w where M w (s) = M(w) if s = w, Loops otherwise So, (M, w) A TM M w E TM s Σ*
37 A TM = { (M,w) M is a TM that accepts string w } REG TM = { M M is a TM and L(M) is regular} Σ* Σ* f A TM A TM m REG TM f REG TM f: (M,w) M w where M w (s) = accept if s = n 1 n, M(w) otherwise So, (M, w) A TM M w REG TM s Σ*
38 E TM = { M M is a TM and L(M) = } EQ TM = {( M, N) M, N are TMs and L(M) =L(N)} Σ* Σ* f E TM E TM m EQ TM EQ TM f s Σ* f: M (M, M ) where M (s) = Loops So, M E TM (M, M ) EQ TM
39 A TM = { (M,w) M is a TM that accepts string w } ALL PDA = { P P is a PDA and L(P) = Σ* } Σ* Σ* f A TM A TM m ALL PDA f ALL PDA f: (M,w) PDA P w where s Σ* P w (s) = accept iff s is NOT an accepting computation of M(w) So, (M, w ) A TM P w ALL PDA
40 A TM = { (M,w) M is a TM that accepts string w } FPCP = { P P is a set of dominos with a match starting with the first domino } Σ* Σ* f A TM A TM m FPCP f FPCP Construct f: (M,w) P (M,w) such that (M, w ) A TM P (M,w) FPCP
41 A TM = { (M,w) M is a TM that accepts string w } PCP = { P P is a set of dominos with a match } Σ* Σ* f A TM A TM m PCP f PCP Construct f: (M,w) P (M,w) such that (M, w ) A TM P (M,w) PCP
42 A TM = { (M,w) M is a TM that accepts string w } HALT TM = { (M,w) M is a TM that halts on string w } E TM = { M M is a TM and L(M) = } REG TM = { M M is a TM and L(M) is regular} EQ TM = {(M, N) M, N are TMs and L(M) =L(N)} ALL PDA = { P P is a PDA and L(P) = Σ* } PCP = { P P is a set of dominos with a match } ALL UNDECIDABLE Use Reductions to Prove
43 A TM = { (M,w) M is a TM that accepts string w } HALT TM = { (M,w) M is a TM that halts on string w } E TM = { M M is a TM and L(M) = } E TM REG TM = { M M is a TM and L(M) is regular} EQ TM = {(M, N) M, N are TMs and L(M) =L(N)} EQ TM ALL PDA = { P P is a PDA and L(P) = Σ* } ALL PDA PCP = { P P is a set of dominos with a match } ALL UNDECIDABLE Use Reductions to Prove Which are SEMIDECIDABLE?
44 Then L is undecidable RICE S THEOREM Let L be a language over Turing machines. Assume that L satisfies the following properties: 1. For any TMs M 1 and M, where L(M 1 ) = L(M ), M 1 L if and only if M L. There are TMs M 1 and M, where M 1 L and M L EXTREMELY POWERFUL!
45 Then L is undecidable RICE S THEOREM Let L be a language over Turing machines. Assume that L satisfies the following properties: 1. For any TMs M 1 and M, where L(M 1 ) = L(M ), M 1 L if and only if M L. There are TMs M 1 and M, where M 1 L and M L FIN TM = { M M is a TM and L(M) is E TM = { M M is finite} a TM and L(M) = } REG TM = { M M is a TM and L(M) is regular}
46 Proof: Show L is undecidable Show: A TM is mapping reducible to L Σ* Σ* A TM f L (M,w) f (M,w)
47 Proof: Show L is undecidable Show: A TM is mapping reducible to L Σ* Σ* A TM f L (M,w) M 1 f (M,w) M
48 RICE S THEOREM Proof: Define M to be a TM that never halts Assume, WLOG, that M L Why? Let M 1 L (such M 1 exists, by assumption) Show A TM is mapping reducible to L : Map (M, w) M w where M w (s) = accepts if both M(w) and M 1 (s) accept loops otherwise What is the language of M w?
49 A TM is mapping reducible to L Σ* Σ* A TM f L (M,w) M w M 1 f (M,w) M w M QED
50 Corollary: The following languages are undecidable. E TM = { M M is a TM and L(M) = } REG TM = {M M is TM and L(M) is regular} FIN TM = {M M is a TM and L(M) is finite} DEC TM = {M M is a TM and L(M) is decidable}
51 ORACLE TMs FINITE STATE q YES? CONTROL Is (M,w) in A TM? YES I N P U T INFINITE TAPE
52 A Turing Reduces to B We say A is decidable in B if there is an oracle TM M with oracle B that decides A A T B T is transitive
53 T VERSUS m Theorem: If A m B then A T B But in general, the converse doesn t hold! Proof: If A m B then there is a computable function f : Σ* Σ*, where for every w, w A f(w) B We can thus use an oracle for B to decide A Theorem: HALT TM T HALT TM Theorem: HALT TM m HALT TM WHY?
54 THE ARITHMETIC HIERARCHY 1 1 = { decidable sets } (sets = languages) = { semidecidable sets } n+1 n = { sets semidecidable in some B } n+1 n = { sets decidable in some B } Π n n = { complements of sets in }
55 1 1 3
56 3 3 Π 3 Π 1 Semidecidable Languages = 1 1 Π 1 Decidable Languages Π 1 Cosemidecidable Languages
57 Definition: A decidable predicate R(x,y) is some proposition about x and y 1, where there is a TM M such that for all x, y, R(x,y) is TRUE M(x,y) accepts R(x,y) is FALSE M(x,y) rejects We say M decides the predicate R. EXAMPLES: R(x,y) = x + y is less than 1 R(<N>,y) = N halts on y in at most 1 steps Kleene s T predicate, T(<M>, x, y): M accepts x in y steps. 1. x, y are positive integers or elements of *
58 Theorem: A language A is semidecidable if and only if there is a decidable predicate R(x, y) such that: A = { x y R(x,y) } Proof: (1) If A = { x y R(x,y) } then A is semidecidable Because we can enumerate over all y s () If A is semidecidable, then A = { x y R(x,y) } Let M semidecide A and Let R <M> (x,y) be the Kleene T predicate: T(<M>, x, y): TM M accepts x in y steps (y interpreted as an integer) R <M> is a decidable predicate (why?) So x A if and only if y R <M> (x,y) is true.
59 Theorem 1 Π 1 1 = { semidecidable sets } = languages of the form { x y R(x,y) } = { complements of semidecidable sets } = languages of the form { x y R(x,y) } = { decidable sets } = 1 Π 1 Where R is a decidable predicate
60 Theorem Π = { sets semidecidable in some semidec. B } = languages of the form { x y 1 y R(x,y 1,y ) } = { complements of sets} = languages of the form { x y 1 y R(x,y 1,y ) } = Π Where R is a decidable predicate
61 Theorem n = languages { x y1 y y 3 Qy n R(x,y 1,,y n ) } Π n = languages { x y 1 y y 3 Qy n R(x,y 1,,y n ) } n = n Π n Where R is a decidable predicate
62 Example Decidable predicate 1 = languages of the form { x y R(x,y) } We know that A TM is in 1 Why? Show it can be described in this form: A TM = { <(M,w)> t [M accepts w in t steps] } decidable predicate A TM = { <(M,w)> t T (<M>, w, t )} A TM = { <(M,w)> v (v is an accepting computation history of M on w}
63 Decidable languages 3 3 Π 3 Π 1 Semidecidable languages A TM = 1 Π Π 1 Cosemidecidable languages
64 Example Π 1 = languages of the form { x y R(x,y) } Show that EMPTY (ie, E TM ) = { M L(M) = } is in Π 1 EMPTY = { M w t [M doesn t accept w in t steps] } two quantifiers?? decidable predicate
65 Example Π 1 = languages of the form { x y R(x,y) } Show that EMPTY (ie, E TM ) = { M L(M) = } is in EMPTY = { M w t [ T(<M>, w, t) ] } Π 1 two quantifiers?? decidable predicate
66 THE PAIRING FUNCTION Theorem. There is a 11 and onto computable function <, >: Σ* x Σ* Σ* and computable functions π 1 and π : Σ* Σ* such that z = <w, t> π 1 (z) = w and π (z) = t EMPTY = { M w t [M doesn t accept w in t steps] } EMPTY = { M z[m doesn t accept π 1 (z) in π (z) steps]} EMPTY = { M z[ T(<M>, π 1 (z), π (z) ) ] }
67 Decidable languages 3 3 Π 3 Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
68 Example Π = languages of the form { x y z R(x,y,z) } Show that TOTAL = { M M halts on all inputs } is in Π TOTAL = { M w t [M halts on w in t steps] } decidable predicate
69 Example Π = languages of the form { x y z R(x,y,z) } Show that TOTAL = { M M halts on all inputs } is in Π TOTAL = { M w t [ T(<M>, w, t) ] } decidable predicate
70 Decidable languages 3 3 Π 3 TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
71 Example = languages of the form { x y z R(x,y,z) } Show that FIN = { M L(M) is finite } is in FIN = { M n w t [Either w < n, or M doesn t accept w in t steps] } FIN = { M n w t ( w < n T(<M>,w, t) )} decidable predicate
72 Decidable languages 3 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
73 Decidable languages 3 COF 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
74 Decidable languages 3 REG 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
75 Decidable languages 3 DEC 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
76 Decidable languages 3 CFL 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Cosemidecidable languages
77 Each is mcomplete for its level in hierachy and cannot go lower (by next Theorem, which shows the hierarchy does not collapse).
78 ORACLES not all powerful The following problem cannot be decided, even by a TM with an oracle for the Halting Problem: SUPERHALT = { (M,x) M, with an oracle for the Halting Problem, halts on x} Can use diagonalization here! Suppose H decides SUPERHALT (with oracle) Define D(X) = if H(X,X) accepts (with oracle) then LOOP, else ACCEPT. D(D) halts H(D,D) accepts D(D) loops
79 ORACLES not all powerful Theorem: The arithmetic hierarchy is strict. That is, the nth level contains a language that isn t in any of the levels below n. Proof IDEA: Same idea as the previous slide. SUPERHALT = HALT = { (M,x) M halts on x}. SUPERHALT 1 = { (M,x) M, with an oracle for the Halting Problem, halts on x} SUPERHALT n = { (M,x) M, with an oracle for SUPERHALT n1, halts on x}
80 Theorem: 1. The hierarchy is strict. Each of the languages is mcomplete for its class. Proof Idea. 1. Let A TM,1 = A TM A TM, n+1 = {(M,x) M is an oracle machine with oracle A TM and M accepts x} Then A TM, n n  Π n
81 Theorem: 1. The hierarchy is strict. Each of the languages is mcomplete for its class. Proof.. Eg to show FIN is mcomplete for Need to show a) FIN b) For A then A m FIN FIN = { M n x t ( x <n or M does not accept x in t steps)}
82 For A, A={ x y z R(x,y,z)} FIN = { M L(M) is finite } Σ* Σ* f A FIN f f: x M x Given input w: For each y of length w or less, look for z such that R(x,y,z)}. If found for all such y, Accept. Otherwise keep on running.
83 For A, A={ x y z R(x,y,z)} FIN = { M L(M) is finite } Σ* Σ* f A FIN f If x A, then y z R(x,y,z)}, so when w > y, M x keeps on running, so M x FIN. If x A, then y z R(x,y,z)}, so M x recognizes Σ*
84 CAN WE QUANTIFY HOW MUCH INFORMATION IS IN A STRING? A = B = Idea: The more we can compress a string, the less information it contains.
85 KOLMOGOROV COMPLEXITY Definition: Let x in {,1}*. The shortest description of x, denoted as d(x), is the lexicographically shortest string <M,w> s.t. M(w) halts with x on tape. Use pairing function to code <M,w> Definition: The Kolmogorov complexity of x, denoted as K(x), is d(x).
86 KOLMOGOROV COMPLEXITY Theorem: There is a fixed c so that for all x in {,1}*, K(x) x + c The amount of information in x isn t much more than x Proof: Define M = On w, halt. On any string x, M(x) halts with x on its tape! This implies K(x) <M,x> M + x + 1 c + x (Note: M is fixed for all x. So M is constant)
87 REPETITIVE STRINGS Theorem: There is a fixed c so that for all x in {,1}*, K(xx) K(x) + c The information in xx isn t much more than that in x Proof: Let N = On <M,w>, let s=m(w). Print ss. Let <M,w > be the shortest description of x. Then <N,<M,w >> is a description of xx Therefore K(xx) <N,<M,w >> N + K(x) + 1 c + K(x)
88 REPETITIVE STRINGS Corollary: There is a fixed c so that for all n, and all x {,1}*, K(x n ) K(x) + c log n The information in x n isn t much more than that in x Proof: An intuitive way to see this: Define M: On <x, n>, print x for n times. Now take <M,<x,n>> as a description of x n. In binary, n takes O(log n) bits to write down, so we have K(x) + O(log n) as an upper bound on K(x n ).
89 REPETITIVE STRINGS Corollary: There is a fixed c so that for all n, and all x {,1}*, K(x n ) K(x) + c log n The information in x n isn t much more than that in x Recall: A = For w = (1) n, K(w) K(1) + c log n
90 CONCATENATION of STRINGS Theorem: There is a fixed c so that for all x, y in {,1}*, K(xy) K(x) + K(y) + c Better: K(xy) logk(x) +K(x) + K(y) + c
91 INCOMPRESSIBLE STRINGS Theorem: For all n, there is an x {,1} n such that K(x) n There are incompressible strings of every length Proof: (Number of binary strings of length n) = n (Number of descriptions of length < n) (Number of binary strings of length < n) = n 1. Therefore: there s at least one nbit string that doesn t have a description of length < n
92 INCOMPRESSIBLE STRINGS Theorem: For all n and c, Pr x {,1}^n [ K(x) nc ] 1 1/ c Most strings are fairly incompressible Proof: (Number of binary strings of length n) = n (Number of descriptions of length < nc) (Number of binary strings of length < nc) = nc 1. So the probability that a random x has K(x) < nc is at most ( nc 1)/ n < 1/ c.
93 DETERMINING COMPRESSIBILITY Can an algorithm help us compress strings? Can an algorithm tell us when a string is compressible? COMPRESS = {(x,c) K(x) c} Theorem: COMPRESS is undecidable! Berry Paradox: The first string whose shortest description cannot be written in less than fifteen words.
94 DETERMINING COMPRESSIBILITY COMPRESS = {(x,n) K(x) n} Theorem: COMPRESS is undecidable! Proof: M = On input x {,1}*, Interpret x as integer n. ( x log n) Find first y {,1}* in lexicographical order, s.t. (y,n) COMPRESS, then print y and halt. M(x) prints the first string y* with K(y*) > n. Thus <M,x> describes y*, and <M,x> c + log n So n < K(y*) c + log n. CONTRADICTION!
95 DETERMINING COMPRESSIBILITY Theorem: K is not computable Proof: M = On input x {,1}*, Interpret x as integer n. ( x log n) Find first y {,1}* in lexicographical order, s. t. K(y) > n, then print y and halt. M(x) prints the first string y* with K(y*) > n. Thus <M,x> describes y*, and <M,x> c + log n So n < K(y*) c + log n. CONTRADICTION!
96 DETERMINING COMPRESSIBILITY What about other measures of compressibility? For example: the smallest DFA that recognizes {x} the shortest grammar in Chomsky normal form that generates the language {x}
97 SO WHAT CAN YOU DO WITH THIS? Many results in mathematics can be proved very simply using incompressibility. Theorem: There are infinitely many primes. IDEA: Finitely many primes can compress everything! Proof: Suppose not. Let p 1,, p k be the primes. Let x be incompressible. Think of n = x as integer. Then there are e i s.t. n = p 1 e1 p k ek For all i, e i log n, so e i log log n Can describe n (and x) with k log log n + c bits! But x was incompressible CONTRADICTION!
98 Definition: Let M be a TM that halts on all inputs. The running time or time complexity of M is a function f : N N, where f(n) is the maximum number of steps that M uses on any input of length n. Definition: TIME(t(n)) = { L L is a language decided by a O(t(n)) time Turing Machine } k N P = TIME(n k )
99 Definition: A NonDeterministic TM is a 7tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a finite set of states Σ is the input alphabet, where Σ Γ is the tape alphabet, where Γ and Σ Γ δ : Q Γ (Q Γ {L,R}) q Q is the start state q accept Q is the accept state q reject Q is the reject state, and q reject q accept
100 Definition: NTIME(t(n)) = { L L is decided by a O(t(n))time nondeterministic Turing machine } TIME(t(n)) NTIME(t(n)) NP = NTIME(n k ) k N
101 Theorem: L NP if there exists a polytime Turing machine V with L = { x y [ y = poly( x ) and V(x,y) accepts ] } Proof: (1) If L = { x y y = poly( x ) and V(x,y) accepts } then L NP Nondeterministically guess y and then run V(x,y) () If L NP then L = { x y y = poly( x ) and V(x,y) accepts } Let N be a nondeterministic polytime TM that decides L, define V(x,y) to accept iff y is an accepting computation history of N on x
102 A language is in NP if and only if there exist polynomiallength proofs for membership to the language P = the problems that can be efficiently solved NP = the problems where proposed solutions can be efficiently verified P = NP? Can Problem Solving Be Automated? $$$ A Clay Institute Millennium Problem
103 POLYTIME REDUCIBILITY f : Σ* Σ* is a polynomial time computable function if some polytime Turing machine M, on every input w, halts with just f(w) on its tape Language A is polynomial time reducible to language B, written A P B, if there is a polytime computable function f : Σ* Σ* such that: w A f(w) B f is called a polynomial time reduction of A to B Theorem: If A P B and B P, then A P
104 SAT = { φ ( y)[ y is a satisfying assignment to φ and φ is a boolean formula ] } 3SAT = { φ ( y)[y is a satisfying assignment to φ and φ is in 3cnf ] }
105 Theorem (CookLevin): SAT and 3SAT are NPcomplete 1. SAT NP: A satisfying assignment is a proof that a formula is satisfiable!. SAT is NPhard: Every language in NP can be polytime reduced to SAT (complex formula) Corollary: SAT P if and only if P = NP
106 Assume a reasonable encoding of graphs (example: the adjacency matrix is reasonable) CLIQUE = { (G,k) G is an undirected graph with a kclique } Theorem: CLIQUE is NPComplete (1) CLIQUE NP () 3SAT P CLIQUE
107 (x 1 x 1 x ) ( x 1 x x ) ( x 1 x x ) x 1 x x c l a u s e x 1 x 1 x 1 x x x #nodes = 3(# clauses) k = #clauses
108 VERTEXCOVER = { (G,k) G is an undirected graph with a knode vertex cover } Theorem: VERTEXCOVER is NPComplete (1) VERTEXCOVER NP () 3SAT P VERTEXCOVER
109 k = (#clauses) + (#variables) (x 1 x 1 x ) ( x 1 x x ) ( x 1 x x ) Variables and negations of variables x 1 x 1 x x clauses x 1 x 1 x 1 x 1 x x x x x
110 HAMPATH = { (G,s,t) G is an directed graph with a Hamilton path from s to t} Theorem: HAMPATH is NPComplete (1) HAMPATH NP () 3SAT P HAMPATH Proof is in Sipser, Chapter 7.5
111
112 UHAMPATH = { (G,s,t) G is an undirected graph with a Hamilton path from s to t} Theorem: UHAMPATH is NPComplete (1) UHAMPATH NP () HAMPATH P UHAMPATH
113
114 SUBSETSUM = { (S, t) S is multiset of integers and for some Y S, we have y Y y = t } Theorem: SUBSETSUM is NPComplete (1) SUBSETSUM NP () 3SAT P SUBSETSUM
115
116 HW Let G denote a graph, and s and t denote nodes. SHORTEST PATH = {(G, s, t, k) G has a simple path of length < k from s to t } LONGEST PATH = {(G, s, t, k) G has a simple path of length > k from s to t } WHICH IS EASY? WHICH IS HARD? Justify (see Sipser 7.1)
117 Good Luck on Midterm!
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY KOLMOGOROVCHAITIN (descriptive) COMPLEXITY TUESDAY, MAR 18 CAN WE QUANTIFY HOW MUCH INFORMATION IS IN A STRING? A = 01010101010101010101010101010101
More informationFinish KComplexity, Start Time Complexity
6.045 Finish KComplexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts
More informationCS154, Lecture 10: Rice s Theorem, Oracle Machines
CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable
More informationLecture 13: Foundations of Math and Kolmogorov Complexity
6.045 Lecture 13: Foundations of Math and Kolmogorov Complexity 1 SelfReference and the Recursion Theorem 2 Lemma: There is a computable function q : Σ* Σ* such that for every string w, q(w) is the description
More informationLecture 16: Time Complexity and P vs NP
6.045 Lecture 16: Time Complexity and P vs NP 1 TimeBounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language
More informationCS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression
CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression Rosencrantz & Guildenstern Are Dead (Tom Stoppard) Rigged Lottery? And the winning numbers are: 1, 2, 3, 4, 5, 6 But is
More informationTIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20
TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP THURSDAY Mar 20 COMPLEXITY THEORY Studies what can and can t be computed under limited resources such as time, space, etc Today:
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be
More informationComputability Theory
Computability Theory Cristian S. Calude May 2012 Computability Theory 1 / 1 Bibliography M. Sipser. Introduction to the Theory of Computation, PWS 1997. (textbook) Computability Theory 2 / 1 Supplementary
More informationTime Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)
Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it
More informationUndecidable Problems and Reducibility
University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.
More informationChomsky Normal Form and TURING MACHINES. TUESDAY Feb 4
Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A contextfree grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A contextfree grammar is in Chomsky normal form if every rule is of the form:
More informationLecture 12: Mapping Reductions
Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The
More informationLecture Notes: The Halting Problem; Reductions
Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings
More information,
Kolmogorov Complexity Carleton College, CS 254, Fall 2013, Prof. Joshua R. Davis based on Sipser, Introduction to the Theory of Computation 1. Introduction Kolmogorov complexity is a theory of lossless
More information6.045 Final Exam Solutions
6.045J/18.400J: Automata, Computability and Complexity Prof. Nancy Lynch, Nati Srebro 6.045 Final Exam Solutions May 18, 2004 Susan Hohenberger Name: Please write your name on each page. This exam is open
More informationLecture 20: conp and Friends, Oracles in Complexity Theory
6.045 Lecture 20: conp and Friends, Oracles in Complexity Theory 1 Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode:
More informationHomework 8. a b b a b a b. twoway, read/write
Homework 8 309 Homework 8 1. Describe a TM that accepts the set {a n n is a power of 2}. Your description should be at the level of the descriptions in Lecture 29 of the TM that accepts {ww w Σ } and the
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A NonTR Language Reminders and announcements: HW 7 (Last!!)
More informationDecision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semidecidable. Look at following sets: CSCI 81 Spring, 2012
Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM
More informationCS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NPComplete)
CS5371 Theory of Computation Lecture 19: Complexity IV (More on NP, NPComplete) Objectives More discussion on the class NP CookLevin Theorem The Class NP revisited Recall that NP is the class of language
More informationDefinition: conp = { L L NP } What does a conp computation look like?
Space Complexity 28 Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string y of x k length and the machine accepts
More informationLecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009
CS 373: Theory of Computation Sariel HarPeled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as
More information6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch
6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch Today: More Complexity Theory Polynomialtime reducibility, NPcompleteness, and the Satisfiability (SAT) problem Topics: Introduction
More information6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch Today Final topic in computability theory: SelfReference and the Recursion
More informationLecture 17: CookLevin Theorem, NPComplete Problems
6.045 Lecture 17: CookLevin Theorem, NPComplete Problems 1 Is SAT solvable in O(n) time on a multitape TM? Logic circuits of 6n gates for SAT? If yes, then not only is P=NP, but there would be a dream
More information1 Computational Problems
Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation
More informationTheory of Computation
Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs
More informationAutomata Theory CS SFR2 Final Review
Automata Theory CS4112015SFR2 Final Review David Galles Department of Computer Science University of San Francisco FR20: Halting Problem e(m) e(w) Halting Machine takes as input an encoding of a Turing
More information1 Acceptance, Rejection, and I/O for Turing Machines
1 Acceptance, Rejection, and I/O for Turing Machines Definition 1.1 (Initial Configuration) If M = (K,Σ,δ,s,H) is a Turing machine and w (Σ {, }) then the initial configuration of M on input w is (s, w).
More informationIntroduction to Turing Machines. Reading: Chapters 8 & 9
Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages ContextFree Languages Regular Languages
More informationPrimitive recursive functions: decidability problems
Primitive recursive functions: decidability problems Armando B. Matos October 24, 2014 Abstract Although every primitive recursive (PR) function is total, many problems related to PR functions are undecidable.
More informationComputational Models Lecture 9, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 9, Spring 2009 Reducibility among languages Mapping reductions More undecidable
More informationLecture 24: Randomized Complexity, Course Summary
6.045 Lecture 24: Randomized Complexity, Course Summary 1 1/4 1/16 1/4 1/4 1/32 1/16 1/32 Probabilistic TMs 1/16 A probabilistic TM M is a nondeterministic TM where: Each nondeterministic step is called
More informationEssential facts about NPcompleteness:
CMPSCI611: NP Completeness Lecture 17 Essential facts about NPcompleteness: Any NPcomplete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomialtime solutions
More informationTheory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death
Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Robbie Hott www.cs.virginia.edu/~jh2jf Department of Computer Science University of Virginia
More information1 More finite deterministic automata
CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.
More informationCpSc 421 Homework 9 Solution
CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade
More informationCSCE 551: ChinTser Huang. University of South Carolina
CSCE 551: Theory of Computation ChinTser Huang huangct@cse.sc.edu University of South Carolina ChurchTuring Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105ab/ Today's learning goals Sipser Ch 4.2 Trace highlevel descriptions of algorithms for computational problems. Use
More informationChapter 2 : Time complexity
Dr. Abhijit Das, Chapter 2 : Time complexity In this chapter we study some basic results on the time complexities of computational problems. concentrate our attention mostly on polynomial time complexities,
More informationDecidability and Undecidability
Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an
More informationLecture 3: Reductions and Completeness
CS 710: Complexity Theory 9/13/2011 Lecture 3: Reductions and Completeness Instructor: Dieter van Melkebeek Scribe: Brian Nixon Last lecture we introduced the notion of a universal Turing machine for deterministic
More information6.840 Language Membership
6.840 Language Membership Michael Bernstein 1 Undecidable INP Practice final Use for A T M. Build a machine that asks EQ REX and then runs M on w. Query INP. If it s in P, accept. Note that the language
More informationTuring s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine
Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines Definition of Algorithm:
More information16.1 Countability. CS125 Lecture 16 Fall 2014
CS125 Lecture 16 Fall 2014 16.1 Countability Proving the nonexistence of algorithms for computational problems can be very difficult. Indeed, we do not know how to prove P NP. So a natural question is
More informationComputer Sciences Department
Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y
More informationTuring Machines Part III
Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's
More informationAdvanced Topics in Theoretical Computer Science
Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica SofronieStokkermans Universität KoblenzLandau email: sofronie@unikoblenz.de 1 Contents Recall: Turing
More informationComputability Theory. CS215, Lecture 6,
Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David
More informationFurther discussion of Turing machines
Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turingrecognizable languages that were not mentioned in previous lectures. In particular, we will
More informationLecture 22: PSPACE
6.045 Lecture 22: PSPACE 1 VOTE VOTE VOTE For your favorite course on automata and complexity Please complete the online subject evaluation for 6.045 2 Final Exam Information Who: You On What: Everything
More informationProblems, and How Computer Scientists Solve Them Manas Thakur
Problems, and How Computer Scientists Solve Them PACE Lab, IIT Madras Content Credits Introduction to Automata Theory, Languages, and Computation, 3rd edition. Hopcroft et al. Introduction to the Theory
More informationDRAFT. Diagonalization. Chapter 4
Chapter 4 Diagonalization..the relativized P =?NP question has a positive answer for some oracles and a negative answer for other oracles. We feel that this is further evidence of the difficulty of the
More informationMathematical Preliminaries. Sipser pages 128
Mathematical Preliminaries Sipser pages 128 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation
More information6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.
6.045J/18.400J: Automata, Computability and Complexity May 20, 2005 6.045 Final Exam Prof. Nancy Lynch Name: Please write your name on each page. This exam is open book, open notes. There are two sheets
More informationIntro to Theory of Computation
Intro to Theory of Computation LECTURE 24 Last time Relationship between models: deterministic/nondeterministic Class P Today Class NP Sofya Raskhodnikova Homework 9 due Homework 0 out 4/5/206 L24. Iclicker
More informationChapter 1  Time and Space Complexity. deterministic and nondeterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE
Chapter 1  Time and Space Complexity deterministic and nondeterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE 1 / 41 Deterministic Turing machines Definition 1.1 A (deterministic
More informationCS 361 Meeting 26 11/10/17
CS 361 Meeting 26 11/10/17 1. Homework 8 due Announcements A Recognizable, but Undecidable Language 1. Last class, I presented a brief, somewhat inscrutable proof that the language A BT M = { M w M is
More informationTheory of Computation Lecture Notes. Problems and Algorithms. Class Information
Theory of Computation Lecture Notes Prof. YuhDauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. YuhDauh
More informationECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam
ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out twosided (no more wasted
More informationComputability and Complexity Theory
Discrete Math for Bioinformatics WS 09/10:, by A Bockmayr/K Reinert, January 27, 2010, 18:39 9001 Computability and Complexity Theory Computability and complexity Computability theory What problems can
More informationacs07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10
Decidability Andreas Karwath und Malte Helmert 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem : decide
More informationThe Polynomial Hierarchy
The Polynomial Hierarchy Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Motivation..synthesizing circuits is exceedingly difficulty. It is even
More informationCISC 876: Kolmogorov Complexity
March 27, 2007 Outline 1 Introduction 2 Definition Incompressibility and Randomness 3 Prefix Complexity ResourceBounded KComplexity 4 Incompressibility Method Gödel s Incompleteness Theorem 5 Outline
More informationBefore We Start. The Pumping Lemma. Languages. Context Free Languages. Plan for today. Now our picture looks like. Any questions?
Before We Start The Pumping Lemma Any questions? The Lemma & Decision/ Languages Future Exam Question What is a language? What is a class of languages? Context Free Languages Context Free Languages(CFL)
More informationTuring machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK
COMS11700 Turing machines Department of Computer Science, University of Bristol Bristol, UK 21 March 2014 COMS11700: Turing machines Slide 1/15 Introduction We have seen two models of computation: finite
More informationCS/ECE 374 Final Exam Study Problems Fall 2016
True or False? (from previous final exams) 1. For each of the following questions, indicate every correct answer by marking the box, and indicate every incorrect answer by marking the box. Assume P NP.
More informationMa/CS 117c Handout # 5 P vs. NP
Ma/CS 117c Handout # 5 P vs. NP We consider the possible relationships among the classes P, NP, and conp. First we consider properties of the class of NPcomplete problems, as opposed to those which are
More informationA.Antonopoulos 18/1/2010
Class DP Basic orems 18/1/2010 Class DP Basic orems 1 Class DP 2 Basic orems Class DP Basic orems TSP Versions 1 TSP (D) 2 EXACT TSP 3 TSP COST 4 TSP (1) P (2) P (3) P (4) DP Class Class DP Basic orems
More informationMTAT Complexity Theory October 13th14th, Lecture 6
MTAT.07.004 Complexity Theory October 13th14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Problems of CFLs and beyond Haniel Barbosa Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1. Decidable
More informationsatisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs
Any Expression φ Can Be Converted into CNFs and DNFs φ = x j : This is trivially true. φ = φ 1 and a CNF is sought: Turn φ 1 into a DNF and apply de Morgan s laws to make a CNF for φ. φ = φ 1 and a DNF
More informationLecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata
CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata
More informationOn Rice s theorem. Hans Hüttel. October 2001
On Rice s theorem Hans Hüttel October 2001 We have seen that there exist languages that are Turingacceptable but not Turingdecidable. An important example of such a language was the language of the Halting
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NONDETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are
More informationAutomata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
More informationChap. 4 Computability
THEORY OF COMPUTATION Formal Languages, Automata, and Complexity Chap. 4 Computability J. Glenn Brokshear The Benjamin/Cummings Pub. Comp., Inc. 1989 1 4.1 Foundation of Recursive Function Theory computation
More information6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3
6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the
More informationAn introduction to Parameterized Complexity Theory
An introduction to Parameterized Complexity Theory May 15, 2012 A motivation to parametrize Definitions Standard Complexity Theory does not distinguish between the distinct parts of the input. It categorizes
More informationFinal Exam Comments. UVa  cs302: Theory of Computation Spring < Total
UVa  cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,
More informationCSC173 Workshop: 13 Sept. Notes
CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of
More informationQ = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar
IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write
More information2 P vs. NP and Diagonalization
2 P vs NP and Diagonalization CS 6810 Theory of Computing, Fall 2012 Instructor: David Steurer (sc2392) Date: 08/28/2012 In this lecture, we cover the following topics: 1 3SAT is NP hard; 2 Time hierarchies;
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY YOU NEED TO PICK UP THE SYLLABUS, THE COURSE SCHEDULE, THE PROJECT INFO SHEET, TODAY S CLASS NOTES
More informationDe Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.
De Morgan s a Laws De Morgan s laws say that (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. Here is a proof for the first law: φ 1 φ 2 (φ 1 φ 2 ) φ 1 φ 2 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 a Augustus DeMorgan
More informationDefinition: Alternating time and space Game Semantics: State of machine determines who
CMPSCI 601: Recall From Last Time Lecture 3 Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins
More informationTopics in Complexity Theory
Topics in Complexity Theory Announcements Final exam this Friday from 12:15PM3:15PM Please let us know immediately after lecture if you want to take the final at an alternate time and haven't yet told
More informationNPCompleteness. Until now we have been designing algorithms for specific problems
NPCompleteness 1 Introduction Until now we have been designing algorithms for specific problems We have seen running times O(log n), O(n), O(n log n), O(n 2 ), O(n 3 )... We have also discussed lower
More informationHarvard CS 121 and CSCI E207 Lecture 10: CFLs: PDAs, Closure Properties, and NonCFLs
Harvard CS 121 and CSCI E207 Lecture 10: CFLs: PDAs, Closure Properties, and NonCFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119128. Pushdown Automata (review) Pushdown Automata = Finite automaton
More informationComputational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!
i Computational Complexity: A Modern Approach Draft of a book: Dated January 2007 Comments welcome! Sanjeev Arora and Boaz Barak Princeton University complexitybook@gmail.com Not to be reproduced or distributed
More informationMore About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties
More About Turing Machines Programming Tricks Restrictions Extensions Closure Properties 1 Overview At first, the TM doesn t look very powerful. Can it really do anything a computer can? We ll discuss
More informationMm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP)
Algorithms and Architectures II HP Schwefel, Jens M. Pedersen Mm6 Advanced Graph Algorithms (hps) Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2player games, genetic algorithms (hps) Mm9
More information8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 PearsonAddison Wesley. Last updated on 2/6/18 2:16 AM
8. INTRACTABILITY I polytime reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin
More informationP, NP, NPComplete, and NPhard
P, NP, NPComplete, and NPhard Problems Zhenjiang Li 21/09/2011 Outline Algorithm time complicity P and NP problems NPComplete and NPHard problems Algorithm time complicity Outline What is this course
More informationNP Complete Problems. COMP 215 Lecture 20
NP Complete Problems COMP 215 Lecture 20 Complexity Theory Complexity theory is a research area unto itself. The central project is classifying problems as either tractable or intractable. Tractable Worst
More informationThe Complexity of Optimization Problems
The Complexity of Optimization Problems Summary Lecture 1  Complexity of algorithms and problems  Complexity classes: P and NP  Reducibility  Karp reducibility  Turing reducibility Uniform and logarithmic
More information