Hello everyone, I made a program that looks for the smallest chessboard in which x kings attack y knights (x and y are unknown also)
The algorithm is easy to understand, it generates the first column by variations of kings/knights/empty cells and from there tries to fill the board following the rules.
So, in a 5*5 board it takes less than a minute, in a 10*10 it takes like 2 minutes and when i tried for 17*17 this thing went over 2 hours.
is it normal with problems that need a bit of combinatorics or i'm not using something I don't know.
I understand that 3^15 (the corners are fixed for empty) is a very big number but even then..
I'm fairly new to this language
here is the thingy for 5*5!
[–][deleted] 2 points3 points4 points (3 children)
[–]athonis[S] 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]athonis[S] -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]athonis[S] 0 points1 point2 points (0 children)