Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CPT 107

2022/23 SEMESTER 1 – TAKE-HOME OPEN BOOK FINAL EXAM

BACHELOR DEGREE – YEAR 2

DISCRETE MATHEMATICS AND STATISTICS

DURATION: 2 HOURS

CRASH TIME: 15 MINS

Notes:

To obtain full marks for each question, relevant and clear steps need to be included in the answers.

n Partial marks may be awarded depending on the degree of completeness and clarity.

Question 1: Proof Techniques                                                                                       [10 marks]

(a) Use proof by contradiction to show the following statement: if a, b and c are rational numbers

and b ≠ 0, then a2  - b3   + c is irrational. (4 marks)

(b)  √12  is irrational. If you think that it is true, prove it. If not, explain why. (3 marks)

(c) For all integers n  ≥ 2, use proof by induction to show that:

2 j2(1)   1  =   (2n(1+)n) (3 marks)

Question 2: Set Theory                                                                                                 [10 marks]

(a) Let X, Y and Z be non-empty sets, prove or disprove that X – (Z  ∩   Y) =  (X – Z)   (x   –   Y). (2 marks)

(b) Let X and Y be non-empty sets. Prove or disprove X  ∪  (Y  X) = Y if and only if X  ⊆   Y. (5 marks)

(c) There exist three non-empty sets XY and Z such that X ∈ Y, X ⊈ Z, and Y  ⊆  Z. If you think that it is true, give an example. If not, disprove it. (3 marks)

Question 3: Relations    [20 marks]


(a) Let X = {a, b, c, d}.  What is the transitive closure of the relation  {(a, b), (b, c), (c, d), (b, a)} on X? (3 marks)

(b) Let XY and Z be sets. Suppose  R  be a relation from X to Y and S be a relation from Y to Z. Then, if T ⊆ X, prove or disprove the following: 

(S ∘ R)(T) = S(R(T))

(7 marks)

(c) Let  R  be a relation on  Z. For all ab ∈Z  and   some   c ∈ Z, aRb if and only if a b = 3c. Prove or disprove that  R   is anti-symmetric and not an equivalence relation. (4 marks)

(d) Let X= {a, b, c, d} and let S be a relation on X such that:

S = {(a,a), (b,b), (c,c), (d,d), (a,b), (a,c), (a,d), (b,d), (c,d)}. Prove or disprove that S is a  partial order. If S is a partial order, draw its Hasse diagram and further prove or disprove S is a total order. (6 marks)


Question 4: Functions and PHP           [17 marks] 

(a)  Consider the function  f: [0, +∞) → [3, +∞)   defined by  f(x) = 2x + 3

1. Prove that f is injective.     (3 marks)

2. Prove that f is surjective.    (3 marks)

3. Find the inverse off.     (3 marks)

(b) Let f,g: R  R where  f(x) = ax + b and g(x) = cx + d for all x e R, with a, b, c, d real constants.

What relationship(s) must be satisfied by a, b, c, d if  (f。g)(x) = (g。f)(x) for all x e R? (5 marks)

(c) Avillage has 400 inhabitants. Show that at least two of them have the same birthday, and that at least 34 are born in the same month of the year. (3 marks)


Question 5: Logic                [24 marks]

(a) Show whether the statements below are tautologies and/or contradictions: 

1.   p 学 (p v p)              (2 marks)

2.   p Λ (¬(p v r))                (2 marks)

3.    ((p  r) Λ r)  r           (2 marks)


(b) 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:

1.    (p Λ q)  r 三 ¬ p v (q  r)                                         (3 marks)

2.    (p Λ q)  (¬ r v ¬ s) 三 (r Λ s)  (¬ p v ¬ q)                         (3 marks)

(c) Let the domain contain the set of all students and courses. Define the following predicates:

C(x): x is a course.

S(x): x is a student.

T (x, y): student x has taken course y.

Translate the following sentences into S-formulae, that is, for each of the following sentences provide an S-formula that expresses the sentences:

1.   Every student has taken some course.

2.   Some student has not taken any course.

3.   A student has taken a course.

4.  No student has taken every course.

5.   Every student has taken every course.

6.   A student has taken at least 2 courses. (12 marks)


Question 6: Combinatorics and Probability                                                               [19 marks]

(a) Consider 3 classes, each consisting of n students. From this global group of 3n students, a

sub-group of 3 students is to be chosen.

1.  How many choices are possible?

2.  How many choices are there in which all 3 students are in the same class? 

3.  How many choices are there in which all 3 students are in different classes?

4.  How many choices are there in which 2 of the 3 students are in the same class and the other is in a different class? (8 marks)

(b) Afamily has 5 children. Suppose that each child born to a couple is equally likely to be a boy or a girl independent of the gender distribution the other children in the family.

Calculate the probabilities of the following events:


1.   All children are of the same sex.                        (2 marks)

2.   The 3 eldest are boys, and the other girls.     (2 marks)

3.   There is at least 1 girl.           (2 marks)

(c) A school class of 120 students is driven in 3 buses to a symphonic performance. There are 36 students in one of the buses, 40 in another, and 44 in the third bus. When the buses arrive, one of the 120 students is randomly chosen.

Let X denote the number of students on the bus of that randomly chosen student and calculate the expected value E[X]. (5 marks)