How can we show that the language $K = \{<M>: M \text{ is a finite automata and L(M) contains a word of form } a^ib^j\}$ is decidable?


1 Answer 1


Let $\hat M$ be the DFA for the language $L(a^*b^*)$ (aka, words of the form $a^ib^j$).

Construct the intersection DFA between $M$ and $\hat M$, and call it $M'$. Now, check if $L(M')=\emptyset$. If it does, reject. Otherwise, accept.

Here is useful material about intersection DFA and about checking the empty-ness of the DFA language


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.