15-251 Great Theoretical Ideas in Computer Science.

Slides:



Advertisements
Similar presentations
 2004 SDU Lecture17-P,NP, NPC.  2004 SDU 2 1.Decision problem and language decision problem decision problem and language 2.P and NP Definitions of.
Advertisements

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.
Lecture 21 NP-complete problems
Great Theoretical Ideas in Computer Science for Some.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
Discrete Structures & Algorithms The P vs. NP Question EECE 320.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computational problems, algorithms, runtime, hardness
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.
12/3CSE NP-complete CSE Algorithms NP Completeness Approximations.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Programming & Data Structures
MCS312: NP-completeness and Approximation Algorithms
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.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Approximation Algorithms
CSC 413/513: Intro to Algorithms NP Completeness.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
P vs NP: what is efficient computation? Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2005 Lecture 29Dec 8, 2005Carnegie Mellon.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
COMPSCI 102 Introduction to Discrete Mathematics.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
COMPSCI 102 Introduction to Discrete Mathematics.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Non-Approximability Results. Summary -Gap technique -Examples: MINIMUM GRAPH COLORING, MINIMUM TSP, MINIMUM BIN PACKING -The PCP theorem -Application:
NP-complete Problems Prof. Sin-Min Lee Department of Computer Science.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
CSCI 2670 Introduction to Theory of Computing November 17, 2005.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NPC.
CSC 413/513: Intro to Algorithms
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 28Dec 7th, 2006Carnegie Mellon University Complexity Theory: the P.
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
Lecture 2-2 NP Class.
Great Theoretical Ideas in Computer Science
Lecture 22 Complexity and Reductions
NP-Completeness Yin Tat Lee
ICS 353: Design and Analysis of Algorithms
NP-Completeness Yin Tat Lee
Great Theoretical Ideas In Computer Science
Lecture 22 Complexity and Reductions
Presentation transcript:

Great Theoretical Ideas in Computer Science

A quick recap on reductions and NP-hardness Lecture 29 (December 3, 2009)

In the previous lecture, we saw two problem classes: P and NP

The Class P We say a set L  Σ * is in P if there is a program A and a polynomial p( ) such that for any x in Σ *, A(x) runs for at most p(|x|) time and answers question “is x in L?” correctly.

The class of all sets L that can be recognized in polynomial time. The class of all decision problems that can be decided in polynomial time. The Class P

P contains many useful problems: graph connectivity minimum spanning tree matchings in graphs shortest paths solving linear systems Ax = b linear programming maximum flows Many of this we will (re)visit in

NP A set L  NP if there exists an algorithm A and a polynomial p( ) such that For all x  L there exists y with |y|  p(|x|) such that A(x,y) = YES in p(|x|) time For all x  L For all y with |y|  p(|x|) in p(|x|) time such that A(x,y) = NO “exists a quickly-verifiable proof” “all non-proofs rejected”

The Class NP The class of sets L for which there exist “short” proofs of membership (of polynomial length) that can be “quickly” verified (in polynomial time). Recall: A doesn’t have to find these proofs y; it just needs to be able to verify that y is a “correct” proof.

P  NP For any L in P, we can just take y to be the empty string and satisfy the requirements. Hence, every language in P is also in NP.

Summary: P versus NP Set L is in P if membership in L can be decided in poly-time. Set L is in NP if each x in L has a short “proof of membership” that can be verified in poly-time. Fact: P  NP Million (Billion) $ question: Does NP  P ?

Classroom Scheduling Packing objects into bins Scheduling jobs on machines Finding cheap tours visiting a subset of cities Allocating variables to registers Finding good packet routings in networks Decryption … NP Contains Lots of Problems We Don’t Know to be in P

E.g. Scheduling Jobs on Machines Input: A set of n jobs, each job j has processing time p j A set of m identical machines A value T Can you allocate these n jobs to these m machines such that the latest ending time over all jobs ≤ T?

E.g.: m=4 machines, n=8 jobs, T = 5

E.g.: m=4 machines, n=7 jobs, T = 4

E.g. Scheduling Jobs on Machines Input: A set of n jobs, each job j has processing time p j A set of m identical machines A value T we think it is NP hard… Can you allocate these n jobs to these m machines such that the latest ending time over all jobs ≤ T? (This latest ending time is called the “makespan”)

NP hardness proof To prove NP hardness, find a problem such that b) show that if you can solve Makespan minimization quickly, you can solve that problem quickly a) that problem is itself NP hard Can you suggest such a problem? “reduce a hard problem to Makespan-minimization”

The (NP hard) Partition Problem Given a set A = {a 1, a 2,…,a n } of n naturals which sum up to 2B (B is a natural), find a subset of these that sums to exactly B. a) the problem is itself NP hard so we’ve found a problem such that:

b) show that if you can solve Makespan minimization quickly, you can solve Partition quickly Take any instance (A = {a 1, …, a n }, B) of Partition Each natural number in A corresponds to a job. The processing time p j = a j We have m = 2 machines. Easy Theorem: there is a solution with makespan = B iff there is a partition of A into two equal parts.  if you solve Makespan fast, you solve Partition fast.  if Partition is hard, Makespan is hard.

E.g. Scheduling Jobs on Machines Input: A set of n jobs, each job j has processing time p j A set of m identical machines Allocate these n jobs to these m machines to minimize the ending time of the last job to finish. (We call this objective function the “makespan”) NP hard!

How do I show that Makespan Minimization is NP-complete? I now know that Makespan Minimization is NP-hard. Show that the problem is itself in NP.

If someone claims the answer is YES, can they convince you in polynomial time that the answer is YES? Being in NP I.e., is there a poly-time checkable “proof” that truly YES instances should pass and none of the NO instances should pass?