# Tag Info

### How to find solutions of linear Diophantine ax + by = c?

Here's another method. It doesn't require finding an initial solution, but it may require finding a modular multiplicative inverse. (Edit: I'll show this method with an example instead of a ...
• 13.3k
Accepted

### Number of positive unequal integer solutions of $x+y+z+w=20$

HINT: Each solution of the desired type is a permutation of a solution in which $x<y<z<w$, and every permutation of such an increasing solution is of the desired type. Each increasing ...
• 618k

### How would one solve a linear equation in two integer variables?

Use the Euclidean Algorithm to find the gdc of $5$ and $12$. $$12=5\times2+2$$ $$5=2\times2+1$$ Then apply the extended Euclidean Algorithm, (do the initial algorithm in reverse with back-substitution)...
• 2,101

### Determining the existence of solutions to the linear Diophantine equation $ax + by = c$

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 (...
• 3,277
Accepted

### How many distinct values of $x_1+x_2+x_3+x_4+x_5+x_6+x_7$ when $x_1,x_2,x_3,..,x_7 \in \{0,3,4,5\}$

Clearly, we have $0\leq A\leq 35$, so there are at most $36$ possibilities. Also clearly $A\neq 1,2$. In fact any other $A$ is possible. (Maybe you can prove this yourself; if not there is a spoilered ...
• 41.3k
Accepted

### How to solve a system of linear equations modulo n?

First you can multiply the system by any number that has an inverse, that is $\gcd(x,20)=1$. So in particular you cannot multiply or divide by $2,4,5,10$ as you would not multiply or divide by $0$ in ...
• 28.7k

• 273k

### How would one solve a linear equation in two integer variables?

The Euclidean algorithm is best for large numbers, but for a small example like this, trial and error, combined with a little modular arithmetic works just fine, and is less work. Reducing $5a−12b=13$...
• 53.2k
Accepted

• 225
Accepted

### Minimize $152207x-81103y$ over the positive integers.

Since $\gcd (152207,81103)=1111$ it is the same as minimum of $$1111(137x-73y)$$ Since $137x-73y=1$ is solvable (say $x=8$ and $y=15$) the answer is $1111$.
• 90.3k