Computational Complexity In every day life Madhu Sudan

  • Slides: 39
Download presentation
(Computational) Complexity: In every day life? Madhu Sudan MIT March 24, 2009 Complexity in

(Computational) Complexity: In every day life? Madhu Sudan MIT March 24, 2009 Complexity in everyday life 1

Theory of Computing? n n Part I: Origins: Computers and Theory II: Modern Complexity

Theory of Computing? n n Part I: Origins: Computers and Theory II: Modern Complexity III: Implications to everyday life. IV: Future of computing March 24, 2009 Complexity in everyday life 2

Origins of Computation March 24, 2009 Complexity in everyday life 3

Origins of Computation March 24, 2009 Complexity in everyday life 3

History of Computing n Born: 1941 ? n : 1946 n : 1950 s-2000

History of Computing n Born: 1941 ? n : 1946 n : 1950 s-2000 Mainframes, PCs, Internet, WWW n Died: 2005 ? March 24, 2009 Konrad Zuse Eckert-Mauchly Complexity in everyday life Z 3 ENIAC 4

Tracing Computing Backwards “Entscheidung der L�sbarkeit einer diophantischen Gleichung. Eine diophantische Gleichung mit “Any

Tracing Computing Backwards “Entscheidung der L�sbarkeit einer diophantischen Gleichung. Eine diophantische Gleichung mit “Any effectively generated theory irgendwelchen Unbekannten und mit ganzen capable rationalen of Zahlkoefficienten sei vorgelegt: man soll ein cannot Verfahren be expressing elementary arithmetic angeben, nach welchen sich mittels einer endlichen Anzahl both consistent and von Operationen entscheiden l�sst, complete. ” ob die Gleichung in ganzen rationalen Zahlen l�sbar ist. ” n n n Turing (1936): Universal Computer (Model) Gödel (1931): Logical predecessor. Hilbert (1900): Motivating questions/program. Gauss (1801): Efficient factoring of integers? Euclid (-300): Computation of common divisors! Prehistoric!! (adding, subtracting, multiplying, thinking (at least logically) are all computing!) March 24, 2009 Complexity in everyday life 5

Tracing Computing Forwards “Rumors of its demise are greatly exaggerated …” … More later.

Tracing Computing Forwards “Rumors of its demise are greatly exaggerated …” … More later. March 24, 2009 Complexity in everyday life 6

Computation and Complexity March 24, 2009 Complexity in everyday life 7

Computation and Complexity March 24, 2009 Complexity in everyday life 7

Example: Integer Addition n Addition: Suppose you want to add two ten-digit numbers. Does

Example: Integer Addition n Addition: Suppose you want to add two ten-digit numbers. Does this take about 10 steps? Or about 10 x 10 steps? 1 1 1 2315675689 + 589143226 2 9 04 8 1 8 9 15 n ~10 steps! Linear time! March 24, 2009 Complexity in everyday life 8

Computation! n n What we saw was a computational procedure (algorithm) to add integers.

Computation! n n What we saw was a computational procedure (algorithm) to add integers. In general Algorithm = n Sequence of steps n Each step very simple (finite + local) n Every step of sequence determined by previous steps. Formalization: n Turing Machine/Computer Program/Computer! Moral: Computation is ancient! Eternal!! March 24, 2009 Complexity in everyday life 9

First Law of Computation [Turing[ n n Universality: There is a single computer which

First Law of Computation [Turing[ n n Universality: There is a single computer which can execute every algorithm. Obvious today … we all own such a “single computer”. n Highly counterintuitive at the time of Turing. n Idea made practical by von Neumann. March 24, 2009 Complexity in everyday life 10

Example 2: Multiplication n Multiplication: Suppose you want to multiply two n-digit numbers. Does

Example 2: Multiplication n Multiplication: Suppose you want to multiply two n-digit numbers. Does this take about n steps? Or n x n steps? 231567 x 58914 926268 231567 2084103 1852536 1157835 n 2 steps. Best? Above process: n 13642538238 March 24, 2009 Complexity in everyday life 11

Complexity n n Adding/Multiplying n-digit numbers Addition: ~n steps; Multiplication: ~n 2 steps. Is

Complexity n n Adding/Multiplying n-digit numbers Addition: ~n steps; Multiplication: ~n 2 steps. Is addition really easier than multiplication? Can we prove multiplying requires n 2 steps ? (Needed to assert addition is easier!) n Unfortunately, NO! n Why? n Answer 1: Proving “every algorithm must be slow” is hard! n Answer 2: Statement is incorrect! n March 24, 2009 Better algorithms (running in nearly linear time) exist! Complexity in everyday life 12

Computation and Complexity n n Broad goal of Computational Research: n For each computational

Computation and Complexity n n Broad goal of Computational Research: n For each computational task n Find best algorithms [Algorithm Design] n Prove they are best possible [Complexity] Challenges to the field: n Algorithms: Can be ingenious n (in fact they model ingenuity!) n Complexity: Elusive, Misleading March 24, 2009 Complexity in everyday life 13

Example: Integer Arithmetic n Addition: Linear! n Multiplication: Quadratic! Fastest? Not-linear n n Factoring?

Example: Integer Arithmetic n Addition: Linear! n Multiplication: Quadratic! Fastest? Not-linear n n Factoring? Write 13642538238 as product of two integers (each less than 1000000) Inverse of multiplication. n Not known to be linear/quadratic/cubic. n Believed to require exponential time. March 24, 2009 Complexity in everyday life 14

Computation and Complexity n Broad classification of Computational Problems n n Easy Doubling resources

Computation and Complexity n Broad classification of Computational Problems n n Easy Doubling resources increases size of n Those thatofcan be solved in polynomial largest feasible by multiplicative amount of time problem (n, n 2, n 10 , …) factor. Hard n Doubling Those that exponential ofrequire resources increasestime size of (2 n, 10 n, …) largest feasible problem by additive factor. March 24, 2009 Complexity in everyday life 15

Computation and Complexity n n Broad classification of problems n Easy: Doubling of resources

Computation and Complexity n n Broad classification of problems n Easy: Doubling of resources increases size of largest feasible problem by multiplicative factor. n Hard: Doubling of resources increases size of largest feasible problem by additive factor. Computer Science = (Mathematical) Study of Easiness. = (Mathematical) Study of Complexity. March 24, 2009 Complexity in everyday life 16

Reversibility of Computation? n Recall: Multiplication vs. Factoring n n P = Class of

Reversibility of Computation? n Recall: Multiplication vs. Factoring n n P = Class of Easy Computational Problems. n n Problem given by function f: input → output. NP = Reverses of P problems. n n Factoring reverses Multiplication Easy Factoring seems Hard Given function f in P, and output, give (any) input such that f(input) = output. Open: Is P=NP? March 24, 2009 Complexity in everyday life 17

Second Law of Computation? [Unproven] n n Irreversibility Conjecture: Computation can not be easily

Second Law of Computation? [Unproven] n n Irreversibility Conjecture: Computation can not be easily reversed. (P ≠ NP). The famed “P = NP? ” question n Financially Interesting: n Clay Institute offers US$ 1. 000. n Mathematically interesting: n Models essence of theorems and proofs. n Computationally interesting: n Captures essential bottlenecks in computing. n Interesting to all: n Difference between goals and path to goals. March 24, 2009 Complexity in everyday life 18

NP-completeness and consequences March 24, 2009 Complexity in everyday life 19

NP-completeness and consequences March 24, 2009 Complexity in everyday life 19

Hardest problem in NP n Even though we don’t know if NP = P,

Hardest problem in NP n Even though we don’t know if NP = P, we know which problems in NP may be the hardest. E. g. , n n n Travelling Salesman Problem Integer Programming Finding proofs of theorems Folding protien sequences optimally Computing optimal market strategies These problems are NP-complete. n If any one can be easily solved, then all can be easily solved. March 24, 2009 Complexity in everyday life 20

An NP-complete Problem: Divisor? n n Given n-digit numbers A, B, C, does A

An NP-complete Problem: Divisor? n n Given n-digit numbers A, B, C, does A have a divisor between B and C? n (Does there exist D such that B < D < C and D divides A? ) Example: Theorem: Divisor is NP-complete. • Q: Does 3190966795047991905432 have a divisor between n Equivalent view of NP : YES/NO problems 2580000 and 2590000. where, if answer is YES, then it is easy to present short • A: YES “proof”. • Proof: 25846840632. n In Divisor, proof is the number D. March 24, 2009 Complexity in everyday life 21

Example 2: Travelling Salesman Problem • Many cities; • Want to visit all and

Example 2: Travelling Salesman Problem • Many cities; • Want to visit all and return home; • Can he do it with < 125 hours of driving? #Hours so far 9. 8 122. 4 6. 4 2. 3 17. 3 Easy to verify if answer is YES. 3. 2 Can you prove if answer is NO? 5. 1 March 24, 2009 Complexity in everyday life 22

Theorems and Proofs n 1900 -2000: Mathematical formalization of Logic n n [Hilbert, Gödel,

Theorems and Proofs n 1900 -2000: Mathematical formalization of Logic n n [Hilbert, Gödel, Church, Turing …] Logic = Axioms + Deduction Rules Theorem, Proofs: Sentences over some alphabet. n Theorem: Valid if it follows from axioms and deduction rules. n Proof: Specifies axioms used and order of application of deduction rules. Computational abstraction: n n n (Theorem, Proof) easy to verify. Finding a proof for proposed theorem is hard. Theorem: Finding short proofs is NP-complete. March 24, 2009 Complexity in everyday life 23

Theorems: Deep and Shallow n x n + yn = 6 zn A Deep

Theorems: Deep and Shallow n x n + yn = 6 zn A Deep Theorem: n n 8 x; y; z 2 Z + ; n ¸ 3 Proof: (too long to fit in this section). A Shallow Theorem: n The number 3190966795047991905432 has a divisor between 2580000 and 2590000. n Proof: 25846840632. March 24, 2009 Complexity in everyday life 24

NP-Completeness & Logic n Theory of NP-completeness: n Every (deep) theorem reduces to shallow

NP-Completeness & Logic n Theory of NP-completeness: n Every (deep) theorem reduces to shallow one. Given t heorem T and bound n on t he lengt h (in bit s) of it s proof t here exist int egers 0 · A; B ; C · 2 n c such t hat A has a divisor between B and C if and only if T has a proof of lengt h n. n n n Shallow theorem easy to compute from deep one. Shallow proofs are not much longer. Every NP-complete problem = “format” for proofs. March 24, 2009 Complexity in everyday life 25

Is P=NP ? Clay Problems, this might be the “Of all the n n

Is P=NP ? Clay Problems, this might be the “Of all the n n one to find the shortest solution, by an mathematician. ” Don’t knowamateur … Devlin, The Millenium Problems (Possibly thinking of the case P=NP) If P=NP … Cryptography might well be impossible (current systems all broken simultaneously) n All algorithmic problems become “easy” “If someone shows P=NP, then they prove any n … You get whatever you wish … if you just wish for it. theorem they wish. So they would walk away n Mathematicians replaced by computers. n n not just with $1 M, but $6 M by solving all the Clay Problems!” If P≠NP … n … Consistent with Fortnow, current thinking, so no radical changes. Lance Complexity Blog n n n Proof would be very interesting. Might provide sound cryptosystems. P = NP? is Mathematics-Complete Independent of Peano’s axioms, Choice …? March 24, 2009 Complexity in everyday life 26

Probabilistic Verification of Proofs n n n NP-completeness implies many surprising effects for logic.

Probabilistic Verification of Proofs n n n NP-completeness implies many surprising effects for logic. Examples: n Proofs can be verified interactively much more quickly than in “published format”! n Proofs may reveal knowledge selectively! n Proofs need not be fully read to verify them! “Deep theorems” of computational complexity. March 24, 2009 Complexity in everyday life 27

Computation and You? March 24, 2009 Complexity in everyday life 28

Computation and You? March 24, 2009 Complexity in everyday life 28

Computation beyond Computers n Computation is not just about computers: n It models all

Computation beyond Computers n Computation is not just about computers: n It models all systematic processing … n Adding/Subtracting n Logical Deduction n Reasoning n Thought n Learning Cooking (“Recipes = Algorithms”) n Shampoo’ing your hair. n Design, Engineering, Scientific … n March 24, 2009 Complexity in everyday life 29

Biological organisms compute n Folded structure of protiens determines their action. n Common early

Biological organisms compute n Folded structure of protiens determines their action. n Common early belief: Protiens fold so as minimize their energy. n However … n Minimum Energy configuration hard to compute (NP-complete). n Implication: n Perhaps achievable configurations are not global minima. March 24, 2009 Complexity in everyday life 30

NP-Completeness and Economics n n Economic belief: n Individuals act rationally, optimizing their own

NP-Completeness and Economics n n Economic belief: n Individuals act rationally, optimizing their own profit, assuming rational behavior on other’s part. However … n Optimal behavior is often hard to compute (NPcomplete) n In such cases irrational (or bounded rationality) is best possible. n Alters behavior of market. March 24, 2009 Complexity in everyday life 31

NP-Completeness and the Brain n n Axiom: Brain is a computer (Follows from Universality).

NP-Completeness and the Brain n n Axiom: Brain is a computer (Follows from Universality). Implications to Neuroscience: n n What is the model of computing (neural network, other? ) More significantly … to Education: n Education = Programming of the brain (without losing creativity) n What algorithms to “teach” n Why multiplication? What is the point of “rote”? n Do resources matter? How much? n How much complexity can a child’s brain handle? March 24, 2009 Complexity in everyday life 32

NP-Completeness and Life n n n Life = Choices + Consequences n Which school

NP-Completeness and Life n n n Life = Choices + Consequences n Which school should I go to? n What subjects should I learn? n How should I spend my spare time? n Which job should I take? n Should I insult my boss today? Or tomorrow? n Sequence of simple steps that add up … n Eventually we find out if we did the right thing! Life = (Non-deterministic) computation. P = NP? Humans don’t need creativity/choice March 24, 2009 , Complexity in everyday life 34

Computation and You n n Eventually … humans are characterized by their intelligence. Intelligence

Computation and You n n Eventually … humans are characterized by their intelligence. Intelligence is a “computational effect. ” Inevitably “computation” is the “intellectual core of humanity. ” Shouldn’t be surprised if it affects all of us. March 24, 2009 Complexity in everyday life 35

Future of Computing March 24, 2009 Complexity in everyday life 36

Future of Computing March 24, 2009 Complexity in everyday life 36

Tracing Computing Forwards “Rumors of its demise are greatly exaggerated …” n n Computing

Tracing Computing Forwards “Rumors of its demise are greatly exaggerated …” n n Computing thus far … n First Law: Universality n Second Law(? ): Irreversibility. Just the beginning … n … of Micro-Computer Science (one computer manipulating information). March 24, 2009 Complexity in everyday life 37

Future = Macro-Computer Science: The vast unknown n What happens when many computers interact?

Future = Macro-Computer Science: The vast unknown n What happens when many computers interact? n n n n What determines long term behavior? What describes long term behavior? What capabilities do we have (as intelligent beings, society) to control and alter this long term behavior? How do computers evolve? Questions relevant already: Internet, WWW etc. What scientific quests are most similar? n (Statistical) Physics? Biology? Chemistry (big reactions)? n Sociology? Logic? n Mathematics? Computation = Mathematics of the 21 st Century. March 24, 2009 Complexity in everyday life 38

Acknowledgments (+ Pointers( n n This talk is inspired by (and borrows freely from)

Acknowledgments (+ Pointers( n n This talk is inspired by (and borrows freely from) … Christos Papadimitriou: The Algorithmic Lens n n Avi Wigderson: A world view through the computational lens n n http: //lazowska. cs. washington. edu/fcrc/Christos. FCRC. pdf http: //www. math. ias. edu/~avi/TALKS/ Many colleagues: esp. Oded Goldreich, Salil Vadhan March 24, 2009 Complexity in everyday life 39

Thank You! March 24, 2009 Complexity in everyday life 40

Thank You! March 24, 2009 Complexity in everyday life 40