Lesson progress
0 / 10 complete
Lesson 27.8Chapter 27 bonusLesson 27.9
Bonus Chapter 27 · Puzzle Studio 9

Solve Skyscraper Latin Squares from Visibility Totals

Build a Latin square of building heights, scan each skyline from four directions, and use the four outside totals to eliminate every impossible city plan.

Latin squaresvisibility cluescase checkingunique solutionoffline interactive
Your progress is saved in this browser.

Your goal: finish this five-by-five city

Each cell holds one building height. Fill the empty cells with 1–5, once in every row and column, keeping the five given heights. From any edge, a building is visible only if it is taller than every building before it.

Your five by five city puzzleFive fixed buildings: top left 1, top right 2, center 5, bottom left 4, bottom right 3. Boxed side totals: top 10, right 11, bottom 13, left 12. All other cells are empty.1254310111312

The boxed numbers are side totals. For example, the top 10 is the sum of five visibility counts, one for each column viewed from above. It is not the height of one building. Your completed city must give top 10, right 11, bottom 13, and left 12.

  1. Learn to see and count: Missions 1–4 use a short skyline and a completed 4×4 teaching city. You inspect these examples; they are not the city you must fill.
  2. Plan the 5×5 solution: Mission 5 returns to the givens above. Missions 6–7 show how trying cases and checking side totals narrows the possibilities.
  3. Build your city: Mission 8 is the editable 5×5 puzzle. You can attempt it after Mission 5 and return to the case demonstrations if you need help.

Two systems work together

A skyscraper puzzle is not solved by visibility alone. Every row and column must first be a Latin line, and every outside clue must then agree with the view.

Latin ruleUse each height exactly once in every row.
Column ruleUse each height exactly once in every column.
Visibility ruleA building is visible only when it is taller than every building before it.
Total ruleEach boxed side number is the sum of all visibility counts on that side.

The scan rule

Visible ⇔ current height > tallest height already seen
Side total = clue1 + clue2 + ··· + cluen

The same completed grid is scanned from the top, right, bottom, and left.

1

Scan one skyline

A building must set a new height record to remain visible
Not complete

Interactive skyline scanner

The worked example row is a permutation of 1, 2, 3, and 4.

Visibility ledger

Scanned0 / 4
Visible so far0
Tallest seen
Full clue3
Worked example: in 1, 3, 4, 2, the buildings 1, 3, and 4 are visible from the left; height 2 is hidden behind 4.
2

Make every row and column Latin

Visibility clues are meaningful only after the height inventory is correct
Not complete
A completed 4×4 teaching city. First check that each row and column contains 1–4 once. We use this smaller, already-filled city to learn the rules; your main puzzle later uses heights 1–5.

original 4 × 4 building square

Inspect one row or column

Line values1, 3, 4, 2
Distinct values4
Missingnone
Latin?yes
Every row and column uses 1–4 exactly once.
3

Reconstruct Figure 27-20

Sixteen individual clues become four outside totals
Not complete
Learn the meaning of a side total. Inspect individual views of the completed 4×4 city, then add the four counts on each side. Later, a side of your 5×5 city will have five counts to add.

Click any parenthesized clue

Read the chosen view

Row 1 from the left
Visible3
Sideleft
Line1
Tallest4

The visible buildings set successive records: 1, then 3, then 4.

The left-side total is 3+2+3+1=9. The boxed number 9 is not a clue for one row; it is the sum of four row clues.
4

Filter possible lines by two visibility clues

Added scaffold: test all permutations instead of guessing
Not complete

Visibility-pair laboratory

All permutations24
Compatible lines3
Clue 1 meanstallest first
Clue n meansincreasing

Why both ends matter

One clue narrows the line. Two opposite clues often narrow it much further.
For 1, 2, 3, 4: left 3 and right 2 → 3 possible rows
A clue of 1 forces the height 4 or 5 at the viewing edge. A clue equal to the line length forces a strictly increasing skyline from that side.
5

Read the 5 × 5 practice problem

Five fixed buildings and four aggregate visibility totals
Not complete
Return to your actual 5×5 puzzle. Keep the five given buildings. Use the row and column restrictions to narrow the possible heights in other cells. The four boxed totals are the additional conditions your final city must satisfy.

Figure 27-21

What is given?

Grid size5 × 5
Fixed cells5
Heights1–5
Side totals4
  • Top-left and top-right are 1 and 2.
  • The center is 5.
  • Bottom-left and bottom-right are 4 and 3.
  • Top, right, bottom, and left totals are 10, 11, 13, and 12.
Learning notes: page 166 says there are 25 parenthesized visibility numbers. A 5 × 5 grid has five views from each of four sides, so the diagram contains 20. This page uses the diagram’s 20 clues.
6

Follow the worked example’s A–F case tree

Use Latin restrictions before testing visibility totals
Not complete
Try one branch before counting all branches. A–F are names for six particular cells, not extra building heights. For example, try A=1, B=3, C=4, D=2. Column 3 then needs 1 and 3 in its two remaining places; choose E=3. Row 3 needs 2 and 4 in its two remaining places; choose F=2.

These six choices form one case (also called a signature). They still allow two different complete Latin grids, because some other cells are not yet fixed. Load this example and use Next completion to compare them. Neither is accepted as the final answer until its side totals have been checked.

Choose the six entries for one case

Counts across the whole case tree: A–D each have two choices, making 2×2×2×2 = 16 first-stage cases. Each has 2×2 = 4 E–F choices. That makes 64 six-entry cases in total. These totals stay fixed when you select a different case.
Complete Latin grids for your selected case1
This A–F signature extends to at least one Latin square.

Current completion

Completion 1 of 1
Why only two choices each? A and B are constrained by the already fixed values in columns 5 and 1. C and D are constrained by row endpoints and the center 5. Then E and F each choose between the two values still missing from one line.
7

Filter complete Latin squares by side totals

Added exact audit: watch 80 candidates collapse to one
Not complete
Check the side totals after the Latin rules. Start with 80 complete grids that obey the row, column, and five-given rules. Each filter keeps only those satisfying one more side total. “Remaining grids” refers to the filters you have applied so far; you must check all four totals even if only one grid remains earlier.

Condition filter

Current stage0 / 4
Grids remaining at this stage80
Final matches after all four filters
Why 64 cases produce 80 complete grids: 48 cases have one completion each, and 16 have two: 48 + 16×2 = 80. A case records only six entries; a completion fills all 25 cells. The filters then test these 80 complete grids against the side totals.

Inspect a remaining candidate

Candidate 1 of 80
8

Solve the 5 × 5 practice problem

Any entry must satisfy both Latin and skyline conditions
Not complete
Your own city. Select a blank cell, then choose a height from the palette. Fill all 25 cells, keep the five givens, and satisfy every row, column, and side total. A compatible completion is a possible finished answer that still fits your entries; its count is not a count of cells you have completed.

Editable city plan

Live constraint audit

Filled5 / 25
Duplicate cells0
Full solutions still compatible with your entries1
Matched totals0 / 4

This count uses all four target totals from the start. It can be 1 while most of your cells are still blank. Mission 7’s count instead changes as totals are applied one at a time.

Complete the nonfixed cells. The exact candidate tracker remains available as a safety check.
Click an outside clue to inspect a line. Select a nonfixed cell, then choose a height or erase from the palette. The exact-candidate count includes all four totals as well as the five givens; it is stricter than the duplicate check.

Incomplete lines display a dash until all five heights are present.

Best solving habit: reject a value as soon as it repeats a height in its row or column. Then use visibility totals to choose between the surviving Latin possibilities.
9

Skyscraper workshop

Eight objective checks · all eight correct complete the mission
Not complete
10

Exit ticket and certificate

Five correct responses unlock the final Chapter 27 certificate
Not complete