Top Banner
Computational Models (0382.2200) (Inroduction to the Theory of Computing) http://www.cs.tau.ac.il/bchor/CM/compute.html Instructor: Prof. Benny Chor (benny@cs.tau.ac.il) Teaching Assistant: Dr. Gad Kimmel ([email protected]) Tel-Aviv University Fall Semester, 2003-2004 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.1
94

Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Jun 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computational Models (0382.2200)

(Inroduction to the Theory of Computing)

http://www.cs.tau.ac.il/∼bchor/CM/compute.html

Instructor: Prof. Benny Chor ([email protected])

Teaching Assistant: Dr. Gad Kimmel ([email protected])

Tel-Aviv University

Fall Semester, 2003-2004

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.1

Page 2: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).

Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 3: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.

External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 4: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.

Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 5: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.

Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 6: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 7: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 8: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTriviaCourse Requirements:

6-7 problem sets (10-15% of grade).Homework should be solved independently.External sources (books, journal articles, webpages) can be used but should be clearlyquoted.Answers should be readable, concise, andcorrect.Late submition will not be accepted.

Midterm exam (20-25% of grade).

Final exam (60-70% of grade).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.2

Page 9: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTrivia IIPrerequisites:

Extended introduction to computer science(aka Scheme course).Students from other disciplines with somemathematical background are encouraged tocontact the instructor.

Textbook (extensively used, highlyrecommended):

Michael Sipser, Introduction to the theory ofcomputation.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3

Page 10: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTrivia IIPrerequisites:

Extended introduction to computer science(aka Scheme course).

Students from other disciplines with somemathematical background are encouraged tocontact the instructor.

Textbook (extensively used, highlyrecommended):

Michael Sipser, Introduction to the theory ofcomputation.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3

Page 11: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTrivia IIPrerequisites:

Extended introduction to computer science(aka Scheme course).Students from other disciplines with somemathematical background are encouraged tocontact the instructor.

Textbook (extensively used, highlyrecommended):

Michael Sipser, Introduction to the theory ofcomputation.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3

Page 12: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTrivia IIPrerequisites:

Extended introduction to computer science(aka Scheme course).Students from other disciplines with somemathematical background are encouraged tocontact the instructor.

Textbook (extensively used, highlyrecommended):

Michael Sipser, Introduction to the theory ofcomputation.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3

Page 13: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

AdministraTrivia IIPrerequisites:

Extended introduction to computer science(aka Scheme course).Students from other disciplines with somemathematical background are encouraged tocontact the instructor.

Textbook (extensively used, highlyrecommended):

Michael Sipser, Introduction to the theory ofcomputation.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.3

Page 14: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science Issues

What is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 15: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?

Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 16: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?

What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 17: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 18: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic Reasons

Avoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 19: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.

Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 20: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.

Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 21: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Why Study Theory?

Basic Computer Science IssuesWhat is a computation?Are computers omnipotent?What are the fundemental capabilities andlimitations of computers?

Pragmatic ReasonsAvoid intractable or impossible problems.Apply efficient algorithms when possible.Learn to tell the difference.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.4

Page 22: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 23: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 24: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 25: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:

Approximation.Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 26: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.

Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 27: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.

Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 28: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.Fixed parameter algorithms.

Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 29: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Course Topics

Automata Theory: What is a computer?

Computability Theory: What can computers do?

Complexity Theory: What makes some problemscomputationally hard and others easy?

Coping with intractability:Approximation.Randomization.Fixed parameter algorithms.Heuristics.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.5

Page 30: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.

Related to controllers and hardware design.Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 31: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.

Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 32: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.Useful in text processing and finding patternsin strings.

Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 33: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 34: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.

Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 35: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.

Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 36: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Automata Theory - Simple Models

Finite automata.Related to controllers and hardware design.Useful in text processing and finding patternsin strings.Probabilistic (Markov) versions useful inmodeling various natural phenomena (e.g.speech recognition).

Push down automata.Titely related to a family of languages knownas context free languages.Play important role in compilers, design ofprogramming languages, and studies ofnatural languages.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.6

Page 37: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

In the first half of the 20th century, mathematicianssuch as Kurt Göedel, Alan Turing, and AlonzoChurch discovered that some fundemental problemscannot be solved by computers.

Proof verication of statements can be automated.

It is natural to expect that determining validitycan also be done by a computer.

Theorem: A computer cannot determine ifmathematical statement true or false.

Results needed theoretical models for computers.

These theoretical models helped lead to theconstruction of real computers.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7

Page 38: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

In the first half of the 20th century, mathematicianssuch as Kurt Göedel, Alan Turing, and AlonzoChurch discovered that some fundemental problemscannot be solved by computers.

Proof verication of statements can be automated.

It is natural to expect that determining validitycan also be done by a computer.

Theorem: A computer cannot determine ifmathematical statement true or false.

Results needed theoretical models for computers.

These theoretical models helped lead to theconstruction of real computers.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7

Page 39: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

In the first half of the 20th century, mathematicianssuch as Kurt Göedel, Alan Turing, and AlonzoChurch discovered that some fundemental problemscannot be solved by computers.

Proof verication of statements can be automated.

It is natural to expect that determining validitycan also be done by a computer.

Theorem: A computer cannot determine ifmathematical statement true or false.

Results needed theoretical models for computers.

These theoretical models helped lead to theconstruction of real computers.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7

Page 40: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

In the first half of the 20th century, mathematicianssuch as Kurt Göedel, Alan Turing, and AlonzoChurch discovered that some fundemental problemscannot be solved by computers.

Proof verication of statements can be automated.

It is natural to expect that determining validitycan also be done by a computer.

Theorem: A computer cannot determine ifmathematical statement true or false.

Results needed theoretical models for computers.

These theoretical models helped lead to theconstruction of real computers.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7

Page 41: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

In the first half of the 20th century, mathematicianssuch as Kurt Göedel, Alan Turing, and AlonzoChurch discovered that some fundemental problemscannot be solved by computers.

Proof verication of statements can be automated.

It is natural to expect that determining validitycan also be done by a computer.

Theorem: A computer cannot determine ifmathematical statement true or false.

Results needed theoretical models for computers.

These theoretical models helped lead to theconstruction of real computers.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.7

Page 42: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Computability Theory

a simplicial complexSlides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.8

Page 43: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Paths and Loops

a path is a sequence of vertices connected byedges

a loop is a path that ends and ends at the samevertex

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.9

Page 44: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Paths and Loops can be Deformed

(v0, v1) ⇔ (v0, v2, v1)

(v0, v0) ⇔ (v0)

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.10

Page 45: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Contractibility

contractible

notcontractible

No algorithm can determine whether an arbitraryloop in an arbitrary finite complex is contractible.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.11

Page 46: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 47: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 48: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 49: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 50: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 51: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Some Other Undecidable ProblemsDoes a program run forever?

Is a program correct?

Are two programs equivalent?

Is a program optimal?

Does an equation with one or more variables andinteger coefficients (5x + 15y = 12) have aninteger solution (Hilbert’s 10th problem).

Is a finitely-presented group trivial?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.12

Page 52: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:

description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 53: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parameters

description of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 54: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 55: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedure

a recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 56: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipe

a computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 57: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer program

a mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 58: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 59: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithms

fastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 60: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)

most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 61: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)

expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 62: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Complexity Theory

Key notion: tractable vs. intractable problems.

A problem is a general computational question:description of parametersdescription of solution

An algorithm is a step-by-step procedurea recipea computer programa mathematical object

We want the most efficient algorithmsfastest (usually)most economical with memory (sometimes)expressed as a function of problem size

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.13

Page 63: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Example: Traveling Salesman Problem

10 9

36

9

a

b

c

d

5

Roger WilliamsZoo

Brown UniversityAl FornoRestaurant

StateCapitol

(not drawn to scale)

Parameters:

set of cities

set of inter-city distances

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.14

Page 64: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Example: Traveling Salesman Problem

10 9

36

9

a

b

c

d

5

Roger WilliamsZoo

Brown UniversityAl FornoRestaurant

StateCapitol

(not drawn to scale)

Parameters:

set of cities

set of inter-city distancesSlides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.14

Page 65: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Example: Traveling Salesman Problem

10 9

36

9

a

b

c

d

5

Roger WilliamsZoo

Brown UniversityAl FornoRestaurant

StateCapitol

(not drawn to scale)

Solution:

want the shortest tour through the cities

example: a, b, d, c, a has length 27.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.15

Page 66: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Example: Traveling Salesman Problem

10 9

36

9

a

b

c

d

5

Roger WilliamsZoo

Brown UniversityAl FornoRestaurant

StateCapitol

(not drawn to scale)

Solution:

want the shortest tour through the cities

example: a, b, d, c, a has length 27.Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.15

Page 67: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 68: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?

m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 69: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 70: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problem

alphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 71: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbols

strings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 72: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 73: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

Measures

Problem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 74: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).

Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 75: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Problem SizeWhat is an appropriate measure of problem size?

m nodes?m(m + 1)/2 distances?

Use an encoding of the problemalphabet of symbolsstrings: a/b/c/d//10/5/9//6/9//3.

MeasuresProblem Size: length of encoding (here: 23ascii characters).Time Complexity: how long an algorithmruns, as function of problem size?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.16

Page 76: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Time Complexity - What is tractable?

A function f(n) is O(g(n)) whenever|f(n)| ≤ c · |g(n)| for large enough n.

A polynomial-time algorithm is one whose timecomplexity is O(p(n)) for some polynomial p(n).

An exponential-time algorithm is one whose timecomplexity cannot be bounded by a polynomial(e.g., nlog n).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.17

Page 77: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Time Complexity - What is tractable?

A function f(n) is O(g(n)) whenever|f(n)| ≤ c · |g(n)| for large enough n.

A polynomial-time algorithm is one whose timecomplexity is O(p(n)) for some polynomial p(n).

An exponential-time algorithm is one whose timecomplexity cannot be bounded by a polynomial(e.g., nlog n).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.17

Page 78: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Time Complexity - What is tractable?

A function f(n) is O(g(n)) whenever|f(n)| ≤ c · |g(n)| for large enough n.

A polynomial-time algorithm is one whose timecomplexity is O(p(n)) for some polynomial p(n).

An exponential-time algorithm is one whose timecomplexity cannot be bounded by a polynomial(e.g., nlog n).

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.17

Page 79: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Tractability – Basic distinction:

Polynomial time = tractable.

Exponential time = intractable.

10 20 30 40 50 60

n .00001 .00002 .00003 .00004 .00005 .00006

second second second second second second

n2

.00001 .00004 .00009 .00016 .00025 .00036

second second second second second second

n3

.00001 .00008 .027 .064 .125 .216

second second second second second second

n5

.1 3.2 24.3 1.7 5.2 13.0

second seconds seconds minute minutes minutes

2n

.001 1.0 17.9 12.7 35.7 366

second second minutes days years centuries

3n

.059 58 6.5 3855 2 · 108 1.3 · 1013

second minutes years centuries centuries centuriesSlides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.18

Page 80: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Effect of Speed-Ups

Let’s wait for faster hardware! Consider maximumproblem size you can solve in an hour.

present 100 times faster 1000 times faster

n N1 100N1 1000N1

n2

N2 10N2 31.6N2n3

N3 4.64N3 10N3

n5

N4 2.5N4 3.98N42n

N5 N5 + 6.64 N5 + 9.97

3n

N6 N6 + 4.19 N6 + 6.29

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.19

Page 81: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

NP-Completeness

Your boss says:

“Get me an efficient traveling-salesmanalgorithm, or else.”

What are you going to do?

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.20

Page 82: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Yes Ma’am, expect it this afternoon!”

Problem is

All known algorithms (essentially) check allpossible paths.

Exhaustive checking is exponential.

Good luck!

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.21

Page 83: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Yes Ma’am, expect it this afternoon!”

Problem is

All known algorithms (essentially) check allpossible paths.

Exhaustive checking is exponential.

Good luck!

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.21

Page 84: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Yes Ma’am, expect it this afternoon!”

Problem is

All known algorithms (essentially) check allpossible paths.

Exhaustive checking is exponential.

Good luck!

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.21

Page 85: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Hah!, I will prove that no such algorithm is possible”

Problem is, proving intractability is very hard.

Many important problems have

no known tractable algorithms

no known proof of intractability.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.22

Page 86: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Hah!, I will prove that no such algorithm is possible”

Problem is, proving intractability is very hard.

Many important problems have

no known tractable algorithms

no known proof of intractability.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.22

Page 87: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“I can’t find an efficient algorithm.I guess I’m just a pathetic loser. ”

Bad for job security.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.23

Page 88: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“The problem is NP-complete. I can’t findan efficient algorithm, but neither can anyof these famous people . . . ”

Advantage is:

The problem is “just as hard” as other problemssmart people can’t solve efficiently.

So it would do your boss no good to fire you andhire a Technion/Hebrew Univ./MIT graduate.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.24

Page 89: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“The problem is NP-complete. I can’t findan efficient algorithm, but neither can anyof these famous people . . . ”

Advantage is:

The problem is “just as hard” as other problemssmart people can’t solve efficiently.

So it would do your boss no good to fire you andhire a Technion/Hebrew Univ./MIT graduate.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.24

Page 90: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Would you settle for a pretty good, but not the best,algorithm?”

Intractability isn’t everything.

Find an approximate solution (is a solution within10% of optimum good enough, ma’am?).

Use randomization.

Fixed parameter algorithms may be applicable.

Heuristics can also help.

Approximation, randomization, etc. are amongthe hottest areas in complexity theory andalgorithmic research today.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.25

Page 91: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Would you settle for a pretty good, but not the best,algorithm?”

Intractability isn’t everything.

Find an approximate solution (is a solution within10% of optimum good enough, ma’am?).

Use randomization.

Fixed parameter algorithms may be applicable.

Heuristics can also help.

Approximation, randomization, etc. are amongthe hottest areas in complexity theory andalgorithmic research today.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.25

Page 92: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Would you settle for a pretty good, but not the best,algorithm?”

Intractability isn’t everything.

Find an approximate solution (is a solution within10% of optimum good enough, ma’am?).

Use randomization.

Fixed parameter algorithms may be applicable.

Heuristics can also help.

Approximation, randomization, etc. are amongthe hottest areas in complexity theory andalgorithmic research today.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.25

Page 93: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Would you settle for a pretty good, but not the best,algorithm?”

Intractability isn’t everything.

Find an approximate solution (is a solution within10% of optimum good enough, ma’am?).

Use randomization.

Fixed parameter algorithms may be applicable.

Heuristics can also help.

Approximation, randomization, etc. are amongthe hottest areas in complexity theory andalgorithmic research today.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.25

Page 94: Computational Models (Inroduction to the Theory …bchor/CM/Compute1_Intro.pdfMichael Sipser, Introduction to the theory of computation. Slides modified by Benny Chor, based on original

Response

“Would you settle for a pretty good, but not the best,algorithm?”

Intractability isn’t everything.

Find an approximate solution (is a solution within10% of optimum good enough, ma’am?).

Use randomization.

Fixed parameter algorithms may be applicable.

Heuristics can also help.

Approximation, randomization, etc. are amongthe hottest areas in complexity theory andalgorithmic research today.

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. – p.25