Existence of positive solution of a Diophantine equation Is there any way to find if there are any positive solutions of a linear Diophantine equation of the form 
$$ax + by = c$$
It is not necessary to find such $x$ and $y$. I just want to determine if such solutions exist with $x \in \mathbb{W} $ and $y \in \mathbb{W}$.
 A: Here is an outline of an answer based on Section 5.1, "The Equation $ax + by = c$," of I. Niven, H. S. Zuckerman, H. L. Montgomery, An Introduction to the Theory of Numbers, 5th ed., Wiley (New York), 1991. You can prove some of the statements with the help of this theorem.
We assume that $a$, $b$, and $c$ are integers; that $a$ and $b$ are not both zero; and that solutions refers to integer solutions only.
If $c$ is not a multiple of gcd($a,b$) = $g$, there are no solutions, and you have your answer. Otherwise, there are infinitely many solutions which form an arithmetic progression in both "directions," so continue with the following checks to determine whether any of those solutions are positive.
If $a$ or $b$ is zero, it is simple to determine whether there are any positive solutions.
If $a$ and $b$ have opposite signs, there are infinitely many positive solutions.  To see that, view the equation as a line with a positive slope in the Euclidean plane. Some infinite part of the line must lie in the first quadrant.
The final case is that $a$ and $b$ have the same sign; it suffices to assume that $a$ and $b$ are positive.  View the equation as a line with a negative slope. If $c$ is not positive, neither is the $y$-intercept, so no part of the line lies in the first quadrant; hence, there are no positive solutions.
If on the other hand $c$ is positive, it is possible to derive a formula for the number of positive solutions: Let $x_0,y_0$ be one solution, which we can find using the Euclidean algorithm.  Then all solutions are of the form
$$x = x_0 +\frac{kb}{g},\qquad y = y_0 - \frac{ka}g$$
where $k$ is an integer, so you want to find $k$ such that
$$x_0 +\frac{kb}g > 0,\text{ and } y_0 -\frac{ka}g > 0,$$
which is equivalent to
$$\frac{-gx_0}b < k <\frac{gy_0}a.$$
For an inequation such as $m < k < n$, the integer lower bound is $\lfloor m\rfloor + 1$ and the integer upper bound is $\lceil n\rceil - 1 = -\lfloor -n\rfloor - 1$. Therefore we have
$$\left\lfloor\frac{-gx_0}b\right\rfloor +1 \le k \le -\left\lfloor -\frac{gy_0}a\right\rfloor -1.$$
Thus, the number of of positive solutions is
$$\begin{align}&-\left\lfloor -\frac{gy_0}a\right\rfloor -1 -\left(\left\lfloor\frac{-gx_0}b\right\rfloor +1\right) + 1 \\ =& -\left\lfloor -\frac{gy_0}a\right\rfloor - \left\lfloor\frac{-gx_0}b\right\rfloor - 1.\end{align}$$
