Bottleneck distance
The bottleneck distance is a metric on barcode diagrams. The bars in one barcode are matched against the bars in the other. The distance between barcodes is the worst discrepancy between bars in the optimal matching.

Suppose we are given two barcode diagrams. These are two finite collections of intervals:
Now define the -distance between two intervals by:
Also, define:
This is the -distance to the nearest point-interval .
Now, suppose we are given subsets and along with a choice of bijection . Define the penalty of to be:
Bottleneck distance
The bottleneck distance from to is:

Bars far from the diagonal are matched to the closest bars (using the -norm whose unit balls are squares). Bars near the diagonal can be matched to the closest diagonal point. The distance to the closest point on the diagonal is .


Stability Theorem: Bottleneck Distance
Let and be two finite metric spaces. Fix . Let be the barcode diagram for and let be the barcode diagram for . Then:
This theorem is a kind of “stability” result regarding barcode diagrams, since it says that when two data sets and are close together (measured using the ideal, if not computable, metric ), then the barcode diagrams are also close together. Barcode diagrams cannot jump apart without the data sets jumping apart.
For example, if is a “noisy” version of , then we expect to be small, and therefore the barcode diagrams should be close. Conversely, if barcode diagrams are far, the data sets differ by “more than noise.”
Wasserstein metrics
The Wasserstein metrics generalize the bottleneck metric. Instead of taking the worst discrepancy between two bars in the best matching, it uses a -sum of the discrepancies of all bars in the best matching.
First define the -penalty for a partial matching as follows:
Then we minimize the penalty (find the best matching):
Remark
We can recast the -penalty in a more uniform symbolism by supplementing or with empty bars so that each has the same number of “bars,” and recalling the convention that . Then we have: