Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged peter-linz-edition4
0
votes
0
answers
121
Peter Linz Edition 4 Exercise 5.1 Question 23 (Page No. 135)
Find a context-free grammar for the set of all regular expressions on the alphabet {$a, b$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
122
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
122
Peter Linz Edition 4 Exercise 5.1 Question 22 (Page No. 135)
Define what one might mean by properly nested parenthesis structures involving two kinds of parentheses, say ( ) and [ ]. Intuitively, properly nested strings in this situation are ([ ]), ([[ ]])[( )], but not ([ )] or (( ]]. Using your definition, give a context-free grammar for generating all properly nested parentheses.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
371
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
123
Peter Linz Edition 4 Exercise 5.1 Question 21 (Page No. 135)
Consider the derivation tree below. Find a grammar $G$ for which this is the derivation tree of the string $aab$. Then find two more sentences of $L(G)$. Find a sentence in $L(G)$ that has a derivation tree of height five or larger.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
587
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
124
Peter Linz Edition 4 Exercise 5.1 Question 20 (Page No. 135)
Consider the grammar with productions $S\rightarrow aaB,$ $A\rightarrow bBb|\lambda,$ $B\rightarrow Aa.$ Show that the string $aabbabba$ is not in the language generated by this grammar.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
221
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
1
vote
1
answer
125
Peter Linz Edition 4 Exercise 5.1 Question 19 (Page No. 134)
Show a derivation tree for the string $aabbbb$ with the grammar $S\rightarrow AB|\lambda,$ $A\rightarrow aB,$ $B\rightarrow Sb.$ Give a verbal description of the language generated by this grammar.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
478
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
1
answer
126
Peter Linz Edition 4 Exercise 5.1 Question 18 (Page No. 134)
Show that the language $L=$ {$w_1cw_2:w_1,w_2∈$ {$a,b$}$^+,w_1\neq w_2^R$}, with $Σ =$ {$a,b,c$},is context-free.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
229
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
0
answers
127
Peter Linz Edition 4 Exercise 5.1 Question 17 (Page No. 134)
Show that the complement of the language $L =$ {$a^nb^mc^k : k = n + m$} is context-free.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
152
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
1
answer
128
Peter Linz Edition 4 Exercise 5.1 Question 16 (Page No. 134)
Show that the complement of the language $L=$ {$ww^R:w∈$ {$a,b$}$^*$} is context-free.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
194
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
1
answer
129
Peter Linz Edition 4 Exercise 5.1 Question 15 (Page No. 134)
Show that the following language is context-free. $L=$ {$uvwv^R:u,v,w∈$ {$a,b$}$^+,|u|=|w|=2$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
312
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
1
answer
130
Peter Linz Edition 4 Exercise 5.1 Question 14 (Page No. 134)
Let $L_1$ be the language $L_1 =$ {$a^nb^mc^k : n = m$ or $m ≤ k$} and $L_2$ the language $L_2 =$ {$a^nb^mc^k : n + 2m = k$}. Show that $L_1 ∪ L_2$ is a context-free language.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
287
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
1
answer
131
Peter Linz Edition 4 Exercise 5.1 Question 13 (Page No. 134)
Let $L =$ {$a^nb^n : n ≥ 0$}. (a) https://gateoverflow.in/305106/peter-linz-edition-4-exercise-5-1-question-13-a-page-no-134 (b) Show that $L^k$ is context-free for any given $k ≥ 1$. (c) Show that $\overline{L}$ and $L^*$ are context-free.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
330
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
0
answers
132
Peter Linz Edition 4 Exercise 5.1 Question 12 (Page No. 134)
Given a context-free grammar $G$ for a language $L$, show how one can create from $G$ a grammar $\widehat{G}$ so that $L(\widehat{G}$) = head (L).
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
190
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
133
Peter Linz Edition 4 Exercise 5.1 Question 11 (Page No. 134)
Find a context-free grammar for $Σ =$ {$a, b$} for the language $L =$ {$a^nww^Rb^n : w ∈ Σ^*, n ≥ 1$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
192
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
0
answers
134
Peter Linz Edition 4 Exercise 5.1 Question 10 (Page No. 134)
Find a context-free grammar for $head (L)$, where $L$ is the language $L =$ {$a^nb^m : n ≤ m + 3$}. For the definition of $head$ see Exercise 18, Section 4.1.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 14, 2019
by
Naveen Kumar 3
235
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
135
Peter Linz Edition 4 Exercise 5.1 Question 9 (Page No. 134)
Show that $L =$ {$w ∈$ {$a,b,c$}$^* : |w| = 3n_a(w)$} is a context-free language.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
303
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
4
answers
136
Peter Linz Edition 4 Exercise 5.1 Question 8 (Page No. 134)
Find context-free grammars for the following languages (with $n ≥ 0, m ≥ 0, k ≥ 0$). (a) $L =$ {$a^nb^mc^k : n = m$ or $m ≤ k$}. (b) $L =$ {$a^nb^mc^k : n = m$ or $m ≠ k$}. (c) $L =$ {$a^nb^mc^k : k = n + m$}. (d) $L =$ ... $L =$ {$a^nb^mc^k, k ≠ n + m$}. (h) $L =$ {$a^nb^mc^k : k ≥ 3$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
408
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
context-free-language
0
votes
6
answers
137
Peter Linz Edition 4 Exercise 5.1 Question 7 (Page No. 133)
Find context-free grammars for the following languages (with $n ≥ 0, m ≥ 0$). (a) $L =$ {$a^nb^m : n ≤ m + 3$}. (b) $L =$ {$a^nb^m : n ≠ m − 1$ ... $v$ is any prefix of $w$}. (g) $L =$ {$w ∈$ {$a,b$}$^* : n_a (w) = 2n_b(w) + 1$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
914
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
context-free-grammar
0
votes
0
answers
138
Peter Linz Edition 4 Exercise 5.1 Question 6 (Page No. 133)
Give the Complete proof of Theorem 5.1 by showing that the yield of every partial derivation tree with root $S$ is a sentential form of $G$. Theorem 5.1 Let $G = (V, T, S, P )$ ... any partial derivation tree for $G$ whose root is labeled $S$, then the yield of $t_G$ is a sentential form of $G$.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
258
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
0
answers
139
Peter Linz Edition 4 Exercise 5.1 Question 5 (Page No. 133)
Is the language $L(G)=$ {$ab(bbaa)^nbba(ba)^n:n\geq0$} regular?
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
129
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
0
votes
0
answers
140
Peter Linz Edition 4 Exercise 5.1 Question 4 (Page No. 133)
Show that the grammar with productions $S\rightarrow aSb|SS|\lambda$ does in fact generate the language $L=$ {$w∈ $ {$a,b$}$^*:n_a(w)=n_b(w) $ and $n_a(v)\geq n_b(v),$ where $v$ is any prefix of $w$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
192
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
2
votes
0
answers
141
Peter Linz Edition 4 Exercise 5.1 Question 3 (Page No. 133)
Give a derivation tree for $w = abbbaabbaba$ for the grammar $G$, with productions $S\rightarrow abB$ $A\rightarrow aaBb$ $B\rightarrow bbAa$ $A\rightarrow \lambda$. Use the derivation tree to find a leftmost derivation.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
171
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
0
answers
142
Peter Linz Edition 4 Exercise 5.1 Question 2 (Page No. 133)
Draw the derivation tree corresponding to the derivation in Example 5.1. Example 5.1 The grammar $G = (${$S$}, {$a, b$}$, S, P),$ with productions $S\rightarrow aSa$ $S\rightarrow bSb$ $S\rightarrow \lambda$ is context-free. A typical derivation in this grammar is $S\Rightarrow aSa\Rightarrow aaSaa\Rightarrow aabSbaa\Rightarrow aabbaa.$
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
211
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
1
answer
143
Peter Linz Edition 4 Exercise 5.1 Question 1 (Page No. 133)
Find the language generated by following grammar: The grammar G, with productions $S\rightarrow abB$ $A\rightarrow aaBb$ $B\rightarrow bbAa$ $A\rightarrow \lambda$
Naveen Kumar 3
asked
in
Theory of Computation
Apr 13, 2019
by
Naveen Kumar 3
189
views
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
0
votes
0
answers
144
Peter Linz Edition 4 Exercise 4.3 Question 26 (Page No. 124)
Let $L=$ {$a^nb^m:n\geq100,m\leq50$}. (a) Can you use the pumping lemma to show that L is regular? (b) Can you use the pumping lemma to show that L is not regular? Explain your answers.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
220
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
pumping-lemma
0
votes
0
answers
145
Peter Linz Edition 4 Exercise 4.3 Question 25 (Page No. 124)
In the chain code language in Exercise 24, Section 3.1, let $L$ be the set of all $w ∈$ {$u,r,l,d$}$^*$ that describe rectangles. Show that $L$ is not a regular language.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
152
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
0
votes
2
answers
146
Peter Linz Edition 4 Exercise 4.3 Question 24 (Page No. 124)
Suppose that we know that $L_1 ∪ L_2$ and $L_1$ are regular. Can we conclude from this that $L_2$ is regular?
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
389
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
closure-property
0
votes
2
answers
147
Peter Linz Edition 4 Exercise 4.3 Question 23 (Page No. 124)
Is the family of regular languages closed under infinite intersection?
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
389
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
closure-property
0
votes
0
answers
148
Peter Linz Edition 4 Exercise 4.3 Question 22 (Page No. 124)
Consider the argument that the language associated with any generalized transition graph is regular. The language associated with such a graph is $L=\bigcup_{p∈P} L(r_p)$, where $P$ ... is regular. Show that in this case, because of the special nature of $P$, the infinite union is regular.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
190
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
closure-property
0
votes
0
answers
149
Peter Linz Edition 4 Exercise 4.3 Question 21 (Page No. 124)
Let $P$ be an infinite but countable set, and associate with each $p ∈ P$ a language $L_p$. The smallest set containing every $L_p$ is the union over the infinite set $P$; it will be denoted by $U_{p∈p}L_p$. Show by example that the family of regular languages is not closed under infinite union.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
219
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
closure-property
0
votes
0
answers
150
Peter Linz Edition 4 Exercise 4.3 Question 20 (Page No. 124)
Is the following language regular? $L=$ {$ww^Rv:v,w∈$ {$a,b$}$^+$}.
Naveen Kumar 3
asked
in
Theory of Computation
Apr 12, 2019
by
Naveen Kumar 3
293
views
peter-linz
peter-linz-edition4
theory-of-computation
regular-language
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
13
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged peter-linz-edition4
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...