I am trying to solve a problem which I have reduced down to counting the number of integer solutions to a number of linear inequalities. I need to be able to count the number of solutions for any number of variables c_1, ..., c_n, but for n=3 the equations could be written as:
Now, I know the values of n and r in advance and wish to find the number of (c_1, ..., c_n) solutions that exist.
Can this be done efficiently (faster than enumerating the solutions)? (If so: how?; if not: why?)