Deterministic Context free languages are always unambiguous. Now DCFL are a subset of linear languages. Are there any linear languages which are inherently ambiguous?


The linear language $\{ a^ib^jc^k \mid i=j \text{ or } j=k\}$ is inherently ambiguous.

| cite | improve this answer | |
  • $\begingroup$ Question has a sentence saying "DCFL are a subset of linear languages." Is it correct? Wikipedia says: "linear languages that are regular languages are deterministic". And we know that there are DCFLs which are not regular. Hence, there must exists DCFLs which are not linear. Correct? $\endgroup$ – anir Nov 9 '19 at 20:23
  • 1
    $\begingroup$ Good observation. There are indeed nonlinear DCFL. An example is the set of strings with matching parentheses. $\endgroup$ – Hendrik Jan Nov 10 '19 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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