Professional Documents
Culture Documents
a b
Start x y z
y x z
Final z z z
▪ Even though it is no more than a table of
symbols, we consider an FA to be a
machine, that is, we understand that this
FA has dynamic capabilities. It moves. it
process inputs.
▪ We may make the definition of FAs even
more mathematically abstract by
replacing the transition table with a total
function whose input is a pair of state and
alphabet letter and whose output is a
single state.
▪ This function is called the transition function,
usually denoted δ (lowercase Greek delta)
The abstract definition of an FA is
then
1.A finite set of states Q = {q0 q1 q2…} of which
q0 is the start state.
2.A subset of Q called the final state.
3.An alphabet ∑={x0 x1 x2…).
4.A transition function δ associating each pair of
state and letter with a state:
δ(q1 , xj ) = xk:
Note: we never refer to this transition
function again….
▪ Transition Diagram - a pictorial
representation of an FA that gives us
more of a feel for the motion
▪ We begin by representing each state by a small
circle.
▪ From each state, we draw arrows showing to
which other states the different letters of the
input alphabet will lead us.
▪ We label these arrows with the corresponding
alphabet letters.
▪ We make a loop indicating that a certain letter
makes a state go back to itself
▪ We indicate the start state:
by labeling it with the word “start”
by a minus sign (-)
an arrow
▪ We indicate the final state:
by word “final”
by plus sign (+)
drawing a box or another circle around its
circle
▪ Create the diagram of the FA we have just
defined earlier.
a
-
a
b b
+
a b
One of many FAs that accepts all words
is a, b
b
In this case, we can say that the graph is
disconnected
a, b
a, b
- +
a, b
▪ Given the diagram below
a a, b
- +
a a, b
a, b a, b
1- 2 3
b a, b
5+
b a a
- +
b b
a a, b
a, b
Create an FA that accepts exactly
two strings baa and ab
a a b a a
+ - +
a b
a, b a, b
a, b
▪ What is the language accepted by this
machine?
a
b
1- 2
b
a b
3+ 4
b
a
a
▪ This FA accepts the language in the previous
FA and null(^)
a a
b
±
b b
a
How can you define the language
expressed by the FA below?
a,b
a,b
±
Create
the FA that figures out the
language that accepts all words that
ends with the letter a
a
b a
+
-
= b*ab*(ab*ab*)*
Create the FA of the language
associated with the regular expressions:
(5 pts each)
▪ (a+b)*a
▪ ^ + ((a+b)*a)
▪ (a+b)* aa (a+b)*
Create an FA that accepts all words that
have different first and last letters. It is
associated with the Regular expression
a(a+b)*b + b(a+b)*a (15 pts)
▪ Build an FA that accepts only the language of
all words with b as the second letter
▪ Build an Fa that accepts only the words baa,
ab and abb and no other strings longer or
shorter
▪ Build an FA that accept only those words that
have more than four letters
Build an FA that accepts only those
words that do not end with ba.
Build an FA that accepts only those
words that begin or end with a
double letter.
Build an FA that accepts only those
words that have an even number of
substrings ab.
Consider the picture below
b
1± 2
b
a a a a
b
3 4