Discrete Mathematics — Lecture Exam Sample (Spring 2026) — Worked Solutions

All notation matches the lecture slides. Answers chosen to be the simplest correct ones for the exam.


Part 1 — Short questions (18 marks)

1. Two properties of inclusive or (∨) — (1 mark)

Any two of the following (definition excluded):

  • Commutativity:
  • Associativity:
  • Idempotence:
  • De Morgan:
  • Distributivity:

2. Cartesian product — (2 marks)

(a) The Cartesian product of two sets and is the set of all ordered pairs whose first component is from and whose second component is from :

(b) For , :


3. Composition of two binary relations — (1 mark)

Let and be binary relations. Their composition is the relation defined by (That is, is applied first, then .)


4. Transitivity — (2 marks)

(a) A binary relation is transitive if for all :

(b) Example on : the empty relation is transitive; or, for a non-trivial one, Check: the only “chained” pair is , and indeed . (The identity relation also works.)


5. Equivalence relation — (2 marks)

(a) A binary relation on a set is an equivalence relation if it is reflexive, symmetric and transitive.

(b) Example: and is even (i.e. congruence mod 2). This is reflexive, symmetric and transitive. (Simpler finite example: with = equality, .)


6. Surjective function — (2 marks)

(a) A function is surjective (onto) if every element of is the image of at least one element of :

(b) Example hitting all of :


7. Complex numbers — (2 marks)

(a) Any four (definitions excluded), e.g.:

(b) For :


8. Permutations with repetition (statement) — (1 mark)

The number of permutations with repetition of different kinds of objects, with repetition numbers (i.e. copies of the -th kind), is


9. Binomial theorem — (2 marks)

(a) For any real numbers and any : where is the binomial coefficient ” choose ”.

(b)


10. Two properties of binomial coefficients — (1 mark)

Any two of:

  • Symmetry:
  • Pascal’s identity:

11. Pigeonhole principle — (1 mark)

If items are put into containers, then there is at least one container that contains at least two items.


12. Definition of an undirected graph — (1 mark)

A triple is an (undirected) graph if and are sets with , , and Here is the set of vertices, the set of edges, and the incidence function, which assigns to each edge an unordered pair of vertices.


Part 2 — Proof questions (16 marks)

Scoring: statement 1 mark, proof 3 marks. For two/three statements the marks split evenly.

P1. Three properties of set union, with proofs — (4 marks)

I prove idempotence, associativity and the empty-set property. Each set proof reduces the statement to the corresponding logical law via the definition of .

(i) Idempotence: . (1) definition of ; (2) idempotence of .

(ii) Associativity: .

(1) definition of ; (2) associativity of .

(iii) Empty set: . (1) definition of ; (2) definition of (no element lies in , so is false ); (3) property of ().

(Commutativity via commutativity of is an equally valid third choice.)


P2. Associativity of the composition of binary relations — (4 marks)

Statement. Let be binary relations. Then composition is associative: where for relations the composition is .

Proof. We show that an ordered pair belongs to the left-hand side exactly when it belongs to the right-hand side.

(1) definition of composition; (2) reordering and regrouping the existential quantifiers and conjunctions (the order of the independent “intermediate” elements does not matter, and is associative/commutative). Since the two relations contain exactly the same pairs, .


P3. Formula for the roots of a complex number — (4 marks)

Statement. Let be a complex number given in polar form and . The roots of (the numbers with ) are exactly

Proof. Write a candidate root in polar form as . By De Moivre’s formula, Hence is equivalent to Two complex numbers in polar form are equal iff their absolute values are equal and their arguments differ by an integer multiple of . Therefore this holds iff The values give distinct arguments (they differ by less than ), and any other integer reproduces one of these (since the arguments repeat with period in ). Thus there are exactly the roots given above.


P4. Number of combinations with repetition — (4 marks)

Statement. Let and . The number of -combinations with repetition of an -element set (selections of elements, repetition allowed, order irrelevant) is

Proof. Let . Any -combination with repetition is determined solely by how many times each element is chosen, so we may encode it as a sequence: The block of ‘s before the first tells how many ‘s were chosen, the next block how many ‘s, and so on. This sequence contains exactly ones (one per chosen element) and zeros (the separators between the groups), so it has length . Conversely, every such sequence corresponds to exactly one combination with repetition.

The number of such sequences equals the number of ways to choose the positions for the ‘s among the positions, which is . Hence the number of -combinations with repetition of is .


Mark check

  • Part 1: 18 marks available — all answered (need ≥ 9 to pass).
  • Part 2: 16 marks available — all four proofs answered (need ≥ 7 to pass).
  • Reaching ≥ 29 total qualifies for grade 5.