371 views

1 Answer

0 votes
0 votes
I think we can do this by:

1)- construct a dfa for the regular language L.

2)- now construct a dfa on sigma for even length strings L1.

3)- now, construct a dfa for (L intersection L1).

4)- if the transition graph of  dfa for (L intersection L1) contains a cycle in a path from initial to final vertex, then it means it contains an infinite number of even length strings.

Otherwise if it is not accepting anything, means L does not contain any even length strings.

Or if there is not any cycle in the transition graph, then it means it is accepting finite strings of even length.

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
2
0 votes
0 votes
1 answer
4