edited by
423 views
4 votes
4 votes


Consider the language $L$ over $\Sigma = \{0, 1\}$ consisting of strings with equal number of $0's$ and $1s.$ You are using the pumping lemma to show that $L$ is not regular. You begin by supposing $L$ were accepted by a DFA with $k$ states. What would be a good choice of a string $xyz$ that would allow you to obtain a contradiction?

  1. $0011$
  2. $000111$
  3. $0^k1^{2k}$
  4. $0^k1^k$
edited by

1 Answer

Best answer
4 votes
4 votes
The string to be chosen must be in $L$ and this rules out option C. Now pumping lemma says that if a language $L$ is accepted by a DFA with $k$ states and $w = xyz$ is in $L$ and $\textbf{of length at least $k,$}$ then

1. $xy^iz$ is in $L$ for $i \geq 0$

2. $\mid xy \mid \leq k$

3. $\mid y \mid > 0$

Due to $w$ requiring length at least $k,$ we can rule out options A and B. For option D, we can see that $x y$ consist only of $0s$ and hence $y$ also consist of only $0s$ and when we pump more $y$ by increasing $i$ in $y^i$ or making $i = 0$ we get a string with unequal number of $0's$ and $1's$ which is not in $L,$ violating pumping lemma. Hence, correct answer is D.
selected by
Answer:

Related questions

7 votes
7 votes
1 answer
4
gatecse asked Sep 29, 2020
693 views
The minimum number of states in the deterministic finite automata required to check the divisibility by $18$ of a binary string (decimal value of string being divisible b...