So I had an exam in the subject "Theory Of Computation"on Theory of Computation, and one of the questions was to write down a regular expression of a binaryfor the language that hasover $\{0,1\}$ consisting of all words containing at least one (1) , my1. My answer was :
0* 1 0* (0* 1 0*)*$$ 0^* 1 0^* (0^* 1 0^*)^* \, . $$
My teacher gave me one mark out of 5 on in, yet i cantI can't find a possible string that will give false output here! hisHis answer, which was $(0+1)^*1(0+1)^*$, was better, but mine works as well(i think)
his answer :
(0+1)* 1 (0+1)*, I believe.
Please someone tell me if my answer is correct or not?
Is my answer correct?