Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged context-free-language
0
votes
1
answer
121
Peter Linz Edition 4 Exercise 7.3 Question 10 (Page No. 200)
While the language in Exercise 9 is deterministic, the closely related language $L =$ {$ww^R : w ∈${$a,b$}$^*$} is known to be nondeterministic. Give arguments that make this statement plausible.
While the language in Exercise 9 is deterministic, the closely related language $L =$ {$ww^R : w ∈${$a,b$}$^*$} is known to be nondeterministic. Give arguments that mak...
Naveen Kumar 3
319
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
1
answer
122
Peter Linz Edition 4 Exercise 7.3 Question 9 (Page No. 200)
Is the language {$wcw^R : w ∈ ${$a, b$}$^*$} deterministic?
Is the language {$wcw^R : w ∈ ${$a, b$}$^*$} deterministic?
Naveen Kumar 3
286
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
0
answers
123
Peter Linz Edition 4 Exercise 7.3 Question 8 (Page No. 200)
Is the language $L =$ {$a^nb^m : n = m$ or $n = m + 2$} deterministic?
Is the language $L =$ {$a^nb^m : n = m$ or $n = m + 2$} deterministic?
Naveen Kumar 3
224
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
0
answers
124
Peter Linz Edition 4 Exercise 7.3 Question 7 (Page No. 200)
Give reasons why one might conjecture that the following language is not deterministic. $L =$ { $a^nb^mc^k : n = m$ or $m = k$}.
Give reasons why one might conjecture that the following language is not deterministic. $L =$ { $a^nb^mc^k : n = m$ or $m = k...
Naveen Kumar 3
557
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
1
votes
1
answer
125
Peter Linz Edition 4 Exercise 7.3 Question 6 (Page No. 200)
For the language $L =$ {$a^nb^{2n} : n ≥ 0$}, show that $L^*$ is a deterministic context-free language.
For the language $L =$ {$a^nb^{2n} : n ≥ 0$}, show that $L^*$ is a deterministic context-free language.
Naveen Kumar 3
280
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
1
answer
126
Peter Linz Edition 4 Exercise 7.3 Question 4 (Page No. 200)
Is the language $L =$ {$a^nb^n : n ≥ 1$} $∪$ {$a$} deterministic?
Is the language $L =$ {$a^nb^n : n ≥ 1$} $∪$ {$a$} deterministic?
Naveen Kumar 3
288
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
1
votes
1
answer
127
Peter Linz Edition 4 Exercise 7.3 Question 3 (Page No. 200)
Is the language $L =$ {$a^nb^n : n ≥ 1$} $∪$ {$b$} deterministic?
Is the language $L =$ {$a^nb^n : n ≥ 1$} $∪$ {$b$} deterministic?
Naveen Kumar 3
282
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
0
answers
128
Peter Linz Edition 4 Exercise 7.3 Question 2 (Page No. 200)
Show that $L =$ {$a^nb^m : m ≥ n + 2$} is deterministic.
Show that $L =$ {$a^nb^m : m ≥ n + 2$} is deterministic.
Naveen Kumar 3
174
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
0
votes
0
answers
129
Peter Linz Edition 4 Exercise 7.3 Question 1 (Page No. 200)
Show that $L =$ {$a^nb^{2n} : n ≥ 0$} is a deterministic context-free language.
Show that $L =$ {$a^nb^{2n} : n ≥ 0$} is a deterministic context-free language.
Naveen Kumar 3
200
views
Naveen Kumar 3
asked
Jun 23, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
2
votes
2
answers
130
Theory of Computation: Context Free Languages
Hi, I am having a doubt understanding the result of CFL - Regular: Here's my approach: CFL - Regular = CFL INTERSECTION Regular' = CFL INTERSECTION Regular = CFL Suppose some CFL L1= {a^n b^n | n>=1} and some Regular R1= (a+b)* ... to say CFL - Regular = Regular or CFL - Regular = CFL ? If both are separate options, which one should I go for? Thanks
Hi, I am having a doubt understanding the result of CFL – Regular:Here’s my approach:CFL – Regular = CFL INTERSECTION Regular’ = CFL INTERSECTION Regular = CFLSup...
DukeThunders
400
views
DukeThunders
asked
Jun 9, 2019
Theory of Computation
theory-of-computation
context-free-language
self-doubt
+
–
1
votes
2
answers
131
ACE Academy: Recognition of CFG
$L1 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{or} \left ( n = p \right ) \right \}$ $L2 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{and} \left ( n = p \right ) \right \}$ $(a)$ Both are NCFL’s $(b)$ L1 is DCFL and L2 is NCFL $(c)$ L1 is NCFL and L2 is not context-free $(d)$ Both are not context-free
$L1 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{or} \left ( n = p \right ) \right \}$ $L2 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{a...
Hirak
777
views
Hirak
asked
May 22, 2019
Theory of Computation
context-free-grammar
context-free-language
dcfl
+
–
0
votes
1
answer
132
self doubt: TOC
is union of regular language and context free language always regular?
is union of regular language and context free language always regular?
Hirak
555
views
Hirak
asked
May 22, 2019
Theory of Computation
theory-of-computation
regular-language
context-free-language
+
–
3
votes
1
answer
133
Self Doubt : Ambiguity
Why is ambiguity in regular language is decidable and not decidable in CFL ? Can you give Example?
Why is ambiguity in regular language is decidable and not decidable in CFL ? Can you give Example?
logan1x
1.1k
views
logan1x
asked
May 10, 2019
Theory of Computation
theory-of-computation
finite-automata
ambiguous
regular-language
context-free-language
context
+
–
0
votes
0
answers
134
Michael Sipser Edition 3 Exercise 2 Question 37 (Page No. 158)
Prove the following stronger form of the pumping lemma, where in both pieces $v$ and $y$ must be nonempty when the string $s$ is broken up$.$If $A$ is a context-free language, then there is a number $k$ where, if $s$ is any string in $A$ of ... $i\geq 0,uv^{i}xy^{i}z\in A,$ $v\neq\epsilon$ and $y\neq\epsilon,$and $\mid vxy\mid\leq k.$
Prove the following stronger form of the pumping lemma, where in both pieces $v$ and $y$ must be nonempty when the string $s$ is broken up$.$If $A$ is a context-free lang...
admin
512
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
+
–
1
votes
1
answer
135
Michael Sipser Edition 3 Exercise 2 Question 36 (Page No. 158)
Give an example of a language that is not context free but that acts like a $CFL$ in the pumping lemma$.$ Prove that your example works$.$ $\text{(See the analogous example for regular languages in Question 54.)}$
Give an example of a language that is not context free but that acts like a $CFL$ in the pumping lemma$.$ Prove that your example works$.$ $\text{(See the analogous examp...
admin
1.7k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
proof
+
–
0
votes
1
answer
136
Michael Sipser Edition 3 Exercise 2 Question 35 (Page No. 157)
Let $G$ be a $CFG$ in Chomsky normal form that contains $b$ variables$.$ Show that if $G$ generates some string with a derivation having at least $2^{b}$ steps$, L(G)$ is infinite$.$
Let $G$ be a $CFG$ in Chomsky normal form that contains $b$ variables$.$ Show that if $G$ generates some string with a derivation having at least $2^{b}$ steps$, L(G)$ is...
admin
581
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
conjunctive-normal-form
proof
+
–
1
votes
1
answer
137
Michael Sipser Edition 3 Exercise 2 Question 34 (Page No. 157)
Let $G = (V, \Sigma, R, S)$ be the following grammar. $V = \{S, T, U\}; \Sigma = \{0, \#\};$ and $R$ is the set of rules$:$ $S\rightarrow TT\mid U$ $T\rightarrow 0T\mid T0\mid \#$ ... existence of a pumping length $p$ for $B.$ What is the minimum value of $p$ that works in the pumping lemma$?$ Justify your answer$.$
Let $G = (V, \Sigma, R, S)$ be the following grammar. $V = \{S, T, U\}; \Sigma = \{0, \#\};$ and $R$ is the set of rules$:$ $S\rightarrow TT\mid U$ $T\rightarrow 0T\mid T...
admin
1.1k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
proof
+
–
0
votes
1
answer
138
Michael Sipser Edition 3 Exercise 2 Question 33 (Page No. 157)
Show that $F = \{a^{i}b^{j}\mid i = kj$ $\text{for some positive integer $k$\}}$ is not context free$.$
Show that $F = \{a^{i}b^{j}\mid i = kj$ $\text{for some positive integer $k$\}}$ is not context free$.$
admin
248
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
+
–
0
votes
2
answers
139
Michael Sipser Edition 3 Exercise 2 Question 32 (Page No. 157)
Let $\Sigma = \{1, 2, 3, 4\}$ and $C = \{w\in\Sigma^{*}\mid$ $\text{in }w,\text{ the number of }1\text{'s equals the number of }2\text{'s, and the number of } 3\text{'s equals the number of }4\text{'s}\}.$ Show that $C$ is not context free.
Let $\Sigma = \{1, 2, 3, 4\}$ and $C = \{w\in\Sigma^{*}\mid$ $\text{in }w,\text{ the number of }1\text{'s equals the number of }2\text{'s, and the number of } 3\text{'s ...
admin
638
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
2
votes
1
answer
140
Michael Sipser Edition 3 Exercise 2 Question 31 (Page No. 157)
Let $B$ be the language of all palindromes over $\{0,1\}$ containing equal numbers of $0's$ and $1's.$ Show that $B$ is not context free$.$
Let $B$ be the language of all palindromes over $\{0,1\}$ containing equal numbers of $0's$ and $1's.$ Show that $B$ is not context free$.$
admin
1.4k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
+
–
0
votes
1
answer
141
Michael Sipser Edition 3 Exercise 2 Question 30 (Page No. 157)
Use the pumping lemma to show that the following languages are not context free$.$ $\{0^{n}1^{n}0^{n}1^{n}\mid n\geq 0\}$ $\{0^{n}\#0^{2n}\#0^{3n}\mid n\geq 0\}$ $\{w\#t\mid w$ $\text{ is a substring of}$ $ t,$ $\text{where}$ ... $\text{each}$ $ t_{i}\in\{a,b\}^{*},$ $\text{and}$ $ t_{i}=t_{j}$ $\text{ for some}$ $ i\neq j\}$
Use the pumping lemma to show that the following languages are not context free$.$$\{0^{n}1^{n}0^{n}1^{n}\mid n\geq 0\}$$\{0^{n}\#0^{2n}\#0^{3n}\mid n\geq 0\}$$\{w\#t\mid...
admin
1.1k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
+
–
0
votes
0
answers
142
Michael Sipser Edition 3 Exercise 2 Question 29 (Page No. 157)
Show that the language $A=\{a^{i}b^{j}c^{k}\mid i=j$ $\text{or}$ $ j=k$ $\text{where}$ $ i,j,k\geq 0\}$ is inherently ambiguous$.$
Show that the language $A=\{a^{i}b^{j}c^{k}\mid i=j$ $\text{or}$ $ j=k$ $\text{where}$ $ i,j,k\geq 0\}$ is inherently ambiguous$.$
admin
204
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
inherently-ambiguous
+
–
0
votes
0
answers
143
Michael Sipser Edition 3 Exercise 2 Question 25 (Page No. 157)
For any language $A,$ let $SUFFIX(A) = \{v\mid uv \in A$ $\text{for some string u\}}.$ Show that the class of context-free languages is closed under the $\text{SUFFIX operation.}$
For any language $A,$ let $SUFFIX(A) = \{v\mid uv \in A$ $\text{for some string u\}}.$ Show that the class of context-free languages is closed under the $\text{SUFFIX ope...
admin
371
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
suffix-operation
proof
+
–
0
votes
1
answer
144
Michael Sipser Edition 3 Exercise 2 Question 24 (Page No. 157)
Let $E=\{a^{i}b^{j}\mid i\neq j$ $\text{and}$ $2i\neq j\}.$ Show that $E$ is a context-free language$.$
Let $E=\{a^{i}b^{j}\mid i\neq j$ $\text{and}$ $2i\neq j\}.$ Show that $E$ is a context-free language$.$
admin
216
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
0
votes
0
answers
145
Michael Sipser Edition 3 Exercise 2 Question 23 (Page No. 157)
Let $D = \{xy\mid x, y\in \{0,1\}^{*}$ $\text{and}$ $\mid x\mid = \mid y\mid$ $\text{but}$ $x\neq y\}.$ Show that $D$ is a context-free language$.$
Let $D = \{xy\mid x, y\in \{0,1\}^{*}$ $\text{and}$ $\mid x\mid = \mid y\mid$ $\text{but}$ $x\neq y\}.$ Show that $D$ is a context-free language$.$
admin
201
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
0
votes
1
answer
146
Michael Sipser Edition 3 Exercise 2 Question 21 (Page No. 156)
Let $\Sigma = \{a,b\}.$ Give a $CFG$ generating the language of strings with twice as many $a’s$ as $b’s.$ Prove that your grammar is correct$.$
Let $\Sigma = \{a,b\}.$ Give a $CFG$ generating the language of strings with twice as many $a’s$ as $b’s.$ Prove that your grammar is correct$.$
admin
264
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-grammar
context-free-language
+
–
0
votes
0
answers
147
Michael Sipser Edition 3 Exercise 2 Question 20 (Page No. 156)
Let $A/B = \{w\mid wx\in A$ $\text{for some}$ $x \in B\}.$ Show that if $A$ is context free and $B$ is regular$,$ then $A/B$ is context free$.$
Let $A/B = \{w\mid wx\in A$ $\text{for some}$ $x \in B\}.$ Show that if $A$ is context free and $B$ is regular$,$ then $A/B$ is context free$.$
admin
339
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
regular-language
+
–
0
votes
0
answers
148
Michael Sipser Edition 3 Exercise 2 Question 19 (Page No. 156)
Let $CFG$ $G$ be the following grammar$.$ $S\rightarrow aSb \mid bY \mid Y a$ $Y\rightarrow bY \mid aY \mid \epsilon$ Give a simple description of $L(G)$ in English$.$ Use that description to give a $CFG$ for $\overline{L(G)},$ the complement of $L(G).$
Let $CFG$ $G$ be the following grammar$.$ $S\rightarrow aSb \mid bY \mid Y a$$Y\rightarrow bY \mid aY \mid \epsilon$Give a simple description of $L(G)$ in English$.$ Us...
admin
304
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-grammar
context-free-language
+
–
1
votes
1
answer
149
Michael Sipser Edition 3 Exercise 2 Question 18 (Page No. 156)
Let $C$ be a context-free language and $R$ be a regular language$.$ Prove that the language $C\cap R$ is context-free. Let $A = \{w\mid w\in \{a, b, c\}^{*}$ $\text{and}$ $w$ $\text{contains equal numbers of}$ $a’s, b’s,$ $\text{and}$ $c’s\}.$ Use $\text{part (a)}$ to show that $A$ is not a CFL$.$
Let $C$ be a context-free language and $R$ be a regular language$.$ Prove that the language $C\cap R$ is context-free.Let $A = \{w\mid w\in \{a, b, c\}^{*}$ $\text{and}$...
admin
331
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
regular-language
+
–
0
votes
0
answers
150
Michael Sipser Edition 3 Exercise 2 Question 17 (Page No. 156)
Use the results of $\text{Question 16}$ to give another proof that every regular language is context free$,$ by showing how to convert a regular expression directly to an equivalent context-free grammar$.$
Use the results of $\text{Question 16}$ to give another proof that every regular language is context free$,$ by showing how to convert a regular expression directly to an...
admin
293
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-language
context-free-language
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
21
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register