Bug 501371

Summary: 4x4 "killer sudoku" games can be generated without unique solution
Product: [Applications] ksudoku Reporter: Oisín Mac Fhearaí <denpashogai>
Component: generalAssignee: Ian Wadham <iandw.au>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde-games-bugs-null
Priority: NOR    
Version First Reported In: 1.4.21123   
Target Milestone: ---   
Platform: Pop!_OS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: PDF generated from "print to file", showing a 4x4 killer sudoku puzzle with two valid solutions, only one of which is accepted by KSudoku

Description Oisín Mac Fhearaí 2025-03-11 17:53:22 UTC
Created attachment 179312 [details]
PDF generated from "print to file", showing a 4x4 killer sudoku puzzle with two valid solutions, only one of which is accepted by KSudoku

SUMMARY

I created a 4x4 killer sudoku game in "very easy" mode, and when I got down to the last (central) 2x2 area, there were clearly two possible solutions. Entering the "wrong" one causes KSudoku to reject the solution and marks those cells in error.

STEPS TO REPRODUCE
1.  Generate lots of 4x4 killer sudoku games
2.  Solve them
3.  Repeat until one with multiple valid solutions is generated
4. Try the different solutions and note that only one (arbitrary) solution is accepted.

OBSERVED RESULT
Ambiguous puzzle is generated.

EXPECTED RESULT
Puzzles should be generated with exactly one correct solution.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.9.3-76060903-generic
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
PDF attached with a printout of the ambiguous puzzle. The centre area can be:

```
2 3
3 2
```

or

```
3 2
2 3
```
Comment 1 Oisín Mac Fhearaí 2025-03-11 17:55:24 UTC
As soon as I reported this, I realised that the dark-bordered 2x2 boxes can only contain each number once, which rules out the other "valid" solution. Closing this because it's obviously not a bug... my bad!
Comment 2 Oisín Mac Fhearaí 2025-03-11 17:59:03 UTC
(In reply to Oisín Mac Fhearaí from comment #1)
> As soon as I reported this, I realised that the dark-bordered 2x2 boxes can
> only contain each number once, which rules out the other "valid" solution.
> Closing this because it's obviously not a bug... my bad!

I think this is exacerbated by the themes which don't seem to make those regular grid sections clear... but it is clear in the PDF.