So this is my problem, I have n nodes (can be called points without positions), and I have a list of lines, were a line is defined by connecting 2 nodes (points).
My problem is to find the right position for each node (point) to minimize the amount of intersections between the lines.
I have no clue how to even start solving this problem. If someone can give me a way or explain some kind of an algorithm that can help be I will be glad, I am not seeking for Code.
For illustration:
If we have 4 nodes [1,2,3,4] and 4 lines {[1,2],[2,3],[3,4],[4,1]}
The minimum amount of intersections can be 0 if we order the points like this:
But there is a way that we can have 1 intersection like this:
My problem is finding the positions for the minimum amount of interactions when the inputs are much more complex.