Say we have $3n$ balls of 3 types: 1,...,n big balls 1,...,n medium sized balls 1,...,n small balls
I'd like to arrange them in triples so that every triple contains one of each type, but in each triple, the three balls mustn't have the same index. [Edit] The order of the triples is irrelevant [\Edit]. E.g. if we decide that the first coordinate is "big balls" and the last is "small ball" than the triple (i,i,i) is forbidden.
My approach is to use inclusion–exclusion principle. Let $p_i$ - Big ball number i is in the same triple with small ball number i and medium balls number i.
Then we get:
$w(p_i)=[(n-r)!]^2\leftarrow$arranging the rest of the balls in triples
$w(1)=n\cdot[(n-r)!]^2\leftarrow$by symmetry
$w(r)={n\choose r}\cdot[(n-r)!]^2\leftarrow$by symmetry
We find $E[0]$ which says that non of the $p_i$ happens:
$E[0]=\sum_{i=1}^{n}(-1)^r\cdot w(r)=\sum_{i=1}^{n}(-1)^r\cdot {n\choose r}\cdot[(n-r)!]^2$
Is this correct?