Back to the 2019 paper

Module 2: Context-free languages and pushdown automata

20192m

Consider the following statements about the context-free grammar:
(1) G={SSS,Sab,Sba,Sϵ}G = \{S \to SS, S \to ab, S \to ba, S \to \epsilon\}
(2) GG is ambiguous
(3) GG produces all strings with equal number of aa's and bb's

GG can be accepted by a deterministic PDA. Which combination below expresses all the true statements about GG?
(i) 1 only
(ii) 1 and 3
(iii) 2 and 3
(iv) 1, 2 and 3

Similar questions