12
$\begingroup$

This is a Curfew variant. Curfew is a genre invented by Hempuli; I made a slight modification to give this variant.

Rules of Unequal Curfew:

  • Draw a loop that visits every circle.
  • Each visit to a room must be the same length.
  • A room's number tells the length of each visit to that room.
  • The loop cannot make a visit of the same length twice in a row.

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ Can the loop cross itself? $\endgroup$ – Jeremy Dover Jan 23 at 18:57
  • $\begingroup$ @JeremyDover No. (Loops in logic puzzles are not allowed to cross themselves by default - if a loop can cross itself, it will be explicitly stated.) It also cannot revisit the same square multiple times. $\endgroup$ – Deusovi Jan 23 at 19:00
  • $\begingroup$ One more possibly dumb question: does the donut shaped area around the 2x2 in the middle count as a room for the "The loop cannot make a visit of the same length twice in a row" rule? $\endgroup$ – Jeremy Dover Jan 23 at 19:07
  • $\begingroup$ @JeremyDover Yes, that is a room; it follows the same rules as all other rooms. $\endgroup$ – Deusovi Jan 23 at 19:14
8
$\begingroup$

COMPLETED GRID

Grid

REASONING

First steps:

The path must pass through the upper right and lower left corners, so the path segments are forced. In boxes that are visited with length 1, the path must enter and leave a corner. In the upper left corner room, this forces there to be only a single visit, while in the upper middle room, it is possible to still use the bottom right corner, but the upper two are blocked. Because the path must stay in a room a different length each time, the path going right from R2C2 must stay in its next room at least 2 steps. If it goes directly right, joining the path coming left from R2C5, the circle in R1C3 will be blocked, so this path must cover every cell in this room. The grid thus far:

Progress

Upper right corner:

The path coming left from R1C10 cannot go down, for if it did any path visiting R1C8 would be in that room for at least 3 steps. So this path must go left, and then down. The path cannot go right from R2C8, since that would be another visit to the upper right room of length 1, so the path must exit this room down, blocking the remaining two cells from future visits, as well as R2C6.

The path from R2C10 must go left, for if not it would have two consecutive length 3 visits. It then goes down to R3C9, and from there it must continue down, otherwise the three visited cells in this room would be all of those EXCEPT the circle. The grid thus far:

Progress

At this point: Rand answered so I stopped writing up my progress. I'll try to reconstruct:

R5C10: the path entering here either goes straight through R6C10 and into R7C10, or turns left and exits the room. But in the latter case, since R6C10 needs to be traversed, the path would have to come back in the room and exit from R6C10 to R7C10. So either way, the path passes from R6C10 to R7C10. This entry forces the path to go through R7C9 and then R8C9. From R8C9, if the path turned left, the only way the path could come back to pass through R9C9 would be R9C8 -> R9C9 -> R10C9 -> R10C8, but this would require three consecutive length-2 visits. So the path goes from R8C9 down to R10C9, then left to R10C8.

Between the two length-4 rooms at left, there can be no path between them, and in particular their adjacent outer corners must turn away from each other. Suppose there was no path between R8C1 and R9C1. Then in each of the two lower left rooms, the path would have to look like a C, coming out to C3. The visit length of the donut room is at least 3 (R3C8 needs at least three squares to get back out), so R8C3 could not turn down and turning up would prematurely close the loop, so the path would go from R8C3 to R8C4, forcing R9C3->R9C4 and R10C3->C10C4. The same reasoning actually forces R8-10C4 -> R8-10C5 as well, and at this point we would have two separate instances of the path have consecutive visit length 2. Unwinding this contradiction, we find there is a path between R8C1 and R9C1.

With that in place, in the lower 4-box, we must loop around and exit to the donut via R8C2->R8C3. And the lower left room must have visit length 3 and we get the segment R10C2->R10C3. In this room, the visit length must be either 2 or 4, but the only way it can be 2 if if we turn up and go straight out, short-circuiting. So we must use all 4 boxes, departing from R10C4 to R10C5. From here, we cannot visit the circle in this room on this visit, so there must be two visits, and the entrance/egresses must be as shown. With the path R10C6->R10C7 established and the fact that the visit in the R9-10C7-8 box must be more than 2, we get:

Progress

Moving forward:

In the donut room, the visit length is at least 5. It cannot be 1, 2 or 4, since there are egresses from side rooms with those visit lengths (counting the middle, though we have not yet drawn it). It cannot be 3 either; the only way we can get from R3C8 in 3 steps to another egress is to R5C8, but that would cause a short-circuit. So the visit length here must be at least 5. UPDATE: As @aschelper pointed out in a comment, the argument against a visit length 3 is incorrect here. To exclude a path length of 3 in the donut, we proceed as below, following the path from R3C8 -> R4C8 -> R5C8 -> R5C9. From here to avoid a short circuit, we must proceed R5C9 -> R6C9 -> R6C8. We are now back in the donut room, and the only way we can leave again after three steps is R6C8 -> R6C7 -> R5C7 -> R5C6. But with a visit length of 3, from R8C6 the only possible path is R8C6 -> R7C6 -> R7C5 -> R5C5. These two segments block ingress to R6C6, a contradiction:

Contradiction

Look at the top 4-room at left next. Suppose R5C1 -> R4C1 is not on the path. Then the path goes from R5C1 to R5C2. From there it cannot go up, because that would force the room above to be a 4-visit room too, and cannot go down without a short circuit. Moreover, in the R3-4C1-2 room, the path must circle around counterclockwise and exit from R4C2. So we have three egresses from R4-6C2 to R4-6C3, each of which must continue at least 5 cells before leaving the donut. R5C3 can go neither up nor down, because it would spend less than 5 cells in the donut, so it must go to R5C4. From here it cannot go up, since that would force R4C3 up and to the right, creating a short circuit, and it cannot go right and leave the donut...it must go down to R6C4. This forces R6C3 to go down and then right to R7C4, since it cannot go down again without leaving the donut too soon. This leaves us nowhere legal to go from R6C4, a contradiction:

Contradiction

Unraveling that contradiction, we have:

From R4C1, we must have visit length 3 in this room, and we circle counterclockwise to the existing ingress. From R6C2, we go up then out into the donut. Now let's look at the center room. Each square has exactly one ingress. Look at R6C5 first, and suppose the egress goes to R7C5. This forces R8C5 to go left, where it faces R8C3. These cannot connect, so they both go up to R7. Again, they can neither connect, nor can R7C4 go right, so they both go up again, at which point R5C3 is forced right, and we see the donut's visit number would have to be 6. But following R7C5 and R8C6, we see they chase each other in a similar manner, but they can never connect because it would yield an odd visit to the donut. This forces the path from R7C5 to block the circle at R6C6, a contradiction:

Contradiction
So the egress from R6C5 must go left. From there it cannot go down, since that would forces R8C3 to either connect to R5C3 or R8C5 prematurely. If it goes up, then the ingress to R5C5 must also go up, so R5C4 must connect to either R5C3, R3C5 or R4C5. R4C5 is not possible without a visit length of 4. Connecting to either of the others yields an odd donut visit length, but this then forces the one not matched into an even donut visit, a contradiction:

Contradiction

So we have:

The path goes from R5C4 to R5C3, and thus necessarily down, then right. This forces R8C3 to go right, and then to connect to our just formed segment, showing that the actual donut visit length is 6. This segment forces R8C5 up and then right, and R8C6 to the right, with loose ends in C7. From R7C7, we cannot go right, because we would force a length 8 visit to the donut, and we cannot go up, because we could not enter the donut hole and would thus block ingress to R6C6. So these loop segments must join, allowing us to resolve the bottom middle room. The grid thus far:

Progress

Getting close!

R6C6 egress is forced right, which eliminates the possibility of a second visit to the 2-room at right. This cannot connect to R3C8, since it would create an odd visit length, and cannot connect to R3C5, because that would isolate R3C8. So it must connect to the ingress to the donut hole at R5C6. This path must use R4C7-8, so R3C8 is forced left to at least R3C6. But it cannot continue left, creating a 4-visit, so it must go down and left again, to R4C5. We cannot enter the donut hole, so we must go up. The rest of the puzzle is straightforward.

$\endgroup$
2
  • $\begingroup$ After your 4th picture, it's not entirely obvious we can't have 3-visits in the donut after connecting R3C8-R5C8-R5C9. You say it would force a short circuit, but that segment could instead come back out at R6C9. But if this happens, then R8C6 can only get to R6C5 with a 3-visit, then R6C6 has nowhere to go. $\endgroup$ – aschepler Jan 24 at 15:05
  • $\begingroup$ @aschelper This is correct...thanks for the patch! I will edit it in. $\endgroup$ – Jeremy Dover Jan 24 at 15:42
4
$\begingroup$

Detailed deduction is as follows, with the final solution and illustrative GIF at the end.

Corner deductions

Top left region:

Top left room (visit length 1) can only be entered by going in and out of a corner, so it's only entered once at the circle. Third room in the top row is entered in a similar way through the circle corner (although we don't know if it's entered again). Second room in the top row must now have visit length 4, the path in a U-shape pointing down.

Bottom left region:

Bottom left room has a circle in the corner, so it must have visit length 3 or 4. If it's 4, then the path must form a U-shape pointing right, then the room to its right must have visit length 2 or 4, and in any case we violate the "cannot make a visit of the same length twice in a row" rule.

So the bottom left box has visit length 3, with the path forming an L-shape through the corner. Then the room above it (visit length 4) must have a U-shape pointing down.

Top right region:

Fourth room in the top row (visit length 2, circle in top right) can't have a path along the top row (it would need to enter the room to the left with visit length 1), so it must have a path along the right column. Then the path must enter the top right room, and it must make a visit of length 4 to catch that top right circle (if it were length 3, then we'd have to enter the room below and violate the "cannot make a visit of the same length twice in a row" rule).

Bottom right region:

Bottom right room (visit length 2, circle in top left) must have the path either along its left column or top row. If it's along the top row, then the path's route through the room above (visit length 3, circles in top row) is known, and then there's no way to fill the room above that (visit length 2, circle in bottom right). So the bottom right room has the path along its left column, and again we can fill the room above that.

So far we have:

enter image description here

Note that the big doughnut room

cannot have visit length 1, 2, or 4, so it must be either 3 or at least 5.

Side deductions

Bottom row:

Second room in the bottom row can't have visit length 1 or 3, and 2 would either close the loop early or violate the "cannot make a visit of the same length twice in a row" to the right, so it must have visit length 4, which must be a U-shape pointing down.

Fourth room in the bottom row can't have visit length 1 or 2, and 3 would mean a path ending in the top left cell, which would leave no possible options for the middle room in the bottom row (visit length 2). So it must have visit length 4. A path in a U-shape pointing right would again leave no possible options for the next room, so it must be a U-shape pointing down.
Middle room in the bottom row must be visited twice, so there's two parallel paths within this room, either vertical or horizontal. Either way, they poke out of the top edge into the big doughnut room.

Left column:

Second room in the left column must have visit length 3 or 4. If it's 4, then both this room and the one below (visit length 4) must have U-shapes pointing right, leaving three adjacent loose ends in the big doughnut room; that would give this, which alllllmost works but not quite. So the second and third rooms in the left column can be filled, and we have:

enter image description here

Visit length for the big room

If the big doughnut room has visit length

3, then the only thing to do with the two top left loose ends is something like this (exact paths in the big doughnut room are variable, but they must enter the central room at those points). Then the central room can't possibly work. So the big doughnut room must have visit length at least 5. I couldn't find any way for visit length 5 to work either (odd numbers are hard for connecting our loose ends to the central room in a good way!), so it must have visit length at least 6.

Notice that

we have six loose ends currently poking into the big doughnut room, and we'll have four more from the central room. That means at least five visits to the room, which contains $36-4=32$ cells. So visit lengths of 7 or more are impossible, as there's not enough cells in the room. So the visit length must be 6, and we must have exactly five visits to the room (no more can fit), so the middle room of the right column must be visited just once by a vertical line on the right side.

Final solution

Now a little trial and error gives what seems to be the only possible way to fill the big doughnut room and the central room correctly:

enter image description here

Illustrative GIF:

enter image description here

$\endgroup$
10
  • $\begingroup$ In the lower left, you have two rooms with 3-cell-long visits in a row. (Also, I'd like to see reasoning for the solution - there is a "nice" path to it, with a few particular key deductions.) $\endgroup$ – Deusovi Jan 23 at 19:49
  • $\begingroup$ @Deusovi Sorry, I posted the answer and then went AFK to eat. Working on it now. $\endgroup$ – Rand al'Thor Jan 23 at 21:44
  • $\begingroup$ I feel like we're racing :-) I have three extra segments on you, but you're catching up fast :-) $\endgroup$ – Jeremy Dover Jan 23 at 22:23
  • $\begingroup$ Shoot. My contradiction just gave me the answer. That's what endearritates this site sometimes...finding the answer early is NOT good :-) $\endgroup$ – Jeremy Dover Jan 23 at 22:32
  • $\begingroup$ @JeremyDover I'm a little stuck because I can't find any possible visit length for the big doughnut room that can work. $\endgroup$ – Rand al'Thor Jan 23 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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