Skip to content

Instantly share code, notes, and snippets.

@jsettlem
Created April 9, 2022 19:58
Show Gist options
  • Save jsettlem/127c9e1b9f847681eec0df34e5c76300 to your computer and use it in GitHub Desktop.
Save jsettlem/127c9e1b9f847681eec0df34e5c76300 to your computer and use it in GitHub Desktop.
Chery's Birthday Sudoku

Cheryl's Birthday Sudoku

This is my first-ever sudoku. I've had this idea in my head for a while now, and it fit the theme of the CtC Discord server's monthly prompt ("riddles") so perfectly I had to finally sit down and create it. I've never seen a puzzle quite like this before so I'm hoping it's original.

The riddle

For her birthday, Cheryl created a sudoku puzzle for her friends Mark and Simon. Mark and Simon are both sudoku experts and perfect logicians, so Cheryl decided to play a trick on them—she withheld one of the puzzle’s given digits from each of them to see if they would still be able to solve it. For Mark, she provided the value of the blue cell (labeled “M”) and withheld the value of the orange cell (labeled “S”). For Simon, she provided the value of the orange cell and withheld the value of the blue cell.

Knowing all this, Mark and Simon both went off on their own to try to solve the puzzle and afterwards came together to discuss their findings.

Simon: “Well bobbins, I wasn’t able to solve the puzzle, but at least I know you weren’t able to either.”

Mark: “You’re right, I wasn’t able to solve it, but hearing that, now I can!”

Simon: “In that case, now I can solve it, too.”

The puzzle is provided below with both the blue and orange digits redacted. What is the solution to the puzzle?

The puzzle

Normal 6x6 sudoku rules apply, meaning:

  • Each cell contains a digit from 1-6
  • Digits may not repeat within a row, column, or 3x2 box
  • A solution is only valid if it is unique

Link: https://f-puzzles.com/?id=ycmvv7lz

Chery's Birthday Sudoku

Intended solution

Beware! Spoilers live below!


This is a logic puzzle, so there's only one logical solution, but like many riddle-based sudoku, it's not self-checking, so....

The solution (spoilers!) The intended solution is that Simon's digit (orange) is 1 and Mark's digit (blue) is 3. From there, the sudoku itself is trivial.

Explanation

Explanation (more spoilers!)

A while back, Simon (from Cracking the Cryptic) featured a sudoku that was much easier to solve if you take advantage of uniqueness. This got me thinking--"uniqueness" is always an implicit rule (in the "normal sudoku rules apply" sense), but it's never necessary for a solve. Is it possible then to make a sudoku (or any sort of puzzle, really) that's only solvable if you assume it has a unique solution?

The short answer is no--any puzzle that appears to only be solvable using uniqueness is really just a puzzle with multiple solutions where one might be more natural than the others if you use a uniqueness technique. However, we can wrap a sudoku puzzle with a meta-puzzle, taking advantage of the fact that a puzzle is only considered "solvable" if that solution is unique, to create a puzzle that requires "uniqueness" as a given rule.

In this case, the meta-puzzle is, of course, the (semi-)famous "Cheryl's Birthday" puzzle. It's solved in basically the same way--eliminating digits as possibilities based on what Simon and Mark say they know about what the other knows until only one combination remains.

If you work out all the combinations (either brute-force, or with shortcuts) you end up with a table like this:

			Simon
 		1	2	3	4	5	6
M	1	❌	❌	❌	❌	❌	❌
a	2	❌	❌	✔	❌	✔	❌
r	3	✔	❌	❌	❌	✔	❌
k	4	❌	❌	✔	❌	✔	❌
 	5	❌	❌	❌	❌	✔	❌
 	6	✔	❌	✔	❌	?	❌

The checkmarks are valid+unique solutions, the ? is a non-unique solution (meaning it's invalid, but it doesn't really affect the answer if you assume it's valid), and the X's are invalid solutions. From there, you can apply the Cheryl's birthday problem logic:

Simon's first statement eliminates 5 as an option, because if he had had 5, he wouldn't have been able to know that Mark couldn't solve the puzzle (Mark might have had 5 if Simon had 5).

Mark now knows that Simon doesn't have 5, so for him to now be able to solve the puzzle, he must have 2, 3, or 4.

Simon now knows that Mark doesn't have 6, so for him to now be able to solve the puzzle, he must have 1 (meaning Mark has 3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment