I'm doing an exercise in my book, the question is to find a string of minimum length in $\{a, b\}^*$ not in the language corresponding to the given regular expression.
a. $b^*(ab)^*a^*$
My answer: $aab$
b. $(a^* + b^*)(a^* + b^*)(a^* + b^*)$
My answer: $abab$
c. $a^*(baa^*)^*b^*$
My answer: $bba$
d. $b^*(a + ba)^*b^*$
My answer: $abba$
I came up with my answers by trial and error. I don't know for sure if these are the shortest possible strings. Is the best method trial and error, or would there be some better algorithmic way?