Re: [Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-02 Thread Bertram Felgenhauer
ChrisK wrote: > Hmmm... it seems that n=63 is a special case. > > [EMAIL PROTECTED] wrote: >> Yes, there is a solution for n=99 and for n=100 for that matter -- >> which can be found under one second. I only had to make a trivial >> modification to the previously posted code >>> tour n k s b | k >

[Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-02 Thread ChrisK
Hmmm... it seems that n=63 is a special case. [EMAIL PROTECTED] wrote: Yes, there is a solution for n=99 and for n=100 for that matter -- which can be found under one second. I only had to make a trivial modification to the previously posted code tour n k s b | k > n*n = return b

Re: [Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-01 Thread Duncan Coutts
On Mon, 2008-12-01 at 22:48 +0100, Diego Echeverri wrote: > >>I've created a wiki page, > >>http://haskell.org/haskellwiki/The_Knights_Tour > >>I note the LogicT version is the shortest so far. > >>-- Don > > Probably noob question. I was looking into the first solution in the > page and tried to

[Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-01 Thread Diego Echeverri
>>I've created a wiki page, >>http://haskell.org/haskellwiki/The_Knights_Tour >>I note the LogicT version is the shortest so far. >>-- Don Probably noob question. I was looking into the first solution in the page and tried to replace sortOn f = map snd . sortBy (comparing fst) . map (f &&& id) fo