Beruflich Dokumente
Kultur Dokumente
a,b
1 – 2+
a,b
Task
Build an FA accepting the Language L of Strings,
defined over Σ = {a, b}, beginning with and
ending in same letters.
Solution:The language L may be expressed by
the following regular expression
(a+b)+a(a + b)*a + b(a + b)*b
This language L may be accepted by the
following FA
Solution continued …
a b a
a
b 6+
a
2+ 4
b
1– b a b
b
b
a 7+
3+ 5
a
Example
a b b
2 4+
a a
1–
b a
a
b
3 5+
b
Example
a,b
1 2+
(a + b)*
Example
a,b
a,b
– +
The above language may be expressed by the
following regular expression (a + b)+
Example
FA2 a,b
1 – 2
a,b a,b
a,b
FA3 1– 2 3
+
Note (Equivalent FAs)
b a,b
a
a
1- 2 3+
b
Example
Consider the language L of strings, defined over
Σ={0, 1}, having double 0’s or double 1’s, The
language L may be expressed by the regular
expression (0+1)* (00 +
11) (0+1)*
This language may be accepted by the following FA
Example Continued …
0 0
0,1
- 0 1 +
1
1
y
Example
a
a
b a,b
1–– a b 6+
b a
b
3 b 5
Example
1 3
b
a a a a
2 4
b
Summing Up