1

I want to project an undirected graph into the 2d plane such that:

  1. the euclidean distance preserves the stepwise distance (i.e. if the shortest path between A and B is shorter than the shortest path between C and D, then the euclidean distance between A and B is less than the euclidean distance between A and B)

  2. the minimum difference between the euclidean distance and the stepwise distance is minimized. Ideally the set of solutions is generated or described if there is not a unique minimum.

If this is not possible, what are the most minimal sets of constraints on the graph that make it possible? I'm interested in the question in general, although at the moment I want it for a finite lattice with its minimum removed.

Adam Golding
  • 248
  • 2
  • 7

2 Answers2

0

I think the first requirement is impossible, at least for the general case. Consider a fully-connected graph consisting of four nodes, with all path-lengths equal. It's not possible to choose four points in 2D Euclidean space that exhibits the same property (other than 4 coincident points).

See Diego's answer for some useful information (my knowledge of graph theory is very limited!).

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680
  • Hmm, well they *could* be in the same place, but I do indeed prefer that the nodes do not collide--thankfully the case you describe doesn't occur with a lattice. – Adam Golding Mar 25 '12 at 18:12
0

It's called graph embeddng. There's even a theorem that gives an upper limit to the distortion. The embedding algorithm that I like the most is SDE. It's fairly easy to implement on any language if you have a SDP library.

Here's an algorithm that's a bit simpler.

Diego
  • 18,035
  • 5
  • 62
  • 66
  • All very helpful pointers (I have renamed the question) but I am having a hard time telling how any of these algorithms fare with respect to the constraints listed :-) – Adam Golding Mar 25 '12 at 18:36