Combinatorics problem- ordered triple

35 Views Asked by At

In how many different ways can you form ordered triples (a,b,c) where $a <b$ and $a <c$? A,b and c are numbers from 1 to 100.   

I tried it by sorting it by the value of a. If a=1 there are 99 choices for b and 99 for c so that is 99×99 and so on until a=99 and there is only one choice for b and c. So that would be a sum of squares from 1 to 99. I am wondering why this approach is wrong

I do realise that the easier way to solve it is by dividing it into two cases: when a,b and c are all inequal and when b=c so that would be (100*99*98)/(3!)*2 +(100*99)/(2!), but I don't understand what's wrong with the first approach.

1

There are 1 best solutions below

0
On BEST ANSWER

The sum that you describe with the second method is $$ \frac{100\cdot 99\cdot 98}{3}+\frac{100\cdot 99}{2}=328,350. $$

The sum of the first $n$ squares is $$ \frac{n(n+1)(2n+1)}{6}. $$ Plugging in $99$ for $n$ gives $328,350$.

Both of your answers are right.