[Math] Example of context-free but non regular language with context-free complement

context-free-grammarformal-languagesregular-language

As we know context-free languages are not closed under complement. But are there examples of non regular context-free languages which complement is context-free?

We know that regular languages is smallest class containing finite languages closed under sum, complement, concatenation and Kleene star. Context-free languages are similar but are not closed under complement. Does it mean that there are no such language?

Best Answer

Deterministic context-free languages are closed under complement.