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.

Google
Statistics & Math
Software Engineer
Google
November 29, 2026
Software Engineer
Phone Screen
Statistics & Math
Medium

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
stars and bars
inclusion-exclusion
integer compositions
combinatorics
capacity allocation
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 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 Questions
Sample Answer
Clarify

Slices are identical and teams are distinct, so an allocation is a tuple (x1,…,x4)(x_1, \dots, x_4) of non-negative integers summing to 20. Zero is allowed in the base case....

Approach

Stars and bars: kk distinct bins and tt identical items give (t+k−1k−1)\binom{t + k - 1}{k - 1}. For a minimum mm, give each team mm first and distribute the remaining t−kmt - km. For a cap, subtract alloca...


Submit Your Answer
Markdown supported