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.
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
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.