I'm trying to figure out how to find the number of possible combinations of a set, but with allowing repeated letters. For example, if I want two letters, and they have to be $a$ or $b$, then I could have $aa, ab, ba, bb$. Is there some sort of formula I could use to figure out the number of possible combinations?
Thanks!