# Parameterized Algorithms for Kidney Exchange

This post is based on an excellent (chalk and board!) talk that Palash Dey gave at IIT Gandhinagar today. This is his joint work with Arnab Maiti, to appear as an extended abstract at AAMAS 2022 (preprint here).

Kidney paired donation or *paired exchange* allows donors to donate their kidneys to compatible patients with the understanding that their patients receive medically compatible kidneys in turn. The central problem in this setting is the *clearing problem — *which involves matching patients to donors in such a way that a maximum number of patients receive compatible kidneys. We introduce a directed graph as a convenient abstraction for this question, where:

- each node represents a patient-donor pair, and
- we introduce a
*directed*edge if the kidney of the donor is compatible with the patient .

Observe that a cycle in this directed graph naturally represents a sequence of feasible exchanges within the cycle. For example, imagine that we have a three-cycle with the edges:

Then we have the following compatible donations:

- is assigned the kidney of donor
- is assigned the kidney of donor
- is assigned the kidney of donor

This accounts for all the patients and donors involved in this cycle and motivates the following question:

Given a directed graph, what is the largest number of vertices that can be covered by a disjoint union of cycles?

While a positive answer to this question will “resolve” all the needs in the system, consider that exchanges along a cycle of length involve simultaneous operations to mitigate the risks involved with donors potentially backing out of the exchange agreements.

This motivates the following refinement of the previously posed question:

Given a directed graph, what is the largest number of vertices that can be covered by a disjoint union of cycles, where each cycle is of length or less?

If the exchanges are restricted to swaps, that is, , the problem reduces to finding a maximum matching. However, the problem is NP-complete already when (see Theorem 1, Abraham, Blum, and Sandholm; EC 2007).

We now generalize the model a little further to account for the presence of *altruistic donors**, *who are donors without a matching patient and are willing to donate to any compatible patient. To account for the presence of such donors, we modify our graph representation as follows:

- Each node either:
- represents a patient-donor pair or
- represents an altruistic donor
- The edges are as follows:
- We have a
*directed*edge if the kidney of the donor is compatible with the patient . - We have a
*directed*edge if the kidney of the donor is compatible with the patient .

In this setting, note that we can also facilitate exchanges along *paths *as well, with the paths starting at the altruistic donors. For instance, if we have the path:

Then we have the following compatible donations:

- is assigned the kidney of donor
- is assigned the kidney of donor
- is assigned the kidney of donor
- is assigned the kidney of donor

Note that in this situation, the donor is relieved from any obligation to donate to a patient. We now update our problem statement to reflect the presence of altrustic donors and the possibility of facilitating exchanges along paths:

**Input.**A directed graph , where are source vertices; and positive integers , and .

**Output.**Yes if and only if there is a collection of cycles of length at most each and a collection of paths of length at most each such that the cycles and paths altogether covers nodes outside of .

The main claim in the context of this problem is the following:

There exists a that decides Optimal Kidney Exchange Along Short Paths and Cycles.

Here’s a high-level description of the algorithm (perhaps best approached with some prior familiarity with color coding). To begin with, notice that we may assume without loss of generality that and — intuitively, this is because if the permitted cycle and path lengths are longer than the number of patients we hope to cover, then we can simply look for cycles or paths of length directly to begin with — if we find one, then we are done, and if none exist, then we “might as well” set and/or to .

Now, if there is a solution that accounts for at least patients, there is also one that involves at most patients and in particular, also at most paths. Such a solution engages at most nodes from . Therefore, if there is a solution, then there is one that spans vertices.

As is standard for color coding, we guess the correct value of and randomly partition the vertex set into parts. The hope is that each part contains exactly one vertex from the solution (this is a so-called “colorful solution”). The probability that a random partition is a lucky one is , which turns out to be at least . This implies that repetitions ensure a constant success probability.

Given that the partition is indeed a lucky one, we can recover the solution using the following dynamic programming semantics. For and , let be **TRUE **if and only if there is a colorful solution spanning at least nodes outside in , where denotes the subset of vertices colored with colors from .

The recurrence is based on isolating one path or cycle by guessing the set of colors involved in said component and using table lookups to figure out if this can be extended to a full solution.

In particular, we have:

where

and

.

Here, we have that:

- is
**TRUE**if and only if the vertices of can be covered with a cycle of length . - is
**TRUE**if and only if the vertices of can be covered with a path of length .

The truth values of and can be determined directly using standard approaches to finding colorful paths and cycles in time that is single-exponential in .

To claim the overall running time, note that:

- The total number of entries in the table is and each entry can be computed in time
- Therefore, the algorithm outputs the correct decision in time with probability at least ,
- By repeating times, we find the correct decision with constant success probability.
- The overall running time is .

As Palash mentioned in his talk, the preprint has more, and here are some highlights of the other results that were established:

- Optimal Kidney Exchange Along Short Paths and Cycles is FPT also when parameterized by the treewidth of the underlying graph maximum length of path maximum length of cycle allowed and the number of vertex types* when .
- A Monadic second-order formula for the problem is also presented, where the length of the formula is upper bounded by a function of
- The problem admits a polynomial kernel with respect to the number of patients receiving kidneys maximum degree when is a constant.
- On the other hand, the problem does
*not*admit any polynomial kernel parameterized by the number of patients receiving kidneys maximum degree (under standard assumptions). - A -approximation algorithm is presented for the case when only cycles of length at most 3 are allowed and no paths are allowed.

* Dickerson, Manlove, Plaut, Sandholm, and Trimble. (EC 2016) introduced the notion of “vertex type" and showed its usefulness as a graph parameter in real-world kidney exchange instances. Two vertices is said to have the same vertex type if their neighbourhoods are the same.

Some discussion that came up during the talk:

- The so-called dual parameter , which in this case corresponds to the number of patients who were “left out”, is perhaps a natural parameter to study as well.
- The notion of a patient without a matching donor seems complementary notion of altrusitic donors. Such patients would be the last vertices on paths kickstarted by altruistic donors. However, this notion likely does not manifest in practice.

If you’d like to dig deeper, be sure to check out the preprint! A few additional pointers:

- This work closely builds on the works of Xiao and Wang (IJCAI, 2018), who proposed an exact algorithm with running time where is the number of vertices in the underlying graph. They also show an FPT algorithm parameterized by the number of vertex types if we do not have any restriction on the length of cycles and chains.
- Lin, Wang, Feng, and Fu (Algorithms, 2019) studied the version of the kidney exchange problem which allows only cycles and developed a randomized parameterized algorithm with respect to the parameter being (number of patients receiving a kidney, maximum allowed length of any cycle).
- Alvin E. Roth was awarded the Nobel Prize in Economic Sciences 2012 (along with Lloyd S. Shapley) in part for his pioneering contributions to the theory and practice of kidney exchange — his biographical account indicates that he had started anticipating the problem even before it emerged as a legal practice. His talk at Simons Institute surveys “fifteen years of history” in the kidney exchange problem, with an emphasis on the game-theoretic aspects. (h/t: Rohit’s blog on this topic.)

`super-embed:<div id="hyvor-talk-view"></div><script async defer type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>`