TOC | Union process in DFA



Prerequisite – Designing finite automata
Let’s understand the Union process in Deterministic Finite Automata (DFA) with the help of below example.

Designing a DFA for the set of string over {a, b} such that string of the language start and end with different symbols. There two desired language will be formed:

L1 = {ab, aab, aabab, .......}
L2 = {ba, bba, bbaba, .......} 

In L1, starting element is a and ending element is b but in L2, starting element is b and ending element is a.

State Transition Diagram for the language L1:

This DFA accepts all the string starting with a and ending with b. Here, State A, B and D is normal state but state C is final state.

State Transition Diagram for the language L2:

This DFA accepts all the string starting with b and ending with a. Here, State A, B and D is normal state but state C is final state.

Now, Taking the union of L1 and L2 language which gives the final result of the language which starts and end with different elements.
State Transition Diagram of L1 union L2:

Thus as we see that L1 and L2 have been combined through union process and this final DFA accept all the language containing strings starting and ending with a different symbols.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.