TransWikia.com

Convert the given NFA to DFA

Computer Science Asked by Vinay Varahabhotla on November 5, 2021

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

First simplifying $Lleft( aa^{ast }left( a+bright) right)$ we get

$Lleft( aa^{ast }left( a+bright) right)$ $= Lleft( aright) Lleft( a^{ast }right) Lleft( a+bright) $

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

enter image description here

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 .

2 Answers

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

enter image description here

Answered by Jut on November 5, 2021

See this page.

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.

Answered by Steven on November 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP