Paths & Grids
Lattice paths, grid walks, board colorings and configurations
What you need to know
- Grid paths. A path from to by unit steps right (R) or up (U) has steps: R's and U's. Choosing which steps are R's decides the path: paths. Example: from to there are paths.
- Through a point, or avoiding it. Paths through a point : (paths to ) (paths from to the end). Paths avoiding : all paths minus those through . Example: to through : paths, so avoid .
- Labeling the corners. When some streets are blocked or one-way, write at each corner the number of ways to reach it: the sum of the numbers at the corners you can arrive from.
- Diagonal steps change the count. If a diagonal step D (right and up at once) is also allowed, do casework on the number of D's. Example: to with steps R, U, D: no D's gives paths, one D gives (orders of R, U, D), two D's give , so in all.
- Rectangles and squares. A grid of by unit squares has rectangles (choose of the vertical lines and of the horizontal ones). It has squares (, then , and so on), stopping when a factor reaches . Example: a grid has rectangles and squares.
How AMC 10 tests it
- Problems 8–15: a direct count, often with a point the path must pass through or avoid.
- Problems 12–20: paths on an irregular grid (missing streets, one-way streets), meant for labeling the corners.
- Counting squares or rectangles in a figure, or colorings of a or board with rules about neighboring cells.
- Problems 18–24: paths with an extra rule (exactly changes of direction, never crossing the diagonal), where the trick is choosing where the turns happen.
- Random walks: multiply a path count by or , the chance of one particular -step path when each step has or equally likely choices.
Standard approaches
- With only right and up steps, use . Multiply for a point the path must pass through; subtract for a point it must avoid.
- Otherwise label the corners in order (the Pascal's Triangle method); it always works on small grids.
- For "exactly turns," count how the R's and U's split into runs. Example: to with exactly turns has runs (like RR U R UU): ways to split the R's into runs, for the U's, and choices of first step, so paths.
- For colorings and tilings, fix the first row or the most limited cell, then count the ways to finish.
- With nothing blocked, the corner labels should match ; use this as a check.
Worked example
A path goes from to using unit steps right or up. How many such paths pass through neither nor ?
(A) (B) (C) (D) (E)
Solution. Use complementary counting and PIE.
Step 1: all paths. There are R's and U's: paths.
Step 2: through . ways to get there, then R's and U's to finish: . So .
Step 3: through . ways to get there, then R's and U: . So .
Step 4: through both. ways to , then to , then to the end: .
Step 5: combine. Through at least one point: . Through neither: .
The answer is .
Pitfalls
- Using the wrong top number in . The number of steps is , not or .
- Treating "avoids and " as all paths minus those through minus those through , without adding back those through both. Above, that gives instead of .
- Mixing up points and squares when a grid is called "." A grid of squares has points; corner to corner is paths, not .
- In corner labeling, adding a neighbor's number across a street that is actually blocked.
Traps that recur
- Forgetting the two loops that never enter the middle row (the full top-row and full bottom-row rectangles), which gives 144, choice (B). (2024 AMC 10A #25)
- Ignoring the three leftward arrows and counting only monotone paths (1024), or forgetting that the bug may switch between the upper and lower halves at a center vertex. (2012 AMC 10B #25)
- Treating the edge-middle squares as independent choices, or forgetting the two cases (two opposite pairs equal vs. one pair equal) in the cycle count. (2023 AMC 10A #20)
- Forgetting that empty cells with exactly three filled neighbors turn on, including the border midpoints when a full side of the 3×3 is filled. (2022 AMC 10B #19)
- 1.2019 AMC 10A #10
A rectangular floor that is feet wide and feet long is tiled with one-foot square tiles. A bug walks from one corner to the opposite corner in a straight line. Including the first and the last tile, how many tiles does the bug visit?
- A)
- B)
- C)
- D)
- E)
- 2.2012 AMC 10A #14
Chubby makes nonstandard checkerboards that have squares on each side. The checkerboards have a black square in every corner and alternate red and black squares along every row and column. How many black squares are there on such a checkerboard?
- A)
- B)
- C)
- D)
- E)
- 3.2023 AMC 10B #10
You are playing a game. A rectangle covers two adjacent squares (oriented either horizontally or vertically) of a grid of squares, but you are not told which two squares are covered. Your goal is to find at least one square that is covered by the rectangle. A "turn" consists of you guessing a square, after which you are told whether that square is covered by the hidden rectangle. What is the minimum number of turns you need to ensure that at least one of your guessed squares is covered by the rectangle?
- A)
- B)
- C)
- D)
- E)
- 4.2021 AMC 10B #8
Mr. Zhou places all the integers from to into a by grid. He places in the middle square (eighth row and eighth column) and places other numbers one by one clockwise, as shown in part in the diagram below. What is the sum of the greatest number and the least number that appear in the second row from the top?

- A)
- B)
- C)
- D)
- E)
- 5.2016 AMC 10B #15
All the numbers are written in a array of squares, one number in each square, in such a way that if two numbers are consecutive then they occupy squares that share an edge. The numbers in the four corners add up to . What is the number in the center?
- A)
- B)
- C)
- D)
- E)
- 6.2023 AMC 10A #20
Each square in a grid of squares is colored red, white, blue, or green so that every square contains one square of each color. One such coloring is shown on the right below. How many different colorings are possible?

- A)
- B)
- C)
- D)
- E)
- 7.2022 AMC 10B #19
Each square in a grid is either filled or empty, and has up to eight adjacent neighboring squares, where neighboring squares share either a side or a corner. The grid is transformed by the following rules:
- Any filled square with two or three filled neighbors remains filled.
- Any empty square with exactly three filled neighbors becomes a filled square.
- All other squares remain empty or become empty.
A sample transformation is shown in the figure below.
Suppose the grid has a border of empty squares surrounding a subgrid. How many initial configurations will lead to a transformed grid consisting of a single filled square in the center after a single transformation? (Rotations and reflections of the same configuration are considered different.) 
- A)
- B)
- C)
- D)
- E)
- 8.2021 AMC 10A #25
How many ways are there to place indistinguishable red chips, indistinguishable blue chips, and indistinguishable green chips in the squares of a grid so that no two chips of the same color are directly adjacent to each other, either vertically or horizontally?
- A)
- B)
- C)
- D)
- E)
- 9.2018 AMC 10A #20
A scanning code consists of a grid of squares, with some of its squares colored black and the rest colored white. There must be at least one square of each color in this grid of squares. A scanning code is called if its look does not change when the entire square is rotated by a multiple of counterclockwise around its center, nor when it is reflected across a line joining opposite corners or a line joining midpoints of opposite sides. What is the total number of possible symmetric scanning codes?
- A)
- B)
- C)
- D)
- E)
- 10.2015 AMC 10B #20
Erin the ant starts at a given corner of a cube and crawls along exactly edges in such a way that she visits every corner exactly once and then finds that she is unable to return along an edge to her starting point. How many paths are there meeting these conditions?
- A)
- B)
- C)
- D)
- E)
- 11.2024 AMC 10A #25
The figure below shows a dotted grid cells wide and cells tall consisting of squares. Carl places -inch toothpicks along some of the sides of the squares to create a closed loop that does not intersect itself. The numbers in the cells indicate the number of sides of that square that are to be covered by toothpicks, and any number of toothpicks are allowed if no number is written. In how many ways can Carl place the toothpicks?

- A)
- B)
- C)
- D)
- E)
- 12.2012 AMC 10B #25
A bug travels from A to B along the segments in the hexagonal lattice pictured below. The segments marked with an arrow can be traveled only in the direction of the arrow, and the bug never travels the same segment more than once. How many different paths are there?

- A)
- B)
- C)
- D)
- E)
Problems © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. The topic note, tags and key insights are original to this site.