welcome to mth401a !! theory of computation -...
TRANSCRIPT
Welcome to MTH401A !!
Theory of Computation
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
Question !
Akash Anand
• Can computers solve all computational problems?
Question !
Akash Anand
• Can computers solve all computational problems?– No !
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.
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 …
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 …
Computation
Akash Anand
Problem: Given two numbers, find their “sum”.
Computation
Akash Anand
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 …
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 …
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
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
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
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
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
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
Computation
Akash Anand
• Both computations produce unique answer to a given problem.
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.
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).
Description – Languages, Machines, etc.
Akash Anand
Computational Problem:
Given A and B, compute C, their “sum”.
Description – Languages, Machines, etc.
Akash Anand
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
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
Computational Problem:
Compute all primes p less than N.
Description – Languages, Machines, etc.
Akash Anand
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
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
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
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}
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
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}
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 !
Description – Languages, Machines, etc.
Akash Anand
Formalizing and understanding computing utilizes the idea of
languages.
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.
Course Outline
Akash Anand
Course Outline
Akash Anand
• Regular languages– Finite state machines.– Non-deterministic finite state machines.– Regular expressions.
– Algorithms to decide about regular languages.
Course Outline
Akash Anand
• Context free languages– Context free grammars.– Pushdown automata.– Algorithms for context free grammars.
Course Outline
Akash Anand
• Recursive and recursively enumerable languages– Turing machines.– Decidability of problems.
– What can be computed?– NP-completeness and beyond.
Evaluation Policy
Akash Anand
• Quizzes (Short, Unannounced) 20%
• Mid Semester Exam 30%
• End Semester Exam 50%
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