Lecture 4
Lecture 4
Lecture 4
1
Note
a, b
2
Example
Σ = {a,b}
States: x, y, where x is both initial and final
state.
Transitions:
1.At state x reading a or b go to state y.
2.At state y reading a or b go to state x.
3
Example Continued …
y x x
4
Example Continued …
a, b
x y
a, b
5
Example Continued …
((a+ b) (a + b))*
6
TASK
7
Solution of Task
a,b
– +
a,b
8
Example: Consider the language L of strings,
defined over Σ={a, b}, starting with b. The
language L may be expressed by RE b(a + b)* ,
may be accepted by the following FA
a,b
––
b +
a,b
a
1
9
Example:
Consider the language L of strings, defined
over Σ={a, b}, ending in a. The language L
may be expressed by RE
(a+b)*a
This language may be accepted by the following
FA
10
Example Continued …
b a a
– +
a
a +
––
a b
b
12
Note
13
Note
14
FA1 Corresponding to L1
a,b
––
a +
b a,b
a
+
a,b
b
16
Example
Consider the Language L of Strings of length
two or more, defined over Σ = {a, b},
beginning with and ending in same letters.
The language L may be expressed by the
following regular expression
a (a + b)* a + b (a + b)* b
It is to be noted that if the condition on the
length of string is not imposed in the above
language then the strings a and b will then
belong to the language.
This language L may be accepted by the
following FA 17
Example Continued …
b a a
+
a b
–
a b
b
b
+
a
18
Task
19
Summing Up
20