FFRank,
I'll simply point out in the case where there are only two states (0 and 1), your calculations devolve into calculations of binomials. There are formulas for these, they can be exactly calculated without brute forcing them. What you're looking at I'd call a multinomial formula, a "generalized" binomial formula. The formula probably can be found in a decent mathematical physics text or a text on statistical mechanics, or a higher end probability text. For that matter, the multinomial formula is given
here. This of course means what you're dealing with are factorial calculations as you scale up. I think you'll lose the ability to get exact answers rapidly, though the logarithmic form of Stirling's formula may allow you approximate answers on the high end of things.
David
Update:
More exact language. Binomial coefficients aren't binomial distributions. Added a link to a multinomial formula.