# Happy and joyful 2024!

Fill each empty cell of the board on the left with a digit between 1 and 9. Each box and each column and row must contain all digits.

The dots outside the board on the right indicate how many cells in the corresponding column or row of that board contain precisely the same digit as is to be found in the same cell on the board on the left.

• 0 dots means 0, or means there's no info for that line? Commented Dec 28, 2023 at 22:39
• It means 0. That is the information. Commented Dec 28, 2023 at 22:49

First moves first:

None of the cells in column 2 can match, so in particular R2C2 cannot be 4, which determines all digits in box 1. Now in column 3, we must have two digits match. Of the digits we already have, only the 6 in R3C3 matches. None of the other 6s in the right grid can match, and the 7 in R4C3 cannot match either, since there is already a 7 in box 4. Thus the other match must be the a 1 in R6C3. This forces R6C1 to be a 6. Pencilmarking the rest of column 1, we have:

Middle rows:

Looking in row 5, we must have four matches. Of the five given digits, only one is a match, so three of the remaining cells must also be matches. As two of the remaining cells would be 4s if matched, only one can be, and the 1 and 6 in row 5 are placed. Now in row 4, there must be four matches. None can be in box 4, the 1 in box 5 and the 5 in box 6 cannot be matches, so all of the remaining cells in this row must match. Sudoku sets the 3 in box 6. The grid thus far:

Some small deductions:

The only location left for the 2 in row 4 is in C6. This leaves a 4/5/9 triple in row 4, with the 5 forced in box 4. Hence R6C2 is either 4 or 9. Now look at column 8. We must have three matches, but the only candidates are the 3, one of the 2s and the 4, forcing the location of the 4 in box 6, and some knock-on deductions via sudoku. Pencilmarking in column 8 shows that the 2 in column 8 must be in either R8 or R9. This leaves the only possible third match in C8 must be R8C8. Finally, looking in C7, we see that a third match is only possible if the 1 is in either R1 or R9, meaning it cannot be in R8. This forces the 1 in R9 to be in box 9, removing 1 as a candidate from R9C1. The grid thus far:

The key deduction (I think):

Oh, this one is pretty cleverly designed! Look at R6C6. By Sudoku it can only be 4, 5 or 7. Column 6 must have 3 matches, and 5 cells cannot be matches: R1, R4, R5 and R8 are blocked by sudoku, and R2 can't match because there are no matches in R2. This leaves the 5 in R3, 7 in R6, 4 in R7, and 8 in R9. But this forces R6C6 to be 7! If it were a 4 or 5, it would prevent both R6C6 from being a match, as well as another cell in the column. Now by counting matches in row 6, we see R6C5 cannot be 5, forcing R6C4 to be 5. This prevents R3C4 from being a match, which forces R3C6 to be 5, a match. Continuing in column 4, we need two more matches, one of which must be a 6 in box 8, while the other is a 3 in R1C4. Now counting matches in row 1, we see R1C7 cannot be 1, forcing R9C7 to be 1, which resolves the whole box. Progress thus far, with matches shaded blue, and known non-matches shaded pink:

Hopefully finishing up:

Sudoku sets a 3 in R3C7, and lets us finish C7, as well as C8. Now the only candidate for R1C5 is 8. Staying in C5, we see the 5 must be in R7 or R8. However, if it is in R8, then there can be at most three matches in C5. So the 5 must go in R7C5. Counting matches in R7, we now cannot have a match in R7C6, which forces the remaining match in C6 to be in R9C6, forcing this cell to be an 8. Now that we have all matches/non-matches in C6, we see that R2C6 cannot be 1, forcing it to be 6 (we actually had this earlier), and the entire column resolves, as well as much of box 2. The grid thus far:

Another clever deduction brings us home:

We still need one more match in C5, and it must be in box 8. If R3C5 is a 2, it is not a match, and R8C5 and R9C5 are a 7/9 pair, meaning that we get either 2 or 0 matches from them, leaving with either 3 or 5 total matches in a column that needs 4. The final match deduction forces a 6 in R9C4, and the rest follows by sudoku. The finished grid, with matches shaded blue and non-matches shaded pink: