Use the Pumping Lemma for CFLS to prove that each of the following lan- guages is not context-free. 1 A = {0*#0²m#0®» | n>0}. Hint: consider s = 0P#0#0®.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Need help with question one at the bottom by following the example above.

Thank-you

Example Proof
Prove that the language B = {0*1*|n > 0} is not a regular language.
Proof. Assume that B is regular and let p be the pumping length for the
language. Choose the string s = 0P1P so that |s| > p. By the pumping
lemma (PL) for regular languages, we can partition s = ryz so that for any
i > 0, s' = ry'z e B. Let's consider three cases for the partition y:
1. The string (partition) y consists only of O's. Then, s' = ryyz = ry²z
has more O's than l's. Clearly s' 4 B and so condition number 1 of
the PL is violated. This is a contradiction for our assumption that B
is regular.
2. The string (partition) y consists only of l’s. Using the same argument
from the previous case, we obtain another contradiction.
3. The string (partition) y consists of 0's and l's. Then, s' = ryyz = ry²z
may have the same number of O's and l's, but some of the l's will
come before some of the 0O's and violate membership in the language
B. Hence, we have another contradiction with our assumption of reg-
ularity.
Therefore, we cannot avoid a contradiction with any possible y partition and
conclude that the language B cannot be a regular language.
Instructions
Use the Pumping Lemma for CFLS to prove that each of the following lan-
guages is not context-free.
1
A = {0"#0²"#0*n | n >0}. Hint: consider s = 0"#0#0*.
%3D
Transcribed Image Text:Example Proof Prove that the language B = {0*1*|n > 0} is not a regular language. Proof. Assume that B is regular and let p be the pumping length for the language. Choose the string s = 0P1P so that |s| > p. By the pumping lemma (PL) for regular languages, we can partition s = ryz so that for any i > 0, s' = ry'z e B. Let's consider three cases for the partition y: 1. The string (partition) y consists only of O's. Then, s' = ryyz = ry²z has more O's than l's. Clearly s' 4 B and so condition number 1 of the PL is violated. This is a contradiction for our assumption that B is regular. 2. The string (partition) y consists only of l’s. Using the same argument from the previous case, we obtain another contradiction. 3. The string (partition) y consists of 0's and l's. Then, s' = ryyz = ry²z may have the same number of O's and l's, but some of the l's will come before some of the 0O's and violate membership in the language B. Hence, we have another contradiction with our assumption of reg- ularity. Therefore, we cannot avoid a contradiction with any possible y partition and conclude that the language B cannot be a regular language. Instructions Use the Pumping Lemma for CFLS to prove that each of the following lan- guages is not context-free. 1 A = {0"#0²"#0*n | n >0}. Hint: consider s = 0"#0#0*. %3D
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY