Find number of solutions of a linear equation of N variables

We have to find the number of solutions to a linear equation of N variables. We have solved this using Dynamic Programming.

For the sake of simplicity, let us assume that we have to find the non-negative integral solutions for the equation, and all the coefficients on the equation are positive integers.

As an example, let us consider the linear equation 3x1 + x2 = 9. Note that this is a linear equation of 2 variables. So, here, n = 2. The non-negative integral solutions for this equation in...

 •  0 comments  •  flag
Share on Twitter
Published on December 08, 2020 13:28
No comments have been added yet.