Many konkur counting problems ask: in how many ways can we hand out distinct objects to distinct recipients so that no recipient gets an object it is forbidden? Each recipient gets at most one object and each object is used at most once — so we are counting injective assignments (also called systems of distinct representatives) subject to a forbidden-pairs table. The clean tool is the multiplication principle applied in the right order: fill the most-restricted slot first, then the next, accounting for objects already used.
The set-up
We assign one distinct object to each of the slots from a pool, where slot has an allowed set of size (the pool minus its forbidden objects). We want the number of injective maps with and pairwise distinct.
The key idea: order the slots, then multiply
Process the slots from fewest allowed choices to most. When you reach a slot, its live count is its allowed size minus however many of those allowed objects were already consumed by earlier slots, so:
where is the order you chose. Starting with the tightest slot keeps the bookkeeping of "already-used" objects as small and as predictable as possible. Unrestricted slots (allowed set whole pool of size ) are always handled last: by then objects are gone, so such a slot contributes exactly — no case analysis needed.
When restricted slots overlap: split into cases
If two restricted slots share forbidden/allowed objects, "already-used" depends on which object the earlier slot took. The standard fix: case-split on the tight slots only (e.g. did the most-restricted slot take an object that the next restricted slot also wanted?), compute each case by the product rule, then add the cases. The unrestricted slots are multiplied in afterward as plain falling factors .
How to apply (recipe)
- Build the allowed-set table: for each slot list its forbidden objects and the size of what remains.
- Sort slots by ascending ; the unrestricted ones go to the very end.
- Place objects slot-by-slot, multiplying the live counts; case-split only where restricted allowed-sets interact.
- Add the cases; the unrestricted tail contributes a falling-factorial .
- If the recipients themselves are chosen from a larger set (e.g. pick of children), multiply by the relevant selection count or sum over the selections.
Mini-example
Give distinct prizes from to three slots , one each, where may not get prize and may not get prize ; is unrestricted. Allowed sizes: (), (), .
Place the tight slots first. has choices from . must avoid and avoid 's prize; since already took an allowed (non-) prize, has choices. Now objects are used, so unrestricted has choices:
(Cross-check by inclusion–exclusion on avoiding : total injective ; subtract those with () and (): . Both agree.)
Exam trick: always fill the most-constrained slot first and push unrestricted slots to the end, where they collapse to a falling factorial . If you start with an unrestricted slot you create needless cases; if you forget that distinct objects shrink later slots' counts, you over-count by treating the assignment as if repeats were allowed.