Skyscrapers Guide

Skyscrapers Clue Tables: Every Possible Row for Each Clue Pair in 4×4, 5×5 and 6×6

Which heights can go in each cell for every Skyscrapers edge clue and clue pair: exhaustively counted tables for 4×4, 5×5 and 6×6 grids.

Written by:

11 min read

In this article
  1. Notation: a, b and cell numbers
  2. How many rows does a single clue allow?
  3. Clue pairs: the count tables
  4. 4×4: every row for every clue pair
  5. 5×5: candidate table for clue pairs
  6. 6×6: the most useful rows
  7. Two more rules from the tables
  8. A worked example
  9. How to use the tables while solving
  10. Frequently asked questions

When you look at the two clues at either end of a row in Skyscrapers, the natural question is: “How many arrangements fit these two numbers, and which cells are already decided?” This article answers that question with tables. We went through every single clue and every clue pair for 4×4, 5×5 and 6×6 grids. A computer counted every possible row (24 for 4×4, 120 for 5×5, 720 for 6×6) and recorded which heights can appear in each cell. None of the numbers below are estimates; every one of them comes from that count.

The basic rules and solving techniques are covered in our Skyscrapers solving strategies guide. This article is the reference sheet to keep open next to it: find the clues of the row you are stuck on and copy your pencil marks straight from the table.

Notation: a, b and cell numbers

N is the grid size (4, 5 or 6). The clue on the left of a row is a and the clue on the right is b. Cells are numbered 1 to N from left to right. The same tables work for columns: read the top clue as “left” and the bottom clue as “right”. A dash (–) in a table means every height is possible in that cell, so the clue tells you nothing about it.

How many rows does a single clue allow?

Start with a clue on one side only. The table below shows how many rows match each clue value (the total number of rows is in brackets):

GridClue 1Clue 2Clue 3Clue 4Clue 5Clue 6
4×4 (24)61161
5×5 (120)245035101
6×6 (720)12027422585151

Two things stand out:

  • Clue 2 is the least informative clue. In a 5×5 grid a clue of 2 matches 50 of the 120 rows, so it removes only a little over half of the possibilities. A clue of 4 leaves 10 rows and a clue of 5 leaves exactly one. If a row has a 2 and a larger clue, starting from the larger clue is almost always faster.
  • A clue of 1 keeps exactly 1/N of the rows (24 in 5×5), but what it tells you is very valuable: the exact position of the tallest building. Larger clues cut the count further but spread their information over the first few cells.

For the mathematically curious: these are the unsigned Stirling numbers of the first kind. The number of buildings visible from the left is the number of “left-to-right maxima” of a permutation, and the distribution of that count is exactly given by the Stirling numbers. The 5×5 sequence 24, 50, 35, 10, 1 is one example.

What does a single clue say about individual cells? For a 5×5 row:

ClueRowsCell 1Cell 2Cell 3Cell 4Cell 5
12451 2 3 41 2 3 41 2 3 41 2 3 4
2501 2 3 41 2 3 5–––
3351 2 31 2 3 4–––
4101 21 2 31 2 3 4––
5112345

Look at the clue 2 row: there is no 4 in cell 2. That is a lesser-known rule that holds for every grid size:

Rule 1: On an edge with clue 2, the second cell from the clue can never hold N−1.

The reason is short. With clue 2 the first cell cannot be N (you would see only one building). If the second cell were N−1, the first cell would be shorter than it, so you would see the first cell, N−1, and N further back: at least three buildings. The same holds in 6×6: the second cell next to a clue of 2 can never be 5.

Clue pairs: the count tables

The really strong information appears when you read both ends of a row together. In the tables below the rows are the left clue (a), the columns are the right clue (b), and each number is how many rows satisfy both clues.

4×4

b = 1b = 2b = 3b = 4
a = 10231
a = 22630
a = 33300
a = 41000

5×5

b = 1b = 2b = 3b = 4b = 5
a = 1061161
a = 26221840
a = 31118600
a = 464000
a = 510000

6×6

b = 1b = 2b = 3b = 4b = 5b = 6
a = 10245035101
a = 2241001054050
a = 350105601000
a = 4354010000
a = 51050000
a = 6100000

The triangle of zeros is the a + b ≤ N + 1 rule from the strategies guide: if the clues add up to more than that, the row has no solution. When the sum is exactly N + 1 the count drops sharply (only 6 rows for 3 | 3 in 5×5). 2 | 2 is the busiest box at every size: 22 rows in 5×5 and 100 in 6×6.

You don't have to list every row to get these numbers. The tallest building is visible from both sides. The buildings to its left decide the left clue, and the ones to its right decide the right clue. That leads to a formula: the number of rows for a pair a | b is “a+b−2 choose a−1” times the Stirling number for N−1 elements and a+b−2 cycles. For example, 2 | 3 in 5×5 gives 3 choose 1 (3) × 6 = 18. We checked every box in the tables against this formula.

4×4: every row for every clue pair

A 4×4 grid is small enough to list every row that fits each pair. When you are stuck on an easy puzzle, this list shows the whole row:

Left | RightRowsEvery possible row
1 | 224 1 2 3, 4 2 1 3
1 | 334 1 3 2, 4 2 3 1, 4 3 1 2
1 | 414 3 2 1
2 | 123 1 2 4, 3 2 1 4
2 | 261 4 2 3, 2 1 4 3, 2 4 1 3, 3 1 4 2, 3 2 4 1, 3 4 1 2
2 | 331 4 3 2, 2 4 3 1, 3 4 2 1
3 | 131 3 2 4, 2 1 3 4, 2 3 1 4
3 | 231 2 4 3, 1 3 4 2, 2 3 4 1
4 | 111 2 3 4

Every pair except 2 | 2 leaves at most three rows. In a 4×4 puzzle, a row with clues at both ends is usually solved completely by one extra piece of information from a column.

5×5: candidate table for clue pairs

For the medium 5×5 grids we give the possible heights per cell instead of listing every row. Find the two clues of a row and take your pencil marks directly from here:

Left | RightRowsCell 1Cell 2Cell 3Cell 4Cell 5
1 | 2651 2 31 2 31 2 34
1 | 31151 2 3 41 2 3 41 2 41 2 3
1 | 4651 2 3 41 2 3 41 2 31 2
1 | 5154321
2 | 1641 2 31 2 31 2 35
2 | 2221 2 3 41 2 3 51 2 3 51 2 3 51 2 3 4
2 | 3181 2 3 41 2 3 5–1 2 3 41 2 3
2 | 441 2 3 453 42 31 2
3 | 1111 2 31 2 41 2 3 41 2 3 45
3 | 2181 2 31 2 3 4–1 2 3 51 2 3 4
3 | 361 2 32 3 452 3 41 2 3
4 | 161 21 2 31 2 3 41 2 3 45
4 | 241 22 33 451 2 3 4
5 | 1112345

A few patterns stand out:

  • The pairs 2 | 4 and 4 | 2 fix the 5 and leave only two candidates in each of the three cells between the 5 and the clue of 4.
  • In a 3 | 3 row the 5 is always in the middle and the ends can only be 1, 2 or 3.
  • In a 2 | 2 row the 4 appears only in the two end cells. That is not a coincidence; it is Rule 2 below.

6×6: the most useful rows

Listing all 21 clue pairs for the hard 6×6 grids would make the table unreadable, so we picked the ones that help most: the pairs that add up to 7 (they fix the tallest building) and pairs like 1 | 2 and 2 | 2 that give information at the edges.

Left | RightRowsCell 1Cell 2Cell 3Cell 4Cell 5Cell 6
1 | 22461 2 3 41 2 3 41 2 3 41 2 3 45
1 | 61654321
2 | 12451 2 3 41 2 3 41 2 3 41 2 3 46
2 | 21001 2 3 4 51 2 3 4 61 2 3 4 61 2 3 4 61 2 3 4 61 2 3 4 5
2 | 551 2 3 4 564 53 42 31 2
3 | 4101 2 3 42 3 4 563 4 52 3 41 2 3
4 | 3101 2 32 3 43 4 562 3 4 51 2 3 4
5 | 251 22 33 44 561 2 3 4 5
6 | 11123456

Two more rules from the tables

Rule 2: If a row has a clue of 2 at both ends, the second tallest building (N−1) is always in one of the two end cells.

Proof: N−1 stands either to the left or to the right of the tallest building. Say it is to the left. Looking from the left, nothing in front of N−1 is taller, so N−1 is visible, and N behind it is visible too. With a clue of 2 nothing else may be visible, which is only possible if N−1 is the first cell. If N−1 is on the right, the same argument applies to the right end. Because 2 | 2 rows are the busiest rows, this rule helps exactly where you need it most: in 5×5 it cuts 22 rows down to two possible spots for the 4.

Rule 3: If a row has a 1 at one end and a 2 at the other, N is next to the 1 and N−1 is next to the 2.

Proof: the clue 1 puts N next to it. From the other end N is in the farthest cell and always visible, so with a clue of 2 exactly one building may be seen before it. N−1 is always visible from that end, since nothing in front of it is taller. So that single visible building is N−1, and it has to be the first cell. That is why the last cell of the 1 | 2 row has a single candidate at every size (3 in 4×4, 4 in 5×5, 5 in 6×6).

A worked example

Take a 5×5 row with a clue of 2 at both ends, and suppose we know three things: the column of cell 1 already contains a 4, and the columns of cells 2 and 4 already contain a 5.

  1. Start: 2 | 2 allows 22 rows.
  2. Rule 2: the 4 must be at an end. It cannot go in cell 1, so cell 5 = 4. That leaves 11 rows.
  3. Placing the 5: it cannot be the first cell (left clue 2) and cannot be in cells 2 or 4 (columns). So cell 3 = 5. The remaining rows are 2 1 5 3 4, 3 1 5 2 4 and 3 2 5 1 4.
  4. Visibility from the left: only cell 1 and the 5 may be visible, so cell 2 must be shorter than cell 1. All three rows satisfy that, so the decision comes from cell 1's column. If that column has a 3, the row is fixed as 2 1 5 3 4.

We went from 120 possible rows to one without a single guess, and the first two steps came straight from the tables.

How to use the tables while solving

  1. At the start, find every row and column with clues at both ends and write the candidates from the pair table as pencil marks.
  2. Deal with the pairs that allow the fewest rows first (1 | N, N | 1 and pairs that add up to N + 1); they often fix one or two cells.
  3. Apply Rule 1 on edges with a 2, Rule 2 on 2 | 2 rows and Rule 3 on 1 | 2 rows.
  4. After every placement, eliminate along the row and column as in Sudoku; the table candidates shrink quickly once column information is added.

To try the tables out, open an easy 4×4, medium 5×5 or hard 6×6 Skyscrapers puzzle. New to the game? Start with what Skyscrapers is and how to play.

Frequently asked questions

Do these tables work for every Skyscrapers puzzle?

Yes. They depend only on the rules of a single line: each height is used once and a taller building hides the ones behind it. They hold for any Skyscrapers puzzle of the same size, whichever site or book it comes from.

Which table do I use if a row has a clue on one side only?

The candidate table in the “single clue” section. For example, in a 5×5 grid the first cell next to a clue of 3 can be at most 3 and the second cell at most 4.

What if the clues add up to more than N + 1?

Then the row has no solution, which is what the zeros in the count tables show. If you design your own puzzles, it is the first thing to check.

Written by

· Founder and developer

Founder and developer of Ozerlyn Games. He designs the puzzles and mobile apps on this site and writes the guides from his own solving experience and real player data.

Try what you just read in a Skyscrapers puzzle

Play Skyscrapers