Multiple choice

Consider the following languages:

L1 = {WWR | W$\in$ {0, 1}} L2 = {W # WR |W$\in$ {0, 1}} where # is a special symbol L3 = {WW | W$\in$ {0, 1}*}

Which of the following statements is true?

  1. L1 is a deterministic CFL.

  2. L2 is a deterministic CFL.

  3. L3 is a CFL, but not a deterministic CFL.

  4. L3 is a deterministic CFL.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In all the options, there is linear relationship among strings. So, all are CFLs, but L1 and L3 can be accepted by PDA. L2 can be accepted by deterministic CFL due to presence of special symbol D, which tells the middle of the string, so it is deterministic.