Find total number of non negative integral solutions $5a + 6b + 9c + 2d + e = n$ with constraints

64 Views Asked by At

We want to find the total number of non negative integral solutions with the additional constraint that $$a + b \geq c + d$$

The value of $n = \mathcal{O}(10^6)$ and $a, b, c, d, e \geq 0$

I could use generating functions but I don't know how to solve with keeping the constraint satisfied? One approach that I thought of was first finding the total number of solutions to the equation $5a + 6b + 9c + 2d + e = n$ and then subtracting the ones that don't follow the constraint i.e. $a + b < c + d$. This means that $a + b + k = c + d$ where $k \geq 0$ but I don't know how I can use the slack variable $k$ to create another equation which satisfies all the constraints.