Search

Search papers and lessons

Max-Min Fairness

Level 3 · 12 min read

Max-min fairness shares a limited resource so that the poorest user gets as much as possible, and no user can gain without taking from someone who already has less.

On this page

  • Colour = topic mix
  • Calculus
  • Discrete math
  • Linear algebra
  • Communications
  • Optimization
  • Sign in to see your progress

TL;DR

Several users share one limited resource, such as the capacity of a radio channel or a network link (its capacity is measured in bits per second, for example Mbit/s, megabits per second). Max-min fairness hands out the resource so that the user who has the least gets as much as possible. No user can receive more without taking from someone who already has less or the same.

The rule is computed by "water filling": give everyone an equal share, cap anyone whose need is smaller than that share, and split the leftover among the rest.

Where you'll see it: in how a network link divides bandwidth among flows, in how a base station divides power or time among phones, and as the fairness target in many resource-allocation papers.

This lesson is not about: what is fair in a moral sense. It defines one precise, mathematical kind of fairness.

Intuition

Pouring water into containers

Imagine a tank of water that must be poured into several containers, each with a different maximum height. Pour evenly into all containers at once. A small container fills up and stops taking water; you then keep pouring into the others, still evenly. The water level rises until either the tank is empty or every container is full.

The result is the max-min allocation. The small containers are filled to their limit, and the large ones share what remains equally. Nobody with a small container could be given more without taking water from someone already at a lower level.

Why it exists

Suppose a 10 Mbit/s link is shared by three video calls (each call is a "flow": a steady stream of data between two endpoints). One call needs only 2 Mbit/s, the other two could use 8 each. The naive "split equally" gives each about 3.3 Mbit/s. But the first call is then given more than it needs, and the spare capacity is wasted. The fair answer is 2 for the first call, and the other two split the remaining 8 between them.

Max-min fairness is the rule that does this automatically: it never wastes capacity a user can use, and it never lets a user with a small need be squeezed.

flowchart TD
  A["Start: all users get an equal share of the link"] --> B{"Does any user need less than the share?"}
  B -- Yes --> C["Give that user exactly what it needs and remove it"]
  C --> D["Split the leftover capacity equally among the rest"]
  D --> B
  B -- No --> E["Every remaining user gets the equal share. Done"]

The math

Let there be nn users. User ii wants at most di≥0d_i \geq 0 (its demand). Let CC be the total capacity of one shared resource. An allocation is a vector x=(x1,…,xn)\mathbf{x} = (x_1, \dots, x_n) where xix_i is what user ii receives.

An allocation is feasible when 0≤xi≤di0 \leq x_i \leq d_i for every user and ∑ixi≤C\sum_i x_i \leq C.

Definition: Max-min fair allocation

A feasible allocation x\mathbf{x} is max-min fair if you cannot increase any xix_i without decreasing some xjx_j that is already less than or equal to xix_i. Equivalently, the smallest allocation is as large as possible, then the second smallest is as large as possible given that, and so on.

For one shared link with demands did_i, the max-min fair allocation has a simple form. There is a single number θ\theta, called the water level, such that

xi=min⁡(di, θ)for every user i,x_i = \min(d_i,\ \theta) \qquad \text{for every user } i,

where θ\theta is chosen so that the total is exactly the capacity (or θ\theta is the largest demand, if everyone is satisfied):

∑i=1nmin⁡(di, θ)=C.\sum_{i=1}^{n} \min(d_i,\ \theta) = C.

The left side is a non-decreasing function of θ\theta, so θ\theta can be found by increasing it until the sum reaches CC. Users with di<θd_i \lt \theta are fully satisfied. Users with di>θd_i \gt \theta all receive exactly θ\theta.

Why the formula gives max-min fairness

Take any user ii and try to raise xix_i above min⁡(di,θ)\min(d_i, \theta). If xi=dix_i = d_i, the user already has all it wants, so there is nothing to raise. Otherwise xi=θ<dix_i = \theta \lt d_i, and every unit you add must come from another user. All the capacity is in use, and every user's rate is either θ\theta or its own smaller demand, so any user you take from has a rate at most θ=xi\theta = x_i. That is exactly what the definition forbids: raising xix_i would lower some xjx_j with xj≤xix_j \le x_i. So no improvement is possible in the max-min sense.

Worked examples

Example
Example 1: tiny, three users, capacity 6

Demands are d=(1,2,5)d = (1, 2, 5) and capacity C=6C = 6.

  1. Try θ=2\theta = 2. The sum is min⁡(1,2)+min⁡(2,2)+min⁡(5,2)=1+2+2=5\min(1,2) + \min(2,2) + \min(5,2) = 1 + 2 + 2 = 5. This is below 6, so the water level must rise.
  2. Try θ=3\theta = 3. The sum is 1+2+3=61 + 2 + 3 = 6. This equals the capacity, so θ=3\theta = 3.
  3. The allocation is x=(1,2,3)x = (1, 2, 3).

Interpretation: the user who wanted 1 gets all of it. The user who wanted 2 gets all of it. The user with the largest need gets the leftover 3. No user can be raised without lowering one with a smaller share.

Example
Example 2: the textbook case, capacity 10

Demands are d=(2,3,8)d = (2, 3, 8) and capacity C=10C = 10. An equal split would give 10/3≈3.3310/3 \approx 3.33 each. That is too much for user 1.

  1. Try θ=3\theta = 3. The sum is min⁡(2,3)+min⁡(3,3)+min⁡(8,3)=2+3+3=8\min(2,3) + \min(3,3) + \min(8,3) = 2 + 3 + 3 = 8. Below 10, so raise the level.
  2. Try θ=5\theta = 5. The sum is 2+3+5=102 + 3 + 5 = 10. This equals the capacity, so θ=5\theta = 5.
  3. The allocation is x=(2,3,5)x = (2, 3, 5).

Interpretation: user 1 is satisfied at 2, user 2 is satisfied at 3, and user 3 absorbs all the leftover, receiving 5. The total is exactly 10, so no capacity is wasted.

Example
Example 3: realistic, a path through two links

In a network, a flow may cross several links. Take three flows on two links, each with capacity 10 and 4 respectively:

  • Flow AA uses both link 1 and link 2.
  • Flow BB uses only link 1.
  • Flow CC uses only link 2.

The constraints are A+B≤10A + B \leq 10 (link 1) and A+C≤4A + C \leq 4 (link 2).

  1. Raise AA, BB and CC together, all to the same rate tt. Link 2 limits this first: A+C=2t≤4A + C = 2t \leq 4 gives t≤2t \leq 2.
  2. At t=2t = 2, link 2 is full. Flows AA and CC both use link 2, so they are frozen at A=2A = 2 and C=2C = 2.
  3. Flow BB is the only one still growing. It is limited by link 1: A+B=2+B≤10A + B = 2 + B \leq 10, so B=8B = 8.
  4. The allocation is (A,B,C)=(2,8,2)(A, B, C) = (2, 8, 2).

Interpretation: flow BB does not share link 2, so it gets the leftover of link 1 that the others cannot use. Flows AA and CC are equally limited by the tighter link 2. This is how a bottleneck link determines the rates of all the flows that cross it.

Tradeoffs and failure modes

Max-min fairness is strict about the worst-off user, which is its strength and its weakness.

SituationWhat goes wrongBetter choice
Users value capacity very differentlyThe rule looks only at rates, not at how much each user benefits from extra capacityWeighted max-min, or a utility-based rule
You want to maximise total throughputMax-min can waste potential throughput when users have very different bottlenecksMaximise the sum of rates, subject to the constraints
Users have different priorities or pricesEqual treatment ignores that some users pay moreWeighted fair share, or [[utility-function
Many link constraints, large networkComputing the allocation by hand is slowIterative algorithms that raise rates and freeze bottlenecks, which are a form of Constrained Optimization

A common practical trap is confusing max-min fairness with equal shares. Equal shares ignore demand; max-min fairness does not. A second trap is forgetting that a flow crossing several links is limited by the tightest one, as in Example 3.

Max-min fairness can be built from a sequence of linear programs: first maximise the smallest rate, freeze the users who are stuck at that rate, then maximise the smallest rate among the rest, and repeat. This is one way to see the rule as an optimisation problem. For the single-link case above, the water-level solution is the only allocation that satisfies the definition.

History

The idea of comparing allocations by their worst-off member goes back to John Rawls's A Theory of Justice (1971), a work of political philosophy that argues for a "maximin" principle: judge arrangements by how they treat the worst-off member. Its use for sharing computing and communication resources came later. The water-filling picture is a related idea from engineering: the same pouring image is used for allocating transmit power across frequency channels, though that problem has a different formula.

In data networking, max-min fairness became a standard reference point for how flows share bottleneck links, a link that is the tightest limit on a flow's rate, as packet networks grew and the question of what "fair" meant for competing traffic became practical. Later work considered proportional fairness and weighted variants, which trade some worst-case protection for higher total throughput.

Recap

  • Max-min fairness gives the poorest user as much as possible, and never wastes capacity a user can use.
  • For one resource, the allocation is min⁡(di,θ)\min(d_i, \theta) with the water level θ\theta set so the total equals the capacity.
  • Across several links, rates are raised together until a link fills, then the flows on that link are frozen, and the process repeats.

This idea feeds into resource allocation in wireless systems, where it is used as a fairness target, for example in cell-free MIMO designs where many users share the same access points.

Check yourself

QuestionRecall: what does the max-min fair allocation do with a user whose demand is smaller than the water level?Show answer

It gives that user exactly its demand. The formula min⁡(di,θ)\min(d_i, \theta) caps the user at did_i when di<θd_i \lt \theta, and the user is fully satisfied. The leftover is shared by the users still below their demand.

QuestionComputation: capacity 9, demands (1, 4, 6). Find the max-min fair allocation.Show answer

Try θ=3\theta = 3: min⁡(1,3)+min⁡(4,3)+min⁡(6,3)=1+3+3=7\min(1,3) + \min(4,3) + \min(6,3) = 1 + 3 + 3 = 7. Below 9. Try θ=4\theta = 4: 1+4+4=91 + 4 + 4 = 9. So θ=4\theta = 4 and the allocation is (1,4,4)(1, 4, 4). User 1 is satisfied at 1, user 2 is satisfied at 4, and user 3 receives the leftover 4.

QuestionWhy: explain why an equal split of capacity is not max-min fair when one user needs less than its equal share.Show answer

An equal split gives the small-demand user more than it needs. The surplus is wasted, because that user cannot use it, while larger users could have used it. Max-min fairness caps the small user at its demand and gives the surplus to the others. Only then is no user's share improvable without lowering a poorer one.

QuestionApplied: three flows share a link of capacity 12. Flow A needs 2, flow B needs 5, and flow C needs no limit. What does each flow get?Show answer

Try θ=4\theta = 4: min⁡(2,4)+min⁡(5,4)+min⁡(∞,4)=2+4+4=10\min(2,4) + \min(5,4) + \min(\infty,4) = 2 + 4 + 4 = 10, below 12. Try θ=5\theta = 5: 2+5+5=122 + 5 + 5 = 12. So θ=5\theta = 5. Flow A gets 2, flow B gets 5, and flow C gets 5. Flow C has no cap, so it is held only by the water level and receives θ=5\theta = 5, the same as B.

Sources