NP-completeness Ch.34.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

P, NP, NP-Complete Problems
NP-Hard Nattee Niparnan.
Polynomial-time reductions We have seen several reductions:
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
P, NP, and NP-Complete Suzan Köknar-Tezel.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Polynomial-time reductions We have seen several reductions:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Unit 9: Coping with NP-Completeness
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Complete problems.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
NPC.
CSC 413/513: Intro to Algorithms
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The NP class. NP-completeness
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
NP-Complete Problems.
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Lecture 2-2 NP Class.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
NP-Completeness Yin Tat Lee
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
Chapter 34: NP-Completeness
Chapter 11 Limitations of Algorithm Power
Prabhas Chongstitvatana
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
RAIK 283 Data Structures & Algorithms
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

NP-completeness Ch.34

The Holly Grail Three classes of problems: Class P: problems solvable in polynomial time Class NP: problems verifiable in polynomial time (i.e. “give me a solution and I can verify that it is correct”) Class NPC (NP-complete): problems that are NP and as “hard” as any problem in NP If any NPC problem can be solved in polynomial time, then they all can; but so far nobody found any solution …. There are many NPC problems that look very simple on surface NPC problems are rather common

Nature of NP-problems NP-complete problems are decision problems (i.e. the answer is “yes/no”) But usually optimization problems can be converted into decision problems

Examples of NP-complete problems Finding longest path between any two vertices in a graph Circuit satisfiability: given a boolean circuit of AND, OR and NOT gates, is it satisfiable 3-CNF satisfiability: Find out if there is a solution to a Boolean formula in conjuctive normal form that has 3 distinct “elements” for each OR e.g. (x1 or x2’ or x3) AND (x1 or x2 or x3) AND (x4 or x1 or x3’)

Example problems, cntd. Find clique of max size in a graph (clique is a subset of vertices, and each pair is connected by an edge) Find a hamiltonian cycle in a graph (a cycle that contains each vertex) Traveling salesman problem: find a hamiltonian cycle which ends at the starting vertex (i.e. visit all nodes exactly once and finish at the node you started from)

Practical Consequences If a problem is proven to be NP-complete, do NOT bother writing an algorithm to solve it exactly, because you will not be able to find the solution, most likely (nobody did so far, and people have been trying for hundreds of years; so if you do, you will be a very very famous person); or if you want an exact solution, it will be a naïve check of all possibilities and will run much longer than polynomial time…. Instead, solve the problem by approximations, or solve a special case that is tractable.