# Convert the given NFA to DFA

I am trying to find an DFA for the regular language given by the expression $$L\left( aa^{\ast }\left( a+b\right) \right)$$.

First simplifying $$L\left( aa^{\ast }\left( a+b\right) \right)$$ we get

$$L\left( aa^{\ast }\left( a+b\right) \right)$$ $$= L\left( a\right) L\left( a^{\ast }\right) L\left( a+b\right)$$

Then I constructed an NFA for it , which is given below :

But I am not able to simplify the above NFA to a DFA as the state $$q_1$$ has two $$\lambda$$ transitions and I am not understanding how to deal with them .

• Hi Vinay, are you seen my solution for your problem? – Rostami.M Jul 17 at 4:25

After simplifying $$L(aa^∗(a+b))$$ to $$L(a^+(a+b))$$ you can draw below $$DFA$$ for $$L$$.

• Hello, thx for the solution. Even I tried to solve the problem after you posted and got the same answer . – Vinay Varahabhotla Jul 17 at 6:45
• You can accept it, if it's useful for you. – Rostami.M Jul 17 at 6:47
• Yes yes thx for the solution – Vinay Varahabhotla Jul 17 at 6:47
• So please click on Accept tick below vote rate that indicate exactly left side of the answer. – Rostami.M Jul 17 at 6:49
• @VinayVarahabhotla – Rostami.M Jul 17 at 6:52

Essentially, create a new DFA $$D$$ in which the set of states $$Q$$ is the powerset of the set of states of your NFA $$N$$. For $$q \in Q$$ and $$a \in \Sigma$$, add transition $$\delta(q,a) = q'$$ to $$D$$, if and only if, the set of states of $$N$$ that are reachable (in $$N$$) from at least one state in $$q$$ by reading character $$a$$ is exactly $$q'$$.
Mark a state of $$q \in Q$$ as a final state in $$D$$ if and only if $$q$$ contains a final state of $$N$$. If $$q_0$$ is the initial state of $$N$$, then the initial state of $$D$$ is the set of states if $$N$$ that are reachable by $$q_0$$ using only $$\varepsilon$$-transitions.