Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

25x25 Sudoku

Puzzle: 25x25 Sudoku

Author: @yoch

Published Difficulty: Very Hard

Algorithm X Complexity: Straightforward

Stragegy

The last time 25x25 Sudoku was discussed, your solution might have been a little slow. The order of the rows in your Algorithm X matrix made a difference in run time. If you want a more robust solution that always works independent of matrix construction, a little problem-space reduction before building the matrix is your answer!

Here is the best news of all. Any problem space reduction you did for traditional 9x9 Sudoku also works on 25x25 Sudoku. A few easy Sudoku reduction strategies can reduce the number of rows in your matrix quite a bit and improve all your run times. I won’t specifically state which strategies I implemented, but with just three basic strategies, I reduced the matrix row counts as follows:


Original Row CountNew Row Count
Test Case 1: Test 17249625
Test Case 2: Test 285691609
Test Case 3: Test 384011474
Test Case 4: Test 483291595
Test Case 5: Test 584492053

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content