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
Michael Sipser Edition 3 Exercise 2 Question 9 (Page No. 155)
admin
asked
in
Theory of Computation
May 1, 2019
edited
May 4, 2019
by
Lakshman Bhaiya
556
views
0
votes
0
votes
Give a context-free grammar that generates the language $A=\{a^{i}b^{j}c^{k}\mid i=j$ $\text{or}$ $ j=k$ $\text{where}$ $ i,j,k\geq 0\}.$ Is your grammar ambiguous$?$ Why or why not$?$
michael-sipser
theory-of-computation
context-free-language
ambiguous
grammar
admin
asked
in
Theory of Computation
May 1, 2019
edited
May 4, 2019
by
Lakshman Bhaiya
by
admin
556
views
answer
comment
Follow
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
0
votes
A is union of two languages $a^nb^nc^m \cup a^mb^nc^n$
PDA for this language is NPDA. So it is ambiguous
aditi19
answered
Aug 14, 2019
by
aditi19
comment
Follow
share this
4 Comments
by
Doraemon
commented
May 20, 2020
reply
Follow
share this
YOU can have a string where i=j=k which can be created by both
a^nb^nc^m or a^mb^nc^n
0
0
by
aditi19
commented
May 20, 2020
reply
Follow
share this
How does that answers whether the language is ambiguous or not?
0
0
by
Doraemon
commented
May 20, 2020
reply
Follow
share this
S->A|B
A->aAb|abC
B->bBc|Xbc
C->cC|c
X->aX|a
The above is the grammar,So we can choose any one of the path from S either A or B ,which will give us
a^nb^nc^m or a^mb^nc^n where m=n.
0
0
by
Shruti_p
commented
Sep 9, 2020
reply
Follow
share this
This grammar is incorrect as it will accept strings in which c comes before b also.
0
0
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
0
votes
0
votes
0
answers
1
admin
asked
in
Theory of Computation
May 1, 2019
301
views
Michael Sipser Edition 3 Exercise 2 Question 11 (Page No. 155)
Convert the $CFG$ $G_{4}$ $E\rightarrow E+T\mid T$ $T\rightarrow T\times F\mid F$ $F\rightarrow (E)\mid a$ to an equivalent $PDA,$ using the procedure given in $\text{Theorem 2.20.}$
admin
asked
in
Theory of Computation
May 1, 2019
by
admin
301
views
michael-sipser
theory-of-computation
context-free-language
pushdown-automata
0
votes
0
votes
0
answers
2
admin
asked
in
Theory of Computation
May 1, 2019
966
views
Michael Sipser Edition 3 Exercise 2 Question 10 (Page No. 155)
Give an informal description of a pushdown automaton that recognizes the language $A=\{a^{i}b^{j}c^{k}\mid i=j$ $\text{or}$ $ j=k$ $\text{where}$ $ i,j,k\geq 0\}.$
admin
asked
in
Theory of Computation
May 1, 2019
by
admin
966
views
michael-sipser
theory-of-computation
context-free-language
pushdown-automata
0
votes
0
votes
0
answers
3
admin
asked
in
Theory of Computation
May 1, 2019
294
views
Michael Sipser Edition 3 Exercise 2 Question 8 (Page No. 155)
Show that the string the girl touches the boy with the flower has two different leftmost derivations in grammar $G_2$ on $\text{page 103.} $ Describe in English the two different meanings of this sentence.
admin
asked
in
Theory of Computation
May 1, 2019
by
admin
294
views
michael-sipser
theory-of-computation
context-free-language
context-free-grammar
1
vote
1
vote
0
answers
4
admin
asked
in
Theory of Computation
May 1, 2019
296
views
Michael Sipser Edition 3 Exercise 2 Question 7 (Page No. 155)
Give informal English descriptions of PDAs for the following languages. The set of strings over the alphabet $\{a,b\}$ with more $a's$ than $b's$ The complement of the language $\{a^{n}b^{n}|n\geq 0\}$ $\{w\#x|w^{R}$ ... $ x_{i}\in\{a,b\}^{*},$ $\text{and for some i and }$ $ j,x_{i}=x_{j}^{R}\}$
admin
asked
in
Theory of Computation
May 1, 2019
by
admin
296
views
michael-sipser
theory-of-computation
context-free-language
pushdown-automata
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 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:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy