Chapter 10
Discrete Structure (2013 AD onward)
TU BIM past exam questions
Past questions and answers
208 questions set from this chapter, 2 of them more than once; 15 are most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.
- Most repeated · 4 of 21 exams
- 2014 AD · 4 marks
Define shortest path problem. Find the shortest path from to each of the vertices by using Dijkstra's algorithm. (Weighted graph on vertices A-F is given in a figure in the original paper.)
Similar questions: Using Dijkstra's algorithm, find the shortest path (2017 AD) · Define weighted graph. Find the shortest path (2021 AD) · Apply Dijkstra's Algorithm to find the shortest (2019 AD)
Answer
Shortest path problem. Given a weighted graph and two vertices, find a path between them whose total edge weight is minimum. Dijkstra's algorithm solves it from a source vertex to all other vertices when all weights are non-negative.
Dijkstra's algorithm (source ).
- Set and for all other ; mark all vertices unvisited.
- Choose the unvisited vertex with the smallest and mark it visited (permanent).
- For each unvisited neighbour of , if , set and record as the predecessor of .
- Repeat steps 2 and 3 until all vertices are visited.
The final labels are the shortest distances from , and following the predecessors back from to gives the shortest path. In the table of iterations, each row shows the labels after one vertex is made permanent, and the vertex chosen in each row is the one with the least tentative label, so the distances are fixed in increasing order.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 4 of 21 exams
- 2017 AD · 4 marks
Using Dijkstra's algorithm, find the shortest path from vertex A to F. (Weighted graph on vertices A-F is given in a figure in the original paper.)
Similar questions: Define weighted graph. Find the shortest path (2021 AD) · Define shortest path problem. Find the shortest (2014 AD) · Apply Dijkstra's Algorithm to find the shortest (2019 AD)
Answer
Dijkstra's algorithm finds the shortest paths from a source in a weighted graph with non-negative weights.
Procedure for source and target
- Set and for all other vertices; all vertices are unmarked (temporary).
- Pick the unmarked vertex with the smallest and mark it permanent.
- For every neighbour of , relax: if , set and record as the predecessor of .
- Repeat steps 2 and 3 until is marked permanent.
- The shortest distance is ; the path is found by following predecessors from back to .
Working table. Each round fixes one vertex (the one with the smallest label in the current row) and updates the labels of its neighbours. Carrying out the rounds on the weights in the figure fixes the vertices in the order of increasing distance from , and the label of when it is fixed gives the shortest distance from to , with the predecessor chain giving the path.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 4 of 21 exams
- 2019 AD · 4 marks
Apply Dijkstra's Algorithm to find the shortest path from to of the remaining vertices. (Weighted graph on vertices a-f is given in a figure in the original paper.)
Similar questions: Using Dijkstra's algorithm, find the shortest path (2017 AD) · Define weighted graph. Find the shortest path (2021 AD) · Define shortest path problem. Find the shortest (2014 AD)
Answer
Dijkstra's algorithm (source ):
- Set and for every other vertex; mark all vertices unvisited.
- Choose the unvisited vertex with the smallest and mark it visited (permanent).
- For every unvisited neighbour of with edge weight : if , set and record as the predecessor of .
- Repeat steps 2 and 3 until every vertex (or the target) is visited.
Starting from , the first vertex made permanent is with label 0, its neighbours are labelled by the weights of their edges from , and the process continues with the least labelled vertex each time, updating labels of its neighbours whenever a shorter route is found. When is made permanent, the label of is the length of the shortest path from to , and the path itself is obtained by following the predecessors back from to . The same final labels give the shortest distances from to all the remaining vertices.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 4 of 21 exams
- 2021 AD · 4 marks
Define weighted graph. Find the shortest path from vertex to in the given graph using Dijkstra's algorithm. (Weighted graph on vertices a, b, c, d, z is given in a figure in the original paper.)
Similar questions: Using Dijkstra's algorithm, find the shortest path (2017 AD) · Define shortest path problem. Find the shortest (2014 AD) · Apply Dijkstra's Algorithm to find the shortest (2019 AD)
Answer
A weighted graph is a graph in which each edge is assigned a non-negative number (its weight, e.g. distance or cost). The length of a path is the sum of the weights of its edges.
Dijkstra's algorithm (shortest path from to ):
- Set and for all other vertices; all vertices are unvisited.
- Pick the unvisited vertex with the smallest and mark it visited.
- For each unvisited neighbour of , if set and record as its predecessor.
- Repeat steps 2-3 until is visited; is the shortest distance and the predecessors give the path.
Illustration with edges :
| Step | Visit | ||||
|---|---|---|---|---|---|
| 0 | 2 | 4 | |||
| 1 | 2 | 3 | 9 | ||
| 2 | 2 | 3 | 6 | 11 | |
| 3 | 2 | 3 | 6 | 8 | |
| 4 | 8 |
Shortest path: with length . The same steps applied to the weights in the given figure yield its shortest path.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- Asked 2 times
- 2016 AD · 2 marks
- 2018 AD · 2 marks
A tree has 2 vertices of degree 2, 1 vertex of degree 3 and 3 vertices of degree 4. How many pendant vertices does it have?
Similar questions: A tree has 3 vertices of degree (2021 AD)
Answer
Let be the number of pendant vertices (degree 1). Then
By the handshaking lemma:
The tree has 9 pendant vertices.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2014 AD · 4 marks
Define forest with example. Prove that a forest with vertices has edges, where is number of component of forest.
Similar questions: What is forest? Prove that a forest (2017 AD) · Prove that a forest with n vertices (2021 AD)
Answer
Definition. A forest is an acyclic graph, that is, a graph with no cycles. Equivalently, it is a disjoint union of trees; each connected component of a forest is a tree.
Example: the graph with edges and on vertices is a forest with two components (the path and the edge ).
Theorem. A forest with vertices and components has edges.
Proof. Let the components be trees with vertices, so . A tree with vertices has exactly edges. Therefore the total number of edges is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2016 AD · 4 marks
State Binomial theorem for positive index . Find the middle term (s) in the expansion of
Similar questions: State binomial theorem for positive index n (2018 AD) · State binomial theorem for positive index n (2021 AD)
Answer
Binomial theorem. For a positive integer ,
Middle terms of . There are 16 terms, so the middle terms are the 8th and 9th. The general term is
For :
For :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2017 AD · 4 marks
What is forest? Prove that a forest with vertices has edges, where is number of components of forest.
Similar questions: Prove that a forest with n vertices (2021 AD) · Define forest with example. Prove that a (2014 AD)
Answer
A forest is an acyclic graph (not necessarily connected); each of its components is a tree.
Theorem. A forest with vertices and components has edges.
Proof. Let the components be trees with vertices, so . A tree with vertices has edges. Hence the total number of edges is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2018 AD · 4 marks
State binomial theorem for positive index . Find the middle term(s) in the binomial expansion of .
Similar questions: State Binomial theorem for positive index n (2016 AD) · State binomial theorem for positive index n (2021 AD)
Answer
Binomial theorem: for a positive integer ,
The general term is .
Middle terms of :
Here (odd), so there are 8 terms and two middle terms: and .
For :
For :
Middle terms: and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2018 AD · 2 marks
Using mathematical induction, Prove that is divisible by 3, .
Similar questions: Induction n^3+2n divisible by 3 (2023 AD Model) · Using mathematical induction prove that n^3+2n is (2019 AD)
Answer
Let : is divisible by 3.
Basis: : , divisible by 3.
Inductive step: assume for some integer . Then
which is divisible by 3. So , and by induction is divisible by 3 for all .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2019 AD · 4 marks
Using mathematical induction prove that is divisible by 3, where .
Similar questions: Using mathematical induction, Prove that n^3+2n is (2018 AD) · Induction n^3+2n divisible by 3 (2023 AD Model)
Answer
Let : is divisible by 3.
Basis step: : , divisible by 3.
Inductive hypothesis: assume is true for some , i.e. for some integer .
Inductive step: consider :
This is divisible by 3, so holds. By the principle of mathematical induction, is divisible by 3 for every integer .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2021 AD · 4 marks
State binomial theorem for positive index . Find the coefficient of in the expansion of .
Similar questions: State Binomial theorem for positive index n (2016 AD) · State binomial theorem for positive index n (2018 AD)
Answer
Binomial theorem: for any positive integer ,
Coefficient of in : the general term is
Setting gives . Then
The coefficient of is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2021 AD · 4 marks
Prove that a forest with vertices has edges where is number of components of forest.
Similar questions: What is forest? Prove that a forest (2017 AD) · Define forest with example. Prove that a (2014 AD)
Answer
A forest is a graph with no cycles; each of its components is a tree.
Let the components be with vertices, so . A tree with vertices has exactly edges. Hence the number of edges is
(For the forest is a tree with edges.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2021 AD · 2 marks
A tree has 3 vertices of degree 2, and 4 vertices of degree 3. How many pendant vertices does it have?
Similar questions: A tree has 2 vertices of degree (2018 AD)
Answer
Let be the number of pendant vertices (degree 1). Then and the tree has edges.
Handshaking lemma: , i.e. , so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 21 exams
- 2023 AD Model · 3 marks
Prove that is divisible by 3, using mathematical induction.
Similar questions: Using mathematical induction, Prove that n^3+2n is (2018 AD) · Using mathematical induction prove that n^3+2n is (2019 AD)
Answer
Let : is divisible by 3, for .
Basis step. For : , which is divisible by 3. So is true.
Inductive step. Assume , that is, for some integer . Then
which is divisible by 3. So .
By mathematical induction, is divisible by 3 for all positive integers .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2016 AD · 1 mark
- 2017 AD · 1 mark
Define strongly connected digraph with example.
Answer
A directed graph is strongly connected if for every ordered pair of vertices there is a directed path from to (and hence, applying this to both orders, also from to ).
Example: the digraph with vertices and arcs is strongly connected, since going around the directed cycle reaches any vertex from any other.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Use mathematical induction to prove for all .
Similar questions: Use mathematical induction to prove that 2+4+6+dots+2n=n(n+1 (2017 AD)
Answer
Let be the statement .
Basis. : , true.
Inductive step. Assume for some , i.e. . Then using for . So holds.
By induction, for all .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Show that condition statement is logically equivalent to its contrapositive.
Similar questions: Show that the conditional statement is logically (2018 AD)
Answer
Let the conditional be , with contrapositive .
Truth table:
| T | T | T | T |
| T | F | F | F |
| F | T | T | T |
| F | F | T | T |
The columns are identical, so a conditional statement is logically equivalent to its contrapositive.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
In how many ways the numbers on a clock face be arranged?
Similar questions: How many ways the numbers on a (2017 AD)
Answer
The 12 numbers are placed in the 12 distinct positions of the clock face, which can be done in
(If arrangements differing only by rotation were counted as the same, the count would be .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Find the minimum possible height of full binary tree with 63 vertices.
Similar questions: Find the minimum and maximum possible height (2019 AD)
Answer
A binary tree of height has at most vertices. For 63 vertices we need , so and .
The minimum possible height is 5 (the complete binary tree with vertices has exactly this height).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
How many relations are possible from set with elements to set with elements?
Similar questions: How many relations are possible on set (2021 AD)
Answer
A relation from to is any subset of . Since , the number of subsets is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
How many ways the numbers on a clock face be arranged?
Similar questions: In how many ways the numbers on (2016 AD)
Answer
The 12 numbers are placed around a circle, where only the relative order matters (rotations give the same arrangement). The number of circular arrangements of 12 distinct objects is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
How many spanning trees are possible from a complete graph ?
Similar questions: What is spanning tree? How many spanning (2018 AD)
Answer
By Cayley's formula, the number of spanning trees of is . For :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Use mathematical induction to prove that
Similar questions: Use mathematical induction to prove n<2^n for (2013 AD)
Answer
Let .
Basis. : LHS , RHS . True.
Step. Assume : . Then
which is . By induction, is true for all .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Find the expansion of using Pascal's triangle.
Similar questions: Find the expansion of (1-2x)^6 using Pascal's (2021 AD)
Answer
Row 6 of Pascal's triangle is . Taking :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
What is equivalence class? Find the equivalence relation from the partition .
Similar questions: Find the equivalence relation from partition P=1,4,2,3,5 (2019 AD)
Answer
Equivalence class. For an equivalence relation on a set and , the equivalence class of is , the set of all elements related to . The classes form a partition of , and conversely every partition defines an equivalence relation.
From the partition of , two elements are related when they lie in the same block:
This relation is reflexive, symmetric and transitive, and its classes are and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Show that the conditional statement is logically equivalent to its contrapositive.
Similar questions: Show that condition statement is logically equivalent (2016 AD)
Answer
Let the conditional statement be and its contrapositive .
| T | T | T | F | F | T |
| T | F | F | T | F | F |
| F | T | T | F | T | T |
| F | F | T | T | T | T |
The columns for and are identical, so .
Algebraically: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Find the number of bit strings of length 8 that begin with 1?
Similar questions: Find the number of bit strings of (2019 AD)
Answer
The first bit is fixed as 1 and each of the other 7 bits can be 0 or 1, so the number is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Prove that a tree with vertices has at least two pendant vertices.
Similar questions: Prove that number of pendant vertices in (2019 AD)
Answer
Claim: a tree with vertices has at least two pendant vertices (vertices of degree 1).
Proof 1 (degree sum). A tree with vertices has edges, so . Since is connected and , every vertex has degree . Suppose at most one vertex has degree 1. Then the other vertices have degree , and
a contradiction. Hence at least two vertices have degree 1.
Proof 2 (longest path). Take a longest path in (). If had another neighbour, it would either be on the path (forming a cycle, impossible in a tree) or off the path (giving a longer path). So ; similarly . These are two distinct pendant vertices.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 2 marks
What is spanning tree? How many spanning tree are possible from complete graph ?
Similar questions: How many spanning trees are possible from (2017 AD)
Answer
A spanning tree of a connected graph is a subgraph that is a tree and contains all the vertices of (it has edges).
By Cayley's formula, the complete graph has spanning trees.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 2 marks
How many cards must be selected from a deck of 52 cards to ensure that at least 3 cards of the same suite are chosen?
Similar questions: How many cards must be selected from (2021 AD)
Answer
There are 4 suits. In the worst case we pick 2 cards from each suit, i.e. cards, without having 3 of one suit. The next card must give 3 of some suit. By the pigeonhole principle, cards must be selected.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Find the number of bit strings of length 5 begin with 0 and end with 1.
Similar questions: Find the number of bit strings of (2018 AD)
Answer
The first bit is 0 and the last bit is 1, so the 3 middle bits are free: strings.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Find the minimum and maximum possible height of full binary tree with 15 vertices.
Similar questions: Find the minimum possible height of full (2016 AD)
Answer
In a full binary tree every internal vertex has 2 children. With vertices, the number of internal vertices is and leaves .
- Minimum height: the tree is as bushy as possible (a complete binary tree): .
- Maximum height: a chain where each internal vertex has one leaf child: .
Minimum height , maximum height .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Prove that number of pendant vertices in a tree with vertices is at least two.
Similar questions: Prove that a tree with nge 2 (2018 AD)
Answer
Proof. Let be a tree with vertices. Since is connected and has at least one edge, take a longest path in ( because ).
Suppose has a neighbour other than .
- If is on , then together with the part of up to forms a cycle, impossible in a tree.
- If is not on , then is a longer path, contradicting the choice of .
So . By the same argument . Since , the tree has at least two pendant vertices.
(Alternative: if at most one vertex had degree 1, then , contradicting .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
Find the equivalence relation from partition .
Similar questions: What is equivalence class? Find the equivalence (2017 AD)
Answer
The relation is " iff and lie in the same block". Each block contributes :
So , which is reflexive, symmetric and transitive.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
How many relations are possible on set with elements?
Similar questions: How many relations are possible from set (2017 AD)
Answer
A relation on a set with elements is a subset of , which has elements. Each ordered pair is either in or out of the relation, so the number of relations is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
How many cards must be selected from deck of 52 cards to ensure that at least 3 cards of the diamond are chosen?
Similar questions: How many cards must be selected from (2018 AD)
Answer
The deck has 13 diamonds and 39 non-diamonds. In the worst case all 39 non-diamonds are chosen first, and then 3 diamonds are needed:
cards must be selected (generalised pigeonhole principle).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
Find the expansion of using Pascal's triangle.
Similar questions: Find the expansion of (1+2x)^6 using Pascal's (2017 AD)
Answer
Row 6 of Pascal's triangle is . With , :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
When is a relation on a set not antisymmetric?
Answer
A relation on is not antisymmetric when there exist distinct elements in such that both and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
For which real numbers is true that ?
Answer
For every real , , so always. The two sides can never be equal.
Hence there is no real number for which .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
What is an -permutation of a set of distinct objectives?
Answer
An -permutation of a set of distinct objects is an ordered arrangement of of the objects. Their number is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
What is meant by a loop in a graph?
Answer
A loop is an edge that joins a vertex to itself, i.e. an edge whose two end points are the same vertex.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
When is graph said to be connected?
Answer
A graph is connected if there is a path between every pair of distinct vertices of . Otherwise it is disconnected.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
When is a connected multi-graph said to be traversal graph?
Answer
A connected multigraph is traversable if it has a path (trail) that uses every edge exactly once.
By Euler's theorem this holds exactly when the graph has either no odd-degree vertices (the trail can be closed, an Euler circuit) or exactly two odd-degree vertices (an Euler trail from one to the other).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
How many different spanning trees does a cycle graph of order 5 have?
Answer
A spanning tree of the cycle is obtained by deleting exactly one of its edges. Hence it has 5 different spanning trees.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
How many edges does tree with vertices have?
Answer
A tree with vertices has edges.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 1 mark
How can you quickly determine whether a binary relation is reflexive by examining the diagraph of ?
Answer
is reflexive exactly when every vertex of the digraph has a loop (an arrow from the vertex to itself), because reflexivity needs for every .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Define binary relation from a set to a set . Let be relation on a set . Then determine whether the relation is reflexive, irreflexive, symmetric, asymmetric, antisymmetric or transitive.
Answer
A binary relation from a set to a set is a subset of the Cartesian product ; is written .
Take on .
- Reflexive: No, since .
- Irreflexive: Yes, no pair is in .
- Symmetric: No, but .
- Asymmetric: Yes, whenever we have .
- Antisymmetric: Yes, there is no pair of distinct elements related both ways.
- Transitive: Yes. The only chains are and , both requiring , which is in .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
What is a bijection? Let be a function defined by: for all , where is real and , is real and . Is invertible? If so find .
Answer
A bijection is a function that is both one-to-one (injective) and onto (surjective).
Here with and .
One-to-one. If , squaring gives .
Onto. For any take ; then .
So is a bijection and therefore invertible. From we get , so
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Define sequence. What is the difference between sequence and string? How the length of a finite string is measured? Show that the set of infinite sequence of positive even integers denumerable.
Answer
A sequence is an ordered list of terms , formally a function from a set of consecutive integers (usually ) to a set.
Difference. A string is a finite sequence of symbols taken from an alphabet. A sequence may be finite or infinite, whereas a string is always finite.
Length of a finite string is the number of symbols (terms) it contains, counted with repetition; e.g. has length .
Denumerability. The infinite sequence of positive even integers is . Define (where is the set of positive even integers) by .
- One-to-one: .
- Onto: each even equals .
So is a bijection from onto , and is denumerable.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
(a) Find the number of distinguishable permutations of the letters in the word DIRECTOR so that the vowels are always together?
(b) How many committees of five with a chairperson can be selected from 12 persons?
Answer
(a) DIRECTOR has letters, with R repeated twice. The vowels are I, E, O (three of them).
Treat the vowels as one block. The units to arrange are the block and D, R, C, T, R: that is units with R repeated twice, giving arrangements. The vowels can be ordered inside the block in ways.
(b) Choose the committee of five in ways, then pick the chairperson from its members in ways: (Check: choose the chairperson first, .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Define odd degree vertex and even degree vertex in a graph. State the Handshaking Theorem for an undirected graph . Show that the numbers of odd vertices in any graph is always even.
Answer
An odd vertex is a vertex whose degree is odd; an even vertex has even degree.
Handshaking Theorem. For an undirected graph , (Each edge contributes to the degree of each of its two ends.)
The number of odd vertices is even. Let and be the sets of even and odd vertices. Then The left side and the first sum on the right are even, so is even. It is a sum of odd numbers, which is even only if the number of terms is even. Hence is even.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Define bipartite graph. Show that a nontrivial simple graph with odd cycle is not bipartite.
Answer
A graph is bipartite if its vertices can be divided into two disjoint sets such that every edge joins a vertex in to one in .
Claim. A simple graph containing an odd cycle is not bipartite.
Proof. Suppose the graph is bipartite with parts , and let be an odd cycle, with an edge. Say . Consecutive vertices lie in different sets, so , , and in general for odd . Thus . But is adjacent to , so an edge has both ends in , a contradiction. Hence the graph is not bipartite.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
When are two graphs and said to be isomorphic? Determine whether the pair of graphs given in the figure of the original paper (two graphs on vertices a-h and 1-8) is isomorphic.
Answer
Two graphs and are isomorphic if there is a bijection such that are adjacent in if and only if are adjacent in (adjacency is preserved in both directions).
Test for the given pair. Check these invariants first; if any fails, the graphs are not isomorphic.
- Both have vertices.
- Both have the same number of edges.
- The degree sequences (sorted) agree.
- The same cycle lengths, and the same adjacency pattern of vertices of equal degree.
If all agree, build a map from to by matching vertices of equal degree and then neighbour by neighbour, and verify that every edge of the first graph maps to an edge of the second. If the degree sequences or the neighbourhood structure differ, the graphs are not isomorphic; otherwise the map found proves isomorphism.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Apply Dijkstra's algorithm to find the shortest path from the node 'r' to each of the other nodes of the weighted network given in the figure of the original paper (nodes r, b, c, d, e, f).
Answer
Dijkstra's algorithm (source , weights ):
- Set and for all other nodes; all nodes are temporary.
- Make permanent the temporary node with the smallest .
- For each temporary neighbour of , if set and record as the predecessor of .
- Repeat until all of are permanent.
For the given network, tabulate the labels of at each step. Start with , fix , label its neighbours with the edge weights, then keep fixing the smallest temporary label and relaxing its neighbours. The final labels are the shortest distances from to each node, and following predecessors back to gives each shortest path.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Show that a graph (without loop) is connected if and only if contains a spanning tree.
Answer
Claim. A loop-free graph is connected if and only if it has a spanning tree.
() If has a spanning tree , then contains all vertices of and is connected, so any two vertices are joined by a path in , which is also a path in . Hence is connected.
() Let be connected. If has no cycle it is itself a tree, hence its own spanning tree. Otherwise pick a cycle and delete one of its edges. Removing a cycle edge does not disconnect the graph, since any path through that edge can use the rest of the cycle instead. Repeat while cycles remain. The process stops because the number of edges is finite, and it ends with a connected, acyclic subgraph containing all the vertices, that is a spanning tree of .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Prove that every tree of order two or more has at least two pendant vertices.
Answer
A pendant vertex is a vertex of degree .
Proof. Let be a tree with vertices. It is connected, so it has at least one edge. Take a longest path in (with ).
Suppose had a neighbour other than . If is on , then together with the part of up to forms a cycle, impossible in a tree. If is not on , then is a longer path, contradicting the choice of . So has only as neighbour, i.e. . By the same argument .
Since , . So has at least two pendant vertices.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
From the following successor list of a directed graph :
Vertex a b c d e Successor list b,c d,e a,b,e
a. Construct the adjacency matrix of the diagraph.
b. Find in-degree and out-degree of each vertex from the adjacency matrix.
c. Find the number of directed edges and verify that
d. Determine whether is unilaterally connected or/and strongly connected.
Answer
The arcs are .
(a) Adjacency matrix (rows and columns in the order ):
(b) Degrees. Out-degree is the row sum and in-degree is the column sum.
| Vertex | a | b | c | d | e |
|---|---|---|---|---|---|
| out-degree | 2 | 0 | 2 | 3 | 0 |
| in-degree | 1 | 2 | 1 | 1 | 2 |
(c) The number of directed edges is the sum of all entries of , so . Then so .
(d) Vertices and have out-degree , so there is no directed path from to or from to . Hence is not unilaterally connected (some pair has no path in either direction), and since every strongly connected digraph is unilaterally connected, it is not strongly connected either.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 4 marks
Show that the maximum number of vertices possible in an -level full binary tree with vertices is and hence show that .
Answer
In a binary tree, level (root at level ) contains at most vertices, since each vertex has at most two children. For a tree whose levels run , the number of vertices is at most A full binary tree with levels attains this maximum, so for a tree with vertices
Minimum height. From we get , so , i.e. . Since the number of levels is an integer, the smallest possible maximum level is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Show that the relation of divisibility is a partial order on the set of positive integers.
Answer
A partial order is reflexive, antisymmetric and transitive. For positive integers , let mean for some integer .
- Reflexive: , so .
- Antisymmetric: If and , then and with positive , so and . Thus and .
- Transitive: If and , then , , so .
Hence divisibility is a partial order on the positive integers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Let , and be all functions on integers define by , , and . Then find the compositions of functions , and .
Answer
With , , :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Use the Binomial Theorem to show that .
Answer
The Binomial Theorem gives Put and : Hence .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Use the Pigeonholes Principle to find the minimum number of integers to be selected from the set so that the sum of two of integers is even.
Answer
The sum of two integers is even exactly when they have the same parity. Take two pigeonholes: the odd numbers and the even numbers .
If integers are selected, by the pigeonhole principle at least two lie in the same hole, so they have the same parity and their sum is even. With only integers, one odd and one even, the sum can be odd.
Hence the minimum number to be selected is 3.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Give an example of a graph that is (a) Hamiltonian and Eulerian, and (b) Eulerian but not Hamiltonian.
Answer
(a) Hamiltonian and Eulerian. The cycle (a square) or the triangle . Every vertex has even degree and the graph is connected, so it has an Euler circuit, and the cycle itself passes through every vertex once, so it is Hamiltonian.
(b) Eulerian but not Hamiltonian. The "bow-tie": two triangles sharing one common vertex. All degrees are even () and it is connected, so it has an Euler circuit. It has no Hamiltonian cycle, because the common vertex is a cut vertex and any cycle through all vertices would have to pass through it twice.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Find a minimum spanning tree for the weighted network in the question No. 7.
Answer
Use Kruskal's algorithm:
- List the edges in increasing order of weight.
- Take the edges in that order, adding an edge to the tree only if it does not form a cycle with the edges already chosen.
- Stop when edges have been chosen, where is the number of vertices.
Applying this to the weighted network of Question 7 (vertices , so edges are needed) gives the minimum spanning tree. Its weight is the sum of the chosen edge weights. Prim's algorithm, growing the tree from any vertex by repeatedly adding the cheapest edge leaving it, gives a tree of the same total weight.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Determine which of the following graphs with degree sequence is a tree:
a. 4, 3, 3, 3, 1, 1, 1, 1, 1, 1.
b. 7, 3, 2, 1, 1, 1, 1, 1, 1.
Answer
A tree with vertices has edges, so the degree sum must be .
a. : there are vertices and the degree sum is . This is odd, so no graph has this sequence, and it is not a tree (a tree would need sum ).
b. : there are vertices and the degree sum is , which would mean edges. A tree on vertices has only edges (sum ), so this is not a tree.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2013 AD · 2 marks
Construct the binary tree of the algebraic expression . Also write the expression in polish form.
Answer
Expression: .
The root is the main . Its left subtree is and its right subtree is .
+
/ \
+ -
/ \ / \
* ^ x *
/ \ / \ / \
2 x - 2 3 11
/ \
3 *
/ \
4 x
Polish (prefix) form, reading the tree root, left, right:
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Define tautology, contradiction and contingency in logic.
Answer
- A tautology is a compound proposition that is true for every assignment of truth values to its variables, e.g. .
- A contradiction is a compound proposition that is false for every assignment, e.g. .
- A contingency is a compound proposition that is neither a tautology nor a contradiction, i.e. it is true for some assignments and false for others, e.g. .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Find the value of summation:
Answer
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
What is prime number? Find prime factorization of 875.
Answer
A prime number is an integer greater than 1 whose only positive divisors are 1 and itself.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Under what condition (a) and (b) .
Answer
(a) exactly when is an integer, because then .
(b) exactly when is not an integer, because then the ceiling is the next integer above the floor.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Write the recursive definition for finding Fibonacci number.
Answer
The Fibonacci numbers are defined recursively by
giving
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
List any two applications of graph in the field of computer science.
Answer
- Computer networks: computers and routers are vertices and links are edges, used for routing and shortest-path computation.
- Web and social networks: pages (or people) are vertices and hyperlinks (or friendships) are edges, used in search ranking and analysis.
Other uses include compiler flow graphs and scheduling or resource allocation by graph colouring.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Find the number of faces, edges and vertices of regular 'Octahedron'.
Answer
A regular octahedron has 8 faces (equilateral triangles), 12 edges and 6 vertices.
Check with Euler's formula: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
State Ore's theorem in graph.
Answer
Ore's theorem: Let be a simple graph with vertices. If for every pair of non-adjacent vertices , then has a Hamiltonian cycle.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Define unilaterally connected directed graph with an example.
Answer
A directed graph is unilaterally connected if for every pair of vertices there is a directed path from to or a directed path from to (not necessarily both).
Example: the digraph with vertices and arcs is unilaterally connected (a path covers every pair in one direction), but it is not strongly connected since there is no path back from to .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 1 mark
Define minimal spanning trees with example.
Answer
A spanning tree of a connected graph is a subgraph that is a tree containing all vertices of . In a weighted connected graph, a minimal spanning tree is a spanning tree whose total edge weight is the smallest among all spanning trees.
Example: take vertices with edges . The spanning trees are (weight 3), (weight 4) and (weight 5), so the minimal spanning tree is with weight 3. It can be found by Kruskal's or Prim's algorithm.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
Change the following proposition into if ............... then form and then write its converse, inverse and contrapositive.
a) All the glitter is not gold.\nb) All hexagon are regular polygon.
Answer
For : converse is , inverse is , contrapositive is .
(a) "All the glitter is not gold."
- If-then form: If something glitters, then it is not gold.
- Converse: If something is not gold, then it glitters.
- Inverse: If something does not glitter, then it is gold.
- Contrapositive: If something is gold, then it does not glitter.
(b) "All hexagons are regular polygons."
- If-then form: If a polygon is a hexagon, then it is a regular polygon.
- Converse: If a polygon is a regular polygon, then it is a hexagon.
- Inverse: If a polygon is not a hexagon, then it is not a regular polygon.
- Contrapositive: If a polygon is not a regular polygon, then it is not a hexagon.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
Define insertion sort. Sort the list of the elements 6, 2, 3, 1, 5, 4 in increasing order using insertion sort.
Answer
Insertion sort builds the sorted list one element at a time: starting from the second element, each element is compared with the elements before it and inserted into its correct place in the already sorted part, shifting larger elements one position to the right.
Sorting (sorted part before the bar):
| Pass | Element inserted | List |
|---|---|---|
| start | 6 | 2, 3, 1, 5, 4 | |
| 1 | 2 | 2, 6 | 3, 1, 5, 4 |
| 2 | 3 | 2, 3, 6 | 1, 5, 4 |
| 3 | 1 | 1, 2, 3, 6 | 5, 4 |
| 4 | 5 | 1, 2, 3, 5, 6 | 4 |
| 5 | 4 | 1, 2, 3, 4, 5, 6 |
Sorted list: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
Define equivalence class. If and is a relation on such that . Prove is equivalence relation and also find the equivalence classes determined by .
Answer
Definition. If is an equivalence relation on , the equivalence class of is . The classes partition .
Proof that is an equivalence relation ( iff ):
- Reflexive: is divisible by 5, so .
- Symmetric: if then , so .
- Transitive: if and then , so .
Hence is an equivalence relation.
Equivalence classes. Two numbers are related iff they leave the same remainder on division by 5:
There are 5 distinct classes, and their union is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
Define isomorphic graph and isomorphism. Prove that following set of graphs are isomorphic. (Two graphs on vertices and on vertices are given in a figure in the original paper.)
Answer
Definition. Two simple graphs and are isomorphic if there is a bijection such that are adjacent in if and only if are adjacent in . The bijection is called an isomorphism.
Method of proof.
- Check the invariants: same number of vertices, same number of edges, and the same degree sequence.
- Define the mapping by matching vertices of equal degree and equal neighbourhood structure (for example, a vertex of degree 3 whose neighbours have degrees must map to a vertex with the same property).
- List every edge of and verify that is an edge of . Since both graphs have the same number of edges and is a bijection, edges are preserved in both directions.
When every edge of is mapped onto an edge of by such a bijection, the graphs are isomorphic. (Equivalently, the adjacency matrix of is obtained from that of by relabelling the vertices.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
Define inverse function. Prove that a function defined by is invertible and also find its inverse.
Answer
Definition. If is a bijection (one-to-one and onto), its inverse is the function with exactly when . A function is invertible iff it is a bijection.
For . The formula is undefined at , so it is taken on the domain , and it never takes the value 1 (since is impossible), so the codomain is .
One-to-one: if then , which gives , so .
Onto: let . Solving :
This is defined for every and is not (that would need , which is false). So every has a preimage.
Hence is a bijection, so it is invertible, and
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
What do you mean by binomial theorem for positive index ? What are the binomial coefficients? Find the middle terms of .
Answer
Binomial theorem. For a positive integer ,
The numbers are the binomial coefficients (they form the rows of Pascal's triangle).
Middle terms of . There are 16 terms, so the middle terms are the 8th and 9th. The general term is
For (8th term):
For (9th term):
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 4 marks
What do you mean by tree traversal? Construct the tree for algebraic expression: .
Answer
Tree traversal is a systematic way of visiting every vertex of a rooted tree exactly once. The three standard orders are:
- Preorder: root, then left subtree, then right subtree.
- Inorder: left subtree, then root, then right subtree.
- Postorder: left subtree, then right subtree, then root.
Expression tree for . The last operation is the addition, so the root is .
- Left child of the root: (power), with left child and right child . The node has children and , and has children and .
- Right child of the root: , with children and .
+
/ \
^ -
/ \ / \
+ 3 x y
/ \
x *
/ \
2 y
Preorder:
Inorder:
Postorder:
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Prove that the inverse and converse of conditional statements are logically equivalent.
Answer
Let the conditional be . Its converse is and its inverse is .
The inverse is the contrapositive of the converse, and a statement is equivalent to its contrapositive. Directly:
Truth table:
| T | T | T | T |
| T | F | T | T |
| F | T | F | F |
| F | F | T | T |
The last two columns are identical, so the inverse and the converse are logically equivalent.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Let and be two Boolean matrices, find (i) (ii)
Answer
Join takes the entrywise OR and meet takes the entrywise AND.
(i)
(ii)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Use mathematical induction to show that: , where is positive integer.
Answer
Let .
Basis. For : LHS , RHS . So is true.
Inductive step. Assume is true for some . Then
which is . By the principle of mathematical induction, holds for all positive integers .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Define Wheel graph. Prove that the sum of degree of vertices of wheel graph is 4 times the size of cycle graph.
Answer
Definition. The wheel graph is obtained from the cycle graph ( vertices and edges) by adding one new vertex (the hub) joined to every vertex of the cycle.
Proof. has vertices. The edges of the cycle plus the spokes give edges. By the handshaking lemma,
Check by degrees: the hub has degree , and each rim vertex has degree 3, so the sum is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Find the minimum number of students to guarantee that 50 of them obtain a same grade where there are altogether 20 different grades.
Answer
By the generalised pigeonhole principle, if objects are placed in boxes, some box contains at least objects.
We need , which first holds when (with 980 students each grade could occur just 49 times).
At least 981 students are required.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Define full binary tree. Prove that the number of vertices in a full binary tree is always odd.
Answer
Definition. A full binary tree is a rooted tree in which every internal vertex has exactly two children.
Proof. Let the tree have internal vertices. Each internal vertex has exactly 2 children, and every vertex except the root is the child of exactly one vertex. So the number of non-root vertices is , and
which is always odd.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2014 AD · 2 marks
Construct the BFS tree from graph given below choosing 'a' as root and find height of obtained tree. (Graph on vertices a-h is given in a figure in the original paper.)
Answer
BFS procedure from root .
- Put in a queue and mark it visited; it is level 0 of the tree.
- Remove the front vertex of the queue. Visit all its unvisited neighbours in alphabetical order, attach each to as a child (using the edge -neighbour), mark them visited and add them to the queue.
- Repeat step 2 until the queue is empty.
The tree edges are the edges that first discover each vertex, so vertices at level are exactly those at distance from . The height of the BFS tree is the number of edges on the longest root-to-leaf path, that is, the largest level reached (the distance from to the farthest vertex). Only edges discovering new vertices are kept; the remaining edges of the graph are left out of the tree.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Write the negation of the statement: "All birds can fly"
Answer
Negation of "All birds can fly": Some birds cannot fly (there exists a bird that cannot fly).
In symbols, .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Define Big-Oh notation.
Answer
Let and be functions from the integers (or reals) to the reals. We say is if there exist constants and such that
It gives an asymptotic upper bound on the growth of . Example: is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Find the recurrence relation of the sequence: 3, 7, 11, 15, ........
Answer
Each term is 4 more than the previous term (common difference 4), so
Its closed form is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
Is the function from set of integers to set of integers onto? Justify.
Answer
No, from to is not onto.
A function is onto if every element of the codomain has a preimage. Take (or ): there is no integer with (or ). The values of are only the perfect squares , so is not onto.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
When is a graph said to be Eulerian?
Answer
A graph is said to be Eulerian if it has an Euler circuit, that is, a closed trail that uses every edge exactly once.
A connected graph is Eulerian if and only if every vertex has even degree.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 1 mark
If a set 'A' has elements then, how many relations are there from to .
Answer
A relation from to is any subset of . Since , the number of subsets, and hence of relations, is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Define the terms tautology, contradiction and contingency with example
Answer
- Tautology: a compound proposition that is true for every assignment of truth values to its variables. Example: .
- Contradiction: a compound proposition that is false for every assignment. Example: .
- Contingency: a compound proposition that is neither a tautology nor a contradiction, so it is true for some assignments and false for others. Example: (or ).
Truth table for the examples:
| T | T | F |
| F | T | F |
For the contingency , the value is T only when both and are T, and F otherwise.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Define relatively prime numbers? Find gcd of 190 and 80, also express it in linear combination.
Answer
Definition. Two integers and are relatively prime (coprime) if , that is, they have no common positive divisor other than 1.
Euclidean algorithm for 190 and 80:
So (not relatively prime).
Linear combination (back substitution):
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Explain binary search algorithm and trace it to search an item 85 in the given list: 6, 25, 33, 43, 51, 53, 64, 72, 84, 93, 95, 96, 97
Answer
Binary search finds an item in a sorted list. Set low = 1, high = n. Repeat: let mid = floor((low+high)/2); if the item equals list[mid] stop; if it is smaller set high = mid-1, otherwise set low = mid+1; stop with "not found" when low > high. Each step halves the search range, so it takes comparisons.
Trace for 85 in positions 1 to 13: 6, 25, 33, 43, 51, 53, 64, 72, 84, 93, 95, 96, 97.
| Step | low | high | mid | list[mid] | Comparison |
|---|---|---|---|---|---|
| 1 | 1 | 13 | 7 | 64 | 85 > 64, so low = 8 |
| 2 | 8 | 13 | 10 | 93 | 85 < 93, so high = 9 |
| 3 | 8 | 9 | 8 | 72 | 85 > 72, so low = 9 |
| 4 | 9 | 9 | 9 | 84 | 85 > 84, so low = 10 |
Now low = 10 > high = 9, so the search ends: 85 is not in the list.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
State inclusion-exclusion principle. Find the number of bit string of length 9 begin with 00 and end with 1.
Answer
Inclusion-exclusion principle. For finite sets and ,
and for three sets .
Bit strings of length 9 beginning with 00 and ending with 1. Let be the strings beginning with 00 and those ending with 1. Then , , and the required number is . The first two bits and the last bit are fixed, leaving free bits:
(Using the formula, is consistent with .)
There are 64 such bit strings.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Define equivalence relation. Test the relation 'congruence modulo 3' on the set is equivalence or not.
Answer
An equivalence relation on a set is a relation that is reflexive, symmetric and transitive.
Test. Here , i.e. , on .
- Reflexive: is divisible by 3, so for every .
- Symmetric: if then , so .
- Transitive: if and then , so .
All three properties hold, so congruence modulo 3 is an equivalence relation on . Its classes are (remainder 2), (remainder 0) and (remainder 1), which partition .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Define isomorphic graph & isomorphism. Show that given graph in self complementary. (A pentagon on vertices a, b, c, d, e is given in a figure in the original paper.)
Answer
Isomorphic graphs. Two graphs and are isomorphic if there is a bijection such that are adjacent in if and only if are adjacent in . The bijection is called an isomorphism.
A graph is self-complementary if it is isomorphic to its complement .
Showing the pentagon is self-complementary. The graph is the cycle with edges . Its complement has the other edges:
which form the cycle (the pentagram).
Define . Then
and every image is an edge of . Since is a bijection and the edge counts are equal, . Hence the pentagon is self-complementary.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
What is spanning tree? Find the number of spanning tree from wheel graph .
Answer
A spanning tree of a connected graph is a subgraph that contains all vertices of and is a tree (connected, no cycles). It has edges when has vertices.
Wheel consists of a hub joined to the three vertices of a triangle, so it has 4 vertices and is the complete graph .
By Cayley's formula, the number of spanning trees of is , so
Check with the wheel formula : for this is .
So has 16 spanning trees.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 4 marks
Define tree. Prove that a tree with vertices has edges.
Answer
A tree is a connected graph with no cycles.
Theorem. A tree with vertices has edges.
Proof (induction on ). For the tree has 0 edges, which equals .
Assume every tree with vertices has edges, and let have vertices. A tree with at least two vertices has a pendant vertex (take an end of a longest path). Remove a pendant vertex and its single edge. The remaining graph is still connected and acyclic, so it is a tree with vertices, and by the hypothesis it has edges. Adding back the removed edge, has edges.
By induction, every tree with vertices has edges.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Using mathematical induction prove that
Answer
Let .
Basis. For : LHS , RHS . True.
Step. Assume : . Then
which is . By mathematical induction, holds for all .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Find the number of student in a class to ensure that at least 3 of them receive same grade among A, B, C, D and E.
Answer
By the generalised pigeonhole principle, if objects go into boxes, some box holds at least objects. Here grades and we need , which first happens when .
With 10 students, two per grade is possible, so 10 is not enough.
The class must have 11 students.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Prove that the sum of the binomial co-efficient is .
Answer
By the binomial theorem, .
Putting :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
If the function defined by then find .
Answer
Let . Then :
So . (Check: .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Prove that the total number of edges in a complete graph is
Answer
In the complete graph every vertex is adjacent to each of the other vertices, so every vertex has degree .
By the handshaking lemma, . Hence
Equivalently, each edge is a choice of 2 vertices from , giving .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Find the adjacency matrix and incidence matrix of the digraph given in the figure of the original paper (vertices a-e, edges ).
Answer
Adjacency matrix of a digraph with vertices is the matrix with
(a parallel edge from to would give the entry equal to the number of such edges). Reading the figure row by row, row lists the edges leaving vertex .
Incidence matrix is the matrix with columns and
(a loop is entered as or by convention). Each column of therefore contains exactly one (the tail of the edge) and one (the head), so every column sum is 0, and the sum of all entries in equals the number of edges, 8.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2016 AD · 2 marks
Explain BFS algorithm of graph traversal.
Answer
Breadth-first search (BFS) visits a graph level by level: first the start vertex, then all its neighbours, then their unvisited neighbours, and so on. It uses a queue (FIFO).
Algorithm
- Mark the start vertex as visited and enqueue it.
- While the queue is not empty: dequeue a vertex and process it; for every neighbour of that is not visited, mark it visited and enqueue it.
- Stop when the queue is empty.
Each vertex is enqueued once and each edge examined a constant number of times, so the time is with an adjacency list. BFS finds shortest paths (fewest edges) from in an unweighted graph and also gives a spanning tree.
Example. For edges starting at : queue , so the order is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
Show that condition statement is logically equivalent to its contra-positive.
Answer
Let the conditional statement be and its contrapositive .
| T | T | T | F | F | T |
| T | F | F | T | F | F |
| F | T | T | F | T | T |
| F | F | T | T | T | T |
The columns for and are identical, so .
Algebraically: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
Encrypt the message DISCRETE MATHEMATICS using Ceaser cipher.
Answer
The Caesar cipher with shift 3 replaces each letter by the one three places later: .
- DISCRETE: D→G, I→L, S→V, C→F, R→U, E→H, T→W, E→H, giving GLVFUHWH
- MATHEMATICS: M→P, A→D, T→W, H→K, E→H, M→P, A→D, T→W, I→L, C→F, S→V, giving PDWKHPDWLFV
Encrypted message: GLVFUHWH PDWKHPDWLFV
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
Find the first five terms of sequence defined by with
Answer
With and :
The first five terms are (that is, ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
Define floor function. For what values of ,
Answer
The floor function is the greatest integer less than or equal to .
exactly when .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
State and verify DIRAC'S theorem in graph theory.
Answer
Dirac's theorem. If is a simple graph with vertices in which every vertex has degree at least , then has a Hamiltonian cycle.
Proof. is connected: if were in different components, each component would have at least vertices (a vertex and its neighbours), giving more than vertices in total, a contradiction.
Let be a longest path. All neighbours of and of lie on (otherwise could be extended). Each of has at least neighbours among or , which are at most vertices. Consider the indices . At least of them have , and at least have . Since , these two sets overlap, so there is with and . Then
is a cycle through all vertices of . If , connectedness gives a vertex outside the cycle adjacent to a vertex on it, and this yields a path with vertices, contradicting the choice of . So and the cycle is Hamiltonian.
Verification. Take : and each degree is , and indeed is a Hamiltonian cycle. Similarly, has , degrees , and is itself a Hamiltonian cycle.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 1 mark
Define full binary tree with an example.
Answer
A full binary tree is a rooted tree in which every internal vertex has exactly two children (no vertex has exactly one child).
Example. Root has children and ; has children and ; is a leaf; and are leaves. Every internal vertex ( and ) has exactly two children, so this is a full binary tree with vertices, leaves, and where .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
Define universal quantifier and existential quantifier. Using direct proof, show that sum of two numbers is rational.
Answer
Universal quantifier. The statement ("for all , ") is true when is true for every in the domain.
Existential quantifier. The statement ("there exists such that ") is true when is true for at least one in the domain.
Direct proof that the sum of two rational numbers is rational. Let and be rational. Then and with integers and . Now
Since and are integers and , the sum is a ratio of integers, hence rational.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
What is big theta () notation? Is a function is big theta of ?
Answer
Big-Theta. if there exist positive constants and such that
So grows at the same rate as (it is both and ).
Check. For and , take :
- Lower bound: , since .
- Upper bound: and , so .
Thus for , with . Hence : yes.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
Define combination. In how many ways a committee consisting of 5 men and 4 women be formed from group of 9 women and 12 men?
Answer
A combination is a selection of objects from distinct objects in which the order does not matter. The number of such selections is
Committee. Choose 5 men from 12 and 4 women from 9:
There are 99,792 ways.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
Define equivalence relation. Let , , be three sets. is relation from to defined as and is relation from to defined as . Verify that if it exist.
Answer
An equivalence relation is a relation that is reflexive, symmetric and transitive.
Composition. .
Right side. and . Then (apply first):
- then gives
- then gives
- then gives
- then gives
Both sets contain the same six pairs, so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
Define invertible function. Given the mapping define by , prove that is invertible and find its inverse also.
Answer
A function is invertible if there is a function with and . This happens exactly when is one-to-one and onto (bijective).
For :
- One-to-one: if then , so .
- Onto: for any , put ; then .
So is a bijection and therefore invertible.
Inverse. Let ; then . Hence
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
What do you mean by Binomial theorem for position index ? Find the middle term(s) in the expansion of .
Answer
Binomial theorem (positive integer index). For any positive integer ,
with general term .
Middle terms of . Here is odd, so there are two middle terms, and . The general term is
For :
For :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 4 marks
How can we get represent graph in computer memory? Explain different graph representation techniques with example.
Answer
A graph must be stored as data structures in memory. The common techniques are the adjacency matrix, the adjacency list and the incidence matrix.
Take the example graph with vertices and edges .
1. Adjacency matrix. An matrix with if and are adjacent, else .
For an undirected graph it is symmetric. It needs space and tests adjacency in .
2. Adjacency list. For each vertex store the list of its neighbours:
, , , .
It needs space and is efficient for sparse graphs.
3. Incidence matrix. An matrix with if vertex is an end of edge , else .
Each column has exactly two 1s (for a graph without loops). For digraphs, the adjacency matrix is not symmetric and incidence entries use and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Construct the truth table for the proposition .
Answer
Let .
| T | T | T | T | T | T | T | T |
| T | T | F | T | F | F | F | T |
| T | F | T | F | T | F | T | T |
| T | F | F | F | T | F | F | T |
| F | T | T | T | T | T | T | T |
| F | T | F | T | F | F | T | T |
| F | F | T | T | T | T | T | T |
| F | F | F | T | T | T | T | T |
Every entry in the last column is T, so the proposition is a tautology (the law of hypothetical syllogism).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Find the minimum number of students in a class to ensure that 4 of them born in a same day of the week.
Answer
There are 7 days of the week (boxes). To guarantee that at least 4 students share a birth day, we need , which first holds for .
With 21 students, exactly 3 per day is possible, so 21 is not enough.
The minimum is 22 students.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Define self complementary graph with suitable diagram.
Answer
A simple graph is self-complementary if it is isomorphic to its complement (the graph on the same vertices in which two vertices are adjacent exactly when they are not adjacent in ). Such a graph has edges.
Example. The path : with edges . Its complement has edges , which form the path . The map is an isomorphism , so is self-complementary. The cycle is another example.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Construct an expression tree from the expression: and write its postfix.
Answer
The expression is .
Expression tree (operators are internal nodes, operands are leaves):
- Root:
- Left child: (power)
- Left: , with children and (whose children are and )
- Right:
- Right child:
- Left:
- Right: (whose children are and )
- Left child: (power)
Postfix (left subtree, right subtree, root):
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2017 AD · 2 marks
Prove that number of pendant vertices in a full binary tree with vertices is .
Answer
Let a full binary tree have vertices, of which are internal and are pendant (leaves), so .
Every internal vertex has exactly 2 children, and every vertex other than the root is the child of exactly one vertex. So the number of non-root vertices is
Therefore
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Determine whether the integers 21, 34 and 21, 45 are pair wise relatively prime?
Answer
Integers are pairwise relatively prime if every pair among them has greatest common divisor 1.
- 21 and 34: and have no common prime factor, so . They are relatively prime.
- 21 and 45: and , so . They are not relatively prime.
So the pair is relatively prime, but the integers are not; consequently the collection is not pairwise relatively prime either.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Is the function defined on set of integers is onto?
Answer
No. on is not onto, because the range contains only perfect squares . For example, (or ) has no integer with (or ), so the range is not all of .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Define -array relation?
Answer
An -ary relation on sets is a subset of the Cartesian product , i.e. a set of ordered -tuples with . A binary relation is the case .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
How many cables are required to form a complete mesh topology with 10 nodes?
Answer
In a complete mesh every pair of nodes needs its own cable, so the number is cables.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Define Hamiltonian graph with suitable example.
Answer
A Hamiltonian graph is a connected graph that has a Hamiltonian cycle, i.e. a cycle that passes through every vertex exactly once (and returns to the start).
Example: the complete graph with vertices has the Hamiltonian cycle , so it is Hamiltonian.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
Define Boolean matrix with an example.
Answer
A Boolean matrix (zero-one matrix) is a matrix whose entries are only 0 or 1.
Example: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
What can you say about a graph whose every edge is cut edges?
Answer
A graph in which every edge is a cut edge (bridge) contains no cycle, because an edge lying on a cycle is never a cut edge. Hence the graph is a forest; if it is connected, it is a tree.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 1 mark
In which order does the post order traversal visit the vertices in rooted tree?
Answer
Post-order traversal visits the left subtree first, then the right subtree (that is, all children from left to right), and the root last: Left, Right, Root. Every vertex is visited after all its descendants.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Define trivial proof and vacuous proof. Using direct proof show that difference of two rational numbers is rational.
Answer
Trivial proof: to prove , if is known to be true then is true whatever is.
Vacuous proof: to prove , if the hypothesis is false then is true automatically.
Direct proof that the difference of two rational numbers is rational.
Let and be rational. Then and with integers and , . Then
Here and are integers (integers are closed under multiplication and subtraction) and . Hence is a quotient of two integers with non-zero denominator, so it is rational.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
State Euclidean algorithm. Express the gcd(128, 325) as linear combination of these integers with integer coefficients.
Answer
Euclidean algorithm: for integers , write with . Then . Repeat until the remainder is 0; the last non-zero remainder is .
Finding :
So .
Back-substitution:
Hence
Check: , , difference .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Define equivalence relation. Test the relation defined on the set is equivalence relation or not.
Answer
Definition: a relation on a set is an equivalence relation if it is reflexive, symmetric and transitive.
Test of on :
- Reflexive: , so is reflexive.
- Symmetric: and ; and ; the pairs are trivially symmetric. So is symmetric.
- Transitive: checking all chains: ; ; ; ; ; ; ; . All required pairs are in , so is transitive.
Since is reflexive, symmetric and transitive, it is an equivalence relation. Its equivalence classes are and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
How can you relate domain, co-domain and range for onto and into function? If a function defined as then find and if exist.
Answer
Relation between domain, co-domain and range:
- For any function , is the domain, the co-domain, and the range .
- Onto (surjective) function: range co-domain, i.e. every element of has a pre-image.
- Into function: range is a proper subset of the co-domain, i.e. some element of has no pre-image.
Inverse values for , :
is one-to-one (strictly increasing) and onto , so exists. Solve : .
- : .
- : .
Both exist (they are real numbers).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Define permutation with repetition. Prove that
Answer
Permutation with repetition: the number of ordered arrangements of objects chosen from types when each type may be used any number of times is . More generally, the number of distinct arrangements of objects of which are alike is .
Proof of :
Take the common factor :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Define isomorphism of graphs. Test whether the following graphs are isomorphic or not. (Graphs on vertices and on vertices are given in a figure in the original paper.)
Answer
Definition: graphs and are isomorphic if there is a bijection such that are adjacent in if and only if are adjacent in (adjacency is preserved in both directions).
Testing for isomorphism (method):
- Compare the isomorphism invariants: number of vertices, number of edges, degree sequence, and the number and lengths of cycles. If any differ, the graphs are not isomorphic.
- If all agree, try to build a bijection by matching vertices of equal degree (and equal neighbourhood degrees), e.g. .
- Write the adjacency matrices of and with vertices ordered by the mapping; the graphs are isomorphic exactly when the two matrices are identical, i.e. every edge maps to an edge and the edge counts are equal.
If a matching bijection preserving all edges exists, the graphs are isomorphic; if a invariant fails (for instance a vertex of degree 3 in one graph with no counterpart in the other), they are not isomorphic.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 4 marks
Define source and sink vertex in directed graph. Explain adjacency matrix and incidence matrix representation of directed graph with example.
Answer
Source vertex: a vertex with in-degree 0 (only outgoing edges). Sink vertex: a vertex with out-degree 0 (only incoming edges).
Adjacency matrix of a directed graph with vertices is the matrix with if there is an edge from to , and otherwise.
Incidence matrix is the matrix ( edges) with if edge leaves , if enters , and otherwise.
Example: vertices and edges , , .
(rows are vertices ; columns are ). Vertex 1 is a source (in-degree 0) and vertex 3 is a sink (out-degree 0).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 2 marks
Express the statement "Every student in a class has studied C-programming" using quantifier.
Answer
Let be " has studied C-programming", with the domain of being the students in the class. Then the statement is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 2 marks
Show that a function is big-oh of
Answer
is if there are constants with for all .
For : and , so
Thus with and , for all . Hence is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2018 AD · 2 marks
Find and if: , .
Answer
Join () takes the entrywise OR, meet () takes the entrywise AND.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Find the negation of the statement "All students have passed the exam".
Answer
With : " has passed the exam", the statement is , whose negation is :
"There is at least one student who has not passed the exam."
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Find the value of .
Answer
We need with . Taking : , so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
What do you mean by Boolean matrix? Give example.
Answer
A Boolean (zero-one) matrix is a matrix all of whose entries are 0 or 1. It is used, for example, to represent relations and graphs, with operations (OR), (AND) and Boolean product.
Example: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Under what condition ?
Answer
exactly when is not an integer. If is an integer both are equal to and the difference is 0; otherwise the ceiling is the next integer above the floor.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
Determine the type of the function
Answer
For with : it is not one-to-one since , and it is not onto since negative numbers have no pre-image (the range is ). So it is a many-to-one, into function (a polynomial/quadratic function).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
What does means?
Answer
means that grows no faster than a constant multiple of : there exist constants and such that for all . It describes quadratic upper-bound (time) complexity of an algorithm.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
When is a directed graph said to be strongly connected?
Answer
A directed graph is strongly connected if for every ordered pair of vertices there is a directed path from to (and hence also from to ), i.e. every vertex is reachable from every other vertex following edge directions.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 1 mark
How many possible lowercase words of 4 letter are there, that doesn't contain 'X' in them?
Answer
Each position can be any of the 25 lowercase letters other than 'x', so the number is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
All stupid persons are over smart. Children of over smart persons are naughty, Ram is children of Hari. Hari is stupid. Is Ram naughty?
Answer
Let the domain be persons. Define : is stupid; : is over smart; : is a child of ; : is naughty.
Premises:
Proof:
- From 1 by universal instantiation: .
- With 4 by modus ponens: .
- From 2 by instantiation: .
- From 3 and by conjunction: .
- By modus ponens: .
Hence yes, Ram is naughty.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Prove that if the product of two positive integer and is even then either is even or is even.
Answer
Claim: if are positive integers and is even, then is even or is even.
Proof by contraposition. Suppose neither is even, i.e. both are odd: and for integers . Then
which is odd. Thus if and are both odd, is odd. By contraposition, if is even then is even or is even.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Solve the recurrence relation with initial conditions , and .
Answer
The characteristic equation of is
The roots are distinct, so
Initial conditions:
- : .
- : .
Therefore
(the Fibonacci numbers ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Find the maximal element, minimal element, greatest element and least element from the poset . Here the relation is divisibility.
Answer
Poset . Relations: ; ; ; .
- Maximal elements: elements that divide no other element: and .
- Minimal elements: elements not divisible by any other element: and .
- Greatest element: none, since neither nor is divisible by all the elements (e.g. is not a multiple of ).
- Least element: none, since neither nor divides all the elements.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Define isomorphic graph and self complementary graph. List the necessary invariants for isomorphic graphs.
Answer
Isomorphic graphs: two graphs and are isomorphic if there is a one-to-one correspondence between their vertex sets that preserves adjacency, i.e. is an edge of if and only if is an edge of .
Self-complementary graph: a graph that is isomorphic to its complement (the graph on the same vertices with exactly the edges missing from ). Examples: the path and the cycle . It must have edges, so or .
Invariants that isomorphic graphs must share:
- the same number of vertices;
- the same number of edges;
- the same degree sequence;
- the same number of components (and connectedness);
- the same number of cycles of each length (circuits of the same lengths);
- the same number of vertices of each degree, with adjacent vertices having matching degrees;
- the same adjacency-matrix structure under a suitable relabelling of vertices.
If any invariant differs, the graphs are not isomorphic; if all agree, this alone does not prove isomorphism and a mapping must be exhibited.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 4 marks
Define spanning tree. How many spanning tree are possible from wheel graph ? Find using Kirchhoff's theorem.
Answer
A spanning tree of a connected graph is a subgraph that contains every vertex of and is a tree (connected and without cycles). A spanning tree of a graph with vertices has exactly edges.
Kirchhoff's (Matrix-Tree) theorem: the number of spanning trees of equals any cofactor of its Laplacian matrix (degree matrix minus adjacency matrix).
Wheel : one hub joined to the 3 vertices of a triangle, i.e. 4 vertices (this is ). Each rim vertex has degree 3 and the hub has degree 3. Order the vertices :
Delete the row and column of :
Hence has 16 spanning trees (agreeing with Cayley's formula ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
Check whether the statements "Good food are not expensive" and "cheap food are not good" are logically equivalent or not.
Answer
Let : " is good food", : " is expensive". "Cheap" means "not expensive".
- Statement 1, "Good food are not expensive": , equivalent to .
- Statement 2, "Cheap food are not good": , equivalent to .
Statement 1 says good food is cheap, whereas statement 2 says good food is expensive. Take an item that is good and cheap: statement 1 holds for it but statement 2 fails.
Hence the two statements are not logically equivalent.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
How many numbers need to be selected from the set to ensure that at least one pair add up to 7?
Answer
Partition into the pairs that sum to 7: (3 boxes). Choosing 3 numbers, one from each pair, gives no pair summing to 7, but by the pigeonhole principle any 4th number must fall in a box already used and completes a pair.
Hence 4 numbers must be selected.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
Prove that sum of binomial coefficients in the expansion of is
Answer
By the binomial theorem
The binomial coefficients are . To find their sum, expand :
Hence .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
What is tree traversal? Explain pre order traversal with example.
Answer
Tree traversal is the process of visiting every vertex of a rooted tree exactly once in a systematic order.
Pre-order traversal (root, left, right): visit the root, then traverse the left subtree in pre-order, then the right subtree in pre-order.
Example: for the binary tree with root , children (left) and (right), where has children and has child (left):
Pre-order: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
Show that order and size of complete bipartite graph is and respectively.
Answer
In the vertex set is split into two parts with and .
Order (number of vertices) .
Size (number of edges): every vertex of is joined to every vertex of and there are no other edges. Each of the vertices of contributes edges, so the number of edges is . (Check: the degree sum is , which equals size.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2019 AD · 2 marks
How many rearrangements of the letters of the word "SCINTILLATING" will no two I's appear together?
Answer
SCINTILLATING has 13 letters: I(2), N(2), T(2), L(2), and S, C, A, G once each.
Total arrangements:
Arrangements with the two I's together (treat "II" as one block, giving 12 objects with N, T, L repeated twice):
Arrangements with no two I's together:
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Is tautology or contradiction?
Answer
is a tautology: it is true for both truth values of (law of excluded middle).
| T | F | T |
| F | T | T |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Find the negation of "All Students of BIM second semester have passed the exam".
Answer
Negation: "There is at least one student of BIM second semester who has not passed the exam."
(Symbolically .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Give an example of partial order relation.
Answer
The relation on the set of integers is a partial order: it is reflexive (), antisymmetric ( and ) and transitive. Another example is set inclusion on the power set of a set.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
For what values of , ?
Answer
holds exactly when is not an integer. For an integer both equal ; for a non-integer the ceiling is the next integer above the floor.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Differentiate between tree and graph.
Answer
| Tree | Graph |
|---|---|
| A connected graph with no cycles. | A set of vertices joined by edges; may have cycles, loops, parallel edges. |
| Always connected. | May be connected or disconnected. |
| Exactly one path between any two vertices. | May have several paths or none. |
| Has exactly edges for vertices. | Number of edges can be anything up to its maximum. |
| Every tree is a graph. | Not every graph is a tree. |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Find the order and size of complete bipartite graph ?
Answer
For :
Order vertices; size edges.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
List the necessary and sufficient condition for a graph to have an Euler circuit.
Answer
A graph has an Euler circuit if and only if it is connected (apart from isolated vertices) and every vertex has even degree.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
Define a degree of a vertex in case for directed graph.
Answer
In a directed graph, the in-degree is the number of edges ending at , and the out-degree is the number of edges starting at . The degree of is (a loop adds 1 to each). Also number of edges.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 1 mark
In how many ways can you express a word of 5 letter that do not contain the consecutive vowels.
Answer
Take the 26 English letters: 5 vowels and 21 consonants, with letters allowed to repeat. Count by the number of vowels, placing vowels in non-adjacent positions of the 5 places (number of position choices ):
| position choices | words | |
|---|---|---|
| 0 | 1 | |
| 1 | 5 | |
| 2 | 6 | |
| 3 | 1 |
Total words.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
Define universal quantifier and existential quantifier. Using mathematical induction, show that is divisible by 3 for all .
Answer
Universal quantifier : means " is true for every in the domain".
Existential quantifier : means "there is at least one in the domain for which is true".
Claim: is divisible by 3 for all .
Basis: : , divisible by 3.
Inductive step: assume for some integer . Then
which is divisible by 3. By mathematical induction, is divisible by 3 for all .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
Explain bubble sort algorithm and trace it to sort the list 10, 8, 13, 7, 11.
Answer
Bubble sort repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. After each pass the largest remaining element "bubbles" to its final position at the end. The process stops when a pass makes no swaps.
for i = 1 to n-1
for j = 1 to n-i
if a[j] > a[j+1] then swap a[j], a[j+1]
Trace for 10, 8, 13, 7, 11:
Pass 1: compare 10,8 swap giving 8,10,13,7,11; 10,13 no swap; 13,7 swap giving 8,10,7,13,11; 13,11 swap giving 8, 10, 7, 11, 13.
Pass 2: 8,10 no swap; 10,7 swap giving 8,7,10,11,13; 10,11 no swap; result 8, 7, 10, 11, 13.
Pass 3: 8,7 swap giving 7, 8, 10, 11, 13; other comparisons need no swap.
Pass 4: no swaps, so the list is sorted: 7, 8, 10, 11, 13.
Worst-case time complexity is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
What do you mean by equivalence relation? Find the relation congruence modulo 5 defined on the set . And prove that it is equivalence.
Answer
A relation on a set is an equivalence relation if it is reflexive, symmetric and transitive.
Congruence modulo 5 on : iff . The related pairs are
Proof that it is an equivalence relation:
- Reflexive: is divisible by 5, so for every .
- Symmetric: if then , so .
- Transitive: if and then , so .
Hence is an equivalence relation, with classes .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
Let and be two functions defined as and respectively. Prove that
Answer
First compute the two composites:
Both composites are quadratics, so they are not one-to-one on (for example ). A function that is not one-to-one has no inverse, so and do not exist as functions on . Moreover (e.g. at : versus ), so the stated equality cannot be proved for these functions.
What is true in general, for invertible and , is the reversal rule
proved by checking , and similarly in the other order. Here is invertible with , but is not (it is even), so the rule cannot be applied to this particular .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
Define MST. What types of graphs are considered as isomorphic graphs?
Answer
Minimum spanning tree (MST): for a connected weighted graph, an MST is a spanning tree whose total edge weight is the smallest among all spanning trees. It can be found by Kruskal's or Prim's algorithm.
Isomorphic graphs: two graphs and are isomorphic if there is a one-to-one, onto function such that are adjacent in iff are adjacent in . They are really the same graph drawn differently. Necessary conditions are:
- the same number of vertices;
- the same number of edges;
- the same degree sequence;
- the same number of cycles of each length and the same connectivity.
These conditions are necessary but not sufficient, so an explicit adjacency-preserving mapping is needed to confirm isomorphism.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 4 marks
What do you mean by graph traversal? Traverse the graph given below using DFS method. (Graph on vertices a-l is given in a figure in the original paper.)
Answer
Graph traversal means visiting every vertex of a graph exactly once in a systematic way. The two standard methods are depth-first search (DFS) and breadth-first search (BFS).
DFS algorithm: start at a chosen vertex, mark it visited, then repeatedly move to an unvisited neighbour (taking the smallest label first), going as deep as possible. When no unvisited neighbour remains, backtrack (using a stack or recursion) to the most recent vertex that still has an unvisited neighbour. Stop when the stack is empty.
DFS(v): mark v visited; for each neighbour w of v (in order): if w not visited: DFS(w)
Illustration: for edges , starting from : visit , then , then ; backtrack to and visit ; backtrack to and visit , then .
DFS order: . Applying the same procedure to the given graph from vertex (alphabetical order of neighbours) gives its DFS traversal.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
Express the statement "All pilots are male" in to logical expression using quantifier.
Answer
Let : " is a pilot" and : " is male". Then
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
Define Eulerian circuit with example?
Answer
An Eulerian circuit in a graph is a closed walk that uses every edge of the graph exactly once (it starts and ends at the same vertex). A connected graph has one iff every vertex has even degree.
Example: the triangle with vertices : the circuit uses each of the three edges exactly once, and every vertex has degree 2 (even). Similarly the cycle has an Eulerian circuit.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
Given the recurrence relation with , Find and .
Answer
With , , :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 AD · 2 marks
Find and if: and .
Answer
For Boolean matrices, join takes entrywise OR and meet takes entrywise AND.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
What does it mean for two propositions to be logically equivalent?
Answer
Two propositions and are logically equivalent, written , if they have the same truth value in every possible case, that is, is a tautology. For example, .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
Convert "If an integer is not even, then it is odd" into equivalent logical expression.
Answer
Let : "the integer is even" and : "the integer is odd". The statement is
Since , it also says that the integer is even or odd.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
Find the seventh term of .
Answer
The general term of is . For the seventh term, , and :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
What do you mean by recursive algorithm.
Answer
A recursive algorithm is one that solves a problem by reducing it to smaller instances of the same problem, and that calls itself on those instances. It needs a base case (which stops the recursion) and a recursive step that moves toward the base case. Example: with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
State sum rule and product rule of counting.
Answer
Sum rule. If a task can be done in one of ways or in one of ways, and the two sets of ways are disjoint, then the task can be done in ways.
Product rule. If a procedure consists of two tasks done in sequence, the first in ways and the second in ways for each way of the first, then the procedure can be done in ways.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
How permutation differ from combination.
Answer
A permutation counts arrangements in which order matters, . A combination counts selections in which order does not matter, . Hence . For example, selecting 2 of gives 6 permutations but only 3 combinations.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
Define wheel graph with example.
Answer
The wheel graph is formed from the cycle graph by adding one extra vertex (the hub) that is joined to all vertices of the cycle. It has vertices and edges.
Example: has a 4-cycle and a hub joined to each , giving 5 vertices and 8 edges.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
What is game tree?
Answer
A game tree is a rooted tree that represents all possible moves of a game. The root is the starting position, each vertex is a position, and each edge is a move by a player. Levels alternate between the two players, and the leaves are the end positions (win, lose or draw). It is used to find the best strategy, for example with the minimax algorithm in tic-tac-toe or chess.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
Define degree of tree with example.
Answer
The degree of a vertex is the number of edges incident to it. The degree of a tree is the maximum degree of any of its vertices. (In a rooted tree it is often the maximum number of children of a vertex.)
Example: in a tree with edges , the vertex has degree 3, has degree 2, and have degree 1, so the degree of the tree is 3.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 1 mark
List out any three applications of graph.
Answer
Three applications of graphs:
- Computer and communication networks, where vertices are computers and edges are links.
- Road and transport maps, where graphs are used for shortest-path problems (GPS navigation, Dijkstra's algorithm).
- Social networks, where vertices are people and edges are friendships.
Others include scheduling, circuit design and web page links.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 3 marks
Show that if is an integer and is odd, then is even using a proof by contraposition.
Answer
We must show , where : " is odd" and : " is even". By contraposition we prove : if is odd, then is even.
Let be odd, so for some integer . Then
which is times an integer, so is even. This proves the contrapositive, and hence the original statement: if is odd, then is even.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 3 marks
State the pigeon hole principle. How many numbers must be selected from the set to guarantee that at least one pair of these numbers add up to 16?
Answer
Pigeonhole principle. If or more objects (pigeons) are placed in boxes (pigeonholes), then at least one box contains two or more objects. More generally, objects in boxes put at least objects in some box.
Numbers summing to 16. Partition the set into pairs that add up to 16:
These are 4 boxes. If we select 4 numbers, we can take one from each pair (for example 1, 3, 5, 7) and no two add to 16. If we select 5 numbers, two of them must come from the same pair, and those two add up to 16.
Therefore 5 numbers must be selected to guarantee a pair with sum 16.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 3 marks
Write a Euclidean algorithm to compute GCD of any two positive integers.
Answer
The Euclidean algorithm uses and .
procedure gcd(a, b: positive integers)
x := a
y := b
while y != 0
begin
r := x mod y
x := y
y := r
end
return x { x is gcd(a, b) }
Example. : , , . So the gcd is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 3 marks
Explain simple, multi and pseudo graph with example.
Answer
Simple graph. An undirected graph with no loops and no multiple edges between any pair of vertices. Example: a triangle on vertices with edges .
Multigraph. An undirected graph that may have multiple (parallel) edges between the same pair of vertices, but no loops. Example: vertices joined by two edges , and joined by one edge.
Pseudograph. A graph that may have both multiple edges and loops (an edge joining a vertex to itself). Example: vertex with a loop, plus two parallel edges between and .
Every simple graph is a multigraph, and every multigraph is a pseudograph.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 3 marks
Define binary search tree. Construct the binary search tree of: 8,3,1,10,6,14,7.
Answer
A binary search tree (BST) is a binary tree in which each vertex holds a key such that all keys in its left subtree are smaller, and all keys in its right subtree are larger, than its own key.
Construction (insert 8, 3, 1, 10, 6, 14, 7 in order):
- 8 becomes the root.
- 3 < 8, so it goes to the left of 8.
- 1 < 8 and < 3, so it goes to the left of 3.
- 10 > 8, so it goes to the right of 8.
- 6 < 8, > 3, so it goes to the right of 3.
- 14 > 8 and > 10, so it goes to the right of 10.
- 7 < 8, > 3, > 6, so it goes to the right of 6.
8
/ \
3 10
/ \ \
1 6 14
\
7
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 5 marks
Show that the hypotheses "If you send me an e-mail message, then I will finish writing the program," "If you do not send me an e-mail message, then I will go to sleep early," and "If I go to sleep early, then I will wake up feeling refreshed" lead to the conclusion "If I do not finish writing the program, then I will wake up feeling refreshed."
Answer
Let : "you send me an e-mail message", : "I will finish writing the program", : "I will go to sleep early", : "I will wake up feeling refreshed".
Hypotheses: , , . Conclusion: .
| Step | Statement | Reason |
|---|---|---|
| 1 | Hypothesis | |
| 2 | Contrapositive of step 1 | |
| 3 | Hypothesis | |
| 4 | Hypothetical syllogism (2, 3) | |
| 5 | Hypothesis | |
| 6 | Hypothetical syllogism (4, 5) |
So "If I do not finish writing the program, then I will wake up feeling refreshed." follows from the hypotheses.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 5 marks
State Chinese remainder theorem. Find all solution to the system of congruences.
, ,
Answer
Chinese remainder theorem. Let be pairwise relatively prime positive integers. Then the system , , has a unique solution modulo .
Solution. The moduli 3, 4, 5 are pairwise coprime, and .
, , .
Find the inverses of modulo :
- : , and , so .
- : , and , so .
- : , and , so .
Check: , , .
All solutions are , that is, for integer .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 5 marks
Determine whether the following graphs are isomorphic or not. (Two graphs are given in a figure in the original paper: one on vertices 1-6, one on vertices a-f.)
Answer
Two simple graphs and are isomorphic if there is a one-to-one, onto function such that are adjacent in if and only if are adjacent in .
Method used to decide (the figure is not reproduced here, so the test is given in general form):
- Compare the number of vertices (6 in each graph) and the number of edges. If they differ, the graphs are not isomorphic.
- Compare the degree sequences (sorted lists of vertex degrees). If they differ, the graphs are not isomorphic.
- Compare other invariants: the number of vertices of each degree, the presence of cycles of the same lengths (such as triangles), and whether adjacent vertices have matching degrees.
- If all invariants agree, try to build a mapping from the vertices to onto to that matches degrees and preserves adjacency. Then check that every edge of maps to an edge of , and that the edge counts are equal.
If such a mapping preserves all adjacencies, the graphs are isomorphic. If some invariant differs (for example, one graph has a triangle and the other does not, or the degree sequences differ), they are not isomorphic.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 5 marks
What is minimum spanning tree? Find the minimum spanning tree for the following graph by using Kruskal's algorithm. (A weighted graph on five vertices is given in a figure in the original paper.)
Answer
A spanning tree of a connected graph is a subgraph that contains all vertices of and is a tree (connected, no cycles, edges for vertices). In a weighted graph, a minimum spanning tree (MST) is the spanning tree whose total edge weight is the smallest.
Kruskal's algorithm
- Sort all edges in non-decreasing order of weight.
- Start with an empty edge set .
- Take the next edge in order; add it to if it does not form a cycle with edges already in , otherwise discard it.
- Stop when has edges.
Illustration (graph with vertices and edges , , , , , , )
| Edge | Weight | Decision |
|---|---|---|
| BC | 1 | accept |
| AB | 2 | accept |
| AC | 3 | reject (cycle A-B-C) |
| BD | 4 | accept |
| CD | 5 | reject (cycle B-C-D) |
| CE | 6 | accept (4 edges now) |
| DE | 7 | not needed |
MST edges: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 10 marks
Define linear homogeneous and non-homogeneous recurrence relation with constant coefficients with example. Solve the recurrence relation for , with , and .
Answer
Linear homogeneous recurrence relation with constant coefficients (degree ):
Example: .
Non-homogeneous: the relation has an extra term that is not a multiple of earlier terms:
Example: .
Solution of ,
Characteristic equation:
is a root (), so , giving .
General solution:
Using the initial conditions:
- :
- :
- :
Subtracting the first from the second gives ; subtracting the second from the third gives , i.e. . So and , hence , , .
Check: , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 AD Model · 10 marks
What do you mean by shortest path problem? Write Dijkstra's algorithm to find the shortest path. Apply this algorithm to find the shortest path between a to every other vertex for the following graph. (A weighted graph on vertices a-f is given in a figure in the original paper.)
Answer
The shortest path problem asks for a path between two vertices of a weighted graph such that the sum of the edge weights along it is minimum.
Dijkstra's algorithm (non-negative weights, source )
- Set and for every other vertex; mark all vertices unvisited.
- Choose the unvisited vertex with the smallest and mark it visited.
- For each unvisited neighbour of : if , set and record as the predecessor of .
- Repeat steps 2-3 until all vertices are visited (or the target is visited).
Illustration (edges , , , , , , , , ; source )
| Step | Visited | |||||
|---|---|---|---|---|---|---|
| start | a | 4 | 2 | |||
| 1 | c (2) | 3 | - | 10 | 12 | |
| 2 | b (3) | - | - | 8 | 12 | |
| 3 | d (8) | - | - | - | 10 | 14 |
| 4 | e (10) | - | - | - | - | 13 |
| 5 | f (13) | - | - | - | - | - |
Shortest distances from : (a-c), (a-c-b), (a-c-b-d), (a-c-b-d-e), (a-c-b-d-e-f).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BIM Business Communication (MGT 204) 2001 AD (Board exam paper, 2001 AD), TU BIM Business Communication (MGT 204) 2002 AD (Board exam paper, 2002 AD), TU BIM Business Communication (MGT 204) 2003 AD (Board exam paper, 2003 AD), TU BIM Business Communication (MGT 204) 2005 AD (Board exam paper, 2005 AD), TU BIM Business Communication (MGT 204) 2007 AD (Board exam paper, 2007 AD), TU BIM Business Communication (MGT 204) 2008 AD (Board exam paper, 2008 AD), TU BIM Business Communication (MGT 204) 2009 AD (Board exam paper, 2009 AD), TU BIM Business Communication (MGT 204) 2010 AD (Board exam paper, 2010 AD), TU BIM Business Communication (MGT 204) 2011 AD (Board exam paper, 2011 AD), TU BIM Business Communication (MGT 204) 2012 AD (Board exam paper, 2012 AD), TU BIM Business Communication (MGT 204) 2013 AD (Board exam paper, 2013 AD), TU BIM Business Communication (MGT 204) 2014 AD (Board exam paper, 2014 AD), TU BIM Business Communication (MGT 204) 2015 AD (Board exam paper, 2015 AD), TU BIM Business Communication (MGT 204) 2016 AD (Board exam paper, 2016 AD), TU BIM Business Communication (MGT 204) 2017 AD (Board exam paper, 2017 AD), TU BIM Business Communication (MGT 204) 2018 AD (Board exam paper, 2018 AD), TU BIM Business Communication (MGT 204) 2019 AD (Board exam paper, 2019 AD), TU BIM Business Communication (MGT 204) 2021 AD (Board exam paper, 2021 AD), TU BIM Discrete Mathematics (MTH 202) 2005 AD (Board exam paper, 2005 AD), TU BIM Discrete Mathematics (MTH 202) 2007 AD (Board exam paper, 2007 AD), TU BIM Discrete Mathematics (MTH 202) 2008 AD (Board exam paper, 2008 AD), TU BIM Discrete Mathematics (MTH 202) 2009 AD (Board exam paper, 2009 AD), TU BIM Discrete Mathematics (MTH 202) 2010 AD (Board exam paper, 2010 AD), TU BIM Discrete Mathematics (MTH 202) 2011 AD (Board exam paper, 2011 AD), TU BIM Discrete Mathematics (MTH 202) 2012 AD (Board exam paper, 2012 AD), TU BIM Discrete Mathematics (MTH 202) 2013 AD (Board exam paper, 2013 AD), TU BIM Discrete Mathematics (MTH 202) 2014 AD (Board exam paper, 2014 AD), TU BIM Discrete Mathematics (MTH 202) 2016 AD (Board exam paper, 2016 AD), TU BIM Discrete Mathematics (MTH 202) 2017 AD (Board exam paper, 2017 AD), TU BIM Discrete Mathematics (MTH 202) 2018 AD (Board exam paper, 2018 AD), TU BIM Discrete Mathematics (MTH 202) 2019 AD (Board exam paper, 2019 AD), TU BIM Discrete Mathematics (MTH 202) 2021 AD (Board exam paper, 2021 AD), TU BIM Data Communication and Computer Network (ITC 214) 2001 AD (Board exam paper, 2001 AD), TU BIM Data Communication and Computer Network (ITC 214) 2002 AD (Board exam paper, 2002 AD), TU BIM Data Communication and Computer Network (ITC 214) 2004 AD (Board exam paper, 2004 AD), TU BIM Data Communication and Computer Network (ITC 214) 2005 AD (Board exam paper, 2005 AD), TU BIM Data Communication and Computer Network (ITC 214) 2009 AD (Board exam paper, 2009 AD), TU BIM Data Communication and Computer Network (ITC 214) 2010 AD (Board exam paper, 2010 AD), TU BIM Data Communication and Computer Network (ITC 214) 2011 AD (Board exam paper, 2011 AD), TU BIM Data Communication and Computer Network (ITC 214) 2012 AD (Board exam paper, 2012 AD), TU BIM Data Communication and Computer Network (ITC 214) 2013 AD (Board exam paper, 2013 AD), TU BIM Data Communication and Computer Network (ITC 214) 2014 AD (Board exam paper, 2014 AD), TU BIM Data Communication and Computer Network (ITC 214) 2015 AD (Board exam paper, 2015 AD), TU BIM Data Communication and Computer Network (ITC 214) 2016 AD (Board exam paper, 2016 AD), TU BIM Data Communication and Computer Network (ITC 214) 2017 AD (Board exam paper, 2017 AD), TU BIM Data Communication and Computer Network (ITC 214) 2018 AD (Board exam paper, 2018 AD), TU BIM Data Communication and Computer Network (ITC 214) 2019 AD (Board exam paper, 2019 AD), TU BIM Data Communication and Computer Network (ITC 214) 2021 AD (Board exam paper, 2021 AD), TU BIM Sociology for Business (SOC 201) 2001 AD (Board exam paper, 2001 AD), TU BIM Sociology for Business (SOC 201) 2002 AD (Board exam paper, 2002 AD), TU BIM Sociology for Business (SOC 201) 2003 AD (Board exam paper, 2003 AD), TU BIM Sociology for Business (SOC 201) 2005 AD (Board exam paper, 2005 AD), TU BIM Sociology for Business (SOC 201) 2008 AD (Board exam paper, 2008 AD), TU BIM Sociology for Business (SOC 201) 2009 AD (Board exam paper, 2009 AD), TU BIM Sociology for Business (SOC 201) 2011 AD (Board exam paper, 2011 AD), TU BIM Sociology for Business (SOC 201) 2012 AD (Board exam paper, 2012 AD), TU BIM Sociology for Business (SOC 201) 2013 AD (Board exam paper, 2013 AD), TU BIM Sociology for Business (SOC 201) 2014 AD (Board exam paper, 2014 AD), TU BIM Sociology for Business (SOC 201) 2015 AD (Board exam paper, 2015 AD), TU BIM Structured Programming (ITC 213) 2001 AD (Board exam paper, 2001 AD), TU BIM Structured Programming (ITC 213) 2002 AD (Board exam paper, 2002 AD), TU BIM Structured Programming (ITC 213) 2004 AD (Board exam paper, 2004 AD), TU BIM Structured Programming (ITC 213) 2007 AD (Board exam paper, 2007 AD), TU BIM Structured Programming (ITC 213) 2008 AD (Board exam paper, 2008 AD), TU BIM Structured Programming (ITC 213) 2009 AD (Board exam paper, 2009 AD), TU BIM Structured Programming (ITC 213) 2010 AD (Board exam paper, 2010 AD), TU BIM Structured Programming (ITC 213) 2012 AD (Board exam paper, 2012 AD), TU BIM Structured Programming (ITC 213) 2002 AD (Objective question paper, 2002 (20 MCQs, 0.5 marks each, full marks 10)), TU BIM Structured Programming (ITC 213) 2003 AD (Objective question paper, 2003 (20 MCQs, 0.5 marks each, full marks 10); item 10 as printed in the scan), TU BIM Structured Programming (ITC 213) 2013 AD (Board exam paper, 2013 (the scan of this paper ends after question 5)), TU BIM Structured Programming (ITC 213) 2014 AD (Board exam paper, 2014 AD), TU BIM Structured Programming (ITC 213) 2015 AD (Board exam paper, 2015 (the line "if( (m 2 ) == 0" is printed with a modulus sign that is illegible in the scan; read as m % 2)), TU BIM Structured Programming (ITC 213) 2016 AD (Board exam paper, 2016 (the first figure in question 2 is transcribed as printed)), TU BIM Structured Programming (ITC 213) 2017 AD (Board exam paper, August-September 2017), TU BIM Structured Programming (ITC 213) 2018 AD (Board exam paper, September-October 2018), TU BIM Structured Programming (ITC 213) 2021 Aug (Board exam paper, August 2021) and TU BIM Second Semester Model Questions 2022/23 (IT 232, IT 233, IT 235, IT 234, MGT 241) (Faculty of Management model question set, BIM second semester (new course), via EducateNepal). Answers are written for this site; check them against your class notes.