0% found this document useful (0 votes)
9 views12 pages

ch05 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)
9 views12 pages

ch05 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/ 12

Solutions to Exercises in Discrete Mathematics

by: Norman L. Biggs: 2nd Edition 2002

5.1 The concept of a function

5.1.1 Let U denote the set of citizens of the state of Utopia. Which
of the following statements correctly specify a function from U to U ?
(Any assumptions you make about the Utopian civilization should
be stated explicitly.)

(i) f (x) is the mother of x.


(ii) g(x) is the daughter of x.
(iii) h(x) is the wife of x.

Discussion Any function f : X → Y has four important features:


• the ‘starting’ set X of possible values of the ‘variable’ x ∈ X;
• the ‘destination’ set Y of possible values of the function
f (x) ∈ Y ;
• the fact that the value f (x) is specified for every x ∈ X;
• the fact that f (x) is uniquely determined by x and whatever
rule or formula is used to define f .

Solution (i) If we neglect very modern innovations, such as egg


donations and surrogate mothers, then every person has, or had,
a unique mother, who may or may not still be alive at the time
in question. Assuming that ‘citizens’ includes past citizens (both
female and male!), perhaps now dead or elsewhere, then f (x) is
defined, uniquely, for every citizen x of Utopia. We can also assume
(for this question) that the mother of any Utopian is (or was) herself
a Utopian, so that f (x) takes values in the set of Utopian citizens.
This means that f has all four features just discussed, so f is a
function.
(ii) A citizen x of Utopia might have no daughters, in which case

1
there would not be any g(x), or might have several daughters, in
which case g(x) would not be unique. Both cases would surely arise,
so g(x) fails to be a function on either count.
(iii) On the surely plausible assumption that women in Utopia
do not themselves have wives, the rule for h(x) does not describe its
value when x is female, so is not a function. (There might also be
unmarried men, and another possible problem is that, while Utopia
might be one of the societies in which only adult men were ‘citi-
zens’, in many of those societies men also have more than one wife
simultaneously, so that h(x) would then fail to satisfy the fourth
criterion.)

2
Solutions to Exercises in Discrete Mathematics
by: Norman L. Biggs: 2nd Edition 2002

5.1.2 Write down the values s(1), s(2), s(3), s(4), s(5), s(6) of the
function (sequence) defined by the rules
s(1) = 1, s(2) = 2, s(n + 1) = 2s(n) − s(n − 1) (n ≥ 2).
Make a conjecture about a formula for s(n) and try to prove it by
using the principle of induction.

Discussion Since the formula for s(n) (n ≥ 2) involves two previous


values, it is likely that the ‘strong’ principle of induction will be
involved in an induction proof.

Solution We are given that s(1) = 1 and s(2) = 2, so s(3) =


2 × 2 − 1 = 3; then s(4) = 2 × 3 − 2 = 4; so s(5) = 2 × 4 − 3 = 5;
then s(6) = 2 × 5 − 4 = 6.
The obvious conjecture (‘guess’) is that s(n) = n for all n ∈ N,
and (induction basis) that is correct for n = 1. There are several
possible appropriate induction hypotheses, of which the following
induction hypothesis most closely fits the pattern of the ‘strong’
principle of induction (Section 4.6):
k ∈ N and if i ∈ N and 1 ≤ i ≤ k then s(i) = i.
The induction step is then: s(k + 1) = 2 × s(k) − s(k − 1) (by
definition), so s(k + 1) = 2k − (k − 1) (by the induction hypothesis),
that is s(k + 1) = k + 1.
By the (strong) principle of induction, s(n) = n for all n ∈ N.

Remark The ‘induction step’ just given does not use the full force
of the strong principle of induction. For example, at the value k = 5
it relies on the (assumed) True status of s(4) = 4 and of s(5) = 5,
but does not refer explicitly to values of s(1), s(2) or s(3).

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

5.2 Surjections, injections, bijections

5.2.1 Suppose that the sets A and B are A = {a, b, c, d} and B =


{1, 2, 3, 4, 5}, and the functions p : A → B, q : B → B, and
r : B → A are defined as follows:

p(a) = 3 q(1) = 3 r(1) = a


p(b) = 4 q(2) = 5 r(2) = c
p(c) = 2 q(3) = 1 r(3) = b
p(d) = 4 q(4) = 4 r(4) = a
q(5) = 2 r(5) = d
Which of these functions are surjections, which are injections, and
which are bijections?

Discussion Many mathematicians and mathematics texts also use


the phrases: ‘is surjective’ to mean ‘is a surjection’; ‘is injective’
to mean ‘is an injection’; and ‘is bijective’ to mean ‘is a bijection’.
Since Section 5.2 discusses an approach using diagrams, the solution
here uses a slightly different approach.

Solution There are no elements x ∈ A or y ∈ A such that p(x) = 1


or p(y) = 5, so p is not a surjection. Inspecting the middle column
shows that, for every z ∈ B there is a w ∈ B such that q(z) = w, so
q is a surjection. Similarly (third column), for every m ∈ A there is
a k ∈ C such that r(k) = m, so r is also a surjection.
Inspecting the first column shows that p(b) = p(d) = 4 even
though b 6= d; in words, for two distinct elements of A the function
p takes the same value; hence p is not an injection. Similarly (third
column) r(1) = r(4) = a although 1 6= 4, so r is not an injection.
On the other hand, inspecting the middle column shows that, if
i, j ∈ B and i 6= j then q(i) 6= q(j); in words, for any two distinct
elements of B the function q takes distinct values, which is another
way of saying that q is an injection.

6
To be a bijection, a function must be both an injection and a
surjection, and the previous results show that p is neither, that r is
a surjection but not an injection, and that q is both. It follows that
only q is a bijection.

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

5.2.2 Which of the following functions from N to N are surjections,


which of them are injections, and which of them are bijections?

f (n) = n3 , g(n) = n + 3,
(
n + 1 if n is odd;
h(n) =
n − 1 if n is even;

Discussion It is important to realise that whether or not a function


is an injection, a surjection or a bijection depends on three things:
• the set X of possible values of the variable;
• the set Y of possible values of the function;
• the rule or formula by which the function is defined;
and not just on the third of these. For people familiar with the
integers (Z - see Chapter 7) or with the real numbers (R) and/or
the complex numbers (C) there are further remarks about this point
following the solution. The basic facts about complex numbers can
be found at several web pages, including:

http://www.ucl.ac.uk/Mathematics/geomath/level2/complex/cn3.html
http://www.clarku.edu/˜djoyce/complex/
http://www.bath.ac.uk/˜ma1scr/maths1.html
http://students.bath.ac.uk/ma1mij/The%20Basics.html
http://www.maths.abdn.ac.uk/˜igc/tch/index/eg1006/notes/node32.html

and a web search will offer many further references.

Solution Suppose that m, n ∈ N and f (m) = f (n). That means


that m3 = n3 , and hence
0 = m3 − n3 = (m − n)(m2 + mn + n2 ).

8
Since m, n ∈ N it is clear that (m2 + mn + n2 ) 6= 0, and the product
of two non-zero elements of N is a non-zero element of N, so it must
be the case that m − n = 0, i.e. m = n. Hence f is an injection.
On the other hand, there is no k ∈ N such that k 3 = 2, since the
first few values of f (n) are f (1) = 1, f (2) = 8, f (3) = 27, . . ., so
f is not a surjection.
Since g(n) = n + 3 for all n ∈ N the first few values of g(n) are
g(1) = 4, g(2) = 5, g(3) = 6, . . .,
so there is no k ∈ N such that g(k) = 1; hence g is not a surjection.
But suppose that x, y ∈ N and g(x) = g(y); that means x + 3 =
y + 3, and hence (working in Z) x = (x + 3) − 3 = (y + 3) − 3 = y,
so that g is an injection.
Suppose that m ∈ N and m is odd; then m + 1 is even and
m + 1 ∈ N; also h(m + 1) = (m + 1) − 1 = m. Alternatively, suppose
that k ∈ N and k is even; then k − 1 is odd and k − 1 ∈ N; also
h(k − 1) = (k − 1) + 1 = k. Since every element of N is either even
or odd, h is a surjection.
Now suppose that u, v ∈ N and h(u) = h(v). If this common
value is even it follows from the definition of h(u) that u, v are odd
and that h(u) = u + 1 = v + 1 = h(v), so that u = (u + 1) − 1 =
(v + 1) − 1 = v. A similar argument, if the common value is odd,
shows that then too u = v. It follows that h is also an injection.
Summarising, f and g are both injections but not surjections,
while h is both. The only bijection is therefore h.

Remarks The formula f (n) = n3 was just found to define a function


from N to N that is an injection but not a surjection.
However, the formula F (x) = x3 is, effectively, the same as the
one defining f , but if x is allowed to take real number values in R
then that F : R → R is both an injection and a surjection, hence a
bijection. (The reason is that every real number y ∈ R has a unique
cube root.)
On the other hand, if x is allowed to take complex number values
in C then that F : C → C is a surjection but not an injection,
because every complex number w has at least one cube root, but
usually has three: for example (using ‘polar coordinates’): 13 =
(e2πi/3 )3 = (e4πi/3 )3 = 1, so that 1 has (at least) three distinct

9
complex cube roots. (In fact, it has exactly three. Every non-zero
complex number has exactly 3 cube roots, while 0 has a unique nth
root - itself - for any n ∈ N.) It follows that F : C → C is not an
injection, and therefore not a bijection.
The function F , whether from R to R or from C to C, illustrates
that whether or not a function is an injection and/or a surjection
is closely related to the problem of counting solutions to equations,
which often crops up in several areas of pure mathematics.
The formula g(n) = n+3 can be extended to give a function from
the integers Z to Z, which turns out to be a bijection, unlike the g
in this question. (It is useful to verify the details of the appropriate
proofs.)

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

5.3 Composition of functions

5.3.1 The functions s and t from N to N are defined by


s(x) = x + 1, t(x) = 2x (x ∈ N).
Show that ts and st are different functions.

Discussion The best way of showing that two functions f and g are
different is to find a value x of the variable such that f (x) 6= g(x); it
is sometimes not sufficient to find distinct rules or formulae for the
two functions, because in some circumstances (apparently) distinct
rules or formulae can take the same values. For example, for n ∈ N
the formulae
f (n) = (n + 5)2 and g(n) = (n + 2)2 + 3 × (2n + 7)
define functions which take identical values throughout N, and are
therefore the same, yet it takes a little work to check that the dif-
ferent formulae do have that property.
Similar remarks apply to the functions:
(sin x)2 and [1 − (cos x)2 ],
where verifying that they take the same values for all x ∈ R is, in
effect, proving Pythagoras’ Theorem.

Solution If x ∈ N then ts(x) = t(s(x)) = t(x + 1) = 2x + 2 and


st(x) = s(t(x)) = s(2x) = 2x + 1, so ts(1) = 4 6= st(1) = 3; it
follows that ts 6= st.

Remark In this case, it is ‘obvious’ that the two formulae just found
yield different functions, but in other cases it can be much harder
to tell, until suitable specific values are substituted into them.

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

5.3.2 Let X = {1, 2, 3, 4, 5} and let f : X → X be the function


defined by
f (1) = 2, f (2) = 2, f (3) = 4, f (4) = 4, f (5) = 4.
Show that f f = f . Find another function g 6= f such that gf = f
and f g = f .

Solution From the definition,

(f f )(1) = f (f (1)) = f (2) = 2 = f (1),


(f f )(2) = f (f (2)) = f (2) = 2 = f (2),
(f f )(3) = f (f (3)) = f (4) = 4 = f (3),
(f f )(4) = f (f (4)) = f (4) = 4 = f (4),
and (f f )(5) = f (f (5)) = f (4) = 4 = f (5);

all values of the variable have been checked, so f f = f .


The values taken by f are 2 and 4, so to satisfy the condition
gf = f we must have g(2) = 2 and g(4) = 4. The other condition
is that f g = f , so we must have f (g(1)) = f (1) = 2, which means
that g(1) = 1 or g(1) = 2. since we want g 6= f , pick g(1) = 1. It
is then possible to pick g(3) = f (3) = 4 and g(5) = f (5) = 5, while
not contradicting any of the three conditions that g is required to
satisfy. Thus:
g(1) = 1, g(2) = 2, g(3) = 4, g(4) = 4, g(5) = 4
defines a suitable g.

Remark There are other possibilities for g, of which the simplest is


g = the identity function.

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

5.4 Bijections and inverse functions

5.4.1 Construct bijections s, t : S → S, where S is the set {1, 2, 3},


having the following properties. (i : S → S is the identity function.)
(i) ss = i, s 6= i. (ii) ttt = i, t 6= i.
Discussion There are three possibilities for s, and two possibilities
for t; the topic is discussed further at Ex. 2 and in Section 10.6 and
in Chapters 20 and 21.

Solution If s is defined by: s(1) = 2, s(2) = 1 and (therefore)


s(3) = 3 then ss = i but s 6= i. If t is defined by t(1) = 2, t(2) =
3 and (therefore) t(3) = 1 then ttt = i but t 6= i.

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

5.4.2 Let S be as in Ex. 1. How many different bijections f from


S to S are there, and how many of them satisfy f = f −1 ?

Discussion Further references for this material are mentioned at


Ex. 1.

Solution There are six possible bijections from S to S, of which


two are at Ex. 1 and the following is a list of the others:
i, where i(1) = 1, i(2) = 2, i(3) = 3;
s2 , where s2 (1) = 1, s2 (2) = 3, s2 (3) = 2;
s3 , where s3 (1) = 3, s3 (2) = 2, s3 (3) = 1;
t2 , where t2 (1) = 3, t2 (2) = 1, t2 (3) = 2.
It is easy to check that t and t2 are not equal to their own inverses:
in fact t−1 = t2 and t−12 = t. The other four bijections are equal
to their own inverses.

Remark In the above solutions, i is the identity function from S to


S, which (for any set S) satisfies: i = i2 = i3 = . . .; s2 and s3
are functions which (like s from Ex. 1) satisfy:
s2 s2 = i but s2 6= i
and
s3 s3 = i but s3 6= i;
t2 is a function which (like t from Ex. 1) satisfies:
t2 t2 t2 = i but t2 6= i
(and, in fact, t2 t2 6= i as well).

16

You might also like