youcubed Task 6: Taxicab

How many routes across a city grid?

Task 6 of 8 in the youcubed Portal, a series on tasks from Jo Boaler's youcubed center at Stanford. The task is youcubed's; the explanations and practice problems are written for Math Thinking Coach.

A taxi starts at the top-left corner of a city grid, at point A, and has to reach the bottom-right corner, point B. It can only drive along the streets, and it only ever moves right or down, never back.

How many different routes can it take?

youcubed's version of the task starts the way Boaler likes to start everything: with "What do you notice? What do you wonder?" Then students count routes on grids of different sizes, look for a pattern, and try to prove it.

Start small

On a grid that's just 1 block by 1 block, the taxi can go right then down, or down then right: 2 routes.

On a 2-by-2 grid, listing every route by hand (R for right, D for down) gives RRDD, RDRD, RDDR, DRRD, DRDR, DDRR: 6 routes.

Listing gets out of hand quickly. A 3-by-3 grid has 20 routes. A 4-by-4 has 70.

A better way to count

Here's the key idea. To arrive at any intersection, the taxi must come either from directly above or from directly to the left. So:

Number of routes to an intersection = routes to the one above + routes to the one on the left.

Every intersection along the top edge or left edge can be reached only one way, so label each of them 1. Then fill in the grid, adding as you go. For a 3-by-3 grid:

  • Row 1: 1, 1, 1, 1

  • Row 2: 1, 2, 3, 4

  • Row 3: 1, 3, 6, 10

  • Row 4: 1, 4, 10, 20

The bottom-right corner shows 20. Turn the grid 45 degrees and you're looking at Pascal's triangle.

A 3 by 3 street grid with the number of routes written at each corner, reaching 20 at corner B, beside Pascal's triangle with the row 1, 6, 15, 20, 15, 6, 1 highlighted

The pattern

There's an even faster way to see it. On a 3-by-3 grid, every route is exactly 3 rights and 3 downs, 6 moves in all. A route is decided completely by which 3 of the 6 moves are rights. The number of ways to choose 3 things from 6 is 20.

In general, on a grid m blocks wide and n blocks tall, the number of routes is the number of ways to choose m of the m + n moves to be rights. On youcubed's 4-by-6 grid, that's 210.

Why Boaler loves it

Taxicab rewards organized thinking over memorized formulas. Students who try to list routes run into trouble and are pushed to invent a better system. The step-by-step addition, the Pascal's triangle connection, and the "choose which moves are rights" argument are three different ways to see the same answer, and each one counts as a proof. youcubed lists it for grades 3 to 12, and it really does work across that whole range.

It also opens the door to probability. If a taxi chose right or down by flipping a coin at each corner, the counts tell you which streets it would most likely drive on.

Try it yourself

  1. How many routes are there across a 5-by-5 grid?

  2. How many across a grid 3 blocks wide and 5 blocks tall?

Answer:

  1. 10 moves, 5 of them rights: the number of ways to choose 5 from 10 is 252. (You can check by continuing the addition grid.)

  2. 8 moves, 3 of them rights: the number of ways to choose 3 from 8 is (8 × 7 × 6) ÷ (3 × 2 × 1) = 56.

Go deeper

The full task is at youcubed: Taxicab.

Next in the series: Task 7: 36 Fences