Math 312, Lecture 6 Zinovy Reichstein September 21, 2015

advertisement
Math 312, Lecture 6
Zinovy Reichstein
September 21, 2015
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer,
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer ,
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
min(dr ,er )
· · · · · pr
.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Example: gcd(50771, 4326) = 7.
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Example: gcd(50771, 4326) = 7. Hence,
lcm(50771, 4326) =
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Example: gcd(50771, 4326) = 7. Hence,
lcm(50771, 4326) =
50771 · 4326
=
gcd(50771, 4326)
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Example: gcd(50771, 4326) = 7. Hence,
lcm(50771, 4326) =
50771 · 4326
50771 · 4326
=
=
gcd(50771, 4326)
7
Math 312, Lecture 6
September 21, 2015
The least common multiple of a and b
lcm(a, b) is the smallest positive integer, which is a divisible by both a and
b. Here a, b 6= 0.
Proposition: Suppose a = p1d1 . . . prdr and b = p1e1 . . . prer , where p1 , . . . , pr
are distinct primes, and d1 , . . . , dr , e1 , . . . , er are non-negative integers.
Then
min(d1 ,e1 )
(a) gcd(a, b) = p1
(b) lcm(a, b) =
max(d1 ,e1 )
p1
min(dr ,er )
· · · · · pr
· ··· ·
.
max(dr ,er )
pr
.
(c) gcd(a, b) lcm(a, b) = ab.
Example: gcd(50771, 4326) = 7. Hence,
lcm(50771, 4326) =
50771 · 4326
50771 · 4326
=
= 31, 376, 478.
gcd(50771, 4326)
7
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined,
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use of the Euclidean
algorithm:
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use of the Euclidean
algorithm:
gcd(a1 , a2 , a3 ) = gcd(a1 , gcd(a2 , a3 )),
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use of the Euclidean
algorithm:
gcd(a1 , a2 , a3 ) = gcd(a1 , gcd(a2 , a3 )),
gcd(a1 , a2 , a3 , a4 ) = gcd(a1 , a2 , gcd(a3 , a4 )), etc.
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use of the Euclidean
algorithm:
gcd(a1 , a2 , a3 ) = gcd(a1 , gcd(a2 , a3 )),
gcd(a1 , a2 , a3 , a4 ) = gcd(a1 , a2 , gcd(a3 , a4 )), etc.
For example, last week we used the Eucidean algorithm to show that
gcd(50771, 4326) = 7.
Math 312, Lecture 6
September 21, 2015
Greatest common divisor of several numbers
gcd(a1 , . . . , ar ) is well defined, as long as at least one of the numbers
a1 , . . . , ar is non-zero.
gcd(a1 , . . . , ar ) can be computed by repeated use of the Euclidean
algorithm:
gcd(a1 , a2 , a3 ) = gcd(a1 , gcd(a2 , a3 )),
gcd(a1 , a2 , a3 , a4 ) = gcd(a1 , a2 , gcd(a3 , a4 )), etc.
For example, last week we used the Eucidean algorithm to show that
gcd(50771, 4326) = 7. Thus
gcd(56000, 50771, 4326) = gcd(56000, 7) = 7 .
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined,
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Proof: Divide m by l with remainder: m = ql + r .
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Proof: Divide m by l with remainder: m = ql + r . Then 0 6 r 6 l − 1 is
again a common multiple of a and b.
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Proof: Divide m by l with remainder: m = ql + r . Then 0 6 r 6 l − 1 is
again a common multiple of a and b. By minimality of l, r = 0.
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Proof: Divide m by l with remainder: m = ql + r . Then 0 6 r 6 l − 1 is
again a common multiple of a and b. By minimality of l, r = 0.
The lemma tells us that we can compute lcm(a1 , . . . , ar ) recursively:
Math 312, Lecture 6
September 21, 2015
Least common multiple of several numbers
lcm(a1 , . . . , ar ) is well defined, as long as all of the numbers a1 , . . . , ar are
non-zero.
Lemma: Let l := lcm(a, b). Then any common multiple m of a and b is
divisible by l.
Proof: Divide m by l with remainder: m = ql + r . Then 0 6 r 6 l − 1 is
again a common multiple of a and b. By minimality of l, r = 0.
The lemma tells us that we can compute lcm(a1 , . . . , ar ) recursively:
lcm(a1 , . . . , ar −1 , ar ) = lcm(a1 , . . . , ar −2 , lcm(ar −1 , ar )).
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c,
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y )
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c,
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof. We proved part (a) last week. In part (b) we
a
a
can check that x = x0 + t and y = y0 − t
d
d
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof. We proved part (a) last week. In part (b) we
a
a
can check that x = x0 + t and y = y0 − t satisfy the equation for
d
d
every integer t by susbtituting these
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof. We proved part (a) last week. In part (b) we
a
a
can check that x = x0 + t and y = y0 − t satisfy the equation for
d
d
every integer t by susbtituting these formulas into the equation
ax + by = c.
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof. We proved part (a) last week. In part (b) we
a
a
can check that x = x0 + t and y = y0 − t satisfy the equation for
d
d
every integer t by susbtituting these formulas into the equation
ax + by = c. It only remains to show that every solution (x, y ) to the
equation ax + by = c is of the form (1)
Math 312, Lecture 6
September 21, 2015
Linear Diophantian equations
These are equations of the form ax + by = c, where a, b, c are integers.
Today’s Main Theorem: (a) The linear diophantian equation
ax + by = c has an integer solution (x, y ) if and only if d := gcd(a, b)
divides c.
(b) Suppose d divides c, and (x0 , y0 ) is one integer solution of this
equation. Then the general solution is
x = x0 +
a
b
t and y = y0 − t,
d
d
(1)
where t ranges over the integers.
Comments on the proof. We proved part (a) last week. In part (b) we
a
a
can check that x = x0 + t and y = y0 − t satisfy the equation for
d
d
every integer t by susbtituting these formulas into the equation
ax + by = c. It only remains to show that every solution (x, y ) to the
equation ax + by = c is of the form (1) for some integer t.
Math 312, Lecture 6
September 21, 2015
Diophantus of Alexandria, 3rd Century AD
Math 312, Lecture 6
September 21, 2015
Diophantus of Alexandria, 3rd Century AD
Diophantus is sometimes
called ”the father of algebra”.
Math 312, Lecture 6
September 21, 2015
Diophantus of Alexandria, 3rd Century AD
Diophantus is sometimes
called ”the father of algebra”.
A ”Diophantian equation” is a
polynomial equation, with
integer coefficients, for which
integer solutions are sought.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b),
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 =
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) =
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) = 35−2·154+8·35 =
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) = 35−2·154+8·35 = (−2)·154+9·35.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) = 35−2·154+8·35 = (−2)·154+9·35.
Particular solution to 154x + 35y = 7: x = −2, y = 9.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) = 35−2·154+8·35 = (−2)·154+9·35.
Particular solution to 154x + 35y = 7: x = −2, y = 9.
Particular solution to 154x + 35y = 21: x = −6, y = 27.
Math 312, Lecture 6
September 21, 2015
An example
Example: Solve the linear Diophantine equations (a) 154x + 35y = 21 and
(b) 154x + 35y = 24.
Euclidean algorithm:
154 = 4 · 35 + 14
35 = 2 · 14 + 7
14 = 2 · 7 + 0.
No solution to (b), because 24 is not divisible by 7.
(a) First find a solution to 154x + 35y = 7 by back substitution.
7 = 35−2·14 = 35−2·(154−4·35) = 35−2·154+8·35 = (−2)·154+9·35.
Particular solution to 154x + 35y = 7: x = −2, y = 9.
Particular solution to 154x + 35y = 21: x = −6, y = 27.
General solution to 154x + 35y = 21: x = −6 + 5t, y = 27 − 22t.
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
= (−5 · 903) + (19 · 238)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
= (−5 · 903) + (19 · 238) = (19 · 1141) + (−24 · 903)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
= (−5 · 903) + (19 · 238) = (19 · 1141) + (−24 · 903)
= (−24 · 3185) + (67 · 1141)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
= (−5 · 903) + (19 · 238) = (19 · 1141) + (−24 · 903)
= (−24 · 3185) + (67 · 1141) = (67 · 4326) + (−91 · 3185)
Math 312, Lecture 6
September 21, 2015
Another example: 50771x + 4326y = 28
Calculate gcd(50771, 4326) using the Euclidean algorithm:
50771 = 11 · 4326 + 3185
4326 = 1 · 3185 + 1141
3185 = 2 · 1141 + 903
1141 = 1 · 903 + 238
903 = 3 · 238 + 189
238 = 1 · 189 + 49
189 = 3 · 49 + 42
49 = 1 · 42 + 7
42 = 6 · 7 + 0
(a) Particular solution to 50771x + 4326y = 7 by back substitution:
7 = (1 · 49) + (−1 · 42) = (−1 · 189) + (4 · 49) = (4 · 238) + (−5 · 189)
= (−5 · 903) + (19 · 238) = (19 · 1141) + (−24 · 903)
= (−24 · 3185) + (67 · 1141) = (67 · 4326) + (−91 · 3185)
= (−91 · 50771) + (1068 · 4326).
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7:
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Particular solution to 50771x + 4326y = 28:
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Particular solution to 50771x + 4326y = 28: x0 = −364, y0 = 4272.
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Particular solution to 50771x + 4326y = 28: x0 = −364, y0 = 4272.
General solution to 50771x + 4326y = 28:
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Particular solution to 50771x + 4326y = 28: x0 = −364, y0 = 4272.
General solution to 50771x + 4326y = 28:
4326
t = −364 + 618t,
x0 = −364 +
7
Math 312, Lecture 6
September 21, 2015
Particular solution to 50771x + 4326y = 7: x0 = −91, y0 = 1068.
Particular solution to 50771x + 4326y = 28: x0 = −364, y0 = 4272.
General solution to 50771x + 4326y = 28:
4326
t = −364 + 618t,
x0 = −364 +
7
50771
t = 4272 − 7253t.
y0 = 4272 −
7
Math 312, Lecture 6
September 21, 2015
Download