Ways to Split a TPU Quota Across Teams With Minimums and Caps
Last updated: November 29, 2026
Quick Overview
A Google Cloud org has 20 identical TPU slices to divide among 4 research teams. Count the allocations with no constraints, with every team getting at least 2, and with every team getting between 2 and 8.
0
0
0 solved
A Google Cloud org has 20 identical TPU slices to divide among 4 research teams. Count the allocations with no constraints, with every team getting at least 2, and with every team getting between 2 and 8.
Capacity allocation is a natural setting for stars and bars, and Google interviewers often extend the basic count with lower and upper bounds to test inclusion-exclusion. They check the shift for minimums and a correct alternating sum for caps.
What the Interviewer Expects
- Apply stars and bars for identical items into distinct bins
- Shift variables to handle minimums
- Use inclusion-exclusion for caps
- Verify with brute force
- Explain when the items or teams being distinct changes the model
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 the slices were distinguishable (different zones)?
- How many allocations give some team more than half?
- How would you sample a uniformly random valid allocation?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Slices are identical and teams are distinct, so an allocation is a tuple of non-negative integers summing to 20. Zero is allowed in the base case....
Approach
Stars and bars: distinct bins and identical items give . For a minimum , give each team first and distribute the remaining . For a cap, subtract alloca...