Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged grammar
0
votes
1
answer
151
Doubt
L(G)={$a^mb^n$|m>n>=1} is the language context free?
L(G)={$a^mb^n$|m>n>=1} is the language context free?
aditi19
578
views
aditi19
asked
Aug 26, 2018
Theory of Computation
grammar
+
–
1
votes
1
answer
152
Is all ambiguous grammar could be converted to unambiguous?
Dhananjay15
1.4k
views
Dhananjay15
asked
Aug 14, 2018
Compiler Design
compiler-design
grammar
ambiguous-grammar
+
–
0
votes
2
answers
153
Grammars
Please provide example to disapprove the following points:- 1.every DCFG need not be a LR(K). 2.every DCFG need not be a LL(K). 3.every DCFL is not LL(k).
Please provide example to disapprove the following points:-1.every DCFG need not be a LR(K).2.every DCFG need not be a LL(K).3.every DCFL is not LL(k).
junaid ahmad
795
views
junaid ahmad
asked
Jul 22, 2018
Compiler Design
compiler-design
grammar
+
–
0
votes
2
answers
154
UGC NET CSE | July 2018 | Part 2 | Question: 36
Consider the following two Grammars: $G_1 \: : \: S \rightarrow SbS \mid a$ $G_2 : S \rightarrow aB \mid ab, \: A \rightarrow GAB \mid a, \: B \rightarrow ABb \mid b$ Which one of the folloeing options is correct? Only $G_1$ is ambiguous Only $G_2$ is ambiguous Both $G_1$ and $G_2$ are ambiguous Both $G_1$ and $G_2$ are not ambiguous
Consider the following two Grammars:$G_1 \: : \: S \rightarrow SbS \mid a$$G_2 : S \rightarrow aB \mid ab, \: A \rightarrow GAB \mid a, \: B \rightarrow ABb \mid b$Which ...
Pooja Khatri
5.2k
views
Pooja Khatri
asked
Jul 13, 2018
Theory of Computation
ugcnetcse-july2018-paper2
theory-of-computation
grammar
+
–
0
votes
3
answers
155
UGC NET CSE | July 2018 | Part 2 | Question: 38
The set $A = \{ 0^n \: 1^n \: 2^n \mid n=1, 2, 3, \dots \}$ is an example of a grammar that is Context sensitive Context free Regular None of the above
The set $A = \{ 0^n \: 1^n \: 2^n \mid n=1, 2, 3, \dots \}$ is an example of a grammar that isContext sensitiveContext freeRegularNone of the above
Pooja Khatri
1.3k
views
Pooja Khatri
asked
Jul 13, 2018
Theory of Computation
ugcnetcse-july2018-paper2
theory-of-computation
grammar
+
–
1
votes
2
answers
156
Languages
Consider a language over Σ={a,b} the description of L is given below. L={ PQ | P ∈(a,b)* , Q ∈ (a,b)* and na(P) = nb(Q) }. Select the correct option. 1. L is DCFL but not regular. 2. L is CSL but not CFL. 3. L is CFL but not DCFL. 4. None of these.
Consider a language over Σ={a,b} the description of L is given below.L={ PQ | P ∈(a,b)* , Q ∈ (a,b)* and na(P) = nb(Q) }. Select the correct option. 1. L is DCFL but...
Priyansh Singh
950
views
Priyansh Singh
asked
Jul 3, 2018
Theory of Computation
theory-of-computation
regular-language
context-free-language
grammar
+
–
2
votes
2
answers
157
Peter Linz Edition 4 Exercise 2.1 Question 21 (Page No. 48)
Let L be the language accepted by the automaton $L = ${$(a^{n})b:n≥0$}. Find a dfa that accepts the language $L^{2} - L$.
Let L be the language accepted by the automaton $L = ${$(a^{n})b:n≥0$}. Find a dfa that accepts the language $L^{2} - L$.
Apoorva Jain
766
views
Apoorva Jain
asked
Jun 30, 2018
Theory of Computation
theory-of-computation
regular-language
peter-linz
peter-linz-edition4
finite-automata
grammar
+
–
0
votes
1
answer
158
Grammer
A grammar will be meaningless of the (a) terminal set and non-terminal set are not disjoint (b) left hand side of a productions is a single terminal (c) left hand side of a production has no non-terminal (d) all of the above
A grammar will be meaningless of the(a) terminal set and non-terminal set are not disjoint(b) left hand side of a productions is a single terminal(c) left hand side of a ...
K ANKITH KUMAR
2.2k
views
K ANKITH KUMAR
asked
Jun 25, 2018
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
1
answer
159
First and follow
Find first and follow of the given grammar? S->AB A->BS/a/€ B->AS/b
Find first and follow of the given grammar?S->ABA->BS/a/€B->AS/b
saumya mishra
3.3k
views
saumya mishra
asked
Jun 3, 2018
Compiler Design
compiler-design
grammar
parsing
first-and-follow
+
–
0
votes
1
answer
160
compiler design
Shivani gaikawad
177
views
Shivani gaikawad
asked
May 31, 2018
Compiler Design
compiler-design
grammar
parsing
lr-parser
test-series
+
–
2
votes
1
answer
161
compiler
Prince Sindhiya
224
views
Prince Sindhiya
asked
May 31, 2018
Compiler Design
compiler-design
grammar
parsing
lr-parser
test-series
+
–
0
votes
1
answer
162
compiler design
Prince Sindhiya
278
views
Prince Sindhiya
asked
May 31, 2018
Compiler Design
compiler-design
grammar
parsing
lr-parser
test-series
+
–
1
votes
2
answers
163
Gradup topicwise question doubt
Identify the language generated by the following grammar: $S->AB$ $A->aAb|\epsilon$ $B->bB|b$ (A)$\{a^m b^n|n≥m, m>0\}$ (B)$\{a^m b^n|n≥m, m≥0\}$ (C)$\{a^m b^n|n>m, m>0\}$ (D)$\{a^m b^n|n>m, m≥0\}$ I select option C but it is wrong, correct answer is option D. I could not understand Gradup answer explanation.Please help me to rectify my fault.
Identify the language generated by the following grammar:$S->AB$$A->aAb|\epsilon$$B->bB|b$(A)$\{a^m b^n|n≥m, m>0\}$(B)$\{a^m b^n|n≥m, m≥0\}$(C)$\{a^m b^n|n>m, m>0\}...
Sona Barman
349
views
Sona Barman
asked
May 24, 2018
Theory of Computation
theory-of-computation
language
of
grammar
+
–
1
votes
4
answers
164
Context Free Language
L= { $a^{n}b^{m}$ | $n<=m<=2n$ } a) DCFL b) CFL but not DCFL c) Not CFL
L= { $a^{n}b^{m}$ | $n<=m<=2n$ }a) DCFLb) CFL but not DCFLc) Not CFL
Subham Nagar
773
views
Subham Nagar
asked
May 6, 2018
Theory of Computation
context-free-language
theory-of-computation
grammar
+
–
6
votes
3
answers
165
ISRO2018-64
A particular BNF definition for a "word is given by the following rules. <word> :: = <letter> I <letter> <charpair> I <letter> <intpair> <charpair> :: = <letter> <letter> I <charpair> <letter> <letter> < ... $\textsf{c44}$ I, II and III I and II only I and III only II and III only
A particular BNF definition for a "word is given by the following rules.<word :: = <letter I <letter <charpair I <letter <intpair <charpair :: = <letter <letter I <charpa...
Arjun
5.7k
views
Arjun
asked
Apr 22, 2018
Compiler Design
isro2018
compiler-design
grammar
context-free-grammar
+
–
1
votes
1
answer
166
compiler
E---->T+E T------>i a)LR(0) b)SLR c)LALR dnone
E >T+ET >ia)LR(0)b)SLRc)LALRdnone
satyam132
179
views
satyam132
asked
Apr 21, 2018
Compiler Design
compiler-design
grammar
parsing
lr-parser
+
–
2
votes
2
answers
167
First And Follow
Find First and Follow in the following grammar. $E\rightarrow E+T \mid T$ $T\rightarrow TF \mid F$ $F\rightarrow F^* \mid a \mid b$
Find First and Follow in the following grammar.$E\rightarrow E+T \mid T$$T\rightarrow TF \mid F$$F\rightarrow F^* \mid a \mid b$
Abhishek Malik
877
views
Abhishek Malik
asked
Apr 5, 2018
Compiler Design
compiler-design
grammar
parsing
first-and-follow
+
–
0
votes
5
answers
168
Finding Handles in a grammer
Total number of Handles for $(w=aa)$ in the following grammar ? $S\rightarrow DT$ $D\rightarrow aa$ $T\rightarrow \epsilon$
Total number of Handles for $(w=aa)$ in the following grammar ?$S\rightarrow DT$$D\rightarrow aa$$T\rightarrow \epsilon$
Abhishek Malik
1.3k
views
Abhishek Malik
asked
Apr 5, 2018
Compiler Design
compiler-design
grammar
ambiguous-grammar
+
–
0
votes
1
answer
169
Attribute Grammar
Can someone explain these terms clearly these terms with examples? Attribute Grammar Synthesized attributes Inherited attributes L and S Attributes
Can someone explain these terms clearly these terms with examples?Attribute GrammarSynthesized attributesInherited attributesL and S Attributes
smsubham
765
views
smsubham
asked
Apr 4, 2018
Compiler Design
compiler-design
grammar
+
–
1
votes
1
answer
170
LL(n)
LL(1) parser cannot accept nondeterministic grammar at we have only single lookahead and there can be no predictable parsing in this case. Suppose we have LL(n) and we are given that maximum length of non-determinism in a production is n - 1. Can we use this grammar for LL(n) predictive parsing?
LL(1) parser cannot accept nondeterministic grammar at we have only single lookahead and there can be no predictable parsing in this case. Suppose we have LL(n) and we a...
smsubham
1.0k
views
smsubham
asked
Apr 4, 2018
Compiler Design
compiler-design
ll-parser
parsing
lr-parser
grammar
+
–
0
votes
5
answers
171
Compiler desigb
consider the following grammar $E\rightarrow int|int+E|int-E |int-(E) |int*E$ Which statement is true? a) Grammer is left factored b) Cant be determined
consider the following grammar$E\rightarrow int|int+E|int-E |int-(E) |int*E$Which statement is true?a) Grammer is left factoredb) Cant be determined
Pun M
933
views
Pun M
asked
Apr 1, 2018
Compiler Design
compiler-design
grammar
left-recursion
+
–
0
votes
1
answer
172
Check if grammar is LL(1) ?
Given a grammar : $E \rightarrow E + T / T$ $T \rightarrow i$ Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without drawing parsing table ?
Given a grammar :$E \rightarrow E + T / T$$T \rightarrow i$Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without dra...
Rahul Ranjan 1
5.0k
views
Rahul Ranjan 1
asked
Mar 19, 2018
Compiler Design
compiler-design
grammar
parsing
ll-parser
left-recursion
+
–
0
votes
3
answers
173
LR(0) Parsing Table
Please anyone create a $LR(0)$ Parsing table on this grammar and show the working of each step: $S' \rightarrow S$ $S \rightarrow S$;$A \mid A$ $A \rightarrow E \mid id := E$ $E \rightarrow E+id \mid id$ Non-Terminals: $S'$ $S$ $A$ $E$ Terminals$: ; := + id$ Please take a screenshot of copy and show in the answer the whole working.
Please anyone create a $LR(0)$ Parsing table on this grammar and show the working of each step:$S' \rightarrow S$$S \rightarrow S$;$A \mid A$$A \rightarrow E \mid id := ...
rahuldb
3.4k
views
rahuldb
asked
Mar 17, 2018
Compiler Design
compiler-design
lr-parser
parsing
grammar
+
–
1
votes
3
answers
174
Peter Linz Edition 4 Exercise 1.2 Question 18 (Page No. 29)
Assume $\sum = \left \{ a,b \right \}$ $L = \left \{ w : n_{a}\left ( w \right ) = n_{b}\left ( w \right ) + 1 \right \}$ $L = \left \{ w : n_{a}\left ( w \right ) > n_{b}\left ( w \right ) \right \}$ ...
Assume $\sum = \left \{ a,b \right \}$ $L = \left \{ w : n_{a}\left ( w \right ) = n_{b}\left ( w \right ) + 1 \right \}$$L = \left \{ w : n_{a}\left ( w \right ) n_{b}\...
Mk Utkarsh
1.2k
views
Mk Utkarsh
asked
Feb 26, 2018
Theory of Computation
theory-of-computation
peter-linz
peter-linz-edition4
grammar
+
–
1
votes
1
answer
175
Peter Linz Edition 4 Exercise 1.2 Question 15.d (Page No. 29)
Find the grammar for the following language $L = \left \{ w: \left | w \right | mod 3 \geq \left | w \right | mod 2 \right \}$
Find the grammar for the following language$L = \left \{ w: \left | w \right | mod 3 \geq \left | w \right | mod 2 \right \}$
Mk Utkarsh
355
views
Mk Utkarsh
asked
Feb 26, 2018
Theory of Computation
theory-of-computation
grammar
peter-linz
peter-linz-edition4
+
–
3
votes
1
answer
176
Peter Linz Edition 4 Exercise 1.2 Question 14.g (Page No. 29)
$L = \left \{ a^{n} b^{m} : n\geq 0,m>n \right \}$ Find a grammar that generates $L^3$
$L = \left \{ a^{n} b^{m} : n\geq 0,m>n \right \}$Find a grammar that generates $L^3$
Mk Utkarsh
485
views
Mk Utkarsh
asked
Feb 26, 2018
Theory of Computation
theory-of-computation
peter-linz
peter-linz-edition4
grammar
+
–
1
votes
2
answers
177
Simple Grammar
Consider Grammar G with the following characteristic- $A → ax$, where $A ∈ V$, $a ∈ T$, $x ∈ V^*$, and any pair $( A, a )$ occurs at most once in $P$. For example, $S → aA \mid aB...,$ is not a grammar of type $G$ because the pair $(S,a)$ occur in two productions. ... string w belonging to $L(G)$ ? $\mid w \mid^3$ $\mid w \mid$ $2^{\mid w \mid}$ Not a function of $\mid w \mid$ alone.
Consider Grammar G with the following characteristic-$A → ax$, where $A ∈ V$, $a ∈ T$, $x ∈ V^*$, and any pair $( A, a )$ occurs at most once in $P$. For example,...
tarun_svbk
2.1k
views
tarun_svbk
asked
Feb 24, 2018
Theory of Computation
theory-of-computation
context-free-language
peter-linz
grammar
context-free-grammar
+
–
0
votes
0
answers
178
Sentential forms
Restricting only to the leftmost derivations, how many sentential forms can exhaustive search parsing generate ? $O(P^{\mid w \mid})$ $O(P^{\mid w \mid +1})$ $O(P^{2\mid w \mid})$ $O(P^{2\mid w \mid + 1})$ where, $P$ is the number of productions and w is the word to be generated.
Restricting only to the leftmost derivations, how many sentential forms can exhaustive search parsing generate ? $O(P^{\mid w \mid})$$O(P^{\mid w \mid +1})$$O(P^{2\mid w ...
tarun_svbk
378
views
tarun_svbk
asked
Feb 24, 2018
Theory of Computation
theory-of-computation
context-free-language
peter-linz
grammar
+
–
0
votes
0
answers
179
Peter Linz Edition 4 Example 5.13 (Page No. 144)
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 for $L$. There exists a simple grammar for $L$. There exists an unambiguous grammar for $L$. There exists an ambiguous grammar for $L$.
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...
tarun_svbk
329
views
tarun_svbk
asked
Feb 24, 2018
Theory of Computation
theory-of-computation
context-free-language
peter-linz
peter-linz-edition4
grammar
inherently-ambiguous
+
–
0
votes
1
answer
180
Grammer
Can I give any grammer for the language L = { anbncn / n>=1} Like this----
Can I give any grammer for the language L = { anbncn / n>=1} Like this
mrinmoyh
609
views
mrinmoyh
asked
Feb 1, 2018
Theory of Computation
theory-of-computation
grammar
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
...
15
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register