Cross Set

Cross Set

Not enough ratings
++ Level Solutions
By Bob Spigot
The solutions to the final levels for those who are curious.
   
Award
Favorite
Favorited
Unfavorite
++1
++2
++3
++4
++5
++6
++7
++8
How?
Well, Javascript mainly. (because its easy to do wherever Im bored.)

A basic outline for an n sized grid -

For each row:
    Break the numbers apart in to n rows representing where each digit shows up. Shove a 1 in to the solution row, find where a 2 can fit, then a 3 etc. Fall back to try a different position if it doesnt work, otherwise complete and store a combination. Move on when all options are exhausted.

Using the n sets of now complete rows:
    Take a first row from group 0, compare it to the row of group 1, if it fits move to group 2, etc. Fall back upon a failure to try another combination. (Essentially the same thing as the row solutions but gluing an entire grid together.)

When a group is successful at the nth level a solution has been found. I actually let it run through the whole lot just in case multiple solutions existed, but they all appear to have unique answers.

I know what you are thinking: what a fantastic and elegant solution, not horrific brute forcing of the problem at all... Still, it works, and even on my fairly crappy computer for almost all solutions it gets an answer in an instant, the really bad 8x8 grids can take a couple of seconds, the very worst 9x9 grid took about a minute.

I might look at optimising it or different solutions when Im bored again, (Writing a solver for the earlier levels with their easy logic tricks to get the right numbers, and then integrating it in would probably work.) and perhaps other people will post algorithms for these ++ puzzles.