Inspiration Versus Perspiration: The P = ? NP Question.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms NP-Complete
Advertisements

Reducibility and NP-Completeness COSC 3101B, PROF. J. ELDER 2 Computational Complexity Theory Computational Complexity Theory is the study of how much.
NP-Hard Nattee Niparnan.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Great Theoretical Ideas in Computer Science.
CS Department Fireside Chat All are welcome! Wed Nov 18, 5-6pm, Ols 228e/236d Kim Hazelwood and Wes Weimer Meet and ask them questions in a non-academic.
NP-Completeness: Reductions
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 21 NP-complete problems
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Great Theoretical Ideas in Computer Science for Some.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Discrete Structures & Algorithms The P vs. NP Question EECE 320.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Graphs 4/16/2017 8:41 PM NP-Completeness.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Analysis of Algorithms CS 477/677
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
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)
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
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.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
P vs NP: what is efficient computation? Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2005 Lecture 29Dec 8, 2005Carnegie Mellon.
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.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
COMPSCI 102 Introduction to Discrete Mathematics.
Announcements Assignment 4: Due Monday, April 5 at Midnight (due to university regulations). Submit solutions to any 2 of the 4 problems. Responsible.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 28Dec 5th, 2006Carnegie Mellon University Complexity Theory: A graph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
28.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
NP-Completeness Note. Some illustrations are taken from (KT) Kleinberg and Tardos. Algorithm Design (DPV)Dasgupta, Papadimitriou, and Vazirani. Algorithms.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
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.
The NP class. NP-completeness
NP-Complete עוד בעיות NP-שלמות.
Richard Anderson Lecture 26 NP-Completeness
UNIT III DYNAMIC PROGRAMMING ALGORITHMS
Introduction to Discrete Mathematics
Some Great Theoretical Ideas in Computer Science for.
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
Intro to Theory of Computation
Great Theoretical Ideas in Computer Science
NP-Completeness Yin Tat Lee
NP-Completeness Yin Tat Lee
More NP-complete problems
Instructor: Aaron Roth
Lecture 23 NP-Hard Problems
Presentation transcript:

Inspiration Versus Perspiration: The P = ? NP Question

Computational Complexity Theory Computational Complexity Theory is the study of how much of a given resource (such as time, space, parallelism, randomness, algebraic operations, communication, or quantum steps) is required to perform the computations that interest us the most.

WORST-CASE TIME We say that a program takes worst-case time T(n), if some input of size n takes T(n) steps, and no input of size n takes longer. The input size is measured in bits, unless stated otherwise.

A Graph Named “Gadget”

K-COLORING A k-coloring of a graph is an assignment of one color to each vertex such that: No more than k colors are usedNo more than k colors are used No two adjacent vertices receive the same colorNo two adjacent vertices receive the same color A graph is called k-colorable iff it has a k-coloring

A CRAYOLA Question! Is Gadget 2-colorable? No, it contains a triangle.

Is Gadget 3-colorable? A CRAYOLA Question! Yes.

Given a graph G, what is a fast algorithm to decide if it can be 2-colored? 2 CRAYOLAS PERSPIRATION; BRUTE FORCE: Try out all 2 n ways of 2 coloring G.

Given a graph G, what is a fast algorithm to decide if it can be 3-colored? 3 CRAYOLAS

K-CLIQUES A K-clique is a set of K nodes with all k(K-1)/2 possible edges between them.

This graph contains a 4-clique

Given an n-node graph G and a number k, how can you decide if G contains a k-clique? PERSPIRATION: Try out all n choose k possible locations for the k clique INSPIRATION: ?

INDEPENDENT SET An independent set is a set of node with no edges between them. This graph contains an independent set of size 3.

Given an n-node graph G and a number k, how can you decide if G contains an independent set of size k? PERSPIRATION: Try out all n choose k possible locations for independent set INSPIRATION: ?

Combinational Circuits AND, OR, NOT, 0, 1 gates wired together with no feedback allowed.

x3x3 x2x2 x1x1 OR AND OR

CIRCUIT-SATISFIABILITY (decision version) Given a circuit with n-inputs and one output, is there a way to assign 0-1 values to the input wires so that the output value is 1 (true)?

CIRCUIT-SATISFIABILITY (search version) Given a circuit with n-inputs and one output, find an assignment of 0-1 values to the input wires so that the output value is 1 (true), or determine that no such assignment exists?

Given a circuit, is it satisfiable? PERSPIRATION: Try out all 2 n assignments INSPIRATION: ?

We have seen 4 problems: coloring, clique, independent set, and circuit SAT. They all have a common story: A large space of possibilities only a tiny fraction of which satisfy the constraints. Brute force takes too long, and no feasible algorithm is known.

CLIQUE / INDEPENDENT SET Two problems that are cosmetically different, but substantially the same

Complement Of G Given a graph G, let G *, the complement of G, be the graph obtained by the rule that two nodes in G * are connected if and only if the corresponding nodes of G are not connected

Let G be an n-node graph. GIVEN: Clique Oracle BUILD: Indep. Set Oracle

Let G be an n-node graph. GIVEN: Indep. Set Oracle BUILD: Clique Oracle

Thus, we can quickly reduce clique problem to an independent set problem and vice versa. There is a fast method for one if and only if there is a fast method for the other.

Given an oracle for circuit SAT, how can you quickly solve 3-colorability?

V n (X,Y) Let V n be a circuit that takes an n-node graph X and an assignment of colors to nodes Y, and verifies that Y is a valid 3 coloring of X. I.e., V n (X,Y)=1 iff Y is a 3 coloring of X. X is expressed as an n choose 2 bit sequence. Y is expressed as a 2n bit sequence. Given n, we can construct V n in time O(n 2 ).

Let G be an n-node graph. GIVEN: SAT Oracle G BUILD: 3- color Oracle V n (G,Y)

Given an oracle for circuit SAT, how can you quickly solve k-clique?

V n,k (X,Y) Let V n be a circuit that takes an n-node graph X and a subset of nodes Y, and verifies that Y is a k-clique X. I.e., V n (X,Y)=1 iff Y is a k- clique of X. X is expressed as an n choose 2 bit sequence. Y is expressed as an n bit sequence. Given n, we can construct V n,k in time O(n 2 ).

Let G be an n-node graph. GIVEN: SAT Oracle BUILD: Clique Oracle V n,k (G,Y)

Given an oracle for 3-colorability, how can you quickly solve circuit SAT?

TF X Y Output

T F X Y XYFFF FTT TFT TTT

T F X Y XYORFFF FTT TFT TTT

TF X NOT gate

OR NOT xy z x y z

OR NOT xy z x y z Satisfiabilty of this circuit = 3-colorability of this graph

Let C be an n-input circuit. GIVEN: 3-color Oracle C BUILD: SAT Oracle Graph composed of gadgets that mimic the gates in C

Formal Statement There is a polynomial-time function f such that: C is satisfiable f(C) is 3 colorable

4 Problems All Equivalent If you can solve one quickly then you can solve them all quickly: Circuit-SATClique Independent Set 3 Colorability