Language L is not a context-free language.
But could L* be a context-free language?
Yes, this is possible. As an example, consider the alphabet Σ = {1} and let L be the language { 1 p | p is a prime number }. You can prove that this language is not context-free by using the pumping lemma.
However, the language L* is the set of all strings except for 1. The reason for this is that
This language is indeed context-free, and you can prove that by writing a grammar for it.
Hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.