I know that converse of above theorem is not true i.e if L is regular then every subset of L need not be regular
-
3You mean, every proper subset? Otherwise it's trivially true. – John Dvorak Jan 21 '13 at 17:41
-
how? can you plz explain. – akshay Jan 21 '13 at 17:43
-
1Every language is a subset of itself. Thus, if every subset of the language is regular, then the subset that is the language itself is regular as well, and thus the language itself is regular. – John Dvorak Jan 21 '13 at 17:46
-
Not just that, if every proper subset of a language is regular, then the language is finite (and thus regular). – John Dvorak Jan 21 '13 at 17:47
-
ya.. i got it:) what about every proper subset? – akshay Jan 21 '13 at 17:48
-
i think it is not the case. For example every proper subset of a^nb^n is regular but a^nb^n is not regular – akshay Jan 21 '13 at 17:49
-
I disagree what about "`a^pb^p` where `p` is a prime"? It is a proper subset of `a^nb^n` and it's definitely not regular. – John Dvorak Jan 21 '13 at 17:53
1 Answers
Not only
if every subset of a language L is regular then L is regular
but also
if every proper subset of a language L is regular, then L is finite
Proof:
This is equivalent to the statement
if a language
L
is infinite, then it contains a subset that is not a regular language.
The pumping lemma for regular languages states that "there exists a length l
such that if a word w
in the language is longer than l
, then there exist three words x,y,z
such that y
is non-empty, xyz == w
and every xy^nz
is in the language".
If a language is infinite and regular, then it contains a word longer than any given length. Thus, there neccessarily exist three words x,y,z
such that every xy^nz
is in the language.
Now, every proper subset of {xy^nz; n in N}
is a proper subset of L
. Now, there definitely exist proper subsets of xy^nz
that are not regular*. Thus, every regular infinite language has a proper subset that is not regular.
If a language is infinite and not regular, then consider any of its proper infinite subsets. If the subset is not regular, then the language is not a counter-example. If the subset is regular, then use the previous paragraph to find a proper subset that is not regular. Since being a proper subset is transitive, this subset is a proper subset of the original language, and the language is not a counter-example.
Thus, every infinite language has a proper subset that is not regular.
Thus, if every proper subset of a language is regular, then the language is finite (and thus regular).
QED
*For example, the set {xy^{n^2}z; n in N}
is a proper subset of {xy^nz; n in N}
and it is not regular, as shown by the Myhill-Nerode theorem.

- 26,799
- 13
- 69
- 83