Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged context-free-grammar
0
votes
1
answer
301
Test by Bikram | Mock GATE | Test 3 | Question: 11
Consider the grammar: $S\rightarrow$ $PQ | SQ | PS$ $P\rightarrow k$ $Q\rightarrow m$ To get a set of $n$ terminals, the number of productions to be used are ______. $n^{2}$ $n + 1$ $2n - 1$ $2n$
Consider the grammar:$S\rightarrow$ $PQ | SQ | PS$$P\rightarrow k$$Q\rightarrow m$To get a set of $n$ terminals, the number of productions to be used are ______. $n^{2...
Bikram
320
views
Bikram
asked
Feb 9, 2017
GATE
tbb-mockgate-3
theory-of-computation
context-free-grammar
grammar
+
–
–1
votes
1
answer
302
number of steps in derivation
iita
6.0k
views
iita
asked
Feb 3, 2017
Compiler Design
compiler-design
context-free-grammar
parsing
numerical-answers
test-series
+
–
0
votes
1
answer
303
Intersection and concatenation in CFG
Given that L1 is regular and L2 context free. i) L3 = L1 ∩ L2 ii) L4= L1.L2 Selct the most appropriate statement: a. L3 , L4 are regular b. L3 is regular L4 is CFG not regular c. L3 is CFG, not regular L4 is regular d. L3,L4 are CFG not regular
Given that L1 is regular and L2 context free.i) L3 = L1 ∩ L2ii) L4= L1.L2Selct the most appropriate statement:a. L3 , L4 are regularb. L3 is regular L4 is CFG not regul...
sh!va
830
views
sh!va
asked
Feb 1, 2017
Theory of Computation
theory-of-computation
regular-language
context-free-grammar
+
–
0
votes
0
answers
304
Online Test Series
L1 = {an bm | n ≤ m ≤ 2n} L2 = {an bm│m≠n & m≠2n} Which of the following is true? A. Only L1 is CFG B. Only L2 is CFG C. Both are CFG D. None of them is CFG
L1 = {an bm | n ≤ m ≤ 2n}L2 = {an bm│m≠n & m≠2n}Which of the following is true?A. Only L1 is CFGB. Only L2 is CFGC. Both are CFGD. None of them is CFG
AmitPatil
813
views
AmitPatil
asked
Jan 26, 2017
Theory of Computation
theory-of-computation
context-free-grammar
normal
+
–
1
votes
5
answers
305
Test by Bikram | Mock GATE | Test 2 | Question: 38
$S\rightarrow A0 B$ $A\rightarrow BB \mid 0$ $B\rightarrow AA \mid 1$ The number of terminal strings of length $5$ generated by the context-free grammar shown above is _______.
$S\rightarrow A0 B$$A\rightarrow BB \mid 0$$B\rightarrow AA \mid 1$ The number of terminal strings of length $5$ generated by the context-free grammar shown above is ____...
Bikram
780
views
Bikram
asked
Jan 24, 2017
Compiler Design
tbb-mockgate-2
numerical-answers
compiler-design
theory-of-computation
context-free-grammar
+
–
1
votes
4
answers
306
Compiler
Consider the following grammar 1)Left Recursive 2)Ambiguos 3)Left factored 4)None of these
Consider the following grammar1)Left Recursive2)Ambiguos3)Left factored4)None of these
reena_kandari
694
views
reena_kandari
asked
Jan 5, 2017
Compiler Design
compiler-design
context-free-grammar
left-recursion
ambiguous-grammar
ace-test-series
+
–
2
votes
1
answer
307
parsing
Convert the grammar to reduced form ? S->AB S->CA B->BC B->AB A->a C->aB |b
Convert the grammar to reduced form ?S->AB S->CA B->BC B->AB A->a C->aB |b
kirtikanwar
4.6k
views
kirtikanwar
asked
Jan 4, 2017
Compiler Design
compiler-design
parsing
context-free-grammar
descriptive
+
–
1
votes
2
answers
308
[Compiler Design] Find number of reductions
rahul sharma 5
1.1k
views
rahul sharma 5
asked
Dec 28, 2016
Compiler Design
compiler-design
context-free-grammar
parsing
numerical-answers
test-series
+
–
2
votes
1
answer
309
context free grammar || Linz 5.1
... third grammar In Linz book it is given as $\begin{align*} & S\rightarrow aSbSa|aaSb|bSaa|SS|a \\ \end{align*}$ ..better explanation if possible.??
$\begin{align*} & L = \left \{ w \in \left \{ a,b \right \}^{*}\;\; : n_a(w) \neq n_b(w) \right \} \\ & S\rightarrow aSb|bSa|A|B \\ & A \rightarrow aA|a \\ & B \rightarro...
dd
546
views
dd
asked
Dec 8, 2016
Theory of Computation
theory-of-computation
context-free-grammar
context-free-language
+
–
1
votes
2
answers
310
Regular Expression to CFG
So , 1 is mandatory in Regular expression ; and both of above grammar allows strings without 1 to be genearated. So , I expected None of above to be answer. What Am I missing here ? Consider for (A) Production = A0 -> A1 A1-> 0
So , 1 is mandatory in Regular expression ; and both of above grammar allows strings without 1 to be genearated.So , I expected None of above to be answer. What Am I mis...
vishal8492
1.7k
views
vishal8492
asked
Dec 6, 2016
Theory of Computation
theory-of-computation
regular-expression
context-free-language
context-free-grammar
regular-language
+
–
1
votes
2
answers
311
Made Easy Test Series
Consider the following CFG. S $\rightarrow$aAb|aBc|bAd|bBe A$\rightarrow$g B$\rightarrow$g The number of states exist in DFA using LALR (1) construction for the above grammar ____________?? (Doubt): In CLR(1) it takes 14 states and clubbing two states into one state will take ... ...!!! So 14 is the answer, I think.. But answer in Made Easy given as 13 Only.. Explain....???!!!
Consider the following CFG.S $\rightarrow$aAb|aBc|bAd|bBeA$\rightarrow$gB$\rightarrow$gThe number of states exist in DFA using LALR (1) construction for the above grammar...
Meghashyam Sujay
1.4k
views
Meghashyam Sujay
asked
Dec 4, 2016
Compiler Design
compiler-design
context-free-grammar
parsing
lr-parser
numerical-answers
+
–
1
votes
1
answer
312
cfg pda toc
how $a^nb^nc^n$ n>=1 is not CFL....??
how $a^nb^nc^n$ n>=1 is not CFL....??
Anmol Verma
896
views
Anmol Verma
asked
Dec 2, 2016
Theory of Computation
theory-of-computation
context-free-language
grammar
context-free-grammar
pushdown-automata
+
–
0
votes
3
answers
313
cfg toc
S->AbaC A->BC B->b/epsilon C->D/epsilon D->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
S->AbaCA->BCB->b/epsilonC->D/epsilonD->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
Anmol Verma
2.3k
views
Anmol Verma
asked
Nov 30, 2016
Theory of Computation
theory-of-computation
context-free-grammar
context-free-language
grammar
+
–
3
votes
1
answer
314
context free grammar
Is L2 same as a^i b^j c^j , i,j >=0?
Is L2 same as a^i b^j c^j , i,j >=0?
vaishali jhalani
2.8k
views
vaishali jhalani
asked
Nov 21, 2016
Theory of Computation
theory-of-computation
context-free-grammar
+
–
1
votes
1
answer
315
ullman (toc)
design cfg for (i) {aibjck|i=j+k} (ii){aibj|i<=2j}
design cfg for(i) {aibjck|i=j+k}(ii){aibj|i<=2j}
BILLY
560
views
BILLY
asked
Nov 18, 2016
Theory of Computation
theory-of-computation
context-free-grammar
+
–
1
votes
2
answers
316
first
First of B ?
First of B ?
Prateek Arora
371
views
Prateek Arora
asked
Oct 27, 2016
Compiler Design
compiler-design
context-free-grammar
parsing
first-and-follow
descriptive
+
–
1
votes
2
answers
317
Regular+CFG
Rahul Jain25
1.4k
views
Rahul Jain25
asked
Oct 9, 2016
Theory of Computation
theory-of-computation
regular-language
context-free-language
context-free-grammar
bad-question
+
–
1
votes
5
answers
318
MADE EASY TEST SERIES
Consider the following CFG: E --> E*T/T+E/T T --> (T*F)/F F --> id Which of the following strings are not generated by above CFG? A> id+id+id B> id∗id∗id C> (id∗id∗id) D> None of these
Consider the following CFG:E E*T/T+E/TT (T*F)/FF idWhich of the following strings are not generated by above CFG?A id+id+idB id∗id∗idC (id∗id∗id)D None of t...
User007
699
views
User007
asked
Oct 5, 2016
Compiler Design
compiler-design
context-free-grammar
parsing
made-easy-test-series
+
–
1
votes
1
answer
319
Language produced by CFG
Consider the context free grammar below. What language does it generates? S -> 0B|1A A ->0|0S|1AA B ->1|1S|0BB
Consider the context free grammar below. What language does it generates?S - 0B|1AA ->0|0S|1AAB ->1|1S|0BB
Shweta Singh Lodhi
419
views
Shweta Singh Lodhi
asked
Oct 5, 2016
Theory of Computation
context-free-grammar
context-free-language
ldentify-language
theory-of-computation
+
–
1
votes
0
answers
320
UGC NET CSE | August 2016 | Part 3 | Question: 57
Let $G = (V, T, S, P)$ be a context-free grammar such that every one of its productions is of the form $A \rightarrow ν$, with $|ν| = k > 1$. The derivation tree for any string $W \in L (G)$ has a height such that $h < \frac{(|W|-1)}{k-1}$ ... $\log_{k} |W| \leq h \leq \frac{(|W|-1)}{k-1}$
Let $G = (V, T, S, P)$ be a context-free grammar such that every one of its productions is of the form $A \rightarrow ν$, with $|ν| = k 1$. The derivation tree for any...
makhdoom ghaya
682
views
makhdoom ghaya
asked
Oct 4, 2016
Theory of Computation
ugcnetcse-aug2016-paper3
theory-of-computation
context-free-grammar
+
–
1
votes
0
answers
321
#sipser book
Can ambiguous context free grammar be converted into CNF form..?
Can ambiguous context free grammar be converted into CNF form..?
Abhishekcs10
281
views
Abhishekcs10
asked
Sep 14, 2016
Theory of Computation
context-free-grammar
conjunctive-normal-form
+
–
3
votes
2
answers
322
UGC NET CSE | Junet 2015 | Part 3 | Question: 61
A context free grammar for $L=\{w \mid n_0 (w) > n_1 (w)\}$ is given by: $S \rightarrow 0 \mid 0S \mid 1 S S$ $S \rightarrow 0 S \mid 1 S \mid 0 S S \mid 1 S S \mid 0 \mid 1$ $S \rightarrow 0 \mid 0 S \mid 1 S S \mid S 1 S \mid S S 1$ $S \rightarrow 0 S \mid 1 S \mid 0 \mid 1$
A context free grammar for $L=\{w \mid n_0 (w) n_1 (w)\}$ is given by:$S \rightarrow 0 \mid 0S \mid 1 S S$$S \rightarrow 0 S \mid 1 S \mid 0 S S \mid 1 S S \mid 0 \mid 1...
go_editor
2.9k
views
go_editor
asked
Aug 1, 2016
Theory of Computation
ugcnetcse-june2015-paper3
theory-of-computation
context-free-grammar
+
–
2
votes
4
answers
323
grammer in compiler design
Which of the following is the most general phase-structured grammar? (a) regular (b) context-free (c) context-sensitive (d) none of the above
Which of the following is the most general phase-structured grammar?(a) regular (b) context-free(c) context-sensitive (d) none of the above
vkm07
1.6k
views
vkm07
asked
Jul 31, 2016
Compiler Design
compiler-design
context-free-grammar
regular-grammar
context-sensitive
+
–
4
votes
2
answers
324
grammer in compiler design
Which of the following grammars are not phase-structured? (a) regular (b) context-free (c) context-sensitive (d) none of the above
Which of the following grammars are not phase-structured?(a) regular (b) context-free(c) context-sensitive (d) none of the above
vkm07
5.6k
views
vkm07
asked
Jul 28, 2016
Compiler Design
compiler-design
context-free-grammar
regular-grammar
context-sensitive
+
–
2
votes
2
answers
325
UGC NET CSE | December 2013 | Part 2 | Question: 27
The context free grammar for the language: $L=\{a^n b^m \mid n \leq m + 3, n \geq 0, m \geq 0 \}$ is $S \rightarrow aaa \quad A; A \rightarrow aAb \mid B, B \rightarrow Bb \mid \lambda$ ... $S \rightarrow aaaA \mid aa \quad A \mid aA \mid \lambda, A \rightarrow aAb \mid B, B \rightarrow Bb \mid \lambda$
The context free grammar for the language:$L=\{a^n b^m \mid n \leq m + 3, n \geq 0, m \geq 0 \}$ is$S \rightarrow aaa \quad A; A \rightarrow aAb \mid B, B \rightarrow Bb ...
go_editor
3.6k
views
go_editor
asked
Jul 26, 2016
Theory of Computation
ugcnetcse-dec2013-paper2
theory-of-computation
context-free-grammar
+
–
2
votes
6
answers
326
UGC NET CSE | December 2014 | Part 2 | Question: 35
The following Context-Free Grammar (CFG) : $S \rightarrow aB | bA$ $A \rightarrow a | as | bAA$ $B \rightarrow b | bs | aBB$ will generate Odd numbers of $a's$ and odd numbers of $b's$ Even numbers of $a's$ and even numbers of $b's$ Equal numbers of $a's$ and $b's$ Different numbers of $a's$ and $b's$
The following Context-Free Grammar (CFG) :$S \rightarrow aB | bA$$A \rightarrow a | as | bAA$$B \rightarrow b | bs | aBB$ will generateOdd numbers of $a's$ and odd number...
makhdoom ghaya
8.7k
views
makhdoom ghaya
asked
Jul 22, 2016
Theory of Computation
ugcnetcse-dec2014-paper2
theory-of-computation
context-free-grammar
+
–
1
votes
2
answers
327
compiler design
Let G be a context-free grammar where G = ({S, A, B, C}, {a, b, d}, P, S) with the productions in P given below. S → ABAC A → aA ∣ ε B → bB ∣ ε C → d (ε denotes the null string). Transform the grammar G to an equivalent context-free grammar G′ that has no ε productions and no unit productions. (A unit production is of the form x → y, and x and y are non terminals).
Let G be a context-free grammar where G = ({S, A, B, C}, {a, b, d}, P, S) with the productions in P given below.S → ABACA → aA ∣ εB → bB ∣ εC → d(ε denotes...
anshul namdeo
3.2k
views
anshul namdeo
asked
Jul 20, 2016
Compiler Design
compiler-design
context-free-grammar
+
–
3
votes
1
answer
328
UGC NET CSE | June 2013 | Part 3 | Question: 38
For every context free grammar (G) there exists an algorithm that passes any $w \in L(G)$ in number of steps proportional to $ln\mid w \mid$ $\mid w \mid$ $\mid w \mid^2$ $\mid w \mid^3$
For every context free grammar (G) there exists an algorithm that passes any $w \in L(G)$ in number of steps proportional to$ln\mid w \mid$$\mid w \mid$$\mid w \mid^2$$\m...
go_editor
2.0k
views
go_editor
asked
Jul 17, 2016
Theory of Computation
ugcnetcse-june2013-paper3
theory-of-computation
context-free-grammar
+
–
1
votes
2
answers
329
What is the number of terminal strings generated by given context-free grammar ?
S→ A 0B A→ BB|0 B →AA|1 What is the number of terminal strings of length 5 generated by the context-free grammar shown above? 4 5 6 7
S→ A 0BA→ BB|0B →AA|1What is the number of terminal strings of length 5 generated by the context-free grammar shown above?4567
sh!va
1.1k
views
sh!va
asked
Jul 12, 2016
Compiler Design
compiler-design
context-free-grammar
+
–
1
votes
2
answers
330
UGC NET CSE | June 2012 | Part 3 | Question: 28
Which one of the following is not a Greibach Normal form grammar? (i) $S \rightarrow a \mid bA \mid aA \mid bB$ $A \rightarrow a$ $B \rightarrow b$ (ii) $S \rightarrow a \mid aA \mid AB$ $A \rightarrow a$ $B \rightarrow b$ (iii) $S \rightarrow a \mid A \mid aA $ $A \rightarrow a$ (i) and (ii) (i) and (iii) (ii) and (iii) (i), (ii) and (iii)
Which one of the following is not a Greibach Normal form grammar?(i)$S \rightarrow a \mid bA \mid aA \mid bB$$A \rightarrow a$$B \rightarrow b$(ii)$S \rightarrow a \mid a...
go_editor
4.7k
views
go_editor
asked
Jul 7, 2016
Theory of Computation
ugcnetcse-june2012-paper3
theory-of-computation
context-free-grammar
+
–
Page:
« prev
1
...
6
7
8
9
10
11
12
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register