You are on page 1of 4

Theory of Automata(CS402)

Assignment No: 1
Student ID: BC190405733

Questions No 01
a) Construct a Regular Expression for the given language defined over ∑= {a, b, c}:
.The language should starts with b, and ends with a, and c occurs only once in a string as a third letter

Solution:

b (a + b) c (a + b)* a
b) Construct Finite Automata (FA) for the generated RE in part (a).

Solution:
Question No 2:
a) Draw a Transition Graph (TG) defining the following language over ∑= {a, b}:
All words starting with triple letters.

Solution:

(aaa + bbb) (a+b)*

b) Draw Generalized Transition Graph (GTG) of the language stated in part (a).

Solution:

c) Give transition table for the union of the given FA’s (FA1 U FA2).

Solution:
FA1:

FA2:

Solution:

Old states Reading a Reading b

x1, y1 =z1 x2, y2 =z2 x2, y2 =z2


x2, y2 =z2 + x2, y4 x2, y3 =z4 
=z3 
x2, y4 =z3 +  x2, y4 x2, y4 =z3 
=z3 
x2, y3 =z4 +  x2, y3 x2, y3 =z4 
=z4 

You might also like