1
$\begingroup$

Simplifying a business example, I have the following situation:

Some objects should be distributed in a graph in most "linear" way possible for a given "thermometer".

Say, a voyager visits some cities. Several cities are visited multiple times.

So, we have list of cities in ordinate axis (that may be duplicated), and Time in abscissas one.

Now, for a given path, say (A => X => A => B => C) we should display a line, in the "most linear way possible".

enter image description here

By eg. in the image above, the green line is optimal one
(1 > 2 > 3 > 4 > 5)

but there could be multiple possible outputs

(1 > 2 > 1 > 4 > 5)
(1 > 2 > 3 > 4 > 5)
(1 > 2 > 6 > 4 > 5)

(3 > 2 > 1 > 4 > 5)
(3 > 2 > 3 > 4 > 5)
(3 > 2 > 6 > 4 > 5)

(6 > 2 > 1 > 4 > 5)
(6 > 2 > 3 > 4 > 5)
(6 > 2 > 6 > 4 > 5)

Is there some algorithms helping in such situations?

  • 0
    is anybody aware of an algorithm to "exponentialize" data points of a linear graph?!2017-12-10

0 Answers 0