I initially thought it would be $180^3$ possible permutations, but then quickly realized that something like $x=3, y=2, z=1$ would not be valid due to the constraints. How can I go about trying to figure out how to solve this?
Asked
Active
Viewed 41 times
1 Answers
0
Hint:
count the total number of valid ordered triplets of the form $(x, y, z)$. We need to count this:
$$ \sum_{i=1}^{n} \sum_{j=i}^{n} \sum_{k=j}^{n} 1 = S_1 + S_2 + S_3 + S_4 = S $$
case $1$: All the three values are different. We can choose $x$ out of $n$, can choose $y$ out of $n-1$ and can choose $z$ out of $n-2$. And all the three values will give $3!$ permutations out of which only one is valid. so,
$$ S_1 = \frac{n(n-1)(n-2)}{3!} $$
case $2$: All the three values are same.
$$ S_2 = n $$
case $3$: $x$ and $y$ are same.
$$ S_3 = \frac{n(n-1)}{2} $$
case $4$: $y$ and $z$ are same.
$$ S_4 = \frac{n(n-1)}{2} $$
Hence,
$$ S = {n\choose3} + n^2 $$
Nimit
- 496