Jump to content

No-three-in-line problem

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by David Eppstein (talk | contribs) at 03:39, 27 November 2021 (Greedy placement: ce). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
A set of 20 points in a 10 × 10 grid, with no three points in a line.

The no-three-in-line problem in discrete geometry asks how many points can be placed in the n × n grid so that no three points lie on the same line. This number is at most 2n, because 2n + 1 points in a grid would include a row of three or more points, by the pigeonhole principle. The problem was introduced by Henry Dudeney in 1900. Brass, Moser, and Pach call it "one of the oldest and most extensively studied geometric questions concerning lattice points".[1]

Although the problem can be solved with 2n points for every n up to 46, it is conjectured that fewer than 2n points can be placed in grids of large size. Known methods can place linearly many points in grids of arbitrary size, but the best of these methods place slightly fewer than 3n/2 points, not 2n. Several related problems of finding points with no three in line, among other sets of points than grids, have also been studied.

Although originating in recreational mathematics, the problem has applications in graph drawing and to the Heilbronn triangle problem.

Small instances

The problem was first posed by Henry Dudeney in 1900, as a puzzle in recreational mathematics, phrased in terms of placing the 16 pawns of a chessboard onto the board so that no three are in a line.[2] This is exactly the no-three-in-line problem, for the case .[3] In a later version of the puzzle, Dudeney modified the problem, making its solution unique, by asking for a solution in which two of the pawns are on squares d4 and e5, attacking each other in the center of the board.[4]

Many authors have published solutions to this problem for small values of n,[5] and by 1998 it was known that 2n points could be placed on an n × n grid with no three in a line for all n up to 46, and some larger values.[6] The numbers of solutions (not counting reflections and rotations as distinct) for small n = 2, 3, ..., are[3][7]

1, 1, 4, 5, 11, 22, 57, 51, 156, 158, 566, 499, 1366, ... (sequence A000769 in the OEIS)

Upper and lower bounds

The exact number of points that can be placed, as a function of n, is not known. However, both proven and conjectured bounds limit this number to within a range proportional to n.

General placement methods

Suboptimal placement of points in grid, using the method of Erdős. The largest prime less than the grid size is ; the solution places points at coordinates mod for . For instance, is included because mod .

A solution of Paul Erdős, published by Roth (1951), is based on the observation that when n is a prime number, the set of n grid points (i, i2 mod n), for 0 ≤ i < n, contains no three collinear points. When n is not prime, one can perform this construction for a p × p grid contained in the n × n grid, where p is the largest prime that is at most n. As a consequence, for any ε and any sufficiently large n, one can place points in the n × n grid with no three points collinear.[8]

Erdős' bound has been improved subsequently: Hall et al. (1975) show that, when n/2 is prime, one can obtain a solution with 3(n − 2)/2 points by placing points on the hyperbola xyk (mod n/2), where k may be chosen arbitrarily as long as it is nonzero mod n/2. Again, for arbitrary n one can perform this construction for a prime near n/2 to obtain a solution with points.[9]

Upper bound

At most 2n points may be placed in a grid of any size n. For, if more points are placed, then by the pigeonhole principle some three of them would all lie on the same horizontal line of the grid. For small-enough values of n, this trivial bound is tight.[3]

Conjectured bounds

Although exactly 2n points can be placed on small grids, Guy & Kelly (1968) conjectured that for large grids, there is a significantly smaller upper bound on the number of points that can be placed. More precisely, they conjectured that the number of points that can be placed is at most a sublinear amount larger than cn, with[10] After an error in the heuristic reasoning leading to this conjecture was uncovered, Guy corrected the error and made the stronger conjecture that one cannot do more than sublinearly better than cn with[11]

Applications

In graph drawing, solutions to the no-three-in-line problem can be used to place the vertices of a graph so that, when drawn as straight line segments, no edge passes through a vertex that is not its endpoint.[12] In particular, this applies to drawings of complete graphs, which can be drawn in this way using a grid whose area is quadratic in the number of vertices, optimal for any grid drawing. More generally, if a graph has n vertices and a graph coloring with k colors, it can be drawn in a grid with area proportional to nk; the no-three-in-line drawing of a complete graph is a special case of this result with k = n.[13]

The Heilbronn triangle problem asks for the placement of n points in a unit square that maximizes the area of the smallest triangle formed by three of the points. A triangle with integer coordinates has area at least by Pick's theorem, and scaling the integer grid down so that an grid fits within the unit square reduces this area by a quadratic factor. Therefore, the constructions for linearly many points with no three in line lead to solutions to the Heilbronn triangle problem in which the smallest area is at least proportional to . This application was the motivation for Paul Erdős to find his solution for the no-three-in-line problem.[14] It remained the best area lower bound known for the Heilbronn triangle problem from 1951 until 1982, when it was improved by a logarithmic factor using a construction that was not based on the no-three-in-line problem.[15]

Generalizations and variations

General-position subsets

The no-three-in-line problem is an instance of a more general problem in computational geometry, of finding the largest subset of points in general position (no three in line) in an arbitrary set of points. This problem is NP-hard, and hard to approximate (APX-hard). If the largest subset has size , a solution with approximation ratio can be obtained by a greedy algorithm that simply chooses points one at a time until all remaining points lie on lines through pairs of chosen points. The problem is also fixed-parameter tractable, having an algorithm whose time is exponential in but polynomial in the input size.[16] For point sets having at most points per line, with , there exist general-position subsets of size nearly proportional to ; the example of the grid shows that this bound cannot be significantly improved.[17] The proof of existence of these large general-position subsets can be converted into a polynomial-time algorithm using entropy compression.[18]

Greedy placement

Repeating a suggestion of Adena, Holton & Kelly (1974), Martin Gardner asked for the smallest subset of an n × n grid that cannot be extended: it has no three points in a line, but every proper superset has three in a line. Equivalently, this is the smallest set that could be produced by a greedy algorithm that tries to solve the no-three-in-line problem by placing points one at a time until it gets stuck.[3] If only axis-parallel and diagonal lines are considered, then every such set has at least n − 1 points.[19] However, less is known about the version of the problem where all lines are considered: every greedy placement includes at least points before getting stuck, but nothing better than the trivial upper bound is known.[20]

Higher dimensions

Non-collinear sets of points in the three-dimensional grid were considered by Pór & Wood (2007). They proved that the maximum number of points in the n × n × n grid with no three points collinear is . Similarly to Erdős's 2D construction, this can be accomplished by using points (x, y, x2 + y2) mod p, where p is a prime congruent to 3 mod 4.[21] Just as the original no-three-in-line problem can be used for two-dimensional graph drawing, one can also consider graph drawings in the three-dimensional grid. Here the non-collinearity condition means that a vertex should not lie on a non-adjacent edge, but it is normal to work with the stronger requirement that no two edges cross.[22]

In even higher dimensions, grid points with no three in line, obtained by taking the points between two spherical shells, have been used for finding large Salem–Spencer sets, sets of integers with no three forming an arithmetic progression.[23] However, a similar idea of placing points in a convex polygon does not work well for the two-dimensional no-three-in-line problem, as the largest convex polygons with vertices in an n × n grid have only O(n2/3) vertices.[24] The cap set problem concerns a similar problem in high-dimensional vector spaces over finite fields.[25]

Torus

Another variation on the problem involves converting the grid into a discrete torus by using periodic boundary conditions in which the left side of the torus is connected to the right side, and the top side is connected to the bottom side. This has the effect, on slanted lines through the grid, of connecting them up into longer lines through more points, and therefore making it more difficult to select points with at most two from each line. These extended lines can also be interpreted as normal lines through an infinite grid in the Euclidean plane, taken modulo the dimensions of the torus. For a torus based on an grid, the maximum number of points that can be chosen with no three in line is at most .[26] When both dimensions are equal, and prime, it is not possible to place exactly one point in each row and column without forming a linear number of collinear triples.[27] Higher-dimensional torus versions of the problem have also been studied.[28]

Notes

  1. ^ Brass, Moser & Pach 2005.
  2. ^ The Weekly Dispatch, April 29 and May 13, 1900, as cited by Knuth 2008.
  3. ^ a b c d Gardner 1976.
  4. ^ Dudeney 1917.
  5. ^ Craggs & Hughes-Jones 1976; Kløve 1978, 1979; Anderson 1979; Harborth, Oertel & Prellberg 1989; Flammenkamp 1992, 1998.
  6. ^ Flammenkamp 1998.
  7. ^ Sloane, N. J. A. (ed.). "Sequence A000769". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
  8. ^ Erdős did not publish this observation; it appears in Roth 1951.
  9. ^ Hall et al. 1975.
  10. ^ Guy & Kelly 1968.
  11. ^ As reported by Pegg 2005. The discovery of this error was credited by Pegg to Gabor Ellmann.
  12. ^ Brass et al. 2007.
  13. ^ Wood 2005.
  14. ^ Roth 1951.
  15. ^ Komlós, Pintz & Szemerédi 1982.
  16. ^ Froese et al. 2017; Eppstein 2018
  17. ^ Payne & Wood 2013.
  18. ^ Eppstein 2018.
  19. ^ Cooper et al. 2014.
  20. ^ Aichholzer, Eppstein & Hainzl (2021).
  21. ^ Pór & Wood 2007.
  22. ^ Pach, Thiele & Tóth 1998; Dujmović, Morin & Wood 2005; Di Giacomo, Liotta & Meijer 2005
  23. ^ Elkin 2011.
  24. ^ Jarník 1926.
  25. ^ Klarreich 2016.
  26. ^ Misiak et al. 2016.
  27. ^ Cooper & Solymosi 2005.
  28. ^ Ku & Wong 2018.

References