Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.

Similar presentations


Presentation on theme: "1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014."— Presentation transcript:

1 1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014

2 2 Course Outline Introduction and basic concepts Asymptotic notation Greedy algorithms Graph theory Amortized analysis Recursion Divide-and-conquer algorithms Randomized algorithms Dynamic programming algorithms NP-completeness

3 3 NP Complexity

4 4 Recap We are working on problems, not algorithms Our focus now is on decision problems (yes/no), not optimization problems We distinguish “finding” a solution and “checking” a solution Classes: P: decision problems that are solvable in polynomial time NP: decision problems for which a given certificate can be checked in polynomial time NP hard: at least as “hard” as any problem in NP NP complete (NPC): both NP and NP hard

5 5 NP complete NPC problems: have no known algorithm that runs in polynomial time There is no proof that such an algorithm doesn’t exist Examples: Hamiltonian path: path that traverses all nodes exactly once 3-SAT: assign values to Boolean variables that satisfy a set of clauses Graph coloring: assign colors to graphs, adjacent nodes have different colors Cook’s theorem (paraphrased): if the satisfiability problem can be solved in polynomial time, any problem in NP can be solved in polynomial time

6 6 Problem Reduction

7 7 NPC Proof

8 8 Graph Coloring

9 9 Graph Coloring – NPC proof

10 10 Graph Coloring – NPC proof

11 11 Graph Coloring – NPC proof

12 12 Clique

13 13 Clique – NPC proof

14 14 Clique – NPC proof

15 15 Vertex Cover

16 16 Vertex Cover – NPC proof


Download ppt "1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014."

Similar presentations


Ads by Google