count the number of integer solution for $a \times b \geq k$
given the conditions
1) $1 \leq a \leq p$
2) $1 \leq b \leq q$
(k, p, and q are constant).
|
count the number of integer solution for $a \times b \geq k$ given the conditions 1) $1 \leq a \leq p$ 2) $1 \leq b \leq q$ (k, p, and q are constant). |
|||||
|
|
In graphical terms, you're counting the number of lattice points (i.e., points with integer components) that are within or on the boundary of the rectangle with opposite corners $(0, 0)$ and $(p, q)$ and which lie above or on the hyperbola $xy=k$. With this in mind we have three cases:
$$ A = \int_{k/q}^p k-\frac{k}{x} dx = pq+k\left(\ln\frac{k}{pq}-1\right) $$ For most values of $p$ and $q,$ this turns out to be pretty close to the actual number of solutions. On the other hand, if you want an exact answer you can find the convex hull of your set of solution points and then use Pick's Theorem. Although it will do what you want, the answer won't be nearly as simple as the estimate above. |
|||
|
|