I need to write a regular expression that identifies the set of all possible strings over Σ={,} that end with an odd number of "a"s.
I'm getting better with regular expressions, but still I'm not sure of this one. So far, I wrote the following expression, but I'm not sure if it is correct or not (and if not, why).
$$ (b^*|(a|b)^*)a(aa)^* $$
well the last part makes sure that it ends with at least 1 or 1+2n "a"s, so I'm pretty sure this is correct. As for the first part, I'm not quite sure.
Let $A =\{a, b\}$ and let $1$ be the empty word. A typical word of your language $L$ can be written as $uv$, where $v \in a(aa)^*$ and $u$ does not end with an $a$, that is, $u \in 1 + A^*b$. Altogether, you get $$L = (1 + A^*b)a(aa)^*$$