10/11/19 CSCI 3210: Computational Game Theory Computational Complexity Ref: Algorithm Design (Ch 8) on Blackboard Mohammad T . Irfan Email: mirfan@bowdoin.edu Web: www.bowdoin.edu/~mirfan Famous complexity classes u NP (non-deterministic polynomial time) u Class of decision problems for which we can verify a solution (certificate/witness) in polynomial time u P (deterministic polynomial time) u Class of decision problems that can be solved in polynomial time 1
10/11/19 Famous complexity classes u NP-Hard u "As hard as NP" u Every NP problem reduces to problems in this class in polynomial time u May not be in NP (e.g., may not have polynomial- time verifier) u NP-Complete u Decision problems that are: In NP 1. NP-Hard (i.e., every NP 2. problem reduces to these problem!) Millennium prize problem: P=NP? Unresolved! Implication Alternative Fact? Fact? 2
10/11/19 Other classes u EXPTIME u Evaluating a position in chess/checkers/Go u Undecidable u Halting problem u A ton of other classes... NP-completeness proof recipe u Want to prove problem B is NP-complete u 2 main steps: 1. Prove that B is in NP u Show that we can verify an answer to B in polynomial time 2. Prove that B is NP-hard Caution: not the u Pick a known NP-complete problem A other way! u Reduce A to B in a polynomial-time (i.e., A is not harder than B è B is at least as hard as the already-known hard problem A) 3
10/11/19 First NP-complete problem Stephen Cook u Boolean satisfiability problem (SAT) is NP- complete (Stephen Cook, 1971) u P = NP if and only if SAT is in P SAT u Operators u AND ∧ u OR ∨ u NOT ¬ (also, over-score) u Given a boolean formula, is there a satisfying assignment to the boolean variables? (x 1 v x 2 v x 3 ) ∧ ¬x 1 ∧ ¬x 3 (¬x 1 v ¬x 2 ) ∧ (¬x 1 v x 2 ) ∧ (x 1 v ¬x 2 ) ∧ (x 1 v x 2 ) ? ? 4
10/11/19 3-SAT u Stylized version of SAT u (... V ... V ...) ∧ (... V ... V ...) ∧ (... V ... V ...) ∧ ... u Each parenthetic expression is a clause u Each green box is a literal (e.g., x 1 , ¬x 2 , etc.) u 3-SAT is NP-complete Application: Electronic Design Automation (EDA) 5
10/11/19 Prove that CLIQUE is NP-complete CLIQUE u Clique: A subset of nodes of a graph such that there is an edge between every pair of nodes in that subset. A clique of size 5 u CLIQUE problem: Given a graph and a number k, Is there a clique of size >= k ? Example: Costas Busch- LSU 6
10/11/19 Proof: CLIQUE is NP-complete 1. CLIQUE is in NP u We can verify a solution (k-clique) in polynomial time Check whether there is an edge between every u pair of nodes in that clique Proof: CLIQUE is NP-complete 2. CLIQUE is NP-Hard u Take our favorite NP-complete problem 3- SAT (that's the only one we know...) u Reduce 3-SAT to CLIQUE Given k, take any instance of 3-SAT with k clauses u Caution: not Convert it to an instance of CLIQUE in polynomial u the other time way! Show that the answer to CLIQUE is yes u if and only if the answer to 3-SAT is yes 7
10/11/19 Reduction Node : every literal of 3-SAT instance ( x x x ) ( x x x ) ( x x x ) ( x x x ) Ú Ú Ù Ú Ú Ù Ú Ú Ù Ú Ú 1 2 4 1 2 4 1 2 3 2 3 4 Clause 2 Clause 3 x x x 1 2 4 x x 1 1 Clause 1 ( k = 4 here) x x 2 2 x x Clause 4 3 4 x x x 2 3 4 Costas Busch - LSU Reduction Edge: Connect each node/literal with every literal of a different clause, except two literals that are negations of each other. ( x x x ) ( x x x ) ( x x x ) ( x x x ) Ú Ú Ù Ú Ú Ù Ú Ú Ù Ú Ú 1 2 4 1 2 4 1 2 3 2 3 4 x x x 1 2 4 Do it for x x every 1 1 node! x x 2 2 x x 3 4 x x x 2 3 4 Costas Busch - LSU 8
10/11/19 ( x x x ) ( x x x ) ( x x x ) ( x x x ) Ú Ú Ù Ú Ú Ù Ú Ú Ù Ú Ú 1 2 4 1 2 4 1 2 3 2 3 4 x x x 1 2 4 x x 1 1 x x 2 2 x x 3 4 x x x 2 3 4 Resulting Graph: CLIQUE instance Costas Busch - LSU Prove: The graph has a k -clique if and only if 3-SAT has a solution ( k = 4 here) ( x x x ) ( x x x ) ( x x x ) ( x x x ) 1 Ú Ú Ù Ú Ú Ù Ú Ú Ù Ú Ú = 1 2 4 1 2 4 1 2 3 2 3 4 x 1 = 1 x 0 = x x x 2 1 2 4 x 0 = 3 x x x 1 1 1 = 4 x x 2 2 x x 3 4 x x x 2 3 4 This proves CLIQUE is NP-Hard (3-SAT is not harder than CLIQUE!) Costas Busch - LSU 9
10/11/19 INDEPENDENT SET is NP-Complete You do the proof! INDEPENDENT SET problem u Independent set: a subset of nodes of a graph such that there is no edge between any two nodes in that subset u INDEPNDENT SET problem u Given a graph and a number k , does there exist an independent set of size >= k ? 10
10/11/19 Example u Is there an independent set of size ³ 6? Yes u Is there an independent set of size ³ 7? No independent set Hantao Zhang – U Iowa Proof recipe 1. INDEPENDENT SET is in NP 2. INDEPENDENT SET is NP-hard u Reduce a known NP-complete problem to INDEPENDENT SET u Art: Which NP-complete problem would you like to pick? How would you do the reduction? REDUCTION: A à B Given any instance of problem A, convert it to an instance of B in polynomial time such that B instance has answer yes if and only if A instance has answer yes 11
10/11/19 VERTEX COVER is NP-complete You do the proof! VERTEX COVER problem u Vertex cover: a subset of nodes of a graph such that every edge has at least one endpoint in that subset u VERTEX COVER problem: u Given a graph and a number k , is there a vertex cover of size <= k? 12
10/11/19 Example u Is there a vertex cover of size £ 4? Yes. u Is there a vertex cover of size £ 3? No. vertex cover Hantao Zhang – U Iowa Proof recipe 1. VERTEX COVER is in NP 2. VERTEX COVER is NP-hard u Reduce a known NP-complete problem to VERTEX COVER vertex cover independent set Hantao Zhang – U Iowa 13
10/11/19 Other NP-Complete problems u Special cases of 3-SAT u SET COVER u HITTING SET u SUBSET-SUM u PARTITION u GRAPH COLORING u HAMILTONIAN PATH (TSP) u ... Examples HALTING PROBLEM -Optimization version of any NP-complete problem TSP CLIQUE INDEPENDENT SET FACTORIZATION/RSA GRAPH ISOMORPHISM SHORTEST-PATH FRACTIONAL KNAPSACK 14
10/11/19 Complexity of computing pure-strategy NE "Pure Nash Equilbria: Hard and Easy Games" – Gottlob et al. [Blackboard] Is there a pure-strategy NE? u (Gottlob et al., 2005) Deciding whether a graphical game (GG) has a PSNE is NP-complete, even for max degree 3 and max # of actions 3. u Proof. 1. GG is in NP 2. GG is NP-Hard u Reduction: 3-SAT' à GG For any 3-SAT' instance (where each variable u occurs in at most 3 clauses), create a GG instance Each clause and variable is a player u Neighbors/friends based on clause-var relations u Actions: {t, f, u} u Payoffs: next slide u 15
10/11/19 Caution u A clause in 3-SAT’ instance is different from the corresponding clause player in GG instance! u A clause in 3-SAT’ can only have a truth value of true or false. u A clause player in GG can play any one of the three actions t, f, and u. Payoffs of GG instance Pay Case off 3 c plays t & all neighboring variable players play t/f making the clause in 3-SAT’ true Payoff of a 2 c plays u & all neighboring variable players clause player c play t/f making the clause in 3-SAT’ false 2 c plays f & some neighboring variable player plays u 1 All other cases Pay Case off Payoff of a 3 v plays t/f & all neighboring clause players variable player v play t/f 2 v plays u & some neighboring clause player plays u 1 All other cases 3-SAT' instance is satisfiable GG instance has a pure NE 16
10/11/19 Is there a pure-strategy NE? u NP-complete, even for very special types of "graphical games" u Games in "normal form" (with payoff matrices) is a different story Representation size is important! Computing a mixed-strategy NE u Always exists (so not NP-complete!) u PPAD-complete even for 2-player games (with m actions) [Chen et al. (2009), Daskalakis et al. (2009)] u PPAD: Polynomial Parity Arguments on Directed graphs (Papadimitriou, 1994) 17
10/11/19 Problem is hard: What to do? u Polynomial time algorithms for special instances u Heuristics for general instances u Approximation algorithms for general instances 18
Recommend
More recommend