Count Ad Placements in a Ten Slot Feed With No Adjacent Ads
Last updated: November 29, 2026
Quick Overview
A feed page has 10 consecutive video slots and must contain exactly 3 ads, with no two ads in adjacent slots. How many placements are possible, how many if slot 1 must be organic, and what is the chance a random 3-ad placement is valid?
TikTok
November 29, 20260
0
0 solved
A feed page has 10 consecutive video slots and must contain exactly 3 ads, with no two ads in adjacent slots. How many placements are possible, how many if slot 1 must be organic, and what is the chance a random 3-ad placement is valid?
Combinatorics questions in TikTok screens often wrap ad load rules, and this one tests the stars and bars gap argument. The interviewer looks for a clean bijection rather than brute-force enumeration, and the ability to adjust it to added constraints.
What the Interviewer Expects
- Uses the gap or compression argument to remove the adjacency constraint
- Gets C(8,3) = 56
- Adapts correctly when slot 1 is reserved
- Computes the probability against C(10,3)
- Generalizes to a minimum spacing of d slots
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 ads must be at least 3 slots apart?
- Count placements with no two adjacent ads in a circular carousel of 10.
- How many ways if there are two distinct advertisers whose ads must alternate?
- Can you verify the answer with a small recurrence?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Ads are identical for counting purposes (we count sets of slot positions). Slots are in a line, not a circle. Adjacent means consecutive slot numbers....
Approach
Compression: if ads sit in slots with , map them to . Then are any distinct values from 1 to , and the map is ...