MATH1081 Discrete Mathematics Tutorial Problems and Past Exam Papers With Solutions
MATH1081 Discrete Mathematics Tutorial Problems and Past Exam Papers With Solutions
Discrete Mathematics
Tutorial Problems
and
3
4
The solutions to the examination papers contained here have been written by many members of
staff of the School of Mathematics and Statistics.
While every care is taken to avoid errors, we cannot guarantee the solutions are error-free.
Please report any serious errors to the Director of First Year Mathematics.
Exam papers from 2015 semester 2 will be provided on Moodle for practice before
the exam.
5
ii) Let A and B be general subsets of some universal set U . Use the laws of set algebra to
simplify
A ∪ ((B ∪ Ac ) ∩ B c ).
State any set laws that you use.
iii) For the set A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, the function f : A → A is defined by the rule
that f (x) is the inverse of x (mod 11).
For example, f (2) = 6 since 6 is the inverse of 2 modulo 11.
a) Find f (10).
b) Is f a bijection? Give reasons.
c) Compute f −1 ({1, 3, 5}).
d) What is the special relationship between f and f −1 for this particular function?
iv) A partition of a natural number n is a list of strictly positive numbers which sum
to n, written in decreasing order. Thus p = [4, 3, 3, 1, 1] is a partition of 12, as is
q = [3, 3, 2, 1, 1, 1, 1]. Given two partitions of n, say t and u, we define t u if we can
obtain t from u by further subdividing some of the elements of u. Thus, in the example
above, q p, since the 4 can be further split into 2, 1, 1. This makes the partitions of n
into a poset Part(n) (you may assume this).
a) List the seven partitions of 5.
b) Draw the Hasse diagram for this poset Part(5).
c) Does the poset Part(5) have a greatest element?
d) Find two elements a, b of the poset Part(5) such that the least upper bound of a
and b does not exist.
iii) Consider the graph G consisting of the vertices of a cube and its edges.
a) Draw a planar representation of this graph, labelled with vertices 1, 2, 3, 4, 5, 6, 7, 8
so that the path 123456781 is a Hamiltonian circuit, and so that 1 and 6 correspond
to opposite vertices in the cube.
b) Is the graph G bipartite?
6
c) With the above labelling, write down the first four rows of the adjacency matrix A
of the graph.
d) Without computing the matrix product A3 , compute the (1, 3) entry and the (1, 6)
entry of A3 .
iv) Use Dijkstra’s algorithm to construct a tree giving shortest paths from A to each of the
other vertices in the following weighted graph.
You should produce a table clearly giving the shortest distances from A to each vertex,
but you are not required to explicitly write out all the steps of the algorithm.
A
b
3 B
b
2 C
b
3 1 3
2 3
1 D b b
E 3
2
2 1
1 3
b b b
F 4 G 2 H
((∼p) → (q ∧ r)) ∧ (r → p) .
ii) State, with reasons, whether or not each of the following statements is true or false.
a) An integer n is a multiple of 6 if n is a multiple of 3.
b) An integer n is a multiple of 6 only if n is a multiple of 3.
iii) You are given a theorem, together with the basic ideas needed to prove it. Write up a
detailed proof of the theorem. Your answer must be written in complete sentences, with
correct spelling and grammar. It must include a suitable introduction and conclusion;
reasons for all statements made; correct logical flow and any necessary algebraic details.
Theorem. For every positive real number a, the equation e−x = ax has a real solution
x > 0.
Basic ideas. If f (x) = ax − e−x then f (0) is negative and f ( a1 ) is positive.
iv) Prove that log10 7 is irrational.
v) Let R be the set of real numbers, let a be an element of R and let S be a subset of R.
We say that a is a limit point of S if
∀ε > 0 ∃x ∈ S ( x 6= a ∧ |x − a| < ε ) .
A ∩ (B ∪ C) = (A ∩ B) ∪ C
T = {z ∈ C : |z| = 1 }
{{1}, {2}, {4}, {1, 2}, {1, 4}, {3, 4}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, ⊆}.
A B C
b b b
b b b
D E F
Giving reasons for your answers, show that
a) K is bipartite,
9
b) K is planar,
c) K has an Euler circuit,
d) K has no Hamiltonian circuit.
iv) a) State Kuratowski’s theorem characterising non-planar graphs.
b) Show that the following graph is not planar.
Ab Bb
b b b
F C
G
b b
E D
v) Use Kruskal’s algorithm, to construct a minimal spanning tree for the following weighted
graph. Make a table showing the details of each step in your application of the algorithm.
b 4 a 5 c
7 3 3
6 5
d e 2 f
6 8 8 9
7
g h 4 i
iv) Let x and y be real numbers. Prove that if x is rational and y is irrational, then x + y
is irrational.
v) A sequence a0 , a1 , a2 , . . . of real numbers is said to diverge to infinity iff
a) Write in symbolic form the negation of (∗), and simplify your answer so that the
negation symbol is not used.
b) Prove that the sequence defined by
n
an =
2n
does not diverge to infinity.
4. i) How many strings of eight lowercase letters of the English alphabet contain
a) exactly 2 vowels?
b) at least 1 vowel?
c) the letters x and y, with x occurring before y, if the letters are all distinct?
ii) How many ways are there to distribute
a) 18 identical lollipops among 4 children, with each child getting at least one lollipop?
b) 9 different teddy bears among 4 children, with one child getting 3 and the other 3
children getting 2 each?
iii) a) Find the solution of the recurrence
an + an−1 − 6an−2 = 0,
an + an−1 − 6an−2 = 4n .
iv) Two types of paving slabs are available for laying a straight path of width 1 unit: the
1-unit by 1-unit slab and the 1-unit by 2-unit slab. No slabs are to overlap and no gaps
are to be left. Here is an example of a path of length 9 units:
Let pn be the number of ways to lay a path of width 1 unit and length n units.
a) Find p1 , p2 and p3 .
b) Obtain a recurrence relation for pn . (You do NOT need to solve this recurrence
relation.)
11
ii) Let A and B be general subsets of some universal set U. Use the laws of set algebra to
simplify
(A ∪ B c ) ∩ (A ∪ (B ∪ A)c ).
Give the name of any set laws that you use.
0 0 0 2
12
Ab
b
Cb Db b
B E
b b
F G
Bb 5 Cb
2
3 1 4 2
G
b
4 b b
A D
3
4 3 3 2
b b
3. F 2 formula
i) a) Construct a truth table for the propositional E
(p → (∼q)) ∧ (q → (p ∧ (∼r))) .
{ m ∈ Z | m ≡ 1, 2, 5, 8 or 9 (mod 12) } .
x1 + x2 + x3 + x4 + x5 + x6 + x7 = 45 ,
rC(n, r) = nC(n − 1, r − 1) .
f (A ∩ B) 6= f (A) ∩ f (B).
f (A ∩ B) ⊆ f (A) ∩ f (B).
b) Use your result in (a) to show that 1 is an upper bound of the set
(N )
X 1
: N = 2, 3, . . . .
k2
k=2
ii) Solve each of the following congruences, or explain why it has no solution.
a) 296 x ≡ 8 (mod 692).
b) 369369 x ≡ 1 (mod 963963).
iii) Consider the following graph G.
15
b
bc
a bc
bc bc c
f
e bc
bc
Explain why:
A B
bc bc
bc bc bc
C E
D
bc
v) a) Use Kruskal’s algorithm to construct a minimal spanning tree T for the following
weighted graph. Make a table showing the details of each step in your application
of the algorithm.
16
A
bc
7 9
6
B bc bc C
6
6 6
D
bc
4 5 8
4 6
E bc bc F
5
p → (∼ q ∨ r) ≡ (p ∧ q) → r.
4. i) A group of 10 people at a wedding includes the bride and groom. How many different
ways can a photographer at the wedding arrange 6 people in a row from this group, if
the bride and the groom must be in the picture?
ii) How many solutions are there to the equation
x1 + x2 + x3 + x4 + x5 + x6 = 55,
if x1 , x2 , x3 , x4 , x5 , x6 are non-negative integers
a) with no further restrictions?
b) with xk ≤ 11 for every k?
iii) How many 8-card hands can be dealt from a standard pack such that
a) there are exactly 3 aces?
b) at least one value occurs exactly three times?
iv) a) Find the solution of the recurrence
an + an−1 − 12an−2 = 0,
subject to the initial conditions a0 = 3 and a1 = 2.
b) Find a particular solution of the recurrence
an + an−1 − 12an−2 = 3n .
v) When ascending a flight of stairs, an elf can take 1 stair in one stride or 3 stairs in one
stride.
Let an be the number of different ways for the elf to ascend an n-stair staircase.
a) Find a1 , a2 and a3 .
b) Obtain a recurrence relation for an . Give a brief reason. (You do NOT need to solve
this recurrence relation.)
c) Find the value of a6 .
18
P (A − B) = P (A) − P (B).
iv) Evaluate:
20142014 (mod 17).
v) a) Prove that for all real k > 1,
1 1 1 1
2
< − .
k 2 k−1 k+1
2. i) Let d =gcd(42,286).
a) Find d and integers x, y such that
42x + 286y = d.
b) Find all solutions to, or explain why there is no solution to, each of the following:
α) 42x ≡ 168 (mod 286)
β) 42x ≡ 286 (mod 168).
ii) Define a relation 4 on S = Z+ × Z+ by
b b
D A
b
F
b b
C B
e ≤ 3v − 6.
Ab
6 2
1
b b E b
B D
3 3
3
2 4
b
Use Dijkstra’s algorithm to find a spanning tree that gives the shortest paths from A to
every other vertex of the graph. Make a table showing the details of each step in your
application of the algorithm.
iii) You are given a theorem, together with the basic ideas needed to prove it. Write up a
detailed proof of the theorem. Your answer must be written in complete sentences, with
correct spelling and grammar. It must include a suitable introduction and conclusion;
reasons for all statements made; correct logical flow and any necessary algebraic details.
√
Theorem. If p is a prime, then p is irrational.
√
Basic idea. If p = a/b, then a2 = b2 p so p|a, then p|b also.
iv) Show that 2n + 1 is prime only if n is a power of 2.
v) Use a truth table to verify the following logical equivalence:
p → (r → ∼ q) ≡ q → ∼ (r ∧ p).
∼ [p ∧ (q → r)].
ii) The English alphabet has 26 letters, of which 5 are vowels and 21 are consonants. We
will write all our words using upper case (capital) letters. Repetition of letters in words
is allowed.
Find the number of 20 letter words (strings) using the English alphabet:
a) with no further restrictions
b) containing exactly 3 vowels
c) containing the subword “MATHS”
iii) Let A be any set of 10 distinct positive integers less than 100. Define the term “element-
sum” of a set to mean the sum of all the elements in the set.
a) How many subsets are there of A?
b) Show that the largest element-sum of any subset of A is 945.
c) Use the pigeon-hole principle to deduce that there must be at least two different
subsets of A having the same element-sum.
iv) A die is rolled 5 times and the outcomes are recorded as a sequence a1 , a2 , · · · , a5 .
What is the probability that the sum a1 + a2 + . . . + a5 of the five outcomes is 10 ?
21
(A − B) − (A − C) = (A − B) − C c .
b) Is T also a tree showing the shortest path from A to every other vertex? Explain.
B b 5 b C
4
7
3
5 2
b b
1 b b
A E F D
5
6
4 3 2
b b
G 2 H
iv) Let M be the adjacency matrix of the following graph, where the vertices are listed in
numerical order.
1 3 5 1080
b b b b b b b b
2 4 1079 1081
a) It is given that the (1, 1) entry of M 14 is 429. What does this tell you about the
graph?
b) Prove that if n is a positive even number, then the (1, 1) entry of M n is not zero.
c) Find the smallest positive odd n for which the (1, 1) entry of M n is not zero. Give
reasons for your answer.
Does the first formula logically imply the second? Does the second logically imply the
first? Give reasons for your answers.
ii) A fan of the science fiction show Doctor Which proposes the following argument.
If the TADRIS is out of control, then the Doctor will be lost in spacetime.
If Carla takes charge, then either the TADRIS will be out of control or the
Doctor will not be lost in spacetime.
Either Carla will take charge or the TADRIS will be out of control.
Therefore, the Doctor will be lost in spacetime.
a) Express this argument in symbolic form using logical connectives. Be careful to
define any notation you introduce.
b) Show that this argument is not logically valid.
iii) You are given a theorem, together with the basic ideas needed to prove it. Write up a
detailed proof of the theorem. Your answer must be written in complete sentences, with
correct spelling and grammar. It must include a suitable introduction and conclusion;
reasons for all statements made; correct logical flow and any necessary algebraic details.
Theorem. Let a, b, m be integers. If gcd(a, b) = 1 and a | bm then a | m.
Basic ideas: ax + by = 1, so amx + bmy = m, and a | bm so a | LHS.
23
(A ∩ (B ∪ Ac )) ∪ (A ∪ B c )c .
4 (k − 2)(k + 2)
1− 2
= .
k k2
b) Hence calculate, for all integers n ≥ 3, the product
n
Y 4
1− 2 .
k
k=3
z∼w ⇐⇒ |z − 1| = |w − 1|.
2. i) Evaluate
20151082 (mod 11) .
105x + 342y = 9
Bbc Cbc
bc bc bc bc
A H I D
bc bc
F E
A
bc
4 5
1 5
B bc bc C
1
4 3
D
bc
2 2
6 1
bc bc
E 5 F
Use Dijkstra’s algorithm to find a spanning tree that gives the shortest paths from A to
every other vertex of the graph. Make a table showing the details of at least the first
three steps in your application of the algorithm.
27
q ∨ ∼ (p → q).
a) Write down the converse of (†). Is the converse true? If so prove it, if not give a
counter example.
b) Write down the contrapositive of (†). Is the contrapositive true? If so prove it, if
not give a counter example.
iii) Suppose that x is a real number, such that x ≥ −1.
Prove using mathematical induction, that, for all positive integers n,
(1 + x)n ≥ 1 + nx.
iv) Prove, using the rules of inference, that the following argument is valid:
p
(∼ p∨ ∼ q) →∼ r
r∨ ∼ p
∴q
4. i) A security agency sends messages using 12 letter code words, made up using the 26
letters of the English alphabet.
a) How many code words are possible?
b) If a code word is selected at random, what is the probability it contains exactly one
X?
c) How many code words contain at least one X and at least one Y and at least one
Z?
ii) a) Find the general solution to
an − 3an−1 + 2an−2 = 0.
an − 3an−1 + 2an−2 = 2n .
iii) Ten identical chocolates are to be distributed between Anna, Ben and Conny. In how
many ways can this be done if each must receive at least one chocolate?
iv) Suppose that n2 + 1 dots are to √
be located inside a unit square. Prove that at least two
2
dots must lie within a distance of each other.
n
29
Hence
31 = 18 + 11 + 15 − 4 − 7 − 6 + |A ∩ B ∩ C| ⇒ |A ∩ B ∩ C| = 4.
ii)
A ∪ ((B ∪ Ac ) ∩ B c )
= A ∩ ((B ∩ B c ) ∪ (Ac ∩ B c )) Distributive Law
c c
= A ∪ (∅ ∪ (A ∩ B )) Intersection with Complement
c c
= A ∪ (A ∩ B ) Identity Law
c c
= (A ∪ A ) ∩ (A ∪ B ) Distributive Law
= U ∩ (A ∪ B c ) Union with complement
= A ∪ Bc Identity Law
iii) a) f (10) = 10 since 10 × 10 ≡ 1 mod 11.
b) Yes, f is a bijection. Since 11 is a prime, every non-zero element x, 1 ≤ x ≤ 10, has
an inverse.
(Alternatively, one may compute a table of values for f for x from 1 to 10 and
see that the function is 1-1 and onto. )
c) f −1 ({1, 3, 5}) = {1, 4, 9}, since f (1) = 1, f (4) = 3 and f (9) = 5.
d) In this case f and f −1 are the same function.
iv) a) The seven partitions of 5 are [5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1].
b) Diagram as below
[5]
[4, 1] [3, 2]
[3, 1, 1] [2, 2, 1]
[2, 1, 1, 1]
[1, 1, 1, 1, 1]
3 = 99 × 3 − 42 × 7.
b b b b
b b b b
b
1 b
2
b b
3
8 b
4 b
7
b b
5 6
b) Yes, since {1, 3, 5, 7} and {2, 4, 6, 8} are give a partition of the vertices.
c)
0 1 0 1 0 0 0 1
1 0 1 0 0 0 1 0
0 1 0 1 0 1 0 0
1 0 1 0 1 0 0 0
d) The (1, 3) entry and the (1, 6) entry of A3 are 0 and 6 respectively.
iv) DIAGRAM
∃ε > 0 ∀x ∈ S (x = a ∨ |x − a| ≥ ε) .
1
c) Suppose s = ∈ S. We need to find an ε for which all other x ∈ S are at least
n
1
ε away from s. But the nearest other member of S will be , so let ε be any
n+1
1 1 1
positive number less than or equal to − = . Then every x ∈ S is
n n+1 n(n + 1)
either s or satisfies |x − s| ≥ ε, so s is not a limit point of S.
an = −9(2n ) + 5n + 13 + 4n.
ii) a)
13!
.
4!3!2!2!
b)
6! 7!
× .
4!2! 3!2!
iii) a) This can be considered as the situation in which we have 2 hands of 26 cards each.
Hand 1 (Julia and Wayne) and Hand 2 (Tony and Joe). The total number of Hands
1 and 2 is
52 26 52
=
26 26 26
Hand 1 contains all the spades in
13 39 39
13 13 13
ways, so the required probability is
39
13 39!26!
52 = .
26
13!52!
4
b) Hand 1 will contain all the spades and all the clubs (say) in 1 way. There are
1
4
ways of choosing 1 suit for Hand 1 and ways of choosing 2 suits and 0 ways of
2
choosing 3 or 4 suits. So by inclusion/exclusion, the number of ways in which Hand
1 contains at least one complete suit is
4 39 4
− .
1 13 2
Hence the probability is
4 39 4
1 13 − 2
52 .
26
x1 + x2 + ... + x8 = 111
with xi ≥ 0. The number of such solutions is 118 7 , using the formula for partitions.
b) Let yi be the number of 5c pieces received by person i,then y1 + ... + y8 = 111 × 20 =
2220 with yi ≥ 0 which has 22277 solutions.
34
c) Give $15 to each person and count the number of ways to take back $9 from them
all. This can be done in 16
7 ways.
v) a) Only when the numbers are either both even or both odd.
b) There are 4 types of parity pairs, viz, (even, even), (even, odd), (odd, even), (odd,
odd). There are 5 points so by the pigeonhole principle, at least two points say
(x1 , y1 ) and (x2 , y2 ) have the same parity pair. Hence x1 and x2 are either both
even or both odd and so their average is an integer and similarly for the y ′ s. Thus
the midpoint of the interval joining these points has integer coordinates.
35
(A − B) ∪ (A ∩ B) = (A ∩ B c ) ∪ (A ∩ B) [definition of “−”]
= A ∩ (B c ∪ B) [∩ distributes over ∪]
=A∩U
= A [identity law]
{1,3,4} {2,3,4}
b b b
{1,2,4}
b b
{3,4}
{1,2}
b
{1,4}
b b b
A D C F
E
c) K has an Euler circuit: it is connected and has no odd vertex degree.
d) K has no Hamilton circuit since such circuit would pass the vertices A, C, and D
and thus the six incident edges, and would therefore have to pass vertex B at twice,
which it may not.
iv) a) Kuratowski’s Theorem states that a graph is non-planar if and only if it has a
subgraph that is homeomorphic to K5 or to K3,3 .
b) Delete the edges BF and CD; the resulting graph is homeomorphic to K3,3 . By
Kuratowski’s Theorem, the graph is not planar.
v) Edge Weight Chosen?
ah 2 Y
ae 3 Y b 4 a 5 c
af 3 Y
7 3 3
ab 4 Y
hi 4 Y e
d 2 f
ac 5 Y
cf 5 N 6
be 6 N g i
h 4
eg 6 Y
bd 7 Y, stop
3. i)
p q r p∧q (p ∧ q) → r ∼p q→r ∼ p ∨ (q → r)
T T T T T F T T
T T F T F F F F
T F T F T F T T
T F F F T F T T
F T T F T T T T
F T F F T T F T
F F T F T T T T
F F F F T T T T
37
ii) a)
(1)s →∼ g
(2)r → g
(3)o → f
(4)c ∨ v
(5)s
b)
(6) ∼ g modus ponens (1), (5)
(7) ∼ r modus tollens (2), (6)
(8)c elimination (4), (7)
Hence the keys are locked inside the car.
iv) Let x be rational and y be irrational. Suppose that x + y is rational. Then we can write
a c
x= and x+y = for some integers a, b 6= 0, c, d 6= 0.
b d
Thus we can write
c a bc − ad
y= − = ,
d b bd
which is a ratio of two integers, indicating that y is a rational number. This contradicts
the fact that y is irrational. Hence x + y must be irrational.
v) a)
∃M ∈ R ∀N ∈ N ∃n > N an ≤ M
b) Since an ≤ 1, we can take M = 1 and n = N + 1, and the negation of (*) would be
satisfied.
4. i) a) There are C(8, 2) ways to choose the positions for the vowels and then 5 choices for
each vowel and 21 choices for each consonant. Since repeats are allowed, the answer
is
C(8, 2) 52 216 .
b) There are 268 strings of 8 letters, and 218 of these do not contain a vowel. Hence
the number of strings of 8 letters with at least 1 vowel is
268 − 218 .
c) There are C(8, 2) ways to choose two positions for x and y, but then only one way
to place x and y in these positions, since x must come before y. All other letters
must be distinct from each other and from x, y, giving P (24, 6) ways to complete
the string. Hence the answer is
ii) a) First give one lollipop to each child. Then we still have 14 remaining lollipops to
distribute among 4 children. We can do this in C(14 + 3, 3) = C(17, 3) ways.
b) Line the children up in some fixed order (say, alphabetically by their full name).
Then select one of the four children and move them to the start of the line, in one of
4 ways. Let the first child choose three teddy bears, then let each subsequent child
choose two teddy bears. For a given choice of first child, the number of ways this
can be done is
9!
C(9, 3) C(6, 2) C(4, 2) C(2, 2) = 3 .
2! 3!
Hence the answer is
9!
4 3 .
2! 3!
iii) a) The characteristic equation is r 2 + r − 6 = (r − 2)(r + 3) = 0, with roots r = 2, −3.
Hence a general solution is
an = A 2n + B(−3)n
39
A + B = 1,
2A − 3B = 7.
Subtracting twice the first equation from the second gives −5B = 5, so that B = −1.
Then the first equation says that A = 2. Hence the solution of the recurrence that
satisfies the given intial conditions is
iv) a) By inspection p1 = 1 (as we must take a 1 × 1 unit slab) and p2 = 2 (we may take
one 1 × 2 unit slab or two 1 × 1 unit slabs). Similarly, p3 = 3 as we may use three
1 × 1 unit slabs, or a 1 × 1 unit slab with a 1 × 2 unit slab to its right, or a 1 × 2
unit slab with a 1 × 1 unit slab to its right.
b) The recurrence is
pn = pn−1 + pn−2 for n ≥ 2.
This follows by considering the two possible cases for the first slab. If the first slab
is a 1 × 1 unit slab then there are pn−1 ways to tile the remaining 1 × (n − 1) unit
path. Otherwise, the first slab is a 1 × 2 unit slab, and there are pn−2 ways to tile
the remaining 1 × (n − 2) unit path.
40
(A ∪ B c ) ∩ (A ∪ (B ∪ A)c )
= (A ∪ B c ) ∩ (A ∪ (B c ∩ Ac )) De Morgan’s law
c c c
= (A ∪ B ) ∩ ((A ∪ B ) ∩ (A ∪ A )) distributive law
c c
= (A ∪ B ) ∩ ((A ∪ B ) ∩ U ) union with complement
c c
= (A ∪ B ) ∩ (A ∪ B ) identity law
c
=A∪B idempotent law
iii)
Hence the last digits for each of the numbers are 93, 01, and 13.
iv) a)
258 = 2 × 105 + 48
105 = 2 × 48 + 9
48 = 5 × 9 + 3
9 =3×3+0
3 = 48 − 5 × 9
= 48 − 5 × (105 − 2 × 48)
= 11 × 48 − 5 × 105
= 11 × (258 − 2 × 105) − 5 × 105
= 11 × 258 − 27 × 105
c) α) The equivalent equation is 105x − 258y = 12. All integer solutions are of the
form (
x = −108 − 258
3 λ = −108 − 86λ
105
λ∈Z
y = 44 − 3 λ = 44 − 35λ
Thus x ≡ −108 (mod 86) ≡ 64, 150, 236 (mod 258).
β) The equivalent equation is 12x − 258y = 105, which has no integer solution since
gcd(12, 258) = 6 but 6 does not divide 105.
v) (1) First suppose that x ∈ f −1 (C) ∪ f −1 (D). Then we have x ∈ f −1 (C) or x ∈ f −1 (D),
which implies that f (x) ∈ C or f (x) ∈ D, and therefore f (x) ∈ C ∪ D. This yields that
x ∈ f −1 (C ∪ D). Hence f −1 (C) ∪ f −1 (D) ⊆ f −1 (C ∪ D).
(2) Next suppose that x ∈ f −1 (C ∪ D). Then we have f (x) ∈ C ∪ D, which implies
that f (x) ∈ C or f (x) ∈ D, and therefore x ∈ f −1 (C) or x ∈ f −1 (D). This yields that
x ∈ f −1 (C) ∪ f −1 (D). Hence f −1 (C ∪ D) ⊆ f −1 (C) ∪ f −1 (D).
Combining (1) and (2), we conclude that f −1 (C) ∪ f −1 (D) = f −1 (C ∪ D).
210
b
b b b
30 70 105
b b b
6 15 35
b b b
2 3 5
b) We have
α) greatest element is 210
β) there is no least element
γ) maximal elements are 210
δ) minimal elements are 2, 3, 5
c) 2 and 3 have no element below them so they have no greatest lower bound.
Or lb({30, 70}) = {2, 5} but this set has no greatest element.
ii) The graph is
A D
B C
42
a) The number 12 in position 1,2 of M 3 indicates that there are 12 walks of length 3
from A to B.
iii) a) G has 6 vertices of odd degree, so it cannot have an Euler circut (needs none of odd
degree) or an Euler path (needs exactly 2 of odd degree).
b) A Hamilton circuit exists, for example ABCF GDEA.
iv) If we replace the edges BA, AE by a single edge BE, then the resulting graph is home-
omophic to G. This can then be redrawn as
Bb Db Fb
b b b
C E G
Hence it is isomorphic to a K3,3 with edge sets V1 = {B, D, F } and V2 = {C, E, G}.
Hence by Kuratovski’s Theorem, G is NOT planar.
a)
b) Kruskal’s algorithm proceeds as follows
Edge Weight Chosen?
BG 1 Y
CG 2 Y
CD 2 Y
DE 2 Y
EF 2 Y
AB 3 Y, stop
EG 3 N
GF 3 N
DG 3 N
AF 3 N
etc
B b
C
b
2
3 1 2
G
A b b b
D
b b
F 2 E
Total weight of the spanning tree is 12.
43
c) All the edges of weights 1 and 2 are included after 5 steps. At the next step the only
edge of weight 3 that does NOT form a circuit with the previous subgraph is AB.
Hence there is no choice at any stage of the algorithm and so the resulting minimal
spanning tree is unique.
2p3 − 16pr 2 + 8r 3 = 0,
p3 = 8pr 2 − 4r 3 ,
which is even. Hence this implies that p is even, so 2 is a common factor of p and q.
This contradicts our assumption that p and q are coprime. Therefore the equation has
no rational solutions, as required.
iv) Proof. Since a > 0, we know that a4 > 0, and hence
√ √
Clearly x + a x > x − a x since x and a are both positive, so we may take positive
square roots of both sides to conclude that
q q
√ √
x + a x − x − a x > a,
as required.
v) First suppose that n is even, and write n = 2k where k ∈ Z. Then
f (n) = 3n + 2 = 6k + 2,
which proves that f (n) ≡ 2 (mod 12) or f (n) ≡ 8 (mod 12), depending on whether k is
even or odd, respectively.
Now suppose that n is odd, and write n = 2k + 1 where k ∈ Z. Then
f (n) = 2n + 3 = 4k + 5.
Now there are three cases depending on the value of k (mod 3). We have
5
if k ≡ 0 (mod 3),
f (n) ≡ 9 if k ≡ 1 (mod 3)
13 ≡ 1 if k ≡ 2 (mod 3).
{m ∈ Z | m ≡ 1, 2, 5, 8 or 9 (mod 12)},
as claimed.
an − 6an−1 + 9an−2 = 0
6 = a0 = A + 4, so that A = 2.
−1 = a1 = 3A + 3B + 8, so that B = −5.
Similarly
|T | = 11.P (22, 10).
For |J ∩ T |: there are 7 places that we can put the words “JULIA” and “TONY”
and the order matters so the number of ways they can be placed is P (7, 2), then
there are 5 more letters from the remaining 17 for the rest of the word, so
Note that there are other ways of doing the counting that give the equivalent answers
b) Now x4 ≥ 4 and x5 ≥ 5. We can place 9 dots into these places and then the number
of ways to arrange the remaining 36 dots is
C(42, 6).
Alternatively, this sum counts all the “committees of size r with president” for all
sizes r, which can be interpreted as selecting the president (in n ways) and then
selecting a subset of the remaining n − 1 members and there are 2n−1 such subsets.
47
b)
N N
X 1 X 1 1
≤ =1− < 1.
k2 k(k − 1) N
k=2 k=2
for N = 2, 3, . . . .
iv) a) If a ∈ S, then a3 = a3 (mod 8) and so a ∼ a. Therefore ∼ is reflexive.
Let a, b ∈ S and suppose that a ∼ b. Then a3 ≡ b3 (mod 7) and so, b3 ≡
a3 (mod 7), that is b ∼ a. Therefore ∼ is symmetric.
Suppose that a, b, c ∈ S and a ∼ b and b ∼ c. Then a3 ≡ b3 (mod 7) and
b3 ≡ c3 (mod 7). Consequently, a3 ≡ c3 (mod 7) and so ∼ is transitive.
Because ∼ is reflexive, symmetric and transitive, it is an equivalence relation.
b) To calculate the equivalence classes, first calculate the cubes of elements of S modulo
8.
x| 0| 1| 2| 3| 4| 5| 6|
x3 | 0| 1| 8| 27| 64| 125| 216|
x3 (mod 7)| 0| 1| 1| 6| 1| 6| 6|
so that [0] = {0}, [1] = {1, 2, 4}, [3] = {3, 5, 6}.
48
173 = 2 × 74 + 25
74 = 2 × 25 + 24
25 = 1 × 24 + 1
24 = 24 × 1 + 0
1 = 25 − 1 × 24
= 25 − 1 × (74 − 2 × 25)
= 3 × 25 − 1 × 74
= 3 × (173 − 2 × 74) − 1 × 74
= 3 × 173 − 7 × 74
b
bc
a bc
bc
(c) bc
f
e bc
bc
b
bc
a bc
bc bc c
f
e bc
bc
d
50
which is isomorphic to K3,3 with vertex sets {a, c, e} and {b, d, f }, so by Kuratovski’s
Theorem, G is not planar.
[Note that trying to get a contradiction to the properties of a planar graph like
e ≤ 3v − 6 or v − e + r = 2 fails.]
bc
D
bc bc bc
C E
B
bc
0 0 1 1 1 0
0 0 1 1 1 0
1 1 0 0 0 1
M =
1
.
1 0 0 0 0
1 1 0 0 0 1
0 0 1 0 1 0
v) a) Kruskal’s algorithm proceeds as follows: List the edges in increasing weight order,
then include edges that do not form a circuit, until all vertices are reached,
Edge Weight Chosen?
BE 4 Y
DE 4 Y
AF 5 Y
EF 5 Y
AE 6 N
giving the tree of minimal weight 24.
BC 6 Y, stop
BD 6
CD 6
DF 6
AB 7
etc
51
A
bc
B bc bc C
6
D
bc
4 5
E bc bc F
5
Alterntively, if CD was higher in the list than BC, then the following minimal weight
A
tree results. bc
B bc bc C
6
D
bc
4 5
E bc bc F
5
There are no other possibilities.
3. i)
p q r ∼q ∼q ∨ r p → (∼ q ∨ r) p∧q (p ∧ q) → r
T T T F T T T T
T T F F F F T F
T F T T T T F T
T F F T T T F T
F T T F T T F T
F T F F F T F T
F F T T T T F T
F F F T T T F T
ii) a)
(1) p →∼ ℓ ∧ c
(2) d ∧ ∼ o → ℓ
(3) w → c
(4) ∼ o
(5) p
(6) w ∨ d
b)
1 1 1 k
1+ + + ··· + k ≥ 1 + .
2 3 2 2
1 1 1 k+1
1+ + + · · · + k+1 ≥ 1 + .
2 3 2 2
53
We have
1 1 1 1 1 1
LHS = + + ··· + k +
1+ + + · · · +
2 3 2 2k + 1 2k + 2 2k+1
k 1 1 1
≥ 1+ + k
+ k + ··· + k by induction hypothesis
2 2 +1 2 +2 2 + 2k
k 1 1 1
≥ 1+ + k k
+ k k
+ ··· + k
2 |2 + 2 2 + 2{z 2 + 2k}
2k times
k 2k
= 1+ + k
2 2 + 2k
k 1
= 1+ +
2 2
k+1
=1+
2
= RHS.
iv)
x mod 3
(x2 + y 2 ) mod 3 0 1 2
0 0 1 1
y mod 3 1 1 2 2
2 1 2 2
By exhaustion of cases, we see that (x2 + y 2 ) mod 3 = 0 if and only if x mod 3 = 0 and
y mod 3 = 0. Hence 3|(x2 + y 2 ) if and only if 3|x and 3|y.
v) a)
∃ε > 0 ∀M ∈ R ∃x > M |f (x) − ℓ| ≥ ε
b) We have
3x2 9
x2 − 3 − 3 = x2 − 3 .
4. i) There are P (6, 2) ways to choose the positions for the bride and groom, and then P (8, 4)
ways in which to fill in the remaining spaces with four of the remaining guests. Hence
the answer is
P (6, 2) P (8, 4).
Alternative solution: Since the bride and groom must be present, there are C(8, 4) ways
to choose the other 4 people in the photo, and then 6! ways to arrange the six chosen
people (including the bride and groom). Hence the answer is
C(8, 4) 6! .
ii) a) There are C(55+5, 5) = C(60, 5) solutions to the equation with no further restriction
on the xk .
b) Write xk = 11 − yk for k = 1, . . . , 6. The equation becomes
66 − (y1 + y2 + · · · + y6 ) = 55,
that is,
y1 + y2 + · · · + y6 = 11.
Note that when all the yk are nonnegative, we have yk ≤ 11 for all k, which implies
that each xk is nonnegative. Hence, the solutions to this new equation with all
yk nonnegative are in one-to-one correspondence with the nonnegative solutions to
the original equation with all xk ≤ 11. The number of such solutions is therefore
C(11 + 5, 5) = C(16, 5).
iii) a) There are C(4, 3) ways to choose the three aces to include, and then C(48, 5) ways
to select the rest of the hand from all cards in the deck other than the aces. Hence
the answer is C(4, 3) C(48, 5).
b) We will need inclusion-exclusion. Let Sj be the set of all hands in which there
are precisely three j’s, where j ∈ {2, 3, 4, . . . , 10, J, K, A}. Arguing as in part (a),
|Sj | = C(4, 3) C(48, 5)} for all j.
Next, if j 6= k then |Sj ∩ Sk | = C(4, 3)2 C(44, 2), since there are C(4, 3)2 ways to
choose exactly three of each of the two chosen values, and then C(44, 2) ways to
complete the hand, avoiding these two values.
Finally, note that if j, k, ℓ are distinct then |Sj ∩ Sk ∩ Sℓ | = 0 as there are only 8
cards in the hand.
Therefore, by inclusion-exclusion, the answer is
X X
| ∪ j Sj | = |Sj | − |Sj ∩ Sk |
j j6=k
an = A 3n + B(−4)n
A + B = 3,
3A − 4B = 2.
55
Subtracting three times the first equation from the second gives −7B = −7, so
that B = 1. Then the first equation says that A = 2. Hence the solution of the
recurrence that satisfies the given intial conditions is
an = 2 · 3n + (−4)n for n ≥ 0.
which says that 21c = 9. Hence c = 3/7 and the particular solution is
3 1
an = n 3n = n 3n+1 for n ≥ 0.
7 7
a6 = a5 + a3
= a4 + a2 + a3
= a3 + a1 + a2 + a3
= 6.
56
iii) Since the empty set belongs to P (A − B) but not P (A) − P (B) the two sets cannot be
equal.
iv) 2014 ≡ 8 mod 17, and 84 ≡ −1 mod 17. Hence
1 2 1 1
v) a) RHS = × 2 = 2 > 2 = LHS.
2 k −1 k −1 k
b)
n n n−2 n
!
X 1 1X 1 1 1 X 1 X 1 1 3 1 1 3
2
< − = − = ( − − )< .
k 2 k−1 k+1 2 k+1 k+1 2 2 n n+1 4
k=2 k=2 k=0 k=2
286 = 6 × 42 + 34
42 = 1 × 34 + 8
34 = 4 × 8 + 2
8 =4×2
2 = 34 − 4 × 8
= 34 − 4 × (42 − 1 × 34)
= −4 × 42 + 5 × 34
= −4 × 42 + 5 × (286 − 6 × 42)
= 5 × 286 − 34 × 42
b) α) As 2 | 168 there are solutions, in fact 2 of them, modulo 286. Dividing by the
gcd gives 21x ≡ 84 (mod 143). We could use the inverse of 21 modulo 143, which
from the Bezout identity above is −34, but there is an obvious solution, x = 4. It
follows that the two solutions modulo 286 are 4 and 147.
β) Since 168 = 4 × 42, it follows that gcd(168, 42) = 42. And as 42 does not divide
286, there are no solutions.
ii) a) We have (a, b) 4 (a, b) as ab | ab, proving reflexivity.
Secondly if (a, b) 4 (c, d) and (c, d) 4 (e, f ) then ab | cd and cd | ef . So there are
positive integers p and q such that cd = (ab)p and ef = (cd)q. But then ef = (ab)pq,
so ab | ef or (a, b) 4 (e, f ) and 4 is transitive.
b) The relation is not symmetric, as for example (1, 2) 4 (2, 2) since 2 | 4, but (2, 2) 64
(1, 2).
The relation is not antisymmetric either, as for example (2, 1) 4 (1, 2) and (1, 2) 4
(2, 1) but (1, 2) 6= (2, 1).
iii) a) There are odd cycles, e.g. EAD.
b) There are exactly two vertices of odd degree, i.e. D and F; or an example is DE-
ABCDAFCEF.
c) For example ABCDEFA is a Hamilton circuit.
iv) a) v − e + r = 2
b) For a connected planar simple graph G with at least 3 vertices, each region in the
dual graph of G must have degree at least 3, and as the dual and G have the same
2
number of edges, sum of degrees of the dual = 2e ≥ 3r. So e ≥ r = e − v + 2 by
3
Euler’s formula, which rearranges to e ≤ 3v − 6.
c) If all the vertices have degree strictly greater than 6, then the sum of the degrees is
greater than 6v, so 2e > 6v. But from part b), 2e ≤ 6v − 12, contradiction.
v) Starting with the graph containing just A, we have:
step candidate edges (total distance) new edge new vertex v d(v, A)
1 AB(6), AE(1), AD(2) AE E 1
2 AB(6), AD(2), EB(4), ED(4), EC(4) AD D 2
3 AB(6), DC(6), EB(4), EC(4) EB B 4
4 BC(6), DC(6), EC(4) EC C 4
2
1
b b E b
B D
3
3
C
3. i) If 5|x and 5|y then x = 5k, y = 5ℓ for some integers k, ℓ. Hence x2 + 2y 2 = 5(5k2 + 10ℓ2 )
and so is divisible by 5. For the converse, we note that a2 mod 5 ≡ 0, 1, 4 and so by
58
considering cases x2 + 2y 2 ≡ 0 mod 5 only occurs when x and y are both 0 mod 5, that
is, they are each divisible by 5.
ii) Let P (n) be the given statement. P (8) is true since (x, y) = (1, 1) is a solution in this
case. Let k be an integer for which the statement is true. That is, we suppose there are
positive integers X, Y such that 3X + 5Y = k. Consider the equation 3x + 5y = k + 1. If
Y > 0 then (X ′ , Y ′ ) = (X +2, Y −1) is a solution since 3X ′ +5Y ′ = 3(X +2)+5(Y −1) =
k + 1. In this case P (k + 1) is true. If Y = 0 then 3X = k and so X ≥ 3. Hence
(X ′ , Y ′ ) = (X − 3, 2) is a solution since 3X ′ + 5Y ′ = 3(X − 3) + 5(2) = k + 1. In this
case also P (k + 1) is true. Hence P (n) is true for all n ≥ 8 by induction.
√ √
iii) We give a proof by contradiction. Suppose that p is rational, then p = ab , where a, b
are coprime positive integers. Squaring and rearranging we have a2 = pb2 . Hence p is a
factor of a2 and hence a factor a (since p is prime) and so we can write a = kp for some
positive integer k. Substituting back, we obtain k2 p2 = b2 p and so b2 = k2 p. Hence p is
a factor of b2 and hence of b. This, however, contradicts the assumption that a and b
√
are co-prime. Therefore p is irrational.
iv) We are given that 2n + 1 is prime. Write the integer n as n = 2a N , where N is odd.
(Note that if n is odd, then a = 0 and if n is a power of 2, we have N = 1.) Now using
the standard factorisation for odd powers,
Since this number is prime, the second bracket has to be 1 (since the first is at least 3)
giving N = 1 and so n = 2a .
(I) (II)
p q r ∼q r → (∼ q) p → (r →∼ q) r∧p ∼ (r ∧ p) q →∼ (r ∧ p)
T T T F F F T F F
T T F F T T F T T
T F T T T T T F T
v)
T F F T T T F T T
F T T F F T F T T
F T F F T T F T T
F F T T T T F T T
F F F T F T F T T
vi) a) ∼ [p ∧ (q → r)] ≡∼ p∨ ∼ (q → r) ≡∼ p ∨ (q∧ ∼ r).
b)
∃m∀d∃k (d 6 |m ∨ (k|m ∧ d > k)) .
4. i) a) The recurrence is
an − 4an−1 − 5an−2 = 0.
an = A 5n + B (−1)n .
59
−1 = a0 = A + B.
7 = a1 = 5A − B,
an = 5n − 2(−1)n .
b) For
an − 4an−1 − 5an−2 = 5n
we see from part (a) that c 5n is already a solution of the homogeneous equation, so
we try a particular solution pn = c n 5n .
If “MATHS” occurs (at least once), then we treat “MATHS” as one letter and there
are 15 other letters arranged in the word.
“MATHS” can occur in C(16, 1) places and the other letters can be chosen in 2615
ways (remembering that letters can be repeated), so we get C(16, 1) 2515 words.
BUT this counts words with 2 occurences of “MATHS” more than once, so we sub-
tract these off.
60
BUT if we subtract these off, then words with 3 occurences of “MATHS” will be
missing, so we add them back in and, as above, there are C(8, 3) 265 such words.
Finally we have to subtract off the words with 4 occurences of “MATHS” of which
there is 1 word.
iii) a) For any particular A with |A| = 10, there are |P (A)| = 210 = 1024 subsets.
b) The largest element-sum of all subsets of all possible sets A is when
A = {90, 91, 92, · · · , 99}
and the largest element-sum of subsets of this is 945 taking the the whole set as the
subset.
c) The smallest element-sum of all subsets of all possible sets A is 0 for the empty set.
Hence there are 945 + 1 = 946 possible element-sums over all possible subsets of all
possible sets A.
For any particular A there will be (far) less than 946 possible element-sums, but
this A has 1024 > 946 subsets, so by the Pigeon-hole Principle there must be at
least 2 subsets of A having the same element-sum.
iv) The number of ordered outcomes of rolling a die 5 times is 65 , and these are equally likely.
Let xi denote the number shown on the ith roll of the die.
Then we want to count the number of solutions of
x1 + x2 + x3 + x4 + x5 = 10 with 1 ≤ xi ≤ 6 for each i.
C U
24
20
M 13 P
17
Let x be the number of studens in the shaded region. From the Venn diagram
180 = 17 + 20 + 13 + 24 + x ⇒ x = 106
Hence the number of students who like Mars Bars is 106 + 17 + 20 = 143.
ii)
LHS = (A − B) − (A − C) = (A − B) ∩ (A ∩ C c )c Given
= (A − B) ∩ (Ac ∪ C) DeMorgan′ s law
= [(A − B) ∩ Ac )] ∪ [(A − B) ∩ Ac )] ∩ C Distributive law
= [A ∩ B c ∩ Ac ] ∪ [(A − B) ∩ Ac )] ∩ C
= ∅ ∪ (A − B) ∪ C = (A − B) − C c = RHS.
so
tan(A) − tan(B)
tan A tan B − −1
tan(A − B)
Put A = k + 1, B = k then the result follows.
b)
n n
X X tan(k + 1) − tan k
tan k tan(k + 1) = −1
tan 1
k=1 k=1
n n
1 X X
= [ (tan(k + 1) − tan k)] − n
tan 1
k=1 k=1
62
n+1 n
1 X X
= [ (tan k − tan k)] − n
tan 1
k=2 k=1
iv) Since the gcd(44, 126) = 2, which divides 20, we can write the equation as 22x ≡ 10
(mod 63).
Euclid gives, 1 = 7.63 − 22.20 and so 10 = 70.63 − 200.22 so x ≡ −200 (mod 63) ≡ 52
(mod 63).
Hence x ≡ 52, 115 (mod 126).
{x, y}
{w, x, z}
∅
b) The maximal elements are {w, x, y} , {w, x, z} and {x, y, z}.
c) There is no greatest element since there is more than one maximal element.
d) {x} and {w} have no least upper bound. Their common upper bounds are {w, x, y}
and {w, x, z} - neither of which can be called least.
ii) a) It is given that the number of vertices 7. By the handshaking lemma, the number
of edges is 11. By Euler’s formula, the number of regions is therefore 2 + 11 − 7 = 6.
b) A possible diagram is:
63
c) There is no Euler path since there are more than two vertices of odd degree.
iii) a) Given a graph with n vertices, construct a table of edges sorted in ascending order
by cost. Kruskal’s algorithm is to choose the first n − 1 = 7 edges that do not form
a cycle. The chosen edges form a minimal spanning tree.
Edge(cost) Chosen
EF(1) Yes
HD(2) Yes
FC(2) Yes
GH(2) Yes
EG(3) Yes
EC(3) No
AG(4) Yes
CD(4) No
CB(5) Yes
..
. No
Table 1: A table for Kruskal’s algorithm. Notice that edge EB could substitute for CB to form a
different minimal spanning tree.
B b
5 b C
2
b b
1 b b
A E F D
4 3 2
b b
G 2 H
b) No, since the shortest path from A to B has cost 7 in the graph, the cost of travelling
from A to B in the Minimal Spanning Tree is 15.
iv) a) There are 429 paths of length 14 from vertex 1 to vertex 1.
64
b) Let e = (1, 2) and f = (2, 1). Then for any even integer n there exists an integer k
such that n = 2k and a path (ef )k from 1 to 1 with 2k = n edges. Hence the (1, 1)
entry is nonzero for even powers of M .
c) The shortest odd path from 1 to 1 has length 1080 + 1 + 1080 = 2161. Hence
n = 2161 is the smallest power.
p q r ∼p → (q →∼ r) r → (p∧ ∼ q)
T T T T F
T T F T T
T F T T T
3. i) T F F T T The second statement implies the first
F T T F F
F T F T T
F F T T F
F F F T T
but not conversely.
ii) a) Let d stand for The Doctor is lost in space
t stand for The Tardis is out of control
c stand for Carla takes charge.
Then the syllogism is
t→d
c → (t∨ ∼ d)
c∨t
d
b) Assinging the truth values d = F, t = F, c = T , then with these values, all the
premises are true but the conclusion is false. Hence the argument is not valid.
iii) Since gcda, b) = 1 there are integers x, y such that ax + by = 1. Multiply both sides by
m to obtain amx + bmy = m. Now clearly a | amx and by assumption a | bm, hence a
is a factor of the left-hand side of the equation and so a | m.
j k l m
iv) Suppose x = x2 + x2 , then since x is the sum of two integers, x is a an integer.
Conversely, suppose x is an integer. We consider the casesjx kis even
l mandj x is k odd.
l m If x
x x 2k 2k
is even, then we wrote x = 2k, for some integer k. Hence 2 + 2 = 2 + 2 =
k
j +k k =
l 2km =j x. Ifk x lis odd,m then we wrote x = 2k + 1, for some integer k. Hence
x x 2k+1 2k+1
2 + 2 = 2 + 2 = k + k + 1 = 2k + 1 = x. The result follows.
v) a) The negation is
∀ M ∈ R+ ∃ x ∈ R+ (x ≥ M ) ∧ (f (x) ≤ 0) .
an = A + B(−4)n .
65
A+B =7 , A − 4B = −3 ;
an = 5 + 2(−4)n .
cn + 3c(n − 1) − 4c(n − 2) = 10 .
iii) Let U be the set of all 52–letter words in which every letter is used twice. A word in
U which includes the subword UNSW can be regarded as a string of 49 “objects”: 22
letters occurring twice each, the letters U, N, S, W occurring once each, and the single
“object” UNSW. Counting the arrangements is a “WOOLLOOMOOLOO” problem,
and the number of possibilities is 49!/(2!)22 .However, this procedure will have counted
twice any word which contains UNSW twice. By a similar argument, the number of such
words is 46!/(2!)23 . Therefore the required number of words is
49! 46!
− .
222 223
iv) a) Since the number of 2s in the string is k and the total of the digits is n, the number
of 1s must be n − 2k and the total number of digits is n − k. To choose such a string
we have to choose which k of the n − k places will be occupied by 2s: in choosing
places, repetition is impossible and order is not important, so the number of strings
is C(n − k, k).
b) If n ≥ 2 then a string of the required type with sum n must consist of •a 1 followed
by a string of the same type with sum n − 1: there are an−1 such strings; or •a 2
followed by a string of the same type with sum n − 2: there are an−2 such strings.
Therefore an = an−1 + an−2 . If n = 1 the only possible string is 1; if n = 2 there
are two possible strings, 2 and 11. Therefore a1 = 1 and a2 = 2.
66
c) The sequence an satisfies the Fibonacci recurrence, with initial values a1 = F2 and
a2 = F3 . Clearly an = Fn+1 . On the other hand, if a string with sum n contains
k digits 2, then 0 ≤ k ≤ ⌊n/2⌋; using the result of (a), the total number of strings
with sum n is
⌊n/2⌋
X
C(n − k, k) .
k=0
But this sum is by definition an ; and we have also shown that an = Fn+1 ; and this
completes the proof.
67
(A ∩ (B ∪ Ac )) ∪ (A ∪ B c )c
= (A ∩ (B ∪ Ac )) ∪ (Ac ∩ (B c )c ) De Morgan’s law
c c
= (A ∩ (B ∪ A )) ∪ (A ∩ B) double complement
c c
= ((A ∩ B) ∪ (A ∩ A )) ∪ (A ∩ B) distributive law
c
= ((A ∩ B) ∪ ∅) ∪ (A ∩ B) complement law
c
= (A ∩ B) ∪ (A ∩ B) identity law
c
= (A ∪ A ) ∩ B distributive law
=U ∩B complement law
=B identity law
iii) a)
4 k2 − 4 (k − 2)(k + 2)
1− = = .
k2 k2 k2
b)
n n
Y 4 Y (k − 2)(k + 2)
1− 2 =
k k2
k=3 k=3
n n n
Y Y Y 1
= (k − 2) (k + 2)
k2
k=3 k=3 k=3
n−2 n+2 n
Y Y Y 1
= k k
k2
k=1 k=5 k=3
n
! n
! n
1·2 Y (n + 1)(n + 2) Y Y 1
= k k
n(n − 1) 3·4 k2
k=3 k=3 k=3
(n + 1)(n + 2)
= .
6n(n − 1)
iv) a) For any z ∈ C we have |z − 1| = |z − 1|, which means that z ∼ z. Thus ∼ is reflexive.
Suppose that z ∼ w. Then |z − 1| = |w − 1|, which implies that |w − 1| = |z − 1|,
i.e., w ∼ z. Thus ∼ is symmetric.
Suppose that z ∼ w and w ∼ u. Then |z − 1| = |w − 1| and |w − 1| = |u − 1|. We
conclude that |z − 1| = |u − 1|, i.e., z ∼ u. Thus ∼ is transitive.
b) The equivalence class of 2i is the set of z ∈ C such that z ∼ 2i, √ i.e., those z such
that |z − 1| = |2i − 1|, i.e., a circle centred at (1, 0) with radius 5.
v) a) Let A be a subset of X. Since f is injective, for each element y ∈ f (A) there is a
unique x ∈ A such that f (x) = y. Thus |f (A)| = |A|.
68
25 = 32 ≡ 10 mod 11
so
210 ≡ 102 ≡ 1 mod 11.
Finally note that
1082 = 108 × 10 + 2
so
342 = 3 × 105 + 27
105 = 3 × 27 + 24
27 = 24 + 3
24 = 8 × 3 so the g.c.d is 3.
b) Using the identities from the Euclidean algorithm in part a) we see that
3 = 27 − 24
= 27 − 105 + 3 × 27
= 4 × 27 − 105
= 4 × (342 − 3 × 105) − 105
= 342 × 4 − 105 × 13.
Therefore
9 = 342 × (3 × 4) + 105 × (−3 × 39)
and therefore x = −39 and y = 12 work.
c) α) One solution is given by part b) namely x = −39. However there 2 more solutions,
namely
−39 + (342)/3 = 75 and − 39 + 2 × (342)/3 = 189.
β) There is no solution as the g.c.d. of 105 and 342 does not divide 8.
69
iii) a) For there to be an Euler path there are at most two vertices of odd degree. But
there are more than 2 vertices of odd degree, so there is no Euler path.
Fb
Eb
Ab
I
b
b b
B C
b b
H D
b) Here there is a simple graph with the specified degree which can be found by trial
and error (or systematic argument). It is:
70
b
D
A b b
C
b
B
c) If such a simple graph existed, then three of the vertices connect to the other 4. So
each vertex has degree at least 3. But the graph also has a vertex of degree 1, which is
a contradiction.
Ab
1
B b b
C
2 1 5
D 1
b b
F
E
3. i)
q∨ ∼ (p → q) ≡ q ∨ (p∧ ∼ q)
≡ (q ∨ p) ∧ (q∨ ∼ q)
≡ (q ∨ p) ∧ T
≡ q ∨ p.
ii) a) Converse:
If n ≡ 2 mod 4 then n2 is even.
The converse is a true statement. Indeed, if n ≡ 2 mod 4 then
n = 2 + 4k for some k ∈ Z.
Hence
n2 = (2 + 4k)2 = 4(1 + 2k)2 .
Thus n2 is even.
OR:
Since n ≡ 2 mod 4 we have n2 ≡ 22 mod 4 ≡ 0 mod 4. Hence n2 is a multiple of 4
and therefore is even.
b) Contrapositive:
If n 6≡ 2 mod 4 then n2 is odd.
The contrapositive is not true. Counter-example: Consider n = 4. Then n ≡ 0 mod
4. But n2 = 16 is even.
NOTE: Since the given statement is logical equivalent to the contrapositive, it is
possible to give a counter-example to the given statement to prove that the contra-
positive is wrong. Consider n2 = 16. Then n = 4 (assuming that n > 0). Hence
n 6≡ 2 mod 4.
72
iii) For n = 1:
LHS = 1 + x = RHS.
The statement is true.
Suppose the statement is true for some positive integer k, i.e.,
(1 + x)k ≥ 1 + kx.
z > y → z > x,
4. i) a) We make 12 choices of letters for the word from 26 letters in the alphabet.
This can be done in
2612 ways.
b) Choose the location for the one “X” in C(12, 1) = 12 ways, then
choose the other 11 letters from 25 non-“X”s in 2511 ways.
Hence the probability of getting exactly one “X” is
12 × 2511
.
2612
c) Let A denote the event that the word does NOT contain an “X”
let B denote the event that the word does NOT contain a “Y” and
let C denote the event that the word does NOT contain a “Z”. Then we want
|Ac ∩ B c ∩ C c | = |U | − |A ∪ B ∪ C|
= |U | − |A| − |B| − |C| + |A ∩ B| + |A ∩ C| + |B ∩ C|
− |A ∩ B ∩ C|
12
= 26 − 3 × 2512 + 3 × 2412 − 2312 .
73
by inclusion/exclusion.
Here for example |A| = 2512 as 12 letters are chosen from 25,
|A ∩ B| = 2412 as 12 letters are chosen from 24,
and similar for the other terms.
ii) a) The recurrence an − 3an−1 + 2an−2 = 0 has characteristic equation
r 2 − 3r + 2 = 0,
which gives
r = 1 or 2
Hence the general solution is
an = A + B2n .
b) For an − 3an−1 + 2an−2 = 2n , since we have from part (a) the solution of the
homogeneous case is hn = A + B2n and 2n is a special case of this, then we try a
particular solution of the form
pn = cn2n .
Substituting this into the equation gives
pn = 2n2n = n2n+1 .
iii) Give each person 1 bar, then distribute the remaining 7 bars among 3 people. This is a
7 dots, 3 − 1 = 2 line distribution so the number of ways this can be done is
1
iv) Partition the unit square as follows: draw a set of horizontal lines n apart, and a set of
vertical lines n1 apart.
This gives a total of n2 smaller squares of side length n1 each.