Automata Theory2 DR Odion 428
Automata Theory2 DR Odion 428
something)
Cryptography (the art of writing or solving codes)
Compilers (translators of source codes)
Circuit design
BRIEF HISTORY OF FINITE AUTOMATA
1936 Alan Turing invented the Turing machine, and proved that there
exists an unsolvable problem.
1940’s Stored-program computers were built.
String Operations
a) Concatenation
b) Substring
c) Reversal
(a) The concatenation of strings x and y, denoted
by xy or xy, is a string z such that:
z(i) = x(i) for 1 i length(x)
z(i) = y(i) for length(x)<ilength(x)+length(y)
Example:
automatacomputation = automatacomputation
The concatenation of string x for n times, where n0, is
denoted by xn
x0 =
x1 = x
x2 = x x
x3 = x x x
…
(b) Substrings :- Let x and y be strings over an alphabet Σ
The string x is a substring of y if there exist strings w
and z over Σ such that y = w x z.
ε is a substring of every string.
For every string x, x is a substring of x itself.
Example:
ε, comput and computation are substrings of
computation.
(c) Reversal
Let x be a string over an alphabet Σ
The reversal of the string x, denoted by xr, is a string such
that:
if x is ε, then xr is ε.
If a is in Σ, y is in Σ* and x = ay, then xr = yra.
Example:
(automata)r
= (utomata)r a
= (tomata)r ua
= (omata)r tua
= (mata)r otua
= (ata)r motua
= (ta)r amotua
= (a)r tamotua
= ()r atamotua
= atamotua
What is a Language?
A language over an alphabet Σ is a set of strings over Σ.
Let Σ = {0, 1} be the binary alphabet.
Le = {Σ* | the number of 1’s in is even}.
, 0, 00, 11, 000, 110, 101, 011, 0000, 1100, 1010, 1001,
0110, 0101, 0011, … are in Le
Operations on Languages
(q0 ∈ Q).
F is a set of final state/states of Q (F ⊆ Q).
Graphical Representation of a DFA
A DFA is represented by digraphs called state diagram.
The vertices represent the states.
The arcs labeled with an input alphabet show the
transitions.
The initial state is denoted by an empty single
incoming arc.
The final state is indicated by double circles.
Let a deterministic finite automaton be →
•Q = {a, b, c},
•∑ = {0, 1},
•q0 = {a},
•F = {c}, and
E.g. a 1 a2 a1 a1
s2
α = a1 s2 a2B a1 a1
When Turing machine (the control unit of TM) is at state 2 and the
current tape symbol is 0, write symbol 1 at current tape cell and go
to state 3.
The visualization of TM instruction (2, 0, 1, L, 3)
Turing Machine Conventions
(a) We always use state 1 as the initial state. (That is the
execution of the algorithm or program begins with stating of the
TM being 1.
(b) The tape is used for recording input and output, one symbol
per cell. Initially, the string to serve as input to our computation
is recorded beginning from the leftmost tape cell.
δ 0 1 #
q0 - - (q2, #, R)
q1 (q2, 0, R) (q1, #, R) (h, #, N)
q2 (q2, 0, L) (q2, 1, R) (h, #, N)
h - - -