Algorithm Search⌘K

Problemcore

Kidney exchange problem

Also called kidney paired donation problem.

Find vertex-disjoint short cycles and chains in a graph of incompatible patient-donor pairs that maximize the number of transplants. It is NP-hard once cycles of length 3 are allowed.

The kidney exchange problem asks for the largest set of transplants that a pool of incompatible patient-donor pairs can carry out by swapping donors. Each pair is a vertex of a directed graph, with an arc from pair ii to pair jj when the donor of ii can give to the patient of jj. A cycle of pairs is an exchange: each donor gives to the next patient. All operations of a cycle must take place at the same time, so clinics bound the cycle length by a small LL, usually 2 or 3. The problem is to pack vertex-disjoint cycles of length at most LL that cover as many pairs as possible. For L=2L = 2 it is a maximum matching problem, and without a bound it is an assignment problem, but for every fixed L≥3L \ge 3 it is NP-hard (Abraham, Blum and Sandholm 2007).

In plain words

A patient needs a kidney, and a relative wants to give one, but the kidney does not fit. Another pair has the same trouble. If each donor fits the other patient, the two pairs swap. With more pairs, longer loops are possible: donor A gives to patient B, donor B to patient C, and donor C to patient A. Each donor only gives if their own patient also gets a kidney, so all operations of a loop happen on the same day, and loops must stay short. The task is to choose loops that do not share a pair and that help as many patients as possible.

Definition

Input. A directed graph G=(V,A)G = (V, A) on the pairs, an integer L≥2L \ge 2, and optionally a weight wijw_{ij} for each arc (the value of the transplant from the donor of ii to the patient of jj). In the version with chains, some vertices are altruistic donors without a patient, and chains can also be bounded in length.

Output. A set of vertex-disjoint directed cycles of GG, each with at most LL arcs, with the most arcs in total (or the largest total weight). Each arc of a chosen cycle is one transplant. With altruistic donors, a solution may also use vertex-disjoint paths that start at an altruistic donor, called chains.

Variants

  • Pairwise exchange (L=2L = 2). Only swaps of two pairs. Make an undirected graph with an edge {i,j}\{i, j\} when both arcs (i,j)(i, j) and (j,i)(j, i) exist. A set of swaps is a matching of this graph, so a maximum matching solves the problem in polynomial time, also with weights (Roth, Sonmez and Unver 2005).
  • No length bound. A set of disjoint cycles covering some pairs is a cycle cover of GG with self-loops added. It is a perfect matching in the bipartite graph of donors and patients, so the assignment problem solves it in polynomial time.
  • Fixed L≥3L \ge 3. NP-hard (Abraham, Blum and Sandholm 2007), and APX-complete for short cycles (Biro, Manlove and Rizzi 2009).
  • Chains. An altruistic donor starts a chain: it gives to a patient, whose donor gives to the next patient, and so on. The last donor may give to the deceased-donor waiting list. Chains do not need simultaneous operations, so they may be longer.
  • Mechanism design. When patients have preferences and can misreport, the problem becomes one of designing an exchange rule. Top trading cycles and chains is efficient and strategyproof but does not bound cycle lengths.

Examples

A 3-cycle helps. Three pairs with arcs 1→21 \to 2, 2→32 \to 3, 3→13 \to 1 and 2→12 \to 1. With L=2L = 2 the only exchange is the swap of pairs 1 and 2, which gives 2 transplants. With L=3L = 3 the cycle 1→2→3→11 \to 2 \to 3 \to 1 gives 3 transplants.

The cycles must be disjoint. Add pairs 4 and 5 with arcs 3→43 \to 4, 4→34 \to 3, 4→54 \to 5, 5→45 \to 4. With L=3L = 3, the cycle 1,2,31, 2, 3 uses pair 3, so the best addition is the swap 4,54, 5, for 5 transplants in total. The swap 3,43, 4 would block both the 3-cycle and the swap 4,54, 5.

Known algorithms

  • L=2L = 2. Maximum matching in a general graph, or maximum weight matching for weights, in polynomial time.
  • No bound. A minimum cost perfect matching in a bipartite graph with 2n2n vertices, by the Hungarian algorithm in O(n3)O(n^3) time.
  • Fixed L≥3L \ge 3. Integer programming. The cycle formulation has one binary variable per cycle of length at most LL and one packing constraint per pair. Its LP relaxation is strong, and branch and price handles pools with thousands of pairs by generating cycles only when they improve the LP (Abraham, Blum and Sandholm 2007). The edge formulation, with one variable per arc and constraints that forbid long cycles, is smaller, but its LP relaxation is usually weaker.
  • Small instances. Enumerate all cycles of length at most LL, at most O(nL)O(n^L) of them, and solve the set packing problem over them by search.
AlgorithmTimeSpacePropertiesCode
Cycle formulation for kidney exchange2^(O(n + C)) worstO(C^2 + n (n + C)) extradeterministiciterative1 language
Top trading cycles and chainsO(n^2 + L) worstO(n) extradeterministiciterative1 language

Bounds

  • L=2L = 2 and L=∞L = \infty: polynomial time.
  • Fixed L≥3L \ge 3: NP-hard, by a reduction from 3-dimensional matching (Abraham, Blum and Sandholm 2007). Biro, Manlove and Rizzi (2009) showed APX-completeness for short cycles, so no polynomial time approximation scheme exists unless P = NP.
  • Approximation: a cycle of length at most LL is a set of at most LL pairs, so greedy and local search for LL-set packing give constant ratios that depend on LL.

Reductions

  • To set packing: the pairs are the ground set, and each cycle of length at most LL is a set of size at most LL with weight equal to its length. The kidney exchange problem is this set packing problem over the cycles of GG.
  • From 3-dimensional matching: the NP-hardness proof builds, for each triple, a gadget of pairs whose 3-cycles correspond to choosing the triple.
  • To maximum matching for L=2L = 2 and to the assignment problem for L=∞L = \infty, as above.
  • Relation to the housing market: a pair owns a kidney and wants another one, as an agent owns a house. Top trading cycles finds the core of the market, but its cycles can be long.

Applications

National and regional kidney exchange programs in the United States, the United Kingdom, the Netherlands and other countries solve this problem in each match run, with L=2L = 2 or L=3L = 3, chains started by altruistic donors, and weights for medical priority. The same model fits other barter markets in which items trade in short cycles.

References

  1. David J. Abraham, Avrim Blum and Tuomas Sandholm, Clearing algorithms for barter exchange markets, enabling nationwide kidney exchanges, Proceedings of the 8th ACM Conference on Electronic Commerce (EC 2007), 295 to 304, the NP-completeness of the clearing problem for cycle length at most L for every L at least 3, and the cycle formulation solved by branch and price
  2. Peter Biro, David F. Manlove and Romeo Rizzi, Maximum weight cycle packing in directed graphs, with application to kidney exchange programs, Discrete Mathematics, Algorithms and Applications 1(4), 499 to 517 (2009), APX-completeness for short cycles and the polynomial cases
  3. Alvin E. Roth, Tayfun Sonmez and M. Utku Unver, Pairwise kidney exchange, Journal of Economic Theory 125(2), 151 to 188 (2005), exchanges limited to two pairs, solved by maximum matching

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml