Bug 501371 - 4x4 "killer sudoku" games can be generated without unique solution
Summary: 4x4 "killer sudoku" games can be generated without unique solution
Status: RESOLVED NOT A BUG
Alias: None
Product: ksudoku
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.4.21123
Platform: Pop!_OS Linux
: NOR normal
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-11 17:53 UTC by Oisín Mac Fhearaí
Modified: 2025-03-11 17:59 UTC (History)
1 user (show)

See Also:
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 (4.64 KB, application/pdf)
2025-03-11 17:53 UTC, Oisín Mac Fhearaí
Details

Note You need to log in before you can comment on or make changes to this bug.
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.