Lets assume that we have a element, which can have value from 1 till n. (let's set it on 20 to make it easier) And we have the Set, that consists of object, which consists of three elements $\langle e_1, e_2, e_3 \rangle$.
We have also one rule regarding to objects in the set: $e_1 \geq e_2 \geq e_3$
- example of good objects: $\langle n, n, n\rangle$, $\langle n, n-1, n-1\rangle$, $\langle 20, 19, 18\rangle$, $\langle 3, 2, 1\rangle$, $\langle 3, 3, 3\rangle$, $\langle 3, 2, 2\rangle$.
- example of bad objects: $\langle n, n+1, n\rangle$, $\langle 2, 3, 2\rangle$, $\langle 3, 2, 4\rangle$.
Now the question: How to count the amount of all good objects, which pass to this Set (they don't violate the rule ) ? Can you give me any hints?
I can solve this with brute force method. But probably there is a short way.