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?
In reply to Pideonholes revisited. by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |