Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generalizing the pumping lemma for UNIX-style regular expressions

Most UNIX regular expressions have, besides the usual **,+,?* operators a backslash operator where \1,\2,... match whatever's in the last parentheses, so for example *L=(a*)b\1* matches the (non regular) language *a^n b a^n*.

On one hand, this seems to be pretty powerful since you can create (a*)b\1b\1 to match the language *a^n b a^n b a^n* which can't even be recognized by a stack automaton. On the other hand, I'm pretty sure *a^n b^n* cannot be expressed this way.

I have two questions:

  1. Is there any literature on this family of languages (UNIX-y regular). In particular, is there a version of the pumping lemma for these?
  2. Can someone prove, or disprove, that *a^n b^n* cannot be expressed this way?
like image 927
Avi Avatar asked Apr 13 '10 02:04

Avi


People also ask

What is pumping lemma for regular expression?

In the theory of formal languages, the pumping lemma may refer to: Pumping lemma for regular languages, the fact that all sufficiently long strings in such a language have a substring that can be repeated arbitrarily many times, usually used to prove that certain languages are not regular.

In which of the following pumping lemma generally used for proving that?

Explanation: Pumping lemma is used to prove a language is regular or not. So, option (D) is correct.

What is pumping lemma write its applications?

Pumping Lemma is used as a proof for irregularity of a language. Thus, if a language is regular, it always satisfies pumping lemma. If there exists at least one string made from pumping which is not in L, then L is surely not regular. The opposite of this may not always be true.


1 Answers

You're probably looking for

  • Benjamin Carle and Paliath Narendran "On Extended Regular Expressions" LNCS 5457
    • DOI:10.1007/978-3-642-00982-2_24
    • PDF Extended Abstract at http://hal.archives-ouvertes.fr/docs/00/17/60/43/PDF/notes_on_extended_regexp.pdf
  • C. Campeanu, K. Salomaa, S. Yu: A formal study of practical regular expressions, International Journal of Foundations of Computer Science, Vol. 14 (2003) 1007 - 1018.
    • DOI:10.1142/S012905410300214X

and of course follow their citations forward and backward to find more literature on this subject.

like image 169
Ken Bloom Avatar answered Oct 13 '22 17:10

Ken Bloom