This question already has an answer here:

- What is the complexity of deciding if the intersection of a regular language and a context free language is empty? 1 answer
- Intersection between regular language and context-free language [closed] 1 answer
- Proof Idea: How to prove the intersection of regular language and CFL is a CFL? 2 answers
- Is there a *simple* proof that the intersection of a CFL and a regular language is a CFL? 4 answers
- Intersection of context free with regular languages 1 answer

Consider below languages:

- $ L_1=\{<M>|M$ is a regular expression which generates at least one string containing an odd number of 1’s$ \}$
- $ 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.