IOQM study materials
IOQM study resources

Exactly One of Two Grid Points

IOQM · Put your knowledge to work in context.

All case studies

Exactly One of Two Grid Points

A combinatorics mock asks for the number of paths from (0,0) to (5,5) using only unit right and up steps that pass through exactly one of the points P=(2,2) and Q=(3,3). A candidate computes paths through P as C(4,2)C(6,3)=120 and paths through Q as C(6,3)C(4,2)=120. Paths through both are C(4,2)C(2,1)C(4,2)=72. The candidate then writes 120+120−72=168 and submits 168, explaining that subtracting the overlap once leaves paths through exactly one point. A classmate says the answer should be 96, but neither student writes a full justification. The teacher asks for a precise interpretation of the expression 168 and for an independent count of paths avoiding both points.

1. Find the correct number of paths through exactly one of P and Q, and explain what 168 counts.

Read the worked answer

Let A be the set of paths through P and B the set through Q. We have |A|=|B|=120 and |A∩B|=72. The paths through exactly one point are the symmetric difference: |A△B|=|A|+|B|−2|A∩B|=240−144=96. The expression 120+120−72=168 equals |A∪B|, the number of paths through at least one of P and Q. Paths through both are subtracted once from the double sum and therefore remain counted once in 168. To count exactly one, those overlap paths must be removed twice, giving 96.

2. How many paths avoid both P and Q?

Read the worked answer

The total number of right/up paths from (0,0) to (5,5) is C(10,5)=252. From the previous part, the number through at least one of P and Q is 168. Therefore the number avoiding both is 252−168=84. Equivalently, use inclusion-exclusion directly: 252−120−120+72=84.