Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged grammar
0
votes
0
answers
91
Peter Linz Edition 4 Exercise 5.2 Question 4 (Page No. 145)
Show that every s-grammar is unambiguous.
Show that every s-grammar is unambiguous.
Naveen Kumar 3
204
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
ambiguous
grammar
+
–
0
votes
1
answer
92
Peter Linz Edition 4 Exercise 5.2 Question 3 (Page No. 144)
Find an s-grammar for $L =$ {$a^nb^{n+1} : n ≥ 2$}.
Find an s-grammar for $L =$ {$a^nb^{n+1} : n ≥ 2$}.
Naveen Kumar 3
382
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
0
votes
1
answer
93
Peter Linz Edition 4 Exercise 5.2 Question 2 (Page No. 144)
Find an s-grammar for $L =$ {$a^nb^n : n ≥ 1$}.
Find an s-grammar for $L =$ {$a^nb^n : n ≥ 1$}.
Naveen Kumar 3
479
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
0
votes
1
answer
94
Peter Linz Edition 4 Exercise 5.2 Question 1 (Page No. 144)
Find an s-grammar for $L (aaa^*b + b)$.
Find an s-grammar for $L (aaa^*b + b)$.
Naveen Kumar 3
381
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
1
votes
1
answer
95
Peter Linz Edition 4 Exercise 1.2 Question 23 (Page No. 30)
Show that the grammars $S \rightarrow aSb|bSa|SS|a$ and $S \rightarrow aSb|bSa|a$ are not equivalent.
Show that the grammars $S \rightarrow aSb|bSa|SS|a$and $S \rightarrow aSb|bSa|a$are not equivalent.
Naveen Kumar 3
298
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
1
votes
1
answer
96
Peter Linz Edition 4 Exercise 1.2 Question 22 (Page No. 30)
Show that the grammar $G$ =({$S$}, {$a, b$}$, S, P$), with productions $S \rightarrow SS|SSS|aSb|bSa|λ$ , is equivalent to the grammar $S \rightarrow SS$ , $S \rightarrow λ$ , $S \rightarrow aSb$ , $S \rightarrow bSa$ .
Show that the grammar $G$ =({$S$}, {$a, b$}$, S, P$), with productions $S \rightarrow SS|SSS|aSb|bSa|λ$ ,is equivalent to the grammar ...
Naveen Kumar 3
333
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
1
votes
1
answer
97
Peter Linz Edition 4 Exercise 1.2 Question 21 (Page No. 29)
Are the two grammars with respective productions $S \rightarrow aSb|ab|λ$, and $S \rightarrow aAb|ab$, $A \rightarrow aAb|λ$, equivalent? Assume that $S$ is the start symbol in both cases.
Are the two grammars with respective productions $S \rightarrow aSb|ab|λ$,and $S \rightarrow aAb|ab$, $A \rightarrow aAb|λ$,equivalent?...
Naveen Kumar 3
744
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
0
votes
0
answers
98
Peter Linz Edition 4 Exercise 1.2 Question 15 (Page No. 29)
Find grammars for the following languages on Σ = {a}. (a) L = {w : |w| mod 3 = 0}. (b) L = {w : |w| mod 3 > 0}. (c) L = {w : |w| mod 3 ≠ |w| mod 2}. (d) L = {w : |w| mod 3 ≥ |w| mod 2}.
Find grammars for the following languages on Σ = {a}.(a) L = {w : |w| mod 3 = 0}.(b) L = {w : |w| mod 3 0}.(c) L = {w : |w| mod 3 ≠ |w| mod 2}.(d) L = {w : |w| mod 3 ...
Naveen Kumar 3
258
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
1
votes
1
answer
99
Peter Linz Edition 4 Exercise 1.2 Question 14 (Page No. 28)
Let $Σ$ = {$a, b$}. For each of the following languages, find a grammar that generates it. (a) $L_1$ = {$a^nb^m : n ≥ 0, m > n$}. (b) $L_2$ = {$a^nb^{2n} : n ≥ 0$}. (c) $L_3$ = {$a^{n+2}b^n : n ≥ 1$}. (d) $L_4$ = {$a^nb^{n−3} : n ≥ 3$}. (e) $L_1 L_2$. (f) $L_1 ∪ L_2$. (g) $L_1^3$. (h) $L_1^*$. (i) $L_1-\bar{L}_4$.
Let $Σ$ = {$a, b$}. For each of the following languages, find a grammar that generates it.(a) $L_1$ = {$a^nb^m : n ≥ 0, m n$}.(b) $L_2$ = {$a^nb^{2n} : n ≥ 0$}.(c) ...
Naveen Kumar 3
412
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
1
votes
1
answer
100
Peter Linz Edition 4 Exercise 1.2 Question 13 (Page No. 28)
What language does the grammar with these productions generate? $S \rightarrow Aa$ , $A \rightarrow B$ , $B \rightarrow Aa$ .
What language does the grammar with these productions generate?$S \rightarrow Aa$ ,$A \rightarrow B$ ,$B \rightarrow Aa$ .
Naveen Kumar 3
912
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
0
votes
2
answers
101
Peter Linz Edition 4 Exercise 1.2 Question 12 (Page No. 28)
Give a simple description of the language generated by the grammar with productions $S \rightarrow aA,$ $A \rightarrow bS,$ $S \rightarrow λ.$
Give a simple description of the language generated by the grammar with productions$S \rightarrow aA,$$A \rightarrow bS,$$S \rightarrow λ.$
Naveen Kumar 3
395
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
0
votes
0
answers
102
Peter Linz Edition 4 Exercise 1.2 Question 11 (Page No. 28)
Find grammars for $Σ$ = {$a, b$} that generate the sets of (a) all strings with exactly one $a$. (b) all strings with at least one $a$. (c) all strings with no more than three $a$’s. (d) all strings with at least three $a$’s. In each case, give convincing arguments that the grammar you give does indeed generate the indicated language.
Find grammars for $Σ$ = {$a, b$} that generate the sets of(a) all strings with exactly one $a$.(b) all strings with at least one $a$.(c) all strings with no more than th...
Naveen Kumar 3
422
views
Naveen Kumar 3
asked
Mar 19, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
+
–
20
votes
4
answers
103
GATE CSE 2019 | Question: 43
Consider the augmented grammar given below: $S’ \rightarrow S$ $S \rightarrow \langle L \rangle \mid id$ $L \rightarrow L, S \mid S$ Let $I_0 = \text{CLOSURE} (\{[S’ \rightarrow \cdot S ]\}).$ The number of items in the set $\text{GOTO} (I_0, \langle \: )$ is______
Consider the augmented grammar given below:$S’ \rightarrow S$$S \rightarrow \langle L \rangle \mid id$$L \rightarrow L, S \mid S$Let $I_0 = \text{CLOSURE} (\{[S’ \rig...
Arjun
17.6k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
grammar
2-marks
+
–
0
votes
1
answer
104
how to check grammar is lr(1)?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals. Does LR(1) can parse all strings that are generated by grammar G.? Please any one help me to how to check it?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.Does LR(1) can parse all strings that are generated by gr...
abc1
4.0k
views
abc1
asked
Jan 26, 2019
Compiler Design
compiler-design
grammar
parsing
lr-parser
+
–
0
votes
1
answer
105
ACE Test series Question on CFG
Shankar Kakde
656
views
Shankar Kakde
asked
Jan 24, 2019
Compiler Design
compiler-design
grammar
context-free-grammar
ace-test-series
+
–
0
votes
1
answer
106
ace-Pregate
naveen bhatt
459
views
naveen bhatt
asked
Jan 24, 2019
Compiler Design
compiler-design
grammar
syntax-directed-translation
ace-test-series
+
–
0
votes
1
answer
107
Formal Languages
Consider the language defined as L = { $a^pb^qa^r$ | p = q or q = r} . L complement is Regular CFL but not regular CSL but not CSL DCFL
Consider the language defined as L = { $a^pb^qa^r$ | p = q or q = r} .L complement isRegularCFL but not regularCSL but not CSLDCFL
Abhipsa
380
views
Abhipsa
asked
Jan 22, 2019
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
0
answers
108
MadeEasy Test Series 2019: Theory of computation - Grammer
Let L be the language of all strings on [0,1] ending with 1. Let X be the language generated by the grammar G. $S \rightarrow 0S/1A/ \epsilon $ $A \rightarrow 1S/0A$ Then $L \cup X= $ ∅ ∑* L X Ans given : B. ... a language which contains all strings that do not end with 1. But is it so? Can't we generate 11 from the grammar? Please verify.
Let L be the language of all strings on [0,1] ending with 1.Let X be the language generated by the grammar G.$S \rightarrow 0S/1A/ \epsilon $$A \rightarrow 1S/0A$Then $L ...
MiNiPanda
753
views
MiNiPanda
asked
Jan 15, 2019
Theory of Computation
theory-of-computation
grammar
made-easy-test-series
+
–
0
votes
1
answer
109
#compiler
amit166
416
views
amit166
asked
Jan 9, 2019
Compiler Design
grammar
ace-test-series
+
–
0
votes
1
answer
110
Zeal Test Series 2019: Theory of Computation - Grammar
Consider the following statements. S1: An unambiguous left recursive grammar must be CLR(1). S2: A DCFG may or may not be LL(1). Select the correct option: 1.Both S1 and S2 are true. 2.Both S1 and S2 are false. 3. S1 is false and S2 is true. 4.S1 is true and S2 is false. According to me S1 false and S2 true but answer given 1
Consider the following statements.S1: An unambiguous left recursive grammar must be CLR(1).S2: A DCFG may or may not be LL(1).Select the correct option:1.Both S1 and S2 a...
Prince Sindhiya
658
views
Prince Sindhiya
asked
Jan 2, 2019
Theory of Computation
zeal
theory-of-computation
grammar
zeal2019
+
–
1
votes
1
answer
111
Non-Left recursive grammar of the below grammar.
Grammar. S → Aa | B A → Ac | Aad | bd | epsilon . .
Grammar. S → Aa | B A → Ac | Aad | bd | epsilon . .
susgir2
954
views
susgir2
asked
Jan 2, 2019
Compiler Design
compiler-design
left-recursion
grammar
parsing
recurrence-relation
+
–
1
votes
1
answer
112
MadeEasy Test Series: Compiler Design - Grammar
Consider the following grammar G shown Below : S → abS | ScS | d | c The number of terminals in follow set of non-terminal S is ___________________ Is “$” symbol considered terminal?
Consider the following grammar G shown Below :S → abS | ScS | d | cThe number of terminals in follow set of non-terminal S is ___________________ Is “$” symbol cons...
vinay chauhan
1.3k
views
vinay chauhan
asked
Dec 30, 2018
Compiler Design
first-and-follow
made-easy-test-series
grammar
+
–
0
votes
1
answer
113
context free grammer
consider following grammer S → aSb / aSbb / aSbbb / ….. is language generated by above grammer is DCFL?
consider following grammerS → aSb / aSbb / aSbbb / …..is language generated by above grammer is DCFL?
Rahul_Rathod_
572
views
Rahul_Rathod_
asked
Dec 24, 2018
Theory of Computation
grammar
context-free-language
dcfl
context-free-grammar
+
–
0
votes
2
answers
114
MadeEasy Test Series: Theory Of Computation - Grammar
i thought that it is the language where both start and end symbols are same and i got 65 but the ans is 29
i thought that it is the language where both start and end symbols are same and i got 65 but the ans is 29
suneetha
342
views
suneetha
asked
Dec 22, 2018
Theory of Computation
made-easy-test-series
theory-of-computation
grammar
+
–
0
votes
1
answer
115
MadeEasy Test Series: Theory Of Computation - Grammar
what is the answer
what is the answer
suneetha
630
views
suneetha
asked
Dec 22, 2018
Theory of Computation
made-easy-test-series
theory-of-computation
grammar
+
–
0
votes
1
answer
116
MadeEasy Test Series: Theory Of Computation - Grammar
G1: S-→ aSa| bSb|e G2:S--→ aaS|bbS| e the shortest length strings which does not belongs to L(g1) but belongs to L(G2) is
G1: S-→ aSa| bSb|eG2:S → aaS|bbS| ethe shortest length strings which does not belongs to L(g1) but belongs to L(G2) is
suneetha
537
views
suneetha
asked
Dec 22, 2018
Theory of Computation
made-easy-test-series
theory-of-computation
grammar
+
–
1
votes
0
answers
117
PARSER
An $\epsilon$ free LL(1) grammar is also a SLR(1) and hence LALR(1) and LR(1) too. Is this statement true ?
An $\epsilon$ free LL(1) grammar is also a SLR(1) and hence LALR(1) and LR(1) too.Is this statement true ?
junaid ahmad
627
views
junaid ahmad
asked
Dec 20, 2018
Compiler Design
compiler-design
parsing
grammar
+
–
0
votes
0
answers
118
Self doubt
I know that for a recursively enumerable language there exists an unrestricted grammar and we have formally defined unrestricted grammar. I want to know whether for every recursive language, there is a grammar or not, and if there is, is there a formal definition of the same?
I know that for a recursively enumerable language there exists an unrestricted grammar and we have formally defined unrestricted grammar. I want to know whether for every...
subho16
518
views
subho16
asked
Dec 20, 2018
Theory of Computation
theory-of-computation
turing-machine
grammar
recursive-and-recursively-enumerable-languages
+
–
0
votes
0
answers
119
Does operator grammar belong to both NCFL and DCFL?
Operator precedence parser even parses ambiguous grammars that are in form of operator grammars. I am inquiring about the nature of the ambiguous grammar. Could the language described by the operator grammar be both $DCFL$ or $NCFL$?
Operator precedence parser even parses ambiguous grammars that are in form of operator grammars. I am inquiring about the nature of the ambiguous grammar. Could the langu...
2019_Aspirant
248
views
2019_Aspirant
asked
Dec 9, 2018
Compiler Design
compiler-design
grammar
+
–
0
votes
0
answers
120
Grammer
Which of the following problem is undecidable? A) membership problem for CFL B) membership problem for regular language C)membership problem for csl D)membership problem for type O language
Which of the following problem is undecidable?A) membership problem for CFLB) membership problem for regular languageC)membership problem for cslD)membership problem for ...
Shivshankar
523
views
Shivshankar
asked
Dec 8, 2018
Theory of Computation
theory-of-computation
grammar
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
15
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register