2
$\begingroup$

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

$\endgroup$

1 Answer 1

3
$\begingroup$

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

$\endgroup$
2
  • $\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$
    – Maha
    Nov 9, 2019 at 20:23
  • 1
    $\begingroup$ Good observation. There are indeed nonlinear DCFL. An example is the set of strings with matching parentheses. $\endgroup$ Nov 10, 2019 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.