0
$\begingroup$

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$.

$\endgroup$
2
$\begingroup$

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|$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.