The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
51 views
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.
asked in Theory of Computation by (497 points) | 51 views
0
it should be $B$
0

@Anand sir

III is CFG thats why it is true right ?

+1
actually $G$ is regular language.

its regular expression will be

$(ab+ba)^*$ ,hence it will be DCFL too  and hence accepted by DPDA too.

Please log in or register to answer this question.



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

40,853 questions
47,514 answers
145,846 comments
62,274 users