3/4/17 Algorithms, complexity and P vs NP SURVEY Finding an efficient Can creativity be automated? method to solve SuDoku puzzles is: Slides by Avi Wigderson + Bernard Chazelle (with some extras) 1: A waste of time 2: A decent way to pass some time 3: A fundamental problem of science and math Algorithms Evaluating how good (how efficient) an algorithm is 12345 Function: input à output input + 6789 Addition: x,y à x+y How does the number of basic steps addition of an algorithm increase with the algorithm data size (input length) ? 19134 output ALGORITHM (intuitive def): Step-by-step, simple procedure, input computing a function on all inputs input input input Sudoku Rubik ’ s cube 2 3 4 5 … 3 4 1
3/4/17 Sudoku 5 …… FFT Shortest paths Audio processing Image processing Tomography, MRI The class P All problems having an efficient algorithm to find solutions RSA Are all practically interesting problems encryption in P? e-commerce 2
3/4/17 Verification Three problems Input Output Complexity 2 67 -1 = 193707721 x Factoring 1541 23 × 67 761838257287 integers 2 67 -1 ?? ≤ 2 √ n Input Output Complexity n+Poincare n+Fermat ’ s Conjectute “ Theorem ” Proving n+ ” Riemann n symbol Factoring 1541 23 × 67 theorems Hypothesis ” proof ≤ 2 n integers 2 67 -1 193,707,721 × 761,838,257,287 ≤ 2 √ n Solving n = 200 pages Sudoku ≤ n n Proving n+ ” Riemann n symbol What is common to all 3 problems? theorems Hypothesis ” proof ≤ 2 n - Best current algorithms exponential Solving - Easy verification of given solutions !!! Sudoku ≤ n n P versus NP The class NP P: Problems for which solutions can be efficiently found NP: Problems for which solutions can be efficiently verified All problems • whose solutions can be written down in polynomial space Fact: P ⊆ NP [finding implies verification] • having efficient verification algorithms Conjecture: P ≠ NP [finding is much harder than for given solutions verification] “ P=NP? ” is a central question of math, science & technology !!! what is in NP? How do we tackle P vs. NP? Input Output Complexity Break RSA, Mathematician: Given a statement, find a proof Factoring 1541 23 × 67 ruin E-commerce integers 2 67 -1 ?? ≤ 2 √ n Scientist: Given data on some phenomena, find a theory explaining it. Fame & glory Proving n+ ” Riemann n symbol theorems Hypothesis ” proof ≤ 2 n $6M from CLAY Engineer: Given constraints (size,weight,energy) find a design (bridge, medicine, phone) Take out the fun of Solving Doing these puzzles SuDoku ≤ n n In many intellectual challenges, verifying that we found a good solution is an easy task ! Pick any one of the Let ’ s choose the (if not, we probably wouldn ’ t start looking) three problems. SuDoku solver I ’ ll solve it on each input instantly. Choose, oh Master! If P=NP, these have fast, automatic finder 3
3/4/17 The power of SuDoku I The power of SuDoku II Using SuDoku solver for Integer factoring Using SuDoku solver for Theorem proving Input translator Input translator 200+ Riemann 2 67 -1 Cook-Levin Hypothesis Factoring → Thm proving SuDoku → SuDoku algorithm algorithm 193707721 x Definition…lemma Lemma…proof..def… 761838257287 Solution translator Solution translator lemma…proof…QED Both translators are efficient algorithms! Both translators are efficient algorithms! Universality: NP-completeness “ Reduction ” SuDoku solver can solve any NP problem “ If you give me a place to 1971: NP-complete problems exist! stand, I will move the earth. ” SAT is NP-complete: There is a – Archimedes (~ 250BC) “ reduction ” from any NP problem to SAT NP-complete problems abound! “ If you give me a polynomial-time algorithm for Sudoku, I will give you a 1972: 21 problems in logic, optimization, algebra polynomial-time algorithm for every NP Today: ~3000 problems in all sciences, equivalent problem. ” --- Cook, Levin (1971) P=NP iff SuDoku has an efficient algorithm “ Every NP problem is a Sudoku problem in disguise. ” Universality: NP-completeness Rumor mill problem NP-complete problems: • Social network If one is easy, then all are! • Each node represents a student If one is hard, then all are! • Two nodes connected by edge if those students are friends • Melissa starts a rumor SuDoku, NP-complete • Will it reach Jordyn? • How does the running Thm proving: NP-complete time of our algorithm depend on the size of Integer factoring: we don ’ t know the input? In P 4
3/4/17 CLIQUE Problem Map Coloring • Social network • Each node represents a Input: planar map M student • Two nodes connected by edge if those students are friends • In this social network, is there a clique of k or more 4-COL: is M 4-colorable? people? • CLIQUE: Group of YES! students, every pair of whom are friends • What is a good algorithm for detecting the biggest clique? 3-COL: is M 3-colorable? • How does efficiency depend on network size and desired NP-complete! clique size? NP-complete! Give me an algorithm. Solvable Unsolvable Game Playing Traveling Salesman Problem Graph (aka UPS Truck problem) Computation is Isomorphism Integer • Input: n points and Friend everywhere TSP Factoring all pairwise inter-point Wheel Pattern NP-complete distances, and Shortest Matching Route a distance k Theorem Solving • Decide: is there a path P Shortest Proving Sudoku that visits all the points Route ( “ salesman tour ” ) whose Map total length is at most k ? Coloring Multiplication NP Addition FFT • NP-complete! I ’ m late US 5
Recommend
More recommend