14
$\begingroup$

This puzzle is part of the Puzzling StackExchange Advent Calendar 2021. The accepted answer to this question will be awarded a bounty worth 50 reputation.

< Previous Door Next Door >


"Ingrid! I’m so glad to see you. But...you are a day early?"

"They predicted a blizzard in Edmonton, so I caught an earlier flight out. I hope that's OK."

"Of course, it's OK!"

Narrator: "It was not OK. I had been planning to have my Christmas decorations all put up to surprise my friend, Ingrid Deduction. I have a special present for her this year, and wanted it to be under the tree when she got here. Oh, well, plan B."

"Since you've got a surprise for me, I've got a surprise for you...we're going to pick out a Christmas tree together!"

"That sounds like fun. I saw a little tree farm, Drafty Acres, on my way from the airport. And it's a beautiful warm day. Oh let's go!"

And off we went. We wanted to beat the rush, but when we arrived...we were the only ones there, except for the attendant, Chubby. He said, "Hi folks! Thanks for coming, but I don't think we can get you a tree...all but one of them are already sold, and people are coming to pick them up tonight."

I was a bit bummed, but I really needed the tree. "That's alright, we only need one. Which one is still available?"

Chubby sighed, "Well, I don't rightly know. Our field is set up in a 10x10 grid, and to mark their tree I told folks to put their name on a flag, and to plant the flag in an empty square orthogonally adjacent to the tree they wanted. It worked out great...none of the flags were in the same or adjacent squares, not even diagonally."

I scanned the field. "Uh, Chubby...I don't see any flags."

"Yeah. Well, it's normally cold, so I borrow the flags from the golf course next door. But it's warm today, and they needed the flags back, so the grounds crew took them back overnight. Without telling me where they were."

I shook my head, but Ingrid got a twinkle in her eye, and said, "So, do you know ANYTHING about the flags?"

"Well, I did write down how many flags were in each column. But I don't see how that helps."

Ingrid broke into a dazzling grin, and said, "Oh, I do!" I knew what I was in for.

Can you figure out where all the flags were, and thus pick out which tree is available?

Grid

Online solvers: puzz.link version Note: this link takes you to edit mode, which you can use to delete the available tree in order to check your flag placement.

SOLVER NOTES

Thanks to Stiv for letting me borrow Ingrid for a bit of colour!

Despite the holiday dressing, this is just a Tents puzzle, with exactly one extra tree that does not have a tent/flag. Specifically, you need to place flags in the grid, with each flag "tied" to a single tree such that:

  • All but one of the trees has exactly one flag tied to it. The remaining tree has no flag.
  • A flag tied to a tree must be in a square orthogonally adjacent to the tree.
  • Flags cannot go on squares already containing trees.
  • Only one flag per square.
  • No flags may be either orthogonally or diagonally adjacent.
  • The numbers in each column denote the number of flags in the column.
  • A flag may be adjacent (orthogonally or diagonally) to a tree to which it is not tied, if such placement does not violate other rules.

This can be solved with constraint programming, but there is a logical path through, so [no-computers] please.

I hope you enjoy!

$\endgroup$

2 Answers 2

11
+50
$\begingroup$

Answer:

enter image description here

In the first step, I show that

the "extra tree" must be in the left four columns. Assuming it is not the case, we easily deduce a contradiction: enter image description here

This tells us that

all trees in the right six columns have flags attached to them. Then it is not hard to find the only possibility, with some trial and error: enter image description here

Next, we notice that

the "extra tree" must be one of the three red-circled ones below, as assuming the contrary leads to contradiction: enter image description here

After that, there are not many possibilities and some more trial and error easily gives the correct answer.

Here I try to make a prettier image, but it seems that there is no hidden message in the final image.

enter image description here

$\endgroup$
2
  • $\begingroup$ The answer is of course correct! There is a fully logical path through the puzzle which does not require any trial and error. If you don't want to shoot for it, I'll post it as an alternative answer later. $\endgroup$ Commented Dec 4, 2021 at 15:20
  • $\begingroup$ That would be interesting to see! During my progress, I felt that the hardest point was to pinpoint the "extra tree" - that's why I focused on this in the answer. Otherwise it's not too complicated, even the trial and error is easy to execute because many things are forced. I'm looking forward to see your fully logical path ^_^ $\endgroup$
    – WhatsUp
    Commented Dec 4, 2021 at 15:32
6
$\begingroup$

The accepted answer is correct, but involved several trial-and-error steps. There is a very nice, strictly logical path through the puzzle that I wanted to present, not to say it's a "better" answer, but because I just don't want it to be lost.

First step:

Much like the accepted answer, we need to conclude that the extra tree cannot be on the right-hand side of the grid. Looking at the rightmost four columns, we need 9 flags. However, there are only 10 trees which can possibly have their flag in these four columns. Moreover, the tree in R5C6 cannot have its flag in R5C7, since this would force the tree in R6C7 to be the extra, and the flag for R4C7 to be in R3C7, which would mean R2C6's tree could not be in the rightmost 4 columns. So the remaining 9 trees that can have their tree in the rightmost four columns must all be used, and their trees must be in the rightmost 4 columns.

From here we know the flag for R2C6 must be in R2C7. The flag for R4C7 cannot go in R5C7, since that would leave no place for R6C7's flag, so it must be in R4C8. The two remaining unblocked spaces in C7 must have flags, with R10C7 tied to the tree in R9C7, and R8C7 tied to the tree in R7C7. Again, the one remaining unblocked space in C8 (R6C8) must be a flag, tied to the tree in R6C7. Moreover, the only place a flag can be tied to the tree in R9C8 is R9C9. The remainder of the 4 rightmost columns just rolls up at this point. Including shading of spaces that cannot be flags due to their having no adjacent tree, we have the following grid state:

Progress

Another easy deduction:

At this point there are only two possible places for flags in C6, so they must be flags, with the flag in R4C6 tied to the tree in R5C6, and the flag in R6C6 tied to the tree in R6C5. Progress thus far:

Progress

A chain of small deductions:

Note that R1C2 and R4C2 cannot both be flags. If they were, then R7C3 and R10C3 would be the only unblocked cells in C3, and would both have to have flags, which would block the remaining cells in C2, leaving only two flags in C2. Thus either R6C2 or R7C2 must be a flag, and either R8C2 or R9C2 must be a flag. These combine to ensure that none of R6C1, R8C1, nor R7C3 is a flag. This yields:

Step 1

Exactly one of R1C3, R2C3, or R3C3 is a flag. If none were, then both R5C3 and R10C3 would be flags, which would force both R7C2 and R8C2 to be flags. If more than one were, then they would have to be R1C3 and R3C3, which would leave only two flags in C2. As consequences, R2C4 is not a flag, and exactly one of R5C3 and R10C3 is a flag.

Since R2C4 is not a flag, much like in C2 we must have either R6C4 or R7C4 a flag, and either R8C4 or R9C4 a flag. As above R7C2 and R8C2 (respectively, R7C4 and R8C4) cannot both be flags, so either R6C2 or R9C2 (respectively, R6C4 or R9C4) is a flag. But we cannot mix and match: if R6C2 and R9C4 were flags, then neither R5C3 nor R10C3 could be a flag, and similarly for R6C4 and R9C2. So we must have either R6C2 and R6C4 be flags, or R9C2 and R9C4 be flags. R6C2 and R6C4 cannot both be flags, since they would have to be tied to the same tree, so R9C4 and R9C6 must be flags. R9C2 must be tied to the tree in R9C3, forcing the flag in R9C4 to be tied to the tree in R10C4. This also forces R5C3 to be a flag, tied to the tree in R6C3. The grid thus far:

Progress

Finishing up:

Note at this point that extra tree is now forced to be the one in R8C3, since there is no place for it to have a flag. Since all remaining trees must have flags, the rest of the puzzle solves trivially. The final grid:

Final

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.