BIT152 · TU past paper
Discrete Structure 2080 question paper
The complete TU 2080 exam paper for Discrete Structure (BIT152), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- Q1.10 marksVenn diagramsHideAnswer
Explain how set operations can be represented using venn diagram with example.Convert the following sentences using quantifier: a.) Not all good peoples are heroes. b.) Every peoples in our country are loyal. c.) Some people hate good people.[10]
- Q2.5 marksCeiling and floor functionsHideAnswer
State ceiling function and floor function with examples. How mathematical induction can be used to prove the correctness of recursive algorithm? Illustrate with an example.[5]
- Q3.10 marksNumericalConnectivity in graphsHideAnswer
What does connectivity in graphs mean? Differentiate between permutation and combination. Solve the recurrence relation $a_n = 7a_{n-1} - 10a_{n-2}$ with initial conditions $a_0 = 2$ and $a_1 = 3$. [4+6]
- Q4.5 marksTree traversal methodsHideAnswer
Describe pre-order, postorder and inorder traversal of a tree with an example. [5]
- Q5.5 marksOne-to-one and onto functionsHideAnswer
Explain one-to-one and onto function with example. What is identity function? [5]
- Q6.5 marksRelation matricesHideAnswer
How can you represent relations using matrices? Explain with suitable example. [5]
- Q7.5 marksProof by contradictionHideAnswer
Prove that $2\sqrt{2}$ is irrational number. [5]
- Q8.5 marksNumericalChinese Remainder TheoremHideAnswer
Solve the system of following congruences using Chinese Remainder theorem: x = 2 (mod 3), x = 3 (mod 5), x = 2 (mod 7) [5]
- Q9.5 marksPigeonhole principleHideAnswer
What is the pigeonhole principle? Show that binomn+1k=binomnk−1+binomnk\binom{n+1}{k} = \binom{n}{k-1} + \binom{n}{k}binomn+1k=binomnk−1+binomnk where nnn and kkk are positive integers with n≥kn \geq kn≥k . [5]
- Q10.5 marksNumericalPermutationsHideAnswer
What is permutation? What is the next permutation in lexicographic order after 362541? [5]
Permutation and Next Permutation in Lexicographic Order
Given Data
- Current permutation: 362541 (digits: 3, 6, 2, 5, 4, 1)
- Task: find the next permutation in lexicographic (dictionary) order.
What is a Permutation?
A permutation of a set of elements is an arrangement of those elements in a definite order. For a set of $n$ distinct elements, the total number of permutations is:
$$n! = n \times (n-1) \times (n-2) \times \cdots \times 1$$
Example: For ${1, 2, 3}$, the $3! = 6$ permutations are: $$123,\ 132,\ 213,\ 231,\ 312,\ 321$$
In lexicographic order, permutations are ordered like words in a dictionary, comparing element by element from left to right.
Next Permutation Algorithm
Step 1: Find the largest index $i$ such that $a[i] < a[i+1]$ (the pivot). Step 2: Find the largest index $j > i$ such that $a[j] > a[i]$. Step 3: Swap $a[i]$ and $a[j]$. Step 4: Reverse the suffix starting at $a[i+1]$.
Applying to 362541
Index the digits (0-based):
Index 0 1 2 3 4 5 Digit 3 6 2 5 4 1 Step 1: Find pivot (scan right to left):
- $a[4]=4 > a[5]=1$ → no
- $a[3]=5 > a[4]=4$ → no
- $a[2]=2 < a[3]=5$ → pivot found, $i = 2$, value $= 2$
Step 2: Find successor $a[j] > 2$ (scan right to left):
- $a[5]=1 < 2$ → skip
- $a[4]=4 > 2$ → found, $j = 4$
Step 3: Swap $a[2]$ and $a[4]$:
Before: $3,\ 6,\ \mathbf{2},\ 5,\ \mathbf{4},\ 1$ After: $3,\ 6,\ \mathbf{4},\ 5,\ \mathbf{2},\ 1$
Step 4: Reverse suffix from index 3 to end:
Suffix $5, 2, 1 \Rightarrow 1, 2, 5$
Result: $3,\ 6,\ 4,\ 1,\ 2,\ 5$
Result
The next permutation in lexicographic order after 362541 is $\boxed{364125}$.
Verification: $364125 > 362541$ and it is the smallest such permutation (the change occurs at the rightmost possible position with the smallest valid increase), confirming correctness.
- Q11.5 marksGraph representation using incidence matriHideAnswer
Explain incidence matrix representation of a graph with example. [5]
- Q12.5 marksPre-order traversalHideAnswer
Define tree traversal. Explain pre-order traversal with example. [5]