0

I have a chart with a variable amount of dots. All dots are connected to one or more other dots via a line. The x values of these dots are fixed, but the y-values may vary.

How do I get the optimal configuration of y-values for these dots?

A simple example with four dots and three lines. The bottom configuration is not optimal since one or more lines are overlapping. The top configuration is optimal, since no lines are overlapping.

enter image description here

A more complex example (not optimized):

enter image description here

1 Answers1

0

there isn't any guarantee that there exists an optimal layout for any set of dots and lines. For instance, imagine dots and lines which imply a configuration like a regular lattice with no overlap

example regular simply connected square lattice

and now imagine that an additional connection exists between any two dots chosen at random-- the overwhelming likelihood is that this extra line will force an overlap with other lines on the lattice and there is no way to reorganize the lattice to prevent it.