1

I was wondering if measuring the "edge" distance $d_e$ between two points like this had a formal name, and if it could be calculated directly? In both examples you are not allowed to cross diagonally into a cell, only traverse the edge of each cell.

For example, in the graph below $d_e=12$:

enter image description here

Here is another example where $d_e=6$ units:

enter image description here

In both cases there are multiple paths that can be taken to each point where $d_e$ is minimized (or so I think), but I'm not worried about the total possible number of paths yet, just the smallest value of $d_e$.

Bob Shannon
  • 1,561

1 Answers1

3

This is often called the Manhattan distance between two points, because cars in Manhattan can only drive on vertical and horizontal roads. The Manhattan distance between $(x_1,y_1)$ and $(x_2,y_2)$ is $|x_1-x_2|+|y_1-y_2|$.

Mike Earnest
  • 75,930