Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
No answer
No selected answer
No upvoted answer
Previous GATE
Featured
Recent questions without answers
0
votes
0
answers
4381
Made Easy Test Series :TOC1
$(a,b,c)$ represents by reading input $a$, it replaces $a$ by $b$ and moved to $c$ direction. Which of the following language accepted by TM? My question is what $y$ is accepting in TM? I mean why $y$ is needed? What language is accepted ?
$(a,b,c)$ represents by reading input $a$, it replaces $a$ by $b$ and moved to $c$ direction. Which of the following language accepted by TM?My question is what $y$ is ac...
srestha
246
views
srestha
asked
Apr 12, 2019
Theory of Computation
made-easy-test-series
automata
+
–
0
votes
0
answers
4382
How to find precedence?
Shubham_Kr
296
views
Shubham_Kr
asked
Apr 12, 2019
Compiler Design
made-easy-booklet
+
–
–1
votes
0
answers
4383
what is output
void fun(int,int*); int main() { int=-5,j=-2; fun(i,&j); print f(“i=%d j=%d\n”,i,j); return 0; } void fun(int i,int *j) { i=i*i; *j=*j * *j; }
void fun(int,int*);int main(){int=-5,j=-2;fun(i,&j);print f(“i=%d j=%d\n”,i,j);return 0;}void fun(int i,int *j){i=i*i;*j=*j * *j;}
altamash
382
views
altamash
asked
Apr 12, 2019
0
votes
0
answers
4384
linear programming
shruti gupta1
193
views
shruti gupta1
asked
Apr 12, 2019
1
votes
0
answers
4385
problem on back edge
Can someone provide good example to illustrate cross edge,back edge ,forward edge?
Can someone provide good example to illustrate cross edge,back edge ,forward edge?
Cristine
560
views
Cristine
asked
Apr 12, 2019
Algorithms
back-edge
+
–
2
votes
0
answers
4386
Peter Linz Edition 4 Exercise 4.3 Question 10 (Page No. 123)
Consider the language $L=$ {$a^n:n$ is not a perfect square}. (a) Show that this language is not regular by applying the pumping lemma directly. (b) Then show the same thing by using the closure properties of regular languages.
Consider the language $L=$ {$a^n:n$ is not a perfect square}.(a) Show that this language is not regular by applying the pumping lemma directly.(b) Then show the same thin...
Naveen Kumar 3
246
views
Naveen Kumar 3
asked
Apr 11, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
regular-language
closure-property
+
–
1
votes
0
answers
4387
Peter Linz Edition 4 Exercise 4.3 Question 7 (Page No. 123)
Show that the language $L=$ {$a^nb^n:n\geq0$} $\cup$ {$a^nb^{n+1}:n\geq0$} $\cup$ {$a^nb^{n+2}:n\geq0$} is not regular.
Show that the language $L=$ {$a^nb^n:n\geq0$} $\cup$ {$a^nb^{n+1}:n\geq0$} $\cup$ {$a^nb^{n+2}:n\geq0$} is not regular.
Naveen Kumar 3
153
views
Naveen Kumar 3
asked
Apr 11, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
+
–
1
votes
0
answers
4388
Peter Linz Edition 4 Exercise 4.3 Question 5 (Page No. 122)
Determine whether or not the following languages on $Σ =$ {$a$} are regular. (a) $L =$ {$a^n: n ≥ 2,$ is a prime number}. (b) $L =$ {$a^n: n$ is not a prime number}. (c) $L =$ {$a^n: n = k^3$ for some $k ≥ 0$}. ( ... {$a^n: n$ is either prime or the product of two or more prime numbers}. (g) $L^*$, where $L$ is the language in part $(a)$.
Determine whether or not the following languages on $Σ =$ {$a$} are regular.(a) $L =$ {$a^n: n ≥ 2,$ is a prime number}.(b) $L =$ {$a^n: n$ is not a prime number}.(c) ...
Naveen Kumar 3
364
views
Naveen Kumar 3
asked
Apr 11, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
regular-language
+
–
0
votes
0
answers
4389
Peter Linz Edition 4 Exercise 4.3 Question 4 (Page No. 122)
Prove that the following languages are not regular. (a) $L =$ {$a^nb^la^k : k ≥ n + l$}. (b) $L =$ {$a^nb^la^k : k ≠ n + l$}. (c) $L =$ {$a^nb^la^k: n = l$ or $l ≠ k$}. (d) $L =$ {$a^nb^l : n ≤ l$}. (e) $L =$ {$w: n_a (w) ≠ n_b (w)$ }. (f) $L =$ {$ww : w ∈${$a, b$}$^*$}. (g) $L =$ {$wwww^R : w ∈$ {$a, b$}$^*$}.
Prove that the following languages are not regular.(a) $L =$ {$a^nb^la^k : k ≥ n + l$}.(b) $L =$ {$a^nb^la^k : k ≠ n + l$}.(c) $L =$ {$a^nb^la^k: n = l$ or $l ≠ k$}...
Naveen Kumar 3
222
views
Naveen Kumar 3
asked
Apr 11, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
regular-language
+
–
0
votes
0
answers
4390
Peter Linz Edition 4 Exercise 4.3 Question 2 (Page No. 122)
Prove the following generalization of the pumping lemma. If $L$ is regular, then there exists an $m$, such that the following holds for every sufficiently long $w ∈ L$ and every one of its decompositions $w = u_1υu_2$, with $u_1,u_2 ∈ Σ^*, |υ| \geq m.$ The ... $|xy| ≤ m, |y| ≥ 1,$ such that $u_1xy^izu_2 ∈ L$ for all $i = 0,1, 2, .$
Prove the following generalization of the pumping lemma.If $L$ is regular, then there exists an $m$, such that the following holds for every sufficiently long $w ∈ L$ a...
Naveen Kumar 3
146
views
Naveen Kumar 3
asked
Apr 11, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
+
–
0
votes
0
answers
4391
Ullman (TOC) Edition 3 Exercise 8.1 Question 1 (Page No. 324)
Give reductions from the hello-world problem to each of the problems below. Use the informal style of this section for describing plausible program transformations, and do not worry about the real limits such as maximum file size or ... $?$
Give reductions from the hello-world problem to each of the problems below. Use the informal style of this section for describing plausible program transformations, and d...
admin
197
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
turing-machine
+
–
0
votes
0
answers
4392
Ullman (TOC) Edition 3 Exercise 7.4 Question 5 (Page No. 308)
Modify the $CYK$ algorithm to report the number of distinct parse trees for the given input, rather than just reporting membership in the language$.$
Modify the $CYK$ algorithm to report the number of distinct parse trees for the given input, rather than just reporting membership in the language$.$
admin
313
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
context-free-grammar
+
–
0
votes
0
answers
4393
Ullman (TOC) Edition 3 Exercise 7.4 Question 4 (Page No. 308)
Show that in any $CNF$ grammar all parse trees for strings of length $n$ have $2n-1$ interior nodes $(i.e.,$ $2n-1$ nodes with variables for lables$).$
Show that in any $CNF$ grammar all parse trees for strings of length $n$ have $2n-1$ interior nodes $(i.e.,$ $2n-1$ nodes with variables for lables$).$
admin
157
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
context-free-grammar
+
–
0
votes
0
answers
4394
Ullman (TOC) Edition 3 Exercise 7.4 Question 3 (Page No. 308)
Using the grammar $G$ of Example $7.34,$use the $CYK$ algorithm to determine whether each of the following strings is in $L(G):$ $ababa$ $baaab$ $aabab$
Using the grammar $G$ of Example $7.34,$use the $CYK$ algorithm to determine whether each of the following strings is in $L(G):$$ababa$$baaab$$aabab$
admin
259
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
context-free-grammar
+
–
0
votes
0
answers
4395
Ullman (TOC) Edition 3 Exercise 7.4 Question 2 (Page No. 308)
Use the technique described in Section $7.4.3$ to develop linear time algorithms for the following questions about $CFG's:$ Which symbols appear in some sentential form$?$ Which symbols are nullable $\text{(derive $\in$)?}$
Use the technique described in Section $7.4.3$ to develop linear time algorithms for the following questions about $CFG's:$ Which symbols appear in some sentential form$?...
admin
128
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
context-free-grammar
+
–
0
votes
0
answers
4396
Ullman (TOC) Edition 3 Exercise 7.4 Question 1 (Page No. 307 - 308)
Give algorithms to decide the following$:$ Is $L(G)$ fi nite, for a given CFG $G?$ Hint$:$ Use the pumping lemma. Does $L(G)$ contain at least $100$ strings, for a given CFG $G?$ Given a CFG $G$ and one of ... for $A$ to appear first in the middle of some sentential form but then for all the symbols to its left to derive $\in.$
Give algorithms to decide the following$:$Is $L(G)$ fi nite, for a given CFG $G?$ Hint$:$ Use the pumping lemma.Does $L(G)$ contain at least $100$ strings, for a given ...
admin
224
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4397
Ullman (TOC) Edition 3 Exercise 7.3 Question 7 (Page No. 299)
Complete the proof of theorem $7.27$ by showing that $(q_{P},w,Z_{0})\vdash(q,\in,\gamma)$ if and only if $(q_{P},q_{A},w,Z_{0}) \vdash((q,p),\in,\gamma),$ where $p =\hat{\delta}(p_{A},w).$
Complete the proof of theorem $7.27$ by showing that$(q_{P},w,Z_{0})\vdash(q,\in,\gamma)$ if and only if $(q_{P},q_{A},w,Z_{0}) \vdash((q,p),\in,\gamma),$ where $p =\hat...
admin
182
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
proof
+
–
0
votes
0
answers
4398
Ullman (TOC) Edition 3 Exercise 7.3 Question 6 (Page No. 298)
Give the formal proof of theorem $7.25:$ that the $CFL's$ are closed under reversal.
Give the formal proof of theorem $7.25:$ that the $CFL's$ are closed under reversal.
admin
153
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
proof
+
–
0
votes
0
answers
4399
Ullman (TOC) Edition 3 Exercise 7.3 Question 5 (Page No. 298)
A string $y$ is said to be a permutation of the string $x$ if the symbols of $y$ can be reordered to make $x.$ For instance, the permutations of string $x=011$ are $110,101,$ and $011.$ If $L$ is a language then ... not context-free. Prove that for every regular language $L$ over a two-symbol alphabet , $\text{perm(L)}$ is context-free.
A string $y$ is said to be a permutation of the string $x$ if the symbols of $y$ can be reordered to make $x.$ For instance, the permutations of string $x=011$ are $110,1...
admin
305
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4400
Ullman (TOC) Edition 3 Exercise 7.3 Question 4 (Page No. 297 - 298)
The $\text{shuffle}$ of two strings $w$ and $x$ is the set of all strings that one can get by interleaving the positions of $w$ and $x$ in any way. More precisely $,\text{shuffle(w,x)}$ is the set of strings $z$ such that Each position ... and $L_{2}$ are both $CFL's,$ then $\text{shuffle($L_{1},L_{2}$)}$ need not be a $CFL.$
The $\text{shuffle}$ of two strings $w$ and $x$ is the set of all strings that one can get by interleaving the positions of $w$ and $x$ in any way. More precisely $,\tex...
admin
179
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
descriptive
+
–
0
votes
0
answers
4401
Ullman (TOC) Edition 3 Exercise 7.3 Question 3 (Page No. 297)
Show that the $CFL's$ are not closed under the following operations$:$ $\text{min}$ $\text{max}$ $\text{half}$ $\text{alt}$
Show that the $CFL's$ are not closed under the following operations$:$$\text{min}$$\text{max}$$\text{half}$$\text{alt}$
admin
124
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4402
Ullman (TOC) Edition 3 Exercise 7.3 Question 2 (Page No. 297)
Consider the following languages$:$ $L_{1}=\{a^{n}b^{2n}c^{m}|n,m\geq 0\}$ $L_{2}=\{a^{n}b^{m}c^{2m}|n,m\geq 0\}$ Show that each of these languages is context-free by giving grammars for each. Is $L_{1}\cap L_{2}$ a $CFL?$ Justify your answer.
Consider the following languages$:$$L_{1}=\{a^{n}b^{2n}c^{m}|n,m\geq 0\}$$L_{2}=\{a^{n}b^{m}c^{2m}|n,m\geq 0\}$Show that each of these languages is context-free by giving...
admin
106
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4403
Ullman (TOC) Edition 3 Exercise 7.3 Question 1 (Page No. 297)
Show that the $CFL's$ are closed under the following$:$ $\text{init},$ Hint$:$ Start with a $CNF$ grammar for the language $L.$ $\text{The operation $L/a,$}$ Hint$:$ Again,start with a $CNF$ grammar for $L.$ $\text{cycle, }$ Hint$:$ Try a $PDA-$based constrction.
Show that the $CFL's$ are closed under the following$:$$\text{init},$ Hint$:$ Start with a $CNF$ grammar for the language $L.$$\text{The operation $L/a,$}$ Hint$:$ Again...
admin
114
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4404
Ullman (TOC) Edition 3 Exercise 7.2 Question 5 (Page No. 287)
Use Ogden's lemma $($Question $3)$ to show that the following languages are not $CFL's:$ $\{0^{i}1^{j}0^{k}|k=max(i,k)\}.$ $\{a^{n}b^{n}c^{i}|i\neq n\}.$ Hint$:$ If $n$ is the constant for Ogden's lemma,consider the stirng $z=a^{n}b^{n}c^{n+n!}.$
Use Ogden's lemma $($Question $3)$ to show that the following languages are not $CFL's:$$\{0^{i}1^{j}0^{k}|k=max(i,k)\}.$$\{a^{n}b^{n}c^{i}|i\neq n\}.$ Hint$:$ If $n$ is ...
admin
108
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
1
votes
0
answers
4405
Ullman (TOC) Edition 3 Exercise 7.2 Question 4 (Page No. 287)
Use Ogden's lemma $($Question $2)$ to simplify the proof in example $7.21$ that $L=\{\text{ww|w is in $\{0,1\}^{*}$}\}$ is not a $CFL.$Hint$:$With $z=0^{n}1^{n}0^{n}1^{n},$ make the two middle blocks distinguished.
Use Ogden's lemma $($Question $2)$ to simplify the proof in example $7.21$ that $L=\{\text{ww|w is in $\{0,1\}^{*}$}\}$ is not a $CFL.$Hint$:$With $z=0^{n}1^{n}0^{n}1^{n}...
admin
109
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4406
Ullman (TOC) Edition 3 Exercise 7.2 Question 3 (Page No. 286)
There is a stronger version of the $CFL$ pumping lemma known as Ogden's lemma.It differs from the pumping lemma we proved by allowing us to focus on any $n$ $"$distinguished$"$ positions of a string $z$ and ... non-distinguished positions of $z$ are not present as we select a long path in the parse tree for $z.$
There is a stronger version of the $CFL$ pumping lemma known as Ogden's lemma.It differs from the pumping lemma we proved by allowing us to focus on any $n$ $"$distinguis...
admin
157
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
descriptive
+
–
0
votes
0
answers
4407
Ullman (TOC) Edition 3 Exercise 7.2 Question 2 (Page No. 286)
When we try to apply the pumping lemma to a $CFL,$ the $"$adversary wins$"$ and we cannot complete the proof$.$Show what goes wrong when we choose $L$ to be one of the followinges$:$ $\{00,11\}.$ $\{0^{n}1^{n}|n\geq 1\}.$ $\text{The set of palindromes over alphabet \{0,1\}}.$
When we try to apply the pumping lemma to a $CFL,$ the $"$adversary wins$"$ and we cannot complete the proof$.$Show what goes wrong when we choose $L$ to be one of the fo...
admin
81
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4408
Ullman (TOC) Edition 3 Exercise 7.2 Question 1 (Page No. 286)
Use the $CFL$ pumping lemma to show each of these languages not to be context-free$:$ $\left\{a^{i}b^{j}c^{k}|i<j<k\right\}.$ $\left\{a^{n}b^{n}c^{i}|i\leq n\right\}.$ ... the set of strings consisting of some string $w$ followed by the same string in reverse, and then the string $w$ again ,such as $001100001.$
Use the $CFL$ pumping lemma to show each of these languages not to be context-free$:$$\left\{a^{i}b^{j}c^{k}|i<j<k\right\}.$$\left\{a^{n}b^{n}c^{i}|i\leq n\right\}.$$\lef...
admin
124
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
+
–
0
votes
0
answers
4409
Ullman (TOC) Edition 3 Exercise 7.1 Question 12 (Page No. 279)
Use the construction of question $11$ to convert the grammar $S\rightarrow AA|0$ $A\rightarrow SS|1$ to $GNF.$
Use the construction of question $11$ to convert the grammar$S\rightarrow AA|0$$A\rightarrow SS|1$to $GNF.$
admin
125
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-grammar
context-free-language
+
–
0
votes
0
answers
4410
Ullman (TOC) Edition 3 Exercise 7.1 Question 11 (Page No. 278 - 279)
In this exercise, we shall show that for every context-free language $L$ containing at least one string other than $\in,$there is a $CFG$ in Greibach normal form that generates $L-\in.$ Recall that a Greibach normal form $(GNF)$ grammar is ... $(a).$ Then fi x the $B_{i}$ productions in any order , again $(a).$
In this exercise, we shall show that for every context-free language $L$ containing at least one string other than $\in,$there is a $CFG$ in Greibach normal form that gen...
admin
297
views
admin
asked
Apr 11, 2019
Theory of Computation
ullman
theory-of-computation
context-free-language
context-free-grammar
proof
descriptive
+
–
Page:
« prev
1
...
142
143
144
145
146
147
148
149
150
151
152
...
592
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register