1-Automata Lec1
1-Automata Lec1
AUTOMATA THEORY
Lecture 1: Introduction
Why Study Automata?
• A survey of Stanford grads 5 years out asked which
of their courses did they use in their job.
• Basics like CS106 (Programming courses) took the
top spots, of course.
• But among optional courses, CS154 (Introduction to
Automata and Complexity Theory) stood
remarkably high.
• One of the most fundamental courses of Computer
Science.
• It is mainly about what kind of things can really
compute mechanically.
2
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?
Finite automata model protocols,
electronic circuits, …
Theory is used in model-checking
BATTERY
input: switch
output: light bulb
actions: flip switch
states: on, off
A simple “computer”
input: switch
output: light bulb bulb is on if and only if
there was an odd number
actions: f for “flip switch” of flips
states: on, off
Another “computer”
1
BATTERY
2 2 2 2
BATTERY
1
2
off on
1
$10
$5 $15
$5
start $0 $5 $5 $10 $5
一五
A gumball machine
machine takes $5 and $10 coins
a gumball costs $15
actions: +5, +10elease
一五 +10 +10
+5 +5 +5, +10
$0 $5 $10
+5, +10
A design problem
1 4
?
5
BATTERY
18
Some devices we will see
• Grammars
– Grammars describe the meaning of sentences in
English, and the meaning of programs in Java
– We will see how to extract the meaning out of a
program
Theory of computations layers
Undecidable
Turing Machine
CFL
FSM