I know that if you line up n= r1 +r2 +...rk colored balls where r1 balls have color 1, r2 balls have color 2 etc, the number of ways you can do it is
n!/r1!r2!...rk!,
is there a simple way to calculate how many ways to line them up if
n< r1+r2+...rk ?