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
Statistics & Math
Data Scientist
Meta
November 29, 2026
Data Scientist
Phone Screen
Statistics & Math
Easy

0

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
Stars and bars
Integer compositions
Inclusion-exclusion
Counting allocations
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. 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 Questions
Sample Answer
Clarify

Slots are identical, advertisers are distinct, so an allocation is a tuple (x1,…,x4)(x_1,\dots,x_4) 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 x1+⋯+xk=nx_1+\dots+x_k=n is (n+k−1k−1)\binom{n+k-1}{k-1}. Lower bounds are handled by substitution; upper bounds by inclusion-exclusion over the advertisers tha...


Submit Your Answer
Markdown supported