Tribhuwan University

Institute of Science and Technology

Model

Bachelor Level / First Year / Second Semester / Science

Bachelors in Information Technology (BIT152)

(Discrete Structure)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Explain mathematical induction. Use mathematical induction to prove that the sum of the first n odd positive integers is n2n^2. What is recursively defined function?[10]

Mathematical Induction, Proof, and Recursively Defined Functions

Part A: Mathematical Induction

Mathematical Induction is a proof technique used to prove that a statement P(n)P(n) is true for all positive integers nn. It works like a chain of dominoes — if the first one falls, and each domino knocks the next, then all dominoes fall.

Two Steps of Mathematical Induction:

  • Basis Step: Prove that P(1)P(1) is true (i.e., the statement holds for $n = 1$).
  • Inductive Step: Assume P(k)P(k) is true for some arbitrary positive integer kk (called the inductive hypothesis). Then prove that P(k+1)P(k+1) is also true.

If both steps are completed, we conclude P(n)P(n) is true for all positive integers nn by the Principle of Mathematical Induction.


Part B: Prove that the sum of first nn odd positive integers is n2n^2

Statement: 1+3+5++(2n1)=n21 + 3 + 5 + \cdots + (2n-1) = n^2 for all positive integers nn.

The i$-th odd positive integer is $(2i - 1), so we need to prove:

P(n):i=1n(2i1)=n2P(n): \sum_{i=1}^{n} (2i - 1) = n^2

Basis Step ($n = 1$):

  • LHS =2(1)1=1= 2(1) - 1 = 1
  • RHS =12=1= 1^2 = 1
  • LHS == RHS ✓

So P(1)P(1) is true.

Inductive Step:

Assume P(k)P(k) is true for some positive integer kk, i.e.,

1+3+5++(2k1)=k2...(Inductive Hypothesis)1 + 3 + 5 + \cdots + (2k - 1) = k^2 \quad \text{...(Inductive Hypothesis)}

We need to prove P(k+1)P(k+1):

1+3+5++(2k1)+(2(k+1)1)=(k+1)21 + 3 + 5 + \cdots + (2k - 1) + (2(k+1) - 1) = (k+1)^2

Proof:

Taking LHS of P(k+1)P(k+1):

LHS=1+3+5++(2k1)=k2 (by inductive hypothesis)+(2k+1)\text{LHS} = \underbrace{1 + 3 + 5 + \cdots + (2k-1)}_{= k^2 \text{ (by inductive hypothesis)}} + (2k + 1)

=k2+2k+1= k^2 + 2k + 1

=(k+1)2= (k+1)^2

=RHS= \text{RHS}

Since P(k+1)P(k+1) is true whenever P(k)P(k) is true, by the Principle of Mathematical Induction, the statement P(n)P(n) is true for all positive integers nn. \blacksquare


Part C: Recursively Defined Function

A recursively defined function is a function whose value at a given input is defined in terms of its values at smaller inputs, along with explicitly specified initial values.

A recursive definition has two parts:

  • Basis Step: Specify the value of the function at the initial point(s), e.g., f(0)f(0) or f(1)f(1).
  • Recursive Step: Give a rule for finding the function's value at an integer from its values at smaller integers.

Example: The factorial function is defined recursively as:

  • f(0)=1f(0) = 1 (Basis)
  • f(n)=nf(n1)f(n) = n \cdot f(n-1) for n1n \geq 1 (Recursive step)

So, f(4)=4f(3)=4321=24f(4) = 4 \cdot f(3) = 4 \cdot 3 \cdot 2 \cdot 1 = 24


Conclusion: Mathematical induction is a powerful tool for proving statements about all positive integers, and recursively defined functions allow us to define complex functions elegantly using simpler base cases and self-referencing rules.

2.
Define recurrence relation. What do you mean by linear homogeneous recurrence of degree kk with constant coefficients? What is the solution of the recurrence relation an=an1+an2a_n = a_{n-1} + a_{n-2} with initial conditions a0=0a_0 = 0 and a1=1a_1 = 1 ?[10]
3.
What is shortest path finding problem? Use Dijkstra's algorithm to find the length of the shortest path between a and z in the given weighted graphs.
question image
[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
What do you mean by converse, inverse, and contrapositive? Show that the sentences "if it is hot today then today is Sunday" and "if it is not Sunday then today is not hot" are logically equivalent. [5]
5.
What direct proof? Give a direct proof of the theorem "If n is an odd integer, then n2n^2 is an odd integer." [5]
6.
Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Use bit strings to find the union and intersection of the sets {1, 2, 3, 4, 5} and {1, 3, 5, 7, 9}. [5]
7.
Define celling and floor function. Explain Boolean function with example. [5]
8.
How can we represent a relation using directed graph? Draw a directed graph of the relation R = {(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (4, 1)} on the set {1, 2, 3, 4}. [5]
9.
Explain Euclidean algorithm. Use Euclidean algorithm to find the greatest common divisor of 414 and 662. [5]
10.
Differentiate permutation with combination. What is the next permutation in lexicographic order after 362541? [5]
11.
How can we represent a graph using Adjacency Matrix? Explain. [5]
12.
Define spanning tree. Explain minimum spanning tree with example. [5]