0% found this document useful (0 votes)
16 views22 pages

ch08 Student

Uploaded by

kicagah155
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views22 pages

ch08 Student

Uploaded by

kicagah155
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Solutions to Chapter 8 Exercises

in Discrete Mathematics by Norman L. Biggs;


2nd Edition 2002

8.1 Divisibility

8.1.1 Prove that x | 0 for every x ∈ Z but 0 | x only when x = 0.

Discussion The point of this exercise is to illustrate the text’s ab-


stract definition of division, the consequences of which include these
unfamiliar ideas about dividing, and being divided by, the zero ele-
ment 0 of Z.

Theorem For every x ∈ Z, x | 0, but 0 | x only when x = 0.

Proof If x ∈ Z then 0 = x0 (with 0 ∈ Z). If x ∈ Z and 0 | x then


x = 0q for some q ∈ Z, so x = 0.

1
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.1.2 Show that if c | a and c | b, then c | xa + yb for any integers


x, y.

Discussion This exercise examines how the abstract definition of


division fits in with the basic properties of Z (Section 7.5). The proof
uses the facts that, if a, b, c ∈ Z then a × b = b × a, (a × b) × c =
a × (b × c) and a × (b + c) = (a × b) + (a × c) (see also Section 4.1).

Theorem If a, b, c ∈ Z and c | a and c | b, then c | xa + yb for any


integers x, y.

Proof From the definition of division, there exist p, q ∈ Z such that


a = cp and b = cq. It follows that:
xa + yb = xcp + ycq = cxp + cyq = c(xp + yq),
so that c | xa + yb.

2
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.1.3 Prove that if x and y are non-zero integers such that x | y and
y | x then either x = y or x = −y. [Hint: you may assume that if a
and b are integers such that ab = 1 then a = b = 1 or a = b = −1.
But how would you prove this?]

Discussion This exercise applies the definition of division, while


proving the Hint involves looking more closely at how the properties
of the integers imply familiar facts.

Theorem Suppose that x, y ∈ Z, that x 6= 0 and y 6= 0 and that


x | y and y | x; then x = y or x = −y.

Proof From the definition of division, there exist a, b ∈ Z such that


x = yb and y = xa, so that x = (xa)b = xab, and hence x − xab = 0,
so that x × (1 − ab) = 0. Hence x × 0 = x × (1 − ab), and hence
0 × x = (1 − ab) × x, so since x 6= 0 Theorem 7.5.2 implies that
1 − ab = 0, and hence that ab = 1. If we accept the hint, either
a = b = 1, and then x = y, or a = b = −1, and then x = −y.

Remark The hint can be reformulated as as if and only if statement:


if a, b ∈ Z then ab = 1 if and only if a = b = 1 or a = b = −1.
One of these implications is very easy, but the other is more easily
proved using ideas such as prime factorization from later sections.
Anticipating, if p ∈ Z is a (positive) prime, and if p divides |a| or
p divides |b|, then p divides |ab| = 1, which is impossible from the
definition of a prime number.

3
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.2 Quotient and remainder

8.2.1 Find the quotient q and remainder r when


(i) a = 1001, b = 11; (ii) a = 12345, b = 234.

Discussion Both parts can be done either by long division or, with
care, on a calculator, and such practice should help in understand-
ing Theorem 8.2 and its consequences. Unless the remainder is 0
(i.e. the division is exact) then, if using a calculator, it is necessary
to round down to get the integer q and then to use that value to
calculate r.
The answers are: (i) q = 91, r = 0; (ii) q = 52, r = 177.

4
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.2.2 Show that, under the conditions of the theorem, if a = bq + r


and a = bq 0 + r, then q = q 0 .

Discussion ‘Under the conditions of the theorem’ can be checked


to mean that: q, r, q 0 ∈ N0 and 0 ≤ r < b. The result shows that
the non-negative integer q defined in Theorem 8.2 is unique, as also
(consequently) is the other non-negative integer r that is mentioned
there. (The uniqueness of r is also discussed immediately after the
proof of Theorem 8.2.)

Theorem If a, b, q, r, q 0 ∈ N0 with a = bq+r = bq 0 +r and 0 ≤ r < b


then q = q 0 .

Proof Evidently bq +r = bq 0 +r, so bq = bq +r +−r = bq 0 +r +−r =


bq 0 . It follows that 0 = bq − bq 0 = b(q − q 0 ) = (q − q 0 )b = 0b, and
Theorem 7.5.2 implies that q − q 0 = 0, and hence q = q 0 .

5
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.3 Representation of integers

8.3.1 Find the representations of (1985)10 in base 2, in base 5, and


in base 11.

Discussion The method to use is illustrated in Example 8.3, where


the chosen (new) base is 2.

Solution For base 2, dividing repeatedly by 2 we obtain:


1985 = 2 × 992 + 1 992 = 2 × 496 + 0
496 = 2 × 248 + 0 248 = 2 × 124 + 0
124 = 2 × 62 + 0 62 = 2 × 31 + 0
31 = 2 × 15 + 1 15 = 2 × 7 + 1 7=2×3+1
3=2×1+1 1 = 2 × 0 + 1.
Hence (1985)10 = (11 111 000 001)2 .

For base 5, dividing repeatedly by 5 we obtain:


1985 = 5 × 397 + 0 397 = 5 × 79 + 2
79 = 5 × 15 + 4 15 = 5 × 3 + 0 3=5×0+3 .
Hence (1985)10 = (30 420)5 .

For base 11, dividing repeatedly by 11 we obtain:


1985 = 11 × 180 + 5 180 = 11 × 16 + 4
16 = 11 × 1 + 5 1 = 11 × 0 + 1.
Hence (1985)10 = (1545)11 .

6
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.3.2 Find the decimal (base 10) representations of


(i) (11 011 101)2 ; (ii) (4165)7 .

Discussion The appropriate method is an immediate consequence


of the definitions in Section 8.3.

Solution For (i),


(11 011 101)2 =
1×20 +0×21 +1×22 +1×23 +1×24 +0×25 +1×26 +1×27 =
1 + 1 × 4 + 1 × 8 + 1 × 16 + 1 × 64 + 1 × 128 = (221)10 ,
or simply 221.

For (ii),
(4165)7 =
5 × 70 + 6 × 71 + 1 × 72 + 4 × 73 =
5 + 42 + 49 + 4 × 243 = (1468)10 ,
or simply 1468.

7
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.4 The greatest common divisor

8.4.1 Find the gcd of 721 and 448 and express it in the form
721m + 448n with m, n ∈ Z.

Discussion The method for this type of question is illustrated im-


mediately after the proof of Theorem 8.4. It is usually helpful to
practice a few questions of this type.

Solution We have
721 = 1 × 448 + 273
448 = 1 × 273 + 175
273 = 1 × 175 + 98
175 = 1 × 98 + 77
98 = 1 × 77 + 21
77 = 3 × 21 + 14
21 = 1 × 14 + 7
14 = 2 × 7 + 0
Hence gcd(721, 448) = 7, and reversing the calculation (from the
penultimate line) we have
7 = 21 − 14 = 21 − (77 − 3 × 21) = 4 × 21 − 77 =
4 × (98 − 77) − 77 = 4 × 98 − 5 × 77 =
4 × 98 − 5 × (175 − 98) = 9 × 98 − 5 × 175 =
9 × (273 − 175) − 5 × 175 = 9 × 273 − 14 × 175 =
9 × 273 − 14 × (448 − 273) = 23 × 273 − 14 × 448 =
23 × (721 − 448) − 14 × 448 = 23 × 721 − 37 × 448

/CTD

8
so gcd(721, 448) = 7 = 721 × 23 + 448 × (−37).

Remark The integers m, n in an expression such as d = am + bn are


never unique; in fact, if k ∈ Z then we also have d = a(m + kb) +
b(n − ka).

9
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.4.2 Show that if there are integers m and n such that mu+nv = 1
then gcd(u, v) = 1.

Discussion Since the definition in Section 8.4 assumes non-negative


integers, we will need to assume that u, v ∈ N0 , although this will
not affect the argument, while m, n can take any values in Z.

Theorem If u, v ∈ N0 and m, n ∈ Z are such that mu + nv = 1


then 1 = gcd(u, v).

Proof We know that u, v have a gcd, which we can label d. From


Ex. 8.1.2 we know that d | 1, that is that d is a divisor of 1. Clearly
1 is the greatest divisor of itself, and is a divisor of both u and v, so
d = gcd(u, v) = 1.

10
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.4.3 Let a and b be positive integers and let d = gcd(a, b). Prove
that there are integers x and y which satisfy the equation ax+by = c
if and only if d | c.

Discussion This is an ‘if and only if’ statement, and so we need to


provide two separate proofs, one in each ‘direction’.

Theorem Suppose that a, b, c, d ∈ Z with a > 0, b > 0 and d =


gcd(a, b); then there exist x, y ∈ Z such that ax + by = c if and only
if d | c.

Proof (Easy direction) If x, y ∈ Z and ax + by = c then d | c by


Ex. 8.1.2.
(Other direction) Suppose that d | c, which means that c = dq
for some q ∈ Z. From Theorem 8.4 there exist m, n ∈ Z such that
d = ma + nb, and then
c = dq = (ma + nb)q = (ma)q + (nb)q = a(mq) + b(nq),
so we can take x = mq and y = nq.

11
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.4.4 Find integers x and y satisfying 966x + 686y = 70.

Discussion The method for this type of question is very similar to


that for Ex. 8.4.1, except that (as it turns out) 70 is a (non-trivial)
multiple of gcd(966, 686), and as a result we have to take advantage
of Ex. 8.4.3 as well.

Solution We have

966 = 1 × 686 + 280


686 = 2 × 280 + 126
280 = 2 × 126 + 28
126 = 4 × 28 + 14
28 = 2 × 14 + 0

Hence gcd(966, 686) = 14, which does divide 70, and reversing the
calculation (from the penultimate line) we have
14 = 126 − 4 × 28 = 126 − 4 × (280 − 2 × 126) =
9 × 126 − 4 × 280 = 9 × (686 − 2 × 280) − 4 × 280 =
9 × 686 − 22 × 280 = 9 × 686 − 22 × (966 − 686) =
31 × 686 − 22 × 966
and since 70 = 5 × 14 we have 70 = 966 × (−110) + 686 × 31. Thus
we can take x = −110 and y = 31 (though, as at Ex. 8.4.1 this
solution is not unique).

12
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.5 Prime numbers

8.5.1 Find all the primes p in the range 100 ≤ p ≤ 120.

Discussion According to Exercise 8.6.3, if an integer m ≥ 2 is not a


prime number (i.e. is composite),
p then m is divisible by at least one
prime p such that 1 < p ≤ (m). This means that, in testing num-
bers in the range 100 ≤ m ≤ 120, we only have to check whether
m is a multiple of any of a (relatively) small collection of primes,
namely the primes q with 1 < q < 11, because 120 < 112 = 121.
The general result in Ex. 8.6.3 requires a proper proof, but famil-
iarity with ordinary multiplication tables is enough to identify the
primes required in this case.

Solution No prime p ≥ 7 can be a multiple of 2, 3 or 5, and those


multiples are very easy to recognise. Accordingly, the only integers
it is necessary to test further will be: 101, 103, 107, 109, 113 and 119.
The next prime to try is 7, and it is easy to see that, of the six inte-
gers just listed, only 119 is a multiple of 7 : 119 = 7 × 17. There are
no multiples of 11 on the list, and the next prime, 13, is so large that,
on dividing by it, any multiple m of 13 in the range 100 ≤ m ≤ 120
would leave a quotient m/13 smaller than 13, hence divisible by one
of the primes smaller than 13. The relevant primes are therefore:
101, 103, 107, 109 and 113.

13
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.5.2 Show that 123456789 is not a prime. In fact, there is a num-


ber N such that 123456789 = 3 × 3 × N . Find N and show that it
is not a prime.

Discussion Once the integer N has been identified, the usual first
step is to try small primes, so see if they divide N . But it turns out
that N has no prime factors smaller than 100, which is discouraging.
But looking ahead (to Ex. 8.6.3 below), the presult there suggests it
might be best to start with primes near (N ), rather than with
small primes.

Solution Dividing either by hand or using a calculator, 123456789 =


3×41152263 = 3×3×13717421, so 123456789 is certainly p not prime,
and N = 13717421. A calculator readily shows that (13717421) =
3703.7 (1 dec. pl.), so according to the discussion it is best to try
primes p ≤ 3703, working downwards. Those primes must be odd
and not multiples of 5, but are otherwise hard to recognise; accord-
ingly, it is probably simplest to try all integers from 3703 downwards
except those which are obviously composite.

The first few such integers would be 3703, 3701, 3697 (excluding
3699 as an obvious multiple of 3), and so on. With a little more work
it turns out that N = 13717421 = 3607×3803, so is not prime. With
significantly more work still, it is possible (using Ex. 8.6.3 again) to
verify that 3607 and 3803 are themselves both prime, which con-
firms that starting with 2, 3, . . . and working up would be a pretty
time consuming process.

14
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.5.3 Show that if p and p0 are primes, and p | p0 , then p = p0 .

Discussion This exercise tests understanding of the definition of


prime numbers.

Theorem If p, p0 ∈ N and are primes, and if p | p0 then p = p0 .

Proof Since p | p0 there exists r ∈ N such that p0 = pr. From the


definition of a prime, the only positive divisors of p0 are itself and 1,
and p 6= 1 (because 1 is not a prime) so p = p0 .

15
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.6 Existence and uniqueness of prime factoriza-


tion

8.6.1 Find the prime factorizations of 201, 1001, and 201 000.

Discussion Although such an ordering is not required by Theorem


8.6.2, for purposes of comparing integers given their factorizations,
it is usually convenient to arrange prime factors in increasing order,
e.g. 23 ×5×7 rather than (say) 5×2×7×22 . It is also common that
earlier parts of an exercise, or set of exercises, are useful in solving
later parts.

Solution Either by trial and error or other methods, we have:


201 = 3 × 67, both of which are prime.

Either by trial and error or by other methods, we have:


1001 = 11 × 91 = 11 × 7 × 13 = 7 × 11 × 13.

From the formula for 201, we also have:


201000 = 201 × 1000 = 3 × 67 × 103 ,
and 103 = 23 × 53 , so that
201000 = 23 × 3 × 53 × 67.

16
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.6.2 Find the prime factorization of 123456786.

Discussion Since 123456786 is even, it is easy to get started on the


factorization process. Although techniques do exist for finding prime
factors, the problem is in general extremely difficult, and trial, error,
luck and good guesswork are important elements in approaching
many problems like this one.

Solution Clearly 123456786 = 2 × 61728393, so test 61728393 for


divisibility by 3. We find:
61728393 = 3 × 20576131,
so we have the factorization:
123456786 = 2 × 3 × 20576131,

and the difficulty is to tackle 20576131, which is easily checked not


to be a multiple pof 2 or of 3. In the absence of better techniques,
and noting that (20576131) = 4536.1 (1 dec. pl), we would have
to eliminate all primes in the range 7 ≤ 4531 (taking advantage of
the fact that 4532, 4533, 4534, 4535 and 4536 are easily seen not to
be prime). It turns out that 20576131 is prime.

17
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.6.3 Show that if n ≥ 2 and n is not a prime then there is a prime


p such that p | n and p2 ≤ n. Hence show that if 467 were not a
prime then it would have a prime divisor p ≤ 19. Deduce that 467
is a prime.

Discussion There are several different proofs of this result, although


all of them utilise the order relation < on N (or on Z) that is dis-
cussed in Sections 4.2 and 7.5. Two distinct proofs are given here,
to illustrate different ways of applying that relation (and the closely
related Principle of Induction from Section 4.3). One advantage of
Proof 2 is that it proves, rather than assuming, that every integer
n ≥ 2 is a multiple of some prime q. The Solution of the numerical
part of the exercise is shown separately.

Theorem If n ∈ N and n ≥ 2 but n is composite then there is a


prime p such that p | n and p2 ≤ n.

Proof 1 Suppose that n ≥ 2 is a composite integer, so that n = rs


for r, s ∈ N with 1 < r < n and 1 < s < n. Swapping labels if
necessary, we can suppose that r ≤ s, and then - assuming that all
integers n ≥ 2 have a prime factor - let p be any prime factor of r.
Clearly r = pq for some q ∈ N. The result then follows from the
facts that n = p(qs) and that p2 ≤ rs = n since p ≤ r ≤ s.

Proof 2 Let X be the set of all integers m ≥ 2 which do not have


a prime factor: formally X = {m ∈ N | m ≥ 2 and, for all primes
q ∈ N, m is not divisible by q}. If X 6= ∅ then by the principle of
induction there is a least element x ∈ X. Clearly x itself cannot be
prime, so x = ab for some a, b ∈ N with 1 < a < x and 1 < b < x. It
follows that neither a nor b is in X, and in particular that a = qt for
some prime q and some t ∈ N, and hence that x = q(tb), i.e. that x
is, after all, divisible by the prime q. This contradiction shows that

18
X = ∅; hence every integer m ≥ 2 is divisible by a prime q.
Now let Y be the set of all composite integers n ≥ 2 which do
not have the property that, for some prime divisor p of n, p2 ≤ n:
formally Y =
{n ∈ N | n ≥ 2, n composite, if p ∈ N is prime and p | n then n < p2 }.

If Y 6= ∅ then by the principle of induction there is a least element


y ∈ Y , and by assumption y = rs for some r, s ∈ N with 1 < r < y
and 1 < s < y. If r, for instance, is composite then r ∈ / Y so there
2
exists a prime p which divides r such that p ≤ r, and clearly p is
a prime factor of y such that p2 ≤ y. A similar argument applies if
s is composite, and both cases yield the contradiction that y ∈ Y
implies y ∈/ Y.
In the remaining case both r and s are prime, and we can assume
(swapping labels if necessary) that r ≤ s, in which case putting p = r
again yields a contradiction (as in Proof 1).
It follows that Y = ∅, and that the theorem is true.

Solution
p By direct calculation, 467 < 222 = 484, or by calculator
(467) = 21.6 (1 dec. pl.), so on either ground we need only look
at primes p ≤ 21, that is at 2, 3, 5, 7, 11, 13, 17 and 19. Dividing
either by hand or using a calculator, it is clear that none of these 8
primes does divide 467, which must therefore be prime by the the-
orem just proved.

19
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.6.4 Suppose that we wish to test whether the number 123456791


is a prime, by checking all possible divisors up to a certain number
X. On the basis of Ex. 2, what value of X (approximately) is suffi-
cient?

Discussion 123456791 is only 2 different from the integer 123456789


of Ex. 3, but it is far less easy to spot an obvious factorisation.
p
Solution By calculator we know that (123456791) = 11111.1 (to
1 dec. pl.), so that X = 11111 would be sufficient.

20
Solutions to Chapter 8 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002

8.6.5 Let H be the set {4n + 1 | n ∈ N ∪ {0}} = {1, 5, 9, 13, . . .}.


Show that H is closed under multiplication; in other words, that the
product of two members of H is also in H.
A member of H (other than 1) that is not the product of two
members of H other than 1 and itself is called an H-prime. Find
three distinct H-primes a, b and c such that 441 = ab = c2 .
Is it true that every element of H has a factorization into H-
primes? Is it true that every element of H has a unique factoriza-
tion into H-primes? Explain why the proof that every integer has a
unique prime factorization does not work in this situation.

Discussion In approaching this exercise it is very helpful to bear in


mind results, properties and techniques - such as unique factoriza-
tion, the order relation <, the discussion at the start of Section 8.6 -
which we already know about for N. This is because it is likely (and
turns out to be the case) that those ideas will also be relevant to
the subset H of N. For example, factorizations in H will be related
to factorizations in N , and any non-empty subset of H will have a
least element by the principle of induction.
The treatment of the exercise below is mostly discursive, so is
presented as a ‘Solution’ not in the ‘Theorem-Proof’ style. Note
also that it is also worth choosing a ‘friendly’ notation, as in the
first part of the solution, and that we only obtain the answer ‘Yes’
to the question whether every element of H has a factorization into
H-primes provided that we adopt the convention (which is standard,
but not explicitly mentioned in the statement of Theorem 8.6.2)
according to which the element 1 of N and of H is the product of
the empty set of (rational) primes or, respectively, of H-primes.

Solution Two typical elements of H can be written as 4m + 1 and


4n + 1, with m, n ∈ {0, 1, 2, . . .}, and we have:

21
(4m + 1) × (4n + 1) = 16mn + 4(m + n) + 1 = 4(4mn + m + n) + 1.
Now (4mn + m + n) ∈ {0, 1, 2, . . .} from the properties of Z, so
(4m + 1) × (4n + 1) ∈ H, as required.
It is easy to see that 441 = 9 × 49 = 212 , simply using factoriza-
tion in N, so that a = 9, b = 49, c = 21 would fit the bill if each was
an H-prime. The prime factorization of 9 in N is 9 = 32 , but 3 ∈ /H
and 9 has no other non-trivial factorization in H, since it has none
in N; hence 9 is an H-prime. Virtually identical considerations show
that 49 is an H-prime, and we have the factorization 21 = 3 × 7 in
N which can similarly be used to show that 21 is also an H-prime.
The argument at the start of Section 8.6 can be adopted, virtually
word for word, to show (by the principle of induction) that every
element of H is a product of H-primes, as also can the initial section
of Exercise 8.6.3, Proof 1. But the example of factorizations of 441
shows that the H-primes involved, and the powers to which they
are raised, are not unique.
This is because, in the proof of Theorem 8.6.2, it is essential to use
the crucial property of prime numbers established in Theorem 8.6.1,
which can be mildly restated as:

• if p is a prime number, if a, b ∈ N and if p | ab then p | a or p | b.

Looking at the case of the H-factorizations of 441, we see that,


for example, the H-prime 9 divides 21×21 in H, but does not divide
the factor 21 either in H or in N.

Remark Theorem 8.6.1 can be used as an alternative definition of


a prime number (in N or Z), since we have the following result:
if p ∈ N with p ≥ 2 then p is prime if and only if, whenever p
divides a product ab with a, b ∈ N it follows that p divides one of a
and b.

22

You might also like