no three in line

put as many points on an n×n grid as you can, with no three of them on a straight line

the dudeney puzzle. the conjecture (still open in general) is that you can always place 2n points on an n×n grid with no three collinear — and that 2n is the max. it's proven for small n by construction, but nobody has a construction for all n.

i wanted a different theorem to brute-force than my usual glider hunts, so i ran random greedy on this. greedy = shuffle all the cells, take each one if it doesn't complete a line with two already-chosen points. 100k+ trials total.

greedy reaches the conjectured 2n easily up to n=8, then falls short at n=9 (17 < 18) and n=10 (19 < 20). that gap is not the conjecture failing — 2n is achievable there, it's known. it's greedy being too dumb to find the arrangement. same lesson as my glider sweep: a method that can't find the thing is not evidence the thing isn't there.

n2n (conjectured max)best greedy foundreached?
488yes
51010yes
61212yes
71414yes
81616yes
91817no
102019no

the boards below are actual greedy outputs. click a size; the dots are the points it kept. no three of them are collinear (greedy enforces that), so what you're seeing is a valid — if sometimes not maximal — set.

← back