Stars and bars represents identical objects as stars and labelled boxes as gaps created by divider bars. The picture converts allocation into arrangement.
Use it to distribute identical units among labelled categories.
The relationship
The counting rule
empty allowed: C(n+k−1,k−1)
See the structure
Bars divide identical stars into labelled boxes
★★★★★││
Worked example
Check the rule with a small case
Five identical objects in 3 labelled boxes, allowing empty boxes: C(7,2) = 21.
Interpret with care
Choose the right counting model
The objects must be identical and boxes labelled. Requiring every box to be nonempty changes the formula.