### Random Post

### Recent Posts

- Enigma 1105: Road ants
- Enigma 406: The ritual
- Puzzle 69: Division: letters for digits
- Enigma 1106: Not a square unused
- Enigma 405: Uncle bungles the answer
- Enigma 401: Uncle bungles the answer
- Puzzle 70: Football five teams: new method
- Enigma 1107: Factory work
- Enigma 404: Regular timepiece
- Tantalizer 477: Precognition

### Recent Comments

Jim Randell on Enigma 1105: Road ants | |

geoffrounce on Enigma 35: Digits all wro… | |

hakank on Puzzle 70: Football five teams… | |

saracogluahmet on Enigma 1740: Sudoprime | |

Jim Randell on Enigma 406: The ritual |

### Archives

### Categories

- article (11)
- enigma (1,089)
- misc (2)
- project euler (2)
- puzzle (23)
- site news (42)
- tantalizer (23)
- teaser (3)

### Site Stats

- 159,398 hits

I found it was fairly easy to write a program that gets the right answer, even if the program is incorrect. But I wanted to find all possible solutions, and came up with this recursive solution. It first finds how many possible pieces there are that satisfy the conditions, then finds subsets of these pieces that cover the board. It’s not as fast as I would like – it runs in 1m55s – but it does find all 203 solutions. (A similar approach that stops after it finds the first solution for each N runs in under 1s).

Solution:N = 6.