Tribhuvan University
Faculty of Management
Office of the Dean
2023 AD / Regular Examination
Time: 3 hrs | Full Marks: 60 | Pass Marks: 30
Subjective Questions
- [10]
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.
View model solution
Step-by-Step Solutions: Brief Answer Questions
a. Negation of “Some persons are loyal”:
Let
be “ is a person” and be “ is loyal”. Statement: . 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
with , the matrix has if , else . d. Value of
: e. Order and Size of Complete Graph
: - Order (number of vertices
): - Size (number of 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
and , there exists at least one directed path from to OR from to . h. Pigeonhole Principle:
If
items are put into containers and , then at least one container must contain more than one item ( ). i. Steps in Mathematical Induction:
- Basis Step: Verify the proposition
is true for the base integer. - Inductive Hypothesis: Assume
is true for an arbitrary integer . - Inductive Step: Prove that
is true.
j. Pendant Vertices in Full Binary Tree with 15 Vertices:
For a full binary tree with
vertices, internal vertices . Pendant vertices (leaves) . - Order (number of vertices
- [5]
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.
View model solution
Translation into Logical Expressions
a. “All living things who can fly are birds.”
Let
: is a living thing, : can fly, : is a bird: b. “Fish can swim.”
Let
: is a fish, : can swim: c. “All file systems can be backed up.”
Let
: is a file system, : can be backed up: d. “Some children don’t like math.”
Let
: is a child, : likes math: - [5]
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
View model solution
Big-O, Big-Omega & Insertion Sort Trace for [12, 5, 7, 18, 10]
- Big-O (
): Provides an asymptotic upper bound on runtime (worst-case performance). - Big-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
shift 12: [5, 12, 7, 18, 10] - Pass 2 (insert 7): Compare with 12
shift 12; compare with 5 insert: [5, 7, 12, 18, 10] - Pass 3 (insert 18): Compare with 12
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] - Big-O (
- [5]
Define divisibility and relatively prime with example. Using divisibility rule Show that if a|b and a|c then a |(b+c)
View model solution
Divisibility Definition & Proof: If
and , then - Divisibility: Integer
divides integer ( ) if there exists an integer such that .
Proof:
- Since
, by definition for some integer . - Since
, by definition for some integer . - Adding the two expressions:
- Since
and are integers, their sum is an integer. - Thus,
, which proves by definition that .
- Divisibility: Integer
- [5]
Define source vertex and sink vertex. How many different words can be generated from the word “ANIMAL” with or without meaning?
View model solution
Source/Sink Vertices & Word Permutations of “ANIMAL”
- Source Vertex: In a directed graph, a vertex with in-degree equal to 0 (
) and positive out-degree. - Sink Vertex: A vertex with out-degree equal to 0 (
) and positive in-degree.
Permutations of “ANIMAL”:
The word has 6 letters: A, N, I, M, A, L (Letter ‘A’ occurs 2 times).
- Source Vertex: In a directed graph, a vertex with in-degree equal to 0 (
- [5]
Differentiate between domain and range. Determine whether the function f(x) = x² is onto, one-to-one, or one-to one correspondence.
View model solution
Domain vs. Range & Invertibility of
- 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 (
).
Evaluation of
over : - Not One-to-One:
but . - Not Onto: Negative real numbers (e.g.,
) have no pre-image in . - Not Bijection (Correspondence): Since it is neither one-to-one nor onto, it is not a one-to-one correspondence.
- [5]
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?
View model solution
Adjacency & Incidence Matrices for Digraphs
In the adjacency matrix
of a directed graph: - Out-degree of vertex
: Equal to the sum of entries in row : - In-degree of vertex
: Equal to the sum of entries in column :
- Out-degree of vertex
- [5]
Define spanning tree. How many spanning tree are possible from wheel graph W₃? Find using Kirchhoff’s theorem.
View model solution
Spanning Trees of Wheel Graph
Using Kirchhoff’s Theorem - Spanning Tree: A subgraph of
that is a tree and includes every vertex of . - Wheel Graph
: Consists of a 3-cycle ( ) connected to a central hub vertex; isomorphic to the complete graph . - Number of Spanning Trees: By Cayley’s formula for
, the number of spanning trees is .
- Spanning Tree: A subgraph of
- [5]
Determine whether the following pair of graph is isomorphic or not.
View model solution
Graph Isomorphism Determination
To verify if a given pair of graphs
and are isomorphic: - Check that both have equal numbers of vertices and edges.
- Verify degree sequences match.
- Establish a bijective mapping
such that . If all vertex adjacency preservation tests hold, the graphs are isomorphic.
- [5]
List the applications of tree. Prove that a tree with n vertices has n-1 edges.
View model solution
Proof: A Tree with
Vertices Has Edges Proof by Mathematical Induction:
- Base Case (
): A tree with 1 vertex has 0 edges ( ). True. - Inductive Hypothesis: Assume any tree with
vertices has edges. - Inductive Step: Consider a tree
with vertices. - Every tree with
vertices contains at least one leaf vertex with . - Removing leaf
and its incident edge leaves a smaller subgraph . is connected and acyclic, meaning it is a tree with vertices. - By our hypothesis,
has edges. - Adding back vertex
and its 1 incident edge gives:
- Every tree with
Therefore, any tree with
vertices has exactly edges. - Base Case (
- [5]
Prove that inverse and converse of an implication are logically equivalent, using truth table.
View model solution
Truth Table Proof: Equivalence of Inverse and Converse
For implication
: - Converse:
- Inverse:
$\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 (
). - Converse:
- [5]
Given a relation R = {(a, b): |a - b| is even} over a set of integers. Show that R is equivalent relation.
View model solution
Proof: Equivalence Relation for
- Reflexivity:
, which is even. . - Symmetry: If
is even, is also even. . - Transitivity: If
and , then , so is even. . Hence, is an equivalence relation.
- Reflexivity:
- [5]
Prove that (n+1 r) = (n r-1) + (n r)
View model solution
Algebraic Proof of Pascal’s Identity:
$ Factoring out common terms
: - [5]
Find the first five terms of sequence defined by recurrence relation aₙ=2aₙ₋₁+3aₙ₋₂, a₀=3, a₁=-2.
View model solution
First Five Terms of Recurrence Relation:
with The first five terms of the sequence are: 3, -2, 5, 4, 23.
- [5]
What is tree traversal? Construct an expression tree from a×b+(c /d×e-f) $g.
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:
- The root of the tree is
+, with left subtree evaluatinga * band right subtree evaluating the exponentiation operation. - In-order traversal reconstructs the fully parenthesized infix expression.
- [5]
State and verify handshaking theorem.
View model solution
Handshaking Theorem Statement & Verification
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.
- [5]
Give an necessary and sufficient condition for a graph to have Eulerian Circuit.
View model solution
Necessary and Sufficient Condition for an Eulerian Circuit
Euler’s Theorem: A connected undirected graph
contains an Eulerian Circuit (a closed walk that traverses every edge exactly once) if and only if: - The graph is connected (except for isolated vertices of degree 0).
- Every vertex in the graph has an even degree (
).