maximus
maximus

Reputation: 608

Are regular expressions (1+ U 0*)* and (1 U 0)* different? if different, then what is the difference?

I am new to the field of regular expressions. Need to understand the difference between the two regular expressions (1+ U 0*)* and (1 U 0)* considering that the alphabet for both is (1,0)

Upvotes: 0

Views: 424

Answers (1)

Jay
Jay

Reputation: 2686

(1 U 0)* can also be read (1 union 0) or (1+0) in formal languages theory as (1|0)* as a regular expression meaning 1 or 0 epsilon times

(1+ U 0*)* Doesn't not make sense but the idea is (1|0)*

If you need the difference between the star and the plus it explains * also has {E} in its set which is the empty set which is different from 1+

Upvotes: 1

Related Questions