-2

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?

nir shahar
  • 11,538
  • 3
  • 14
  • 35

1 Answers1

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

nir shahar
  • 11,538
  • 3
  • 14
  • 35