Sie sind auf Seite 1von 17

CS311 Automata and Complexity Theory

Admistrative Stuff
Instructor: Shahab Baqai (baqai@lums.edu.pk) Room # 428, Ext 4428 Lectures: Tutorials: TAs: Mon & Wed 1530 1710 hrs. A-9 As & When needed 3~4 (TBA) Check course web for office hours etc http://suraj.lums.edu.pk/~cs311a04

Office Hrs: Mon & Wed 1720 1820 hrs

Prerequisite: CS211 - Discrete Mathematics Website:

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 form 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: SJ. E. Hopcroft, R. Motwani, and J. D. Ullman Introduction to Automata Theory, Languages, and Computation, Second Edition, Addison-Wesley, New York, 2001. Sections: There are two parallel sections. The material covered in each will be the same. The 6~8 assignments, midterm and Final will be common. Each section may have different quizzes. Weights: Homework Quizzes Midterm Final Exam 06~08% 17~19% 35% 40%

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

memory

Courtesy Costas Busch - RPI

temporary memory input memory CPU output memory Program memory

Courtesy Costas Busch - RPI

Example:
temporary memory

f ( x) = x

input memory CPU Program memory compute compute output memory

xx x x
8

Courtesy Costas Busch - RPI

f ( x) = x
temporary memory

input memory

x=2
CPU Program memory compute compute output memory

xx x x
9

Courtesy Costas Busch - RPI

temporary memory

z = 2*2 = 4 f ( x) = z * 2 = 8

f ( x) = x

input memory

x=2
CPU Program memory compute compute output memory

xx x x
10

Courtesy Costas Busch - RPI

temporary memory

z = 2*2 = 4 f ( x) = z * 2 = 8

f ( x) = x

input memory

x=2
CPU Program memory compute compute

f ( x) = 8
output memory

xx x x
2

Courtesy Costas Busch - RPI

11

Automaton
temporary memory Automaton CPU output memory Program memory

input memory

Courtesy Costas Busch - RPI

12

Different Kinds of Automata


Automata are distinguished by the temporary memory Finite Automata: Pushdown Automata: Turing Machines: no temporary memory stack 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 Automata

Pushdown Automata

Turing Machine

Less power

More power Solve more computational problems


Courtesy Costas Busch - RPI 17

Das könnte Ihnen auch gefallen