Computer Science of Computation Omer Reingold Foundations of

  • Slides: 19
Download presentation
Computer Science of Computation Omer Reingold

Computer Science of Computation Omer Reingold

Foundations of CS at Weizmann • • • Irit Dinur Uri Feige Oded Goldreich

Foundations of CS at Weizmann • • • Irit Dinur Uri Feige Oded Goldreich Shafi Goldwasser David Harel Robi Krauthgamer Moni Naor David Peleg Amir Pnueli Omer Reingold Ran Raz Adi Shamir

Algorithm • A “recipe” for solving a computational problem (on every possible input). –

Algorithm • A “recipe” for solving a computational problem (on every possible input). – Step-by-step, based on simple (basic) instructions. • Some algorithms you probably already run: long arithmetic, ordering a deck of cards, …

“Long addition” algorithm 1 1 2 3 4 5 6 7 8 9 1

“Long addition” algorithm 1 1 2 3 4 5 6 7 8 9 1 3 4 1. 2. 3. 4. Scan column. If empty, stop. Add digits. Write answer, retain carry. Move one column left, write carry. Go to 1

What are simple instructions? • Can be carried out by a third grader? •

What are simple instructions? • Can be carried out by a third grader? • By a computer processor? – But we don’t want our theory to change every time a new processor goes into the market. • Turing (1936!), proposed a “primitive” model of computation. We can define our algorithms on a Turing machine. • Church-Turing thesis: Every effective computation can be carried out by a Turing machine.

Turing Machine

Turing Machine

With the right abstractions • Computer science is no longer about how computers “think”

With the right abstractions • Computer science is no longer about how computers “think” but rather about how humans think! – After all the science came first! • … and possibly also about how nature thinks …

Is there an algorithm for every problem? • No! Regardless of how much time

Is there an algorithm for every problem? • No! Regardless of how much time we let the algorithm run. • Examples: – There cannot be a computer program that debugs other programs automatically. – There cannot be a program that identifies all computer viruses.

Can computers solve in practice every solvable problem? • No! Some problems take too

Can computers solve in practice every solvable problem? • No! Some problems take too much time to solve. • So lets wait until computers become faster … • Not a technological problem. – Some algorithms will still be running after the sun burns out, even on a computer made of all the particles of the universe, communicating at the speed of light.

Efficiency of an Algorithm • It is important to bound the amount of resources

Efficiency of an Algorithm • It is important to bound the amount of resources our algorithms use: • Time: how many basic operations • Space: how many memory cells? • Randomness, Communication … • Try to find the most efficient algorithm for a given problem. – Some ingenious ideas come into play.

Time Efficiency of an Algorithm • • 5982045 × Count the number of basic

Time Efficiency of an Algorithm • • 5982045 × Count the number of basic 4373673 operations. 17946135 Long addition of n-digit numbers – 41874315 35892270 roughly n operations. 179461351 1 41874315 Long multiplication of n-digit 17946135 5982045 numbers (school 23928180 method) –+roughly 4373673 n 2 operations. 26163508701285 10355718 Can we do better?

Asymptotics • What is the difference between an algorithm running in time n, n

Asymptotics • What is the difference between an algorithm running in time n, n 2 and n n 2 2 n ? 2 n 10 1024 50 2500 1015 10000 1030 1000000 10301 • As technology evolves inputs get larger – asymptotics matter!

Map Coloring • Given a map, “legally” color the countries with three colors (coloring

Map Coloring • Given a map, “legally” color the countries with three colors (coloring with four colors always exists) • Does there exist an efficient algorithm? • This is the central question of computer science (and one of the central questions of math). Sounds lame?

P vs. NP problem • If there exists an efficient algorithm for map coloring

P vs. NP problem • If there exists an efficient algorithm for map coloring then: – An efficient algorithm for many other natural problems – Math and Science can be automated – Creativity can be automated (computers can learn to generate jokes, art, etc. ) – (Almost) no cryptography

Cryptography and Knowledge • Assuming it is hard to factor big numbers, cryptography offers

Cryptography and Knowledge • Assuming it is hard to factor big numbers, cryptography offers solutions to many problems of secrecy, privacy, and fault tolerance. • For example: two parties who never met can exchange information privately at the presence of others. This talk is so boring

Cryptography and Knowledge • Or flip a fair coin over the phone: OK so

Cryptography and Knowledge • Or flip a fair coin over the phone: OK so you get the car

Cryptography and Knowledge • These and other remarkable applications are impossible, based on our

Cryptography and Knowledge • These and other remarkable applications are impossible, based on our traditional notion of information. – For example, an encryption of a message contains all the information about the message. • New perspective of knowledge: it is not the information one possesses but rather the information that can be accessed efficiently! This talk is so boring

Megalomaniac Moment in Conclusion Computation: evolution of an environment via repeated application of simple,

Megalomaniac Moment in Conclusion Computation: evolution of an environment via repeated application of simple, local rules (Almost) all Physics and Biology - Weather - Proteins in a cell - Ant hills - Fish schools - Brain - Populations - Epidemics – Regeneration theories satisfy! - magnetization - fission - burning fire - growth And also Economy, Social Science, …

Still Megalomaniac • Math has often been thought of as the language of Science

Still Megalomaniac • Math has often been thought of as the language of Science • Theory of computation is an area of math particularly suited to analyzing processes operating with limited resources • Computational lens proved powerful in bioinformatics, quantum computation, game theory… – Expect much more!