Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2022/discrete-mathematics-continuous-mathematics-and-probability-resit/1/c/solution

An allocation is a tuple of nonnegative integers with , where is the number in labelled box . Empty boxes are allowed. Encode the allocation by stars and bars: put stars before the first bar, between the first two bars, and so on. Adjacent bars represent an empty intermediate box; a bar at an end represents an empty end box.
Reading the group sizes recovers exactly one allocation from every such string, so this is a bijection. There are positions and we choose the bar positions. Hence stars and bars gives
No extra factor for ordering the objects is present, because the objects are indistinguishable. For the string has no bars and gives the single allocation of all objects to that box; for all boxes are empty, also a single allocation.

New to topics? Read the docs here!