BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
In Combinatorics problem. (Updated with more info.) I asked how to efficiently distribute N cards amongst M pigeon holes where each hole must contain at least one card.
I've now realised that for some variations of the problem I dealing with, I need to allow for the situation where the first or last pigeon hole, or both, can be zero.
I thought this would be a simple tweak to the answers I already received; but once again I've come unstuck for an efficient solution. Is there one?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pideonholes revisted.
by VinsWorldcom (Prior) on Dec 12, 2015 at 15:34 UTC | |
by BrowserUk (Patriarch) on Dec 12, 2015 at 16:00 UTC | |
|
Re: Pideonholes revisted.
by hdb (Monsignor) on Dec 12, 2015 at 17:08 UTC |