I have $5$ identical apples, $8$ identical oranges and $13$ identical bananas. How many different nonempty baskets can I make consisting of
a) $5$ fruits?
b) $7$ fruits?
My solution : First of all , I thought that this can be solved by combination with repetition but , i then relaized it cant be ,so i tried to use generating functions , i found that
$a=21$ ,$b=33$ .Is my solution correct ? Do you have any other suggestion to solve this?
Note: For part $a$ , the result of generating fuction and combination with repetition are not same , why did it occur ?
$21$ and $33$ are correct.
One way of seeing $21$ is correct for $5$ fruit is a stars and bars calculation of ${5+3-1 \choose 3-1}$
For $7$ fruit the stars and bars calculation would be ${7+3-1 \choose 3-1}=36$, but this overcounts as there are not enough apples: in particular we cannot have (i) $6$ apples and $1$ orange, or (ii) $6$ apples and $1$ banana, or (iii) $7$ apples. So the answer is $36-3=33$