Linear combination of two numbers

Click For Summary
SUMMARY

The discussion focuses on finding the linear combination of two integers, expressed as ax + by = t, where t equals m multiplied by the GCD of a and b. The Euclidean algorithm is essential for determining the GCD, as demonstrated with the example of gcd(24, 15) resulting in 3. The process involves applying the algorithm to find the GCD and then backtracking to express the GCD as a linear combination of the two numbers, ultimately yielding the coefficients x and y.

PREREQUISITES
  • Understanding of the Euclidean algorithm
  • Familiarity with GCD (Greatest Common Divisor)
  • Basic knowledge of linear combinations
  • Proficiency in integer arithmetic
NEXT STEPS
  • Study the Euclidean algorithm in depth
  • Learn about the Extended Euclidean algorithm for finding coefficients
  • Explore applications of linear combinations in number theory
  • Investigate integer linear programming techniques
USEFUL FOR

Mathematicians, students studying number theory, and anyone interested in algorithms related to integers and their properties.

pyfgcr
Messages
22
Reaction score
0
I wonder how to find linear combination of 2 numbers, that is: ax+by=t, with t=m*GCD(a,b), and m,a,b \in Z. Find x,y.
 
Physics news on Phys.org
pyfgcr said:
I wonder how to find linear combination of 2 numbers, that is: ax+by=t, with t=m*GCD(a,b), and m,a,b \in Z. Find x,y.


1) Apply the euclidean algorithm to find the gcd

2) After you finish 1, go BACK and get your expression

Example:

$$gcd(24,15)=3\Longrightarrow \begin{align*}24=&1\cdot 15+9\\15=&1\cdot 9+6\\9=&1\cdot 6+3\\6=&2\cdot 3\end{align*}$$

We know go back on the above algorithm (from the last line with a non-zero residue):

$$3=9-6=9-(15-9)=2\cdot 9-15=2(24-15)-15=2\cdot 24+(-3)\cdot 15$$

and thus \,2\cdot 24+(-3)\cdot 15=3\,

DonAntonio
 
Ok, now I understand. Thanks a lot.
 

Similar threads

  • · Replies 23 ·
Replies
23
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K