Questions tagged [linear-diophantine-equations]

Diophantine equations where all of the terms are monomials of degree zero or one. For example, finding all integers $x$ satisfying $ax = b$, finding all integers $x,y$ such that $ax + by = c$, or finding all integers $x,y,z$ such that $ax + by + cz = d$. Probably appropriate with (elementary-number-theory).

A linear diophantine equation is a diophantine equation (see ) where all of the terms are monomials of degree zero or one.

For example, some linear diophantine equation problems are:

  • Finding all integers $x$ satisfying $ax = b$.

  • Finding all integers $x,y$ such that $ax + by = c$.

  • Finding all integers $x,y,z$ such that $ax + by + cz = d$.

The equation $ax \equiv b \pmod{n}$ may also be thought of as a linear diophantine equation. If we like, we may write it as $ax = b + yn$.

We may also have a system of such equations. For example, the Chinese remainder theorem asserts a unique solution $x$ mod $mn$ to the equations $x \equiv a \pmod{m}$ and $x \equiv b \pmod{n}$ when $m$ and $n$ are relatively prime.

More generally, every system of linear Diophantine equations may be solved by computing the Smith normal form of its matrix, in a way that is similar to the use of the reduced row echelon form to solve a system of linear equations over a field.

For reference, see linear diophantine equations on Wikipedia.

310 questions
135
votes
5 answers

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

I want to find a set of integer solutions of Diophantine equation: $ax + by = c$, and apparently $\gcd(a,b)|c$. Then by what formula can I use to find $x$ and $y$ ? I tried to play around with it: $x = (c - by)/a$, hence $a|(c - by)$. $a$, $c$…
36
votes
9 answers

Linear diophantine equation $100x - 23y = -19$

I need help with this equation: $$100x - 23y = -19.$$ When I plug this into Wolfram|Alpha, one of the integer solutions is $x = 23n + 12$ where $n$ is a subset of all the integers, but I can't seem to figure out how they got to that answer.
28
votes
5 answers

Largest integer that can't be represented as a non-negative linear combination of $m, n = mn - m - n$? Why?

This seemingly simple question has really stumped me: How do I prove that the largest integer that can't be represented with a non-negative linear combination of the integers $m, n$ is $mn - m - n$, assuming $m,n$ are coprime? I got as far as this,…
10
votes
2 answers

Avoid unnecessary calculations when multiplying matrices if only need one element of resulting matrix

The Problem: I need only the bottom left element of a product of matrices $(\bf{M_1}+\bf{I})(\bf{M_2}+\bf{I})\cdots(\bf{M_N}+\bf{I})$, where $\bf{I}=\begin{pmatrix} 1 & 0\\ 0 & 1\end{pmatrix}$, and…
10
votes
2 answers

Number of solutions of $x_1+2x_2+\cdots+kx_k=n$?

Suppose $n$ be a given positive integer. Then the Diophantine equation $x=n$ has only $1$ solution. Just by inspection, I found that the Diophantine equation $x+2y=n$ has $\left\lfloor \dfrac{n}{2}+1\right\rfloor$ non-negative solutions for…
9
votes
1 answer

Shortest palindromic Egyptian representation for reciprocal integers

Consider the problem of representing the reciprocal of an integer as an Egyptian fraction where all the denominators are palindromes. i.e. write $$ \frac{1}{n} = \sum_{i} \frac{1}{a_i} $$ where $a_i$ is a palindrome (repeating $a_i$ is allowed). …
9
votes
2 answers

How to solve a system of linear equations modulo n?

For example, $4x - 10y \equiv 8\pmod {20}$ $7x + 2y \equiv 5\pmod {20}$ It resembles linear diophantine equations and the Chinese Remainder Theorem, but I don't know how to actually solve it..
9
votes
4 answers

If $28a + 30b + 31c = 365$, then what is the value of $a +b +c$?

Question: For 3 non negative integers $a, b, c$; if $28a + 30b + 31c = 365$ what is the value of $a +b +c$ ? How I approached it : I started immediately breaking it onto this form on seeing it : $28(a +b +c) +2b +3c = 365 .......(1)$ $30(a +b +c)…
7
votes
3 answers

Given $a,b$, what is the maximum number which can not be formed using $na + mb$?

e.g. given two numbers $5$ and $6$ the maximum number is $19$, as after $19$ each number can be formed using equation $5n+6m$ by putting different (non-negative) values for $n$ and $m$. Such number is not possible for $4$ & $6$. I am not sure…
7
votes
4 answers

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

What is the number of positive different integer solutions of $x+y+z+w=20$, where $x,y,z,w$ are all different and positive? It would be nice if coding is not used. I am given the answer $552$.
7
votes
6 answers

Find the number of positive integers solutions of the equation $3x+2y=37$

Find the number of positive integers solutions of the equation $3x+2y=37$ where $x>0,y>0,\ \ x,y\in \mathbb{Z}$ . By trial and error I found $$\begin{array}{|c|c|} \hline x & y \\ \hline 11 & 2 \\ \hline 9 & 5 \\ \hline 7 & 8 \\ \hline 5 & 11…
7
votes
3 answers

How to find all integer solutions for underdetermined sytsem of linear equations

I do have a system of n equations with m variables where m > n with integer coefficients. I wish to find a set of integer solutions to this system (In my case n = 2 and m = 4). Could somebody tell me how I can do it? I already solved this system…
6
votes
4 answers

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

Minimize the expression $152207x-81103y$ over the positive integers, given $x,y\in\mathbb{Z}.$ So the book takes me through modular arithmetic and how to find $\text{gcd}(a,b)$ in order to solve diophantine equations. Then this question pops up…
6
votes
6 answers

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

For example, how would I find integers $a$ and $b$ that satisfy the following equation? $$5a - 12b = 13$$ I always resorted to trial and error when doing something like this and more often than not I would finally reach my answer. But for this one I…
5
votes
2 answers

How to determine a possible solution when an equation has multiple unknowns

Suppose we have an equation $$15 = 5i + 3j + 2k$$ where $i, j, k$ are non-negative integers. It is easy to find some values that make this equation true: $$i=3, j=0, k=0$$ $$i=0, j=5, k=0$$ $$i=1, j=2, k=2$$ $$...$$ But if we change the equation to…
lucasvw
  • 151
  • 3
1
2 3
20 21