MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is complement of LL(k) grammar context free?

share|cite|improve this question
What is LL(k)?? – Benjamin Steinberg Jun 1 '12 at 15:04

In general, the complement of a context-free language is not context-free. However, LL(k) languages are a strict subset of the deterministic CFLs.

The complement of a DCFL is also a DCFL, because it can be recognized by the same deterministic push-down automaton, just with the "accept" and "reject" states swapped.

So the answer to your question appears to be "yes, in fact it is deterministic context-free."

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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