Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Define lattice. Explain partially ordered sets (poset) and draw a Hasse diagram for the divisibility relation on the set {1, 2, 3, 6, 12, 24, 36}. Identify the maximal, minimal, greatest and least elements.

Lattice

A lattice is a partially ordered set (poset) (L,)(L, \preceq) in which every pair of elements a,ba, b has both a least upper bound (LUB / join, aba \vee b) and a greatest lower bound (GLB / meet, aba \wedge b).

Partially Ordered Set (Poset)

A relation RR on a set SS is a partial order if it is:

  1. Reflexiveaaa \preceq a for all aSa \in S.
  2. Antisymmetric — if aba \preceq b and bab \preceq a, then a=ba = b.
  3. Transitive — if aba \preceq b and bcb \preceq c, then aca \preceq c.

The pair (S,)(S, \preceq) is called a poset. The divisibility relation aba \mid b ("aa divides bb") on positive integers is a partial order.

Hasse Diagram for Divisibility on {1, 2, 3, 6, 12, 24, 36}

Under the relation aba \mid b, the covering (immediate-successor) relations are:

  • 121 \to 2, 131 \to 3
  • 262 \to 6, 363 \to 6
  • 6126 \to 12
  • 122412 \to 24, 123612 \to 36

Hasse diagram (drawn upward, omitting reflexive loops and transitive edges):

        24        36
          \      /
           \    /
            12
             |
             6
            / \
           2   3
            \ /
             1

Reading bottom to top: 11 is at the bottom; 22 and 33 sit above it; both join into 66; then 1212; and 1212 branches up to the two incomparable top elements 2424 and 3636.

Special Elements

Element typeDefinitionHere
Least elementelement \preceq every other element11
Greatest elementelement \succeq every other elementnone (2424 and 3636 are incomparable)
Minimal element(s)no element strictly below it11
Maximal element(s)no element strictly above it2424 and 3636
  • Minimal: 11
  • Maximal: 24,3624, 36
  • Least: 11
  • Greatest: none (since 243624 \nmid 36 and 362436 \nmid 24).

Note: this poset is not a lattice, because 2424 and 3636 have no LUB within the set (their join lcm(24,36)=72\text{lcm}(24,36)=72 is absent).

latticeposet
2long10 marks

What is generating function? Use generating functions to solve the recurrence relation (a_n = 3a_{n-1} + 2) with (a_0 = 1).

Generating Function

The (ordinary) generating function of a sequence a0,a1,a2,a_0, a_1, a_2, \dots is the formal power series

G(x)=n=0anxn=a0+a1x+a2x2+G(x) = \sum_{n=0}^{\infty} a_n x^n = a_0 + a_1 x + a_2 x^2 + \cdots

It encodes the entire sequence as the coefficients of a single function, turning recurrence relations into algebraic equations that can be solved and then expanded back into a closed form for ana_n.

Solving an=3an1+2a_n = 3a_{n-1} + 2, a0=1a_0 = 1

Step 1 — Set up the generating function. Let G(x)=n0anxnG(x)=\sum_{n\ge 0} a_n x^n.

The recurrence holds for n1n \ge 1. Multiply both sides by xnx^n and sum:

n1anxn=3n1an1xn+2n1xn\sum_{n\ge 1} a_n x^n = 3\sum_{n\ge 1} a_{n-1} x^n + 2\sum_{n\ge 1} x^n

Step 2 — Express each sum via G(x)G(x).

  • n1anxn=G(x)a0=G(x)1\sum_{n\ge 1} a_n x^n = G(x) - a_0 = G(x) - 1.
  • n1an1xn=xn1an1xn1=xG(x)\sum_{n\ge 1} a_{n-1} x^n = x\sum_{n\ge 1} a_{n-1}x^{n-1} = x\,G(x).
  • n1xn=x1x\sum_{n\ge 1} x^n = \dfrac{x}{1-x}.

So:

G(x)1=3xG(x)+2x1xG(x) - 1 = 3x\,G(x) + \frac{2x}{1-x}

Step 3 — Solve for G(x)G(x).

G(x)(13x)=1+2x1x=(1x)+2x1x=1+x1xG(x)(1 - 3x) = 1 + \frac{2x}{1-x} = \frac{(1-x) + 2x}{1-x} = \frac{1+x}{1-x} G(x)=1+x(1x)(13x)G(x) = \frac{1+x}{(1-x)(1-3x)}

Step 4 — Partial fractions. Write

1+x(1x)(13x)=A1x+B13x\frac{1+x}{(1-x)(1-3x)} = \frac{A}{1-x} + \frac{B}{1-3x}

Then 1+x=A(13x)+B(1x)1 + x = A(1-3x) + B(1-x).

  • Set x=1x = 1:   2=A(13)=2AA=1\;2 = A(1-3) = -2A \Rightarrow A = -1.
  • Set x=13x = \tfrac{1}{3}:   43=B(113)=23BB=2\;\tfrac{4}{3} = B(1 - \tfrac{1}{3}) = \tfrac{2}{3}B \Rightarrow B = 2.

Thus

G(x)=11x+213xG(x) = \frac{-1}{1-x} + \frac{2}{1-3x}

Step 5 — Read off the coefficients. Using 11rx=n0rnxn\dfrac{1}{1-rx} = \sum_{n\ge 0} r^n x^n:

an=1(1)n+2(3)n=23n1a_n = -1\cdot(1)^n + 2\cdot(3)^n = 2\cdot 3^n - 1

Final answer:

an=23n1\boxed{a_n = 2\cdot 3^n - 1}

Check: a0=21=1a_0 = 2-1 = 1 ✓, a1=61=5=3(1)+2a_1 = 6-1 = 5 = 3(1)+2 ✓, a2=181=17=3(5)+2a_2 = 18-1 = 17 = 3(5)+2 ✓.

generating-functionrecurrence
3long10 marks

Explain Euler and Hamiltonian paths and circuits with examples. State the necessary and sufficient conditions for the existence of an Euler circuit in a connected graph.

Euler and Hamiltonian Paths and Circuits

Euler Path and Euler Circuit

  • An Euler path is a path that traverses every edge of the graph exactly once (vertices may repeat).
  • An Euler circuit is an Euler path that starts and ends at the same vertex, i.e. a closed Euler path.

Example. In the graph with vertices {A,B,C,D}\{A,B,C,D\} and edges AB,BC,CD,DA,ACAB, BC, CD, DA, AC:

  • DABCACD{-}A{-}B{-}C{-}A{-}C? — instead, ABCDACA{-}B{-}C{-}D{-}A{-}C is an Euler path (uses each of the 5 edges once) but not a circuit, because it starts at AA and ends at CC. (Here AA and CC have odd degree.)

Hamiltonian Path and Hamiltonian Circuit

  • A Hamiltonian path visits every vertex exactly once (edges may be skipped).
  • A Hamiltonian circuit (cycle) is a Hamiltonian path that returns to the starting vertex, visiting every vertex exactly once and closing the loop.

Example. In the cycle graph C4C_4 with vertices A,B,C,DA,B,C,D and edges AB,BC,CD,DAAB, BC, CD, DA, the sequence ABCDAA{-}B{-}C{-}D{-}A is a Hamiltonian circuit (every vertex once, returns to AA).

Key Difference

EulerHamiltonian
Concerned withedges (each used once)vertices (each visited once)
Easy test?Yes (degree condition)No (NP-complete in general)

Necessary and Sufficient Conditions for an Euler Circuit

Theorem (Euler). A connected graph GG has an Euler circuit if and only if every vertex has even degree.

Related condition for an Euler path (open): a connected graph has an Euler path that is not a circuit if and only if it has exactly two vertices of odd degree (the path begins at one and ends at the other).

Reasoning: each time the trail enters a vertex it must also leave it, pairing up edges at that vertex; for a closed circuit this forces every degree to be even.

grapheuler-hamiltonian
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Differentiate between proof by contradiction and proof by contraposition.

Both are indirect proof techniques for an implication pqp \Rightarrow q, but they differ in what is assumed and contradicted.

Proof by ContrapositionProof by Contradiction
Statement provedpqp \Rightarrow qAny statement SS
MethodProve the logically equivalent contrapositive ¬q¬p\lnot q \Rightarrow \lnot pAssume ¬S\lnot S (the negation) and derive a contradiction (e.g. r¬rr \wedge \lnot r)
AssumptionAssume ¬q\lnot q, derive ¬p\lnot pAssume SS is false, reach absurdity
ConclusionSince ¬q¬p\lnot q \Rightarrow \lnot p holds, pqp \Rightarrow q holdsThe assumption ¬S\lnot S is impossible, so SS is true

Proof by contraposition uses the tautology (pq)(¬q¬p)(p \Rightarrow q) \equiv (\lnot q \Rightarrow \lnot p) and works only for implications.

Proof by contradiction is more general: it assumes the statement is false and shows this leads to a logical impossibility. (Example: 2\sqrt{2} is irrational is proved by contradiction.)

In short: contraposition flips and negates an implication; contradiction assumes the whole claim is false and derives an inconsistency.

proof
5short5 marks

Define the inverse and identity functions.

Identity Function

The identity function on a set AA is the function IA:AAI_A : A \to A defined by

IA(x)=xfor all xA.I_A(x) = x \quad \text{for all } x \in A.

It maps every element to itself. It is always a bijection, and for any function f:ABf:A\to B, fIA=ff \circ I_A = f and IBf=fI_B \circ f = f.

Inverse Function

Let f:ABf : A \to B be a bijective (one-to-one and onto) function. Its inverse function f1:BAf^{-1} : B \to A is defined by

f1(y)=x    f(x)=y.f^{-1}(y) = x \iff f(x) = y.

The inverse satisfies

f1f=IAandff1=IB.f^{-1} \circ f = I_A \quad\text{and}\quad f \circ f^{-1} = I_B.

Existence condition: f1f^{-1} exists only if ff is a bijection.

Example. If f:RRf:\mathbb{R}\to\mathbb{R}, f(x)=2x+3f(x) = 2x + 3, then f1(y)=y32f^{-1}(y) = \dfrac{y-3}{2}.

functions
6short5 marks

What is the symmetric difference of two sets? Give an example.

Symmetric Difference

The symmetric difference of two sets AA and BB, written ABA \triangle B (or ABA \oplus B), is the set of elements that belong to exactly one of AA or BB — that is, in either set but not in both:

AB=(AB)(BA)=(AB)(AB).A \triangle B = (A \setminus B) \cup (B \setminus A) = (A \cup B) \setminus (A \cap B).

It is commutative and associative, and corresponds to the logical XOR of membership.

Example

Let A={1,2,3,4}A = \{1, 2, 3, 4\} and B={3,4,5,6}B = \{3, 4, 5, 6\}.

  • AB={1,2}A \setminus B = \{1, 2\}
  • BA={5,6}B \setminus A = \{5, 6\}
AB={1,2}{5,6}={1,2,5,6}.A \triangle B = \{1, 2\} \cup \{5, 6\} = \{1, 2, 5, 6\}.

The common elements 33 and 44 are excluded.

sets
7short5 marks

Define a poset and Hasse diagram.

Poset (Partially Ordered Set)

A poset is a set SS together with a relation \preceq that is reflexive, antisymmetric, and transitive:

  1. aaa \preceq a (reflexive),
  2. abbaa=ba \preceq b \wedge b \preceq a \Rightarrow a = b (antisymmetric),
  3. abbcaca \preceq b \wedge b \preceq c \Rightarrow a \preceq c (transitive).

It is denoted (S,)(S, \preceq). "Partial" means some pairs may be incomparable. Example: (P(S),)(\mathcal{P}(S), \subseteq) and the divisibility relation (Z+,)(\mathbb{Z}^+, \mid).

Hasse Diagram

A Hasse diagram is a simplified graphical representation of a finite poset that shows only the essential covering relations. It is drawn using these conventions:

  • Each element is a vertex.
  • If aba \prec b and there is no cc with acba \prec c \prec b (i.e. bb covers aa), draw an edge with bb placed above aa.
  • Reflexive loops (each aaa \preceq a) are omitted.
  • Transitive edges that can be inferred are omitted.
  • Direction is implied by vertical position (upward = greater), so arrowheads are not needed.

Example. For {1,2,4}\{1,2,4\} under divisibility: 11 at bottom, edge to 22, edge up to 44 (a vertical chain).

relations
8short5 marks

State Dijkstra's algorithm in brief.

Dijkstra's Algorithm

Dijkstra's algorithm finds the shortest path from a single source vertex to all other vertices in a weighted graph with non-negative edge weights. It is a greedy algorithm that grows a set of vertices whose final shortest distance from the source is known.

Steps

Dijkstra(G, w, source):
  1. For every vertex v: dist[v] = ∞, prev[v] = NIL
  2. dist[source] = 0
  3. Let Q = set of all vertices (a min-priority queue keyed by dist)
  4. While Q is not empty:
       a. u = vertex in Q with the SMALLEST dist[u]   // greedy pick
       b. Remove u from Q (its distance is now final)
       c. For each neighbor v of u still in Q:
            if dist[u] + w(u, v) < dist[v]:
               dist[v] = dist[u] + w(u, v)   // relaxation
               prev[v] = u
  5. Return dist[], prev[]

Key points

  • Greedy + relaxation: repeatedly select the unvisited vertex with the minimum tentative distance, then relax its outgoing edges.
  • Requirement: edge weights must be non-negative.
  • Complexity: O(V2)O(V^2) with an array, or O((V+E)logV)O((V+E)\log V) with a binary-heap priority queue.
  • prev[] lets you reconstruct the actual shortest paths.
graph
9short5 marks

What is a rooted tree? Define the height of a tree.

Rooted Tree

A rooted tree is a tree in which one vertex has been designated as the root, and every edge is implicitly directed away from the root. This gives a parent–child hierarchy: for any non-root vertex there is a unique path from the root to it, and the vertex just before it on that path is its parent.

Key terms:

  • Root — the distinguished topmost vertex (no parent).
  • Parent / child — adjacent vertices on a root-to-vertex path.
  • Leaf — a vertex with no children.
  • Internal vertex — a vertex with at least one child.

Height of a Tree

The level (depth) of a vertex is the length (number of edges) of the path from the root to that vertex; the root has level 00.

The height of a rooted tree is the maximum level among all its vertices — equivalently, the length of the longest path from the root to a leaf.

Example. In a tree where the root has children at level 1 and grandchildren (leaves) at level 2, the height is 22. A single-vertex tree has height 00.

tree
10short5 marks

Define a cyclic group with an example.

Cyclic Group

A group (G,)(G, *) is called cyclic if there exists an element gGg \in G, called a generator, such that every element of GG can be written as a power (or integer multiple) of gg:

G=g={gn:nZ}.G = \langle g \rangle = \{ g^n : n \in \mathbb{Z} \}.

(For additive notation, G={ng:nZ}G = \{ ng : n \in \mathbb{Z}\}.) Every cyclic group is abelian (commutative).

Examples

1. Finite cyclic group (Z4,+4)(\mathbb{Z}_4, +_4) — integers modulo 44 under addition.

Taking g=1g = 1:

1,  1+1=2,  1+1+1=3,  1+1+1+1=0.1,\; 1+1=2,\; 1+1+1=3,\; 1+1+1+1 = 0.

So 1={0,1,2,3}=Z4\langle 1 \rangle = \{0,1,2,3\} = \mathbb{Z}_4. Hence Z4\mathbb{Z}_4 is cyclic with generator 11 (also 33).

2. Infinite cyclic group (Z,+)(\mathbb{Z}, +) — the integers under addition are cyclic, generated by 11 (every integer is a multiple of 11).

algebraic-structures
11short5 marks

Use the Euclidean algorithm to find gcd(414, 662).

Euclidean Algorithm for gcd(414, 662)

Repeatedly apply gcd(a,b)=gcd(b,amodb)\gcd(a,b) = \gcd(b, a \bmod b) until the remainder is 00:

662=1414+248662 = 1 \cdot 414 + 248 414=1248+166414 = 1 \cdot 248 + 166 248=1166+82248 = 1 \cdot 166 + 82 166=282+2166 = 2 \cdot 82 + 2 82=412+082 = 41 \cdot 2 + 0

The last non-zero remainder is 22.

gcd(414,662)=2\boxed{\gcd(414, 662) = 2}

Check: 414=2207414 = 2 \cdot 207 and 662=2331662 = 2 \cdot 331; 207207 and 331331 share no common factor, confirming the gcd is 22.

number-theory
12short5 marks

Find the coefficient of (x^5) in ((1+x)^{10}).

Coefficient of x5x^5 in (1+x)10(1+x)^{10}

By the Binomial Theorem,

(1+x)10=k=010(10k)xk.(1+x)^{10} = \sum_{k=0}^{10} \binom{10}{k} x^k.

The coefficient of x5x^5 is therefore (105)\dbinom{10}{5}:

(105)=10!5!5!=10987654321=30240120=252.\binom{10}{5} = \frac{10!}{5!\,5!} = \frac{10\cdot 9 \cdot 8 \cdot 7 \cdot 6}{5 \cdot 4 \cdot 3 \cdot 2 \cdot 1} = \frac{30240}{120} = 252.

Final answer:

coefficient of x5=(105)=252\boxed{\text{coefficient of } x^5 = \binom{10}{5} = 252}
counting

Frequently asked questions

Where can I find the BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) question paper 2081?
The full BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2081 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Discrete Structure (BSc CSIT, CSC160) 2081 paper come with solutions?
Yes. Every question on this Discrete Structure (BSc CSIT, CSC160) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2081 paper?
The BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2081 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Discrete Structure (BSc CSIT, CSC160) past paper free?
Yes — reading and attempting this Discrete Structure (BSc CSIT, CSC160) past paper on Kekkei is completely free.