BE Tweddle
2004-08-02 00:37:43 UTC
Hi,
Having taken a look at the review notes - I've got a few questions:
Question 4:
The proposed solution is:
(10)*(0|010)|(10)*(1|101)
Is this capable of recognizing the string "10" or "01" which fit the
problem criteria?
Do you not need the solution to be:
(10)*(0|010)|(10)*(1|101)|(01)|(10)
In a related question, the precedence for regular expression operators
are:
()
*
.
|
correct??
Question 11:
If I'm not mistaken the proposed solution recognizes the string "cb" which
the given grammar does not. Does this solution work better, or am I wrong:
<A>->a<B>b
<A>->cab
<B>->a
<B>->epsilon
Please let me know if I'm way off on any of these.
Thanks,
Brent
Having taken a look at the review notes - I've got a few questions:
Question 4:
The proposed solution is:
(10)*(0|010)|(10)*(1|101)
Is this capable of recognizing the string "10" or "01" which fit the
problem criteria?
Do you not need the solution to be:
(10)*(0|010)|(10)*(1|101)|(01)|(10)
In a related question, the precedence for regular expression operators
are:
()
*
.
|
correct??
Question 11:
If I'm not mistaken the proposed solution recognizes the string "cb" which
the given grammar does not. Does this solution work better, or am I wrong:
<A>->a<B>b
<A>->cab
<B>->a
<B>->epsilon
Please let me know if I'm way off on any of these.
Thanks,
Brent