Re: Oh, forgot other question regarding regular expressions





niclane wrote:

Perhaps this is connected with my misunderstanding that has lead to my
earlier post but with regular expressions in the Sipser book definition
1.52 states:

that R is a regular expression if R is:
...
2. "empty"
...

Among other possibilities, yes.

then on the next page is states:

"R[upperscript +] = RR*."

then later

"R[upperscript +] union "empty" = R*

My question is why is R[upperscript +] not already have "empty" in it?
Even though it must have 1 or more concatenations of R doesn't R have
empty in it? And so can't R concat R be potentially "empty" concat
"empty"?

R need not denote a language with the empty string. It might, but
it certainly won't always. For example, if R = {a},

   R^+ = {a, aa, aaa, ...}

and R^+ obviously won't contain the empty string.


Regards,

Rick

.