ITM 153

Discrete Structure

TU BITM / BIM · Semester 2 · BIM curriculum effective from 2021

Requirement
required
Credits
3
Past papers
2 papers

Past exam papers

Complete papers are arranged by exam year (AD).

Discrete Structure 2023 Board Question Paper

Report problem

Tribhuvan University

Faculty of Management

Office of the Dean

2023 AD / Regular Examination

Course: ITM 153 · Discrete Structure

Level: Bachelor of Information Technology Management (BITM / BIM) (BITM / BIM) · Semester 2

Full Marks: 60

Time: 3 hrs.

Time: 3 hrs | Full Marks: 60 | Pass Marks: 30

Subjective Questions

  1. Brief Answer Questions: a. Find the negation of the statement “Some persons are loyal”. b. Define cryptology. c. How does Boolean matrix used to represent relation? Give example. d. What is the value of⌈2.1⌉? e. Find the order and size of complete graph K₁₅. f. Define connected graph with example? g. When is a directed graph said to be unilaterally connected? h. State Pigeonhole principle. i. List the steps used in mathematical induction. j. Find the number of pendant vertices in a full binary tree with 15 vertices.

    [10]
    View model solution

    Step-by-Step Solutions: Brief Answer Questions

    a. Negation of “Some persons are loyal”:

    Let P(x)P(x) be “xx is a person” and L(x)L(x) be “xx is loyal”. Statement: x(P(x)L(x))\exists x (P(x) \land L(x)).

    ¬x(P(x)L(x))x(P(x)¬L(x))("No person is loyal" or "All persons are disloyal")\mathbf{\neg \exists x (P(x) \land L(x)) \equiv \forall x (P(x) \to \neg L(x)) \quad \text{("No person is loyal" or "All persons are disloyal")}}

    b. Definition of Cryptology:

    Cryptology is the overarching mathematical and computer science discipline that encompasses both cryptography (the study and design of secret codes and secure communication protocols) and cryptanalysis (the science of deciphering and breaking cryptographic codes without authorized keys).

    c. Boolean Matrix Representation of a Relation:

    For relation RA×BR \subseteq A \times B with A=m,B=n|A|=m, |B|=n, the m×nm \times n matrix MR=[mij]M_R = [m_{ij}] has mij=1m_{ij} = 1 if (ai,bj)R(a_i, b_j) \in R, else 00.

    d. Value of 2.1\lceil 2.1 \rceil:

    2.1=3\lceil 2.1 \rceil = \mathbf{3}

    e. Order and Size of Complete Graph K15K_{15}:

    • Order (number of vertices nn): 15\mathbf{15}
    • Size (number of edges E|E|): n(n1)2=15×142=105 edges\frac{n(n-1)}{2} = \frac{15 \times 14}{2} = \mathbf{105 \text{ edges}}

    f. Definition of Connected Graph:

    An undirected graph is connected if there exists a path between every pair of distinct vertices in the graph.

    g. Unilaterally Connected Directed Graph:

    A directed graph is unilaterally connected if for every pair of distinct vertices uu and vv, there exists at least one directed path from uu to vv OR from vv to uu.

    h. Pigeonhole Principle:

    If nn items are put into mm containers and n>mn > m, then at least one container must contain more than one item (n/m\lceil n/m \rceil).

    i. Steps in Mathematical Induction:

    1. Basis Step: Verify the proposition P(n0)P(n_0) is true for the base integer.
    2. Inductive Hypothesis: Assume P(k)P(k) is true for an arbitrary integer kn0k \ge n_0.
    3. Inductive Step: Prove that P(k)    P(k+1)P(k) \implies P(k + 1) is true.

    j. Pendant Vertices in Full Binary Tree with 15 Vertices:

    For a full binary tree with nn vertices, internal vertices i=n12=1512=7i = \frac{n - 1}{2} = \frac{15 - 1}{2} = 7. Pendant vertices (leaves) L=i+1=7+1=8 pendant verticesL = i + 1 = 7 + 1 = \mathbf{8 \text{ pendant vertices}}.

  2. Translate the following into logical expression using quantifier and logical connectives. a. All living things who can fly are birds. b. Fish can swim. c. All file system can be backed up. d. Some children don’t like math.

    [5]
    View model solution

    Translation into Logical Expressions

    a. “All living things who can fly are birds.”

    Let L(x)L(x): xx is a living thing, F(x)F(x): xx can fly, B(x)B(x): xx is a bird:

    x((L(x)F(x))B(x))\mathbf{\forall x ((L(x) \land F(x)) \to B(x))}

    b. “Fish can swim.”

    Let F(x)F(x): xx is a fish, S(x)S(x): xx can swim:

    x(F(x)S(x))\mathbf{\forall x (F(x) \to S(x))}

    c. “All file systems can be backed up.”

    Let FS(x)FS(x): xx is a file system, B(x)B(x): xx can be backed up:

    x(FS(x)B(x))\mathbf{\forall x (FS(x) \to B(x))}

    d. “Some children don’t like math.”

    Let C(x)C(x): xx is a child, M(x)M(x): xx likes math:

    x(C(x)¬M(x))\mathbf{\exists x (C(x) \land \neg M(x))}

  3. What is the importance of big Oh and big Omega in algorithmic complexity analysis? Trace the insertion sort algorithm for the following data 12, 5, 7, 18, 10

    [5]
    View model solution

    Big-O, Big-Omega & Insertion Sort Trace for [12, 5, 7, 18, 10]

    • Big-O (OO): Provides an asymptotic upper bound on runtime (worst-case performance).
    • Big-Omega (Ω\Omega): Provides an asymptotic lower bound on runtime (best-case performance).

    Insertion Sort Trace:

    • Initial: [12, 5, 7, 18, 10]
    • Pass 1 (insert 5): Compare with 12 \to shift 12: [5, 12, 7, 18, 10]
    • Pass 2 (insert 7): Compare with 12 \to shift 12; compare with 5 \to insert: [5, 7, 12, 18, 10]
    • Pass 3 (insert 18): Compare with 12 \to already in place: [5, 7, 12, 18, 10]
    • Pass 4 (insert 10): Shift 18 and 12; insert after 7: [5, 7, 10, 12, 18]

    Final Sorted Output: [5, 7, 10, 12, 18]

  4. Define divisibility and relatively prime with example. Using divisibility rule Show that if a|b and a|c then a |(b+c)

    [5]
    View model solution

    Divisibility Definition & Proof: If aba \mid b and aca \mid c, then a(b+c)a \mid (b + c)

    • Divisibility: Integer aa divides integer bb (aba \mid b) if there exists an integer kk such that b=akb = a \cdot k.

    Proof:

    1. Since aba \mid b, by definition b=ak1b = a \cdot k_1 for some integer k1k_1.
    2. Since aca \mid c, by definition c=ak2c = a \cdot k_2 for some integer k2k_2.
    3. Adding the two expressions:
      b+c=ak1+ak2=a(k1+k2)b + c = a \cdot k_1 + a \cdot k_2 = a(k_1 + k_2)
    4. Since k1k_1 and k2k_2 are integers, their sum (k1+k2)=m(k_1 + k_2) = m is an integer.
    5. Thus, b+c=amb + c = a \cdot m, which proves by definition that a(b+c)\mathbf{a \mid (b + c)}. \blacksquare
  5. Define source vertex and sink vertex. How many different words can be generated from the word “ANIMAL” with or without meaning?

    [5]
    View model solution

    Source/Sink Vertices & Word Permutations of “ANIMAL”

    • Source Vertex: In a directed graph, a vertex with in-degree equal to 0 (indeg(v)=0\text{indeg}(v) = 0) and positive out-degree.
    • Sink Vertex: A vertex with out-degree equal to 0 (outdeg(v)=0\text{outdeg}(v) = 0) and positive in-degree.

    Permutations of “ANIMAL”:

    The word has 6 letters: A, N, I, M, A, L (Letter ‘A’ occurs 2 times).

    Total Words=6!2!=7202=360 words\text{Total Words} = \frac{6!}{2!} = \frac{720}{2} = \mathbf{360 \text{ words}}

  6. Differentiate between domain and range. Determine whether the function f(x) = x² is onto, one-to-one, or one-to one correspondence.

    [5]
    View model solution

    Domain vs. Range & Invertibility of f(x)=x2f(x) = x^2

    • Domain: The set of all permissible input values for which the function is defined.
    • Range: The actual set of all resulting output values produced by the function (f(Domain)f(\text{Domain})).

    Evaluation of f(x)=x2f(x) = x^2 over R\mathbb{R}:

    • Not One-to-One: f(3)=f(3)=9f(-3) = f(3) = 9 but 33-3 \neq 3.
    • Not Onto: Negative real numbers (e.g., 5-5) have no pre-image in R\mathbb{R}.
    • Not Bijection (Correspondence): Since it is neither one-to-one nor onto, it is not a one-to-one correspondence.
  7. Discuss the adjacency matrix and incidence matrix representation of directed graph. How can we find the in degree and out degree of each vertices of directed graph from adjacency matrix?

    [5]
    View model solution

    Adjacency & Incidence Matrices for Digraphs

    In the adjacency matrix A=[aij]A = [a_{ij}] of a directed graph:

    • Out-degree of vertex viv_i: Equal to the sum of entries in row ii:
      outdeg(vi)=j=1naij\text{outdeg}(v_i) = \sum_{j=1}^n a_{ij}
    • In-degree of vertex vjv_j: Equal to the sum of entries in column jj:
      indeg(vj)=i=1naij\text{indeg}(v_j) = \sum_{i=1}^n a_{ij}
  8. Define spanning tree. How many spanning tree are possible from wheel graph W₃? Find using Kirchhoff’s theorem.

    [5]
    View model solution

    Spanning Trees of Wheel Graph W3W_3 Using Kirchhoff’s Theorem

    • Spanning Tree: A subgraph of GG that is a tree and includes every vertex of GG.
    • Wheel Graph W3W_3: Consists of a 3-cycle (C3C_3) connected to a central hub vertex; isomorphic to the complete graph K4K_4.
    • Number of Spanning Trees: By Cayley’s formula for KnK_n, the number of spanning trees is nn2n^{n-2}.
      For K4:442=42=16 spanning trees\text{For } K_4: \quad 4^{4-2} = 4^2 = \mathbf{16 \text{ spanning trees}}
  9. Determine whether the following pair of graph is isomorphic or not.

    [5]
    View model solution

    Graph Isomorphism Determination

    To verify if a given pair of graphs G1G_1 and G2G_2 are isomorphic:

    1. Check that both have equal numbers of vertices and edges.
    2. Verify degree sequences match.
    3. Establish a bijective mapping f:V1V2f: V_1 \to V_2 such that (u,v)E1    (f(u),f(v))E2(u, v) \in E_1 \iff (f(u), f(v)) \in E_2. If all vertex adjacency preservation tests hold, the graphs are isomorphic.
  10. List the applications of tree. Prove that a tree with n vertices has n-1 edges.

    [5]
    View model solution

    Proof: A Tree with nn Vertices Has n1n - 1 Edges

    Proof by Mathematical Induction:

    1. Base Case (n=1n = 1): A tree with 1 vertex has 0 edges (11=01 - 1 = 0). True.
    2. Inductive Hypothesis: Assume any tree with kk vertices has k1k - 1 edges.
    3. Inductive Step: Consider a tree TT with k+1k + 1 vertices.
      • Every tree with k+12k + 1 \ge 2 vertices contains at least one leaf vertex vv with deg(v)=1\deg(v) = 1.
      • Removing leaf vv and its incident edge leaves a smaller subgraph TT'.
      • TT' is connected and acyclic, meaning it is a tree with kk vertices.
      • By our hypothesis, TT' has k1k - 1 edges.
      • Adding back vertex vv and its 1 incident edge gives:
        E(T)=(k1)+1=k=(k+1)1|E(T)| = (k - 1) + 1 = k = (k + 1) - 1

    Therefore, any tree with nn vertices has exactly n1n - 1 edges. \blacksquare

  11. Prove that inverse and converse of an implication are logically equivalent, using truth table.

    [5]
    View model solution

    Truth Table Proof: Equivalence of Inverse and Converse

    For implication pqp \to q:

    • Converse: qpq \to p
    • Inverse: ¬p¬q\neg p \to \neg q
    pq¬p¬qqp (Converse)¬p¬q (Inverse)TTFFTTTFFTTTFTTFFFFFTTTT\begin{array}{|c|c|c|c|c|c|c|} \hline p & q & \neg p & \neg q & q \to p \text{ (Converse)} & \neg p \to \neg q \text{ (Inverse)} \\ \hline T & T & F & F & \mathbf{T} & \mathbf{T} \\ T & F & F & T & \mathbf{T} & \mathbf{T} \\ F & T & T & F & \mathbf{F} & \mathbf{F} \\ F & F & T & T & \mathbf{T} & \mathbf{T} \\ \hline \end{array}

    The truth values in columns 5 and 6 are identical for all cases, proving that the converse and inverse are logically equivalent ((qp)(¬p¬q)(q \to p) \equiv (\neg p \to \neg q)).

  12. Given a relation R = {(a, b): |a - b| is even} over a set of integers. Show that R is equivalent relation.

    [5]
    View model solution

    Proof: Equivalence Relation for R={(a,b):ab is even}R = \{(a, b): |a - b| \text{ is even}\}

    1. Reflexivity: aa=0=2(0)|a - a| = 0 = 2(0), which is even. (a,a)R(a, a) \in R.
    2. Symmetry: If ab|a - b| is even, ba=(ab)=ab|b - a| = |-(a - b)| = |a - b| is also even. (b,a)R(b, a) \in R.
    3. Transitivity: If ab=2k1|a - b| = 2k_1 and bc=2k2|b - c| = 2k_2, then (ac)=(ab)+(bc)=2(k1+k2)(a - c) = (a - b) + (b - c) = 2(k_1 + k_2), so ac|a - c| is even. (a,c)R(a, c) \in R. Hence, RR is an equivalence relation.
  13. Prove that (n+1 r) = (n r-1) + (n r)

    [5]
    View model solution

    Algebraic Proof of Pascal’s Identity: (n+1r)=(nr1)+(nr)\binom{n+1}{r} = \binom{n}{r-1} + \binom{n}{r}

    (nr1)+(nr)=n!(r1)!(nr+1)!+n!r!(nr)!\binom{n}{r-1} + \binom{n}{r} = \frac{n!}{(r-1)!(n - r + 1)!} + \frac{n!}{r!(n - r)!}

    Factoring out common terms n!(r1)!(nr)!\frac{n!}{(r-1)!(n-r)!}:

    =n!(r1)!(nr)![1nr+1+1r]=n!(r1)!(nr)![r+(nr+1)r(nr+1)]= \frac{n!}{(r-1)!(n-r)!} \left[ \frac{1}{n - r + 1} + \frac{1}{r} \right] = \frac{n!}{(r-1)!(n-r)!} \left[ \frac{r + (n - r + 1)}{r(n - r + 1)} \right]
    =n!(r1)!(nr)![n+1r(nr+1)]=(n+1)n!(r(r1)!)((nr+1)(nr)!)= \frac{n!}{(r-1)!(n-r)!} \left[ \frac{n + 1}{r(n - r + 1)} \right] = \frac{(n + 1) n!}{(r \cdot (r - 1)!) \cdot ((n - r + 1) \cdot (n - r)!)}
    =(n+1)!r!(n+1r)!=(n+1r)= \frac{(n + 1)!}{r! (n + 1 - r)!} = \mathbf{\binom{n+1}{r}} \quad \blacksquare

  14. Find the first five terms of sequence defined by recurrence relation aₙ=2aₙ₋₁+3aₙ₋₂, a₀=3, a₁=-2.

    [5]
    View model solution

    First Five Terms of Recurrence Relation: an=2an1+3an2a_n = 2a_{n-1} + 3a_{n-2} with a0=3,a1=2a_0 = 3, a_1 = -2

    • a0=3a_0 = \mathbf{3}
    • a1=2a_1 = \mathbf{-2}
    • a2=2(2)+3(3)=4+9=5a_2 = 2(-2) + 3(3) = -4 + 9 = \mathbf{5}
    • a3=2(5)+3(2)=106=4a_3 = 2(5) + 3(-2) = 10 - 6 = \mathbf{4}
    • a4=2(4)+3(5)=8+15=23a_4 = 2(4) + 3(5) = 8 + 15 = \mathbf{23}

    The first five terms of the sequence are: 3, -2, 5, 4, 23.

  15. What is tree traversal? Construct an expression tree from a×b+(c /d×e-f) $g.

    [5]
    View model solution

    Expression Tree Construction & Traversal

    • Tree Traversal: The algorithmic process of visiting every node in a tree data structure exactly once in a systematic order (Pre-order, In-order, Post-order).
    • Expression: a×b+(c/d×ef) ^ga \times b + (c / d \times e - f) \text{ \textasciicircum } g
    • The root of the tree is +, with left subtree evaluating a * b and right subtree evaluating the exponentiation operation.
    • In-order traversal reconstructs the fully parenthesized infix expression.
  16. State and verify handshaking theorem.

    [5]
    View model solution

    Handshaking Theorem Statement & Verification

    vVdeg(v)=2E\sum_{v \in V} \deg(v) = 2|E|

    Each edge connects two vertices and adds 1 to the degree of each incident vertex, contributing a total of 2 to the sum of degrees. This guarantees that the sum of degrees in any graph is always even.

  17. Give an necessary and sufficient condition for a graph to have Eulerian Circuit.

    [5]
    View model solution

    Necessary and Sufficient Condition for an Eulerian Circuit

    Euler’s Theorem: A connected undirected graph G=(V,E)G = (V, E) contains an Eulerian Circuit (a closed walk that traverses every edge exactly once) if and only if:

    1. The graph is connected (except for isolated vertices of degree 0).
    2. Every vertex in the graph has an even degree (deg(v)0(mod2)vV\deg(v) \equiv 0 \pmod 2 \quad \forall v \in V).