diff options
| author | Abigail <abigail@abigail.be> | 2021-06-26 23:43:36 +0200 |
|---|---|---|
| committer | Abigail <abigail@abigail.be> | 2021-06-26 23:43:36 +0200 |
| commit | 5728d9694d49652756f62e54d6932879aed12198 (patch) | |
| tree | 76ba7012cf6e498ed895effd3ecab6756f22aa09 | |
| parent | 1e4f18c8552dec891946162593a2bd451f8ca30b (diff) | |
| download | perlweeklychallenge-club-5728d9694d49652756f62e54d6932879aed12198.tar.gz perlweeklychallenge-club-5728d9694d49652756f62e54d6932879aed12198.tar.bz2 perlweeklychallenge-club-5728d9694d49652756f62e54d6932879aed12198.zip | |
Refer to blog for proving 11 steps is the minimum
| -rw-r--r-- | challenge-118/abigail/perl/ch-2.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/challenge-118/abigail/perl/ch-2.pl b/challenge-118/abigail/perl/ch-2.pl index 2d224fd1fc..ca49d52bc2 100644 --- a/challenge-118/abigail/perl/ch-2.pl +++ b/challenge-118/abigail/perl/ch-2.pl @@ -17,10 +17,10 @@ use experimental 'lexical_subs'; # Run as: perl ch-2.pl # # First thing which spring to mind is: there is a closed knight's tour -# on a chess board. In fact, there are 19,591,828,170,979,904 of them -# (counting rotations and reflections, but not direction). See A165134 -# in the OEIS. (And there are also billions of open tours visiting all -# squares...) +# on a chess board. In fact, there are 26,534,728,821,064 directed closed +# tours (counting reflections and rotations). If we include open tours +# (where we end not a knights move away from the start), this number +# rises to 19,591,828,170,979,904. See A165134 in the OEIS. # # And any knight's tour will visit all squares, including the ones with # treasure. So, we could just pick a tour visiting all squares and @@ -33,6 +33,9 @@ use experimental 'lexical_subs'; # to work with. And one can quickly see there's an 11 step path # visiting all the treasure, and no 10 step path. # +# (See https://abigail.github.io/HTML/Perl-Weekly-Challenge/week- 118-2.html +# for details why 11 steps is the minimum). +# # So, this challenge is yet another boring Hello, World! program. # After all, it's much easier to write down the 11 knights moves than # to write a program. |
