Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged grammar
3
votes
2
answers
241
theoryof computation
Both these languages are not equivalent...right ???
Both these languages are not equivalent...right ???
Vicky rix
628
views
Vicky rix
asked
Apr 2, 2017
Theory of Computation
theory-of-computation
finite-automata
regular-expression
grammar
+
–
1
votes
2
answers
242
theory of computation
Vicky rix
715
views
Vicky rix
asked
Apr 1, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
1
answer
243
theory of computation
Vicky rix
350
views
Vicky rix
asked
Apr 1, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
2
answers
244
theory of computation
Vicky rix
501
views
Vicky rix
asked
Apr 1, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
3
answers
245
theory of computation
Vicky rix
406
views
Vicky rix
asked
Apr 1, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
2
answers
246
theory of computation
Vicky rix
401
views
Vicky rix
asked
Apr 1, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
3
answers
247
theory of computation
L = (a^n b^n a^n | n = 1,2,3) is an example of a language that is A. context free B. not context free C. not context free but whose complement is CF D. both (b) and (c)
L = (a^n b^n a^n | n = 1,2,3) is an example of a language that isA.context freeB.not context freeC. not context free but whose complement is CFD. both (b) and (c)
Bhavana Giri
4.1k
views
Bhavana Giri
asked
Mar 31, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
3
answers
248
theory of computation
Let sigma = { a,b }.Find the grammar which generates the language, where na(w) and nb(w) denote the number of a's in w and number of b's in w respectively.
Let sigma = { a,b }.Find the grammar which generates the language,where na(w) and nb(w) denote the number of a's in w and number of b's in w respectively.
Vicky rix
435
views
Vicky rix
asked
Mar 31, 2017
Theory of Computation
theory-of-computation
grammar
+
–
2
votes
1
answer
249
Peter Linz Exercise 5.1 #11
Find a context free grammar for ∑ = {a,b} for the language L = { an wwR bn : w ∈ ∑*, n>=1 } I have worked out the following set of productions S--> aSb | aAb //generates anbn A--> aXa | bXb | ∈ (Generates wwR which can be considered as string starting and ending with same symbol). X--> aX | bX | ∈ are my productions correct?
Find a context free grammar for ∑ = {a,b} for the language L = { an wwR bn : w ∈ ∑*, n>=1 } I have worked out the following set of productionsS aSb | aAb //generat...
Ayush Upadhyaya
1.3k
views
Ayush Upadhyaya
asked
Mar 21, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
2
answers
250
Automata - Grammars
Is it possible to give a context-free grammar for the language below : L = { anbmcndm | n, m >=1 } As, my analysis,whenever we try to produce equal a and c and try to put b in between, it would not be possible for us to put d just next to the stream of c's. hence, it is not possible to give a Context Free Grammar for this language. Is my analysis correct?
Is it possible to give a context-free grammar for the language below :L = { anbmcndm | n, m >=1 }As, my analysis,whenever we try to produce equal a and c and try to put b...
Ayush Upadhyaya
448
views
Ayush Upadhyaya
asked
Mar 20, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
1
answer
251
Automata-Grammars
For the language L = { anbmcmdn : n , m>=1 } I came with following set of productions : S-->aSd | A A--> bAc | bc whereas the answer was given as below S--> aSd | aAd A--> bAc | bc how far is my answer correct?
For the language L = { anbmcmdn : n , m>=1 }I came with following set of productions :S >aSd | AA bAc | bcwhereas the answer was given as belowS aSd | aAdA bAc | bcho...
Ayush Upadhyaya
564
views
Ayush Upadhyaya
asked
Mar 20, 2017
Theory of Computation
theory-of-computation
grammar
+
–
0
votes
3
answers
252
Peter Linz Exercise 5.1
Is the following language context-free? L= { uvwvR : u,v,w∈ {a,b}+ |u| = |w| =2 } If yes, provide set of productions for the same.
Is the following language context-free?L= { uvwvR : u,v,w∈ {a,b}+ |u| = |w| =2 }If yes, provide set of productions for the same.
Ayush Upadhyaya
1.3k
views
Ayush Upadhyaya
asked
Mar 19, 2017
Theory of Computation
theory-of-computation
grammar
+
–
1
votes
5
answers
253
Peter Linz Exercise 5.1
Find context free grammars for the following languages (with n>=0, m>=0, k>=0) (a) L={anbmck : n=m or m<=k} (b) L={ anbmck : n=m or m≠k} (c) L={anbmck : k=n+m } (d) L={ anbmck : n+2m=k} (e) L={anbmck : k=|n-m| } (f) L={ w ∈ {a,b,c}* : na(w)+nb(w)≠nc(w) } (g) L={ anbmck : k≠n+m } (h) L= { anbmck : K>=3}
Find context free grammars for the following languages (with n>=0, m>=0, k>=0)(a) L={anbmck : n=m or m<=k}(b) L={ anbmck : n=m or m≠k}(c) L={anbmck : k=n+m }(d) L={ an...
Ayush Upadhyaya
7.6k
views
Ayush Upadhyaya
asked
Mar 19, 2017
Theory of Computation
theory-of-computation
grammar
+
–
1
votes
2
answers
254
Peter Linz Exercise 5.1
Give a context-free grammar for the language below : (n>=0, m>=0) L= { w ∊ {a,b}* : na(w)=2nb(w)+1}
Give a context-free grammar for the language below :(n>=0, m>=0)L= { w ∊ {a,b}* : na(w)=2nb(w)+1}
Ayush Upadhyaya
2.1k
views
Ayush Upadhyaya
asked
Mar 19, 2017
Theory of Computation
theory-of-computation
grammar
+
–
2
votes
1
answer
255
Peter Linz Exercise 5.3
Find the context-free grammar for the following language(n>=0 and m>=0) ? L={an bm : n<=m+3}
Find the context-free grammar for the following language(n>=0 and m>=0) ?L={an bm : n<=m+3}
Ayush Upadhyaya
5.0k
views
Ayush Upadhyaya
asked
Mar 19, 2017
Theory of Computation
theory-of-computation
grammar
+
–
32
votes
7
answers
256
GATE CSE 2017 Set 2 | Question: 32
Consider the following expression grammar $G$: $E \rightarrow E-T \mid T$ $T \rightarrow T + F \mid F$ $F \rightarrow (E) \mid id$ Which of the following grammars is not left recursive, but is equivalent to $G$? $E \rightarrow E-T \mid T$ ... $E \rightarrow TX \mid (TX)$ $X \rightarrow -TX \mid +TX \mid \epsilon$ $T \rightarrow id$
Consider the following expression grammar $G$:$E \rightarrow E-T \mid T$$T \rightarrow T + F \mid F$$F \rightarrow (E) \mid id$Which of the following grammars is not left...
Arjun
11.0k
views
Arjun
asked
Feb 14, 2017
Compiler Design
gatecse-2017-set2
grammar
+
–
0
votes
1
answer
257
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
328
views
Bikram
asked
Feb 9, 2017
GATE
tbb-mockgate-3
theory-of-computation
context-free-grammar
grammar
+
–
0
votes
1
answer
258
Test by Bikram | Mock GATE | Test 3 | Question: 8
The grammar having no Epsilon$\left ( \epsilon \right )$ transition or two adjacent nonterminals in the right side of any production is ? $LL$\left ( 1 \right )$ grammar Operator grammar Unambiguous grammar Context Sensitive grammar
The grammar having no Epsilon$\left ( \epsilon \right )$ transition or two adjacent nonterminals in the right side of any production is ?$LL$$\left ( 1 \right )$ grammarO...
Bikram
234
views
Bikram
asked
Feb 9, 2017
GATE
tbb-mockgate-3
compiler-design
grammar
parsing
+
–
5
votes
1
answer
259
GateBook Mock Test_2(Compilers)
Consider these three grammars. Which of the following statements is not true? (A) If w can be generated by G1, then it can be generated by G2. (B) If w can be generated by G2, then it can be generated by G3. (C) If w can be generated by G3, then it can be generated by G1. (D) If w can be generated by G2, then it can be generated by G1.
Consider these three grammars.Which of the following statements is not true?(A) If w can be generated by G1, then it can be generated by G2.(B) If w can be generated by G...
smartmeet
918
views
smartmeet
asked
Feb 7, 2017
Compiler Design
gatebook-mt2
compiler-design
grammar
gatebook-test-series
+
–
1
votes
2
answers
260
PARSING
ARE NUMBER OF SHIFT ENTRIES / ACTIONS IN PARSING TABLE OF SLR(1) AND LALR(1) SAME ALWAYS??
ARE NUMBER OF SHIFT ENTRIES / ACTIONS IN PARSING TABLE OF SLR(1) AND LALR(1) SAME ALWAYS??
sushmita
2.7k
views
sushmita
asked
Feb 3, 2017
Compiler Design
compiler-design
parsing
grammar
ll-parser
+
–
2
votes
1
answer
261
Remove Left recursion from context free grammer
rahuldb
1.9k
views
rahuldb
asked
Jan 31, 2017
Compiler Design
compiler-design
grammar
left-recursion
recurrence-relation
test-series
+
–
0
votes
1
answer
262
Construct LL(1) Parsing table for the following grammar
rahuldb
5.0k
views
rahuldb
asked
Jan 31, 2017
Compiler Design
compiler-design
parsing
grammar
ll-parser
theory-of-computation
test-series
+
–
1
votes
2
answers
263
Grammar
Can set of terminal be empty in a grammar? Is epsilon (null string) counted as a terminal symbol?
Can set of terminal be empty in a grammar? Is epsilon (null string) counted as a terminal symbol?
rdfan19
1.7k
views
rdfan19
asked
Jan 28, 2017
Theory of Computation
theory-of-computation
grammar
+
–
3
votes
1
answer
264
Test by Bikram | Mock GATE | Test 2 | Question: 9
Consider these three grammars. ... by $G2$, then it can be generated by $G1$. If w can be generated by $G3$, then it can be generated by $G1$.
Consider these three grammars.$$\begin{array}{|c|c|c|} \hline \textbf{Grammar G1:} & \textbf{Grammar G2:} & \textbf{Grammar G3:} \\ \hline E\rightarrow E+T \mid T & E\r...
Bikram
847
views
Bikram
asked
Jan 24, 2017
GATE
tbb-mockgate-2
theory-of-computation
grammar
multiple-selects
+
–
0
votes
1
answer
265
doubt CD
Prateek kumar
263
views
Prateek kumar
asked
Jan 22, 2017
Compiler Design
compiler-design
grammar
numerical-answers
test-series
+
–
0
votes
1
answer
266
compiler
ukn
396
views
ukn
asked
Jan 19, 2017
Compiler Design
compiler-design
grammar
operator-grammar
operator-precedence
ace-test-series
+
–
0
votes
1
answer
267
Testbook Test Series: Theory Of Computation - Grammar
Hradesh patel
424
views
Hradesh patel
asked
Jan 18, 2017
Theory of Computation
testbook-test-series
test-series
grammar
theory-of-computation
+
–
5
votes
2
answers
268
Compiler Design
How to do this type of QUESTIONS? Consider following grammar : S → S1 + A | A A → D – A | D D → D1 * B | B B → num The number of internal nodes for the parse tree for 5 * 4 + 10 * 6 – 7 – 8
How to do this type of QUESTIONS?Consider following grammar : S → S1 + A | A A → D – A | D D → D1 * B | B B → num The number of internal nodes for the parse tre...
vishwa ratna
2.8k
views
vishwa ratna
asked
Jan 18, 2017
Compiler Design
compiler-design
grammar
parsing
numerical-answers
+
–
2
votes
1
answer
269
Test by Bikram | Mock GATE | Test 1 | Question: 47
For the given grammar consider the statements: $S' \rightarrow S$ $S \rightarrow aAd \mid bBd \mid aBe \mid bAe$ $A \rightarrow c$ $B \rightarrow c$ Which of the following statement is/are true? S1: The given grammar is LR(l). S2: On merger the grammar will generate reduce reduce conflict. Only S1 Only S2 Both S1 and S2 None of S1 and S2
For the given grammar consider the statements:$S' \rightarrow S$$S \rightarrow aAd \mid bBd \mid aBe \mid bAe$$A \rightarrow c$$B \rightarrow c$Which of the following...
Bikram
726
views
Bikram
asked
Jan 16, 2017
GATE
tbb-mockgate-1
grammar
compiler-design
+
–
1
votes
1
answer
270
Test by Bikram | Mock GATE | Test 1 | Question: 35
What will be the resulting grammar after removal of left-recursion from the following grammar? $E$ $\rightarrow$ $Ea $|$ Eb $|$ a $|$ b$ $E$\rightarrow$ $aE'$|$ bE'$ ; $E$'$\rightarrow$ $aE'$ $|$ $bE'$ | $\epsilon$ $ ... ;$ |$\epsilon$ $E$\rightarrow$ $aE' $|$ bE'$; $E'$ $\rightarrow$ $a$ | $b$ $|$ $\epsilon$
What will be the resulting grammar after removal of left-recursion from the following grammar?$E$ $\rightarrow$ $Ea $|$ Eb $|$ a $|$ b$$E$$\rightarrow$ $aE'$|$ bE'$ ; ...
Bikram
337
views
Bikram
asked
Jan 16, 2017
GATE
tbb-mockgate-1
grammar
compiler-design
+
–
Page:
« prev
1
...
4
5
6
7
8
9
10
11
12
13
14
15
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register