0
$\begingroup$

Given parameters $a,b,D$, all integers, I want to find all the integer solutions $(x,y)$ of

$ax+by\le D$

Or at least a nice way to characterize them. Also, for a given $R$, it is actually enough for me to find the solutions which also satisfy

$x^2+y^2\le R^2$

(i.e. all the integer points in a some disc around the origin) but if the problem can be solved without using this additional constraint I'd be happy to hear how.

1 Answers 1

1

Let's suppose $a > 0$ (you can do the other cases yourself). Then $a x + b y \le D$ means $x \le (D - b y)/a$. So for any integer $y$, $x$ is any integer $\le \lfloor (D - b y)/a \rfloor$.

  • 0
    Of course, how silly of me.2012-11-12