1,238 views
1 votes
1 votes
Consider the following statements about the context free grammar
G = {S-->SS , S-->ab , S-->ba , S-->^}
I. G is ambiguous
II. G produces all strings with equal number of a’s and b’s
III. G can be accepted by a deterministic PDA.

Which combination below expresses all the true statements about ?

A) I only
B) I and III
C) II and II
D) All I,II,III

In a answer key shown answer D
but II is not right.

1 Answer

0 votes
0 votes
I think Ans  should be d. b'z it also generate equal no of a and equal no of b. If I m wrong Pl. Clear my confusion

Related questions

0 votes
0 votes
0 answers
1
raj_uddeshya157 asked Dec 27, 2023
67 views
Can $\Sigma^{*}$ be called DCFL? If yes, what would the state transition diagram of its PDA look like?
1 votes
1 votes
1 answer
2
2 votes
2 votes
0 answers
3
h4kr asked Nov 20, 2022
323 views
I think S1 is false because, for n=0, no 0’s will be added in stack, but in the transition to the next state (q2->q3) there is one mandatory 1 canceling out 0 in stack...
0 votes
0 votes
0 answers
4