Case: Leap of Faith
Clue of
The -clue is one of the most impactful clues in a Skyscrapers puzzle, and it’s also an exception to many rules surrounding sequences.
[!Note] This ‘case’ could probably be split into multiple cases, but some of them are really too tiny to warrant their own page :P
From Blockade we’ve seen a simple case where we have a -clue and the lane peak is in the tail cell, allowing us to deduce the head cell must be .
But what about when the lane peak isn’t at the end?
Close and Intimate
The closest the lane peak can be is in the 2nd cell:
| 2 | 5 | |||||
Here, the head cell could be anything, because any skyscraper would be shorter than the .
| 2 | 1234 | 5 | ||||
Not very helpful!
Older and Younger Sibling
Moving the lane peak one more cell away:
| 2 | 5 | |||||
Now we have some structure. The head cell must obscure the 2nd cell:
| 2 | tall | short | 5 | |||
We need . That means can’t be , and can’t be :
| 2 | 234 | 123 | 5 | |||
Fairly straightforward.
Long-Distance
What happens when we push the lane peak further back? Now the void is really feeling large.
| 2 | 5 | |||||
Don’t fall into the trap of thinking the head cell is still guaranteed to be , that only happens when the lane peak is at the very end!
Notice here, there’s still space behind the lane peak where could go:
| 2 | 5 | 4 | ||||
We’ll handle the head cell and the cells in between (the hideout) separately.
The Head Cell
Now it’s less certain what the head cell could be, so let’s try some candidates and see what we find.
First, could we put a -skyscraper there?
| 2 | 1 | 5 | ||||
Certainly not, because any skyscraper that comes after the would be visible, giving us at least 3 visible skyscrapers, not 2.
| 1 | 5 | |||||
Now let’s try a -skyscraper.
| 2 | 2 | 5 | ||||
Since we’re hypothesising whether could be possible here, we want to consider the best case – could we find a valid solution, if everything goes right?
We could start by placing a after it, which would be obscured as we want.
| 2 | 2 | 1 | 5 | |||
But what now? No matter what we place in the remaining unsolved cell, we’ll end up having 3 skyscrapers visible, not 2 as we want.
| 2 | 1 | 5 | ||||
So we can’t have in the head cell either.
Does the same apply for ?
| 2 | 3 | 5 | ||||
If we place the between the and it of course fails.
But we could place and , leaving the in the tail cell:
| 2 | 3 | 1 | 2 | 5 | 4 | |
Now this does work. So we could have in the head cell.
will of course always be valid, so combining all this, we arrive at our final candidates:
| 2 | 34 | 5 | ||||
The Hideout
Now let’s consider the cells in the hideout.
We again need to consider the best case, because we can’t rule out solutions that might be possible. That means we’ll let the head cell be , since then it’s the most capable of obscuring skyscrapers after it.
| 2 | 4 | 5 | ||||
Finding the candidates is pretty chill, since every available skyscraper is shorter than :
| 2 | 4 | 123 | 123 | 5 | ||
Backtracking on our hypothetical deduction, we arrive at these candidates for the half-lane:
| 2 | 34 | 123 | 123 | 5 | ||
So the 2 cases are:
- goes in the head cell, so we get
- goes in the head cell, so we get (nothing happens to the hideout)
Sizing Up
Can you notice any structure in this?
This happens when the lane peak is sufficiently far away. A 5x5 skyscraper is pretty small, so let’s size up and look at a 6x6:
| 2 | 6 | ||||||
I’ll skip the details (it’ll become intuition eventually), but we get the same similar structure:
| 2 | 45 | 1234 | 1234 | 6 | |||
What happens if we move the lane peak further away again?
| 2 | 45 | 1234 | 1234 | 1234 | 6 | ||
Nothing, the candidates stay the same!
We might wonder, “wait that’s strange, this can’t continue forever, because there wouldn’t be enough candidates”.
Indeed, it doesn’t continue forever – because the lane peak will hit the edge of the grid! At this point, it collapses to Blockade, with the hideout cells using all the remaining candidates between them:
| 2 | 5 | 1234 | 1234 | 1234 | 1234 | 6 | |
So to illustrate them all in parallel, check out the different structures we obtain depending on where the lane peak lies:
| 2 | 12345 | 6 | |||||
| 2 | 2345 | 1234 | 6 | ||||
| 2 | 345 | 6 | |||||
| 2 | 6 | ||||||
| 2 | 6 | ||||||
What Did We Learn?
The key constraint here is that the head cell must be taller than all skyscrapers after it (until the lane peak).
Or, looking at it from the other angle, all the skyscrapers between the head cell and lane peak must be shorter than the head cell.
Illustrating abstractly, we have this structure:
| 2 | tall | short | … | short | N |
The Hideout
How can we determine what could go in the cells?
Well technically, we could pull out a bit of cheeky mathematical induction 😎 but that might be a bit overkill here, so we’ll just do it intuitively.
Well, we know is off-limits, because only (which is already used) could obscure it:
| < N-1 | N |
We end up with at least 3 visible skyscrapers here!
But is definitely fine, because we can place in the head cell to obscure it:
| 2 | N-1 | N-2 | N |
This could be a solution, so we can’t rule out .
The same applies for any skyscraper shorter than , hence the possible candidates are:
To put it more concretely, here’s what they’d be for various puzzle sizes:
| 2 | 12 | 4 | |||||
| 2 | 123 | 123 | 5 | ||||
| 2 | 1234 | 1234 | 1234 | 6 | |||
| 2 | 12345 | 12345 | 12345 | 12345 | 7 | ||
The Head Cell
The head cell must be able to obscure all of these in the best case.
is always able to do this, but whether the others will be able to do this depends on how far away the lane peak is.
To illustrate this effectively we’ll bring out the 7x7 big guns:
| 2 | 12345 | 7 | ||||||
| 2 | 12345 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 12345 | 7 | ||||
| 2 | 12345 | 12345 | 12345 | 12345 | 7 | |||
First and last possible cases are ommitted since they’re uninteresting.
The first half-lane here is straightforward:
| 2 | 23456 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 12345 | 7 | ||||
| 2 | 12345 | 12345 | 12345 | 12345 | 7 | |||
Next for the last half-lane, in the best case the hideout is some permutation of , so we could obscure them all with a -skyscraper or taller:
| 2 | 23456 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 12345 | 7 | ||||
| 2 | 56 | 12345 | 12345 | 12345 | 12345 | 7 | ||
Applying the same logic to the half-lane above, we need anything that could obscure , so anything or taller would work:
| 2 | 23456 | 12345 | 7 | |||||
| 2 | 12345 | 12345 | 7 | |||||
| 2 | 456 | 12345 | 12345 | 12345 | 7 | |||
| 2 | 56 | 12345 | 12345 | 12345 | 12345 | 7 | ||
And for the last half-lane:
| 2 | 23456 | 12345 | 7 | |||||
| 2 | 3456 | 12345 | 12345 | 7 | ||||
| 2 | 456 | 12345 | 12345 | 12345 | 7 | |||
| 2 | 56 | 12345 | 12345 | 12345 | 12345 | 7 | ||
Aha! There’s some obvious structure here, you love to see it. While the hideout cells remain unchanged, the head cell’s candidates change depending on how far away the lane peak is. The closer the lane peak, the more possible candidates for the head cell, and vice versa.
This should make sense – the more cells there are between the head cell and lane peak, the more skyscrapers it must obscure – hence the greater its minimum height must be.
We can now formulate a formula for the candidates by inspection (of course, you could rigorously prove it, but we’ll skip that here).
The tallest candidate is . The shortest is given by how many cells there are in the half-lane before the lane peak – for instance in the first row above, there’s 2 since the half-lane looks like . Hence the candidates for the head cell are:
Whew! That was a damn lot of heavylifting. Unfortunate result of trying to abstract and generalise, but the more you do it, the more intuitive it’ll become.
And just to clarify, you don’t need to and shouldn’t memorise these formulae! The goal is to internalise the intuition behind them; the ‘offsets’ will come naturally. Everything we talked about here, and most of solving Skyscrapers, is visualising skyscrapers obscuring skyscrapers, and the interactions between the clue and lane peak.