Difference between revisions of "KGS math club/solution 11 17"
(created page) |
m (tidied) |
||
Line 2: | Line 2: | ||
Iceweasel gave this list | Iceweasel gave this list | ||
− | + | [[0,1,3,8,12,18], [0,1,3,10,14,26], [0,1,4,6,13,21], [0,1,4,10,12,17], [0,1,8,11,13,17]] | |
− | and the Haskell code that generated it (and | + | and the Haskell code that generated it (and reflections): |
− | + | import Data.List | |
− | + | import Control.Monad | |
− | + | npts = 31 | |
− | + | n' = npts-1 | |
− | + | dists l = group . sort $ [min (y-x) (npts+x-y)| (x:ys) <- tails l, y <- ys] | |
− | + | sols = [pts| c<-[3..n'],d<-[c+2..n'],e<-[d+2..n'],f<-[e+2..n'],c-1<31-f,let pts=[0,1,c,d,e,f],length (dists pts)==15] |
Latest revision as of 17:20, 13 March 2012
Five, or if we count rotations and reflections separately, 310.
Iceweasel gave this list
[[0,1,3,8,12,18], [0,1,3,10,14,26], [0,1,4,6,13,21], [0,1,4,10,12,17], [0,1,8,11,13,17]]
and the Haskell code that generated it (and reflections):
import Data.List import Control.Monad npts = 31 n' = npts-1 dists l = group . sort $ [min (y-x) (npts+x-y)| (x:ys) <- tails l, y <- ys] sols = [pts| c<-[3..n'],d<-[c+2..n'],e<-[d+2..n'],f<-[e+2..n'],c-1<31-f,let pts=[0,1,c,d,e,f],length (dists pts)==15]