McMaster Math 3H03 Assignment 2
McMaster Math 3H03 Assignment 2
Question 1
Find all solutions to the linear Diophantine equation 172x + 20y = 100
Using the All Solutions theorem from class, we must first find one solution to the equation (using
Euclid's algorithm):
gcd(172, 20) ⇒ 172 = 20 ⋅ 8 + 12
20 = 12 ⋅ 1 + 8
12 = 8 ⋅ 1 + 4 ⇒ Remainder 4
8=4⋅2+0
So one solution is (x0 , y0 ) = (2, −17). This means that a solution to 172x + 20y = 100 is
(ℓ ⋅ x0 , ℓ ⋅ y0 ) = (25 ⋅ 2, 25 ⋅ −17) = (50, −425).
Now that we have one solution, we can plug into the All Solutions theorem done in class:
b a
x = ℓ ⋅ x0 + t , y = ℓ ⋅ y0 − t , t ∈ Z
d d
= 50 + 5t = −425 − 43t
Question 2
172
Find the continued fraction of 20 .
2 2 0 0 stop
Question 3
How many men, women, and children are there in the given problem?
This is our Diophantine equation. Via inspection, we can see that gcd(5, 3) = 1 and a possible
solution of gcd(5, 3) = 5x + 3y is (x, y) = (−1, 2). Let ℓ = c/d = 100/1 = 100. Then, a solution to
ax + by = c is (ℓx0 , ℓy0 ) = (100 ⋅ −1, 100 ⋅ 2) = (−100, 200).
Given one possible solution, we can use the All Solutions theorem to find all possible values of
x, y and use those values to find the corresponding z :
x = ℓx0 + 3t y = ℓy0 − 5t
, , t∈Z
= −100 + 3t = 200 − 5t
However, since x, y, z ≥ 0, we must set bounds on t. For x, 34 ≤ t ≤ 66 and for y , 20 < t ≤ 40.
Combine these and get the bounds:
34 ≤ t ≤ 40
It is hinted that there are 7 solutions, so we know that t ∈ {34, 35, 36, 37, 38, 39, 40}. Plug in t to find
xandy using the x and y values for each solution, we can find z and therefore find all 7 solutions:
⎧
⎪
⎪
(2, 30, 68), t = 34
⎪
⎪
⎪
⎪
⎪
(5, 25, 70), t = 35
⎪
⎪
⎪
⎪ (8, 20, 72), t = 36
(x, y, z) = ⎨(11, 15, 74), t = 37
⎪(14, 10, 76),
⎪
⎪
⎪
⎪
t = 38
⎪
⎪
⎪
⎪
⎪
(17, 5, 78), t = 39
⎪ (20, 0, 80),
⎩ t = 40
Question 4
Prove that the continued fraction of fn
fn−1
for n ≥ 1 is the continued fraction with
a0 = a1 = ⋯ = an−1 = 1.
fn−2
=1+
fn−1
1
=1+ fn−1
fn−2