Minimize the number of states in this DFA via quotient construction. Show all your steps, specifically in your table where you are “marking” nodes indicate which iteration you marked them on.
Final states {0,3}, and non-final states are {1,2,4,5,6,7,8,9}
Initial table with all pairs:
Mark based on final/non-final states:
first iteration.
{0,2} -(a)→ {1,3}: not marked
{0,2} -(b)→ {6,7}: not marked
{0,3} -(a)→ {1,4}: not marked
{0,3} -(b)→ {6,8}: not marked
{0,4} -(a)→ {1,5}: not marked
{0,4} -(b)→ {6,8}: not marked
{0,7} -(a)→ {1,9}: not marked
{0,7} -(b)→ {6,8}: not marked
{0,8} -(a)→ {1,9}: not marked
{0,8} -(b)→ {6,5}: not marked
{0,9} -(a)→ {1,7}: not marked
{0,9} -(b)→ {6,6}: not marked
second iteration.
{1,2} -(a)→ {2,3}: marked so we mark {1,2}
{1,5} -(a)→ {2,0}:
sorry I gave up
Problème 3.
Your friend is looking at the formal definition of the pumping lemma and they think something is wrong
L is regular ⟹(∃k∣k>0:(∀x,y,z∣xyz∈L∧∣y∣>k:(∃u,v,w∣y=uvw∧v=ϵ:(∀i∣i≥0:xuviwz∈L))))
They understand the argument it is crafted around, that is, due to the fact that strings are arbitrarily long and a DFA has finite states there must be a segment of accepted strings which “loop” in the machine. However, they claim for the pumping lemma above to hold, L must be infinite, because if L was finite the argument about “looping” no longer holds. Therefore, the pumping lemma only holds when L is infinite.
You can see where your friend is coming from, but they are incorrect. Why? Be precise in your argument, that is, show how if L is finite, then
Since k>ℓ, there doesn’t exist a string xyz∈L such that ∣y∣>k. Therefore, antecendent of the implication xyz∈L∧∣y∣>p is always false.
Therefore, the entire inner implication is vacuously true, and the entire statement is true. Therefore, the pumping lemma holds for finite languages.
Problème 4.
Using the Pumping Lemma, prove the following languages are not regular. Make your steps in the “game” and variable choices very clear for each question.
Pumping Lemma
There exists a pumping length p such that ∀s∈L,∣s∣≥p, we can write s=xyz such that
i. ∣y∣>0
ii. ∣xy∣≤p
iii. ∀i≥0,xyiz∈L
4.a
L={anmbman∣n,m≥0}
Assume L is regular.
Let s=ap2bpap. s∈L since choosing n=p,m=p, and ∣s∣=p2+2p≥p for p≥1.
By the pumping lemma, we can write s=xyz satisfying conditions i) and iii). Since ∣xy∣≤p, y must consist of only a‘s. Let y=ak for 1≤k≤p.
Consider string xy0z=xz=ap2−kbpap. From condition iii), this must be in L.
However, xz has the first block of a to length p2−k and last block of length p. To be in L, we must have p2−k=p⋅m for some integer m. But p2−k>p for p≥2, so there is no such m exists, which means xz∈/L.
Thus, it contradicts the pumping lemma, and L is not regular. □
4.b
L={ww∣w∈Σ∗}
Assume L is regular.
Let s=apbpapbp. s∈L since chos\sin g w=apbp and ∣s∣=4p≥p for p≥1.
By pumping lemma, we can write s=xyz satisfying conditions i) and iii). Since ∣xy∣≤p, y must consist of only a‘s. Let y=ak for 1≤k≤p.
Consider the string xy2z=xakyakbpapbp. By condition iii) of the pumping lemma, this must be in L.
However, xy2z to be in L, it must be the for of ww for some w∈Σ∗. But the first half of xy2z is ap+kbp and the second half is apbp. Since k≤p. So xy2z∈/L.
Thus, it contradicts the pumping lemma, and L is not regular. □
4.c
L={ak3∣k≤0}
Assume L is regular.
Let s=ap3. s∈L since choosing k=p, and ∣s∣=p3≥p for p≥1.
By the pumping lemma, we can write s=xyz satisfying conditions i) and iii). Since ∣xy∣≤p, y must consist of only a‘s. Let y=ak for 1≤k≤p.
Consider the string xy2z=xakyakz=ap3+k. By condition iii) of the pumping lemma, this must be in L.
However, xy2z to be in L, it must be of the form ak3 for some k≤0. p3<p3+k<(p+1)3, which means p3+k is not a perfect cube, so xy2z∈/L.
Thus, it contradicts the pumping lemma, and L is not regular. □