Operations research · Systems thinking

How fungible are the sites in a network?

Published · Updated · Version 1.12

Years ago, a problem at work led me into the mathematics of comparing distributions across a network. I was surprised that I’d never seen a simple and clear way to describe this comparison. It turned out to have an elegant answer: a generalized form of the Earth Mover’s Distance (EMD). I published a math paper, but moved on from the application. I recently went back to it, and this page is the result. My aim here is to share the core ideas and show how it works.

The question is general: how uniform are the sites in a network? Think of error rates across servers, throughput across call centers, or production across manufacturing plants. How differently do they operate, and how do we measure those differences? Fungibility supports consistent quality and robustness: work can shift between sites without changing overall output. The interactive plots below illustrate the question with fictional sites producing widgets.

Production levels

Daily widget output by site · 100 illustrative days each

All sites, comparison inclusion status, daily observation count and production summaries in widgets per day
SiteDaysAverageP10P50P90

Each day has equal weight within its site. P50 is the median, the 50th-percentile value.

This table is the conventional way to compare sites. It gives precise summaries, but is sparse and takes work to interpret. The plots below show the full distributions at a glance, and differences are easier to see. At each percentile, the spread is the highest site’s output minus the lowest. The average of those differences is the generalized EMD.

Overall average spread

Average range at matching production percentiles, measured by Earth Mover’s Distance (EMD).

—widgets / day

Production at matching percentiles

100 illustrative days per site

Spread at each percentile

Dashed line = overall average (EMD)

Increasing uniformity narrows the spread and lowers EMD. Raising every site’s output equally moves the profiles upward but leaves EMD unchanged. Identical distributions give zero EMD; that establishes fungibility on this metric.

Classical EMD compares two distributions. It started with Monge in the 18th century, and gets its name from the problem of moving one pile of dirt to another place efficiently. Its discrete form is a linear program. In the ordered setting used here, a fast greedy algorithm computes the optimum. Here we compare n sites at once. This generalization has been studied, but I hadn’t seen it used to describe network uniformity.

One especially nice property is Minkowski additivity. Minkowski addition combines two sets by adding every element of one to every element of the other. Below, we pool each site’s 100-day record in the first period with every site’s 100-day record in the second: 16 pairings. The EMD across those pooled pairings is exactly the average of the two period EMDs. This gives a way to connect comparisons over time; there may be other uses.

0%: original profiles. 100%: new production patterns.

HarborSummitRiversideFairview

Period 1

100 days per site

Period 2

New production patterns · 100 days per site

Both periods pooled

All cross-period site pairings

Hover, tap, or focus a curve to identify its pair.

Average spread over time in widgets per day
Average spread (EMD)Widgets / day

EMD is a deep topic, and this page explores one narrow part of it. I believe these examples illustrate the original problem of site uniformity and how EMD can measure it. The interactive plots help build intuition for that connection. AI built the interactive elements and helped develop the examples.

Further reading

  1. J. Kline, Properties of the d-dimensional earth mover’s problem, Discrete Applied Mathematics 265 (2019), 128–141. doi:10.1016/j.dam.2019.02.042. The multi-site EMD, its properties, and Minkowski additivity.
  2. J. Kline, GEM, reference code for the 2019 paper, GitHub (2024). A single-phase greedy algorithm that solves the primal and dual problems together.
  3. J. Kline, Prefix-width rigidity and dual geometry of multi-marginal earth moving, version 0.1.0 (September 2026). doi:10.5281/zenodo.22675435. The percentile formula used here, with verification code.
  4. R. Mehta, J. Kline, V. S. Lokhande, G. Fung and V. Singh, Efficient discrete multi marginal optimal transport regularization, ICLR 2023. openreview.net/forum?id=R98ZfMt-jE. The same distance applied in machine learning, with a linear-time algorithm.
  5. Y. Rubner, C. Tomasi and L. J. Guibas, The earth mover’s distance as a metric for image retrieval, International Journal of Computer Vision 40(2) (2000), 99–121. doi:10.1023/A:1026543900054. The paper that made the name standard, for two distributions.
  6. G. Peyré and M. Cuturi, Computational optimal transport, Foundations and Trends in Machine Learning 11(5–6) (2019). arXiv:1803.00567. A general reference on optimal transport and its computation.
  7. M. Queyranne, F. Spieksma and F. Tardella, A general class of greedily solvable linear programs, Mathematics of Operations Research 23(4) (1998), 892–908. doi:10.1287/moor.23.4.892. Background on Monge costs, under which greedy matching is optimal.
  8. S. Ferson, V. Kreinovich, L. Ginzburg, D. S. Myers and K. Sentz, Constructing probability boxes and Dempster-Shafer structures, Sandia National Laboratories (2003). cs.utep.edu/vladik/2003/sandia03.pdf. Lower and upper envelopes of cumulative distributions, the same curves that bound the shaded band above, studied as probability boxes.

How to cite

Jeff Kline, “How fungible are the sites in a network?” Experimental Mathematics, September 19, 2026; revised September 23, 2026, version 1.12. jeff-kline.github.io/posts/measuring-site-fungibility/

@misc{kline2026fungibility,
    author = {Jeff Kline},
    title = {How fungible are the sites in a network?},
    howpublished = {Experimental Mathematics, \url{https://jeff-kline.github.io/posts/measuring-site-fungibility/}},
    month = sep,
    year = {2026},
    note = {Version 1.12, revised September 23, 2026}
}