Good day.

I am wrestling a simple network (maze-type) problem and I hope someone can assist.

Given a standard x-y framework with several nodes whose locations are known, I would like to visit each node by starting from the origin, (0,0), and returning to that same point, *A*. (see attached)

However, I am permitted only to move __horizontally__ and __vertically__ within the maze.

Given that restriction, is there a routine that allows me to visit all locations, *B, C*, *D,* and *E*, such that the rectilinear distance is a minimum?

If there is a solution to this problem, can the distance also be given and order of visits specified?

Thanks for reading!