Guichard-Combinatorics-Graph-Theory · Problem 1.3.1

Fundamentals

Mathematics — Probability · binomial-coefficients

Problem

Suppose a street grid starts at position (0,0)(0,0) and extends up and to the right. A shortest route along streets from (0,0)(0,0) to (i,j)(i,j) is i+ji+j blocks long, going ii blocks east and jj blocks north. How many such routes are there? Suppose that the block between (k,l)(k,l) and (k+1,l)(k+1,l) is closed, where k<ik < i and l≤jl \leq j. How many shortest routes are there from (0,0)(0,0) to (i,j)(i,j)?
Intuitive explanation

The first part is about counting arrangements: to reach (i,j)(i,j) in i+ji+j steps, you need to choose which ii of those steps go east (the rest go north). This is a binomial coefficient. For the second part, use complementary counting—find all shortest routes that would use the blocked street, then subtract from the total. A route uses that blocked street only if it passes through both (k,l)(k,l) and (k+1,l)(k+1,l), so count paths that go (0,0)→(k,l)→(k+1,l)→(i,j)(0,0) \to (k,l) \to (k+1,l) \to (i,j) and subtract.

Intuitive explanation

The first part is about counting arrangements: to reach (i,j)(i,j) in i+ji+j steps, you need to choose which ii of those steps go east (the rest go north). This is a binomial coefficient. For the second part, use complementary counting—find all shortest routes that would use the blocked street, then subtract from the total. A route uses that blocked street only if it passes through both (k,l)(k,l) and (k+1,l)(k+1,l), so count paths that go (0,0)→(k,l)→(k+1,l)→(i,j)(0,0) \to (k,l) \to (k+1,l) \to (i,j) and subtract.

Related theory

Browse the problem library