Er, no, your math is off.
You have (I hope) realized that the assignment expects you to consider two scenarios:
1) Rohit may choose fewer or equal marbles than there are colors: k ≤ n;
2) Rohit may choose more marbles than there are colors: k > n.
In the first case, you must choose without repetition (since Rohit wants one of each color -- his hard choice is which colors he might have to go without):
choose( n, k )
In the second case, you must think harder. You have it right that your first n marbles are not a choice (since Rohit wants one of each color). That leaves k-n marbles to be chosen from n marbles,
with repetition.
Remember that formula your professor gave you?
choose( n+k-1, k )
That's if you are choosing k items with repetition. But you aren't choosing k items, you are choosing (k-n) items. With a little mathematical substitution (replace k with k-n) it becomes:
choose( k-1, k-n )
If you like, look at it with an example:
given n=5 and k=7, the first n choices are, of course, (1,2,3,4,5). That leaves us with k-n=2 spaces to fill with n=5 different colors in any combination we wish:
1 1
1 2
1 3
1 4
1 5
2 2
2 3
2 4
2 5
3 3
3 4
3 5
4 4
4 5
5 5
15 possibilities |
The correct answer is 15.
Here are a few other examples:
n=4 n=2
k=9 k=7
1 1 1 1 1 1 1 1 1 1
1 1 1 1 2 1 1 1 1 2
1 1 1 1 3 1 1 1 2 2
1 1 1 1 4 1 1 2 2 2
1 1 1 2 2 1 2 2 2 2
1 1 1 2 3 2 2 2 2 2
1 1 1 2 4 6 possibilities
1 1 1 3 3
1 1 1 3 4 n=8
1 1 1 4 4 k=10
1 1 2 2 2 1 1
1 1 2 2 3 1 2
1 1 2 2 4 1 3
1 1 2 3 3 1 4
1 1 2 3 4 1 5
1 1 2 4 4 1 6
1 1 3 3 3 1 7
1 1 3 3 4 1 8
1 1 3 4 4 2 2
1 1 4 4 4 2 3
1 2 2 2 2 2 4
1 2 2 2 3 2 5
1 2 2 2 4 2 6
1 2 2 3 3 2 7
1 2 2 3 4 2 8
1 2 2 4 4 3 3
1 2 3 3 3 3 4
1 2 3 3 4 3 5
1 2 3 4 4 3 6
1 2 4 4 4 3 7
1 3 3 3 3 3 8
1 3 3 3 4 4 4
1 3 3 4 4 4 5
1 3 4 4 4 4 6
1 4 4 4 4 4 7
2 2 2 2 2 4 8
2 2 2 2 3 5 5
2 2 2 2 4 5 6
2 2 2 3 3 5 7
2 2 2 3 4 5 8
2 2 2 4 4 6 6
2 2 3 3 3 6 7
2 2 3 3 4 6 8
2 2 3 4 4 7 7
2 2 4 4 4 7 8
2 3 3 3 3 8 8
2 3 3 3 4 36 possibilities
2 3 3 4 4
2 3 4 4 4
2 4 4 4 4
3 3 3 3 3
3 3 3 3 4
3 3 3 4 4
3 3 4 4 4
3 4 4 4 4
4 4 4 4 4
56 possibilities |
Hope this helps.