6

Pumping Lemma is used to prove a language to be not regular. But How a language can be
proved to be regular ? In particular,

Let L be a language. Define half(L) to be  
{ x | for some y such that |x| = |y|, xy is in L}.  
Prove for each regular L that half(L) is regular.  

Is there any trick or general procedure to tackle such kind of questions ?

phihag
  • 278,196
  • 72
  • 453
  • 469
Happy Mittal
  • 3,667
  • 12
  • 44
  • 60

2 Answers2

9

If you can correctly describe your language L by an NFA or DFA, then it will be regular.

There is a well known equality of NFAs, DFAs, regular grammars and regular expressions, so a representation of L in any of these formalisms should do.

miku
  • 181,842
  • 47
  • 306
  • 310
5

Provide a regular grammar or a finite automaton that matches the language. For the full list of properties you can prove to show a language is regular, see the first lines of the Wikipedia Article on regular languages.

phihag
  • 278,196
  • 72
  • 453
  • 469
  • 1
    +1 for forcing me to parse (bad pun intended) "[A Regular Language] is the preimage of a subset of a finite monoid under a homomorphism from the free monoid on its alphabet." – Jörg W Mittag Dec 26 '10 at 14:26
  • 2
    Luckily, you need to choose just one of those bullet points if you just want to prove a language to be regular. – phihag Dec 26 '10 at 16:02