Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is the 'pumping length' in the Pumping lemma?

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?

like image 375
Ivan Prodanov Avatar asked Aug 24 '13 22:08

Ivan Prodanov


People also ask

What is pumping length in pumping lemma?

Pumping Lemma for Regular Languages. If L is a regular language, then there is a number p (called a pumping length for L) such that any string s G L with msm > p can be split into s = xyz so that the following conditions are satisfied: 1. for each i > 0, xyiz G L, 2. mym > 0, and 3.

What is pump length?

Lemma 1 (Pumping Lemma for Regular Languages) If L is a regular language, there ex- ists a positive integer p, called the pumping length of L, such that for any string w ∈ L whose length is at least p, there exist strings x, y, z such that the following conditions hold. 1. w = xyz 2.

What is the pumping length of string of length?

9. What is the pumping length of string of length x? Explanation: There exists a property of all strings in the language that are of length p, where p is the constant-called the pumping length . For a finite language L, p is equal to the maximum string length in L plus 1.

Can the pumping length be 1?

The minimum pumping length must always be greater than 0, even if there are no strings in the language. This should be 2. If p = 1, we can't pump 01 (because y must equal 0, and 001 is not in the language).


1 Answers

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).

like image 163
Philip Whitehouse Avatar answered Sep 28 '22 02:09

Philip Whitehouse