Math1005 and Math6005 Sample Final
Math1005 and Math6005 Sample Final
National
u
University
• Extra paper for writing solutions is available; just raise your hand and ask an invigilator to
bring it for you.
Instructions To Students:
• You must justify your answers and show your work. Please be neat.
• Write all solutions in the appropriate spaces in the exam paper. If you need extra space for a
solution, first use the blank page at the back of the paper; use extra paper if you still need more
space after filling the back page. Please indicate in the appropriate space in the exam paper if
your solution continues on the back page or on an extra piece of paper.
• Cross out any work that you do not wish the examiners to consider.
• Questions on the paper are organised into 9 Problems, each worth 6 marks. On your actual final,
there will be 11 problems, each worth 6 marks. The total number of marks available on this exam
is 54. On your actual final there will be 66 marks available. You should budget about 16 minutes
per problem. Your best strategy may include leaving some parts of some problems blank if you
do not know how to complete them. YOU SHOULD AIM TO COMPLETE THIS SAMPLE
EXAM IN 2.5 HOURS PLUS READING TIME. YOU HAVE 3 HOURS To COMPLETE
YOUR ACTUAL FINAL.
Problem 1 (6 marks)
(a) For each of the following sentences, circle one of the words STATEMENT/PREDICATE/NEITHER
to indicate the nature of the sentence.
(ii) ∃𝑥 ∈ N 𝑥 2 − 𝑥
2 = 17 STATEMENT /PREDICATE /NEITHER
(iv) For any connected graph 𝐺 , 𝐺 has an Euler circuit if and only if every vertex has degree
two. STATEMENT /PREDICATE /NEITHER
(b) Recall that “𝑝 nor 𝑞 ” is logically equiavalent to “¬(𝑝 ∨ 𝑞) .” Consider the following statement:
Write a statement that is logically equivalent to the statement under consideration, but which
uses exactly one logical connective. Your statement should be written in English and you should
use a truth table to justify that your statement is logically equivalent to the statement under
consideration.
• a relation from 𝐴 to 𝐵 ;
• a function from 𝐴 to 𝐵 .
(i) Without using the symbol ¬, write down a predicate 𝑄 (𝑓 ) , defined over the domain of
functions from N to N, such that 𝑄 (𝑓 ) ≡ ¬𝑃 (𝑓 )
(ii) Write down an example of a function 𝑔 : N → N for which 𝑃 (𝑔) is true. Justify your
answer.
(iii) Write down an example of a function ℎ : N → N for which 𝑃 (ℎ) is false. Justify your
answer.
∀𝑛 ∈ N (11𝑛 − 6 ∈ 𝑀5 ).
(i) Let 𝐴 and 𝐵 be sets. Write down what it means to say that 𝐴 and 𝐵 have the same
cardinality.
(ii) Write down the rule for a bijection 𝑓 : N → 𝐸 , or explain how you know that no such
bijection exists.
(a) Either use the logical equivalences below and the definitions of set operations to prove, or
provide a counterexample to disprove, the following statement:
Given any statement variables 𝑝 , 𝑞 , and 𝑟 , a tautology 𝑡 and a contradiction 𝑐 , the following hold.
1. Commutative laws: 𝑝 ∧𝑞 ≡ 𝑞 ∧𝑝 𝑝 ∨𝑞 ≡ 𝑞 ∨𝑝
2. Associative laws: (𝑝 ∧ 𝑞) ∧ 𝑟 ≡ 𝑝 ∧ (𝑞 ∧ 𝑟 ) (𝑝 ∨ 𝑞) ∨ 𝑟 ≡ 𝑝 ∨ (𝑞 ∨ 𝑟 )
3. Distributive laws: 𝑝 ∧ (𝑞 ∨ 𝑟 ) ≡ (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟 ) 𝑝 ∨ (𝑞 ∧ 𝑟 ) ≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟 )
4. Identity laws: 𝑝 ∧𝑡 ≡ 𝑝 𝑝 ∨𝑐 ≡ 𝑝
5. Negation laws: 𝑝 ∨ ¬𝑝 ≡ 𝑡 𝑝 ∧ ¬𝑝 ≡ 𝑐
6. Double negative law: ¬(¬𝑝) ≡ 𝑝
7. Idempotent laws: 𝑝 ∧𝑝 ≡𝑝 𝑝 ∨𝑝 ≡𝑝
8. Universal bound laws: 𝑝 ∨𝑡 ≡𝑡 𝑝 ∧𝑐 ≡ 𝑐
9. De Morgan’s laws: ¬(𝑝 ∧ 𝑞) ≡ ¬𝑝 ∨ ¬𝑞 ¬(𝑝 ∨ 𝑞) ≡ ¬𝑝 ∧ ¬𝑞
10. Absorption laws: 𝑝 ∨ (𝑝 ∧ 𝑞) ≡ 𝑝 𝑝 ∧ (𝑝 ∨ 𝑞) ≡ 𝑝
11. Negations of 𝑡 and 𝑐: ¬𝑡 ≡ 𝑐 ¬𝑐 ≡ 𝑡
(i) Write down the logical structure of a proof of the statement under consideration that
proceeds directly.
(ii) Write down the logical structure of a proof of the statement under consideration that
proceeds via the contrapositive.
(a) A web-banking password is always 8 characters long and it always comprises two upper-case
letters from the standard English alphabet, two digits, and four lower-case letters from the
standard English alphabet. How many different passwords can be created that follow these
rules?
Give your answer in the form of an expression that uses only arithmetic operations (possibly
including factorial and exponentiation) and numbers.
In an excellent response, each of the following will be clearly identified: the experiment, the
sample space, how probabilities will be computed, and any events of interest.
“When the FCD warning light is illuminated and will not turn off, 90% of the time
the cause is a faulty wire, and the other 10% of the time the cause is a faulty front
collision sensor.”
The online manual suggests that the mechanic should run a diagnostic test on the front collision
sensor. The diagnostic test will result in one of two possible messages being displayed on the
diagnostic machine: “Fault Found” or “No Fault Found”. Regarding the accuracy of the diagnostic
test, the online manual says the following:
“This highly accurate diagnostic test gives the message ‘Fault Found’ 94% of the
time when the front collision sensor is faulty, and just 4% of the time when there is
no fault with the front collision sensor.”
The mechanic runs the diagnostic and the machine displays the message “Fault Found.” What is
the probability that the front collision sensor is faulty?
Give your answer in the form of an expression involving decimals and arithmetic operations.
(a) Your friend tries to define the term “graph” and writes the following:
Looking at our lecture notes, you see that we defined the term “graph” as follows:
In no more than three sentences and using appropriate examples, identify the effective differ-
ence(s) between the two definitions.
A 7 B 1 F
2 3 5 6 4
C 2 D 4 E
.
(i) In no more than three sentences, describe a physical system that may be reasonably
modelled by a transport network. In your description, clearly state what it is about the
physical system that the vertices and directed edges and capacities represent.
a 12 c
16 20
s 4 9 7 t
13 4
b 14 d
(iv) Use the vertex-labelling algorithm described in the course to find a maximum flow function
for the transport network in part (iv). The first incremental flow 𝑓1 is shown in the first
row of the table at the bottom of the page, and the cumulative flow 𝐹 1 is shown in the
graph below. Write down the subsequent incremental flows in the table (use only as many
rows as you need).
a 12, 12 c
16, 12 20, 12
s 4, 0 9, 0 7, 0 t
13, 0 4, 0
b 14, 0 d
𝑓1 𝑠𝑎𝑐𝑡 12
(a) We consider population movement within a geographic region comprising a city, its suburbs,
and the hinterland. We aim to understand the relative populations of the city, the suburbs, and
the hinterland as they will change over time. Suppose that the annual migration between the
three parts of the geographic region obeys the following. Each year: 4% of the city residents
move to the suburbs and 2% move to the hinterland; 7% of the suburban residents move to the
city and 2% move to the hinterland; 4% of hinterland residents move to the city and 6% move to
the suburbs; all other residents stay in the region they were in.
(i) Draw a transition diagram for a Markov process model of the population movement.
(iii) List all of the properties a 3 × 1 vector v must satisfy in order to be a steady state of your
model?
0 1 0 0 1 1 0
1 0 0 1 0 1 0
0 1 0 1 1 0 1
𝐴= 0 0 0 0 0 0 0
.
1 0 1 0 0 0 0
0 1 0 1 1 0 0
0 1 1 0 1 1 0
(i) Write down the basic transition matrix 𝑇 when Google’s PageRank algorithm is applied to
𝑊.
(ii) Write down an expression for the modified transition matrix 𝑀 when Google’s PageRank
algorithm is applied to 𝑊 . Use a damping factor of 85% (that is, 𝛼 = 0.15) .
(iii) In no more than three sentences, explain how to use the matrix 𝑀 to rank the pages in
our small web in order of “awesomeness” (or importance).
If not, then stage 𝑖 fails, so return above to define 𝐹 max and terminate.
(d) Mark up labels for 𝐹𝑖−1 as follows until t is labelled:
(i) Label each level 1 vertex v with s𝑘 v , where 𝑘 v = 𝑆 ((𝑠,𝑣)) . (see below for definition of 𝑆 )
(ii) If t has level 2 or more now work through the level 2 vertices in alphabetical order, labelling each vertex v
with u𝑘𝑢 , where
• u is the alphabetically earliest level 1 vertex with (𝑢,𝑣) ∈ 𝐸 (𝐷) and 𝑆 ((𝑢,𝑣)) > 0 ,
• 𝑘 v is the minimum of 𝑆 ((𝑢,𝑣)) and the value part of u’s label.
(iii) If t has level 3 or more now work through the level 3 vertices in a similar manner and so on.
The label on a vertex v of level 𝑛 ≥ 1 has the form u𝑘 , where u is a vertex of level 𝑛 − 1 and (𝑢, 𝑣) ∈ 𝐸 (𝐷) is an edge on
the path for a potential incremental flow through v with flow value 𝑘 .
The algorithm assigns labels in ascending order of levels, and in alphabetical order within levels.
𝐶 ((u,v)) −𝐹 ((u,v)) if (u,v) ∈ 𝐸 (𝐷)
𝑆 ((u,v)) = 𝐹 ((v,u)) if (v,u) ∈ 𝐸 (𝐷)
0
otherwise.