Computer Science. 16. Intractability. 16. Intractability. Computer Science. Reasonable questions. P and NP Poly-time reductions NP-completeness

Similar documents
COMPUTER SCIENCE. Computer Science. 16. Intractability. Computer Science. An Interdisciplinary Approach. Section 7.4.

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?

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

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

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

Algorithm Design and Analysis

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

Algorithm Design and Analysis

4/22/12. NP and NP completeness. Efficient Certification. Decision Problems. Definition of P

4/19/11. NP and NP completeness. Decision Problems. Definition of P. Certifiers and Certificates: COMPOSITES

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

3/22/2018. CS 580: Algorithm Design and Analysis. Circuit Satisfiability. Recap. The "First" NP-Complete Problem. Example.

CS 580: Algorithm Design and Analysis

3/22/2018. CS 580: Algorithm Design and Analysis. 8.3 Definition of NP. Chapter 8. NP and Computational Intractability. Decision Problems.

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Announcements. Analysis of Algorithms

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Chapter 8. NP and Computational Intractability. CS 350 Winter 2018

COP 4531 Complexity & Analysis of Data Structures & Algorithms

NP and Computational Intractability

SAT, NP, NP-Completeness

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

INTRACTABILITY BBM ALGORITHMS TODAY DEPT. OF COMPUTER ENGINEERING ERKUT ERDEM. May. 14, A simple model of computation: DFAs

Reductions. Reduction. Linear Time Reduction: Examples. Linear Time Reductions

NP and NP Completeness

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

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

CS 583: Algorithms. NP Completeness Ch 34. Intractability

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

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Data Structures in Java

Design and Analysis of Algorithms

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

Limitations of Algorithm Power

Introduction to Complexity Theory

CS/COE

NP Completeness and Approximation Algorithms

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

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

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

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

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity

Algorithms 6.5 REDUCTIONS. designing algorithms establishing lower bounds classifying problems intractability

Lecture 4: NP and computational intractability

Analysis of Algorithms. Unit 5 - Intractable Problems

Approximation and Randomized Algorithms (ARA) Lecture 2, September 1, 2010

Polynomial-Time Reductions

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

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

NP Complete Problems. COMP 215 Lecture 20

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

P,NP, NP-Hard and NP-Complete

Problem Complexity Classes

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

Lecture 24: How to become Famous with P and NP

Problems and Solutions. Decidability and Complexity

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

CSE 105 THEORY OF COMPUTATION

ECS122A Handout on NP-Completeness March 12, 2018

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

Computational Complexity

Intro to Theory of Computation

Lecture 5: Computational Complexity

Principles of Computing, Carnegie Mellon University. The Limits of Computing

1. Introduction Recap

Correctness of Dijkstra s algorithm

Tractable & Intractable Problems

What is the computational cost of automating brilliance or serendipity? (Computational complexity & P vs NP) COS 116, Spring 2010 Adam Finkelstein

Algorithms Design & Analysis. Approximation Algorithm

P, NP, NP-Complete, and NPhard

The P-vs-NP problem. Andrés E. Caicedo. September 10, 2011

Essential facts about NP-completeness:

1 Computational problems

Limits of Computation. Antonina Kolokolova

Great Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity

Computer Science. Questions for discussion Part II. Computer Science COMPUTER SCIENCE. Section 4.2.

CS 6901 (Applied Algorithms) Lecture 3

NP completeness and computational tractability Part II

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

CMSC 441: Algorithms. NP Completeness

6-1 Computational Complexity

Lecture 19: Finish NP-Completeness, conp and Friends

Computational Complexity

What is the computational cost of automating brilliance or serendipity? (P vs NP question and related musings) COS 116: 4/12/2006 Adam Finkelstein

Turing Machines and Time Complexity

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

P, NP, NP-Complete. Ruth Anderson

COSE215: Theory of Computation. Lecture 21 P, NP, and NP-Complete Problems

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

Polynomial-time Reductions

Computational complexity theory

Chapter 34: NP-Completeness

Algorithm Design and Analysis

13.1 Nondeterministic Polynomial Time

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

CSCI3390-Lecture 14: The class NP

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

CSC 1700 Analysis of Algorithms: P and NP Problems

Transcription:

PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y Computer Science 6. Intractability Computer Science Reasonable questions 6. Intractability P and NP Poly-time reductions NP-completeness An Interdisciplinary Approach Section 7.4 Living with intractability ROBERT SEDGEWICK K E V I N WAY N E http://introcs.cs.princeton.edu CS.6.A.Intractability.Questions Context A difficult problem Traveling salesperson problem (TSP) Fundamental questions What is a general-purpose computer? Are there limits on what we can do with digital computers? Are there limits on what we can do with the machines we can build? Kurt Gödel 99 994 John Nash Asked the question Asked the question in a "lost letter" to in a "lost letter" to von Neumann the NSA Michael Rabin Dana Scott Introduced the critical concept of nondeterminism Dick Karp Given: A set of N cities, distances between each pair of cities, and a threshold M. Problem: Is there a tour through all the cities of length less than M? focus of today's lecture Steve Cook Leonid Levin Asked THE question Answer still unknown Exhaustive search. Try all N! orderings of the cities to look for a tour of length less than M. 3 4

How difficult can it be? How difficult can it be? Excerpts from a recent blog... Imagine an UBERcomputer (a giant computing device) With as many processors as electrons in the universe Each processor having the power of today's supercomputers Each processor working for the lifetime of the universe If one took the largest cities in the US and wanted to travel them all, what is the distance of the shortest route? I'm sure there's a simple answer. Anyone wanna help? A quick google revealed nothing. I don't think there's any substitute for doing it manually. Google the cities, then pull out your map and get to work. It shouldn't take longer than an hour. Edit: I didn't realize this was a standardized problem. Writing a program to solve the problem would take 5 or minutes for an average programmer. However, the amount of time the program would need to run is, well, a LONG LONG LONG time. My Garmin could probably solve this for you. Edit: probably not. quantity value (conservative estimate) electrons in universe 79 supercomputer instructions per second 3 age of universe in seconds 7 Q. Could the UBERcomputer solve the TSP for cities with the brute force algorithm? Someone needs to write a distributed computing program to solve this IMO. A. Not even close.! > 57 >> 7937 = 9 Would need 48 UBERcomputers Lesson. Exponential growth dwarfs technological change. 5 Reasonable questions about algorithms 6 Reasonable questions about problems Q. Which algorithms are useful in practice? Q. Which problems can we solve in practice? A. Those for which we know efficient (guaranteed poly-time) algorithms. Model of computation Running time: Number of steps as a function of input size N. Definition. A problem is intractable if no efficient algorithm exists to solve it. Poly-time: Running time less than anb for some constants a and b. Definitely not poly-time: Running time ~cn for any constant c >. Specific computer generally not relevant (simulation uses only a polynomial factor). "Extended Church-Turing thesis" (stay tuned) Q. Is there an easy way to tell whether a problem is intractable? A. Good question! Focus of today's lecture. Def (in the context of this lecture). An algorithm is efficient if it is poly-time for all inputs. outside this lecture: "guaranteed polynomial time" or just "poly-time" Q. Can we find efficient algorithms for the practical problems that we face? 7 Existence of a faster algorithm like mergesort is not relevant to this discussion Example : Sorting. Not intractable. (Insertion sort takes time proportional to N 2.) Example 2: TSP.??? (No efficient algorithm known, but no proof that none exists.) 8

Four fundamental problems Reasonable questions LSOLVE Solve simultaneous linear equations. Variables are real numbers. LP Solve simultaneous linear inequalities. Variables are real numbers. Solve simultaneous linear inequalities. Variables are or. Solve simultaneous boolean sums. Variables are true or false. Example of an x + x2 = 2x + 4x 2x2 =.5 3x + 5x2 = 9 48x + 6x + 9x2 88 5x + 4x + 35x2 3 5x 4x + 2x2 23 x, x, x2 x + x2 x + x2 x + x + x2 2 x x2 = true x x x2 = true x x2 = true A x =.25 x =.5 x2 =.5 x = x = x2 =.2 x = x = x2 = x = false x = true x2 = true LSOLVE, LP,, and are all important problemsolving models with countless practical applications. Q. Do we have efficient algorithms for solving them? A. Difficult to discern, despite similarities (!)?? LSOLVE. Yes. LP. Yes. appropriate version of Gaussian elimination Ellipsoid algorithm (tour de force ) IP. No polynomial-time algorithm known.. No polynomial-time algorithm known. Q. Can we find efficient algorithms for IP and? Q. Can we prove that no such algorithms exist? LSOLVE Solve simultaneous linear equations. Variables are real numbers. LP Solve simultaneous linear inequalities. Variables are real numbers. Solve simultaneous linear inequalities. Variables are or. Solve simultaneous boolean sums. Variables are true or false. 9 Intractability Another profound connection to the real world Definition. An algorithm is efficient if it is poly-time for all inputs. Definition. A problem is intractable if no efficient algorithm exists to solve it. Definition. A problem is tractable if it solvable by an efficient algorithm. Turing taught us something fundamental about computation by Identifying a problem that we might want to solve. Showing that it is not possible to solve it. A reasonable question: Can we do something similar for intractability? decidable : undecidable :: tractable : intractable Q. We do not know efficient algorithms for a large class of important problems. Can we prove one of them to be intractable? Extended Church-Turing thesis. Resources used by all reasonable machines are within a polynomial factor of one another. Remarks A thesis, not a theorem. Not subject to proof. Is subject to falsification. Implications Validates exponential/polynomial divide. Enables rigorous study of efficiency. New model of computation or new physical process? Use simulation to prove polynomial bound. Example: TOY simulator in Java (see TOY lectures). Example: Java compiler in TOY. = NO = YES HALT...... 2

PART II: ALGORITHMS, MACHINES, and THEORY Image sources http://en.wikipedia.org/wiki/david_hilbert#/media/file:hilbert.jpg http://www.nobelprize.org/nobel_prizes/economic-sciences/laureates/994/nash-bio.html http://en.wikipedia.org/wiki/michael_o._rabin#/media/file:michael_o._rabin.jpg http://www.google.com/imgres?imgurl=http://www.cmu.edu/news/image-archive/dana_scott.jpg http://en.wikipedia.org/wiki/richard_m._karp#/media/file:karp_mg_7725-b.cr2.jpg http://en.wikipedia.org/wiki/stephen_cook#/media/file:prof.cook.jpg 6. Intractability Reasonable questions P and NP Poly-time reductions NP-completeness Living with intractability CS.6.A.Intractability.Questions CS.6.B.Intractability.PandNP Search problems Search problem. Any problem for which an efficient algorithm exists to certify s. NP Definition. NP is the class of all search problems. Example: TSP. problem description I S algorithm TSP ( S, M ) Find a tour of cities in S of length < M Add up distances and check that the total is less than M ( A, b ) Find a binary vector x that satisfies Ax b plug in values and check each equation Problem : Set of cities, pairwise distances, and threshold M. Certify by adding distances and checking that the total is less than M ( A, b ) FACTOR ( M ) Find a boolean vector x that satisfies Ax = b Find a nontrivial factor of the integer M plug in values and check each equation 4757395258967642927 937772 long division Solution: Permutation of the cities. 5 Significance. Problems that scientists, engineers, and applications programmers aspire to solve. 6

Brute force search P Brute-force search. Given a search problem, find a by checking all possibilities. Definition. P is the class of all tractable search problems. solvable by an efficient (guaranteed poly-time) algorithm problem description N (size) number of possibilities problem description efficient algorithm TSP ( S, M ) Find a tour of cities in S of length < M number of cities N! SORT ( S ) Find a permutation that puts the items in S in order Insertion sort, Mergesort ( A, b ) Find a binary vector x that satisfies Ax b number of variables 2 N 3-SUM ( S ) Find a triple in S that sums to Triple loop LSOLVE ( A, b ) Find a vector x that satisfies Ax = b Gaussian elimination* (, b ) Find a boolean vector x that satisfies Ax = b number of variables 2 N LP ( A, b ) Find a vector x that satisfies Ax b Ellipsoid FACTOR ( x ) Find a nontrivial factor of the integer M number of digits in M N Significance. Problems that scientists, engineers and applications programmers do solve. Challenge. Brute-force search is easy to implement, but not efficient. Note. All of these problems are also in NP. 7 8 Types of problems Search problem. Find a. Decision problem. Does there exist a? Optimization problem. Find the best. Some problems are more naturally formulated in one regime than another. The central question NP. Class of all search problems, some of which seem solvable only by brute force. P. Class of search problems solvable in poly-time. The question: Is P = NP? P NP P = NP Example: TSP is usually formulated as an optimization problem. "Find the shortest tour connecting all the cities." Intractable search problems exist. Brute force search may be the best we can do for some problems. NP All search problems are tractable. Efficient algorithms exist for IP,, FACTOR... all problems in NP. P Intractable problems P = NP The regimes are not technically equivalent, but conclusions that we draw apply to all three. Note. Classic definitions of P and NP are in terms of decision problems. Frustrating situation. Researchers believe that P NP but no one has been able to prove it (!!) 9 2

Nondeterminism: another way to view the situation Creativity: another way to view the situation A nondeterministic machine can choose among multiple options at each step and can guess the option that leads to the. Creative genius versus ordinary appreciation of creativity. Example: Java. either x[] = ; or x[] = ; either x[] = ; or x[] = ; either x[2] = ; or x[2] = ; Seems like a fantasy, but... solves Example: Turing #: two choices : L : Examples Mozart composes a piece of music; the audience appreciates it. Wiles proves a deep theorem; a colleague checks it. Boeing designs an efficient airfoil; a simulator verifies it. Einstein proposes a theory; an experimentalist validates it. Creative genius P NP P = NP Intractable search problems exist. Nondeterministic machines would admit efficient algorithms. No intractable search problems exist. Nondeterministic machines would be of no help! Frustrating situation. No one has been able to prove that nondeterminism would help (!!) Computational analog. P vs NP. Ordinary appreciation Frustrating situation. No one has been able to prove that creating a to a problem is more difficult than checking that it is correct. 2 22 PART II: ALGORITHMS, MACHINES, and THEORY Image sources http://www.imdb.com/name/nm562/ http://en.wikipedia.org/wiki/wolfgang_amadeus_mozart#/media/file:wolfgang-amadeus-mozart_.jpg 9. Intractability Reasonable questions P and NP Poly-time reductions NP-completeness Living with intractability CS.6.B.Intractability.PandNP CS.6.C.Intractability.Reductions

Classifying problems Poly-time reduction Q. Which problems are in P? A. The ones that we're solving with efficient algorithms. Q. Which problems are intractable (in NP but not in P)? A. Difficult to know (no one has found even one such problem). Possible starting point: Assume that is intractable (and hence P NP) Brute-force algorithm finds for any. No known efficient algorithm does so. A reasonable assumption. Next. Proving relationships among problems. Can I solve it on my cellphone or do I need 48 UBERcomputers?? Definition. Problem X poly-time reduces to problem Y if you can use an efficient to Y to develop an efficient to X. Typical reduction: Given an efficient to Y, solve X by Using an efficient method to transform the of X to an. Calling the efficient method that solves Y. Using an efficient method to transform the to an of X. Similar to using a library method in modular programming. of X Method for solving X input Method for solving Y result X Y of X Q. If P NP and is intractable, which other problems are intractable? Note. Many ways to extend. (Example: Use a polynomial number of s.) 25 26 Key point: poly-time reduction is transitive Two ways to exploit reduction If X poly-time reduces to Y and Y poly-time reduces to Z, then X poly-time reduces to Z. Method for solving X Method for solving Y If X Y and Y Z then X Z of X input result to X of X Method for solving X input Method for solving Y result of X To design an algorithm to solve a new problem X Find a problem Y with a known efficient algorithm that solves it. Poly-time reduce X to Y. The efficient algorithm for Y gives an efficient algorithm for X. Not emphasized in this lecture. Interested in details? Take a course in algorithms. Method for solving Y input of Z Method for solving Z of Z result To establish intractability of a new problem Y (assuming is intractable) Find a problem X with a known poly-time reduction from. Poly-time reduce X to Y. An efficient algorithm for Y would imply an efficient algorithm for X (and ). Critical tool for this lecture. 27 Easiest option: Just reduce to Y (next) 28

Example: poly-time reduces to More poly-time reductions from Solve simultaneous boolean sums. Variables are true or false Solve simultaneous linear inequalities. Variables are or. 3-COLOR VERTEX COVER x x x2 = true x x x2 = true x x x2 = true x x x3 = true An of x = false x = true x2 = true x3 = false A Implication. If is intractable, so is. ( t) + t + t2 t + ( t) + t2 ti = iff xi = false ( t) + ( t) + ( t2) ti = iff xi = true ( t) + ( t) + t3 Poly-time reduction to an of t = t = t2 = t3 = A EXACT COVER SUBSET SUM PARTITION KNAPSACK BIN PACKING CLIQUE INDEPENDENT SET HAMILTON CYCLE TSP Reasonable assumption. is intractable. Dick Karp 985 Turing Award Implication. All of these problems are intractable. 29 3 Still more poly-time reductions from field of study typical problem known to be intractable if is intractable Aerospace engineering Optimal mesh partitioning for finite elements Biology Phylogeny reconstruction Chemical engineering Heat exchanger network synthesis Chemistry Protein folding Civil engineering Equilibrium of urban traffic flow Economics Computation of arbitrage in financial markets with friction Electrical engineering VLSI layout Environmental engineering Optimal placement of contaminant sensors Financial engineering Minimum risk portfolio of given return Game theory Nash equilibrium that maximizes social welfare Mechanical engineering Structure of turbulence in sheared flows Medicine Reconstructing 3d shape from biplane angiocardiogram Operations research Traveling salesperson problem, integer programming Physics Partition function of 3d Ising model Politics Shapley-Shubik voting power Pop culture Versions of Sudoko, Checkers, Minesweeper, Tetris Statistics Optimal experimental design 6,+ scientific papers per year. Reasonable assumption. is intractable. Implication. All of these problems are intractable. 3 CS.6.C.Intractability.Reductions

PART II: ALGORITHMS, MACHINES, and THEORY NP-completeness Definition. An NP problem is NP-complete if all problems in NP poly-time reduce to it. Theorem (Cook; Levin, 97). is NP-complete. 9. Intractability Reasonable questions P and NP Poly-time reductions NP-completeness Living with intractability Extremely brief proof sketch Convert non-deterministic TM notation to notation. An efficient to gives an efficient to any problem in NP. Nondeterministic Turing machine Corollary. is tractable if and only if P = NP. CS.6.D.Intractability.NPcomplete Equivalent. Assuming that is intractable is the same as assuming that P NP. 34 Cook-Levin theorem Karp + Cook-Levin 3-COLOR VERTEX COVER 3-COLOR VERTEX COVER Steve Cook Leonid Levin Dick Karp Steve Cook Leonid Levin 982 Turing Award EXACT COVER CLIQUE HAMILTON CYCLE EXACT COVER CLIQUE HAMILTON CYCLE SUBSET SUM INDEPENDENT SET TSP SUBSET SUM INDEPENDENT SET TSP PARTITION PARTITION All of these problems are NP-complete. KNAPSACK BIN PACKING All problems in NP poly-time reduce to. KNAPSACK BIN PACKING A provably efficient algorithm for any one of them would yield a provably efficient algorithm for all of them 35 36

Two possible universes P NP Intractable search problems exist. Nondeterminism would help. Computing an answer is more difficult than correctly guessing it. Can prove a problem to be intractable by poly-time reduction from an NP-complete problem. P = NP No intractable search problems exist. Nondeterminism is no help. Finding an answer is just as easy as correctly guessing an answer. Guaranteed poly-time algorithms exist for all problems in NP. Summary NP. Class of all search problems, some of which seem solvable only by brute force. P. Class of search problems solvable in poly-time. NP-complete. "Hardest" problems in NP. Intractable. Search problems not in P (if P NP). TSP,,, and thousands of other problems are NP-complete. NP P NP-complete P = NP = NPC Frustrating situation. No progress on resolving the question despite 4+ years of research. Use theory as a guide An efficient algorithm for an NP-complete problem would be a stunning scientific breakthrough (a proof that P = NP) You will confront NP-complete problems in your career. It is safe to assume that P NP and that such problems are intractable. Identify these situations and proceed accordingly. 37 38 Princeton CS building, west wall Princeton CS building, west wall (closeup) char ASCII binary P 8 = 6 N 78 P 8? 63 39 4

PART II: ALGORITHMS, MACHINES, and THEORY 6. Intractability Reasonable questions P and NP Poly-time reductions NP-completeness Living with intractability CS.6.D.Intractability.NPcomplete CS.6.E.Intractability.Living Living with intractability When you encounter an NP-complete problem It is safe to assume that it is intractable. What to do? Living with intractability: Don't try to solve intractable problems Knows no theory Four successful approaches Don't try to solve intractable problems. Try to solve real-world problem s. Look for approximate s (not discussed in this lecture). Exploit intractability. I can't find an efficient algorithm. I guess I'm just to dumb. Knows computability Knows intractability I can't find an efficient algorithm, because no such algorithm is possible! 43 I can't find an efficient algorithm, but neither can all these famous people! 44

Understanding intractability: An example from statistical physics 926: Ising introduces a mathematical model for ferromagnetism. 93s: Closed form is a holy grail of statistical mechanics. Living with intractability: look for s to real-world problem s Observations Worst-case inputs may not occur for practical problems. Instances that do occur in practice may be easier to solve. Reasonable approach: relax the condition of guaranteed poly-time algorithms. 944: Onsager finds closed form to 2D version in tour de force. 95s: Feynman and others seek closed form to 3D version. 2: Istrail shows that 3D-ISING is NP-complete. Chaff solves real-world s with,+ variables. Princeton senior independent work (!) in 2. TSP Concorde routinely solves large real-world s. 85,9-city solved in 26. TSP for 3,59 US cities Bottom line. Search for a closed formula seems futile. CPLEX routinely solves large real-world s. Routinely used in scientific and commercial applications. 45 46 Exploiting intractability: RSA cryptosystem Exploiting intractability: RSA cryptosystem Modern cryptography applications Electronic banking. Credit card transactions with online merchants. Secure communications. [very long list] RSA cryptosystem exploits intractability To use: Multiply/divide two N-digit integers (easy). To break: Factor a 2N-digit integer (intractable?). Ron Rivest Adi Shamir Len Adelman RSA cryptosystem exploits intractability To use: Multiply/divide two N-digit integers (easy). To break: Solve FACTOR for a 2N-digit integer (difficult). Example: Factor this 22-digit integer 743756347956728284679697429573425938888923289 8493623263897276534282662768999649625784399589 43352275853789689828673373273893955255 68776329972396387867869696253793465563796359 Q. Would an efficient algorithm for FACTOR prove that P = NP? Multiply (easy) A. Unknown. It is in NP, but no reduction from is known. equivalent statement: "FACTOR is not known to be NP-complete" 76838257287 * 937772 4757395258967642927 Q. Is it safe to assume that FACTOR is intractable? A. Maybe, but not as safe an assumption as for an NP-complete problem. Factor (difficult) 47 48

Fame and fortune through intractability Factor this 22-digit integer A final thought 743756347956728284679697429573425938888923289 8493623263897276534282662768999649625784399589 43352275853789689828673373273893955255 68776329972396387867869696253793465563796359 Create an e-commerce company based on the difficulty of factoring Example: Factor this 22-digit integer $3, prize claimed in July, 22 7437563479567282846796974295734259388889232898493623263897276534282662768999649625784399589 4335227585378968982867337327389395525568776329972396387867869696253793465563796359 Q. Would an efficient algorithm for FACTOR prove that P = NP? A. Unknown. It is in NP, but no reduction from is known. RSA sold to EMC for $2. billion in 26 Q. Is it safe to assume that FACTOR is intractable? A. Maybe, but not as safe an assumption as for an NP-complete problem. $ million prize unclaimed since 2 Resolve P vs. NP Q. What else might go wrong? probably another $ million for Turing award Theorem (Shor, 994). An N-bit integer can be factored in N 3 steps on a quantum computer. plus untold riches for breaking e-commerce if P=NP Q. Do we still believe in the Extended Church-Turing thesis? or... sell T-shirts Resources used by all reasonable machines are within a polynomial factor of one another. A. Whether we do or not, intractability demands understanding. 49 5 PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y Image sources http://people.csail.mit.edu/rivest/ http://www.google.com/imgres?imgurl=http://upload.wikimedia.org/wikipedia/commons//e/adi_shamir_at_tu_darmstadt_(23).jpg http://www.google.com/imgres?imgurl=http://upload.wikimedia.org/wikipedia/commons/a/af/len-mankin-pic.jpg Computer Science Computer Science An Interdisciplinary Approach Section 7.4 ROBERT SEDGEWICK K E V I N WAY N E http://introcs.cs.princeton.edu CS.6.E.Intractability.Living 6. Intractability