Download presentation
Presentation is loading. Please wait.
Published byRhoda Patterson Modified over 9 years ago
1
1 An Introduction to Formal Languages and Automata Provided by : Babak Salimi webAdd: http://utopie.ir/http://utopie.ir/ Email: bhm.salimi@gmail.com
2
2 Textbook: Webadd: http://itla.ir/
3
What is automata theory ? Automata theory is the study of abstract computational devices Abstract devices are (simplified) models of real computations Computations happen everywhere: On your laptop, on your cell phone, in nature, … Why do we need abstract models?
4
A simple computer BATTERY SWITCH input: switch output: light bulb actions: flip switch states: on, off
5
A simple “computer” BATTERY SWITCH off on start f f input: switch output: light bulb actions: f for “flip switch” states: on, off bulb is on if and only if there was an odd number of flips
6
Another “computer” BATTERY off start 1 inputs: switches 1 and 2 actions: 1 for “flip switch 1” actions: 2 for “flip switch 2” states: on, off bulb is on if and only if both switches were flipped an odd number of times 1 2 1 off on 1 1 2 2 2 2
7
A design problem Can you design a circuit where the light is on if and only if all the switches were flipped exactly the same number of times? 4 BATTERY 1 2 3 5 ?
8
A design problem Such devices are difficult to reason about, because they can be designed in an infinite number of ways By representing them as abstract computational devices, or automata, we will learn how to answer such questions
9
These devices can model many things They can describe the operation of any “small computer”, like the control component of an alarm clock or a microwave They are also used in lexical analyzers to recognize well formed expressions in programming languages: ab1 is a legal name of a variable in C 5u= is not
10
10 Computation CPU memory Outline of the course contents
11
11 CPU input output Program memory temporary memory
12
12 CPU input output Program memory temporary memory compute Example:
13
13 CPU input output Program memory temporary memory compute
14
14 CPU input output Program memory temporary memory compute
15
15 CPU input output Program memory temporary memory compute
16
16 Automaton CPU input output Program memory temporary memory Automaton
17
17 Automaton input output temporary memory Automaton state transition
18
18 Different Kinds of Automata Automata are distinguished by the temporary memory Finite Automata: no temporary memory Pushdown Automata: stack Turing Machines: random access memory
19
19 input output temporary memory Finite Automaton Example: Elevators, Vending Machines (small computing power)
20
20 input output Stack Pushdown Automaton Pushdown Automaton Example: Compilers for Programming Languages (medium computing power) Push, Pop Temp. memory
21
21 input output Random Access Memory Turing Machine Turing Machine Examples: Any Algorithm (highest computing power) Temp. memory
22
22 Finite Automata Pushdown Automata Turing Machine Power of Automata Less powerMore power Solve more computational problems Simple problems More complex problems Hardest problems
23
23 Turing Machine is the most powerful computational model known Question: Are there computational problems that a Turing Machine cannot solve? Answer: Yes(unsolvable problems)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.