Open in App
Log In Start studying!

Select your language

Suggested languages for you:

Use the pumping lemma to show that the following languages are not regular. A. \(A_{1}=\left\\{0^{n} 1^{n} 2^{n} \mid n \geq 0\right\\}\) b. \(A_{2}=\left\\{w w w \mid w \in\\{\mathrm{a}, \mathrm{b}\\}^{*}\right\\}\) A c. \(A_{3}=\left\\{\mathrm{a}^{2^{n}} \mid n \geq 0\right\\}\) (Here, \(\mathrm{a}^{2^{n}}\) means a string of \(2^{n}\) a's.)

Short Answer

Expert verified
Solution: A1: Using the pumping lemma, it is shown that adding extra zeros in the string breaks the condition where an equal number of 0s, 1s, and 2s is required. Hence, A1 is not a regular language. A2: By applying the pumping lemma, it is proven that adding extra a's in the first third of the string results in a contradiction, which means A2 is not a regular language. A3: Using the pumping lemma, it is shown that there exists no integer n such that the pumped string has a length equal to \(2^{n}\), which contradicts the condition of A3. Hence, A3 is not a regular language.
See the step by step solution

Step by step solution

Unlock all solutions

Get unlimited access to millions of textbook solutions with Vaia Premium

Over 22 million students worldwide already upgrade their learning with Vaia!

Step 1: Describe the language A1

A1 is the language of strings that consist of n zeros, followed by n ones, followed by n twos, with n greater than or equal to 0.

Step 2: Apply the pumping lemma

Let p be the pumping length. Choose a string w in A1 of the form \(w = 0^{p}1^{p}2^{p}\). It is clear that \(|w| \ge p\).

Step 3: Divide the string w into x, y, and z

According to the pumping lemma, we can divide w into three substrings x, y, and z such that: 1. \(w = xyz\) 2. \(|xy| \le p\) 3. \(|y| > 0\) 4. For all \(i \ge 0, xy^{i}z \in A_{1}\)

Step 4: Proof by contradiction

Since |xy| ≤ p, the substring y must consist of only zeros. Let \(y = 0^{k}\), where \(k > 0\). Now, let's examine the string \(xy^{2}z\) which contains \((p + k)0s, p1s,\) and \(p2s\). Due to the extra k zeros, the string can't be in A1 since the numbers of 0s, 1s, and 2s should be equal. This contradicts condition (4) of the pumping lemma. Therefore, A1 is not a regular language. #Language A2#

Step 1: Describe the language A2

Language A2 is the language of strings that consist of w concatenated three times, where w is any string of a's and b's.

Step 2: Apply the pumping lemma

Let p be the pumping length. Choose a string w in A2 of the form \(w = (a^{p}b^{p})^{3}\).

Step 3: Divide the string w into x, y, and z

According to the pumping lemma, we can divide w into three substrings x, y, and z such that: 1. \(w = xyz\) 2. \(|xy| \le p\) 3. \(|y| > 0\) 4. For all \(i \ge 0, xy^{i}z \in A_{2}\)

Step 4: Proof by contradiction

Since |xy| ≤ p, the substring y must consist of only a's. Let \(y = a^{k}\), where \(k > 0\). Now, let's examine the string \(xy^{2}z\) which has an extra k a's in the first third of the string. This string cannot be of the form \(www\) any longer. Thus, this contradicts condition (4) of the pumping lemma. Therefore, A2 is not a regular language. #Language A3#

Step 1: Describe the language A3

A3 is the language of strings that consist of \(2^{n}\) a's, where n is greater than or equal to 0.

Step 2: Apply the pumping lemma

Let p be the pumping length. Choose a string w in A3 of the form \(w = a^{2^{p}}\). This string is in A3 since \(2^{p} = 2^{n}\) for some n.

Step 3: Divide the string w into x, y, and z

According to the pumping lemma, we can divide w into three substrings x, y, and z such that: 1. \(w = xyz\) 2. \(|xy| \le p\) 3. \(|y| > 0\) 4. For all \(i \ge 0, xy^{i}z \in A_{3}\)

Step 4: Proof by contradiction

Since |xy| ≤ p, the substring y must consist of only a's. Let \(y = a^{k}\) where \(k > 0\). Now, let's examine the string \(xy^{2}z\) which has an extra k a's in it. The new length of the string is \(|xy^{2}z| = 2^{p} + k\). There is no integer n such that \(2^{p} + k = 2^{n}\), which means the string is not in A3. This contradicts condition (4) of the pumping lemma. Therefore, A3 is not a regular language.

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Get Vaia Premium now
Access millions of textbook solutions in one place

Most popular questions from this chapter

Chapter 1

Convert the following regular expressions to NFAs using the procedure given in Theorem 1.54. In all parts, \(\Sigma=\\{\mathrm{a}, \mathrm{b}\\}\). a. \(\mathrm{a}(\mathrm{abb})^{*} \cup \mathrm{b}\) b. \(a^{+} \cup(a b)^{+}\) c. \(\left(\mathrm{a} \cup \mathrm{b}^{+}\right) \mathrm{a}^{+} \mathrm{b}^{+}\)

Chapter 1

Consider the language $F=\left\\{\mathrm{a}^{i} \mathrm{~b}^{j} \mathrm{c}^{k} \mid i, j, k \geq 0\right.\( and if \)i=1\( then \)\left.j=k\right\\} .$ a. Show that \(F\) is not regular. b. Show that \(F\) acts like a regular language in the pumping lemma. In other words, give a pumping length \(p\) and demonstrate that \(F\) satisfies the three conditions of the pumping lemma for this value of \(p\). c. Explain why parts (a) and (b) do not contradict the pumping lemma.

Chapter 1

Let \(x\) and \(y\) be strings and let \(L\) be any language. We say that \(x\) and \(y\) are \(\operatorname{distin}\) guishable by \(L\) if some string \(z\) exists whereby exactly one of the strings \(x z\) and \(y z\) is a member of \(L\); otherwise, for every string \(z\), we have \(x z \in L\) whenever \(y z \in L\) and we say that \(x\) and \(y\) are indistinguishable by \(\boldsymbol{L}\). If \(x\) and \(y\) are indistinguishable by \(L\), we write \(x \equiv_{L} y\). Show that \(\equiv_{L}\) is an equivalence relation.

Chapter 1

Let \(\Sigma=\\{0,1,+,=\\}\) and \(A D D=\\{x=y+z \mid x, y, z\) are binary integers, and \(x\) is the sum of \(y\) and \(z\\} .\) Show that \(A D D\) is not regular.

Chapter 1

Let \(\Sigma=\\{0,1\\} .\) Let $W W_{k}=\left\\{w w \mid w \in \Sigma^{*}\right.\( and \)w\( is of length \)\left.k\right\\}$. a. Show that for each \(k\), no DFA can recognize \(W W_{k}\) with fewer than \(2^{k}\) states. b. Describe a much smaller NFA for \(\overline{W W}_{k}\), the complement of $W W_{k}$.

Join over 22 million students in learning with our Vaia App

The first learning app that truly has everything you need to ace your exams in one place.

  • Flashcards & Quizzes
  • AI Study Assistant
  • Smart Note-Taking
  • Mock-Exams
  • Study Planner
Join over 22 million students in learning with our Vaia App Join over 22 million students in learning with our Vaia App

Recommended explanations on Math Textbooks