More formally, there are N+K-1 choose K-1 ways to allocate N people to
K cities (using the usual 'stars and bars' argument). But for each
way of allocating people to cities, there are a different number of
ways of allocating people to stores, in each city. For example, if
there are 4 people and 3 cities, then one allocation is:
zero people at the first city, zero people at the second city and four
people at the third city.
Within this allocation, there are 5 ways people could be at two
stores: 0 people at store A and 4 at store B; 1 person at store A and
3 at store B; ....
For the case of N=4 people, K=3 cities and two stores at each city, I
think there are 126 different ways of allocating people to
cityXstores. But is there a general formula?
Even more generally, if there were S stores at each of K cities, how
many ways are there allocate N people to cityXstores?
Any points would be most appreciated.
Thanks!!
With K=3, N=4 and S=2, you get 126, the same number as yours.
But I may not have understood correctly your problem...
--
Olivier
Doh! oh yes, you are quite right! Thanks! Sorry for the bother.
Scott