Solving this is bugging me.

Algebra

Hi, guys, this started out as a videogame conundrum before turning into a maths problem that it annoys me I can't solve:

If a team consists of nine players, who may choose between nine classes, but no team may have more than two of the same class, how many different compositions are there?

I did some research and found a formula that I tried - n!/(r!(n−r)!) - but the number was way too high because it was treating choosing one or the other one as two separate possibilities like that old joke.

Is there a way to calculate this besides starting with AABBCCD and working my through a list? It's really bugging me.

Thanks, guys,

Posted Dec 1, 2025, 6:01 PM UTC

315
Loading comments…