# How is L = a^2n regular if it doesn't pass the pigeon-hole principle test?

I understand that this topic has been discussed, and I have reviewed numerous posts about it on stack overflow. However, my question remains unresolved. Specifically, I am seeking clarification on the use of the Pigeonhole Principle in determining the regularity of a language.

Consider the string a^{12}.

Suppose we have a DFA with 5 states and we process the string a^{12}. By the Pigeonhole Principle, the DFA will revisit a state more than once. If we remove the segment between the revisited states, this could result in an odd number of a's, for instance, a^7

The string a^7 would end in the same accepting state as a^{12}, yet a^7 does not belong to the language L={a^2n∣n≥0}.

My lecturer mentioned that the Pigeonhole Principle is used to prove that languages are non-regular. Based on this principle, I demonstrated how L fails the test, leading to my confusion. So how can L still be classified as a regular language?

This is also another similar proof that it fails:

• The problem is in your last part of the proof "the length of $w'$ may not be even". No point in your proof points to the fact that $l_2 - l_1$ might be odd, in fact, for teh DFA for this language, this $l_2-l_1$ value is always even.
– EnEm
Commented Jul 10 at 1:20
• Your proof would have been complete if you showed that for all DFAs that can exist for $L$, there exists a string $l \in L$ such that $l_1 - l_2$ is odd.
– EnEm
Commented Jul 10 at 1:22