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 15 (Page No. 200)
Show that every regular language is a deterministic context-free language.
Show that every regular language is a deterministic context-free language.
Naveen Kumar 3
237
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
122
Peter Linz Edition 4 Exercise 7.3 Question 11 (Page No. 200)
Show that $L =$ {$w ∈$ {$a, b$}$^* : n_a (w) ≠ n_b (w)$} is a deterministic context-free language.
Show that $L =$ {$w ∈$ {$a, b$}$^* : n_a (w) ≠ n_b (w)$} is a deterministic context-free language.
Naveen Kumar 3
165
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
123
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
339
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
124
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
297
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
125
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
240
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
126
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
595
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 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
314
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
128
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
304
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
129
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
304
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
130
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
181
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
131
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
206
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
132
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
414
views
DukeThunders
asked
Jun 9, 2019
Theory of Computation
theory-of-computation
context-free-language
self-doubt
+
–
1
votes
2
answers
133
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
806
views
Hirak
asked
May 22, 2019
Theory of Computation
context-free-grammar
context-free-language
dcfl
+
–
0
votes
1
answer
134
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
575
views
Hirak
asked
May 22, 2019
Theory of Computation
theory-of-computation
regular-language
context-free-language
+
–
3
votes
1
answer
135
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.2k
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
136
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
531
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
+
–
1
votes
1
answer
137
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
138
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
629
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
139
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.2k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
pumping-lemma
proof
+
–
0
votes
1
answer
140
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
258
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
+
–
0
votes
2
answers
141
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
674
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
2
votes
1
answer
142
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.5k
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
+
–
0
votes
1
answer
143
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
144
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
215
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
inherently-ambiguous
+
–
0
votes
0
answers
145
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
395
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
suffix-operation
proof
+
–
0
votes
1
answer
146
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
225
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
0
votes
0
answers
147
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
212
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-language
proof
+
–
0
votes
1
answer
148
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
269
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-grammar
context-free-language
+
–
0
votes
0
answers
149
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
345
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 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
317
views
admin
asked
May 4, 2019
Theory of Computation
michael-sipser
theory-of-computation
context-free-grammar
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