Let L be the language given by $\{w ∈ \{a,b\}^∗||w|_b \;is \;even \;and\; w\; does \;not \;end \;with \;b\}$.
Give a regular expression for the language $L$ and explain your answer.
At the moment i came up with this:
$L(a^*(a^*((ba^* ba^*)^*a) ^* ) ^*a ^*)$
But isnt this an overkill? The $(ba^* ba^*)^*$ makes sure the arbitrary number of $b$'s stays even. So if this is zero times repeated then there will be zero $b$'s. This is ok since $0$ is even. The $a$ after this sentence $(ba^* ba^*)^*a$ makes sure the word doesn't end with an $b$. But i am not sure this is correct or did i used to much? Is the empty word als possible?
Yours sincerely, Thijs