2076

CSC165 · TU past paper

Discrete Structures 2076 question paper

The complete TU 2076 exam paper for Discrete Structures (CSC165), all 12 questions with solved model answers written to the mark scheme.

Tap a question to open its answer.

  1. 110 marksNumericalSolving Recurrence RelationsAnswer

    Question

    State pigeonhole principle. Solve the recurrence relation $a_n = 3a_{n-1} - 3a_{n-2} + a_{n-3}$, with initial conditions $a_0 = 1, a_1 = 3, a_2 = 7$. [10]

    • Recurrence: $an = 3a{n-1} - 3a{n-2} + a{n-3}$ - Initial conditions: $a0 = 1,\ a1 = 3,\ a2 = 7$ --- Statement: If $n$ objects are placed into $k$ boxes and $n k$, then at least one box contains two or more objects. Generalized form: If ...
  2. 210 marksNumericalApplications of Number TheoryAnswer

    Find the value of x such that x = 1 (mod 3), x = 1 (mod 4), x = 1 (mod 5) and x = 0 (mod 7) using Chinese remainder theorem.[10]

    $$x \equiv 1 \pmod 3,\quad x \equiv 1 \pmod 4,\quad x \equiv 1 \pmod 5,\quad x \equiv 0 \pmod 7$$ Moduli: $m1=3,\ m2=4,\ m3=5,\ m4=7$ Remainders: $a1=1,\ a2=1,\ a3=1,\ a4=0$ All pairs $(3,4),(3,5),(3,7),(4,5),(4,7),(5,7)$ have gcd $=1$, ...

  3. 310 marksNumericalEuler and Hamiltonian Path and CircuitsAnswer

    Define Euler circuit with suitable example. Find the maximal flow s to t from the given network flow.[10]

    Euler Circuit and Maximum Network Flow

    STEP 1 - EXTRACT: Given Data

    Part 1 (Euler Circuit): Purely definitional; requires a self-constructed example. No numeric data supplied.

    Part 2 (Maximum Flow):

    • A network with source $s$ and sink $t$ is referenced.
    • The actual network diagram (vertices, directed edges, and edge capacities) was NOT provided in the question text. Without the diagram there is no way to know the true edge set or capacities.

    Missing data statement: The network flow diagram for Part 2 is missing. The specific vertices, directed edges, and capacity values cannot be recovered from the question. Any numeric maximum-flow value would require inventing the network, which is not permitted. I will therefore fully answer Part 1 and, for Part 2, present the correct method rigorously and illustrate it on a clearly labelled assumed example, marking it explicitly as illustrative.


    STEP 2 - SOLVE

    Part 1: Euler Circuit (Definition + Example)

    Definition. An Euler circuit (Eulerian circuit) in a connected graph $G$ is a closed walk that traverses every edge of $G$ exactly once and returns to the starting vertex.

    Existence Theorem (Euler). A connected graph $G$ has an Euler circuit if and only if every vertex has even degree. (A graph has an Euler path but not a circuit iff exactly two vertices have odd degree.)

    Suitable Example.

    Take a triangle graph $G$ with vertices ${A, B, C}$ and edges ${A\text{-}B,\ B\text{-}C,\ C\text{-}A}$.

            A
           / \
          /   \
         C-----B
    

    Degrees: $$\deg(A)=2,\quad \deg(B)=2,\quad \deg(C)=2$$

    All degrees are even and the graph is connected, so an Euler circuit exists.

    Euler circuit: $A \to B \to C \to A$

    This traverses each of the 3 edges exactly once and returns to $A$. Hence it is a valid Euler circuit.


    Part 2: Maximum Flow $s \to t$ (Ford-Fulkerson Method)

    Important: The actual network diagram was not reproduced in the question, so the numeric answer below is based on an assumed illustrative network. Replace the capacities with those in your exam diagram; the procedure is identical.

    Algorithm (Ford-Fulkerson augmenting path):

    1. Initialise flow $f = 0$ on every edge.
    2. While an augmenting path $s \to t$ exists in the residual graph:
      • Find bottleneck $c_{\min}=\min$ residual capacity on the path.
      • Add $c_{\min}$ to forward edges, subtract from backward edges.
    3. Maximum flow $=$ total flow leaving $s$ (verified by min-cut).

    Assumed network capacities:

    EdgeCapacity
    $s\to a$5
    $s\to b$4
    $a\to b$3
    $a\to t$6
    $b\to c$5
    $c\to t$6

    Iteration 1: Path $s\to a\to t$, bottleneck $=\min(5,6)=5$. $f(s,a)=5,\ f(a,t)=5$.

    Iteration 2: Path $s\to b\to c\to t$, bottleneck $=\min(4,5,6)=4$. $f(s,b)=4,\ f(b,c)=4,\ f(c,t)=4$.

    Iteration 3: Check residuals.

    • $s\to a$: $5-5=0$ (saturated)
    • $s\to b$: $4-4=0$ (saturated)

    Both edges out of $s$ are saturated, so no augmenting path remains.

    Maximum flow (for this assumed network): $$f_{\max}=f(s,a)+f(s,b)=5+4=\boxed{9}$$

    Min-cut check: The cut ${s}\ /\ \text{rest}$ has capacity $c(s,a)+c(s,b)=5+4=9$, matching the flow, confirming optimality by the max-flow min-cut theorem.

    Conclusion: For the assumed network, the maximum flow from $s$ to $t$ is 9 units. For the exam's actual diagram, apply the same augmenting-path steps to the given capacities.

  4. 45 marksmathematical InductionAnswer

    Prove that for every positive integer n≥1,n2+nn \geq 1, n^2 + nn≥1,n2+n is even integer using mathematical induction. [5]

    An integer is even if it can be written in the form 2k for some integer k. Also note that: $$n^2 + n = n(n+1)$$ This is the product of two consecutive integers, which will be useful in each step. --- Substitute n = 1: $$n^2 + n = (1)^2 +...

  5. 55 marksNested QuantifiersAnswer

    All over smart people are stupid. Children of stupid people are naughty. John is a children of Jane. Jane is over smart. Represent these statements in FOPL and prove that John is naughty. [5]

    English Statement FOPL Representation ------ All over smart people are stupid. ∀x: OverSmart(x) → Stupid(x) Children of stupid people are naughty. ∀x ∀y: Stupid(x) ∧ ChildOf(y, x) → Naughty(y) John is a child of Jane. ChildOf(John, Jane)...

  6. 65 marksPartial OrderingAnswer

    Which of the following are possets? a. $(Z, =)$ b. $(Z, \neq)$ c. $(Z, \leq)$ [5]

    A partially ordered set (poset) is a set $S$ together with a binary relation $R$ that satisfies all three of the following properties: Property Meaning ------ Reflexivity $\forall a \in S,; a, R, a$ Antisymmetry

  7. 75 marksNumericalClosure of RelationsAnswer

    Define reflexive closure and symmetric closure. Find the remainder when $4x^2 - x + 3$ is divided by x + 2 using remainder theorem. [5]

    • Polynomial: $f(x) = 4x^2 - x + 3$ - Divisor: $x + 2$ --- The reflexive closure of a relation $R$ on a set $A$ is the smallest reflexive relation on $A$ that contains $R$. It is formed by adding all pairs $(a, a)$ for every $a \in A$ th...
  8. 85 marksEuler and Hamiltonian Path and CircuitsAnswer

    Define Euler path and Hamilton path. Give examples of both Euler and Hamilton path. [5]

    Euler Path and Hamilton Path

    Euler Path

    Definition: An Euler path (also called an Eulerian trail) is a path in a graph that traverses every edge exactly once. The initial and terminal vertices of the path need not be the same. If the initial and terminal vertices are the same, it is called an Euler circuit.

    Condition for Euler Path: A connected graph has an Eulerian trail if and only if it has exactly two vertices of odd degree. The path must start at one odd-degree vertex and end at the other.

    Example of Euler Path:

    Consider a graph with vertices: A, B, C, D and edges: A-B, A-C, B-C, B-D, C-D

    A --- B
    |   / |
    | /   |
    C --- D
    

    Here deg(A) = 2, deg(B) = 3, deg(C) = 3 and deg(D) = 2, so exactly two vertices, B and C, have odd degree. An Euler path therefore exists, and it has to start at one odd vertex and finish at the other:

    B → A → C → D → B → C

    This walk uses the edges A-B, A-C, C-D, B-D and B-C, that is all five edges of the graph, each exactly once. Because two vertices have odd degree the walk cannot come back to where it started, so this graph has an Euler path but no Euler circuit.


    Hamilton Path

    Definition: A Hamiltonian path is a simple path that contains all vertices of a graph G exactly once. Unlike the Euler path, it focuses on visiting every vertex exactly once rather than every edge. If the path returns to the starting vertex, it is called a Hamiltonian cycle.

    Note: There is no simple necessary and sufficient condition (like for Euler path) to determine the existence of a Hamiltonian path.

    Example of Hamilton Path:

    Consider a graph with vertices: 1, 2, 3, 4, 5 and edges connecting them as a cycle with some additional edges.

    1 - 2 - 3 - 4 - 5
    

    The path 1 → 2 → 3 → 4 → 5 visits every vertex exactly once. This is a Hamiltonian path.


    Comparison Table

    TermInitial and Terminal Vertex SameMust Include Every EdgeMust Include Every VertexRepeated Vertices Allowed
    Euler CircuitYesYesNot requiredYes
    Euler PathNoYesNot requiredYes
    Hamilton CycleYesNoYesNo
    Hamilton PathNoNoYesNo

    Key Difference

    • Euler Path is concerned with covering every edge exactly once.
    • Hamilton Path is concerned with visiting every vertex exactly once.
  9. 95 marksNumericalPermutations and CombinationsAnswer

    How many 3 digits numbers can be formed from the digits 1,2,3,4 and 5 assuming that:a. Repetitions of digits are allowed b. Repetitions of digits are not allowed [5]

    • Available digits: ${1, 2, 3, 4, 5}$ → 5 digits - Number to form: 3-digit number (Hundreds, Tens, Units) Multiplication Rule: if positions can be filled in $n1, n2, n3$ ways, total = $n1 \times n2 \times n3$. --- Each of the 3 positio...
  10. 105 marksMinimum Spanning TreesAnswer

    What is minimum spanning tree? Explain Kruskal's algorithm for finding minimum spanning tree. [5]

    Let G be a connected weighted graph. The weight of a spanning tree of G is the sum of the weights of the edges included in that spanning tree. A Minimum Spanning Tree (MST) of G is a spanning tree of G with the minimum possible weight am...

  11. 115 marksGraph ColoringAnswer

    List any two applications of graph coloring theorem. Prove that 'A tree with n vertices has n-1 edges'. [5]

    --- 1. Frequency/Channel Assignment: Graph coloring is used to assign frequencies or channels to television and radio stations. Each station is represented as a vertex, and an edge is drawn between two stations if they are close enough t...

  12. 125 marksInclusion-Exclusion PrincipleAnswer

    Define ceiling and floor function. Why do we need Inclusion - Exclusion principle? Make it clear with suitable example. [5]

    Floor and Ceiling Functions, and Inclusion-Exclusion Principle


    1. Floor Function

    The floor function for any real number x is defined as the greatest integer less than or equal to x.

    It is denoted by ⌊x⌋.

    Examples:

    • ⌊3.5⌋ = 3
    • ⌊-2.4⌋ = -3 (since -3 is the greatest integer less than or equal to -2.4)
    • ⌊3.143⌋ = 3

    2. Ceiling Function

    The ceiling function for any real number x is defined as the smallest integer greater than or equal to x.

    It is denoted by ⌈x⌉.

    Examples:

    • ⌈3.5⌉ = 4
    • ⌈-2.4⌉ = -2 (since -2 is the smallest integer greater than or equal to -2.4)
    • ⌈3.143⌉ = 4

    3. Inclusion-Exclusion Principle

    Why Do We Need It?

    When counting elements in the union of two or more sets, simply adding the sizes of individual sets overcounts the elements that appear in more than one set. The Inclusion-Exclusion Principle corrects this overcounting by systematically including and excluding overlapping regions.

    Without this principle, we would either overcount (by counting shared elements multiple times) or undercount (by ignoring them). It gives us an exact count of elements in the union of finite sets.


    Statement

    For any two finite sets A and B:

    $$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$

    For three finite sets A, B, and C:

    $$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)$$

    Here we include individual set sizes, exclude pairwise intersections, and include the triple intersection back.


    Suitable Example

    Problem: In a town of 10,000 families:

    • 40% buy newspaper A → n(A) = 4000
    • 20% buy newspaper B → n(B) = 2000
    • 10% buy newspaper C → n(C) = 1000
    • 5% buy A and B → n(A ∩ B) = 500
    • 3% buy B and C → n(B ∩ C) = 300
    • 4% buy A and C → n(A ∩ C) = 400
    • 2% buy all three → n(A ∩ B ∩ C) = 200

    Find: Number of families that buy at least one newspaper.

    Solution using Inclusion-Exclusion:

    $$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)$$

    $$= 4000 + 2000 + 1000 - 500 - 400 - 300 + 200$$

    $$= 7000 - 1200 + 200 = \mathbf{6000}$$

    Number of families buying none of the newspapers:

    $$= 10000 - 6000 = \mathbf{4000}$$


    Conclusion

    The Inclusion-Exclusion Principle is essential in combinatorics and set theory to accurately count elements in unions of overlapping sets, avoiding both overcounting and undercounting of shared elements.