Tribhuvan University
Faculty of Management
Office of the Dean
2022 AD / Regular Examination
Time: 3 hrs | Full Marks: 60 | Pass Marks: 30
Subjective Questions
- [10]
Brief Answer Questions: a. List any two examples of propositions. b. State Absorption law. c. Represent “not all politicians are bad” using quantifier. d. Mention the two ways to represent relation. e. Define ceiling function. For what values of x, ceiling(x) = -1. f. Define complete bipartite graph with example. g. Define pairwise relative prime with example. h. In how many ways letters of word DISCRETE can be arranged without repetition of characters? i. Differentiate between Euler path and Hamilton path. j. State Pigeon hole principle.
View model solution
Step-by-Step Solutions: Brief Answer Questions
a. Two Examples of Propositions:
- “Kathmandu is the capital city of Nepal.” (True proposition)
- “
” (False proposition)
b. State Absorption Law:
In Boolean algebra and propositional logic:
c. Quantifier Representation: “Not all politicians are bad”
Let
be “ is a politician” and be “ is bad”: d. Two Ways to Represent a Relation:
- Matrix Representation (Boolean / 0-1 Matrix
) - Directed Graph (Digraph) Representation
e. Ceiling Function Definition & Value for
: - The ceiling function
assigns to real number the smallest integer greater than or equal to . .
f. Complete Bipartite Graph (
): A simple graph whose vertices can be partitioned into two disjoint subsets
(size ) and (size ) such that every vertex in is connected by an edge to every vertex in , and no edges connect vertices within the same partition. g. Pairwise Relatively Prime:
A set of integers
is pairwise relatively prime if for all . - Example: The set
is pairwise relatively prime since , , and .
h. Arrangements of the Word “DISCRETE”:
The word has 8 letters: D, I, S, C, R, E, T, E (E occurs twice).
i. Euler Path vs. Hamilton Path:
- Euler Path: A path in a graph that visits every edge exactly once.
- Hamilton Path: A path in a graph that visits every vertex exactly once.
j. Pigeonhole Principle:
If
is a positive integer and or more objects are placed into boxes, then at least one box must contain two or more objects. - [5]
Define proposition and predicate. Find the inverse and converse of the following implications. a. if you send me an email message then I will finish writing the program. b. if Aldo is Italian then Bob is not English.
View model solution
Proposition, Predicate, Inverse, and Converse
- Proposition: A declarative statement that is either definitively true or false, but not both.
- Predicate: A statement containing variables that becomes a proposition when values are assigned to those variables (e.g.,
).
Given Implication:
- Converse:
- Inverse:
a. “If you send me an email message (
), then I will finish writing the program ( ).” - Converse: “If I finish writing the program, then you sent me an email message.”
- Inverse: “If you do not send me an email message, then I will not finish writing the program.”
b. “If Aldo is Italian (
), then Bob is not English ( ).” - Converse: “If Bob is not English, then Aldo is Italian.”
- Inverse: “If Aldo is not Italian, then Bob is English.”
- [5]
What is recurrence relation? Find the first 5 terms of recurrence relation aₙ = 2aₙ₋₁ + 3aₙ₋₂ where a₀ = 1 and a₁ = 3.
View model solution
Recurrence Relation: First 5 Terms
A recurrence relation is an equation that recursively defines a sequence where each term is expressed as a function of preceding terms.
Given:
The first 5 terms are: 1, 3, 9, 27, 81 (Notice the closed form is
). - [5]
Let (a, b) ∈ R over a set of positive integers such that |a - b| is even. Show that R is equivalence relation.
View model solution
Proof: Equivalence Relation for
is Even Let
. - Reflexive:
For any
, , which is an even integer. Thus, . - Symmetric:
Assume
for some integer . Since , is also even. Hence, . - Transitive:
Assume
and and . Adding both equations: Thus,is even, meaning .
Since
is reflexive, symmetric, and transitive, is an equivalence relation. - Reflexive:
For any
- [5]
What is sorting? Sort the following data using bubble sort 30, 20, 11, 45, 10.
View model solution
Bubble Sort Algorithm & Trace for: [30, 20, 11, 45, 10]
Sorting is the algorithmic process of arranging an arbitrary collection of data elements into a specified order (ascending or descending).
Step-by-Step Trace:
- Initial Array:
[30, 20, 11, 45, 10] - Pass 1:
- Compare (30, 20)
Swap: [20, 30, 11, 45, 10] - Compare (30, 11)
Swap: [20, 11, 30, 45, 10] - Compare (30, 45)
No Swap: [20, 11, 30, 45, 10] - Compare (45, 10)
Swap: [20, 11, 30, 10, 45]
- Compare (30, 20)
- Pass 2:
- Compare (20, 11)
Swap: [11, 20, 30, 10, 45] - Compare (20, 30)
No Swap: [11, 20, 30, 10, 45] - Compare (30, 10)
Swap: [11, 20, 10, 30, 45]
- Compare (20, 11)
- Pass 3:
- Compare (11, 20)
No Swap: [11, 20, 10, 30, 45] - Compare (20, 10)
Swap: [11, 10, 20, 30, 45]
- Compare (11, 20)
- Pass 4:
- Compare (11, 10)
Swap: [10, 11, 20, 30, 45]
- Compare (11, 10)
Final Sorted Array:
[10, 11, 20, 30, 45] - Initial Array:
- [5]
State Binomial theorem and binomial coefficients. Find the coefficient of x²y³ in the (x + y)⁵.
View model solution
Binomial Theorem & Coefficient Calculation
The Binomial Theorem states that for any non-negative integer
: whereare the binomial coefficients. Coefficient of
in : Here
. We need the term where has power 2 and has power 3: The coefficient ofis 10. - [5]
Why do we need to know the growth of a function? Show that 3x² + 8x + 7 is big Oh of x².
View model solution
Growth of Functions & Big-O Proof
Analyzing the growth of functions allows computer scientists to characterize the scalability and resource efficiency of algorithms independent of machine hardware and compiler optimizations.
Proof:
is By definition,
is if there exist positive constants and such that: For all
: Therefore: Choosing witnessesand : Hence,. - [5]
Define degree of a vertex. List the necessary invariants for isomorphic graphs.
View model solution
Degree of a Vertex & Graph Invariants for Isomorphism
- Degree of a Vertex
: The number of edges incident with vertex , with self-loops counted twice.
Necessary Invariants for Graph Isomorphism:
Two graphs
and can be isomorphic only if they preserve: - Equal number of vertices (
) - Equal number of edges (
) - Identical degree sequence (multiset of vertex degrees)
- Preservation of subgraphs and cycles of specific length
- Equal connected components and chromatic numbers
- Degree of a Vertex
- [5]
Discuss adjacency matrix and incidence matrix representation of graph with suitable example.
View model solution
Adjacency Matrix vs. Incidence Matrix Representation
Let a simple undirected graph have vertices
and edges : 1. Adjacency Matrix
(Size ): if an edge connects and ; otherwise : 2. Incidence Matrix
(Size ): if vertex is incident with edge ; otherwise : - [5]
Using mathematical induction prove that n³ + 2n is divisible by 3?
View model solution
Mathematical Induction Proof:
is Divisible by 3 Let
be the proposition that is divisible by 3 for all integers . - Base Step (
): Since 3 is divisible by 3,is true. - Inductive Hypothesis:
Assume
is true for some integer , so for some integer . - Inductive Step (
): Sinceis an integer, is divisible by 3.
Therefore, by mathematical induction,
is divisible by 3 for all . - Base Step (
- [5]
Using indirect proof, prove that if n² is odd then n is also odd.
View model solution
Indirect Proof: If
is Odd, Then is Odd We prove the claim via proof by contraposition. The implication is
, where and . The contrapositive is : “If is even, then is even.” - Assume
is an even integer. - By definition of an even integer,
for some integer . - Squaring both sides:
- Since
is an integer (let ), we have , which is the definition of an even integer.
Since the contrapositive
is true, the original statement is logically equivalent and true. - Assume
- [5]
How many lowercase words are there of three characters, that can either start with “a” or end with “c”.
View model solution
3-Character Lowercase Words Starting with ‘a’ or Ending with ‘c’
The English alphabet has 26 lowercase characters. Total 3-letter words =
. - Words starting with ‘a’: Form
a _ _ - Words ending with ‘c’: Form
_ _ c - Words both starting with ‘a’ and ending with ‘c’: Form
a _ c
Using the Principle of Inclusion-Exclusion:
- Words starting with ‘a’: Form
- [5]
What is Pascal’s triangle? Find the expansion of (2-x)⁶ using Pascal’s triangle.
View model solution
Pascal’s Triangle & Expansion of
Pascal’s triangle row for
: Using binomial expansion
where : - [5]
Define expression tree with example.
View model solution
Definition of Expression Tree with Example
An expression tree is a binary tree representation of an algebraic, arithmetic, or logical expression where:
- Leaf nodes correspond to operands (constants or variables, e.g.,
). - Internal nodes correspond to operators (e.g.,
).
+ / \ * c / \ a bIn-order traversal yields the infix expression
. - Leaf nodes correspond to operands (constants or variables, e.g.,
- [5]
Show that (p ∧ q) →(p ∧q) is a tautology using truth table.
View model solution
Truth Table Proof of Tautology:
$\begin{array}{|c|c|c|c|} \hline p & q & p \land q & (p \land q) \to (p \land q) \ \hline T & T & T & \mathbf{T} \ T & F & F & \mathbf{T} \ F & T & F & \mathbf{T} \ F & F & F & \mathbf{T} \ \hline \end{array}$$
Since the final truth column evaluates to True (
) under every truth assignment, is a tautology. - [5]
State and verify handshaking theorem.
View model solution
Handshaking Theorem Statement & Verification
Theorem: In any undirected graph
: - Proof/Explanation: Every edge
has two endpoints. When calculating the sum of degrees across all vertices, each edge is counted twice—once at vertex and once at vertex . Therefore, the sum of all degrees is exactly twice the total number of edges. - Corollary: The sum of degrees in any graph is always an even integer, which implies that every undirected graph must have an even number of vertices of odd degree.
- Proof/Explanation: Every edge
- [5]
Given a function f(x) = x² over a set of integers, find whether it is onto or one to one with reason.
View model solution
Analysis of
Over the Set of Integers ( ) - One-to-One (Injective):
- A function is injective if
. - Counterexample: For
and : Sincebut , is not one-to-one.
- A function is injective if
- Onto (Surjective):
- A function is surjective if for every
, there exists such that . - Counterexample: Consider
. There is no real integer such that . - Therefore,
is not onto.
- A function is surjective if for every
- One-to-One (Injective):