Dividing Ten Identical Ad Slots Among Four Advertisers
Last updated: November 29, 2026
Quick Overview
An auction simulation splits 10 identical sponsored slots in a Feed session among 4 advertisers. How many distinct allocations are there if any advertiser may get zero, if each must get at least one, and if no advertiser may get more than 4?
Meta
November 29, 20260
0
0 solved
An auction simulation splits 10 identical sponsored slots in a Feed session among 4 advertisers. How many distinct allocations are there if any advertiser may get zero, if each must get at least one, and if no advertiser may get more than 4?
Ads data scientists at Meta sometimes build simulations over allocations, and stars and bars is the standard counting tool. The interviewer looks for the right model (identical slots, distinct advertisers), the shift trick for lower bounds, and inclusion-exclusion for an upper cap.
What the Interviewer Expects
- Models allocations as nonnegative integer solutions
- Applies stars and bars to get C(13,3)
- Shifts by one for the at-least-one case to get C(9,3)
- Uses inclusion-exclusion for the cap
- Sanity checks with a tiny case
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What if slots are distinguishable positions in the Feed?
- How many allocations give one advertiser strictly more than every other?
- How would you enumerate allocations in code without generating duplicates?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Slots are identical, advertisers are distinct, so an allocation is a tuple of nonnegative integers summing to 10. If slots had distinct positions, the answer would change completely,...
Approach
Stars and bars: the number of nonnegative solutions to is . Lower bounds are handled by substitution; upper bounds by inclusion-exclusion over the advertisers tha...