CS311 Automata and Complexity Theory

Download Report

Transcript CS311 Automata and Complexity Theory

CS311
Automata and Complexity Theory
Admistrative Stuff
• Instructor: Shahab Baqai ([email protected])
Room # 428, Ext 4428
• Lectures:
Mon & Wed 1530 – 1710 hrs. A-12
• Tutorials:
As & When needed
• Office Hrs: Fri 1100 – 1300 hrs (or by appointment)
• TAs:
Check course web for contact info
and office hours etc
• Prerequisite: CS211 - Discrete Mathematics
•Website:
http://suraj.lums.edu.pk/~cs311w06
Admistrative Stuff (cont.)
Questions: We prefer that you post your
question to the class discussion form. The TA
will try to respond to all questions on the forum
within 24 hours (48 hours Max). This way
everyone gets the benefit of reading the
replies, and it helps to reduce the number of
repeat questions.
For questions that are not suitable to be posted
to the newsgroup (e.g. questions about your
grade), you can email your TA directly although
there is no guarantee of when you will receive a
reply.
Course Organization
Text Book:
J. E. Hopcroft, R. Motwani, & J. D. Ullman
Introduction to Automata Theory,
Languages, and Computation, Second Edition,
Addison-Wesley, New York, 2001.
Instruments:
There will be 6~10 assignments, 10~12 quizzes,
01 midterm and 01 final (will be comprehensive)
Weights:
Homework
Quizzes
Midterm
Final Exam
05~10%
15~20%
30~35%
40~45%
What we will do
• Automata = abstract computing devices
• Turing studied Turing Machines (= computers)
before there were any real computers
• We will also look at simpler devices than
Turing machines (Finite State Automata,
Pushdown Automata, . . . ), and specification
means, such as grammars and regular expressions.
• NP-hardness = what cannot be efficiently
computed
Computation
CPU
Courtesy Costas Busch - RPI
memory
6
temporary memory
input memory
CPU
output memory
Program memory
Courtesy Costas Busch - RPI
7
Example:
f ( x)  x
3
temporary memory
input memory
CPU
output memory
Program memory
compute
xx
compute
x x
2
Courtesy Costas Busch - RPI
8
f ( x)  x
temporary memory
3
input memory
x2
CPU
output memory
Program memory
compute
xx
compute
x x
2
Courtesy Costas Busch - RPI
9
temporary memory
z  2*2  4
f ( x)  z * 2  8
f ( x)  x
3
input memory
x2
CPU
output memory
Program memory
compute
xx
compute
x x
2
Courtesy Costas Busch - RPI
10
temporary memory
z  2*2  4
f ( x)  z * 2  8
f ( x)  x
3
input memory
x2
CPU
Program memory
compute
xx
compute
x x
f ( x)  8
output memory
2
Courtesy Costas Busch - RPI
11
Automaton
temporary memory
Automaton
input memory
CPU
output memory
Program memory
Courtesy Costas Busch - RPI
12
Different Kinds of Automata
Automata are distinguished by the temporary memory
• Finite Automata:
no temporary memory
• Pushdown Automata:
stack
• Turing Machines:
random access memory
Courtesy Costas Busch - RPI
13
Finite Automaton
temporary memory
Finite
Automaton
input memory
output memory
Example: Vending Machines
(small computing power)
Courtesy Costas Busch - RPI
14
Pushdown Automaton
Stack
Push, Pop
Pushdown
Automaton
input memory
output memory
Example: Compilers for Programming Languages
(medium computing power)
Courtesy Costas Busch - RPI
15
Turing Machine
Random Access Memory
Turing
Machine
input memory
output memory
Examples: Any Algorithm
(highest computing power)
Courtesy Costas Busch - RPI
16
Power of Automata
Finite
Pushdown
Automata
Turing
Automata
Machine
Less power
More power
Solve more
computational problems
Courtesy Costas Busch - RPI
17