welcome to mth401a !! theory of computation -...
TRANSCRIPT
![Page 1: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/1.jpg)
Welcome to MTH401A !!
Theory of Computation
![Page 2: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/2.jpg)
Contact Information
Akash Anand
• Instructor : Akash Anand
• Office : 327, Faculty Building• Phone : 7880 or 0512-259-7880
• Email : [email protected]
• Web : www.home.iitk.ac.in/~akasha
• Office Hours : – After class
– Any other times : • By email (preferred)
• By appointment
![Page 3: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/3.jpg)
Question !
Akash Anand
• Can computers solve all computational problems?
![Page 4: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/4.jpg)
Question !
Akash Anand
• Can computers solve all computational problems?– No !
![Page 5: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/5.jpg)
Question !
Akash Anand
• Can computers solve all computational problems?– No !– One of the primary goals of this course is
to formally show that “no” is indeed the correct answer.
![Page 6: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/6.jpg)
Question !
Akash Anand
• Can computers solve all computational problems?– No !– One of the primary goals of this course is
to formally show that “no” is indeed the correct answer.
– … we need to make sense of the question itself …
![Page 7: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/7.jpg)
Question !
Akash Anand
• Can computers solve all computational problems?– No !– One of the primary goals of this course is
to formally show that “no” is indeed the correct answer.
– … we need to make sense of the question itself …
![Page 8: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/8.jpg)
Computation
Akash Anand
![Page 9: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/9.jpg)
Problem: Given two numbers, find their “sum”.
Computation
Akash Anand
![Page 10: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/10.jpg)
Problem: Given two numbers, find their “sum”.
Computation
Akash Anand
Given numbers a and b
Produce a number csuch that c = a + b
add
multistep procedure involving symbolic
representation, reading, writing, remembering …
![Page 11: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/11.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is SEVEN plus THREE ?
Computation
Akash Anand
Given numbers a and b
Produce a number c such that c = a + b
add
multistep procedure involving symbolic
representation, reading, writing, remembering …
![Page 12: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/12.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is SEVEN plus THREE ?
Computation
Akash Anand
Given numbers a and b
Produce a number csuch that c = a + b
add
multistep procedure involving symbolic
representation, reading, writing, remembering …
73
symbol
symbol
![Page 13: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/13.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is SEVEN plus THREE ?
Computation
Akash Anand
Given numbers a and b
Produce a number csuch that c = a + b
add
multistep procedure involving symbolic
representation, reading, writing, remembering …
73
10
![Page 14: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/14.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is SEVEN plus THREE ?
Computation: 7 + 3 = 10
Computation
Akash Anand
Given numbers a and b
Produce a number csuch that c = a + b
add
multistep procedure involving symbolic
representation, reading, writing, remembering …
73
10
![Page 15: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/15.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is One million five hundred eighty eight thousand two hundred and seventy eight plus three million two hundred ninety two thousand eight hundred fifty nine?
Computation
Akash Anand
![Page 16: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/16.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is One million five hundred eighty eight thousand two hundred and seventy eight plus three million two hundred ninety two thousand eight hundred fifty nine?
Computation
Akash Anand
15882783292859
4881137
![Page 17: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/17.jpg)
Problem: Given two numbers, find their “sum”.
Problem Instance: What is One million five hundred eighty eight thousand two hundred and seventy eight plus three million two hundred ninety two thousand eight hundred fifty nine?
Computation: 1588278 + 3292859 = 4881137
Computation
Akash Anand
15882783292859
4881137
![Page 18: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/18.jpg)
Computation
Akash Anand
• Both computations produce unique answer to a given problem.
![Page 19: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/19.jpg)
Computation
Akash Anand
• Both computations produce unique answer to a given problem.
• Computational problem can be viewed as a function: Every valid input has a desired output.
![Page 20: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/20.jpg)
Computation
Akash Anand
• Both computations produce same answer to a given problem.
• Computational problem can be viewed as a function: Every valid input has a desired output.
• Computation: the process of deriving the desired output from given input(s).
![Page 21: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/21.jpg)
Description – Languages, Machines, etc.
Akash Anand
![Page 22: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/22.jpg)
Computational Problem:
Given A and B, compute C, their “sum”.
Description – Languages, Machines, etc.
Akash Anand
![Page 23: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/23.jpg)
Computational Problem:
Given A and B, compute C, their “sum”.
Simplified Computational Problem:
Given A, B and C, check if C is the “sum” of A and B.
Description – Languages, Machines, etc.
Akash Anand
![Page 24: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/24.jpg)
Computational Problem:
Given A and B, compute C, their “sum”.
Simplified Computational Problem:
Given A, B and C, check if C is the “sum” of A and B.• Output is YES or NO.
Description – Languages, Machines, etc.
Akash Anand
![Page 25: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/25.jpg)
Computational Problem:
Compute all primes p less than N.
Description – Languages, Machines, etc.
Akash Anand
![Page 26: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/26.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
Description – Languages, Machines, etc.
Akash Anand
![Page 27: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/27.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime }
Description – Languages, Machines, etc.
Akash Anand
![Page 28: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/28.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime } = { 2, 3, 5, 7, 11, 13, … }
Description – Languages, Machines, etc.
Akash Anand
![Page 29: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/29.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime } = { 2, 3, 5, 7, 11, 13, … }
Description – Languages, Machines, etc.
Akash Anand
members are strings of symbols coming from {0,1, 2, 3, 4, 5, 6, 7, 8, 9}
![Page 30: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/30.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime } = { 2, 3, 5, 7, 11, 13, … }
= { 10, 11, 101, 111, 1011, 1101, … }
Description – Languages, Machines, etc.
Akash Anand
![Page 31: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/31.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime } = { 2, 3, 5, 7, 11, 13, … }
= { 10, 11, 101, 111, 1011, 1101, … }
Description – Languages, Machines, etc.
Akash Anand
members are strings of symbols coming from {0,1}
![Page 32: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/32.jpg)
Computational Problem:
Compute all primes p less than N.
Simplified Computational Problem:
Given p, check if p is a prime.• Output is YES or NO.
• Solution of this problem is equivalent to checking the membership of the set
{ p : p is a prime } = { 2, 3, 5, 7, 11, 13, … }
= { 10, 11, 101, 111, 1011, 1101, … }
Description – Languages, Machines, etc.
Akash Anand
members are strings of symbols coming from {0,1}
Language !
![Page 33: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/33.jpg)
Description – Languages, Machines, etc.
Akash Anand
Formalizing and understanding computing utilizes the idea of
languages.
![Page 34: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/34.jpg)
Description – Languages, Machines, etc.
Akash Anand
Machine description.
Grammar description.
Two ways of describing a
language
Formalizing and understanding computing utilizes the idea of
languages.
![Page 35: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/35.jpg)
Course Outline
Akash Anand
![Page 36: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/36.jpg)
Course Outline
Akash Anand
• Regular languages– Finite state machines.– Non-deterministic finite state machines.– Regular expressions.
– Algorithms to decide about regular languages.
![Page 37: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/37.jpg)
Course Outline
Akash Anand
• Context free languages– Context free grammars.– Pushdown automata.– Algorithms for context free grammars.
![Page 38: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/38.jpg)
Course Outline
Akash Anand
• Recursive and recursively enumerable languages– Turing machines.– Decidability of problems.
– What can be computed?– NP-completeness and beyond.
![Page 39: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/39.jpg)
Evaluation Policy
Akash Anand
• Quizzes (Short, Unannounced) 20%
• Mid Semester Exam 30%
• End Semester Exam 50%
![Page 40: Welcome to MTH401A !! Theory of Computation - …home.iitk.ac.in/~akasha/mth401/lectures/Lecture1.pdf · 2016-11-11 · • Elements of the Theory of Computation – Christos H. Papadimitriou](https://reader030.vdocuments.us/reader030/viewer/2022021520/5b777d447f8b9ad2498cd9b5/html5/thumbnails/40.jpg)
Books
Akash Anand
• Elements of the Theory of Computation– Christos H. Papadimitriou
• Introduction to Automata Theory, Languages, and Computation– John E. Hopcroft, Rajeev Motwani, Jeffrey
D. Ullman