Theory of computation B. Srivathsan Chennai Mathematical Institute - - PowerPoint PPT Presentation

theory of computation
SMART_READER_LITE
LIVE PREVIEW

Theory of computation B. Srivathsan Chennai Mathematical Institute - - PowerPoint PPT Presentation

Theory of computation B. Srivathsan Chennai Mathematical Institute 1/31 http://www.cmi.ac.in/~sri/Courses/TOC2013 2/31 Why do this course? 3/31 Credits Contents of this talk are picked from / inspired by: Wikipedia Sipser:


slide-1
SLIDE 1

Theory of computation

  • B. Srivathsan

Chennai Mathematical Institute

1/31

slide-2
SLIDE 2

http://www.cmi.ac.in/~sri/Courses/TOC2013

2/31

slide-3
SLIDE 3

Why do this course?

3/31

slide-4
SLIDE 4

Credits

Contents of this talk are picked from / inspired by:

◮ Wikipedia ◮ Sipser: Introduction to the theory of computation ◮ Kleene: Introduction to metamathematics ◮ Emerson: The beginning of model-checking: A personal perspective ◮ Scott Aaronson’s course at MIT: Great ideas in theoretical CS

4/31

slide-5
SLIDE 5

1900 - 1940

5/31

slide-6
SLIDE 6

(Illustrations from Logicomix. Published by Bloomsbury) 6/31

slide-7
SLIDE 7

“ Those who don’t shave themselves are shaved by the barber ”

7/31

slide-8
SLIDE 8

“ Those who don’t shave themselves are shaved by the barber ” Who will shave the barber ?

7/31

slide-9
SLIDE 9

“ Those who don’t shave themselves are shaved by the barber ” Who will shave the barber ?

Bertrand Russell (1872 - 1970)

Russell’s paradox (1901) questioned Cantor’s set theory

7/31

slide-10
SLIDE 10

Foundational crisis of mathematics

New schools of thought emerged in early 20th century Intuitionist: Brouwer Formalist: Russell, Whitehead, Hilbert

8/31

slide-11
SLIDE 11

Hilbert’s programme

David Hilbert (1862 - 1943)

Goal: convert Mathematics to mechanical manipulation of symbols

9/31

slide-12
SLIDE 12

∀ : for all ∃ : there exists ∧ : and

◮ There are infinitely many primes

∀q ∃p ∀x, y [ p > q ∧ (x, y > 1 → xy = p) ]

◮ Fermat’s last theorem

∀a, b, c, n [ (a, b, c > 0 ∧ n > 2) → an + bn = cn ]

◮ Twin prime conjecture

∀q ∃p ∀x, y [ p > q ∧ (x, y > 1 → (xy = p ∧ xy = p + 2) ) ]

10/31

slide-13
SLIDE 13

∀ : for all ∃ : there exists ∧ : and

◮ There are infinitely many primes

∀q ∃p ∀x, y [ p > q ∧ (x, y > 1 → xy = p) ]

◮ Fermat’s last theorem

∀a, b, c, n [ (a, b, c > 0 ∧ n > 2) → an + bn = cn ]

◮ Twin prime conjecture

∀q ∃p ∀x, y [ p > q ∧ (x, y > 1 → (xy = p ∧ xy = p + 2) ) ] Hilbert’s Entscheidungsproblem (1928) Is there an “algorithm” that can take such a mathematical statement as input and say if it is true or false?

10/31

slide-14
SLIDE 14

Alonzo Church (1903 - 1995)

λ-calculus

Alan Turing (1912 - 1954)

Turing machines

Answer to Entscheidungsproblem is No (1935 - 1936)

11/31

slide-15
SLIDE 15

Intuitively, an algorithm meant “a process that determines the solution in a finite number of operations”

12/31

slide-16
SLIDE 16

Intuitively, an algorithm meant “a process that determines the solution in a finite number of operations” Intuitive notion not adequate to show that an algorithm does not exist for a problem!

12/31

slide-17
SLIDE 17

Church-Turing thesis

Intuitive notion of algorithms ≡ Turing machine algorithms

13/31

slide-18
SLIDE 18

Church-Turing thesis

Intuitive notion of algorithms ≡ Turing machine algorithms A prototype for a computing machine!

13/31

slide-19
SLIDE 19

Church-Turing thesis

Intuitive notion of algorithms ≡ Turing machine algorithms A prototype for a computing machine!

Advent of digital computers in the 40’s

13/31

slide-20
SLIDE 20

1900 - 1940

Precise notion of algorithm

14/31

slide-21
SLIDE 21

1940 - 1975

15/31

slide-22
SLIDE 22

How “efficient” is an algorithm? What is the “optimal” way of solving a problem? Can we do better than just “brute-force”?

16/31

slide-23
SLIDE 23

Computational complexity

Juris Hartmanis ( Born: 1928 ) Richard Stearns ( Born: 1936 )

Classification of algorithms based on time and space (1965)

17/31

slide-24
SLIDE 24

NP-completeness (1971 - 1973)

Stephen Cook ( Born: 1939 ) Leonid Levin ( Born: 1948 ) Richard Karp ( Born: 1935 )

Identified an important class of intrinsically difficult problems An easy solution to one would give an easy solution to the other!

18/31

slide-25
SLIDE 25

Some examples...

◮ Easy problems: sorting, finding shortest path in a graph ◮ Hard problems: scheduling classes for university

Computationally hard problems very important for cryptographers!

19/31

slide-26
SLIDE 26

1900 - 1940

Precise notion of algorithm

1940 - 1975

Hardness of problems

20/31

slide-27
SLIDE 27

1975 - present

21/31

slide-28
SLIDE 28

Computer programs (esp. large ones) are prone to ERRORS

22/31

slide-29
SLIDE 29

Computer programs (esp. large ones) are prone to ERRORS Is there a way to specify formally what a program is intended to do, and verify automatically if the program satisfies the specification

22/31

slide-30
SLIDE 30

Amir Pnueli ( 1941 - 2009 )

Temporal logic

Introduced a formalism to specify intended behaviours of programs (1977)

23/31

slide-31
SLIDE 31

Edmund Clarke ( Born: 1945 ) Allen Emerson ( Born: 1954 ) Joseph Sifakis ( Born: 1946 )

Model-checking

Automatically verify a program against its specification (1981)

24/31

slide-32
SLIDE 32

1900 - 1940

Precise notion of algorithm

1940 - 1975

Hardness of problems

1975 - present

Correctness of programs

25/31

slide-33
SLIDE 33

1900 - 1940

Precise notion of algorithm (Theory of computation)

1940 - 1975

Hardness of problems (Computational complexity theory)

1975 - present

Correctness of programs (Formal verification)

25/31

slide-34
SLIDE 34

1900 - 1940

Precise notion of algorithm (Theory of computation)

1940 - 1975

Hardness of problems (Computational complexity theory)

1975 - present

Correctness of programs (Formal verification)

This course: Theory of computation + bit of Computational complexity

25/31

slide-35
SLIDE 35

Problems → languages

26/31

slide-36
SLIDE 36

Decision problems Questions for which the answer is either Yes or No

◮ Is the sum of 5 and 8 equal to 12? ◮ Is 19 a prime number? ◮ Is the graph G1 connected?

Figure: G1

27/31

slide-37
SLIDE 37

Is the sum of 5 and 8 equal to 12 ?

28/31

slide-38
SLIDE 38

Is the sum of 5 and 8 equal to 12 ? Ladd = { (a, b, c) ∈ N × N × N | a + b = c } { (1, 3, 4), (5, 9, 14), (0, 2, 2), . . . }

28/31

slide-39
SLIDE 39

Is the sum of 5 and 8 equal to 12 ? Ladd = { (a, b, c) ∈ N × N × N | a + b = c } { (1, 3, 4), (5, 9, 14), (0, 2, 2), . . . } Is (5, 8, 12) ∈ Ladd ?

28/31

slide-40
SLIDE 40

Is the sum of 5 and 8 equal to 12 ? Ladd = { (a, b, c) ∈ N × N × N | a + b = c } { (1, 3, 4), (5, 9, 14), (0, 2, 2), . . . } Is (5, 8, 12) ∈ Ladd ? Is 19 a prime number ? Lprime = { x ∈ N | x is prime } { 1, 2, 3, 5, 7, 11, . . . } Is 19 ∈ Lprime ?

28/31

slide-41
SLIDE 41

Encoding graphs

graph := no. of vertices $ edge relation

  • 1

2

3 $ (0, 1)(1, 2)(0, 2)

  • 1

2 3

4 $ (0, 1)(1, 2)(0, 2)

29/31

slide-42
SLIDE 42

1 2

Is graph G1 connected?

30/31

slide-43
SLIDE 43

1 2

Is graph G1 connected? Lconn = { G | G is connected } Is G1 ∈ Lconn ?

30/31

slide-44
SLIDE 44

1 2

Is graph G1 connected? Lconn = { G | G is connected } Is G1 ∈ Lconn ?

Is 3 $ (0, 1)(1, 2)(0, 2) ∈ Lconn ?

30/31

slide-45
SLIDE 45

Decision problem P Input instance Yes? No? Language L Input word w w ∈ L? w / ∈ L?

31/31

slide-46
SLIDE 46

Decision problem P Input instance Yes? No?

ALGORITHM

Language L Input word w w ∈ L? w / ∈ L?

31/31

slide-47
SLIDE 47

Decision problem P Input instance Yes? No?

ALGORITHM

Language L Input word w w ∈ L? w / ∈ L?

??

31/31

slide-48
SLIDE 48

Decision problem P Input instance Yes? No?

ALGORITHM

Language L Input word w w ∈ L? w / ∈ L?

??

We answer “ ?? ” in this course

31/31

slide-49
SLIDE 49

Decision problem P Input instance Yes? No?

ALGORITHM

Language L Input word w w ∈ L? w / ∈ L?

??

We answer “ ?? ” in this course Main challenge: How to get a finite representation for languages?

31/31