When I use the Pumping Lemma from Automata Theory, what are my restrictions for "i"?

37 Views Asked by At

The pumping lemma says: Let L be a regular language. Then there exists an integer p ≥ 1 such that every string w in L of length at least p can be written as s = xyz, satisfying the following conditions:

|y| ≥ 1 
|xy| ≤ p 
(∀i≥0 ) (z = xy^i z∈L) 

When we use the pumping lemma to prove that a language cannot be regular, there's this part where we choose an 'i' from the natural numbers for the proof. I want to ask, is there another restriction on 'i' ? Can I make 'i' dependant on p by saying "Let i = 2p" or something like that? Or if we know that we can present s as s=xyz, can I make i dependant on the length of x |x|=t or the length of y |y|=l and say "Let i = 2t" or "Let i =2l" ? Sorry if that's a stupid question

Edit: An example problem where I think I would need to do that is following: Prove that the language is not regular: L={ $a^{n}$$b^{m}$ |n divides m}

To solve this I set s to be s =$a^{p}$$b^{2p}$ ,|s|=3p>=p and p divides 2p, so we have that s is in L. Then I divide the string into s=xyz, and note that because of the condition |xy|<=p, xy consists only of a's. I set the length of x |x|=t and the length of y |y|=l and my string has the form: s=$a^{l}$$a^{t}$$a^{p-l-t}$$b^{2p}$ . Then I have that ∀i≥0, s' = x$y^{i}$z must be from L, so aim to choose an 'i' resulting in contradiction. I have that il+t+p-l-t≤2p ( so that n divides m ), which results in p+l(i-1)≤2p, and if I choose i=p+1 the condition is broken, because now p+l(p+1-1)≤2p is no longer true, because l is at least one and thus the left side is bigger, so we get a contradiction

I am not sure if this is correct because I am quite new in this subject, so any critique and feedback is welcome, thanks in advance!