} } } Lecture 23: Computational Complexity. Lecture Overview. Definitions: EXP R. uncomputable/ undecidable P C EXP C R = = Examples

Similar documents
NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

NP and NP Completeness

Design and Analysis of Algorithms

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

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

Turing Machines and Time Complexity

CSC 1700 Analysis of Algorithms: P and NP Problems

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

CMSC 441: Algorithms. NP Completeness

Data Structures in Java

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Lecture 19: Finish NP-Completeness, conp and Friends

NP-Completeness. Until now we have been designing algorithms for specific problems

Algorithm Design and Analysis

NP Complete Problems. COMP 215 Lecture 20

P and NP. Inge Li Gørtz. Thank you to Kevin Wayne, Philip Bille and Paul Fischer for inspiration to slides

NP Completeness and Approximation Algorithms

SAT, NP, NP-Completeness

P and NP. Warm Up: Super Hard Problems. Overview. Problem Classification. Tools for classifying problems according to relative hardness.

The P versus NP Problem. Ker-I Ko. Stony Brook, New York

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

BBM402-Lecture 11: The Class NP

COP 4531 Complexity & Analysis of Data Structures & Algorithms

1 Reductions and Expressiveness

VIII. NP-completeness

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

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

Lecture 4: NP and computational intractability

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

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

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

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

Algorithms. Grad Refresher Course 2011 University of British Columbia. Ron Maharik

CSCI3390-Lecture 14: The class NP

Limitations of Algorithm Power

Intro to Theory of Computation

No Harder Than. We want these transformations to effectively be a problem-hardness version of #, which we will call No Harder Than.

Algorithms Design & Analysis. Approximation Algorithm

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

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

CS 583: Algorithms. NP Completeness Ch 34. Intractability

Tractable & Intractable Problems

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18

Computational Complexity

Polynomial-Time Reductions

P,NP, NP-Hard and NP-Complete

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

NP-Completeness. ch34 Hewett. Problem. Tractable Intractable Non-computable computationally infeasible super poly-time alg. sol. E.g.

Polynomial-time Reductions

15.083J/6.859J Integer Optimization. Lecture 2: Efficient Algorithms and Computational Complexity

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

Lecture 20: conp and Friends, Oracles in Complexity Theory

Week 2: Defining Computation

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

NP-Complete and Non-Computable Problems. COMP385 Dr. Ken Williams

CSE 548: (Design and) Analysis of Algorithms

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

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam

Computability and Complexity Theory: An Introduction

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm

P, NP, and Beyond. Hengfeng Wei. May 01 May 04, Hengfeng Wei P, NP, and Beyond May 01 May 04, / 29

P, NP, NP-Complete, and NPhard

A Working Knowledge of Computational Complexity for an Optimizer

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?

Lecture 18: P & NP. Revised, May 1, CLRS, pp

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

Essential facts about NP-completeness:

Computational Complexity

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

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal?

CS 350 Algorithms and Complexity

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

The Complexity Classes P and NP. Andreas Klappenecker [partially based on slides by Professor Welch]

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

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

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

Analysis of Algorithms. Unit 5 - Intractable Problems

Computational Complexity

NP-completeness. Chapter 34. Sergey Bereg

INTRO TO COMPUTATIONAL COMPLEXITY

NP-Complete problems

NP-Complete Problems. More reductions

Computational complexity

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Complexity Theory Part II

NP-Completeness Theory

CS 350 Algorithms and Complexity

Algorithm Design and Analysis

The Beauty and Joy of Computing

Data Structures in Java. Session 22 Instructor: Bert Huang

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

Algorithm Design and Analysis

1 Computational Problems

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

NP-Completeness. NP-Completeness 1

Introduction to Complexity Theory

Transcription:

Lecture 23 Computational Complexity 6.006 Fall 2011 Lecture 23: Computational Complexity Lecture Overview P, EXP, R Most problems are uncomputable NP Hardness & completeness Reductions Definitions: P = {problems solvable in polynomial (n c ) time} (what this class is all about) EXP = {problems solvable in exponential (2 nc ) time} R = {problems solvable in finite time} recursive [Turing 1936; Church 1941] P } } } EXP R uncomputable/ undecidable P C EXP C R = = computational difficulty Examples negative-weight cycle detection P n n Chess EXP but / P Who wins from given board configuration? Tetris EXP but don t know whether P Survive given pieces from given board. 1

Lecture 23 Computational Complexity 6.006 Fall 2011 Halting Problem: Given a computer program, does it ever halt (stop)? uncomputable ( / R): no algorithm solves it (correctly in finite time on all inputs) decision problem: answer is YES or NO Most Decision Problems are Uncomputable program binary string nonneg. integer N decision problem = a function from binary strings ( nonneg. integers) to {YES (1), NO (0)} infinite sequence of bits real number R N R : no assignment of unique nonneg. integers to real numbers (R uncountable) = not nearly enough programs for all problems each program solves only one problem = almost all problems cannot be solved NP NP = {Decision problems solvable in polynomial time via a lucky algorithm}. The lucky algorithm can make lucky guesses, always right without trying all options. nondeterministic model: algorithm makes guesses & then says YES or NO guesses guaranteed to lead to YES outcome if possible (no otherwise) In other words, NP = {decision problems with solutions that can be checked in polynomial time}. This means that when answer = YES, can prove it & polynomial-time algorithm can check proof Example Tetris NP nondeterministic algorithm: guess each move, did I survive? proof of YES: list what moves to make (rules of Tetris are easy) 2

Lecture 23 Computational Complexity 6.006 Fall 2011 } } } } P NP EXP R computational difficulty uncomputable/ undecidable P = NP Big conjecture (worth $1,000,000) cannot engineer luck generating (proofs of) solutions can be harder than checking them Hardness and Completeness Claim: If P = NP, then Tetris NP - P [Breukelaar, Demaine, Hohenberger, Hoogeboom, Kosters, Liben-Nowell 2004] Why: Tetris is NP-hard = as hard as every problem NP. In fact NP-complete = NP NPhard. EXP-complete NP-complete } } } } P NP EXP Tetris R } } NP-hard EXP-hard Chess computational difficulty uncomputable/ undecidable 3

Lecture 23 Computational Complexity 6.006 Fall 2011 Similarly Chess is EXP-complete = EXP EXP-hard. EXP-hard is as hard as every problem in EXP. If NP = EXP, then Chess / EXP \ NP. Whether NP = EXP is also an open problem but less famous/ important. Reductions Convert your problem into a problem you already know how to solve (instead of solving from scratch) most common algorithm design technique unweighted shortest path weighted (set weights = 1) min-product path shortest path (take logs) [PS6-1] longest path shortest path (negate weights) [Quiz 2, P1k] shortest ordered tour shortest path (k copies of the graph) [Quiz 2, P5] cheapest leaky-tank path shortest path (graph reduction) [Quiz 2, P6] All the above are One-call reductions: A problem B problem B solution A solution Multicall reductions: solve A using free calls to B in this sense, every algorithm reduces problem model of computation NP-complete problems are all interreducible using polynomial-time reductions (same difficulty). This implies that we can use reductions to prove NP-hardness such as in 3-Partition Tetris Examples of NP-Complete Problems Knapsack (pseudopoly, not poly) 3-Partition: given n integers, can you divide them into triples of equal sum? Traveling Salesman Problem: shortest path that visits all vertices of a given graph decision version: is minimum weight x? longest common subsequence of k strings Minesweeper, Sudoku, and most puzzles SAT: given a Boolean formula (and, or, not), is it ever true? x and not x NO shortest paths amidst obstacles in 3D 4

Lecture 23 Computational Complexity 6.006 Fall 2011 3-coloring a given graph find largest clique in a given graph 5

MIT OpenCourseWare http://ocw.mit.edu 6.006 Introduction to Algorithms Fall 2011 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.