CSE 105 THEORY OF COMPUTATION

Similar documents
NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

CSE 105 THEORY OF COMPUTATION

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

NP-Complete Reductions 1

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Intro to Theory of Computation

Essential facts about NP-completeness:

Chapter 34: NP-Completeness

CS21 Decidability and Tractability

P vs. NP. Data Structures and Algorithms CSE AU 1

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Polynomial-time Reductions

1. Introduction Recap

NP Complete Problems. COMP 215 Lecture 20

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

NP Completeness. Richard Karp, 1972.

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes:

CSC 373: Algorithm Design and Analysis Lecture 15

NP and Computational Intractability

Algorithm Design and Analysis

10.3: Intractability. Overview. Exponential Growth. Properties of Algorithms. What is an algorithm? Turing machine.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Correctness of Dijkstra s algorithm

CSE 135: Introduction to Theory of Computation NP-completeness

Algorithm Design and Analysis

Nondeterministic Turing Machines

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

7.8 Intractability. Overview. Properties of Algorithms. Exponential Growth. Q. What is an algorithm? A. Definition formalized using Turing machines.

Polynomial-Time Reductions

Polynomial-time reductions. We have seen several reductions:

Design and Analysis of Algorithms

NP-Completeness. Sections 28.5, 28.6

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

NP-completeness. Chapter 34. Sergey Bereg

A difficult problem. ! Given: A set of N cities and $M for gas. Problem: Does a traveling salesperson have enough $ for gas to visit all the cities?

NP Completeness and Approximation Algorithms

Intractability. A difficult problem. Exponential Growth. A Reasonable Question about Algorithms !!!!!!!!!! Traveling salesperson problem (TSP)

NP and NP Completeness

Limits of Computation. Antonina Kolokolova

CS154, Lecture 13: P vs NP

Computational Complexity

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

NP-Complete Reductions 2

Algorithms and Theory of Computation. Lecture 19: Class P and NP, Reduction

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

CS21 Decidability and Tractability

Show that the following problems are NP-complete

Algorithms. Sudoku. Rubik s cube. Evaluating how good (how efficient) an algorithm is 3/4/17. Algorithms, complexity and P vs NP SURVEY

Theory of Computer Science. Theory of Computer Science. E4.1 Overview E4.2 3SAT. E4.3 Graph Problems. E4.4 Summary.

Lecture 19: Finish NP-Completeness, conp and Friends

The Cook-Levin Theorem

SAT, NP, NP-Completeness

CSL 356: Analysis and Design of Algorithms. Ragesh Jaiswal CSE, IIT Delhi

Lecture 4: NP and computational intractability

NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper.

$1,000,000. P vs. NP. the prize for solving any of the Millennium Prize Problems. Millennium Prize Problems. Millennium Prize Problems

BBM402-Lecture 11: The Class NP

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20

Minesweeper is NP-Complete

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

NP-Completeness. NP-Completeness 1

NP and Computational Intractability

11. Tractability and Decidability

CS 561, Lecture 12. Jared Saia University of New Mexico

CSE 105 THEORY OF COMPUTATION

Agenda. What is a complexity class? What are the important complexity classes? How do you prove an algorithm is in a certain class

Applied Computer Science II Chapter 7: Time Complexity. Prof. Dr. Luc De Raedt. Institut für Informatik Albert-Ludwigs Universität Freiburg Germany

8.1 Polynomial-Time Reductions. Chapter 8. NP and Computational Intractability. Classify Problems

CS154, Lecture 13: P vs NP

NP-Completeness. Dr. B. S. Panda Professor, Department of Mathematics IIT Delhi, Hauz Khas, ND-16

Non-Deterministic Time

A Working Knowledge of Computational Complexity for an Optimizer

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness

Giving a step-by-step reduction from SAT to TSP and giving some remarks on Neil Tennant's Changes of Mind

7.8: Intractability. Overview. Exponential Growth. Properties of Algorithms. What is an algorithm? Turing machine.

Limitations of Algorithm Power

Theory of Computer Science

Introduction to Complexity Theory

Lecture 18: More NP-Complete Problems

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

NP-Completeness Part One

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

15-451/651: Design & Analysis of Algorithms October 31, 2013 Lecture #20 last changed: October 31, 2013

NP-Complete Problems. More reductions

CS 6505, Complexity and Algorithms Week 7: NP Completeness

CISC 4090 Theory of Computation

Approximation Preserving Reductions

There are two types of problems:

Theory of Computer Science. Theory of Computer Science. E3.1 Overview. E3.2 Cook-Levin Theorem E3.3 3SAT. E3.4 Summary. Further Reading (German)

NP-Completeness. Algorithmique Fall semester 2011/12

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

NP-Completeness. Subhash Suri. May 15, 2018

SAT, Coloring, Hamiltonian Cycle, TSP

Transcription:

CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/

Today's learning goals Sipser Ch 7 Define NP-completeness Give examples of NP-complete problems Use polynomial-time reduction to prove NP-completeness Section 7.4, 7.5: NP-completeness

Decidable Decidable P = NP NP or P Finite Finite

P vs. NP Problems in P (Membership in any) CFL PATH E DFA EQ DFA Addition, multiplication of integers Problems in NP Any problem in P HAMPATH CLIQUE VERTEX-COVER TSP SAT

How to answer P = NP?

Reductions to the rescue Sipser p. 299-305 1970s Stephen Cook and Leonid Levin independently and in parallel lay foundations of NP-completeness Definition A language B is NP-complete if (1) it is in NP and (2) every A in NP is polynomial-time reducible to it. Consequence If an NP-complete problem has a polynomial time solution then all NP problems are polynomial time solvable. Cook-Levin Theorem: 3-SAT is NP-complete.

What would prove that P = NP? 1970s Stephen Cook and B. Leonid Showing Levin that there indepdendently are two distinct and NP-in parallel lay foundations of NP-completeness problems. Definition A language B is NP-complete if (1) it is in NP and (2) every A in NP is polynomial-time solvable in reducible polynomial to time. it. Consequence If an NP-complete problem has a polynomial time solution then all NP problems are polynomial time solvable. Cook-Levin Theorem: 3-SAT is NP-complete Reductions to the rescue A. Showing that a problem solvable Sipser by p. 271,276 bruteforce methods has a nondeterministic solution. C. Finding a polynomial time solution for an NPcomplete problem. D. Proving that an NP-complete problem is not E. I don't know

Are other problems NP complete? To prove that X is NP-complete From scratch: Prove it is NP, and that all NP problems are polynomial-time reducible to it. Using reduction: Show that a (known-to-be) NP complete problem reduces to it.

3SAT polynomial-time reduces to CLIQUE Sipser p. 302 Given: Boolean formula in CNF with exactly 3 literals/clause - AND of ORs - args in OR clauses: var or negated var Desired Answer: Yes if satisfiable; No if unsatisfiable Instead transform formula to graph so that graph has clique iff original formula is satisfiable

3SAT polynomial-time reduces to CLIQUE Transform 3-CNF formula with k clauses to graph G vertices are the literals in each clause edges between all vertices except two literals in the same clause literals that are negations of one another Claim: formula is satisfiable iff G has k-clique

3SAT reduces to Clique example x y z x y z x y z

3SAT reduces to Clique example x y z x y z x y z

Brief history The famous logician Kurt Godel asked the famous computer scientist, mathematician, and economist John von Neumann the P vs. NP question in a private letter, written shortly before von Neumann s death.

in the soviet union S.V. Yablonksi invents the term ``perebor or ``brute force search to describe the combinatorial explosion limiting algorithms, especially for circuit design problems (1959)

Matchings and P vs np In 1965, Jack Edmonds gives the first polynomial time algorithm for perfect matching on general graphs. To explain the significance to referees, he introduces a section defining P, NP and posing the P vs. NP question.

NP-completeness In 1971, Steve Cook defines NP-completeness and proves that several problems from logic and combinatorics are NP-complete, Meaning that P=NP If and only if any of These problems are polynomial time solvable.

Plethora of Np-complete problems Following Cook s work, Richard Karp showed that a large number of the most Important optimization problems from all sub-areas (scheduling, graph theory, Number theory, logic, Puzzles and games, packing, Coding, ) are NP-complete

Back in the ussr Leonid Levin, a student of Kolmogorov s, publishes similar results to Cook and Karp s in his thesis, but needs to be careful to disguise what he s claiming, since it might be interpreted as Questioning earlier work on perebor.

Garey and johnson Garey and Johnson s classic Textbook (1979) includes an Appendix listing hundreds of NP-complete problems

NP-complete problems everywhere Since then, thousands of NP-complete Problems have been identified in pretty much any area With computational Problems- physics, biology, chemistry Economics, sociology, linguistics, games, Engineering,..

Some of our favorites Sudoku

Tetris

Candy Crush

Minesweeper

Next time Pre-class reading skim Chapter 7