Mathyessy
Home › Topics › Counting & Probability › Grid path counting

Grid path counting practice

A shortest path on a grid is just a word made of R's and U's. Counting paths means counting those words.

How it works

To get from one corner to another using only moves right (R) and up (U), every shortest path uses the same number of each move. A path with r rights and u ups is a string like RRURU, so the number of paths is the number of ways to choose where the R's go:

C(r + u, r)

If the path must pass through a certain point, count the paths to that point and the paths from it, then multiply. If it must avoid a point, subtract the paths that go through it from the total. For small or irregular grids you can also write the number of ways to reach each corner, which is the sum of the numbers below it and to its left (this builds Pascal's triangle).

Grid Paths practice problems with solutions

These problems come from Mathyessy's question bank. Try each one before opening the solution.

  1. You need 4 moves right and 4 moves up. How many shortest paths exist?

    Show answer and solution

    Answer: 70

    8 moves in total; choose which 4 are rights: C(8, 4) = 70.

  2. Ant walks from (0,0) to (6,3) moving only right or up. Paths?

    Show answer and solution

    Answer: 84

    6 rights and 3 ups make 9 moves: C(9, 3) = 84.

  3. You need 4 moves right and 3 moves up. Paths must pass through the point after 2 rights and 1 up. How many such paths exist?

    Show answer and solution

    Answer: 18

    To the point: 2 R and 1 U, C(3, 1) = 3 paths. From the point: 2 R and 2 U, C(4, 2) = 6 paths. Multiply: 3 × 6 = 18.

  4. You need 6 moves right and 4 moves up. How many shortest paths exist?

    Show answer and solution

    Answer: 210

    10 moves; choose the 4 ups: C(10, 4) = 10 × 9 × 8 × 7 ÷ 24 = 210.

Practice this in Mathyessy →Free, no account needed. Opens the Grid Paths set with instant feedback.

Keep going

Related topics

Related practice sets in the app

All Counting & Probability topics · Contest math practice by topic · MATHCOUNTS practice · AMC 8 practice