1 Finite Automata
1 Finite Automata
College of science
Department of Computer Science
Computation
Finite Automata
Lecture One
• Computer problems :
easy
hard
Example:
for y= abcde then we have abc as a prefix of y, and de
as a Suffix of y.
Languages
• Language is any set of strings over an alphabet ∑.
• If ∑ is an alphabet, then ∑* is the set of all strings over ∑.
• Eg: if ∑= {a, b, c} then ∑*= {ϵ, a, b, c, aa, ab, ac, ba,bb … ,
aaaaaabbbaababa, …}
• Iet L be language is any subset of ∑*.
• A language which can be formed over ‘ Σ ‘ can
be Finite or Infinite.
Some Operations on
Languages
• Concatenation
If L1 and L2 are languages, then L = L1◦ L2 (or simply
L1L2) is the set: L = {xy , x є L1, y є L2}
• Union
L1 ∪ L2 = {x| x є L1 or x є L2}
door
Top view of an Automatic door
• The controller is in either of two states: “OPEN” or “CLOSED”.
• There are four possible input conditions: “FRONT”, “REAR”,
“BOTH”, and “NEITHER”
• This controller is a computer with a single bit of memory,
capable of recording which of the two states the controller is in.
• Example 1
• Example 2
Deterministic Finite
Automata (DFA)
• Also known as deterministic finite state machine—
is a finite state machine that accepts/rejects finite
strings of symbols and only produces a unique
computation of the automaton for each input
string.
Input
String
Output
“Accept”
Finite or
Automaton “Reject”
27
Let ∑= {a,b} be an input alphabet, then all nodes in a
DFA for this alphabet must look like the this.
Step 1:
Step 2:
Step 3:
Step 4:
Step 2:
Step 2:
In the resulting DFA, all those states that contain the final state(s) of
Homework
State/ Alphabet 0 1
{A,B,C} {B,C} {A,B,C}
{B,C} {c} {B,C}
{C} {c} {c}