Study guide

7.2 Grid Perimeter, Shaded Area, Sub-Shape Counting & Shortest Lattice Paths

TR-YÖS 2026 — Türkiye Yurt Dışından Öğrenci Kabul Sınavı Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: TR-YÖS Overview, Eligibility & Admissions Strategy

1.1 Current TR-YÖS Identity, Two-Test Blueprint and Admissions 1.2 Candidate Eligibility, Blue Card (Mavi Kart), Dual Citizenship & Registration 1.3 ÖSYM Scoring Mathematics, the 0.5 Raw-Point Rule, 1/4 Penalty & 100-Minute Pacing

2 Chapter 2: Sayısal Yetenek — Number Series, Sequences & Cryptarithmetic

2.1 Linear, Polynomial, Alternating & Recursive Number Series (Sayı Dizileri) 2.2 Number Matrices, Row-Column Operations & Functional Input-Output Tables 2.3 Cryptarithmetic (Harfli İşlemler), Letter-Digit Coding (Şifreler) & Symbolic Operators

3 Chapter 3: Sayısal Yetenek — Visual Series, Analogies & Odd-One-Out

3.1 Figural Series, Angular Rotations, Translations & Element-Counting Rules 3.2 Visual Analogies, Geometric Transformations & Proportion Mapping 3.3 Visual Classification, Topological Invariants & Odd-One-Out (Farklı Olanı Bulma)

4 Chapter 4: Sayısal Yetenek — Visual Matrices, Pattern Completion & Grid Logic

4.1 3x3 Visual Matrices: Superposition, Boolean XOR & Attribute Permutations 4.2 Pattern & Grid Completion (Şekil Tamamlama), Quarter-Tile Symmetry & Tessellations 4.3 Magic Squares, Latin Grids, Sudoku Variants & Relational Matrix Tables

5 Chapter 5: Sayısal Yetenek — 3D Spatial Reasoning: Cubes, Folding & Reflections

5.1 3D Block Stacks, Hidden Cube Counting & Painted Cube Formulas (Küp Sayma) 5.2 Cube Nets (Küp Açılımları), Opposite-Face Parities & 3D Die Rotations 5.3 Paper Folding & Hole Punching (Kağıt Katlama-Kesme), Mirror & Water Reflections

6 Chapter 6: Sayısal Yetenek — Balance Scales, Gears, Clocks & Calendar Logic

6.1 Balance Scales (Teraziler), Symbolic Weight Substitution & Inequality Scales 6.2 Meshed Gears (Çarklar), Concentric Pulleys, Belt Directions & Turn Ratios 6.3 Clock Hand Angles (Saat Problemleri), Modular Calendar Arithmetic & Compass Bearings

7 Chapter 7: Sayısal Yetenek — Data Interpretation, Grid Counting & Deductive Logic

7.1 Bar, Line and Pie Charts & Multi-Table Data Interpretation (Tablo ve Grafikler) 7.2 Grid Perimeter, Shaded Area, Sub-Shape Counting & Shortest Lattice Paths 7.3 Deductive Logic, Linear/Circular Seating Arrangements & Truth-Value Puzzles

8 Chapter 8: Temel Matematik — Number Systems, Base Arithmetic, Divisibility & Rationals

8.1 Number Sets, Parity, Consecutive Sums, Factorials & Base-n Arithmetic (Taban Aritmetiği) 8.2 Division Algorithm, Divisibility Rules, Prime Factorization, Divisors, EBOB (GCD) & EKOK (LCM) 8.3 Rational Numbers, Infinite/Telescoping Fractions & Repeating Decimals (Devirli Ondalık Sayılar)

9 Chapter 9: Temel Matematik — Exponents, Radicals, Factoring, Equations & Inequalities

9.1 Exponential Equations (Üslü Sayılar), Nested Radicals & Rationalizing Denominators 9.2 Algebraic Identities (Çarpanlara Ayırma), Sums and Differences of Cubes & Reciprocal Sums 9.3 First-Degree Linear Systems, Simple Inequalities (Basit Eşitsizlikler) & Absolute Value (Mutlak Değer)

10 Chapter 10: Temel Matematik — Ratios, Proportions & Classic Word Problems

10.1 Ratios, Direct/Inverse/Compound Proportions (Oran-Orantı) & Means 10.2 Number, Fraction, Age (Yaş) & Work/Pipe (İşçi-Havuz) Word Problems 10.3 Percentage, Profit-Loss (Kâr-Zarar), Mixture (Karışım) & Motion (Hareket) Problems

11 Chapter 11: Temel Matematik — Sets, Modular Operations, Functions, Polynomials & Quadratics

11.1 Sets (Kümeler), Cartesian Products, Binary Operations (İşlem) & Modular Arithmetic (Modüler Aritmetik) 11.2 Functions (Fonksiyonlar): Domain/Range, Composition, Inverses & Functional Equations 11.3 Polynomials (Polinomlar), Quadratic Equations, Vieta's Formulas & Parabolas

12 Chapter 12: Temel Matematik — Logarithms, Complex Numbers, Combinatorics, Trigonometry & Calculus

12.1 Logarithms (Logaritma), Complex Numbers & Arithmetic/Geometric Sequences (Diziler) 12.2 Permutations, Combinations, Binomial Expansion & Probability (Olasılık) 12.3 Trigonometry and Optional Calculus Enrichment

13 Chapter 13: Temel Matematik (Geometri) — Angles, Triangles, Similarity, Area & Polygons

13.1 Parallel-Line Angle Rules (Z, U, M, Kalem Ucu), Triangle Angles & Triangle Inequality 13.2 Right Triangles, Euclid's Altitude Laws, Angle Bisectors, Medians, Similarity & Area 13.3 Regular Polygons, Quadrilaterals, Parallelograms, Trapezoids, Rhombuses, Rectangles & Squares

14 Chapter 14: Temel Matematik (Geometri) — Circles, 3D Solids & Analytic Geometry

14.1 Circle Angles, Chords, Tangents, Power of a Point (Kuvvet) & Sector/Annulus Area 14.2 3D Solid Geometry (Katı Cisimler): Prisms, Cylinders, Pyramids, Cones & Spheres 14.3 Analytic Geometry (Analitik Geometri): Points, Lines, Slopes, Point-to-Line Distance & Circles

7.2 Grid Perimeter, Shaded Area, Sub-Shape Counting & Shortest Lattice Paths

Key Takeaways Explain This Topic AI

An m × n m \times n m × n grid of unit squares is bounded by m + 1 m+1 m + 1 horizontal lines and n + 1 n+1 n + 1 vertical lines, containing ( m + 1 2 ) ( n + 1 2 ) = m ( m + 1 ) 2 ⋅ n ( n + 1 ) 2 \binom{m+1}{2}\binom{n+1}{2} = \frac{m(m+1)}{2}\cdot\frac{n(n+1)}{2} ( 2 m + 1 ​ ) ( 2 n + 1 ​ ) = 2 m ( m + 1 ) ​ ⋅ 2 n ( n + 1 ) ​ total rectangles and ∑ k = 1 min ⁡ ( m , n ) ( m − k + 1 ) ( n − k + 1 ) \sum_{k=1}^{\min(m,n)}(m-k+1)(n-k+1) ∑ k = 1 m i n ( m , n ) ​ ( m − k + 1 ) ( n − k + 1 ) total squares.

The number of rectangles in an m × n m \times n m × n grid that cover a specific marked unit cell at row r r r and column c c c is r ( m − r + 1 ) ⋅ c ( n − c + 1 ) r(m - r + 1) \cdot c(n - c + 1) r ( m − r + 1 ) ⋅ c ( n − c + 1 ) .

In a triangle divided from apex A A A into n n n base segments and intersected by m m m horizontal lines parallel to the base, the total number of triangles is m ⋅ n ( n + 1 ) 2 m \cdot \frac{n(n+1)}{2} m ⋅ 2 n ( n + 1 ) ​ .

Shaded lattice polygon areas are solved via Bounding-Box Subtraction or Pick's Theorem ( Area = I + B 2 − 1 \text{Area} = I + \frac{B}{2} - 1 Area = I + 2 B ​ − 1 ), while polyomino perimeters obey P = 4 N squares − 2 N shared edges P = 4N_{\text{squares}} - 2N_{\text{shared edges}} P = 4 N squares ​ − 2 N shared edges ​ .

Shortest paths across an m × n m \times n m × n street grid equal ( m + n m ) \binom{m+n}{m} ( m m + n ​ ) , whereas grids with missing road segments or multiple obstacles are solved via Pascal-triangle node addition (Köşe Toplama Yöntemi).

Last updated: October 2026

7.2 Grid Perimeter, Shaded Area, Sub-Shape Counting & Shortest Lattice Paths

Visual-quantitative problems on the TR-YÖS bridge geometry and combinatorics. Rather than asking you to count dozens of overlapping shapes or trace paths by hand—which invites double-counting or omission errors under time pressure—these items reward clean structural formulas for sub-shape enumeration , unit-grid area/perimeter , and lattice path routing .

The rectangle and square counts below use sides along the drawn grid lines; tilted squares require a different count.

  • 1. Counting Rectangles, Squares, and Triangles in a Grid ( Şekil Sayma )
  • Rectangles and Squares in an m × n m \times n m × n Grid

Consider an m × n m \times n m × n grid made of m m m rows and n n n columns of 1 × 1 1 \times 1 1 × 1 unit squares. Geometrically, this grid is formed by m + 1 m + 1 m + 1 horizontal lines and n + 1 n + 1 n + 1 vertical lines :

Total Number of Rectangles (Including Squares): Every rectangle is uniquely determined by choosing any 2 2 2 of the m + 1 m + 1 m + 1 horizontal lines (top and bottom borders) and any 2 2 2 of the n + 1 n + 1 n + 1 vertical lines (left and right borders): N rectangles = ( m + 1 2 ) × ( n + 1 2 ) = m ( m + 1 ) 2 ⋅ n ( n + 1 ) 2 N_{\text{rectangles}} = \binom{m+1}{2} \times \binom{n+1}{2} = \frac{m(m+1)}{2} \cdot \frac{n(n+1)}{2} N rectangles ​ = ( 2 m + 1 ​ ) × ( 2 n + 1 ​ ) = 2 m ( m + 1 ) ​ ⋅ 2 n ( n + 1 ) ​

Total Number of Squares: A k × k k \times k k × k square can be placed in ( m − k + 1 ) (m - k + 1) ( m − k + 1 ) vertical positions and ( n − k + 1 ) (n - k + 1) ( n − k + 1 ) horizontal positions. Summing over all possible side lengths k = 1 , 2 , … , min ⁡ ( m , n ) k = 1, 2, \dots, \min(m, n) k = 1 , 2 , … , min ( m , n ) gives the countdown product sum: N squares = ∑ k = 1 min ⁡ ( m , n ) ( m − k + 1 ) ( n − k + 1 ) = m n + ( m − 1 ) ( n − 1 ) + ( m − 2 ) ( n − 2 ) + … N_{\text{squares}} = \sum_{k=1}^{\min(m,n)} (m - k + 1)(n - k + 1) = m n + (m-1)(n-1) + (m-2)(n-2) + \dots N squares ​ = k = 1 ∑ m i n ( m , n ) ​ ( m − k + 1 ) ( n − k + 1 ) = mn + ( m − 1 ) ( n − 1 ) + ( m − 2 ) ( n − 2 ) + …

In the special case of an n × n n \times n n × n square grid , this simplifies to the sum of squares: N squares ( n × n ) = 1 2 + 2 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 N_{\text{squares }(n \times n)} = 1^2 + 2^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6} N squares ( n × n ) ​ = 1 2 + 2 2 + ⋯ + n 2 = 6 n ( n + 1 ) ( 2 n + 1 ) ​

To find the number of non-square rectangles , compute N rectangles − N squares N_{\text{rectangles}} - N_{\text{squares}} N rectangles ​ − N squares ​ .

Rectangles and Squares Containing a Specific Marked Cell ( r , c ) (r, c) ( r , c ) : Suppose the unit cell at row r r r ( 1 ≤ r ≤ m 1 \le r \le m 1 ≤ r ≤ m from the top) and column c c c ( 1 ≤ c ≤ n 1 \le c \le n 1 ≤ c ≤ n from the left) contains a star or shaded mark. For a rectangle to enclose cell ( r , c ) (r, c) ( r , c ) :

Its top border must be chosen from the r r r horizontal grid lines on or above row r r r .

Its bottom border must be chosen from the m − r + 1 m - r + 1 m − r + 1 horizontal grid lines on or below row r r r .

Its left border must be chosen from the c c c vertical grid lines on or to the left of column c c c .

Its right border must be chosen from the n − c + 1 n - c + 1 n − c + 1 vertical grid lines on or to the right of column c c c .

By the multiplication principle: N containing ( r , c ) = r ( m − r + 1 ) × c ( n − c + 1 ) N_{\text{containing }(r,c)} = r(m - r + 1) \times c(n - c + 1) N containing ( r , c ) ​ = r ( m − r + 1 ) × c ( n − c + 1 )

If a question asks for squares of side k k k containing ( r , c ) (r, c) ( r , c ) , count how many valid k × k k \times k k × k windows overlap row r r r and column c c c for each k = 1 , 2 , … , min ⁡ ( m , n ) k = 1, 2, \dots, \min(m, n) k = 1 , 2 , … , min ( m , n ) and sum the valid placements.

Counting Triangles in Cevian Fans from Vertex A A A

Suppose k k k interior line segments (cevians) are drawn from apex A A A of △ A B C \triangle ABC △ A BC down to base B C BC BC , partitioning B C BC BC into n = k + 1 n = k + 1 n = k + 1 elementary base segments :

Any choice of 2 2 2 rays out of the n + 1 n + 1 n + 1 rays emanating from A A A forms a unique triangle with apex A A A : there are ( n + 1 2 ) = n ( n + 1 ) 2 \binom{n+1}{2} = \frac{n(n+1)}{2} ( 2 n + 1 ​ ) = 2 n ( n + 1 ) ​ such triangles.

If m m m horizontal lines (including base B C BC BC itself) are drawn parallel to B C BC BC across the fan, each horizontal line acts as an independent base for those n ( n + 1 ) 2 \frac{n(n+1)}{2} 2 n ( n + 1 ) ​ apex- A A A triangles: N triangles = m × n ( n + 1 ) 2 N_{\text{triangles}} = m \times \frac{n(n+1)}{2} N triangles ​ = m × 2 n ( n + 1 ) ​

  • 2. Shaded Grid Area & Polyomino Perimeter ( Birim Kareli Zeminde Alan ve Çevre )
  • Shaded Lattice Polygons: Bounding Box vs. Pick's Theorem

When a tilted triangle or polygon is drawn with vertices on the intersections (lattice points) of a unit-square grid, its side lengths are irrational square roots, so avoid using 1 2 b h \frac{1}{2}bh 2 1 ​ bh with tilted bases. Instead, apply one of two exact methods:

Bounding-Box Subtraction ( Çerçeve Alanından Dış Üçgenleri Çıkarma ): Enclose the shaded polygon inside the tightest axis-parallel rectangle of area W × H W \times H W × H , then subtract the areas of the unshaded right triangles ( 1 2 a b \frac{1}{2}ab 2 1 ​ ab ) and corner rectangles around the outside.

Pick's Theorem ( Pick Teoremi ): For any simple polygon whose vertices all lie on integer lattice points: Area = I + B 2 − 1 \text{Area} = I + \frac{B}{2} - 1 Area = I + 2 B ​ − 1

where I I I is the number of lattice points strictly inside the polygon and B B B is the number of lattice points lying on its boundary perimeter. Along a straight segment from ( x 1 , y 1 ) (x_1, y_1) ( x 1 ​ , y 1 ​ ) to ( x 2 , y 2 ) (x_2, y_2) ( x 2 ​ , y 2 ​ ) , the number of boundary steps is gcd ⁡ ( ∣ x 2 − x 1 ∣ , ∣ y 2 − y 1 ∣ ) \gcd(\lvert x_2 - x_1 \rvert, \lvert y_2 - y_1 \rvert) g cd (∣ x 2 ​ − x 1 ​ ∣ , ∣ y 2 ​ − y 1 ​ ∣) .

Polyomino Perimeter Formula

When N squares N_{\text{squares}} N squares ​ unit squares (each having perimeter 4 4 4 ) are glued together edge-to-edge, every shared internal edge eliminates two unit segments ( 1 1 1 from each adjacent square) from the exterior boundary: Perimeter = 4 N squares − 2 N shared internal edges \text{Perimeter} = 4 N_{\text{squares}} - 2 N_{\text{shared internal edges}} Perimeter = 4 N squares ​ − 2 N shared internal edges ​

The shared-edge formula counts every boundary, including hole boundaries. To obtain only the outer perimeter of a shape with holes, subtract the boundary lengths of those holes. Use direct edge counting when a bounding-box shortcut is not justified.

3. Shortest Lattice Paths ( En Kısa Yol / Izgara Yolları )

A traveler moving along an m × n m \times n m × n rectangular street grid from bottom-left corner A ( 0 , 0 ) A(0,0) A ( 0 , 0 ) to top-right corner B ( m , n ) B(m,n) B ( m , n ) takes a shortest path if and only if every step moves strictly East ( E E E , + x +x + x ) or North ( N N N , + y +y + y ) .

Unrestricted Grid ( m m m steps East, n n n steps North): Every shortest path is a permutation of m m m identical E E E 's and n n n identical N N N 's of total length m + n m + n m + n : Paths ( A → B ) = ( m + n m ) = ( m + n ) ! m ! n ! \text{Paths}(A \to B) = \binom{m+n}{m} = \frac{(m+n)!}{m!\,n!} Paths ( A → B ) = ( m m + n ​ ) = m ! n ! ( m + n )! ​

Mandatory Checkpoint C ( x 1 , y 1 ) C(x_1, y_1) C ( x 1 ​ , y 1 ​ ) : By the multiplication rule, multiply the paths from A A A to C C C by the paths from C C C to B B B : Paths ( A → C → B ) = ( x 1 + y 1 x 1 ) × ( ( m − x 1 ) + ( n − y 1 ) m − x 1 ) \text{Paths}(A \to C \to B) = \binom{x_1 + y_1}{x_1} \times \binom{(m - x_1) + (n - y_1)}{m - x_1} Paths ( A → C → B ) = ( x 1 ​ x 1 ​ + y 1 ​ ​ ) × ( m − x 1 ​ ( m − x 1 ​ ) + ( n − y 1 ​ ) ​ )

Blocked Intersection or Missing Road Segment — Pascal Node-Labeling ( Köşe Toplama Yöntemi ):

If a single intersection X X X is blocked, subtract the forbidden paths: Paths ( A → B ) − Paths ( A → X → B ) \text{Paths}(A \to B) - \text{Paths}(A \to X \to B) Paths ( A → B ) − Paths ( A → X → B ) .

If multiple intersections/edges are missing or the grid is L-shaped/irregular, label the starting corner A A A with 1 1 1 , propagate 1 1 1 's along the outer bottom and left boundary edges (up to any break), and fill every interior node recursively using: P ( x , y ) = P ( x − 1 , y ) + P ( x , y − 1 ) P(x, y) = P(x - 1, y) + P(x, y - 1) P ( x , y ) = P ( x − 1 , y ) + P ( x , y − 1 ) setting $P = 0$ at any blocked intersection and omitting the term from any missing road segment.

Grid / Combinatorial Task Formula / Rule Parameter Definitions

Total Rectangles in m × n m \times n m × n Grid ( m + 1 2 ) ( n + 1 2 ) = m ( m + 1 ) n ( n + 1 ) 4 \binom{m+1}{2}\binom{n+1}{2} = \frac{m(m+1)n(n+1)}{4} ( 2 m + 1 ​ ) ( 2 n + 1 ​ ) = 4 m ( m + 1 ) n ( n + 1 ) ​ m = m = m = rows, n = n = n = columns of unit squares

Total Squares in m × n m \times n m × n Grid ∑ k = 1 min ⁡ ( m , n ) ( m − k + 1 ) ( n − k + 1 ) \sum_{k=1}^{\min(m,n)}(m-k+1)(n-k+1) ∑ k = 1 m i n ( m , n ) ​ ( m − k + 1 ) ( n − k + 1 ) Reduces to n ( n + 1 ) ( 2 n + 1 ) 6 \frac{n(n+1)(2n+1)}{6} 6 n ( n + 1 ) ( 2 n + 1 ) ​ when m = n m = n m = n

Rectangles Covering Cell ( r , c ) (r, c) ( r , c ) r ( m − r + 1 ) ⋅ c ( n − c + 1 ) r(m - r + 1) \cdot c(n - c + 1) r ( m − r + 1 ) ⋅ c ( n − c + 1 ) ( r , c ) = (r, c) = ( r , c ) = 1-indexed row and column of the cell

Cevian Fan Triangles m ⋅ n ( n + 1 ) 2 m \cdot \frac{n(n+1)}{2} m ⋅ 2 n ( n + 1 ) ​ n = n = n = base intervals on B C BC BC ; m = m = m = horizontal lines

Pick's Theorem & Polyomino P P P A = I + B 2 − 1 A = I + \frac{B}{2} - 1 A = I + 2 B ​ − 1 ; P = 4 N sq − 2 N shared P = 4N_{\text{sq}} - 2N_{\text{shared}} P = 4 N sq ​ − 2 N shared ​ I = I = I = interior points, B = B = B = boundary points

Shortest Lattice Paths ( m + n m ) = ( m + n ) ! m ! n ! \binom{m+n}{m} = \frac{(m+n)!}{m!\,n!} ( m m + n ​ ) = m ! n ! ( m + n )! ​ m = m = m = East steps, n = n = n = North steps

  • Worked Examples
  • Worked Example 7.2.1: Sub-Shape Counting & Marked Cell in a 4 × 5 4 \times 5 4 × 5 Grid

Problem: A 4 × 5 4 \times 5 4 × 5 rectangular grid consists of 4 4 4 rows and 5 5 5 columns of unit squares, with a star ( ⋆ \star ⋆ ) placed inside the unit square at row r = 2 r = 2 r = 2 (from the top) and column c = 3 c = 3 c = 3 (from the left). Determine: (a) the total number of rectangles in the grid, (b) the total number of squares in the grid, and (c) how many rectangles contain the starred cell ( 2 , 3 ) (2, 3) ( 2 , 3 ) .

Solution:

Total Rectangles ( m = 4 , n = 5 m = 4, n = 5 m = 4 , n = 5 ): N rectangles = ( 4 + 1 2 ) × ( 5 + 1 2 ) = ( 5 2 ) × ( 6 2 ) = 10 × 15 = 150 N_{\text{rectangles}} = \binom{4+1}{2} \times \binom{5+1}{2} = \binom{5}{2} \times \binom{6}{2} = 10 \times 15 = 150 N rectangles ​ = ( 2 4 + 1 ​ ) × ( 2 5 + 1 ​ ) = ( 2 5 ​ ) × ( 2 6 ​ ) = 10 × 15 = 150

Total Squares: N squares = ( 4 × 5 ) + ( 3 × 4 ) + ( 2 × 3 ) + ( 1 × 2 ) = 20 + 12 + 6 + 2 = 40 N_{\text{squares}} = (4 \times 5) + (3 \times 4) + (2 \times 3) + (1 \times 2) = 20 + 12 + 6 + 2 = 40 N squares ​ = ( 4 × 5 ) + ( 3 × 4 ) + ( 2 × 3 ) + ( 1 × 2 ) = 20 + 12 + 6 + 2 = 40

Rectangles Containing Cell ( r = 2 , c = 3 ) (r = 2, c = 3) ( r = 2 , c = 3 ) :

Top border choices: r = 2 r = 2 r = 2 ; Bottom border choices: 4 − 2 + 1 = 3 4 - 2 + 1 = 3 4 − 2 + 1 = 3 .

Left border choices: c = 3 c = 3 c = 3 ; Right border choices: 5 − 3 + 1 = 3 5 - 3 + 1 = 3 5 − 3 + 1 = 3 . N containing ( 2 , 3 ) = ( 2 × 3 ) × ( 3 × 3 ) = 6 × 9 = 54 rectangles. N_{\text{containing }(2,3)} = (2 \times 3) \times (3 \times 3) = 6 \times 9 = 54\text{ rectangles.} N containing ( 2 , 3 ) ​ = ( 2 × 3 ) × ( 3 × 3 ) = 6 × 9 = 54 rectangles.

Worked Example 7.2.2: Shortest Lattice Paths with Checkpoint and Blocked Node

Problem: On a 5 × 4 5 \times 4 5 × 4 city street grid ( 5 5 5 blocks East, 4 4 4 blocks North from corner A ( 0 , 0 ) A(0,0) A ( 0 , 0 ) to corner B ( 5 , 4 ) B(5,4) B ( 5 , 4 ) ), how many shortest paths from A A A to B B B pass through checkpoint C ( 2 , 2 ) C(2,2) C ( 2 , 2 ) without passing through a closed construction intersection at D ( 4 , 3 ) D(4,3) D ( 4 , 3 ) ?

Solution:

Count shortest paths from A ( 0 , 0 ) A(0,0) A ( 0 , 0 ) to C ( 2 , 2 ) C(2,2) C ( 2 , 2 ) ( 2 2 2 East, 2 2 2 North): Paths ( A → C ) = ( 2 + 2 2 ) = ( 4 2 ) = 6 \text{Paths}(A \to C) = \binom{2+2}{2} = \binom{4}{2} = 6 Paths ( A → C ) = ( 2 2 + 2 ​ ) = ( 2 4 ​ ) = 6

Count all shortest paths from C ( 2 , 2 ) C(2,2) C ( 2 , 2 ) to B ( 5 , 4 ) B(5,4) B ( 5 , 4 ) ( 3 3 3 East, 2 2 2 North): Paths total ( C → B ) = ( 3 + 2 2 ) = ( 5 2 ) = 10 \text{Paths}_{\text{total}}(C \to B) = \binom{3+2}{2} = \binom{5}{2} = 10 Paths total ​ ( C → B ) = ( 2 3 + 2 ​ ) = ( 2 5 ​ ) = 10

Subtract paths from C ( 2 , 2 ) C(2,2) C ( 2 , 2 ) to B ( 5 , 4 ) B(5,4) B ( 5 , 4 ) that hit blocked node D ( 4 , 3 ) D(4,3) D ( 4 , 3 ) :

From C ( 2 , 2 ) C(2,2) C ( 2 , 2 ) to D ( 4 , 3 ) D(4,3) D ( 4 , 3 ) is 2 2 2 East, 1 1 1 North: ( 2 + 1 1 ) = 3 \binom{2+1}{1} = 3 ( 1 2 + 1 ​ ) = 3 paths.

From D ( 4 , 3 ) D(4,3) D ( 4 , 3 ) to B ( 5 , 4 ) B(5,4) B ( 5 , 4 ) is 1 1 1 East, 1 1 1 North: ( 1 + 1 1 ) = 2 \binom{1+1}{1} = 2 ( 1 1 + 1 ​ ) = 2 paths.

Forbidden paths from C C C to B B B via D D D : 3 × 2 = 6 3 \times 2 = 6 3 × 2 = 6 .

Valid paths from C C C to B B B avoiding D D D : 10 − 6 = 4 10 - 6 = 4 10 − 6 = 4 .

Multiply stages A → C A \to C A → C and C → B C \to B C → B : Valid Paths = 6 × 4 = 24 \text{Valid Paths} = 6 \times 4 = 24 Valid Paths = 6 × 4 = 24

Review the Method

Shortest paths across an m × n m \times n m × n street grid equal ( m + n m ) \binom{m+n}{m} ( m m + n ​ ) , whereas grids with missing road segments or multiple obstacles are solved via Pascal-triangle node addition (Köşe Toplama Yöntemi).

Loading diagram... Decision Workflow for Shortest Lattice Path Problems on TR-YÖS