As part of a problem I'm trying to solve, I have to find the number of routes from (0,0) to (X,Y) only going up or to the right (both X and Y are positive integers).

I am using central binomial coefficient to find the routes, which is working great.

R = (X+Y)! / (X!*Y!)

If there's ONE point I cannot go through (A,B), I can find the total number of valid routes this way:

routes(0,0,X,Y) - (routes(0,0,A,B) * routes(A,B,X,Y))

That also works fine.

However, when I add another point I cannot go through (C,D), I am unsure what to subtract from what, and so on, as some routes go through A,B but not C,D, some through C,D but not A,B, and some through both.

Of course, what I'm trying to get to is a bunch of points I can't go through, but once I can understand 2 points, I think I can figure the rest out.

Any help is greatly appreciated.

Thanks!