473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Regular Languages. Help Needed.

I posted this question earlier, but I got no responses. Can anyone
help me out here...any hints or even how to start? Thanks in advance.

Let doubleswap(x) be the string formed by replacing each a in x by the
substring bb and each b by the substring aa. For example,
doubleswap(abcab)=bbaacbbaa. Furthermore, let doubleswap(L) be the
language formed of strings doubleswap(x) for x an element of L. Prove
that if L is regular, then so is doubleswap(L). Where L is a subset
(or equal) to {a, b, c}^*.

If L is regular, the L can be expressed as L(y) for some regular
expression y. We define y' to be the same as y except that we replace
each a in y by a pair of b's and each b by a pair of a's. Since y' is
a regular expression, it will suffice to show that L(y') =
doubleswap(L).

(a) Prove that L(y') is a subset or equal to doubleswap(L).

(b) Prove that doubleswap(L) is a subset or equal to L(y').
Jul 17 '05 #1
2 1884
Jack Smith wrote:
I posted this question earlier, but I got no responses. Can anyone
help me out here...any hints or even how to start? Thanks in advance.


Actually, looking here you had _several_ responses.

However, the question you're asking is _not_ a Java question, so you're
asking it in the wrong newsgroup. The question is off-topic. Please ask
your question in the relevant math newsgroup instead.

Brad BARCLAY

--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org


Jul 17 '05 #2
"stegen123" == stegen123 <st*******@yahoo.com> writes:

stegen123> I posted this question earlier, but I got no responses.
stegen123> Can anyone help me out here...any hints or even how to
stegen123> start? Thanks in advance.

Asking homework questions on usenet is generally frowned upon ;-)

stegen123> Let doubleswap(x) be the string formed by replacing
stegen123> each a in x by the substring bb and each b by the
stegen123> substring aa. For example, doubleswap(abcab)=bbaacbbaa.
stegen123> Furthermore, let doubleswap(L) be the language formed
stegen123> of strings doubleswap(x) for x an element of L. Prove
stegen123> that if L is regular, then so is doubleswap(L). Where
stegen123> L is a subset (or equal) to {a, b, c}^*.

You are asking for a hint???? That is what you have below!

stegen123> If L is regular, the L can be expressed as L(y) for
stegen123> some regular expression y. We define y' to be the same
stegen123> as y except that we replace each a in y by a pair of
stegen123> b's and each b by a pair of a's. Since y' is a regular
stegen123> expression, it will suffice to show that L(y') =
stegen123> doubleswap(L).

stegen123> (a) Prove that L(y') is a subset or equal to
stegen123> doubleswap(L).

stegen123> (b) Prove that doubleswap(L) is a subset or equal to
stegen123> L(y').

It is a well known result that regular sets are closed under
complementation, intersection, and substitution. Look up a good text
on automata theory.

You generally show subset properties by picking an element in the
first set and showing why it must be in the other one.

Or try and express this as a problem for a Java regex package. You
might get more responses :-)

Cheers!
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pekka Niiranen | last post by:
Hi there, I am using regular expressions like this: matcher = re.compile(r'(.*)\s(.*)', re.UNICODE) tmp = matcher.search(mystring) if tmp: myvariable = tmp.group(1) The idea is that...
6
by: Scott Zuyderduyn | last post by:
Hi all, I've started planning a software project that utilizes XML to store a lot of different input from the user. Regular expressions comprise a portion of this input. I could store a regex...
22
by: stoppal | last post by:
need to extract all text between the following strings, but not include the strings. "<!-- #BeginEditable "Title name" -->" "<p align="center">#### </p>" I am using preg_match(????, $s,...
5
by: Karin Jensen | last post by:
Hi I am writing in PHP and trying to work with regular expressions on records in a multilanguage database. I understand regexp basics, but have bitten off more than I can chew here and really...
4
by: Buddy | last post by:
Can someone please show me how to create a regular expression to do the following My text is set to MyColumn{1, 100} Test I want a regular expression that sets the text to the following...
5
by: Ryan | last post by:
HELLO I am using the following MICROSOFT SUGGESTED (somewhere on msdn) regular expression to validate email addresses however I understand that the RFP allows for "+" symbols in the email address...
2
by: norton | last post by:
Hi, I am learning Regular Expression and currently i am trying to capture information from web page. I wrote the following code to capture the ID as well as the Title Dim regex = New Regex( _...
13
by: Wiseman | last post by:
I'm kind of disappointed with the re regular expressions module. In particular, the lack of support for recursion ( (?R) or (?n) ) is a major drawback to me. There are so many great things that can...
47
by: Henning_Thornblad | last post by:
What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000):...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.