Maths WorkshopMaths problems with full solutions
Exercise 1729Combinatorics › Inclusion-exclusionOlympiadAdded 3 Nov 2026

Two obstacles via IE

#IE#paths#obstacles

Statement

Count paths from (0,0)(0,0) to (4,4)(4,4) avoiding both (2,1)(2,1) and (1,2)(1,2).

Hint

IE on the two points.

Show solutionHide solution

Solution

Total. (84)=70\binom{8}{4}=70.

Through (2,1)(2,1). (32)⋅(53)=3⋅10=30\binom{3}{2}\cdot\binom{5}{3}=3\cdot10=30.

Through (1,2)(1,2). (31)⋅(52)=3⋅10=30\binom{3}{1}\cdot\binom{5}{2}=3\cdot10=30.

Through both. Paths through (1,2)(1,2) then (2,1)(2,1)? (2,1)(2,1) is reachable from (1,2)(1,2) by moving right+up. (31)⋅(11)⋅(42)=3⋅1⋅6=18\binom{3}{1}\cdot\binom{1}{1}\cdot\binom{4}{2}=3\cdot1\cdot6=18.

Avoid. 70−30−30+18=2870-30-30+18=28.

Conclusion. 2828 paths avoid both obstacles.