Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose that some nonzero integer $x$ is $x = pa + qb$ where $p, q, a, b$ are also nonzaero integers.

What would be the easy way to find another decomposition of $x$ into following: $x = ra + sb$ where $a, b$ are the equal $a, b$ in the previous case and $r and s$ are free to be set (= are not fixed numbers)?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

Plug in the new translated integers

$p\rightarrow p+d_1$

$q\rightarrow q+d_2$

to get

$x=(p+d_1)a+(q+d_2)b=x+(d_1 a+d_2 b),$

i.e. you want to solve

$d_1 a+d_2 b=0,$

and so

$d_1=b\ n$

$d_2=-a\ n$

for some $n$, which you choose to make every number in the system an integer.

share|improve this answer

Let $d$ be the gcd of $a$ and $b$, let $a=da'$, $b=db'$. Use $$r=p+tb', \qquad s=q-ta',$$ where $t$ is any integer.

share|improve this answer

If $x = p a + q b$ and also $x = r a + s b$, then $(r - p) a = (q - s) b$. You could take $r = p + k b$ and $s = q - k a$ for any integer $k$ (and these will be all the possibilities if $\gcd(a,b) = 1$).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.