0

Consider below languages:

  1. $L_1=\{<M>|M$ is a regular expression which generates at least one string containing an odd number of 1's$\}$
  2. $L_2=\{<G>|G$ is context free grammar which generates at least one string of all 1's$\}$

Its given that both above languages are decidable, but no proof is given. I tried guessing. $L_1$ is decidable, its a set of regular expressions containing

  • odd number of $1$'s, or
  • even number of $1$'s and $1^+$ or
  • $1^*$

So we just have to parse regular expression for these characteristics. Is this right way to prove $L_1$ is decidable?

However, can we have some algorithm to check whether given input CFG accepts at least one string of all 1's? I am not able to come up with and hence not able prove how $L_2$ is decidable.

RajS
  • 1,737
  • 5
  • 28
  • 50

0 Answers0