FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Save this PDF as:

Size: px
Start display at page:

Transcription

1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

2 THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8

3 Definition: A Turing Machine is a 7-tuple 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 i-1 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 i-1

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 Turing-recognizable or semi-decidable 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} semi-decidable (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 SEMI-DECIDES 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 FIXED-POINT 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 FIXED-POINT 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 FIXED-POINT 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 SEMI-DECIDABLE?

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) = { semi-decidable sets } n+1 n = { sets semi-decidable 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 Co-semidecidable 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 semi-decidable 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 semi-decidable Because we can enumerate over all y s () If A is semi-decidable, then A = { x y R(x,y) } Let M semi-decide 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 = { semi-decidable sets } = languages of the form { x y R(x,y) } = { complements of semi-decidable sets } = languages of the form { x y R(x,y) } = { decidable sets } = 1 Π 1 Where R is a decidable predicate

60 Theorem Π = { sets semi-decidable in some semi-dec. 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 Co-semidecidable 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 1-1 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 Co-semidecidable 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 Co-semidecidable 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 Co-semidecidable languages

73 Decidable languages 3 COF 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Co-semidecidable languages

74 Decidable languages 3 REG 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Co-semidecidable languages

75 Decidable languages 3 DEC 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Co-semidecidable languages

76 Decidable languages 3 CFL 3 Π 3 FIN TOTAL Π 1 Semidecidable languages A TM = 1 Π EMPTY Π 1 Co-semidecidable languages

77 Each is m-complete 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 n-1, halts on x}

80 Theorem: 1. The hierarchy is strict. Each of the languages is m-complete 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 m-complete for its class. Proof.. Eg to show FIN is m-complete 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 n-bit 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) n-c ] 1 1/ c Most strings are fairly incompressible Proof: (Number of binary strings of length n) = n (Number of descriptions of length < n-c) (Number of binary strings of length < n-c) = n-c 1. So the probability that a random x has K(x) < n-c is at most ( n-c 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 Non-Deterministic TM is a 7-tuple 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 non-deterministic Turing machine } TIME(t(n)) NTIME(t(n)) NP = NTIME(n k ) k N

101 Theorem: L NP if there exists a poly-time 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 Non-deterministically 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 non-deterministic poly-time 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 polynomial-length 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 POLY-TIME REDUCIBILITY f : Σ* Σ* is a polynomial time computable function if some poly-time 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 (Cook-Levin): SAT and 3-SAT are NP-complete 1. SAT NP: A satisfying assignment is a proof that a formula is satisfiable!. SAT is NP-hard: 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 k-clique } Theorem: CLIQUE is NP-Complete (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 VERTEX-COVER = { (G,k) G is an undirected graph with a k-node vertex cover } Theorem: VERTEX-COVER is NP-Complete (1) VERTEX-COVER NP () 3SAT P VERTEX-COVER

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 NP-Complete (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 NP-Complete (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 NP-Complete (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

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY KOLMOGOROV-CHAITIN (descriptive) COMPLEXITY TUESDAY, MAR 18 CAN WE QUANTIFY HOW MUCH INFORMATION IS IN A STRING? A = 01010101010101010101010101010101

Finish K-Complexity, Start Time Complexity

6.045 Finish K-Complexity, 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

CS154, 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

Lecture 13: Foundations of Math and Kolmogorov Complexity

6.045 Lecture 13: Foundations of Math and Kolmogorov Complexity 1 Self-Reference and the Recursion Theorem 2 Lemma: There is a computable function q : Σ* Σ* such that for every string w, q(w) is the description

Lecture 16: Time Complexity and P vs NP

6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded 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

CS154, 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

TIME 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:

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 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

Computability 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

Time 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

Undecidable 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 Σ.

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free 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

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

Lecture 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

Lecture 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

,

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

6.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

Lecture 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:

Homework 8. a b b a b a b. two-way, 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

CSE 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 Non-TR Language Reminders and announcements: HW 7 (Last!!)

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. 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

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

CS5371 Theory of Computation Lecture 19: Complexity IV (More on NP, NP-Complete) Objectives More discussion on the class NP Cook-Levin Theorem The Class NP revisited Recall that NP is the class of language

Definition: 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

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as

6.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 Polynomial-time reducibility, NP-completeness, and the Satisfiability (SAT) problem Topics: Introduction

6.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: Self-Reference and the Recursion

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

6.045 Lecture 17: Cook-Levin Theorem, NP-Complete 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

1 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

Theory 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

Automata Theory CS S-FR2 Final Review

Automata Theory CS411-2015S-FR2 Final Review David Galles Department of Computer Science University of San Francisco FR2-0: Halting Problem e(m) e(w) Halting Machine takes as input an encoding of a Turing

1 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).

Introduction 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 Context-Free Languages Regular Languages

Primitive 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.

Computational 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

Lecture 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

CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

Theory 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

1 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.

CpSc 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

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use

Chapter 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,

Decidability 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

Lecture 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

6.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

Turing 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:

16.1 Countability. CS125 Lecture 16 Fall 2014

CS125 Lecture 16 Fall 2014 16.1 Countability Proving the non-existence of algorithms for computational problems can be very difficult. Indeed, we do not know how to prove P NP. So a natural question is

Computer 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

Turing 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

Advanced Topics in Theoretical Computer Science

Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica Sofronie-Stokkermans Universität Koblenz-Landau e-mail: sofronie@uni-koblenz.de 1 Contents Recall: Turing

Computability 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

Further discussion of Turing machines

Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

Lecture 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

Problems, 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

DRAFT. 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

Mathematical Preliminaries. Sipser pages 1-28

Mathematical Preliminaries Sipser pages 1-28 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation

6.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

Intro 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. I-clicker

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE

Chapter 1 - Time and Space Complexity deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE 1 / 41 Deterministic Turing machines Definition 1.1 A (deterministic

CS 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

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

Theory of Computation Lecture Notes Prof. Yuh-Dauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. Yuh-Dauh

ECS 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 two-sided (no more wasted

Computability 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

acs-07: 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

The 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

CISC 876: Kolmogorov Complexity

March 27, 2007 Outline 1 Introduction 2 Definition Incompressibility and Randomness 3 Prefix Complexity Resource-Bounded K-Complexity 4 Incompressibility Method Gödel s Incompleteness Theorem 5 Outline

Before 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)

Turing 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

CS/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.

Ma/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 co-np. First we consider properties of the class of NP-complete problems, as opposed to those which are

A.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

Time and space classes

Time and space classes Little Oh (o,

MTAT Complexity Theory October 13th-14th, Lecture 6

MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when

Computability 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

satisfiability (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

Lecture 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

On 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 Turing-acceptable but not Turing-decidable. An important example of such a language was the language of the Halting

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

Automata 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

Chap. 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

6.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

An 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

Final 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 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,

CSC173 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

Q = 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

2 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;

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY YOU NEED TO PICK UP THE SYLLABUS, THE COURSE SCHEDULE, THE PROJECT INFO SHEET, TODAY S CLASS NOTES

De 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

Definition: 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

Topics in Complexity Theory

Topics in Complexity Theory Announcements Final exam this Friday from 12:15PM-3:15PM Please let us know immediately after lecture if you want to take the final at an alternate time and haven't yet told

NP-Completeness. Until now we have been designing algorithms for specific problems

NP-Completeness 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

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton

Computational 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 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

Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP)

Algorithms and Architectures II H-P Schwefel, Jens M. Pedersen Mm6 Advanced Graph Algorithms (hps) Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

8. INTRACTABILITY I poly-time reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin

P, NP, NP-Complete, and NPhard

P, NP, NP-Complete, and NPhard Problems Zhenjiang Li 21/09/2011 Outline Algorithm time complicity P and NP problems NP-Complete and NP-Hard problems Algorithm time complicity Outline What is this course