Chapter 1 Introduction
Chapter 1 Introduction
1
Automata theory
.
2
Automaton
.
3
Con…
.
English mathematician
6
Con…
.
7
Con…
Halting— means that the program on certain input
will accept it and halt or reject it and halt.
Basically halting means terminating.
Halting Problem: There does not exist a Turing
machine
that always halts.
Undecidable: there is no Turing machine that
decides it.
Intractable: Certain computational problems are solvable in
8
principle, but the solutions require so much time or space that
Con…
.
9
THE CENTRAL CONCEPTS OF AUTOMATA THEORY
.
11
String operations
.
Length of String
12
String
.
13
Substring:
.
y2..... yn .
“superscript” notation:
14
Substring:
.
strings over the alphabet {0, 1} is (∈, 0,1, 00, 01, 10, 11,
000, ...).
15
Summary
.
16
Language
.
17
Language
.
Kleene Star: is the set of all strings that can be written as the concatenation
from L.
∈L
19
Example
.
(b) Given L = {anbn : n ≥0 } , check if the strings aabb, aaaabbbb, abb are in the language L.
(i) aa bb → a string in L. (n = 2)
20
Summary
.
21
Grammars
.
The set of all strings obtained by using production rules is the Language generated
by the Grammar.
If the grammar G = (V, T, S, P) then
L(G ) = {w∈T* :S w}
The string S, w1, w2, wn which contain variables as well as terminals, are called
23
.
Grammars
Example: Given a Grammar
G = ({S } , {a ,b}, S , P) with P defined as
S →aSb,
S→λ
24
.
Grammars
Applying the production rule S → aSb , we get
ai S bi ⇒ ai+1 S bi+1
This is true for all i.
In order to get a sentence we apply S → λ.
Therefore we get S an S bn ⇒an bn
There fore L(G) = {anbn ;n ≥ 0 }.
25
.
Grammars
26
Summary
.
27
Practical Examples
.
On/Off switch
actio
n
state
28
Structural expressions
.
Grammars
Regular expressions
E.g. Unix style to capture city names such as “Palo Alto CA”:
[A-Z][a-z]*([ ][A-Z][a-z]*)*[ ][A-Z][A-Z]
29
Some Applications
.
30
Exercise
Given L1={ab,bc,ca}, L2={aa,ac,cb} determine
a. L1L2
b. L1
c. L1- L2
d. L1L2
31
.
Questions ?
32