Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am trying to solve a regular expression of binary string where every even position is a '1'
I've solved this for an odd position: (1(0+1))*(1+ε)
How would it look like for an even position then? Thanks in advance.
An odd position can either have 0 or 1 and every even position can only have 1. RE for this can be: $$ ((0 + 1)1)^* (\epsilon + (0+1))$$ Note that, it also contains the empty word.
Required, but never shown