recall the bottleneck distance is defined as the minimum of max_x |x-f(x)| over all bijections f between points in persistence diagram A and persistence diagram B.
Recall we include all diagonal points on the diagram.
For any given point x= (i,j) in A, we must compute the distance from x to the diagonal. This distance is (see Javaplex's bottleneck distance computation) defined as 0.5*|j-i| where (i,j) is the point in the diagram.
What is the reason for the 0.5? Shouldn't the distance simply be |j-i| from (i,i) to (i,j) or (j,j) to (i,j)?
the closest point from $(x_0,y_0)$ to the line $y=x$ is $(z,z)= ((x_0+y_0)/2, (x_0+y_0)/2)$ by some linear algebra. (use the fact that the closest distance from $(x_0,y_0)$ is achieved by traveling along the perpendicular to y=x).
The $L^{\infty}$ distance from $(x_0,y_0)$ to $(z,z)$ is $|x_0-y_0|/2$