Cycle Killer 2
(Published on 7. February 2022, 18:42 by SirSchmoopy)
Standard Rules:
- Normal sudoku rules apply.
- Normal killer sudoku rules apply. Digits in cages sum to the amount indicated by the clue in the top left corner of the cage. Digits cannot repeat within cages.
Cycle Definitions:
- Let a cycle be the loop of cells along a single row in the grid created by starting with a cell in column X with a digit of A, this A then 'points' to column A with a digit of B. This B then 'points' to column B with a digit of 'C'.... and so on until you get to a cell whose digit is X and points to the beginning where you started.
- Let the order of the cycle be the number of unique cells contained in that cycle
Cycle Killer:
- In addition to normal killer sudoku rules, the orders of cycles in cages must sum to the amount indicated in the clue in the top left corner.
- In cases where no clue is given, the sum of the cage still equals the sum of the cycles within the cage.
- Orders cannot repeat within cages.
Example:
See below for a valid and invalid killer cage under this additional killer cycle constraint.
In the first (valid) example, the order of the 4 is 1 (4 is in column 4 so it points to itself). The 2 is in an order 5 cycle (2 -> 3 ->5 -> 7 -> 4) and 4+2=1+5=6
The second example is invalid for two reasons:
- The 1 is in an order 3 cycle. This immediately makes the cage invalid as the order of the other cycle would have to be 3 in order to sum to 6, and orders cannot repeat within cages.
- The 5 is in a cycle with an order of at least 4, so the sum of the orders in the cage is at least 3+4=7. To show the cycle is an order of at least 4, consider the following:
The 5 is in the 6th column, so the 5 and the 6 are part of the cycle.
The 6 is in the 7th column which means the 7 is part of the cycle.
The 7 is in the 3rd column, so the 3 in that row is part of the cycle as well.
The smallest cycle is then order 4 by placing a 3 in R6C5.
Solution code: Row 1 + Row 9 (18 digits, no spaces)
Last changed on on 8. February 2022, 04:04
Solved by captein, twobear, Arashdeep Singh, RUbikS3ri0uS, arskiy, starwarigami
Comments
on 7. February 2022, 21:27 by SirSchmoopy
fixed solution code