# Getting the idea behind pumping length correct

I am unsure whether I got the notion behind the pumping length correctly. I know its definition, and just want to make sure that I understood everything correctly.

Suppose we have an automata that accepts $0^{*}1^{*}$. The longest word accepted is $01$ without an iteration, whose length is $2$. So $n=2$, am I correct?

In case of $0......01^{*}$ where there are $n$ zeroes, the constant would be simply equal to $n+1$.

Is my thinking correct?

• The (optimal) pumping length is (at most) the number of states in the minimal NFA. Dec 30 '16 at 7:24