# 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:

L_{1}= {ab, aab, aabab, .......} L_{2}= {ba, bba, bbaba, .......}

L_{1}= {starts with a and ends with b } and L_{2}= {starts with b and ends with a}.

Then L= L_{1} ∪ L_{2} or L=L_{1} + L_{2}

**State Transition Diagram for the language L _{1}:**

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

**State Transition Diagram for the language L _{2}:**

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

Now, Taking the union of L_{1} and L_{2} language which gives the final result of the language which starts and end with different elements.

**State Transition Diagram of L _{1} ∪ L_{2}:**

Thus as we see that L

_{1}and L

_{2}have been combined through union process and this final DFA accept all the language containing strings starting and ending with a different symbols.

**Note:**From above example we can also infer that regular languages are closed under union(i.e Union of two regular languages is also regular).

## Recommended Posts:

- Operating System | Process Table and Process Control Block (PCB)
- Theory of Computation | Union & Intersection of Regular languages with CFL
- TOC | Concatenation process in DFA
- TOC | Reversal process in DFA
- TOC | Complementation process in DFA
- Difference between Process and Thread
- Inter Process Communication
- Computer Network | TCP 3-Way Handshake Process
- MCQ on Memory allocation and compilation process
- Operating Systems | States of a process
- Operating System | Process Synchronization | Set 2
- Operating System | Process Synchronization | Introduction
- Operating System | Lottery Process Scheduling
- Operating System | Process-based and Thread-based Multitasking

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.