Skip to main content

Pumping Lemma

Amu_Ke_Fundye


Pumping Lemma


Pumping Lemma for regular languages
  • Suppose that a language L is regular. Then there is a FA that accepts L.
  • Let n be the number of states of that FA. Then for any string x in L with |x| ≥ n, there are strings u, v and w which satisfy the following:
    • x = uvw
    • |uv| ≤ n
    • |v| > 0 is same as v ≠ ε
    • For every integer m ≥ 0, uvm L.
  • If L is regular then for every x such that |x| ≥ n then there exists uvw such thatx=uvwv ≠ ε, |uv| ≤ n, and for which uviw is in L for every i.
Pumping Lemma gives a necessity for regular languages.
Pumping Lemma is not a sufficiency, that is, even if there is an integer n that satisfies the conditions of Pumping Lemma, the language is not necessarily regular.
Pumping Lemma can not be used to prove the regularity of a language.
It can only show that a language is non-regular.
Example: L = akbis non-regular, where k is a natural number.
  • Suppose that L is regular and let n be the number of states of an FA that accepts L. Consider a string x = anbn for that n.
  • Then there must be strings u, v, and w such that
  • x = uvw,
    |uv| ≤ n
    |v| > 0, and
    for every m ≥ 0, uvm
     L.
  • Since |v| > 0, v has at least one symbol.
  • Also since |uv| ≤ n, v = ap, for some p > 0,
  • Let us now consider the string uvmw for m = 2.
  • Then uv2w = an-pa2pbn = an+pbn. Since p > 0 , n + p ≠ n .
  • Hence an+pbn can not be in the language L represented by akbk.
  • This violates the condition that for every m ≥ 0, uvm L.
  • Hence L is not a regular language.
Pumping Lemma for CFL’s
  • Let L be a CFL. Then there exists a constant N such that if z L s.t. |z|≥N, then we can write z=uvwxy,
  • |vwx| ≤ N
  • vx ≠ ε
  • For all k ≥ 0 : uvkwxk L
Regards 
Amrut Jagdish Gupta

Comments

Popular posts from this blog

Undecidability

Amu_Ke_Fundye Undecidability Decidable Problem If there is a Turing machine that decides the problem, called as Decidable problem. A decision problem that can be solved by an algorithm that halts on all inputs in a finite number of steps. A problem is decidable, if there is an algorithm that can answer either yes or no. A language for which membership can be decided by an algorithm that halts on all inputs in a finite number of steps. Decidable problem is also called as totally decidable problem, algorithmically solvable, recursively solvable. Undecidable Problem A problem that cannot be solved for all cases by any algorithm whatsoever. Equivalent Language cannot be recognized by a Turing machine that halts for all inputs. The following problems are undecidable problems: Halting Problem:  A halting problem is undecidable problem. There is no general method or algorithm which can solve the halting problem for all possible inputs. Emptyness Problem:...

ALU and Data Path

Amu_Ke_Fundye ALU and Data Path The CPU can be divided into a data section and a control section. The   data section , which is also called the   datapath. Datapath The registers, the ALU, and the interconnecting bus are collectively referred to as the datapath.  Each bit in datapath is functionally identical.  The datapath is capable of performing certain operations on data items. The  control section  is basically the  control unit ,  which issues control signals to the datapath . Bus : A Bus is a collection of wires or distinct lines meant to carry data, address and control information. Data Bus : it is used for transmission of data. The number of data lines corresponds to the number of bits in a word. Address Bus : it carries the address of the main memory location from where the data can be accessed. Control Bus : it is used to indicate the direction of data transfer and to coordinate the timing of ...

Funny Shortcut to Remember Periodic Table

Amu_Ke_Fundye Funny Shortcut to Remember Periodic Table THE PERIODIC TABLE The periodic table is a tabular display of the chemical elements, organized on the basis of their atomic number's , electron configurations, and chemical properties.In order to appreciate the general trends in chemistry and to explain the deviations of some from these general trends we need to to have good knowledge about the position of those elements in periodic table. This knowledge is also extremely important for competitive exams. So, here I present a way to memorize this using some funny easy shortcut sentences. THE FIRST 18 ELEMENTS (H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar)  H ie  He   Li es  Be cause  B oron  C an N ot  O xide  Fl orine.. N e w  Na tions  M ight  Al so  Si ng  P eaceful  S ong  Cl early  A gain  THE ...