Counting integer solutions for a system of inequalities I wish to enumerate the number of solutions

seupeljewj

seupeljewj

Answered question

2022-06-16

Counting integer solutions for a system of inequalities
I wish to enumerate the number of solutions of the system of equations and inequalities for 3 non-negative integer unknowns x , y , z 0: ( a, b specified)
x + y + z = a x + y > b y + z > b
Is there an elegant way of finding the number of solutions or must I use an exhaustive numerical algorithm?

Answer & Explanation

Tianna Deleon

Tianna Deleon

Beginner2022-06-17Added 29 answers

We may suppose that b { 1 , 0 , 1 , , a 1 } ..
We consider the plane ( x , z ), your bounds are x + z a, 0 x , z < a b. Now fix x, then z varies from 0 to min ( a x , a b 1 ). So, for x b there are a b ways to choose z, and for a x b + 1 there exist a x + 1 ways to choose z. Totally we get ( b + 1 ) ( a b ) + ( a b ) ( a b + 1 ) / 2 = ( a b ) ( a + b + 3 ) / 2 solutions.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?