Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged context-free-grammar
4
votes
1
answer
1
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 16
Consider the following context-free grammar, with start symbol $S$ and terminals $a, ; , \lt , \gt .$ $ S \rightarrow \;\lt L \mid a \qquad L \rightarrow a R \mid \;\lt L R \quad R \rightarrow\;\gt\; \mid \;; L $ How many different parse trees are there for the string $\lt \lt a \gt ;a\gt ?$
Consider the following context-free grammar, with start symbol $S$ and terminals $a, ; , \lt , \gt .$$$S \rightarrow \;\lt L \mid a \qquad L \rightarrow a R \mid \;\lt L...
GO Classes
349
views
GO Classes
asked
Jan 21
Compiler Design
goclasses2024-mockgate-12
goclasses
numerical-answers
compiler-design
parsing
context-free-grammar
1-mark
+
–
5
votes
2
answers
2
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 35
Which one of the following context-free grammars is unambiguous? (Note that $a, b, c,(,),+$ are terminals, $S, X, Y$ are nonterminals, and the start symbol in each case is $S.)$ ... $S \rightarrow \epsilon|()|(S)$ $S \rightarrow \epsilon|(S)| S S$ $S \rightarrow \epsilon|(S)| S$
Which one of the following context-free grammars is unambiguous? (Note that $a, b, c,(,),+$ are terminals, $S, X, Y$ are nonterminals, and the start symbol in each case i...
GO Classes
591
views
GO Classes
asked
Jan 13
Theory of Computation
goclasses2024-mockgate-11
goclasses
theory-of-computation
context-free-grammar
multiple-selects
1-mark
+
–
3
votes
2
answers
3
TOC - Self Doubt
Can anyone explain $\overline{ww}$ is $CFL$ or $CSL$ And if $CFL$ can you write the equivalent $CFG$ for this ?
Can anyone explain $\overline{ww}$ is $CFL$ or $CSL$ And if $CFL$ can you write the equivalent $CFG$ for this ?
Jiten008
344
views
Jiten008
asked
Oct 24, 2023
Theory of Computation
pushdown-automata
theory-of-computation
self-doubt
regular-language
context-free-language
context-sensitive
turing-machine
closure-property
context-free-grammar
+
–
1
votes
2
answers
4
Unacademy Compiler Design Workbook
Consider the following statements: (A) LL (k) grammars have one to one correspondence with DCFLs. (B) LR (k) grammars have one to one correspondence with CFLs. A is true but B is false A is false but B is true Both are False Both are True
Consider the following statements:(A) LL (k) grammars have one to one correspondence with DCFLs.(B) LR (k) grammars have one to one correspondence with CFLs. A is true bu...
lovish_bhatia
350
views
lovish_bhatia
asked
Sep 12, 2023
Compiler Design
compiler-design
syntax-directed-translation
lexical-analysis
context-free-grammar
context-free-language
+
–
0
votes
1
answer
5
Context Free Languages
Is the following language CFL : { ww | w in (a+b)* and |w| <1000 }
Is the following language CFL :{ ww | w in (a+b)* and |w| <1000 }
practicalmetal
530
views
practicalmetal
asked
Mar 20, 2023
Theory of Computation
context-free-language
theory-of-computation
context-free-grammar
pushdown-automata
+
–
0
votes
1
answer
6
Context Free Languages
Is the following language context free: The set of all strings with number of a’s equal to number of b’s and the sum of a’s and b’s to be divisible by 3.
Is the following language context free:The set of all strings with number of a’s equal to number of b’s and the sum of a’s and b’s to be divisible by 3.
practicalmetal
496
views
practicalmetal
asked
Mar 15, 2023
Theory of Computation
context-free-language
theory-of-computation
context-free-grammar
pushdown-automata
+
–
14
votes
5
answers
7
GATE CSE 2023 | Question: 29
Consider the context-free grammar $G$ below \[ \begin{array}{l} S \rightarrow a S b \mid X \\ X \rightarrow a X \mid X b \mid a \mid b, \end{array} \] where $S$ and $X$ are non-terminals, and $a$ and $b$ are terminal symbols. The starting non- ... $G$ is $a^{\ast} b^{\ast}(a+b)$ The language generated by $G$ is not a regular language
Consider the context-free grammar $G$ below\[\begin{array}{l}S \rightarrow a S b \mid X \\X \rightarrow a X \mid X b \mid a \mid b,\end{array}\]where $S$ and $X$ are non-...
admin
8.5k
views
admin
asked
Feb 15, 2023
Theory of Computation
gatecse-2023
theory-of-computation
context-free-grammar
2-marks
+
–
0
votes
0
answers
8
derive a language from a grammar
{M ∈ {a,b}∗ | M contains at least three bs} {N ∈ {a,b}∗ | N has an odd length and a is in the middle always}
{M ∈ {a,b}∗ | M contains at least three bs} {N ∈ {a,b}∗ | N has an odd length and a is in the middle always}
moe12leb
253
views
moe12leb
asked
Jan 21, 2023
Theory of Computation
theory-of-computation
regular-language
context-free-grammar
+
–
0
votes
1
answer
9
context free grammar
S→ aS | bS | epsilon what is the language generated by this grammar ?
S→ aS | bS | epsilonwhat is the language generated by this grammar ?
moe12leb
267
views
moe12leb
asked
Jan 21, 2023
Theory of Computation
theory-of-computation
context-free-grammar
+
–
0
votes
2
answers
10
context free grammar
what is the langauge generated by this grammar ? S-->aS | aSbS | ε what is the language
what is the langauge generated by this grammar ?S >aS | aSbS | ε what is the language
moe12leb
252
views
moe12leb
asked
Jan 21, 2023
Theory of Computation
theory-of-computation
context-free-language
context-free-grammar
+
–
0
votes
0
answers
11
Context Free Languages(CFG) Push Down Anutomata(PDA)
PDA for $a^i b^j | i \neq 2j+1$ ?
PDA for $a^i b^j | i \neq 2j+1$ ?
jaisyking
187
views
jaisyking
asked
Jan 12, 2023
Theory of Computation
theory-of-computation
context-free-grammar
pushdown-automata
context-free-language
+
–
0
votes
1
answer
12
Push Down Automation | Parsing | Input Buffer and Stack
Consider a situation, where the input buffer is still having elements, and our PDA has reached final state. Given that for next input element the final state has no transition defined. In above situation will the i/p string be ... in all cases May be accepted if empty stack acceptance is allowed in the given PDA Something else, I can explain
Consider a situation, where the input buffer is still having elements, and our PDA has reached final state. Given that for next input element the final state has no trans...
Souvik33
469
views
Souvik33
asked
Dec 20, 2022
Compiler Design
theory-of-computation
pushdown-automata
context-free-grammar
+
–
1
votes
0
answers
13
DRDO CSE 2022 Paper 2 | Question: 11
A context-free grammar is in Chomsky Normal Form if every rule is of the form \[ \begin{array}{l} A \longrightarrow B C \\ A \longrightarrow a \end{array} \] where $a$ is a terminal, $A, B$ and $C$ are variables except $B$ and $C$ cannot be ... } S \longrightarrow A S B \mid a B \\ A \longrightarrow B \mid S \\ B \longrightarrow b \mid \varepsilon \end{array} \]
A context-free grammar is in Chomsky Normal Form if every rule is of the form\[\begin{array}{l}A \longrightarrow B C \\A \longrightarrow a\end{array}\]where $a$ is a term...
admin
272
views
admin
asked
Dec 15, 2022
Theory of Computation
drdocse-2022-paper2
theory-of-computation
context-free-grammar
descriptive
7-marks
+
–
0
votes
0
answers
14
Context Free Grammar
Find context-free grammars for the following language L = { w : na(w) = 2nb(w); where w belongs {a, b}*}
Find context-free grammars for the following languageL = { w : na(w) = 2nb(w); where w belongs {a, b}*}
moe12leb
215
views
moe12leb
asked
Nov 28, 2022
Theory of Computation
theory-of-computation
context-free-grammar
+
–
0
votes
1
answer
15
Context Free Grammar
Find context-free grammars for the following language The complement of the language L = belongs {a^n, b^n}
Find context-free grammars for the following languageThe complement of the language L = belongs {a^n, b^n}
moe12leb
336
views
moe12leb
asked
Nov 28, 2022
Theory of Computation
theory-of-computation
context-free-grammar
+
–
0
votes
1
answer
16
#self_doubt#CFG
Are these two grammars equal? 1->------------------- S->X|epsilon X->BBX|epsilon B->a|b 2->------------ S->AAS|epsilon A->a|b
Are these two grammars equal?1- -S->X|epsilonX->BBX|epsilonB->a|b2- S->AAS|epsilonA->a|b
Dknights
301
views
Dknights
asked
Nov 10, 2022
Theory of Computation
theory-of-computation
context-free-grammar
+
–
0
votes
0
answers
17
Construct unambiguous context-free grammars for each of the following languages. In each case show that your grammar is correct. Arithmetic expressions in postfix notation. Left-associative lists of identifiers separated by commas. Right-associative lists of identifiers separated by commas. Arithmetic expressions of integers and identifiers with the four binary operators +, -, *, /
Shongkor
544
views
Shongkor
asked
Nov 4, 2022
Compiler Design
compiler-design
context-free-grammar
+
–
Page:
1
2
3
4
5
6
...
12
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register