Skip to main content
Clarified question
Source Link

This question is motivated by the Euclidean Traveling Salesman Problem, i.e. finding the shortest Hamiltonian path of a complete graph of N randomly placed vertices. To eliminate boundary effects I consider the problem on the unit square with periodic boundary conditions. The idea is to find a "direction" and connect points in an ordered manner along this direction to find a short path (Wheeler, J.A., On recognizing law without law, Am. J. Phys, 51(5), pp. 398, 1983).

The question is: Givengiven N points with real coordinates on the unit square, is there a neat way to find the least-square fit line y=(r*x+b) mod 1$y=rx+b \mod 1$, where r$r=p/q$ is rational? The line also needs to be as short as possible. The length of the line in the square is (if r$\sqrt{p^{2}+q^{2}}$, so minimizing the following quantity should yield a short line that passes near the points:

$\sum d_{i}^{2}+\alpha \left( p^{2}+q^{2}\right) $.

Here $d_{i}$ is irrational then the question does not make much sense"distance" (vertical or perpendicular)? of point i from the line and $\alpha$ is a positive weight.

By "neat" I mean something like the regular least-square line fit solution (http://mathworld.wolfram.com/LeastSquaresFitting.html).

This question is motivated by the Euclidean Traveling Salesman Problem, i.e. finding the shortest Hamiltonian path of a complete graph of N randomly placed vertices. To eliminate boundary effects I consider the problem on the unit square with periodic boundary conditions. The idea is to find a "direction" and connect points in an ordered manner along this direction to find a short path (Wheeler, J.A., On recognizing law without law, Am. J. Phys, 51(5), pp. 398, 1983).

The question is: Given N points on the unit square, is there a neat way to find the least-square fit line y=(r*x+b) mod 1, where r is rational (if r is irrational then the question does not make much sense)? By "neat" I mean something like the regular least-square line fit solution (http://mathworld.wolfram.com/LeastSquaresFitting.html).

This question is motivated by the Euclidean Traveling Salesman Problem, i.e. finding the shortest Hamiltonian path of a complete graph of N randomly placed vertices. To eliminate boundary effects I consider the problem on the unit square with periodic boundary conditions. The idea is to find a "direction" and connect points in an ordered manner along this direction to find a short path (Wheeler, J.A., On recognizing law without law, Am. J. Phys, 51(5), pp. 398, 1983).

The question is: given N points with real coordinates on the unit square, is there a neat way to find the least-square fit line $y=rx+b \mod 1$, where $r=p/q$ is rational? The line also needs to be as short as possible. The length of the line in the square is $\sqrt{p^{2}+q^{2}}$, so minimizing the following quantity should yield a short line that passes near the points:

$\sum d_{i}^{2}+\alpha \left( p^{2}+q^{2}\right) $.

Here $d_{i}$ is the "distance" (vertical or perpendicular) of point i from the line and $\alpha$ is a positive weight.

By "neat" I mean something like the regular least-square line fit solution (http://mathworld.wolfram.com/LeastSquaresFitting.html).

Source Link

Least-square fit of line with rational slope to points on a square with periodic boundary conditions

This question is motivated by the Euclidean Traveling Salesman Problem, i.e. finding the shortest Hamiltonian path of a complete graph of N randomly placed vertices. To eliminate boundary effects I consider the problem on the unit square with periodic boundary conditions. The idea is to find a "direction" and connect points in an ordered manner along this direction to find a short path (Wheeler, J.A., On recognizing law without law, Am. J. Phys, 51(5), pp. 398, 1983).

The question is: Given N points on the unit square, is there a neat way to find the least-square fit line y=(r*x+b) mod 1, where r is rational (if r is irrational then the question does not make much sense)? By "neat" I mean something like the regular least-square line fit solution (http://mathworld.wolfram.com/LeastSquaresFitting.html).