Tetromi-nuri-doku

Note: This puzzle was inspired by the one here, by Mike Q.

Every square in the grid above, when the puzzle is complete, has a number between 1 and 9 in it and either is shaded or is not. Each 3x3 square in the grid contains exactly 4 shaded squares, forming an L, T, or S tetromino, which can be rotated or mirrored and can be placed anywhere in the square. Note that while the yellow squares in the given grid are confirmed shaded, the other squares all may or may not be shaded- no square in the given grid is confirmed unshaded yet.

The tetrominoes additionally follow the rule that each row and column of 3x3 squares contains exactly one L, T, and S tetromino, and no two squares contain the same tetromino unless one is rotated or mirrored relative to the other (for example, these two:

_#_  __#
_#_  __#
##_  _##


would not be allowed, but these three:

_#_  _#_  ___
_#_  _#_  ###
##_  _##  __#


would).

The shaded squares follow the additional rules that they form a contiguous path with no 2x2 squares shaded, and that any unshaded region (that is, any collection of adjacent unshaded squares) must be directly adjacent to the edge of the grid (the following, for example, would not be allowed, as the center region is not adjacent to the edge.).

###__
#_##_
#__##
###__


Finally, the numbers follow the normal rules of sudoku, with the addition that the four numbers in each tetromino must add up to 20, and that no two tetrominoes share the same set of four numbers.

Some hints:

The possible combinations of four numbers that add up to 20 are:

(1 2 8 9) (1 3 7 9) (1 4 6 9) (1 4 7 8)
(1 5 6 8) (2 3 6 9) (2 3 7 8) (2 4 5 9)
(2 4 6 8) (2 5 6 7) (3 4 5 8) (3 4 6 7)

The rule on L/T/S tetrominoes means:

One diagonal must have three of the same tetromino, while the other must have one of each.

Regarding which squares in a 3x3 square are shaded, it's worth noting:

If a corner square is shaded, the opposite corner cannot be.

and:

If two squares on opposite sides are shaded, the square between them must be shaded as well.

Finally, regarding which set of four numbers goes in each tetromino:

Note that only four out of the twelve sets of numbers contain a 5, only two lack a 1 and a 2, and only three lack both a 3 and a 6.

An extra hint, since there aren't any answers yet:

You should be able to tell straight away that the center and lower-right sections contain either T or L tetrominoes, since they have a line of three shaded squares in a row. This divides possible solutions into four categories (numbering the sections with the equivalent on the number pad): 5T-3T, 5T-3L, 5L-3T, and 5L-3L. The second of these can have the shading completely determined using only the shading rules, and then be quickly eliminated using the sudoku/add-to-20 rules, while the third reduces to two almost-complete shadings depending on the orientation of the 3T. Some brute force is required, but by paying attention to where 9s have to go and how many sections have neither a 1 nor a 2 shaded, both can be eliminated. The techniques you use here should help figure out the rest.

Since there are still no answers, here's one last hint. If there are still no answers a week or so from now, I'll go ahead and post the solution.

The last possibility of the previous hint reduces to three cases depending on the lower-center and lower-right regions. If the upper-left corner of the lower-center region is shaded, and the upper-right corner of the lower-right region is not, the center-left region cannot be shaded properly, and if both are shaded the center-right cannot. If the center-left has unshaded upper-right corner, the region's (and most of the puzzle's) shading is determined by whether it contains a T or an S tetromino. In the former case, the upper-center region quickly becomes impossible to number once a few of the 9's are figured out while in the latter the upper-left proves impossible to number. This confirms that both the center and the lower-right regions (and thus the upper-left) must contain T tetrominoes. It is subsequently easy to determine that the upper-right region must contain an S tetromino, which determines most of the shading. After this, which of two sets of numbers go in the center-left region, which of two possible shadings the upper-left region has, and which (if any) of the regions have neither 1 nor 2 shaded determine the remainder of the puzzle.

• What does the yellow shading mean? – Brian Nov 1 '17 at 20:29
• They are the 'Shaded Squares' mentioned in my description of the puzzle. – P... Nov 1 '17 at 21:30
• can we assume that the squares with filled in numbers also have filled in shading? That is, if a square has a number and no yellow shading, is it confirmed unshaded, or do we just not know whether or not it is shaded? – MMAdams Nov 6 '17 at 16:55
• @MMAdams Good question! I should have made that more clear. You do not know whether or not those squares are shaded. No squares in the grid given are confirmed not shaded. – P... Nov 6 '17 at 18:03
• In case people are still trying to solve this and having trouble, I've added a few hints that should serve as guides for how I solved this puzzle, without going into too much detail about exactly how it works. If no one has answered within a week or so, I'll go ahead and post the solution. – P... Nov 17 '17 at 17:43

It took me quite some time, and I've used all hints to start, but I believe this should do:

It seems I managed to make all incorrect guesses first, so (even without OP) I'm convinced that the solution is unique.

• Yes, you got it exactly right! Good work! I will try to post an answer with the full solution + reasoning, for those who are interested, at some point in the next few days. – P... Nov 27 '17 at 18:54

Here's the full solution, following through the hints I gave in the question body. I must apologize, as the third spoilered paragraph turned out to be much more difficult than I thought at first.

Notation-wise, I will refer to 3x3 sections as numbers 1-9, following the same pattern as the number pad:

7 8 9
4 5 6
1 2 3


and will use the same numbers to refer to a square within a section, so for example, square 5-9 is the upper-right hand corner square of the central 3x3 region.

!WARNING! since multiline preformatted text blocks cannot be put in spoilers, some diagrams will be visible, though without context.

As mentioned in the penultimate hint, there are four possibilities for the distribution of tetrominoes: 5T-3T, 5T-3L, 5L-3T, and 5L-3L. 5T-3L results in the following square from the shading rules alone:

 -----------
|   |#  |   |
| ##|#  | # |
|## |## |###|
|---+---+---|
| # | # |#  |
| # | ##|## |
|## | # | # |
|---+---+---|
| # |## | ##|
|## | ##| # |
| # |   | # |
-----------


Sections 1 and 2 both have neither the number 1 nor the number 2 shaded, and so between them must have shaded (3 4 5 8) and (3 4 6 7). 2-4 then must contain a 9, which forces 8-8 to be a 9 as well. This forces section 9 to have shaded (1 4 6 9), so the 5 in the second-from-the-right column must be in section 3. But then the shaded numbers cannot add to 20, so this path is a dead end. 5L-3T results in one of the following two shadings:

 -----------      -----------
|   | # |   |    |   |   |   |
| ##|###|###|    | ##|###|###|
|   |   |  #|    | # | # |  #|
|---+---+---|    |---+---+---|
|###|## |   |    | # | ##|#  |
| # | # |## |    |## | # |## |
|   | # |   |    |   | # | # |
|---+---+---|    |---+---+---|
|  #|## | # |    |   |## | # |
|   | ##|## |    |   | ##| ##|
| # |   | # |    | # |   | # |
-----------      -----------


Again, apologies for the preceeding paragraph. I made a mistake in my earlier solution which would have made this section much shorter.

 -----------      -----------
|   |   |   |    |   |   |   |
|###|###|## |    |###|## | # |
|  #| # | ##|    |   | ##|###|
|---+---+---|    |---+---+---|
| ##| # | # |    |###| # |#  |
|## | # |## |    | # | # |## |
|   |## | # |    |   |## | # |
|---+---+---|    |---+---+---|
| # |#  | # |    |   |#  | # |
| ##|## | # |    | ##|## | # |
| # | # | # |    |## |#  | # |
-----------      -----------


The first immediately forces section 2 to have (2 3 6 9), section 1 to have (3 4 6 7), and 1-2 to be 3, which force 7-2 to be 8 and section 4 to have (2 4 5 9). Section 7 must then have (1 4 6 9), and section 9 is forced to have (2 5 6 7) with 9-4 as 2, 9-2 as 5 and 9-3 as 7. This forces 7-7 to be 7, which forces section 8 to contain a shaded 7, which renders filling it in impossible. The second shading forces 2-8 to be 9, but this renders section 8 impossible to fill. Finally, we move on to the final of our first four options, 5T-3T, which again following the hint forces the following shading:

 -----------
|   |   | # |
| # |#  | ##|
| # |## |  #|
|---+---+---|
| # | # |  #|
|## | ##|#  |
|#  | # |   |
|---+---+---|
|   |## | # |
|   | ##|## |
| # |   | # |
-----------