# DFA: Union

**URL:** <https://forum.kirupa.com/t/dfa-union/252085>\
**Category:** random\
**Created:** [February 15, 2008, 7:00pm UTC](https://forum.kirupa.com/t/dfa-union/252085 "2008-02-15T19:00:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdd](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kdd](https://forum.kirupa.com/u/kdd)\
**Post date:** [February 15, 2008, 7:00pm UTC](https://forum.kirupa.com/t/dfa-union/252085/1 "2008-02-15T19:00:45Z")

</div>

Hi.

I’m actually taking one class right now, if you know about DFA’s, you may be able to help me out.

1st language: {w|w has exactly two a’s} //This has 4 states.  
2nd language: {w|w has at least two b’s} //This has 3 states.

Making DFA for each is very easy, but I have no idea how to combine them so that the language becomes {w|w has exactly two a’s and at least two b’s} //Which should have 12 states.

Sigma (the language) = {a,b}

I have the answer from the book, but the book has no explanation as to how they got that… (Book sucks!)

Thanks!
