# Testing relation between two integers in a linear equation [closed]

One can test if there exist integers x and y such that

$$c\cdot x + j = d \cdot y + k$$,

if $$(k-j)\mod(\gcd(c,d)) = 0$$

How can one see that?

--

PS: I understand what $$\gcd$$ and mod operations do.

--

PSS: Source: 1st frame of slide 6 within http://www.cs.arizona.edu/~collberg/Teaching/553/2011/Handouts/Handout-33.pdf

New contributor
beteraba is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

## closed as off-topic by Robert Israel, Andreas Blass, Joe Silverman, David Handelman, RP_Dec 7 at 15:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – Robert Israel, Andreas Blass, Joe Silverman, David Handelman, RP_
If this question can be reworded to fit the rules in the help center, please edit the question.

• So $c,d,k,j$ and $I$ are all integers? Or is $I$ some variable? Furthermore, are you sure that $d$ should be both an exponent on the left and a factor on the right, or are these two different letters? – Dirk Liebhold Dec 7 at 13:09
• let me rewrite it! the d in lhs and in the rhs are not the same.. – beteraba Dec 7 at 13:10
• This question is more for here math.stackexchange.com – greedoid Dec 7 at 13:12
• thank you, i will ask there then. – beteraba Dec 7 at 13:13