Welcome to... Problem Analysis and Complexity Theory , 3 VU

Size: px
Start display at page:

Download "Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU"

Transcription

1 Welcome to... Problem Analysis and Complexity Theory , 3 VU Birgit Vogtenhuber Institute for Software Technology bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 1

2 Last Time NP-completeness exercises: HAMPATH P UHAMPATH HAMCYCLE = P UHAMCYCLE strong NP-completess of TSP Summary: - picture - proof + reduction checklist Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 2

3 Last Time NP-completeness exercises: L bold = strongly NPC Arrows HAMPATH indicate P UHAMPATH HAMCYCLE = P UHAMCYCLE SAT ksat for k > 3 presented reductions strong NP-completess of TSP 3SAT Summary: - picture MAX2SAT SUBSET SUM - proof + reduction checklist HAMPATH INDEP. SET KNAPSACK HAMCYCLE UHAMPATH CLIQUE VERTEX COVER UHAMCYCLE TSP Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 2

4 Last Time New complexity classes via complements: UNSAT: unsatisfiability of boolean formulas Definition of co-classes including conp Discussion P - NP - conp Picture of one possibility Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 2

5 Last Time New complexity classes via complements: UNSAT: unsatisfiability of boolean formulas Definition of co-classes NP including conp conp Discussion P - NP - conp P Picture of one possibility NPC SAT conpc UNSAT Picture: one possibility! Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 2

6 This Time: Space Complexity recall definitions: SPACE(f(n)), NSPACE(f(n)), L, NL, PSPACE clarify computation model and #configurations revisit containment relations of complexity classes two examples: SAT, PATH recall log-space reductions L consider closeness under L define completeness w.r.t. L prove Savitch s Theorem define conl Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 3

7 Definition: Space Complexity: Definition Let s : N N be a complexity function. Deterministic Space: SPACE(s(n)) := {L L is a language decidable by an O(s(n))-space det. TM } Nondeterministic Space: NSPACE(s(n)) := {L L is a language decidable by an O(s(n))-space nondet. TM } Det. Polynomial Space: PSPACE := k 1 SPACE(nk ) Det. Logarithmic Space: L := SPACE(log n) Nondet. Logarithmic Space: NL := NSPACE(log n) Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 4

8 Space Complexity: Definition Definition: Let s : N N be a complexity function. Deterministic Space: SPACE(s(n)) := {L L is a language decidable PSPACEby an O(s(n))-space det. TM } Nondeterministic Space: NSPACE(s(n)) := {L L is a language decidable NL by an Input uses n cells How can O(s(n))-space nondet. TM } L a TM use only log n space? Det. Polynomial Space: PSPACE := k 1 SPACE(nk ) Det. Logarithmic Space: L := SPACE(log n) Nondet. Logarithmic Space: NL := NSPACE(log n) Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 4

9 Input / Work / Output TM Model of computation: special 3-tape DTM / NTM Input tape: read only! Work tape: only one counted Output tape: write only! no going back Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 5

10 Input / Work / Output TM Model of computation: special 3-tape DTM / NTM 1. Q: finite set of states, 2. Σ: finite input alphabet not containing the blank symbol and the start symbol, 3. Γ: finite work alphabet with, Γ and Σ Γ, 4. transition function δ : Q Σ Γ Q {L,, R} in Γ {L,, R} work Γ {, R} out, 5. q 0 Q: start state, 6. q accept Q: accept state, and 7. q reject Q: reject state, where q reject q accept. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 5

11 Input / Work / Output TM Model of computation: special 3-tape DTM / NTM 1. Q: finite set of states, 2. Σ: finite input alphabet not containing the blank symbol and the start symbol, 3. Γ: finite work alphabet with, Γ and Σ Γ, 4. transition relation : Q Σ Γ P (Q {L,, R} in Γ {L,, R} work Γ {, R} out ), 5. q 0 Q: start state, 6. q accept Q: accept state, and 7. q reject Q: reject state, where q reject q accept. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 5

12 Input / Work / Output TM Model of computation: special 3-tape DTM / NTM Question: How many different configurations for given input of size N and work-tape size S? 1. input tape head position: N 2. work tape content: Γ S 3. work tape head position: S 4. the machines state: Q in total: N Γ S S Q input unchangable 1 instead of Σ N! output unreadable need not be counted! Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 5

13 Input / Work / Output TM Model of computation: special 3-tape DTM / NTM Question: How many different configurations for given input of size N and work-tape size S? 1. input tape head position: N 2. work tape content: Γ S 3. work tape head position: S 4. the machines state: Q in total: Corollary: N Γ S S Q L P, NL NP. Proof: Space bound S = O(log N) N Γ log N log N Q = O(p(N)). Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 5

14 Containment Relations L NL P NP PSPACE EXP L NL, P NP: DTM = special case of NTM PSPACE EXP, L P: # configurations of a DTM P PSPACE: O(f(n))-time O(f(n))-space EXP PSPACE NP P NL NP PSPACE: simulate O(f(n))-time NTM with O(f(n))-space DTM NL P: later in this course L Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 6

15 Containment Relations L NL P NP PSPACE EXP L NL, P NP: DTM = special case of NTM PSPACE EXP, L P: # configurations of a DTM P PSPACE: O(f(n))-time O(f(n))-space EXP PSPACE NP P NL NP PSPACE: simulate O(f(n))-time NTM with O(f(n))-space DTM NL P: later in this course lesson L Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 6

16 Example: SAT Claim: SAT SPACE(n). M = On input φ, where φ is a Boolean formula: 1. For each truth assignment T of the variables x 1,... x m of φ: 2. Evaluate φ on T 3. If φ(t ) evaluates to true then accept φ 4. reject φ In one iteration of the loop, M needs to store only the truth assignment T O(m) = O(n) space. Each iteration can use the same portion of the work tape M runs in O(n) = linear space in total. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 7

17 Example: PATH In a directed graph G = (V, E), a (simple) path from s V to t V is a directed path that starts at s, ends at t, and visits every vertex of V at most once. Decision problem PATH: Does a given directed graph G contain a path from s to t? t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 8

18 Example: PATH In a directed graph G = (V, E), a (simple) path from s V to t V is a directed path that starts at s, ends at t, and visits every vertex of V at most once. Decision problem PATH: Does a given directed graph G contain a path from s to t? Instance: A directed graph G = (V, E) and s, t V. t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 8

19 Claim: Example: PATH PATH is in NL. nondeterministic algorithm for G = (V, E), s, t: 1. Start with u = s 2. for i = 1,..., V : 3. let u be a nondeterministic neighbor of u 4. if u = t then acccept 5. reject needed Space: O(log V ) for current u O(log V ) for counting to V O(log V ) = O(log n) total Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ t s

20 Input / Work / Witness TM Alternative formulation for space-bounded NTM: Input tape: read only! Work tape: only one counted Witness tape: read only! no going back witness for PATH: a path s t Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/2015 9

21 Definition: Log-Space Reductions A language A is log-space (Karp) reducible to a language B (denoted by A L B), if there exists a log-space computable function f : Σ A Σ B w A f(w) B. (called reduction-function), such that log-space DTM that outputs f(w) on input w. A f B Σ A \A Σ B \B Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

22 Log-Space Reductions Theorem: L is closed under log-space (Karp) reductions: Claim: If f is a log-space reduction from A to B and B L, then A L. Proof for polynomial time reductions: w a polynomial time algorithm for A polynomial-time algorithm for f f(w) polynomial-time algorithm for B f(w) B? w A? Question: Why does this reasoning not work for L and L? f(w) too large for inside A! Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

23 Log-Space Reductions Theorem: L is closed under log-space (Karp) reductions: Claim: If f is a log-space reduction from A to B and B L, then A L. Proof: Make a machine M A that on input w for A... simulates B s machine M B on input f(w) whenever M B would read the i th symbol of its input f(w), runs f s machine M f on w and waits for the i th symbol to be outputted. Theorem: The complexity classes L, NL, PSPACE, P, NP,and EXP are closed under log-space (Karp) reductions. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

24 Log-Space Reductions Theorem: L is closed under log-space (Karp) reductions: Claim: If f is a log-space reduction from A to B and B L, then A L. Proof: Make a machine M A that on input w for A... simulates B s machine M B on input f(w) whenever M B would read the i th symbol of its input f(w), runs f s machine M f on w and waits for the i th symbol to be outputted. Definition: A decision problem B NL is called NL-complete if A L B for all A NL. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

25 Theorem: PATH is NL-complete PATH is NL-complete. Proof for NL-hardness: Given an arbitrary log-space NTM N and an input w, find a log-space computable function f that maps N, w to an instance f(n, w) = (G, s, t) of PATH such that G has path from s to t N accepts w N, w f t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

26 PATH is NL-complete Configurations graph G N,w = (V, E) for (N, w): vertex set V : all configurations of (N, w) edge (u, v) E iff transition u v possible in (N, w) start vertex s: start configuration of (N, w) target vertex t: accepting configuration of (N, w) Modify N to have a unique accepting configuration s G has path from s to t N accepts w t Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

27 Theorem: PATH is NL-complete PATH is NL-complete. Proof for NL-hardness: Given an arbitrary log-space NTM N and an input w, find a log-space computable function f that maps N, w to an instance f(n, w) = (G, s, t) of PATH such that G has path from s to t N accepts w N, w f t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

28 PATH is NL-complete Log-space computability of G N,w for (N, w): V : any configuration can be represented with c log w space (c const.) for all strings s of length s c log w : test whether s is a legal configuration of (N, w) output s iff yes E: try all pairs (c 1, c 2 ) of configurations: test whether with the tape contents and head locations given in c 1, c 2 is a possible next configuration (by the transition relation ) output (c 1, c 2 ) iff yes Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

29 Theorem: PATH is NL-complete PATH is NL-complete. Proof for NL-hardness: Given an arbitrary log-space NTM N and an input w, find a log-space computable function f that maps N, w to an instance f(n, w) = (G, s, t) of PATH such that G has path from s to t N accepts w N, w f t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

30 PATH is NL-complete Theorem: Corollary: NL P. PATH is NL-complete. Proof: PATH is NL-complete. reduction f from proof in space O(log n). f in time n2 O(log n) = O(p(n)). For any A NL: A P PATH. PATH P For any A NL: A P. t s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

31 Containment Relations L NL P NP PSPACE EXP L NL, P NP: DTM = special case of NTM PSPACE EXP, L P: # configurations of a DTM P PSPACE: O(f(n))-time O(f(n))-space EXP PSPACE NP P NL NP PSPACE: simulate O(f(n))-time NTM with O(f(n))-space DTM NL P: later in this lesson PATH NL-complete and P. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ L

32 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Proof: 1. We construct an algorithm path(g, x, y, i) that returns whether there exists a path in G from x to y that has length at most 2 i. path(g, x, y, i): if i = 0: if x = y or (x, y) E: accept if i > 0: for each z V : if path(g, x, z, i 1) and path(g, z, y, i 1): accept reject Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ t s

33 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Proof: 2. path(g, x, y, log n ) answers the decision question PATH(G, x, y): If there exists a path P from x to y then log n P has length P n 2 P can be split into two halves, both of length log n 1 at most P /2 n/2 2 Two paths P 1 : x z and P 2 : z y can be combined into one path P : x y with length P P 1 + P 2 Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

34 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Proof: 3. path(g, x, y, log n ) can be computed in O((log n) 2 ) space: use stack for recursion with triplets (x, y, i). For each vertex z: write (x, z, i 1) to stack if path(x, z, i 1) accepts replace (x, z, i 1) by (z, y, i 1). else replace (x, z, i 1) by (x, z, i 1). each stack element needs at most space 3 log n as i log n, the height of the stack is at most log n the total stack space is O((log n) 2 ). Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

35 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Corollary: NL = NSPACE(log n) SPACE((log n) 2 ). Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

36 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Corollary (Savitch s Theorem): f Ω(log n) : NSPACE(f(n)) SPACE((f(n)) 2 ). Proof: 1. simulate f(n)-space NTM N with input w by running path on its configurations graph G N,w. 2. G N,w is represented only implicitly. It suffices to read w and the description of N for i = G N,w has c f(n) vertices (for some constant c). path needs at most O((log(c f(n) )) 2 ) = O((f(n)) 2 ) space. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

37 Savitch s Theorem Theorem (Savitch 1970): PATH SPACE((log n) 2 ). Corollary (Savitch s Theorem): f Ω(log n) : NSPACE(f(n)) SPACE((f(n)) 2 ). Exercise: Perform path with the shown graph path(g, x, y, i): if i=0: if x = y or (x, y) E: accept t if i > 0: for each z V : if path(g, x, z, i 1) and path(g, z, y, i 1): accept reject Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ s

38 Discussion Space complexity classes: especially L, NL log-space reductions L closeness under L NL P: PATH is NL-complete NL SPACE((log n) 2 ): PATH SPACE((log n) 2 ) Savitch s Theorem: NSPACE(f(n)) SPACE(f 2 (n)) deterministic simulation of nondeterministic space-bounded computation does not incur that large overhead! Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

39 Next More about space complexity classes: NL vs. conl PSPACE Motivation: Better understanding of space complexity Differences between time complexity and space complexity Start with NOPATH: How complicated is it to decide if a given graph G does not contain a path from s to t? Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

40 NOPATH NOPATH: Nonexistence of a path NOPATH = {(G, s, t) G contains no path from s to t} Decision Problem: Does a given directed graph G not contain a path from s to t? Instance: A directed graph G = (V, E) and s, t V. Question: In which complexity classes is NOPATH for sure? Definition: conl= {A A c NL} s t Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

41 NOPATH NOPATH: Nonexistence of a path NOPATH = {(G, s, t) G contains no path from s to t} Decision Problem: Does a given directed graph G not contain a path from s to t? Instance: A directed graph G = (V, E) and s, t V. Question: In which complexity classes is NOPATH for sure? Answers: P, SPACE(log 2 (n)), conl; NOPATH is conl-complete s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ t

42 NOPATH NOPATH: Nonexistence of a path NOPATH = {(G, s, t) G contains no path from s to t} Decision Problem: Does a given directed graph G not contain a path from s to t? Instance: A directed graph G = (V, E) and s, t V. Question: What if we can prove that NOPATH is in NL? Answer: Then we have proven NL= conl! s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ t

43 REACHABILITY REACHABILITY: Given a directed graph G and a vertex s of G, how many vertices are reachable from s? Instance: A directed graph G = (V, E) and s V. Output: The number of vertices reachable from s. Example: How many in the shown graph? Question: How complicated is it to compute REACHABILITY? s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

44 REACHABILITY REACHABILITY: Given a directed graph G and a vertex s of G, how many vertices are reachable from s? Instance: A directed graph G = (V, E) and s V. Output: The number of vertices reachable from s. Example: How many in the shown graph? Question: How complicated is it to compute REACHABILITY? s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

45 REACHABILITY Theorem (Immerman-Szelepscényi 1988): Given a directed graph G with n vertices and a vertex s of G, the number of vertices that are reachable from s can be computed in NSPACE(log n) = NL. Proof: Let S(k) be the set of vertices of G that are reachable from s on a path of length at most k. S(n 1) is the total number of vertices that are reachable from s. We iteratively compute S(1), S(2),..., S(n 1) with a nondeterministic algorithm using space O(log n) Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

46 REACHABILITY countreachablenodes(g, s) c prev = 1 for k = 1 to n 1 /* c prev : # of vertices reachable in k 1 steps */ c curr = 0 for each v V /* Is v reachable from s in k steps? */ if iselement(s, v, G, k, c prev ): c curr = c curr + 1 c prev = c curr output c prev Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

47 REACHABILITY iselement(s, v, G, k, c prev ) sc = 0, reply = FALSE find path s k 1 w 1 v for each w V goodp ath = TRUE, u curr = s for j = 1 to k 1 /* Guess a k 1 long path */ u prev = u curr, guess u curr if (u prev, u curr ) E: goodp ath = FALSE if u curr == w: break /* check if path is good and ends in w */ if goodp ath and u curr == w sc = sc + 1 if (w, v) E: reply = TRUE if sc < c prev : nondeterministic abort else return reply Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

48 REACHABILITY iselement(s, v, G, k, c prev ): guesses a path of length k 1 for each vertex w. counts vertices w for which it guessed a path checks that it found all (sc == c prev ): some computation branch finds all (first) checks for all w with path whether it can be extended with an edge to v extendible for one w implies answer TRUE countreachablenodes(g, s) iterative computation of c prev enables sanity-check for iselement(s, v, G, k, c prev ) stores only constantly many variables of size log n runs in NSPACE(log n) Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

49 REACHABILITY Theorem (Immerman-Szelepscényi 1988): Given a directed graph G with n vertices and a vertex s of G, the number of vertices that are reachable from s can be computed in NSPACE(log n) = NL. Proof: Let S(k) be the set of vertices of G that are reachable from s on a path of length at most k. S(n 1) is the total number of vertices that are reachable from s. We iteratively compute S(1), S(2),..., S(n 1) with a nondeterministic algorithm using space O(log n) Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

50 NOPATH is in NL NOPATH: Nonexistence of a path NOPATH = {(G, s, t) G contains no path from s to t} Decision Problem: Does a given directed graph G not contain a path from s to t? Instance: A directed graph G = (V, E) and s, t V. Question: What if we can prove that NOPATH is in NL? Answer: Then we have proven NL= conl! s Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/ t

51 NOPATH is in NL Corollary: from Immerman-Szelepscényi it follows that NOPATH is a member of NL Proof by algorithm: unreachability(g, s, t) c prev = 1 for k = 1 to n 1 /* c prev : # of vertices reachable in k 1 steps */ c curr = 0 for each v V /* Is v reachable from s in k steps? */ if iselement(s, v, G, k, c prev ): c curr = c curr + 1 if v == t: REJECT c prev = c curr ACCEPT Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

52 NOPATH is in NL Corollary: Corollary: Corollary: Proof: from Immerman-Szelepscényi it follows that NOPATH is a member of NL NL= conl the Immerman-Szelepscényi theorem: Let f(n) be an arbitrary complexity function with f(n) = Ω(log n). Then it holds that NSPACE(f(n)) = conspace(f(n)). Exercise. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

53 Remarks on L, NL, and conl PATH and NOPATH are both NL-complete. 2SAT (and 2UNSAT) are NL-complete as well. Exercise: Prove that 2UNSAT NL. It is generally believed that NP conp and the same also appeared to hold for NL and conl. The Immerman-Szelepscényi theorem is one of the most surprising ones concerning the relationships of complexity classes, showing that the intuition about computation has still many gaps! It still remains open whether L NL. Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

54 Remarks on L, NL, and conl PATH and NOPATH are both NL-complete. 2SAT (and 2UNSAT) are NL-complete as well. Exercise: Prove that 2UNSAT NL. It is generally believed that NP conp and the same also appeared to hold for NL and conl. The Immerman-Szelepscényi theorem is one of the most surprising ones concerning the relationships of complexity classes, showing that the intuition about computation has still many gaps! It still remains open whether L NL. Thank you for your attention! Birgit Vogtenhuber Problem Analysis and Complexity Theory, , winter term 2014/

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

More information

Complexity Theory. Jörg Kreiker. Summer term 2010. Chair for Theoretical Computer Science Prof. Esparza TU München

Complexity Theory. Jörg Kreiker. Summer term 2010. Chair for Theoretical Computer Science Prof. Esparza TU München Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 8 PSPACE 3 Intro Agenda Wrap-up Ladner proof and time vs. space succinctness QBF

More information

Lecture 2: Universality

Lecture 2: Universality CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

More information

Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

More information

Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

More information

The Classes P and NP

The Classes P and NP The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

More information

Complexity Classes P and NP

Complexity Classes P and NP Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

More information

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Why? A central concept in Computer Science. Algorithms are ubiquitous. Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

More information

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

More information

Lecture 7: NP-Complete Problems

Lecture 7: NP-Complete Problems IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

More information

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

More information

Notes on NP Completeness

Notes on NP Completeness Notes on NP Completeness Rich Schwartz November 10, 2013 1 Overview Here are some notes which I wrote to try to understand what NP completeness means. Most of these notes are taken from Appendix B in Douglas

More information

Tutorial 8. NP-Complete Problems

Tutorial 8. NP-Complete Problems Tutorial 8 NP-Complete Problems Decision Problem Statement of a decision problem Part 1: instance description defining the input Part 2: question stating the actual yesor-no question A decision problem

More information

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012 276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the

More information

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

More information

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

More information

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis LOGIC AND COMPUTER SCIENCE Phokion G. Kolaitis Computer Science Department, University of California, Santa Cruz, CA 95064, USA Keywords: algorithm, Armstrong s axioms, complete problem, complexity class,

More information

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move. CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write

More information

CSC 373: Algorithm Design and Analysis Lecture 16

CSC 373: Algorithm Design and Analysis Lecture 16 CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements

More information

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

More information

CoNP and Function Problems

CoNP and Function Problems CoNP and Function Problems conp By definition, conp is the class of problems whose complement is in NP. NP is the class of problems that have succinct certificates. conp is therefore the class of problems

More information

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

Introduction to NP-Completeness Written and copyright c by Jie Wang 1 91.502 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of

More information

Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms. Part 3: P, NP Hard Problems Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

More information

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

More information

Chapter. NP-Completeness. Contents

Chapter. NP-Completeness. Contents Chapter 13 NP-Completeness Contents 13.1 P and NP......................... 593 13.1.1 Defining the Complexity Classes P and NP...594 13.1.2 Some Interesting Problems in NP.......... 597 13.2 NP-Completeness....................

More information

Guessing Game: NP-Complete?

Guessing Game: NP-Complete? Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

More information

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1) Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

More information

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Computability Theory

Computability Theory CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.

More information

On the Relationship between Classes P and NP

On the Relationship between Classes P and NP Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,

More information

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X. Decision Problems 8.2 Definition of NP Decision problem. X is a set of strings. Instance: string s. Algorithm A solves problem X: A(s) = yes iff s X. Polynomial time. Algorithm A runs in polytime if for

More information

NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

How To Solve A K Path In Time (K)

How To Solve A K Path In Time (K) What s next? Reductions other than kernelization Dániel Marx Humboldt-Universität zu Berlin (with help from Fedor Fomin, Daniel Lokshtanov and Saket Saurabh) WorKer 2010: Workshop on Kernelization Nov

More information

P versus NP, and More

P versus NP, and More 1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

More information

3515ICT Theory of Computation Turing Machines

3515ICT Theory of Computation Turing Machines Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

More information

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

More information

Complexity Classes. Chapter 27 of the forthcoming CRC Handbook on Algorithms and Theory of Computation. Eric Allender 1. Rutgers University

Complexity Classes. Chapter 27 of the forthcoming CRC Handbook on Algorithms and Theory of Computation. Eric Allender 1. Rutgers University Complexity Classes Chapter 27 of the forthcoming CRC Handbook on Algorithms and Theory of Computation Eric Allender 1 Rutgers University Michael C. Loui 2 University of Illinois at Urbana-Champaign 1 Introduction

More information

The P versus NP Solution

The P versus NP Solution The P versus NP Solution Frank Vega To cite this version: Frank Vega. The P versus NP Solution. 2015. HAL Id: hal-01143424 https://hal.archives-ouvertes.fr/hal-01143424 Submitted on 17 Apr

More information

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design. Complexity and NP-completeness SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

More information

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7 (67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

1 Approximating Set Cover

1 Approximating Set Cover CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt

More information

Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

More information

8.1 Min Degree Spanning Tree

8.1 Min Degree Spanning Tree CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

More information

Lecture 2: Complexity Theory Review and Interactive Proofs

Lecture 2: Complexity Theory Review and Interactive Proofs 600.641 Special Topics in Theoretical Cryptography January 23, 2007 Lecture 2: Complexity Theory Review and Interactive Proofs Instructor: Susan Hohenberger Scribe: Karyn Benson 1 Introduction to Cryptography

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

Introduction to computer science

Introduction to computer science Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

More information

Lecture summary for Theory of Computation

Lecture summary for Theory of Computation Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:ssen@cse.iitd.ernet.in Contents 1 The

More information

Problem Set 7 Solutions

Problem Set 7 Solutions 8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

More information

2.1 Complexity Classes

2.1 Complexity Classes 15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look

More information

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

More information

Complexity Classes. Eric Allender Rutgers University. Michael C. Loui University of Illinois at Urbana-Champaign

Complexity Classes. Eric Allender Rutgers University. Michael C. Loui University of Illinois at Urbana-Champaign Complexity Classes Eric Allender Rutgers University Michael C. Loui University of Illinois at Urbana-Champaign Kenneth W. Regan State University of New York at Buffalo 1 Introduction The purposes of complexity

More information

Computational Models Lecture 8, Spring 2009

Computational Models Lecture 8, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance

More information

Lecture 1: Oracle Turing Machines

Lecture 1: Oracle Turing Machines Computational Complexity Theory, Fall 2008 September 10 Lecture 1: Oracle Turing Machines Lecturer: Kristoffer Arnsfelt Hansen Scribe: Casper Kejlberg-Rasmussen Oracle TM Definition 1 Let A Σ. Then a Oracle

More information

Outline Introduction Circuits PRGs Uniform Derandomization Refs. Derandomization. A Basic Introduction. Antonis Antonopoulos.

Outline Introduction Circuits PRGs Uniform Derandomization Refs. Derandomization. A Basic Introduction. Antonis Antonopoulos. Derandomization A Basic Introduction Antonis Antonopoulos CoReLab Seminar National Technical University of Athens 21/3/2011 1 Introduction History & Frame Basic Results 2 Circuits Definitions Basic Properties

More information

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

More information

Turing Machines: An Introduction

Turing Machines: An Introduction CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

More information

The Halting Problem is Undecidable

The Halting Problem is Undecidable 185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

More information

Quantum and Non-deterministic computers facing NP-completeness

Quantum and Non-deterministic computers facing NP-completeness Quantum and Non-deterministic computers facing NP-completeness Thibaut University of Vienna Dept. of Business Administration Austria Vienna January 29th, 2013 Some pictures come from Wikipedia Introduction

More information

Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全

Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全 Prime Numbers Difficulties in Factoring a Number: from the Perspective of Computation 電 腦 安 全 海 洋 大 學 資 訊 工 程 系 丁 培 毅 Prime number: an integer p> that is divisible only by and itself, ex., 3, 5, 7,, 3,

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm. Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

More information

On the Unique Games Conjecture

On the Unique Games Conjecture On the Unique Games Conjecture Antonios Angelakis National Technical University of Athens June 16, 2015 Antonios Angelakis (NTUA) Theory of Computation June 16, 2015 1 / 20 Overview 1 Introduction 2 Preliminary

More information

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

1 Definitions. Supplementary Material for: Digraphs. Concept graphs Supplementary Material for: van Rooij, I., Evans, P., Müller, M., Gedge, J. & Wareham, T. (2008). Identifying Sources of Intractability in Cognitive Models: An Illustration using Analogical Structure Mapping.

More information

Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

More information

The Classes P and NP. mohamed@elwakil.net

The Classes P and NP. mohamed@elwakil.net Intractable Problems The Classes P and NP Mohamed M. El Wakil mohamed@elwakil.net 1 Agenda 1. What is a problem? 2. Decidable or not? 3. The P class 4. The NP Class 5. TheNP Complete class 2 What is a

More information

Private Approximation of Clustering and Vertex Cover

Private Approximation of Clustering and Vertex Cover Private Approximation of Clustering and Vertex Cover Amos Beimel, Renen Hallak, and Kobbi Nissim Department of Computer Science, Ben-Gurion University of the Negev Abstract. Private approximation of search

More information

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

More information

A Working Knowledge of Computational Complexity for an Optimizer

A Working Knowledge of Computational Complexity for an Optimizer A Working Knowledge of Computational Complexity for an Optimizer ORF 363/COS 323 Instructor: Amir Ali Ahmadi TAs: Y. Chen, G. Hall, J. Ye Fall 2014 1 Why computational complexity? What is computational

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

each college c i C has a capacity q i - the maximum number of students it will admit

each college c i C has a capacity q i - the maximum number of students it will admit n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

More information

CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

More information

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm. Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

ATheoryofComplexity,Conditionand Roundoff

ATheoryofComplexity,Conditionand Roundoff ATheoryofComplexity,Conditionand Roundoff Felipe Cucker Berkeley 2014 Background L. Blum, M. Shub, and S. Smale [1989] On a theory of computation and complexity over the real numbers: NP-completeness,

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

Turing Machines, Part I

Turing Machines, Part I Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context

More information

Notes from Week 1: Algorithms for sequential prediction

Notes from Week 1: Algorithms for sequential prediction CS 683 Learning, Games, and Electronic Markets Spring 2007 Notes from Week 1: Algorithms for sequential prediction Instructor: Robert Kleinberg 22-26 Jan 2007 1 Introduction In this course we will be looking

More information

Turing Machines and Understanding Computational Complexity

Turing Machines and Understanding Computational Complexity Turing Machines and Understanding Computational Complexity Paul M.B.Vitányi CWI, Science Park 123, 1098XG Amsterdam The Netherlands 1. Introduction A Turing machine refers to a hypothetical machine proposed

More information

CMSC 858T: Randomized Algorithms Spring 2003 Handout 8: The Local Lemma

CMSC 858T: Randomized Algorithms Spring 2003 Handout 8: The Local Lemma CMSC 858T: Randomized Algorithms Spring 2003 Handout 8: The Local Lemma Please Note: The references at the end are given for extra reading if you are interested in exploring these ideas further. You are

More information

Fixed-Point Logics and Computation

Fixed-Point Logics and Computation 1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of

More information

Lecture 22: November 10

Lecture 22: November 10 CS271 Randomness & Computation Fall 2011 Lecture 22: November 10 Lecturer: Alistair Sinclair Based on scribe notes by Rafael Frongillo Disclaimer: These notes have not been subjected to the usual scrutiny

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover Friedrich-Schiller-Universität Jena Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie Studienarbeit An Iterative Compression Algorithm for Vertex Cover von Thomas Peiselt

More information

Small Maximal Independent Sets and Faster Exact Graph Coloring

Small Maximal Independent Sets and Faster Exact Graph Coloring Small Maximal Independent Sets and Faster Exact Graph Coloring David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science The Exact Graph Coloring Problem: Given an undirected

More information