Number of ways through a modified grid

One elementary fact is key to making these problems tractable:

If you pass through a given square, you must cross its northeast/southwest diagonal in exactly one place.

So, consider the upper-left problem. The number of allowed paths is equal to the total number of paths (on the original grid), minus the number of paths that pass through either of the two deleted squares. The number of paths passing through either deleted square is equal to the number passing through the first deleted square, plus the number passing through the second deleted square, minus the number passing through both (this is the "inclusion-exclusion" rule). Finally, the paths passing through the upper-left deleted square are those going through $(5,6)$ or $(6,5)$, and the paths passing through the lower-right deleted square are those passing through $(8,8)$. Let $N_{i,j}=N_{j,i}={{i+j}\choose{i}}$ be the number of paths that go $i$ squares to the right and $j$ squares down. Putting these together, $$ N_{UL}=N_{12,12}-\left(N_{5,6}N_{7,6} + N_{6,5}N_{6,7}+N_{8,8}N_{4,4}-(N_{5,6}N_{3,2}N_{4,4} + N_{6,5}N_{2,3}N_{4,4})\right) \\ = N_{12,12} - 2N_{5,6}N_{7,6} - N_{8,8}N_{4,4} + 2N_{5,6}N_{2,3}N_{4,4}. $$ The upper-right problem is similar, but simpler. The lower-left and lower-right problems do not involve inclusion-exclusion at all: for instance, the lower-right problem just requires you to count the paths going through one of $(8,4)$, $(7,5)$, $(6,6)$, $(5,7)$, and $(4,8)$, or $$ N_{LR}=N_{12,12} - 2N_{8,4}^2 -2N_{7,5}^2 - N_{6,6}^2 $$ after using symmetry.


I don't see a general closed form way for many deletions of cells. You can just build a Pascal's triangle starting from A. There is 1 way to reach A, then 1 way to reach each neighboring cell, and keep going. The missing cells have 0 in them, as you can't get there at all. Each non-zero cell has the sum of the one above and the one to the left.