2

I am currently learning about regular expression and has recently found this question:

Applying algebraic laws for regular expressions to demonstrate how 01* can be derived from 0 + 01*.

My answer is:
0+01* = 0(ε+1*)
Multiplying 0 by ε gives you ε.
Multiplying 0 by 1* gives you 01*
Therefore, 0+01* = 0(ε+1*) = 01*

Is it correct? If not, can someone please explain to me ? Thanks a lot.

  • It’s correct apart from a typo: I’m sure that you meant to say that multiplying $0$ by $\varepsilon$ gives you $\varepsilon$. – Brian M. Scott Nov 02 '16 at 16:50
  • @BrianM.Scott thanks for the answer! but I don't think there's anything wrong with my "Multiplying 0 by ε gives you ε." Care to elaborate? Is it because the font makes it looks like an 'o'? Cheers! – Leonardo Vinsen Nov 02 '16 at 16:55
  • Oops: I inadvertently copied your error. I meant to write that multiplying $0$ by $\epsilon$ gives you $0$. – Brian M. Scott Nov 02 '16 at 16:57
  • @BrianM.Scott I see. So, does it mean the final answer is still 0 + 01* = 0(ε+1) = 01 ? – Leonardo Vinsen Nov 02 '16 at 16:57
  • Yes, everything was fine except that one line, which should read: Multiplying $0$ by $\epsilon$ gives you $0$. This is both true and what you need in order to justify the calculation $$0+01^=0\epsilon+01^=0(\epsilon+1^)=01^;.$$ – Brian M. Scott Nov 02 '16 at 17:01
  • 1
    @BrianM.Scott Well, thanks for that clarification! Have a nice day :) – Leonardo Vinsen Nov 02 '16 at 17:07
  • @LeonardoVinsen: A small supplement regarding $0\varepsilon=0$. Just keep in mind that $0$ is a symbol and not a number and multiplication is in fact concatenation. Since the empty word $\varepsilon$ is the neutral element regarding concatenation(multplication) $0\varepsilon=0$ should become more plausible. – Markus Scheuer Nov 02 '16 at 18:26

0 Answers0