class0

Post on 26-Oct-2014

13 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CS311

Automata and Complexity Theory

Admistrative Stuff

• Instructor: Shahab Baqai (baqai@lums.edu.pk)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

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

Weights: Homework 06~08%Quizzes 17~19%Midterm 35%Final Exam 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 thanTuring machines (Finite State Automata, Pushdown Automata, . . . ), and specification means, such as grammars and regular expressions.

•NP-hardness = what cannot be efficiently computed

Courtesy Costas Busch - RPI 6

Computation

CPU memory

Courtesy Costas Busch - RPI 7

CPU

input memory

output memory

Program memory

temporary memory

Courtesy Costas Busch - RPI 8

CPU

input memory

output memoryProgram memory

temporary memory

3)( xxf

compute xx

compute xx 2

Example:

Courtesy Costas Busch - RPI 9

CPU

input memory

output memoryProgram memory

temporary memory

3)( xxf

compute xx

compute xx 2

2x

Courtesy Costas Busch - RPI 10

CPU

input memory

output memoryProgram memory

temporary memory3)( xxf

compute xx

compute xx 2

2x

42*2 z82*)( zxf

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

Courtesy Costas Busch - RPI 12

Automaton

CPU

input memory

output memory

Program memory

temporary memory

Automaton

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

Courtesy Costas Busch - RPI 14

input memory

output memory

temporary memory

Finite

Automaton

Finite Automaton

Example: Vending Machines

(small computing power)

Courtesy Costas Busch - RPI 15

input memory

output memory

Stack

Pushdown

Automaton

Pushdown Automaton

Example: Compilers for Programming Languages

(medium computing power)

Push, Pop

Courtesy Costas Busch - RPI 16

input memory

output memory

Random Access Memory

Turing

Machine

Turing Machine

Examples: Any Algorithm

(highest computing power)

Courtesy Costas Busch - RPI 17

Finite

Automata

Pushdown

Automata

Turing

Machine

Power of Automata

Less power More power

Solve more

computational problems

top related