Why do you have “bbb(“? I’m guessing you’re trying to satisfy nm≥3.Hi,
Somebody please guide me what would be the solution for the following:
Give a regular expression for L={a^n b^m |n≥ 1, m ≥1, nm≥3}
I have come with the following solution.
a(a)* . bbb(b)*
Zulfi.
Hi,Why do you have “bbb(“? I’m guessing you’re trying to satisfy nm≥3.
But will your regex match “aaab”? Should it?
And will the dot operator do what you want? Let’s try“aaaXbb”? Is that valid? Will it pass your regex expression?
so depending on your answers to my questions, do you think your answer is correct. Maybe it is; maybe not.
What would you change, if anything?
What is your dot operator? Concatenation? Why are you using it in some places but not others? What's the difference betweenHi,
Somebody please guide me what would be the solution for the following:
Give a regular expression for L={a^n b^m |n≥ 1, m ≥1, nm≥3}
I have come with the following solution.
a(a)* . bbb(b)*
Zulfi.
I’ve asked several times. IMHO, he doesn’t knowWhat is your dot operator? Concatenation? Why are you using it in some places but not others? What's the difference between
a(a)* . bbb(b)*
and just
a(a)*bbb(b)*
Are you just trying to make it more readable or obvious? If so, that's perfectly reasonable.
Can your solution generate "aaaaab" or "aabb" ?
I also want to know, for sure, what the dot operator is. Usually it is used for concatenation (but is a vertically centered unfilled circle most of the time, but in ASCII it is often approximated with a period). Usually for these kinds of problems (i.e., in an automata course) the notation used by regex engines isn't allowed because they are not highly standardized and also often allow you to create expressions that are not truly regular expressions (i.e., the engine is more powerful than a finite automaton).I’m not going to tell you my solution. Homework Help is NOT Homework Dine for you.
You are getting the idea, but I don’t agree with your last answer. I’m not sure what regex engine you’re using but it’s not the syntax I’d use.
First, Ive asked twice. What does the dot operation do in your regex? This is important because I’m very sure it’s not what you think. Look at me reply? And explain what you’re doing and justify why you have it! Otherwise, I can’t help you.
I want you to explain why the phrase
“aa(a)* b(b)*” is necessary?
As far as I can recall, the dot operator is NOT concatenation. It is a wildcard operator. So while “aaab” is a valid string with his regex, so is “aaaXb” valid and I DONT think the TS means for that interpretation.What is your dot operator? Concatenation? Why are you using it in some places but not others? What's the difference between
a(a)* . bbb(b)*
and just
a(a)*bbb(b)*
Are you just trying to make it more readable or obvious? If so, that's perfectly reasonable.
Can your solution generate "aaaaab" or "aabb" ?
In an automata course there are three defined regular operations: union, concatenation, Kleene star. These are usually represented by {∪,·,*} respectively except that the concatenation is usually an unfilled circle, like ° except not as a subscript. The '+' symbol is also commonly used for union. The star operator is written as a superscript, but the normal asterisk is high enough in most type fonts to be close enough.As far as I can recall, the dot operator is NOT concatenation. It is a wildcard operator. So while “aaab” is a valid string with his regex, so is “aaaXb” valid and I DONT think the TS means for that interpretation.
So there are some major differences. I have always used + for concatenation. Or NO operator for concatenation or sequence of characters. And the dot operator has always been a wildcard operator. In either case, his regex does not define a valid string.In an automata course there are three defined regular operations: union, concatenation, Kleene star. These are usually represented by {∪,·,*} respectively except that the concatenation is usually an unfilled circle, like ° except not as a subscript. The '+' symbol is also commonly used for union. The star operator is written as a superscript, but the normal asterisk is high enough in most type fonts to be close enough.
A short hand for a wildcard is often ∑ since this is usually used to represent the string alphabet, which as a set defines a language consisting of all one-character strings over that alphabet and hence is a valid regular expression in its own right. A given machine operates over a defined alphabet, so even if the . were meant to be wildcard substitution, it would only apply to that machine's defined alphabet. The regex generators that are out there are more general purpose and operate on a pre-defined alphabet that is much larger than the one defined for almost all automata problems (since the machine complexity explodes rapidly as the size of the alphabet increases).
Hi,
djsfantasi:
Thanks for your time.
Sorry I don't know your back ground. Are you a CS person? Actually I have posted here several questions and at this point "." operator i.e. concatenation is a very HL thing for me. I am trying to know your solution because you said some thing like:
<And will the dot operator do what you want? Let’s try“aaaXbb”? Is that valid? Will it pass your regex expression? >
"X" is not in the question. So I am curious about your solution. Your comment has increased my confusion. Homework help does not mean that you increase some body's confusion by asking questions or by providing some guidelines and then backing off.
Finally this is not my home work.
Zulfi.
Omitting the operator is usually interpreted as concatenation in an automata course, too. What do you usually use for union? I'm guessing the pipe symbol?So there are some major differences. I have always used + for concatenation. Or NO operator for concatenation or sequence of characters. And the dot operator has always been a wildcard operator. In either case, his regex does not define a valid string.
There is an unmatched closing paren at the end, which I will assume should either be removed or matched to an initial open paren at the beginning.Actually there are 3 cases:
(a(a)* . bbb(b)*) + (aaa(a)* . b(b)*) + (aa(a)*. bb(b)*))
There are many ways to write most regular expressions (with, unfortunately, no standard form). I would have probably written it a bit differently, perhaps something likeGive a regular expression for L={a^n b^m |n≥ 1, m ≥1, nm≥3}
I understands that “X” as a bit bit part of the solution. My point was that your Regex solution allows it to be part of your.soliftihh hhHh. Bj part of your solution.Hi,
"X" is not part of the question. So I am curious about your solution. Your comment has increased my confusion. Homework help does not mean that you increase some body's confusion by asking questions or by providing some guidelines and then backing off.
Finally this is not my home work.
Zulfi.