What set is produced from $a^* \cup b^*$?

40 Views Asked by At

I'm trying to construct an enumerating Turing Machine to recognize $a^* \cup b^*$ (* is Kleene star) and I'm unsure if the set I'm making the TM recognize is the correct one.

I think it is: $$\emptyset, a, b, aa, bb, aaa, bbb, aaaa, bbbb,\ldots$$ and so on.

Can anyone confirm if I am correct? If not, what should it be?

1

There are 1 best solutions below

1
On BEST ANSWER

If what you are using is the Kleene star, then your description is correct. It is the union of the two languages $A$ and $B$ such that $A$ contains strings with zero or more a's, and $B$ contains strings with zero or more b's.