Using Euclids Extended Algorithm:
Calculate x and y in Bézout's Identity
using (11,30)
For 2 numbers a and b and divisor d:
ax + by = d
a math | a | b math | b | d math | d | k math | k |
---|---|---|---|---|---|---|---|
Set to 1 | 1 | Set to 0 | 0 | 11 | |||
Set to 0 | 0 | Set to 1 | 1 | 30 | Quotient of 11/30 | 0 | |
1 - (0 x 0) | 1 | 0 - (0 x 1) | 0 | Remainder of 11/30 | 11 | Quotient of 30/11 | 2 |
0 - (2 x 1) | -2 | 1 - (2 x 0) | 1 | Remainder of 30/11 | 8 | Quotient of 11/8 | 1 |
1 - (1 x -2) | 3 | 0 - (1 x 1) | -1 | Remainder of 11/8 | 3 | Quotient of 8/3 | 2 |
-2 - (2 x 3) | -8 | 1 - (2 x -1) | 3 | Remainder of 8/3 | 2 | Quotient of 3/2 | 1 |
3 - (1 x -8) | 11 | -1 - (1 x 3) | -4 | Remainder of 3/2 | 1 | Quotient of 2/1 | 2 |
-8 - (2 x 11) | -30 | 3 - (2 x -4) | 11 | Remainder of 2/1 | 0 | Quotient of 1/0 | 0 |
a = 11 and b = -4
ax + by = gcd(a,b)
11x + 30y = gcd(11