class0

17
CS311 Automata and Complexity Theory

Upload: ammad-talib

Post on 26-Oct-2014

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: class0

CS311

Automata and Complexity Theory

Page 2: class0

Admistrative Stuff

• Instructor: Shahab Baqai ([email protected])Room # 428, Ext 4428

• Lectures: Mon & Wed 1530 – 1710 hrs. A-9

• Tutorials: As & When needed

• Office Hrs: Mon & Wed 1720 – 1820 hrs

• TAs: 3~4 (TBA) – Check course web foroffice hours etc

• Prerequisite: CS211 - Discrete Mathematics

•Website: http://suraj.lums.edu.pk/~cs311a04

Page 3: class0

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.

Page 4: class0

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 becommon. Each section may have different quizzes.

Weights: Homework 06~08%Quizzes 17~19%Midterm 35%Final Exam 40%

Page 5: class0

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 thanTuring machines (Finite State Automata, Pushdown Automata, . . . ), and specification means, such as grammars and regular expressions.

•NP-hardness = what cannot be efficiently computed

Page 6: class0

Courtesy Costas Busch - RPI 6

Computation

CPU memory

Page 7: class0

Courtesy Costas Busch - RPI 7

CPU

input memory

output memory

Program memory

temporary memory

Page 8: class0

Courtesy Costas Busch - RPI 8

CPU

input memory

output memoryProgram memory

temporary memory

3)( xxf

compute xx

compute xx 2

Example:

Page 9: class0

Courtesy Costas Busch - RPI 9

CPU

input memory

output memoryProgram memory

temporary memory

3)( xxf

compute xx

compute xx 2

2x

Page 10: class0

Courtesy Costas Busch - RPI 10

CPU

input memory

output memoryProgram memory

temporary memory3)( xxf

compute xx

compute xx 2

2x

42*2 z82*)( zxf

Page 11: class0

Courtesy Costas Busch - RPI 11

CPU

input memory

output memoryProgram memory

temporary memory3)( xxf

compute xx

compute xx 2

2x

42*2 z82*)( zxf

8)( xf

Page 12: class0

Courtesy Costas Busch - RPI 12

Automaton

CPU

input memory

output memory

Program memory

temporary memory

Automaton

Page 13: class0

Courtesy Costas Busch - RPI 13

Different Kinds of Automata

Automata are distinguished by the temporary memory

• Finite Automata: no temporary memory

• Pushdown Automata: stack

• Turing Machines: random access memory

Page 14: class0

Courtesy Costas Busch - RPI 14

input memory

output memory

temporary memory

Finite

Automaton

Finite Automaton

Example: Vending Machines

(small computing power)

Page 15: class0

Courtesy Costas Busch - RPI 15

input memory

output memory

Stack

Pushdown

Automaton

Pushdown Automaton

Example: Compilers for Programming Languages

(medium computing power)

Push, Pop

Page 16: class0

Courtesy Costas Busch - RPI 16

input memory

output memory

Random Access Memory

Turing

Machine

Turing Machine

Examples: Any Algorithm

(highest computing power)

Page 17: class0

Courtesy Costas Busch - RPI 17

Finite

Automata

Pushdown

Automata

Turing

Machine

Power of Automata

Less power More power

Solve more

computational problems