Automata: The Methods & The Madness: Angkor Wat, Cambodia
Automata: The Methods & The Madness: Angkor Wat, Cambodia
Automata: The Methods & The Madness: Angkor Wat, Cambodia
(updated 2015/09/16)
1
Outline
2
1.1 Why Study Automata Theory?
push
start off on
push
Example 1.2 --- an FA modeling recognition of the keyword “then” in a lexical analyzer
The double circles specify the “final” or “accepting” state.
t h e n
start t th the then
Two other models (not automaton-like) for string data representation ---
Grammar --- processing data (strings of symbols) with recursive structures
e.g., grammatical rule “E E + E” for generating arithmetic expressions like “2+
2”
3
This is a question which can be answered by the study of computational complexity!
Computational complexity is a study of:
tractable problems solvable with slowly growing functions (like polynomial) of
input size, and
intractable problems solvable with fast growing functions (like exponential).
Intractability is the main topic of computational complexity.
1.2.0 Concepts
Formal proof techniques are indispensable for proving theorems in theory of computation.
Understanding how correct programs work is equivalent to proving theorems by
induction.
Logic principles
4
Proofs by counterexamples
1.5.1 Alphabets
Definition ---
An alphabet is a finite, nonempty set of symbols.
Conventional notation ---
The term “symbol” is usually undefined.
Examples ---
Binary alphabet = {0, 1}
English alphabet = {a, b, …, z} …
1.5.2 Strings
Definition ---
A string (or word) is a finite sequence of symbols from an alphabet.
An example --- 1011 is a string from the binary alphabet = {0, 1}.
5
Power of a string x (supplemental) ---
Defined by concatenation ---
xi = xx…x (x concatenated i times)
Defined by recursion ---
(1) x0 = (by definition); and
(2) xi = xxi-1
Examples --- (10)0 = , (011)2 = 011011…
Note --- for a symbol a, we define a0 = (i.e., in this case we regard a as a one-symbol
string).
1.5.3 Languages
Definition ---
A language is a set of strings all chosen from some *.
In other words:
if is an alphabet, and L*, then L is a language over .
Examples ---
The set of all legal English words is a language.
Why? What is the alphabet here?
Answer: the set of all letters.
A legal program of C is a language.
Why? What is the alphabet here?
Answer: a subset of the ASCII characters.
6
Description by generic elements ---
L4 = {x | x is over V = {a, b}, begins with a, followed by any number of b, possible
none}
Note: L4 = L3 = L2
Description by integer parameters ---
L5 = {abn | n 0}
Note: L5 = L4 = L3 = L2
1.5.4 Problems
A problem in automata theory ---
deciding whether a given string is a member of some particular language.