What is the number of permutations of the word AABBBCC, taking 7 letters at a time, repetitions being allowed?
I think it should be $3^7$, but I can't see why. Also what would be the number of permutations when only 5 letters are taken at a time, repetitions being allowed as above?
I came up with a general formula, $(Number\ of\ Different\ letters)^{Number\ of\ spaces\ to\ be\ filled}$
EDIT: One more confusion, what if, say we have p number of A's, q number of B's, r number of C's and s number of D's, and only three letter words are to be formed? The solution to one such problem in a book uses different cases, viz. all same, all different, etc., to count different number of arrangements, but it was only for 2 letters and (therefore), easy to do.