July 2018 little math problem
|
07-27-2018, 03:37 PM
(This post was last modified: 07-27-2018 03:41 PM by Albert Chan.)
Post: #19
|
|||
|
|||
RE: July 2018 little math problem
Discover a way to add Complement Symmetry to solve zigzag puzzles.
Removing center solutions complement equivalent is hard, so the trick is ... not remove it ! This Picat program solve all zigzag puzzles, with sides > 2: Each solution actually represent 8, by head swap, tail swap, or reversing digits. Code: import cp. % Usage: picat zigzag.pi [Sides = 4] For a 4-sided zigzag: I still got 12, but Picat really solved only 6: Complement Symmetry is internalized for a nice speedup. [1,9,4,8,2,7,5,3,6] [9,1,6,2,8,3,5,7,4] [2,8,4,9,1,7,6,3,5] [8,2,6,1,9,3,4,7,5] [3,9,1,8,4,7,2,5,6] [7,1,9,2,6,3,8,5,4] [4,8,2,9,3,5,6,1,7] [6,2,8,1,7,5,4,9,3] [5,8,1,6,7,4,3,2,9] [5,2,9,4,3,6,7,8,1] [6,7,1,5,8,4,2,3,9] [4,3,9,5,2,6,8,7,1] I tried zigzag program with other sides: Code: Sides Time(s) solns x 8 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)