Cpt107 - Online Mock Exam
Cpt107 - Online Mock Exam
Cpt107 - Online Mock Exam
INSTRUCTIONS TO CANDIDATES
3. The number in the column on the right indicates the marks for each question.
7. Your solutions should be submitted electronically through the Learning Mall via
the submission link.
9. Answers can also be handwritten, fully and clearly scanned, or photographed for
submission as one single PDF document through the Learning Mall via the
submission link.
Notes:
◼ To obtain full marks for each question, relevant and clear steps need to be included
in the answers.
◼ Partial marks may be awarded depending on the degree of completeness and clarity.
(a) Use proof by contradiction to show the following statement: if a and b are rational numbers
(b) √75 is irrational. If you think that it is true, prove it. If not, explain why.
(6 marks)
(2 marks)
(a) Let A, B and C be non-empty sets, then A – C = (B – C) ∪ (𝐵 − 𝐶). If you think that it is true,
prove it. Otherwise, give a counterexample.
(3 marks)
(b) Let X and Y be sets, then 𝑋 ⊆ 𝑌 if and only if 𝑋 ∩ 𝑌 = 𝑋. If you think that it is true, prove
it. Otherwise, give a counterexample to show that it is false.
(5 marks)
PAPER CODE: CPT107/22-23/S1 Page 2 of 6
Xi’an Jiaotong-Liverpool University
(c) The football cup Liverpool F.C. has 35 players, 29 players play in attack, 16 players play in
midfield and 10 players play in both attack and midfield. Find the number of players who play:
1. in attack only.
2. in midfield only.
3. in neither attack nor midfield.
(3 marks)
(5 marks)
(6 marks)
(c) Let A and B be both transitive relations on the set S. Prove or disprove the following:
1. A ∩ B is also transitive.
2. A ∘ B is also transitive.
3. “A ∘ B is also transitive” implies “A ∩ B is also transitive”.
(6 marks)
(d) If A is an equivalence relation over a set S, then A-1 is an equivalence relation over S. If you
think that it is true, prove it. If not, give a counterexample.
(5 marks)
(5 marks)
(4 marks)
(5 marks)
(a) For each of the two cases 1. and 2. below, show whether the statement on the left-hand side is
equivalent to the statement on the right-hand side:
PAPER CODE: CPT107/22-23/S1 Page 4 of 6
Xi’an Jiaotong-Liverpool University
(b) Without using any truth table, show that ~(𝑃 ∧ (𝑄 ∨ 𝑅)) ∨ ((𝑃 ∧ 𝑄) ∨ (𝑃 ∧ 𝑅)) is a
tautology.
(4 marks)
(c) Let H be the set of all people. For a,b ∈ 𝐻, the predicate Likes(a,b) means person a likes person
b. Express the following sentences into the first-order logic formulaes:
1. One likes everyone.
2. Given any pair of two people, one of them likes the other.
3. Given any pair of two people, exactly one of them likes the other.
(8 marks)
(a) CPT107 has 300 students. Prove that there are at least two students with their last name
starting with the same letter.
(2 marks)
(b) A tennis team consists of seven male members and eight female members.
1. How many ways are there to choose a manager, associate manager, captain and vice-
captain under the condition that:
• the manager must be a female member, and
• the associate manager be a male member, and
• these four roles must be filled up by four different members?
PAPER CODE: CPT107/22-23/S1 Page 5 of 6
Xi’an Jiaotong-Liverpool University
2. How many ways are there to choose a sub-team of five members that has at least one
female member?
3. How many ways are there to select a sub-team of six members that includes members of
both sexes?
(6 marks)
(c) Bag A consists of 5 blue balls and 7 red balls. Bag B contains 3 blue balls and 12 red balls. A
fair coin is flipped. If the outcome is a tail, a ball is drawn from Bag A. Otherwise (i.e., the
outcome is a head), a ball is drawn from Bag B.
1. Suppose that this experiment is done and a blue ball is selected. What is the probability
that this ball is in fact taken from Bag B?
2. Suppose that the same experiment is done and a white ball is selected. What is the
probability that this ball is in fact taken from Bag B?
3. Suppose that the same experiment is done using a biased coin that comes up heads with
the probability of 0.4 and tails with the probability of 0.6. A red ball is selected. What is
the probability that this ball is in fact taken from Bag A?
(7 marks)
(d) Tom flips a fair coin until a tail first appears, and if the number of tosses equals m, then Tom
gets a payoff for 2m pounds. Calculate the expected value of his payoff.
(5 marks)