Questions are not graded i need b and c the topic is automata theory i included example 4.3

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Questions are not graded

i need b and c

the topic is automata theory

i included example 4.3

### Example 4.3: Proving that the Language \( L_{pr} \) is Not Regular

Let us show that the language \( L_{pr} \) consisting of all strings of 1's whose length is a prime is not a regular language. Suppose it were. Then there would be a constant \( n \) satisfying the conditions of the pumping lemma. Consider some prime \( p \geq n + 2 \); there must be such a \( p \), since there are an infinity of primes. Let \( w = 1^p \).

By the pumping lemma, we can break \( w = xyz \) such that \( y \neq \epsilon \) and \( |xy| \leq n \). Let \( |y| = m \). Then \( |xz| = p - m \). Now consider the string \( xy^{p-m}z \), which must be in \( L_{pr} \) by the pumping lemma, if \( L_{pr} \) really is regular. However,

\[ |xy^{p-m}z| = |xz| + (p - m)|y| = p - m + (p - m)m = (m + 1)(p - m) \]

It looks like \( |xy^{p-m}z| \) is not a prime, since it has two factors \( m + 1 \) and \( p - m \). However, we must check that neither of these factors are 1, since then \( (m + 1)(p - m) \) might be a prime after all. But \( m + 1 > 1 \), since \( y \neq \epsilon \) tells us \( m \geq 1 \). Also, \( p - m > 1 \), since \( p \geq n + 2 \) was chosen, and \( m \leq n \) since

\[ m = |y| \leq |xy| \leq n \]

Thus, \( p - m \geq 2 \).

Again, we have started by assuming the language in question was regular, and we derived a contradiction by showing that some string not in the language was required by the pumping lemma to be in the language. Thus, we conclude that \( L_{pr} \) is not a regular language.

\[\Box\]
Transcribed Image Text:### Example 4.3: Proving that the Language \( L_{pr} \) is Not Regular Let us show that the language \( L_{pr} \) consisting of all strings of 1's whose length is a prime is not a regular language. Suppose it were. Then there would be a constant \( n \) satisfying the conditions of the pumping lemma. Consider some prime \( p \geq n + 2 \); there must be such a \( p \), since there are an infinity of primes. Let \( w = 1^p \). By the pumping lemma, we can break \( w = xyz \) such that \( y \neq \epsilon \) and \( |xy| \leq n \). Let \( |y| = m \). Then \( |xz| = p - m \). Now consider the string \( xy^{p-m}z \), which must be in \( L_{pr} \) by the pumping lemma, if \( L_{pr} \) really is regular. However, \[ |xy^{p-m}z| = |xz| + (p - m)|y| = p - m + (p - m)m = (m + 1)(p - m) \] It looks like \( |xy^{p-m}z| \) is not a prime, since it has two factors \( m + 1 \) and \( p - m \). However, we must check that neither of these factors are 1, since then \( (m + 1)(p - m) \) might be a prime after all. But \( m + 1 > 1 \), since \( y \neq \epsilon \) tells us \( m \geq 1 \). Also, \( p - m > 1 \), since \( p \geq n + 2 \) was chosen, and \( m \leq n \) since \[ m = |y| \leq |xy| \leq n \] Thus, \( p - m \geq 2 \). Again, we have started by assuming the language in question was regular, and we derived a contradiction by showing that some string not in the language was required by the pumping lemma to be in the language. Thus, we conclude that \( L_{pr} \) is not a regular language. \[\Box\]
**Exercise 7.2.1**: Use the CFL (Context-Free Language) pumping lemma to show each of these languages not to be context-free:

* **a)** \(\{ a^i b^j c^k \mid i < j < k\}\).

* **b)** \(\{ a^n b^n c^i \mid i \leq n\}\).

* **c)** \(\{0^p \mid p \text{ is a prime}\}\). *Hint*: Adapt the same ideas used in Example 4.3, which showed this language not to be regular.

* **d)** \(\{0^i 1^j \mid j = i^2\}\).

* **e)** \(\{a^n b^n c^i \mid n \leq i \leq 2n\}\).

* **f)** \(\{ ww^R w \mid w \text{ is a string of 0's and 1's} \}\). That is, 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.
Transcribed Image Text:**Exercise 7.2.1**: Use the CFL (Context-Free Language) pumping lemma to show each of these languages not to be context-free: * **a)** \(\{ a^i b^j c^k \mid i < j < k\}\). * **b)** \(\{ a^n b^n c^i \mid i \leq n\}\). * **c)** \(\{0^p \mid p \text{ is a prime}\}\). *Hint*: Adapt the same ideas used in Example 4.3, which showed this language not to be regular. * **d)** \(\{0^i 1^j \mid j = i^2\}\). * **e)** \(\{a^n b^n c^i \mid n \leq i \leq 2n\}\). * **f)** \(\{ ww^R w \mid w \text{ is a string of 0's and 1's} \}\). That is, 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.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education