(aa+bb)(a+b)*(a+b+ab+ba)(a+b+ab+ba)*(aa+bab)*(a+b+aa)(a+b+bb+aa)*
Problem 1:
q0
q1
q2
q3
q4
q5
q6
q7
q8
T
DFA
S -> TUVWXYZ
T -> aa | bb
U -> aU | bU | ε
V -> a | b | ab | ba
W -> aW | bW | abW | baW | ε
X -> aaX | babX | ε
Y -> a | b | aa
Z -> aZ | bZ | bbZ | aaZ | ε
CFG
Start
Read1
Read2
Read3
Read4
Read5
Read6
Accept