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)
Answer
C
Key insight
A toothpick on a middle cell's vertical side forces a full-height crossing; the loop has exactly two crossings, and each remaining middle cell independently chooses top or bottom.
Solution
Number the middle-row cells to from the left; each needs exactly one toothpick.
A middle-row vertical forces a full column. If the loop uses the vertical side at column line of the middle row, that toothpick already serves the middle cell(s) beside it, so at its top end the loop cannot turn along their top sides: it must continue up to the top edge of the grid, and likewise down to the bottom edge. So every middle-row vertical is part of a full-height crossing, serving cells and (only cell if , only cell if ).
Exactly two crossings, or none. Crossing tops must be joined by paths inside the one-cell-tall top row, bottoms inside the bottom row. Such a path cannot get past another crossing, so a single simple loop uses exactly two crossings and lies between them. Middle cells outside would get nothing, so and .
Count. The top path runs rightward from to ; over each cell it stays on the top edge or dips to the middle row's top side. The bottom path stays on the bottom edge or rises to the middle row's bottom side. Cells served by a crossing must be avoided by both; every other middle cell needs exactly one of "top dips" or "bottom rises", an independent binary choice. Free cells number for : .
With no crossings the loop is a -tall rectangle inside the top or bottom row that must cover all eight middle cells: more loops.
Total . The answer is .
Why this works
The "exactly one side" row is a rigid constraint: it turns local choices into forced global structure (full-height crossings) and leaves only binary decisions elsewhere. Reduce a loop-counting problem to its skeleton (where it crosses a fixed line), argue how many crossings a simple loop can have, then count the free choices as independent bits. Do not forget degenerate configurations that avoid the constraint row entirely.
The trap
Forgetting the two loops that never enter the middle row (the full top-row and full bottom-row rectangles), which gives 144, choice (B).
Common mistakes
- Forgetting the two loops that never enter the middle row (the full top-row and full bottom-row rectangles), which gives 144, choice (B).
- Allowing crossings at interior columns like , which leaves middle cell with no toothpick because the loop cannot extend past a crossing.
Techniques
Map the objects to something easier to count · Split into exhaustive cases and handle each