Read · 1 min
Warm-Up
You and your best friend Diophantus (who doesn't have a friend named Diophantus?) are in a candy store. You are entirely captivated by two types of candy - chocolates and caramels. One package of chocolates cost , while one package of caramels cost . You reach into your pockets and find that you have . How should you spend your money if you want to spend all your money on chocolates and/or caramels?
Fortunately, your friend Diophantus is here to help out. He teaches you about Diophantine equations so you don't need to guess and check all the different spending possibilities.
Definitions
Definition: A Diophantine equation is an equation solving only for integer solutions.
Linear equations, such as , are called linear Diophantine equations. A linear Diophantine equation is of the general form , for which .
Conditions for Yielding Solutions
Does a Diophantine equation equation always yield solutions? For example, does have any solutions? Try substituting different values into the equation.
Why do the coefficients and prevent the Diophantine equation from having any solution? You may have noticed and share a common factor of , while the right hand side is not divisible by . This means there cannot be any integer solutions if the right hand side is not divisible by the GCD of the coefficients on the left hand side.
Theorem: The linear Diophantine equation has integer solutions if and only if .