Question on language regularity
- From: Eric Bodden <eric.bodden@xxxxxxxxxxxxxx>
- Date: Sat, 01 Sep 2007 10:34:22 -0700
Hi all.
While preparing for my comprehensive exam I came across this old exam
question here that really makes me suffer. It looks easy at a first
glance but then it turns out to be rather tricky...
"Let L be a regular language. Is the following language regular?
R_L := {a_2 a_1 a_4 a_3 ... a_(2n) a_(2n-1) | a1 a2 a3 ... a_(2n) in
L}"
So given a language L is the language of all even words in L where
each two letters have been switched also regular?
My first thought was "no, non-regular". But then I found a very easy
example for L where R_L is regular: Let L = {} then R_L = {}, which is
regular. So in general, R_L cannot be non-regular.
Then, however I thought that at least for certain Ls it must be non-
regular. So I tried to apply the pumping lemma. However doing so, I
failed.
So my next idea was "ok, maybe it is actually always regular". This
would probably mean to do some automaton transformation on the DFA or
NFA for L but I was unable to come up with one that would work in
general and yield the correct R_L.
Does anybody have any idea how to approach this?
Thanks a lot,
Eric
.
- Follow-Ups:
- Re: Question on language regularity
- From: Torben Ægidius Mogensen
- Re: Question on language regularity
- From: David Wagner
- Re: Question on language regularity
- Prev by Date: Send SMS to anyone @ NO Cost.
- Next by Date: Re: Question on language regularity
- Previous by thread: Send SMS to anyone @ NO Cost.
- Next by thread: Re: Question on language regularity
- Index(es):
Relevant Pages
|