Construct a regular expression that defines the language M (say) containing all words beginning with exactly one a or exactly one b. (Words in M are at least of length 1 and words such as aa, bbbaba and aaaabbabbbabb do not belong to M. Words in M can begin and end with the same letter substring or begin and end with different letter substrings.) I want to know if i can can simplify my answer and is my answer correct .
My answer is :
(aba*+baa*+a*ab+aa*b+ba*a+a*ba)+(b*ab+bab*+b*ba+bb*a+ab*b+abb*)
I cant quite understand your answer as it uses some special '$a$' character which is different from 'a' for some reason? However here is a solution that should be minimal where $\Sigma = \{a,b\}$:
$M = \{a,b\}+ab\Sigma^*+ba\Sigma^*$
Ok as clarified, it looks like your 'a's all are the same, then your answer is wrong and wont work. The question asks us to accept words that have exactly one 'a' or one 'b', your answer does not accept the single letter words 'a' and 'b'. To answer questions like this it is best to seperate the language into multiple 'classes' of words that are similar in this case we have two classes, words that start with 'a' and words that start with 'b', notice we have another two classes namely words that have exactly one letter and words that have atleast two letters. These turn out to be the equivalence classes from the Myhill-Nerode theorem but that isnt important right now.
So you can now tackle each case individually and take a union of them. I'll leave it to you to identify each case in my answer.