# Finite automata with Examples and output

Let us see the Finite automata with Example and with output.
Suppose the Regular Expression is (a+b)* (a+b)a.
• 2 Accepted strings of length 1={ no possible string}
• 2 Accepted strings of length 2 = {aa , ba, no more possible string }
• 2 Accepted strings of length 5 = {ababa , bbaaa, and many more similar strings}
• 2 Accepted strings of length 8 = {ababbaaa , bbabaaba, and many more similar strings }
• 2 Accepted strings of length 10 = {aaabbababa , babaaabbaa, and many more similar strings }
• 2 Accepted strings of length 15 = {ababbaababbabaa , bbbaabbababbaba, and many more similar strings }
• 2 Accepted strings of length 20 = {aaabbbbbbbbbbaaaabba , bbaaabbaabbabababbaa, and many more similar strings }
• 2 Accepted strings of length 25={ababababbbbbbaaabbbbaabaa , bbbaaaabbabababababaaabba , Andmany more similar strings }
• And many more similar strings

0 to 1 | 1 to 2|

0 to 1 | 1 to 2|

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |2 to 2 |2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 |1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 |

• 2 Accepted strings of length 1={ no possible string}

• 2 Accepted strings of length 2={aa , ba , no more possible string }

• 2 Accepted strings of length 5={ababa , bbaaa , and many more similar strings}

• 2 Accepted strings of length 8={ababbaaa , bbabaaba , and many more similar strings }

• 2 Accepted strings of length 10={aaabbababa , babaaabbaa , and many more similar strings }

• 2 Accepted strings of length 15={ababbaababbabaa , bbbaabbababbaba , and many more similar strings }

• 2 Accepted strings of length 20={aaabbbbbbbbbbaaaabba , bbaaabbaabbabababbaa , and many more similar strings }

• 2 Accepted strings of length 25={ababababbbbbbaaabbbbaabaa , bbbaaaabbabababababaaabba , Andmany more similar strings }

• Andmany more similar strings

0 to 1 | 1 to 2|

0 to 1 | 1 to 2|

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 |

0 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |2 to 2 |2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 1 | 1 to 1 |1 to 2 | 2 to 2 | 2 to 1 | 1 to 2 | 2 to 2 |

0 to 1 | 1 to 1 | 1 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 1 | 1 to 2 | 2 to 2 | 2 to 2 | 2 to 1 | 1 to 1 | 1 to 2 |

## Finite Automata Exercise Solution

Here I am showing you a list of some more important Deterministic Finite Automata used in the theory of automata and theory of computation.

1. DFA for  (a+b)* (a+b)a .
2. DFA for (bb)*(aa)* .
3. DFA for  b+a(a+b)*+a.
4. DFA for (a+b)*b+(bb)*a.
5. DFA for bb+a(a+b)*+aa.
6. DFA for  a(a+b)*+bb(a)* .
7. DFA for  a(a+b)b*+bb(a)*.
8. DFA for  b(aa)*a+a(bb)*b.
9. DFA for a+a(aa+b)*(aa)b.
10. DFA for a+a(aa+b)*+(aa)b.
11. DFA for (a+b)b(a+b)*+(aa)*b.
12. FA for strings starting with a and ending with a.
13. FA for the language of all those strings starting with a.
14. FA for the language of all those strings containing aa as a substring.
15. DFA for the language of all those strings starting and ending with the same letters.
16. DFA for the language of all those strings starting and ending with different letters.
17. DFA for the language of all those strings having double 0 or double 1.
18. DFA for the language of all those strings starting and ending with b.
19. DFA for ending with b.
20. DFA for the string of even A’s and even b’s.
21. DFA for the regular expression of  a(a+b)*+(bb)+a(ba)*+aba+bb*(a+b)*.
22. RegExp and DFA for strings having triple a’s or triple b’s.