The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Prev
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged ambiguous
0
votes
0
answers
1
Ullman (Compiler Design) Edition 2 Exercise 4.8 Question 1 (Page No. 285  286)
The following is an ambiguous grammar for expressions with $n$ binary, infix operators, at $n$ ... ambiguous and unambiguous) grammars compare? What does that comparison tell you about the use of ambiguous expression grammars?
asked
1 day
ago
in
Compiler Design
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

1
view
ullman
compilerdesign
grammar
ambiguous
parsing
des
0
votes
0
answers
2
Ullman (Compiler Design) Edition 2 Exercise 4.3 Question 3 (Page No. 217)
The following grammar is proposed to remove the "danglingelse ambiguity" discussed in Section $4.3.2$: $stmt\rightarrow if\: expr\: then\: stmt\mid matchedstmt$ $matchedstmt \rightarrow if \:expr \:then \:matchedstmt\: else\: stmt\mid other$ Show that this grammar is still ambiguous.
asked
1 day
ago
in
Compiler Design
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

1
view
ullman
compilerdesign
grammar
ambiguous
descriptive
0
votes
0
answers
3
Ullman (Compiler Design) Edition 2 Exercise 4.2 Question 2 (Page No. 206  207)
Repeat Question $4.2.1$ for each of the following grammars and strings: $S\rightarrow 0S1\mid 01$ with string $000111$. $S\rightarrow +SS\mid \ast SS\mid a$ with string $+\ast aaa$ ... $bfactor\:\rightarrow\:not\:bfactor\mid (bexpr)\mid true\mid false$
asked
4 days
ago
in
Compiler Design
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

5
views
ullman
compilerdesign
contextfreegrammars
parsetree
ambiguous
descriptive
0
votes
1
answer
4
Ullman (Compiler Design) Edition 2 Exercise 4.2 Question 1 (Page No. 206)
Consider the contextfree grammar:$S\rightarrow SS + \mid SS {\ast} \mid a$and the string $aa + a{\ast}$. Give a leftmost derivation for the string. Give a rightmost derivation for the string. ... for the string. Is the grammar ambiguous or unambiguous? Justify your answer. Describe the language generated by this grammar.
asked
Aug 7
in
Compiler Design
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

28
views
ullman
compilerdesign
contextfreegrammars
parsetree
ambiguous
descriptive
+1
vote
2
answers
5
Ullman (Compiler Design) Edition 2 Exercise 2.2 Question 3 (Page No. 51)
Which of the grammars are ambiguous? $S\rightarrow 0S1 \mid 01$ $S\rightarrow +SS \mid SS \mid a$ $S\rightarrow S(S)S \mid \epsilon$ $S\rightarrow aSbS \mid bSaS \mid \epsilon$ $S\rightarrow a \mid S+S \mid SS \mid S^{\ast} \mid (S)$
asked
Jul 26
in
Compiler Design
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

17
views
ullman
compilerdesign
contextfreegrammars
ambiguous
+1
vote
0
answers
6
Self Doubt : Ambiguity
Why is ambiguity in regular language is decidable and not decidable in CFL ? Can you give Example?
asked
May 10
in
Theory of Computation
by
logan1x
(
399
points)

109
views
theoryofcomputation
finiteautomata
ambiguous
regularlanguages
contextfreelanguage
context
0
votes
1
answer
7
Michael Sipser Edition 3 Exercise 2 Question 9 (Page No. 155)
Give a contextfree grammar that generates the language $A=\{a^{i}b^{j}c^{k}\mid i=j$ $\text{or}$ $ j=k$ $\text{where}$ $ i,j,k\geq 0\}.$ Is your grammar ambiguous$?$ Why or why not$?$
asked
May 1
in
Theory of Computation
by
Lakshman Patel RJIT
Boss
(
45.1k
points)

13
views
michaelsipser
theoryofcomputation
contextfreelanguages
ambiguous
grammars
0
votes
0
answers
8
Peter Linz Edition 4 Exercise 5.2 Question 19 (Page No. 145)
Prove the following result. Let $G = (V, T, S, P )$ be a contextfree grammar in which every $A ∈ V$ occurs on the left side of at most one production. Then $G$ is unambiguous.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

13
views
peterlinz
theoryofcomputation
contextfreegrammars
ambiguous
0
votes
0
answers
9
Peter Linz Edition 4 Exercise 5.2 Question 18 (Page No. 145)
Is the string $aabbababb$ in the language generated by the grammar $S → aSSb$? Show that the grammar with productions $S\rightarrow aAb\lambda,$ $A\rightarrow aAb\lambda$ is unambiguous.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

17
views
peterlinz
theoryofcomputation
contextfreegrammars
ambiguous
0
votes
0
answers
10
Peter Linz Edition 4 Exercise 5.2 Question 16 (Page No. 145)
Show that the grammar with productions $S\rightarrow aAB,$ $A\rightarrow bBb,$ $B\rightarrow A\lambda.$ is unambiguous.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

23
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
11
Peter Linz Edition 4 Exercise 5.2 Question 15 (Page No. 145)
Show that the grammar with productions $S\rightarrow SS,$ $S\rightarrow \lambda,$ $S\rightarrow aSb,$ $S\rightarrow bSa.$ is ambiguous.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

32
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
12
Peter Linz Edition 4 Exercise 5.2 Question 14 (Page No. 145)
Show that the grammar $S\rightarrow aSbSS\lambda$ is ambiguous, but that the language denoted by it is not.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

16
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
13
Peter Linz Edition 4 Exercise 5.2 Question 13 (Page No. 145)
Show that the following grammar is ambiguous. $S\rightarrow aSbSbSaS\lambda$
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

15
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
14
Peter Linz Edition 4 Exercise 5.2 Question 11 (Page No. 145)
Is it possible for a regular grammar to be ambiguous?
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

13
views
peterlinz
theoryofcomputation
regulargrammar
ambiguous
0
votes
0
answers
15
Peter Linz Edition 4 Exercise 5.2 Question 7 (Page No. 145)
Construct an unambiguous grammar equivalent to the grammar in Exercise 6.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

18
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
16
Peter Linz Edition 4 Exercise 5.2 Question 6 (Page No. 145)
Show that the following grammar is ambiguous. $S\rightarrow ABaaB,$ $A\rightarrow aAa,$ $B\rightarrow b.$
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

14
views
peterlinz
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
17
Peter Linz Edition 4 Exercise 5.2 Question 4 (Page No. 145)
Show that every sgrammar is unambiguous.
asked
Apr 14
in
Theory of Computation
by
Naveen Kumar 3
Boss
(
14k
points)

8
views
peterlinz
theoryofcomputation
ambiguous
grammar
0
votes
0
answers
18
DFA NFA and ambiguity
Why is Regular grammar obtained from DFA always unambiguous? Why Regular grammar obtained from NFA may or may not be ambiguous?
asked
Dec 7, 2018
in
Theory of Computation
by
OneZero
Active
(
2.1k
points)

45
views
theoryofcomputation
nfa
ambiguous
0
votes
1
answer
19
Doubt in Grammar
Consider the following grammar which of the following is/are ambiguous? (i) S → y  SxS (ii) S → E  ExS and E → y (iii) S → Sxy  y
asked
Sep 11, 2018
in
Theory of Computation
by
goluabhinan
(
55
points)

51
views
theoryofcomputation
grammar
ambiguous
0
votes
0
answers
20
UGC NET DEC 2017 PAPER 2 Q 34
Which of the following statements is/are TRUE ? (i) The grammar S → SS  a is ambiguous (where S is the start symbol). (ii) The grammar S → 0S1  01S  e is ambiguous (the special symbol e represents the empty string and S is the start symbol). (iii) The grammar ... TRUE (D) All of (i), (ii) and (iii) are TRUE Sure shot (i) and (ii) are true i want third one in brief
asked
Jun 19, 2018
in
Compiler Design
by
Nikhil Patil
(
489
points)

263
views
compilerdesign
grammar
ambiguous
0
votes
0
answers
21
Compiler design
Hi mates, Show that it is ambiguous grammar TIA S>aAB/bBA A>bS/a B>aS/b
asked
Nov 24, 2017
in
Compiler Design
by
Sahil1994
Junior
(
903
points)

74
views
compilerdesign
ambiguous
+1
vote
1
answer
22
UGCNETNov2017ii34
Which of the following statements is/are TRUE ? (a) The grammar $S \rightarrow SS\ \ a$ is ambiguous. (Where $S$ is the start symbol) (b) The grammar $S \rightarrow 0S1\ \ 01S\ \ \epsilon$ is ambiguous. (The special symbol $\epsilon$ represents the empty string) (Where $S$ is the ... and (c) are TRUE. $(3)$ Only (b) and (c) are TRUE. $(4)$ All of (a), (b) and (c) are TRUE.
asked
Nov 5, 2017
in
Theory of Computation
by
Arjun
Veteran
(
416k
points)

1k
views
ugcnetnov2017ii
grammar
contextfreelanguage
ambiguous
0
votes
0
answers
23
Ambiguity
Ques. S > Aa/bAc/dc A > d Isn't this grammar Ambiguous? If First(S) has more than one production giving the same first value, isn't it ambiguous?
asked
Aug 22, 2017
in
Compiler Design
by
Warlock lord
Active
(
3.2k
points)

78
views
ambiguous
grammar
+2
votes
1
answer
24
REGULAR OR NOT
As given that 1st is not regular and 2nd is regular as 1st not form AP but 2nd form.but if in 2nd we fix value of m and n same then it will work as 1st(not regular) so 2nd also should not be regular.as i know if we fix m or n value as any constant it will be AP but what if same???
asked
Aug 8, 2017
in
Theory of Computation
by
learner_geek
Active
(
3.1k
points)

244
views
theoryofcomputation
settheory&algebra
compilerdesign
ambiguous
regularlanguages
+2
votes
1
answer
25
REGULAR OR NOT
Please mention reason with answer:
asked
Aug 8, 2017
in
Theory of Computation
by
learner_geek
Active
(
3.1k
points)

88
views
theoryofcomputation
compilerdesign
ambiguous
regularlanguages
settheory&algebra
0
votes
1
answer
26
TestBook TestSeries
Consider the following statements : i) An ambiguous grammar can not generate DCFL. ii) An unambiguous grammar will always generate deterministic context free language. iii) Any nonempty language admits an ambiguous grammar. iv) All regular grammars are unambiguous. Which of the above is/are TRUE? i) and iv) only ii) and iii) only iii) only ii) and iv) only
asked
Jan 29, 2017
in
Theory of Computation
by
vnc
Active
(
2.8k
points)

79
views
theoryofcomputation
ambiguous
0
votes
0
answers
27
Self Doubt
By seeing a grammar I can say it is ambiguous or not. But How can I say it is inherently ambiguous or not.?
asked
Jan 22, 2017
in
Theory of Computation
by
Lucky sunda
Active
(
4.4k
points)

132
views
theoryofcomputation
inherentlyambiguous
ambiguous
0
votes
0
answers
28
Grammar ambiguity and parsing
$\begin{align*} \text {stmt} &\rightarrow \text{if expr then stmt else stmt} \\ & \;\; \;\;  \text{ if expr then stmt} \\ & \;\; \;\;  \text{ other} \end{align*}$ Which of the following statement/s is ... and the ambiguity cannot be resolved. B. The grammar is unambiguous C. The grammar is ambiguous and the ambiguity can be resolved D. None of these
asked
Dec 15, 2016
in
Compiler Design
by
dd
Veteran
(
56.6k
points)

235
views
compilerdesign
ambiguous
danglingelseproblem
parsing
+6
votes
3
answers
29
Dangling Else Problem and Ambiguity Elimination
For the grammar given below $\textbf{stmt} \to$ $ \textbf{if} $expr$ \textbf{then}$ stmt $\mid $ $\textbf{if}$ expr $ \textbf{then}$ stmt$ \textbf{else}$ stmt $\mid \textbf{other} $ Which of the following ... and the ambiguity cannot be resolved. 3.The grammar is unambiguous. If we try to remove nondeterminism , will ambiguity always be removed?
asked
Nov 21, 2016
in
Compiler Design
by
vaishali jhalani
Active
(
4.6k
points)

2k
views
compilerdesign
danglingelseproblem
ambiguous
+14
votes
1
answer
30
GATE19871xii
A contextfree grammar is ambiguous if: The grammar contains useless nonterminals. It produces more than one parse tree for some sentence. Some production has two non terminals side by side on the righthand side. None of the above.
asked
Nov 8, 2016
in
Theory of Computation
by
makhdoom ghaya
Boss
(
29.5k
points)

913
views
gate1987
theoryofcomputation
contextfreelanguage
ambiguous
Page:
1
2
next »
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
Recent Posts
ISI MTECH CS 2019 INTERVIEW EXPERIENCE
IIT HYDERABAD MTECH TA INTERVIEW EXPERIENCE
How to prepare for GATE with a fulltime job??
Interview Experience at IISc
All subject Gate notes from Standard Books!!
Follow @csegate
Recent questions tagged ambiguous
Recent Blog Comments
Can you tell me when the stock will be back in...
received the GO books in good conditions!! thanks
Sir please update your stocks, when it will be...
Yes. Stock is over with Indiapost.
But on Amazon the stock is there and a way too...
49,845
questions
54,783
answers
189,421
comments
80,415
users