# Thread: distribution (combinations) problem ...

1. ## distribution (combinations) problem ...

Hello,

I have a small problem/puzzle to solve which goes as follows:
(I have already calculated it, however I am not sure I followed the right reasoning as mathematics is not my strong point and after building a Java app to brute force it, it crashed on out-of-memory error):

------------------------------

We have ten bikes (b1, b2, …, b10) that need to be sold at 3 shops
houses (s1, s2, s3). Each shop can sell at most 5 bikes.

How many solutions are possible? You may solve this using
mathematics, or brute force with a spreadsheet, or small program.

This is a problem in combinations where the order of selection does not matter.
Selecting r things from n: nCr = n! / (r! (n-r)!)

--------------------------------

According to my math calc's there's 10! permutations of bikes (http://www.wtamu.edu/academic/anns/m...tut56_perm.htm), but I am not entirely sure where to take it after that ...

Any advice would be much appreciated !

hg

2. ## Re: distribution (combinations) problem ...

Originally Posted by holyGrill
We have ten bikes (b1, b2, …, b10) that need to be sold at 3 shops
houses (s1, s2, s3). Each shop can sell at most 5 bikes.
How many solutions are possible?
There are several ambiguities here.
Are the bikes all different? Or are they identical?
Can there be a store which gets no bike at all?