Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged context-free-language
4
votes
2
answers
301
DCFL or Not
$\left \{ a^{m+n}b^{m+n}c^{n}|m,n\geq 1 \right \}$ $\left \{ a^{m+n}b^{m+n}c^{k} |m,n,k\geq 1\right \}$ $\left \{ a^{m+n}b^{m+k}c^{n+k} |m,n,k\geq 1\right \}$ Which one DCFL, CFL or CSL?
$\left \{ a^{m+n}b^{m+n}c^{n}|m,n\geq 1 \right \}$$\left \{ a^{m+n}b^{m+n}c^{k} |m,n,k\geq 1\right \}$$\left \{ a^{m+n}b^{m+k}c^{n+k} |m,n,k\geq 1\right \}$Which one DCFL...
srestha
1.6k
views
srestha
asked
Jun 22, 2018
Theory of Computation
theory-of-computation
dcfl
context-free-language
pushdown-automata
+
–
1
votes
1
answer
302
self made doubt
How to know that the language needs 1 stack or more than one stack in order to know about it is regular, context-free or not. example L1={$a^i b^j c^k│i<j<k$} L2={$a^i b^j c^k│i<j \ or \ k<j$} L3={$a^i b^j c^k│i<j \ and \ k<j$}
How to know that the language needs 1 stack or more than one stack in order to know about it is regular, context-free or not.exampleL1={$a^i b^j c^k│i<j<k$}L2={$a^i b^j...
Divyanshum29
291
views
Divyanshum29
asked
Jun 11, 2018
Theory of Computation
context-free-language
regular-language
theory-of-computation
+
–
0
votes
2
answers
303
Theory Of Computation Doubt.
I saw some where that a language which accepts $a^{n^{2}} | n \geq1$ is not context free Language and not regular language. is it not a language that has at least one $'a'$ as the string?. It should be regular as well according to this Logic right. Please correct me if wrong.
I saw some where that a language which accepts $a^{n^{2}} | n \geq1$ is not context free Language and not regular language.is it not a language that has at least one $'a'...
abhiram144
272
views
abhiram144
asked
Jun 3, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
3
votes
2
answers
304
Grade up topicwise questions
L1={a^n b^n c ^m|m>=0 and n>=0} L2={a^m b^ n c^ n|n>=0 and m>=0} If L3=L1UL2 then how many of L1,L2,L3 are context free languages? A)1 (B)2 (C)3 (D) none Answer given option C. Please explain?
L1={a^n b^n c ^m|m>=0 and n>=0}L2={a^m b^ n c^ n|n>=0 and m>=0}If L3=L1UL2 then how many of L1,L2,L3 are context free languages?A)1 (B)2 (C)3 (D) noneAnswer given option ...
Sona Barman
671
views
Sona Barman
asked
May 8, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
1
votes
4
answers
305
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
+
–
1
votes
1
answer
306
which of the following statements are correct in context of LR parser ?
1.Class of grammar that will parse using LR method is proper subset of class of grammar that will parse with predictive parser . 2. LR Parser can be constructed to recognize virtually all programming language constructs for which CFG can be written . Please give valid justification for each point even if it is false
1.Class of grammar that will parse using LR method is proper subset of class of grammar that will parse with predictive parser .2. LR Parser can be constructed to recogni...
radha gogia
1.9k
views
radha gogia
asked
Apr 30, 2018
Compiler Design
compiler-design
context-free-language
+
–
4
votes
2
answers
307
ISRO2018-25
$CFG$ (Context Free Grammar) is not closed under: Union Complementation Kleene star Product
$CFG$ (Context Free Grammar) is not closed under: UnionComplementationKleene starProduct
Arjun
1.6k
views
Arjun
asked
Apr 22, 2018
Theory of Computation
isro2018
closure-property
context-free-language
theory-of-computation
+
–
0
votes
1
answer
308
Context Free Languages
Answer with explanation will be acknowledged.
Answer with explanation will be acknowledged.
Subham Nagar
534
views
Subham Nagar
asked
Apr 13, 2018
Theory of Computation
context-free-language
theory-of-computation
+
–
1
votes
1
answer
309
Introduction to Computer Theory
Give CFG for the following language L =$ {(a^{m})(b^{m+n})(c^{n}) | m,n= 0,1,2,.....}$
Give CFG for the following languageL =$ {(a^{m})(b^{m+n})(c^{n}) | m,n= 0,1,2,.....}$
The Capricorn
372
views
The Capricorn
asked
Apr 12, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
0
votes
1
answer
310
Exam - Foundation of Computing - 2018
Find a context-free grammar for the following language: L = { a^m b^m c^k | k <= m } (in order to show that the language is context-free)
Find a context-free grammar for the following language: L = { a^m b^m c^k | k <= m }(in order to show that the language is context-free)
Melissa
224
views
Melissa
asked
Apr 11, 2018
Theory of Computation
context-free-language
context-free-grammar
+
–
1
votes
0
answers
311
whether the given languages are context free or not
Sambit Kumar
667
views
Sambit Kumar
asked
Apr 8, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
2
votes
0
answers
312
Theory of computations(CFG)
$L1$ has the following grammar:- $S \rightarrow aB/BA$ $A\rightarrow bAA/aS/a$ $B\rightarrow b/bS/aBB$ can someone help me with an easy way to get the general expression for string belonging to this language. Or some hint that how should I proceed to solve this question.
$L1$ has the following grammar:-$S \rightarrow aB/BA$$A\rightarrow bAA/aS/a$$B\rightarrow b/bS/aBB$can someone help me with an easy way to get the general expression for ...
hrcule
371
views
hrcule
asked
Mar 29, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
5
votes
2
answers
313
Context Free Languages
Which of these languages are deterministic? $L_{1} =$ $\left \{a^{n}b^{n}: n \geq 1 \right \}\cup \left \{ b \right \}$ $L_{2} =$ $\left \{a^{n}b^{n}: n \geq 1 \right \}\cup \left \{ a \right \}$
Which of these languages are deterministic?$L_{1} =$ $\left \{a^{n}b^{n}: n \geq 1 \right \}\cup \left \{ b \right \}$$L_{2} =$ $\left \{a^{n}b^{n}: n \geq 1 \right \}\cu...
Mk Utkarsh
824
views
Mk Utkarsh
asked
Mar 28, 2018
Theory of Computation
context-free-language
theory-of-computation
+
–
3
votes
1
answer
314
CFG to GNF
Convert the given CFG to GNF. $S \rightarrow MN$ $M\rightarrow aMb|\epsilon $ $N\rightarrow aNb|\epsilon $
Convert the given CFG to GNF.$S \rightarrow MN$$M\rightarrow aMb|\epsilon $$N\rightarrow aNb|\epsilon $
Mk Utkarsh
2.8k
views
Mk Utkarsh
asked
Mar 25, 2018
Theory of Computation
theory-of-computation
context-free-language
conjunctive-normal-form
gnf
+
–
0
votes
2
answers
315
TOC Problem
pankaj_vir
656
views
pankaj_vir
asked
Mar 23, 2018
Theory of Computation
theory-of-computation
regular-language
context-free-language
+
–
1
votes
2
answers
316
Self_doubt
C1: For DFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ* C2: For NFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ* Where F = Final states set ϕ = Total states set Choose the correct option ? Both are true Both are False $C1$ is true, $C2$ is false $C1$ is false, $C2$ is true What is the answer and also explain that?
C1: For DFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ* C2: For NFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ* Where F = Final states set ϕ = Total states setChoose t...
Raj Kumar 7
287
views
Raj Kumar 7
asked
Mar 22, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
1
votes
1
answer
317
Linear Ambiguous Context Free Grammar
Please post few examples of Linear Ambiguous Context Free Grammar. It would be helpful if you post grammars for famous languages.
Please post few examples of Linear Ambiguous Context Free Grammar.It would be helpful if you post grammars for famous languages.
Mk Utkarsh
1.4k
views
Mk Utkarsh
asked
Mar 22, 2018
Theory of Computation
context-free-language
theory-of-computation
context-free-grammar
+
–
1
votes
1
answer
318
Peter Linz Edition 4 Exercise 5.1 Question 7.c (Page No. 133)
Find CFG for the following language L = $\left \{ a^{n}b^{m}: n \neq 2m \right \}$
Find CFG for the following languageL = $\left \{ a^{n}b^{m}: n \neq 2m \right \}$
Mk Utkarsh
1.4k
views
Mk Utkarsh
asked
Mar 20, 2018
Theory of Computation
theory-of-computation
peter-linz
peter-linz-edition4
context-free-language
+
–
0
votes
1
answer
319
Introduction to Computer Theory
Write the CFG (Context Free Grammar) for the given condition: ((a^n).(b^(2n + 1)))
Write the CFG (Context Free Grammar) for the given condition:((a^n).(b^(2n + 1)))
The Capricorn
246
views
The Capricorn
asked
Mar 17, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
0
votes
1
answer
320
Finding whether given languages are regular or context free
Given $L_1=\{a^nb^nc^n | n\geq 0\}$ $L_2 =\{a^nb^mc^k|k=n+m \text{ and }n,m\geq 0 \}$ $L_3 =\{a^nb^mc^k|n,m,k \geq 0 \}$ Assume $L_4=L_1 (L_3)^*$ $L_5=(L_1\cap L_2)\cup L_3 $ Which of the following ... is regular and L5 is not regular B. L4 is CFL and L5 is not CFL C. Both L4, L5 are regular D. Both L4, L5 are CFL but not regular
Given$L_1=\{a^nb^nc^n | n\geq 0\}$$L_2 =\{a^nb^mc^k|k=n+m \text{ and }n,m\geq 0 \}$$L_3 =\{a^nb^mc^k|n,m,k \geq 0 \}$Assume $L_4=L_1 (L_3)^*$$L_5=(L_1\cap L_2)\cup L_3...
GateAspirant999
537
views
GateAspirant999
asked
Mar 2, 2018
Theory of Computation
regular-language
context-free-language
+
–
2
votes
1
answer
321
Language of left, right, top and down steps
Consider the infinite two-dimensional grid $G=\{(m,n)|\text{m and n are integers} \}$ Thus every point in G has 4 neighbours, North, South, East and West, obtained by varying m or n by $\pm 1$. Starting at origin (0,0), a string of command letters N, S ... and B are CFLs $L'$ is context free A. 1,2 and 3 only B. 3 and 4 only C. 4 only D. 1 and 2 only
Consider the infinite two-dimensional grid $G=\{(m,n)|\text{m and n are integers} \}$Thus every point in G has 4 neighbours, North, South, East and West, obtained by vary...
GateAspirant999
531
views
GateAspirant999
asked
Mar 2, 2018
Theory of Computation
test-series
regular-language
context-free-language
theory-of-computation
+
–
1
votes
2
answers
322
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
323
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
324
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
328
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
0
answers
325
#TOC- Undecidability
In this lecture by Shai Simonson : https://youtu.be/77OG6ziPMu4 At 33:04 he mentions that "A = CFL that does not accept $\sum^*$ " is Undecidable. Also, we already know that "A' = CFL that accept $\sum ^*$ " is Undecidable as well. so if A and A' both are Recursively Enumerable sets, then wouldn't that make A a recursive set ?
In this lecture by Shai Simonson : https://youtu.be/77OG6ziPMu4 At 33:04 he mentions that "A = CFL that does not accept $\sum^*$ " is Undecidable.Also, we already know th...
Abbas2131
313
views
Abbas2131
asked
Feb 23, 2018
Theory of Computation
theory-of-computation
decidability
context-free-language
+
–
50
votes
9
answers
326
GATE CSE 2018 | Question: 35
Consider the following languages: $\{a^mb^nc^pd^q \mid m+p=n+q, \text{ where } m, n, p, q \geq 0 \}$ $\{a^mb^nc^pd^q \mid m=n \text{ and }p=q, \text{ where } m, n, p, q \geq 0 \}$ ... Which of the above languages are context-free? I and IV only I and II only II and III only II and IV only
Consider the following languages:$\{a^mb^nc^pd^q \mid m+p=n+q, \text{ where } m, n, p, q \geq 0 \}$$\{a^mb^nc^pd^q \mid m=n \text{ and }p=q, \text{ where } m, n, p, q \ge...
gatecse
21.2k
views
gatecse
asked
Feb 14, 2018
Theory of Computation
gatecse-2018
theory-of-computation
identify-class-language
context-free-language
normal
2-marks
+
–
2
votes
1
answer
327
Complement of CFL
How to prove that $\text{"complement of L }= \{WW^R \mid W \in \{a,b\}^*\} \text{ is CFL}" $?
How to prove that $\text{"complement of L }= \{WW^R \mid W \in \{a,b\}^*\} \text{ is CFL}" $?
ankitgupta.1729
5.1k
views
ankitgupta.1729
asked
Feb 10, 2018
Theory of Computation
context-free-language
theory-of-computation
+
–
1
votes
0
answers
328
Regular - Context Free?
Let L be a given context-free language over the alphabet {a, b}. Construct L1, L2 as follows. Let L1 = L − {xyx | x, y ∈ {a, b}∗}, and L2 = L·L. Then, (A) Both L1 and L2 are regular. B) Both L1 and L2 are context free but not necessarily regular. (C) L1 is regular and L2 is context free. (D) L1 and L2 both may not be context free
Let L be a given context-free language over the alphabet {a, b}. Construct L1, L2 as follows.Let L1 = L − {xyx | x, y ∈ {a, b}∗},and L2 = L·L. Then,(A) Both L1 and...
Tuhin Dutta
880
views
Tuhin Dutta
asked
Jan 30, 2018
Theory of Computation
theory-of-computation
context-free-language
regular-language
+
–
2
votes
2
answers
329
MadeEasy Test Series: Theory Of Computation
(a^n)^m b^n where n>=0 and m>1 is a) regular b) cfl c) csl d) none
(a^n)^m b^n where n>=0 and m>1 isa) regularb) cflc) csld) none
♥_Less
599
views
♥_Less
asked
Jan 29, 2018
Theory of Computation
made-easy-test-series
theory-of-computation
regular-language
context-free-language
context-sensitive-languages
+
–
1
votes
1
answer
330
TOC WHICH IS CFL?
Please give reason for the answer.
Please give reason for the answer.
Sandeep Suri
741
views
Sandeep Suri
asked
Jan 29, 2018
Theory of Computation
theory-of-computation
context-free-language
+
–
Page:
« prev
1
...
6
7
8
9
10
11
12
13
14
15
16
...
21
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register