If a language and its complement are context-free, is it regular?

97 Views Asked by At

If both $L$ and $\overline{L}$ are context-free, is $L$ necessarily regular?

1

There are 1 best solutions below

0
On BEST ANSWER

Every deterministic context-free language satisfies this, since the deterministic context-free languages are closed under complementation. Not all deterministic context-free languages are regular, for example $\{ a^n b^n : n \geq 0 \}$ isn't.