A Tale of Two Cultures: Phase Transitions in Physics and Computer Science. Cristopher Moore University of New Mexico and the Santa Fe Institute

Similar documents
Phase Transitions in Physics and Computer Science. Cristopher Moore University of New Mexico and the Santa Fe Institute

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

Complexity Theory: The P vs NP question

INTRO TO COMPUTATIONAL COMPLEXITY

The Nature of Computation

COMP Analysis of Algorithms & Data Structures

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

Introduction to Computational Complexity

NP Complete Problems. COMP 215 Lecture 20

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

CSCI3390-Lecture 17: A sampler of NP-complete problems

Polynomial-Time Reductions

CSC 373: Algorithm Design and Analysis Lecture 15

Limitations of Algorithm Power

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

NP and Computational Intractability

CS 583: Algorithms. NP Completeness Ch 34. Intractability

Computational Complexity

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

COP 4531 Complexity & Analysis of Data Structures & Algorithms

13.1 Nondeterministic Polynomial Time

CS/COE

Complexity, P and NP

Design and Analysis of Algorithms

Algorithm Design and Analysis

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

Introduction to Computational Complexity

Some Algebra Problems (Algorithmic) CSE 417 Introduction to Algorithms Winter Some Problems. A Brief History of Ideas

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

Introduction to Complexity Theory

1. Introduction Recap

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

SOME FAMOUS UNSOLVED PROBLEMS. November 18, / 5

Algorithm Design and Analysis

Some Algebra Problems (Algorithmic) CSE 417 Introduction to Algorithms Winter Some Problems. A Brief History of Ideas

Computational Complexity

Review of unsolvability

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Lecture 4: NP and computational intractability

NP-Complete problems

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

Computational Complexity

NP-Completeness. Subhash Suri. May 15, 2018

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

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

CS21 Decidability and Tractability

NP-Completeness. Algorithmique Fall semester 2011/12

ECS122A Handout on NP-Completeness March 12, 2018

8.5 Sequencing Problems

6-1 Computational Complexity

Intro to Theory of Computation

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

Independence and chromatic number (and random k-sat): Sparse Case. Dimitris Achlioptas Microsoft

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

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

Show that the following problems are NP-complete

CSC373: Algorithm Design, Analysis and Complexity Fall 2017

VIII. NP-completeness

NP Completeness and Approximation Algorithms

CSE 135: Introduction to Theory of Computation NP-completeness

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

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

CSC 1700 Analysis of Algorithms: P and NP Problems

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

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?

Finding hay in haystacks: the power and limits of Randomness. Avi Wigderson IAS, Princeton

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

Introduction. Pvs.NPExample

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

CS154, Lecture 13: P vs NP

Correctness of Dijkstra s algorithm

A.Antonopoulos 18/1/2010

CSC 373: Algorithm Design and Analysis Lecture 18

Algorithm Design and Analysis

NP-Complete Problems. More reductions

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

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

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

P versus NP. Math 40210, Spring April 8, Math (Spring 2012) P versus NP April 8, / 9

CS 6505, Complexity and Algorithms Week 7: NP Completeness

COMP 382. Unit 10: NP-Completeness

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

1.1 P, NP, and NP-complete

CS154, Lecture 13: P vs NP

Lance Fortnow Georgia Institute of Technology A PERSONAL VIEW OF P VERSUS NP

Computational Complexity Theory. The World of P and NP. Jin-Yi Cai Computer Sciences Dept University of Wisconsin, Madison

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

NP-completeness. Chapter 34. Sergey Bereg

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

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

NP-Complete Reductions 1

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

Mathematics, Proofs and Computation

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

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

CS 350 Algorithms and Complexity

Transcription:

A Tale of Two Cultures: Phase Transitions in Physics and Computer Science Cristopher Moore University of New Mexico and the Santa Fe Institute

Computational Complexity Why are some problems qualitatively harder than others?

Computational Complexity A simple insight: at most 2 vertices can have odd degree, so no tour is possible! C c f d A e D b a g B

Computational Complexity What if we want to visit every vertex, instead of every edge?

Computational Complexity As far as we know, the only way to solve this problem is (essentially) exhaustive search!

Needles in Haystacks P: we can find a solution efficiently NP: we can check a solution efficiently

Complexity Classes NP Hamiltonian Path P Eulerian Path Multiplication

An Infinite Hierarchy Turing s Halting Problem COMPUTABLE Computers play the same role in complexity that clocks, trains and elevators play in relativity. Scott Aaronson EXPTIME PSPACE NP P Games

The Hardest of Them All Hamiltonian Path NP-complete NP Factoring P Eulerian Path Primality Primality Some problems in NP capture the entire class! If we can solve any of them efficiently, then P=NP.

Satisfying a Circuit Any program that tests solutions (e.g. paths) can be compiled into a Boolean circuit The circuit outputs true if an input solution works Is there a set of values for the inputs that makes the output true? x 1 x 2 AND OR NOT AND z

From Circuits to Formulas The condition that each AND or OR gate works, and the output is true, can be written as a Boolean formula: x 1 x 2 OR y 2 y 3 AND NOT y 1 (x 1 y 1 ) (x 2 y 1 ) (x 1 x 2 y 1 ) z. AND z

3-SAT Our first NP-complete problem! Given a set of clauses with 3 variables each, (x 1 x 2 x 3 ) (x 2 x 17 x 293 ) does a set of truth values for the exist such that all the clauses are satisfied? k-sat ( k variables per clause) is NPcomplete for k 3. x i

If 3-SAT Were Easy......we could convert any problem in NP to a circuit that tests solutions...and convert that circuit to a 3-SAT formula which is satisfiable if a solution exists...and use our efficient algorithm for 3-SAT to solve it! So, if 3-SAT is in P, then all of NP is too, and P=NP!

Graph Coloring Given a set of countries and borders between them, what is the smallest number of colors we need?

From SAT to Coloring Gadgets enforce constraints: x x y y z z (x, y, z) (x, y, z) Graph 3-Coloring is NP-complete Graph 2-Coloring is in P (why?)

And so on... Independent Set Vertex Cover Max Clique Integer Partitioning MAX-2-SAT Subset Sum Graph 3-Coloring Max Cut 3-Matching Tiling NAE-3-SAT Hamiltonian Path Planar SAT 3-SAT Circuit SAT Witness Existence

The Adversary...designs problems that are as diabolically hard as possible, forcing us to solve them in the worst case. (Hated and feared by computer scientists.)

La Dame Nature...asks questions whose answers are simpler and more beautiful than we have any right to imagine. (Loved and worshipped by physicists.)

Random Problems A 3-SAT formula with n clauses, m variables Choose each clause randomly: possible ( n 3) triplets, negate each one with probability 1/2 Precedents: Random Graphs (Erdös-Rényi) Statistical Physics: ensembles of disordered systems, e.g. spin glasses Sparse Case: m = αn for some density α

A Phase Transition 1.0 P 0.8 0.6 0.4 n = 10 n = 15 n = 20 n = 30 n = 50 n = 100 0.2 0.0 3 4 5 6 7!

Search Times 10 6 10 5 DPLL calls 10 4 10 3 10 2 1 2 3 4 5 6 7 8!

An Upper Bound The average number of solutions is ( ( 8) m 2 n 7 = 2 8 ( ) α ) n 7 E[X] This is exponentially small whenever α > log 8/7 2 5.19 But the transition is much lower, at α 4.27. What s going on?

In the range A Heavy Tail 4.27 < α < 5.19, the average number of solutions is exponentially large. Occasionally, there are exponentially many......but most of the time there are none! A classic heavy-tailed distribution Large average doesn t prove satisfiability!

Lower Bound #1 Idea: track the progress of a simple algorithm! When we set variables, clauses disappear or get shorter: x (x y z) (y z) Unit Clauses propagate: x (x y) y

One Path Through the Tree If there is a unit clause, satisfy it. Otherwise, choose a random variable and give it a random value! The remaining formula is random for all t: ds 3 dt = 3s 3 1 t, ds 2 dt = (3/2)s 3 2s 2 1 t s 3 (0) = α, s 2 (0) = 0

A Branching Process Each unit clause has on average children, where λ = s 2 1 t λ When λ > 1, they proliferate and contradictions appear But if α < 8/3, then λ < 1 throughout and the unit clauses stay manageable.

Constructive Methods Fail Fancier algorithms, harder math: α < 3.52. But, for larger k, algorithmic methods are nowhere near the upper bound for k-sat: O ( 2 k k ) < α < O(2 k ) To close this gap, we need to resort to non-constructive methods.

Lower Bound #2 Idea: bound the variance of the number of solutions. If X is a nonnegative random variable, Pr[X > 0] E[X]2 E[X 2 ] E[X] E[X 2 ] correlations between solutions. is easy; requires us to understand

A Function of Distance When the expected number of pairs of solutions is peaked at 1/2, most pairs are independent and the variance is small. 1.02 0.98 0.2 0.4 0.6 0.8 1 0.96 0.94

Determining the Threshold A series of results has narrowed the range for the transition in k-sat to 2 k ln 2 O(k) < α < 2 k ln 2 O(1) Prediction from statistical physics: 2 k ln 2 O(1) Seems difficult to prove with current methods.

Scaling and Universality Rescaling α around the critical point causes different n to coincide. A universal function? 1.0 0.8 0.6 0.4 0.2 0.0-1 0 1! "

Clustering Below the critical temperature, magnets have two macrostates (Gibbs measures) Glasses, and 3-SAT, have exponentially many!

Clustering An idea from statistical physics: there is another transition, from a unified cloud of solutions to separate clusters. Is this why algorithms fail at α 2 k /k? 3.9 4.27 α

Distance Distributions Some rigorous evidence for clustering: 1.02 Between clusters Within clusters 0.98 0.2 0.4 0.6 0.8 1 0.96 0.94

The Physicists Algorithm A message-passing algorithm: I can t give you what you want u j a u a i You re the only one who can satisfy me

Why Does It Work? Random formulas are locally treelike. Assume the neighbors are independent: T 1 T 3 T 1 Proving this will take some very deep work.

Clay Mathematics Institute Dedicated to increasing and disseminating mathematical knowledge How to make $1,000,000 (and maybe $7,000,000)

Millennium Problems P=NP? Poincaré Conjecture Riemann Hypothesis Yang-Mills Theory Navier-Stokes Equations Birch and Swinnerton-Dyer Conjecture Hodge Conjecture

Millennium Problems P=NP?

Millennium Problems P=NP? Is it harder to find solutions than to check them? Question about the nature of mathematical truth...and whether finding it requires as much creativity as we think.

What if P=NP? Better Traveling Salesmen, can pack luggage No Cryptography The entire polynomial hierarchy collapses, NEXP=EXP, etc. We can find (up to any reasonable length) Proofs Theories Anything we can recognize.

Gödel to Von Neumann Let ϕ(n) be the time it takes to decide whether a proof of length n exists. Gödel writes: The question is, how fast does ϕ(n) grow for an optimal machine. If there actually were a machine with, say, ϕ(n) n 2, this would have consequences of the greatest magnitude. That is to say, it would clearly indicate that, despite the unsolvability of the Entscheidungsproblem, the mental effort of the mathematician in the case of yes-or-no questions could be completely replaced by machines. One would simply have to select an n large enough that, if the machine yields no result, there would then be no reason to think further about the problem. P<NP if understanding matters.

Shameless Advertisement The Nature of Computation Stephan Mertens Cristopher Moore Oxford, 2007

Acknowledgments