3,986 views

3 Answers

Best answer
6 votes
6 votes

Yes. It is not depend on Grammar that is ambiguous or unambiguous, that is depend on language (generated by Grammar) accepted by DPDA or NPDA. 

above Grammar is for language , Balanced parenthesis for which we can design DeterministicPDA
[ push "(" into stack and pop with ")" ]

so 3 is True.
2 is True, i guess valid parenthesis mean balanced parenthesis.

1 is True , as S=>()                             S=>(S) =>()  

selected by
8 votes
8 votes
1>If a language is accepted by a DPDA then this language should have an unambiguous grammar.

2>This does not mean that all languages that have an unambiguous grammar is accepted by a DPDA (for e.g ww^r).This language has an unambiguous grammar i.e S-->aSa | bSb | epsilon

3>If a grammar is inherently ambiguous then it is surely not accepted by a DPDA.

In your question the language of valid parenthesis has an unambiguous grammar i.e S-->(S)S | epsilon..Thus there can be a DPDA though we are not sure because of point 2.

Now we try to make a DPDA that can accept it, to be sure..we get is as...say Q1 is initial state and Q2 is final state..then the transitions will be..

( Q1,(,Z )---->( Q1,(Z )

( Q1,(,( )----->( Q1,(( )

( Q1,),( )------> (Q1 ,epsilon)

( Q1,epsilon,Z)-----> ( Q2,Z)

therefore, this language is accepted by a DPDA
0 votes
0 votes
DPDA can not accept ambiguous grammars.It even does not accept all unambiguous grammars.

Related questions

24 votes
24 votes
1 answer
1
Harsh Tripathi asked Jun 30, 2016
4,626 views
DANGLING ELSE PROBLEM:S->iEtSS' / aS'->∊/ eS E->b is a Deterministic context free grammar, and is ambiguous for "iEtiEtSeS" but ALL DCFG ARE UNAMBIGUOUS . so " how c...
1 votes
1 votes
1 answer
2
sripo asked Nov 2, 2018
907 views
Are right recursive grammars ambiguous?
2 votes
2 votes
0 answers
4
h4kr asked Feb 2, 2023
442 views
Can DCFL be ambiguous?