492 views
7 votes
7 votes

A language $L$ has the prefix property if there are no two distinct strings in $L,$ such that one is a prefix of the other. Which of the following language classes has/have prefix property? (Mark all the appropriate choices)

  1. Finite Languages
  2. Regular Languages
  3. Deterministic Context Free Languages
  4. Deterministic Context Free Languages accepted by Empty Stack Push Down Automata

1 Answer

Best answer
4 votes
4 votes
Only deterministic CFL accepted by empty stack has prefix property. $L = \{a,aa\}$ is a simple counter example for the other three options as it does not satisfy the prefix property but is still finite and hence regular as well as DCFL too.
selected by
Answer:

Related questions