What exactly is the 'pumping length' in the Pumping lemma?
Asked Answered
K

2

19

I'm trying to understand what is this 'magical' number 'n' that is used in every application of the Pumping lemma. After hours of research on the subject, I came to the following website: http://elvis.rowan.edu/~nlt/TheoryNotes/PumpingLemma.pdf

It states

n is the longest a string can be without having a loop. The biggest n can be is s, though it might be smaller for some particular language.

From what I understand if there is a Language L then the pumping length of L is the amount of states in the Finite State Automata that recognizes L. Is this true?

If it is then what exactly does the last line from above say "though it might be smaller for some particular language"? Complete mess in my head. Could somebody clear it up, please?

Kevyn answered 24/8, 2013 at 22:44 Comment(0)
O
8

A state doesn't recognise a language. A DFA recognises a language by accepting exactly the set of words in the languages and no others. A DFA has many states.

If there is a regular language L, which can be modelled by the Pumping Lemma, it will have a property n.

For a DFA with s states, in order for it to accept L, s must be >= n.

The last line merely states that there are some languages in which s is greater than n, rather than equal.

This is probably more suited for https://cstheory.stackexchange.com/ or https://cs.stackexchange.com/ (not quite sure of the value of both myself).

Note: Trivially, not all DFA's with sufficient states will accept the language. Also, the fact that a language passes the pumping lemma doesn't mean it's regular (but failing it means definitely isn't).

Note also, the language changes between FA and DFA - this is a bit lax, but because NDFAs have the same power as DFAs and DFAs are easier to write and understand, DFAs are used for the proof.

Edit I'll give an example of a regular language, so you can see an idea of u,v,w,z and n. Then we'll discuss s.

L = xy^nz, n > 2 (i.e. xyyz, xyyyz, xyyyyz)
u = xy
v = y
w = z
n = 4

Hence:

|z| = 3: xyz  (i = 0) Not in L, but |z| < n
|z| = 4: xyyz (i = 1)
|z| = 5: xyyyz (i = 2)
etc

Hence, it's modelled by the Pumping Lemma. A DFA would need at least 4 states. So let's think of one.

 -> State 1: x

State 1:
  -> State 2: y

State 2:
  -> State 3: y

State 3:
  -> State 3: y
  -> State 4: z

State 4:
  Accepting state
  Terminating state

4 states, as expected. Not possible to do it in less, as expected by n = 4. In this case, the example is quite simple so I don't think you can build one with more than 4 states (but that would be okay if it were needed).

Orgeat answered 24/8, 2013 at 23:19 Comment(3)
state 2 can loop on itself for y and go to state 3 as an accepting state on z. Therefore only 3 states neededCentimeter
@Ion: that 3 state DFA also accepts xyz which is not in the laguage.Aforesaid
Could you change your notation? you are using n ("n>2 ... n=4"), z ("w=z", "|z| = 3", also implied is z = xyyz) in different contexts and it is a little bit confusing.Tom
G
2

I think a possibility is when you have a FA with an unreachable state. The FA has s states, but 1 is unreachable, so all strings recognizing L will be comprised of (s-1)=n states, so n<s.

Grubb answered 25/8, 2013 at 0:8 Comment(1)
Eh, I assumed it ignored unreachable states, seeing as it would be trivial to make an arbitrarily large DFA without that constraintOrgeat

© 2022 - 2024 — McMap. All rights reserved.