Introduction

Three friends pool their skills and launch a small venture. On their own, Ana might earn $100, Beto $0, and Carla $0 — but together the three of them clear $1,000. The team is worth far more than the sum of its solo parts. Now comes the awkward dinner: how do they split the $1,000?

Equal thirds feels easy, but is it fair? Maybe Ana's reputation opens the door, Beto's coding builds the product, and Carla's contacts close the sales — and none of those matters without the others. Splitting by ego leads to a fight; splitting by gut leads to resentment.

In 1953 the mathematician Lloyd Shapley gave a precise answer. He asked a deceptively simple question: how much does each person add, on average, to whatever group they join? That single idea turns out to be the only way to divide the reward that satisfies a short list of fairness rules — and it earned Shapley the 2012 Nobel Prize in Economics.

Split the Reward

Below, three players form a team. Set how much each possible coalition is worth — the value of the empty group, of each single player, of each pair, and of all three together. Then the calculator does what Shapley proposed: it imagines the players arriving in every possible order and, each time, credits a player with exactly the extra value they bring when they walk in.

<p class="hint">{{hint}}</p>
<div class="grid">
  <label>v(A) <input id="vA" type="number" value="100"></label>
  <label>v(B) <input id="vB" type="number" value="0"></label>
  <label>v(C) <input id="vC" type="number" value="0"></label>
  <label>v(A,B) <input id="vAB" type="number" value="400"></label>
  <label>v(A,C) <input id="vAC" type="number" value="300"></label>
  <label>v(B,C) <input id="vBC" type="number" value="200"></label>
  <label class="wide">v(A,B,C) <input id="vABC" type="number" value="1000"></label>
</div>
<div class="btns">
  <button id="run" type="button">{{btn_compute}}</button>
  <button id="equal" type="button" class="ghost">{{btn_null}}</button>
  <button id="reset" type="button" class="ghost">{{btn_reset}}</button>
</div>
<div id="orders" class="orders"></div>
<div id="result" class="result"></div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .8rem; line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem .7rem; margin-bottom: .8rem; }
label { font: 600 13px ui-monospace, monospace; color: #1d3557; display: flex; flex-direction: column; gap: .2rem; }
label.wide { grid-column: 1 / -1; }
input { font: 600 14px ui-monospace, monospace; padding: .35rem .5rem; border: 1px solid #cdd9e3;
        border-radius: 7px; background: #f4f7fa; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
.orders { font: 12px ui-monospace, monospace; color: #333; background: #f4f7fa;
          border: 1px solid #e0e8ef; border-radius: 8px; padding: .5rem .7rem; margin-bottom: .7rem;
          white-space: pre; overflow-x: auto; min-height: 1.2em; }
.result { display: flex; gap: .5rem; flex-wrap: wrap; }
.share { flex: 1; min-width: 90px; text-align: center; padding: .6rem; border-radius: 10px;
         background: #e8eef3; border: 1px solid #cdd9e3; }
.share .who { font: 700 14px system-ui; color: #1d3557; }
.share .amt { font: 800 22px ui-monospace, monospace; color: #0a7d33; margin-top: .2rem; }
.sum { width: 100%; font-size: .9rem; font-weight: 600; margin-top: .4rem; }
.sum.ok { color: #0a7d33; } .sum.bad { color: #c92f3c; }
// Code not found

Average that marginal contribution over all six arrival orders and you get each player's fair share. Notice two things: the shares always add up to exactly the total the full team is worth (nothing is lost or invented), and a player who never changes any coalition's value gets zero. That is fairness made mechanical — and it is the only split that obeys those rules at once.

The Real Complexity

The Shapley value is not an open problem — it is solved. Shapley proved in 1953 that exactly one allocation satisfies four natural axioms: efficiency (the shares sum to the total), symmetry (interchangeable players get equal shares), the null-player rule (a player who adds nothing gets nothing), and additivity (combining two games adds their values). His formula is the unique answer.

So why isn't it trivial? Because the definition averages a player's marginal contribution over every ordering of the players:

  • With 3 players there are 3! = 6 orders — instant.
  • With 10 players there are 3,628,800 orders.
  • With n players there are n! orders — and the value depends on the worth of all 2n2^{n} coalitions.

For a generic game, computing the exact Shapley value is #P-hard (Deng & Papadimitriou, 1994) — it sits in the same counting-hard world as counting solutions. In practice people sample random orderings to estimate it, trading a guaranteed exact answer for a fast, very accurate one. The fairness is settled; the arithmetic is where the effort goes.

Where It Matters

"Divide a shared reward by how much each part contributed" describes an enormous range of real decisions, and the Shapley value is the principled answer:

  • Explainable AI (SHAP): which input features pushed a model's prediction up or down? SHAP treats features as players and reports each one's Shapley value — today one of the most used tools in machine learning.
  • Cost and credit sharing: how should several airlines split the cost of a shared runway, or how should marketing channels share credit for a sale? Shapley gives a defensible split.
  • Power and voting: variants like the Shapley–Shubik index measure how much real power each member of a coalition or parliament holds.
  • Networks and data: pricing bandwidth, valuing training data, and rewarding contributors all reuse the same marginal-contribution idea.

It pairs naturally with other game-theory landmarks like the Nash equilibrium and the impossibility results behind Arrow's theorem — together they map out what fair, stable outcomes can even exist.

Conclusion

The Shapley value answers an old, human question with mathematical precision: when a group is worth more than its members alone, what does each member truly deserve? The answer is to ask how much you add, averaged over every order in which the team could have come together — and remarkably, that is the only split that is efficient, symmetric, and rewards exactly what you contribute.

The idea is settled and the formula is clean; the only hard part is the counting, which explodes as the team grows. So the next time a group splits a prize — or an AI explains a decision feature by feature — remember the quiet Nobel-winning rule underneath: fairness is what is left when you average over every way the story could have unfolded. For the bigger map of fair outcomes, see P vs NP and the limits of fast computation.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/shapley-value/Content licensed under CC BY-NC 4.0.