Construc a DFA for given language

90 Views Asked by At

The given language is this. $$L = \{a^nb : n \geq 0\}$$ Let $M = \left<\{q_0,q_1,q_2\},q_0,\Gamma=\{a,b\},\delta,\{q_2\}\right>$ be a DFA, where $q_0$ is the initial state, $q_2$ is the accept state.

For this language is this DFA accept it?? DFA of L

The trap state is for any input that is greater than any string in $L$ such as $aabb.$

1

There are 1 best solutions below

2
On

You need to add transitions $q_2\overset{a,b}\longrightarrow q_2$ to make it a true DFA, but otherwise it’s fine.