Professional Documents
Culture Documents
Solutions to Assignment 3
1 Question:
√
(a) Determine the continued fraction of 47.
Solution:
√
(a) We run the algorithm from the lectures: Starting with x0 = 47, we get
√
1 6 + 47
a0 = bx0 c = 6, x1 = =
x 0 − a0 11
√
1 5 + 47
a1 = bx1 c = 1, x2 = =
x 1 − a1 2
√
1 5 + 41
a2 = bx2 c = 5, x3 = =
x 2 − a2 11
1 √
a3 = bx3 c = 1, x4 = = 6 + 47
x 3 − a3
√
1 6 + 47
a4 = bx4 c = 12, x5 = = = x1 .
x4 − a4 11
√
So the continued fraction of 41 is [6; 1, 5, 1, 12].
3u2 − 6u − 2 = 0.
1
So p
u = 1 ± 5/3
p
since u > 0 we know u = 1 + 5/3. Hence,
√
5+ 15
[4; 2, 3] = 4 + 1/u = .
2
2
√
(iii) Note n < n2 + 2n < n + 1 (since (n + 1)√2 = n2 + 2n + 1 > n2 + 2n).
Using the continued fraction algorithm with x0 = n2 + 2n = a0 + t0 gives
√
1 n2 + 2n 1
a0 = n, = + = a1 + t 1
t0 2n 2
1 1 √
a1 = b c = 1, = n2 + 2n + n
t0 t1
√
1 1 n2 + 2n 1 1
a2 = b c = 2n, = + = ,
t1 t2 2n 2 t0
√
By the same reasoning as before we conclude n2 + 2n = [n; 1, 2n].
Part (b):
√ √
By part (a), (i) with n = 1, 2 = [1; 2]. By part (ii) with
√n = 1, 3 = √
[1; 1, 2]
2
(or part (iii) with n = 1). Part (iii) with√n = 3 gives 3 + 2 · 3 = 15 =
[3; 1, 6]. Finally part (i) with n = 6 implies 37 = [6; 12].
3 Question: In the lectures, we will see a proof using continued fractions of the
following theorem:
(a) Choose any positive integer n and consider the numbers xk = kα − bkαc
for k = 0, 1, 2, . . . , n.
(b) Divide the unit interval [0, 1) (closed on the left, open on the right) into n
subintervals
[0, 1/n), [1/n, 2/n), . . . , [(n − 1)/n, 1).
(d) Put q = k − l. Show that qα differs from the nearest integer (say p) by less
than 1/n.
3
(e) Deduce that
α − p 1 1
< < 2.
q nq q
(f) Given any such rational approximation pi /qi for α, show that we can choose
n large enough that the rational approximation pi+1 /qi+1 produced by the
above method is different from pi /qi . Specifically, if we choose n large
enough that n > |α − pi /qi |−1 , then
α − p i+1 1 1 p i
< < < α − .
qi+1 nqi+1 n qi
Solution:
The first two parts don’t actually ask you to do anything except read them!
(c) If you put n + 1 pigeons into n pigeonholes, there must be two pigeons
in the same pigeonhole. If xk and xl both lie in an interval of length 1/n, then
|xk − xl | < 1/n.
(d) xk = kα − r and xl = lα − s for some integers r, s (indeed r = bkαc and
s = blαc). So
qα = (k − l)α = (r − s) + (xk − xl ),
which is an integer plus a number whose modulus is less than 1/n. We have
p = r − s.
(e) Since |qα − p| < 1/n, dividing by q gives |α − p/q| < 1/(nq). Now
q = k − l < n, since both k and l are in the range [0, . . . , n]; so 1/(nq) < 1/q 2 .
(f) Follow the hint. Remember that n was arbitrary, so we can make it as
large as we like.
(g) Since we can always produce a new approximation with larger denomina-
tor than the largest we have produced so far, there must be infinitely many.