• retagged by
3,470 views

2 Answers

1 1 vote

Both the ambiguity problem (given a CFG, whether it is ambiguous) and the inherent ambiguity problem (given a CFG, whether its language is inherently ambiguous, i.e. whether any equivalent CFG is ambiguous) are undecidable. Here are the original references:

Since S-Grammer is also a CFG the ambiguity is undecidable

it is decidable whether a regular grammar is ambiguous (the inherent ambiguity problem is not very challenging on regular grammars, since the answer is invariably "no" without even looking at the input grammar). This can be checked in O(|G|2) using a squaring construction on its associated automaton: construct the product of the automaton with itself, and see whether some state (q,q′)(q,q′) with q≠q′q≠q′ is accessible and co-accessible. The oldest reference I know for this idea is a paper by Even (1965).

0 0 votes
1.the s grammar are of type V->TV* & for every <V,T> pair we have a unique production. clearly, this property of s grammar make it unambiguous.

2. for every regular set their exists at least one unambiguous regular grammar.
Position:
Show:

Related questions

0 0 votes
0 0 answers
453
453 views
admin asked May 20, 2023
453 views
Which of the following is (are) correct about the regular expression?$a a^{*} b b^{*} c c^{*} d d^{*}$$\text{A}$. The language for the given expression is:$\mathrm{L}=\le...
0 0 votes
0 0 answers
710
710 views
tarun_svbk asked Feb 24, 2018
710 views
Consider the language $L = \{a^nb^nc^m\}U \{a^nb^mc^m\}$ with $n$ and $m$ nonnegative. Which of the following options is correct?There is no context free grammar possible...
0 0 votes
0 0 answers
550
550 views
Naveen Kumar 3 asked Apr 14, 2019
550 views
Give an unambiguous grammar that generates the set of all regular expressions on $Σ =$ {$a,b$}.
0 0 votes
2 answers 2 answers
956
956 views
Garrett McClure asked Aug 31, 2017
956 views
Find a grammar that generates the language:L = {$w$$w^R$ : $w$ ∈ {a, b}+}