AMC 10 Step by Step

2026 AMC 10B Problem 22

P21-25~7 minPrint

Belinda follows a path on the plane that is entirely contained within the square region 0≤x,y≤4.0 \leq x,y \leq 4. Call her path dignified\textit{dignified} if and only if all of the following conditions are satisfied.

  • Each step is one unit up, down, or to the right.
  • The path does not revisit any vertex.
  • The path starts at (a,0)(a,0) and ends at (b,0)(b,0) , where aa and bb are integers with a<ba<b , and touches the xx -axis only at these two points.

The following figure shows some examples of dignified and not dignified paths.

figure

How many dignified paths can Belinda follow?

Log in to save your progress.
Show solution without answering

Key insight

A dignified path is fixed by its start, its end, and the height of each step to the right: four choices for every such step.

Solution

Call the vertical lines x=0,1,2,3,4x = 0, 1, 2, 3, 4 the columns. Look at the dignified example in the figure: it starts at (0,0)(0,0), climbs to height 33, steps right, drops to height 22, steps right, drops to height 11, steps right, and drops to (3,0)(3,0). It crosses from column 00 to column 11 at height 33, from column 11 to column 22 at height 22, and from column 22 to column 33 at height 11. We will show that the crossing heights tell you the whole path.

  1. Each column is visited once. There are no steps to the left, so once the path steps right out of a column it never returns. Every step to the right moves exactly one column over, so a path from column aa to column bb makes exactly b−ab - a steps to the right, one across each gap between neighboring columns.
  1. Inside a column the path moves in one direction only. If the path went up and then down in the same column (or down and then up), the second step would land on the point it just left. That is a revisit, which is not allowed. So in each column the path goes straight up, or straight down, or does not move up or down at all.

3. The first step must be up. It cannot be down, because that leaves the square. It cannot be to the right either. A step to the right from (a,0)(a,0) lands on (a+1,0)(a+1,0), which is on the xx-axis.
- If the path keeps going, it has touched the axis at a point that is not one of its two ends.
- If the path stops there, the whole path is a piece of the axis. It touches the axis at every point of that step, not only at its two ends.

Either way a rule is broken. (If you read the rule differently and count those 44 one-step paths, the total comes out to 452452, which is not one of the choices.)

  1. In the middle the path stays at heights 11 to 44. Touching the axis is only allowed at the very end, so every crossing between columns happens at height 11, 22, 33 or 44.
  1. The last column. The path cannot arrive at (b,0)(b,0) by a step to the right, because that step would start from another point of the axis. So it reaches (b,0)(b,0) by coming straight down column bb, and it stops the moment it gets there.

6. So a path is a list of crossing heights. Pick the start aa, the end bb, and a height from {1,2,3,4}\{1, 2, 3, 4\} for each of the b−ab - a crossings. That gives exactly one path:
- go straight up from (a,0)(a,0) to the first crossing height and step right;
- in each middle column, go straight up or straight down to the next crossing height (or do not move, if the height is the same) and step right;
- in column bb, go straight down to (b,0)(b,0).

This path follows all the rules, and by steps 1 to 5 every dignified path is built this way. So for a given start and end there are
4⋅4⋯4⏟b−a crossings=4 b−a paths.\underbrace{4 \cdot 4 \cdots 4}_{b - a \text{ crossings}} = 4^{\,b-a} \text{ paths.}

  1. Add up over all starts and ends. Group the pairs by how far apart aa and bb are.
b−ab - apairs (a,b)(a, b)number of pairspaths for each pairpaths
11(0,1),(1,2),(2,3),(3,4)(0,1), (1,2), (2,3), (3,4)44441616
22(0,2),(1,3),(2,4)(0,2), (1,3), (2,4)3316164848
33(0,3),(1,4)(0,3), (1,4)226464128128
44(0,4)(0,4)11256256256256

The total is 16+48+128+256=44816 + 48 + 128 + 256 = 448.

The answer is (C) 448\boxed{\textbf{(C)}\ 448}.

Why this works

The rules look complicated, but together they remove almost all the freedom: no left steps means each column is used once, and no revisits means no turning around inside a column. What is left is one free choice per step to the right, the height of that step, so the count is a product of 44s. When a path problem has many rules, ask what a path is still free to choose, and count those choices instead of the paths.

Alternative approach

Build the path one crossing at a time, and count from the right side of the grid.

Suppose the path is in some column, above the axis, with kk columns still to its right. Let f(k)f(k) be the number of ways to finish from there. The path must cross to the next column at one of 44 heights. After that it either comes straight down and ends (11 way), or it keeps going, now with k−1k - 1 columns to its right (f(k−1)f(k-1) ways). So
f(k)=4⋅(1+f(k−1)),f(0)=0.f(k) = 4 \cdot \bigl(1 + f(k - 1)\bigr), \qquad f(0) = 0.

This gives
f(1)=4,f(2)=4⋅5=20,f(3)=4⋅21=84,f(4)=4⋅85=340.f(1) = 4, \qquad f(2) = 4 \cdot 5 = 20, \qquad f(3) = 4 \cdot 21 = 84, \qquad f(4) = 4 \cdot 85 = 340.

A path starting at (0,0)(0,0) has 44 columns to its right, one starting at (1,0)(1,0) has 33, and so on. The total is
f(4)+f(3)+f(2)+f(1)=340+84+20+4=448.f(4) + f(3) + f(2) + f(1) = 340 + 84 + 20 + 4 = 448.

Notice that 340340 alone, the count for paths starting at the corner, is choice (B).

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Since no step goes left, the path visits the columns x=a,a+1,…,bx = a, a+1, \ldots, b in order, each once, and makes exactly b−ab - a steps to the right. Since no vertex is revisited, the vertical steps inside one column all go the same way. The path may touch the xx-axis only at its endpoints, so it leaves (a,0)(a,0) going up, each step to the right is made at a height in {1,2,3,4}\{1, 2, 3, 4\}, and in column bb it comes straight down to (b,0)(b,0).

So a dignified path from (a,0)(a,0) to (b,0)(b,0) is determined by the heights of its b−ab - a steps to the right, and every choice of heights gives a valid path: 4 b−a4^{\,b-a} paths. There are 5−d5 - d pairs with b−a=db - a = d, so the total is
4⋅4+3⋅42+2⋅43+1⋅44=16+48+128+256=448.4 \cdot 4 + 3 \cdot 4^2 + 2 \cdot 4^3 + 1 \cdot 4^4 = 16 + 48 + 128 + 256 = 448.

The answer is (C) 448\boxed{\textbf{(C)}\ 448}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.