BSc CSIT (TU) Science Discrete Structure (BSc CSIT, CSC160) Question Paper 2078 Nepal
This is the official BSc CSIT (TU) (Science stream) Discrete Structure (BSc CSIT, CSC160) question paper for 2078, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Discrete Structure (BSc CSIT, CSC160) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) exam or solving previous years' question papers, this 2078 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Define logical equivalence. Using laws of logic (without truth table), show that (\neg(p \lor (\neg p \land q))) is logically equivalent to (\neg p \land \neg q).
Logical Equivalence
Two compound propositions and are said to be logically equivalent if they have the same truth value for every possible assignment of truth values to their component propositions. Equivalently, and are logically equivalent if and only if the biconditional is a tautology. We write .
Proof using Laws of Logic
We show .
Hence . Q.E.D.
What is a function? Explain one-to-one, onto and bijective functions with examples. When does the inverse of a function exist? Find the inverse of (f(x) = 2x + 3).
Function
A function from a set (the domain) to a set (the codomain), written , is a rule that assigns to each element exactly one element .
Types of Functions
One-to-one (Injective)
A function is one-to-one if distinct elements of map to distinct elements of :
Example: is injective, since .
Onto (Surjective)
A function is onto if every element of is the image of at least one element of : for all there exists with . Example: is surjective (every real has a real cube root).
Bijective
A function is bijective if it is both one-to-one and onto. Then each element of corresponds to exactly one element of . Example: is bijective.
Existence of the Inverse
The inverse function exists if and only if is bijective (one-to-one and onto). It is defined by .
Inverse of
Let . Solving for :
Interchanging variables, the inverse is
Check:
Explain Dijkstra's algorithm for finding the shortest path in a weighted graph. Apply it to find the shortest path from a source vertex to all other vertices in a given example graph.
Dijkstra's Algorithm
Dijkstra's algorithm finds the shortest (least-weight) path from a single source vertex to all other vertices in a weighted graph with non-negative edge weights. It maintains a set of vertices whose shortest distance from the source is finalized, and greedily adds the closest unprocessed vertex at each step.
Algorithm
Dijkstra(G, w, source):
for each vertex v in G:
dist[v] = infinity
prev[v] = NULL
dist[source] = 0
Q = set of all vertices // priority queue keyed by dist
while Q is not empty:
u = vertex in Q with minimum dist[u]
remove u from Q
for each neighbor v of u still in Q:
alt = dist[u] + w(u, v)
if alt < dist[v]: // relaxation
dist[v] = alt
prev[v] = u
return dist, prev
Time complexity: with an array, or with a binary heap.
Worked Example
Consider the weighted graph with source and edges:
| Step | Chosen | dist A | dist B | dist C | dist D | dist E |
|---|---|---|---|---|---|---|
| Init | — | 0 | ||||
| 1 | A | 0 | 4 | 1 | ||
| 2 | C | 0 | 3 | 1 | 6 | |
| 3 | B | 0 | 3 | 1 | 4 | 10 |
| 4 | D | 0 | 3 | 1 | 4 | 7 |
| 5 | E | 0 | 3 | 1 | 4 | 7 |
Final shortest distances from
Following prev pointers, the shortest paths are: , , , .
Section B: Short Answer Questions
Attempt any EIGHT questions.
Define quantifiers with examples.
Quantifiers turn a predicate (open statement) into a proposition by specifying the extent over which the predicate variable ranges.
-
Universal quantifier ("for all"): is true when holds for every in the domain. Example: — "every real number has a non-negative square" (true).
-
Existential quantifier ("there exists"): is true when holds for at least one in the domain. Example: — "there is an integer satisfying " (true, ).
Negation interchanges them: and .
What is a recursive function? Give an example.
A recursive function is a function that is defined in terms of itself, i.e., its value for an input is expressed using its values at smaller inputs. A correct recursive definition has two parts:
- Base case(s): the value for the smallest input(s), given directly.
- Recursive (inductive) step: defines in terms of at smaller arguments.
Example — Factorial:
int factorial(int n) {
if (n == 0) return 1; // base case
return n * factorial(n - 1); // recursive call
}
Thus . (Other examples: Fibonacci numbers, via Euclid's algorithm.)
Define cardinality of a set. What are countable and uncountable sets?
Cardinality
The cardinality of a set , written , is the number of elements it contains. For finite sets it is a non-negative integer; e.g. . Two sets and have the same cardinality if there exists a bijection .
Countable Sets
A set is countable if it is finite, or if it has the same cardinality as the set of natural numbers (i.e. its elements can be listed in a sequence ). Such infinite sets are countably infinite, with cardinality . Examples: , the integers , and the rationals are all countable.
Uncountable Sets
A set is uncountable if it is infinite but not countable — no bijection with exists, so its elements cannot be enumerated in a list. Example: The set of real numbers (and the interval ) is uncountable, as shown by Cantor's diagonal argument.
State and explain the addition and multiplication rules of counting.
Sum (Addition) Rule
If a task can be done in one of two disjoint ways, where the first way can be performed in ways and the second in ways, and no way is common to both, then the task can be done in ways. (For mutually disjoint sets : .) Example: A student can pick one book — either from maths books or from physics books — in ways.
Product (Multiplication) Rule
If a task consists of a sequence of two independent subtasks, where the first can be done in ways and, for each, the second in ways, then the whole task can be done in ways. (For a Cartesian product: .) Example: Choosing one maths book and then one physics book can be done in ways.
Key distinction: use the sum rule for an OR of mutually exclusive choices, and the product rule for an AND of successive independent choices.
Define isomorphic graphs with an example.
Isomorphic Graphs
Two simple graphs and are isomorphic if there exists a bijection that preserves adjacency:
Intuitively, the two graphs are structurally identical and differ only in the labelling/drawing of vertices.
Necessary conditions (invariants) — isomorphic graphs must have: the same number of vertices, the same number of edges, the same degree sequence, and the same number of components/cycles.
Example
Let have vertices with edges (a 4-cycle), and have vertices with edges (also a 4-cycle).
Define . Every edge of maps to an edge of and vice versa, so is an isomorphism and . Both have 4 vertices, 4 edges, and degree sequence .
What is a binary search tree? Give an example.
Binary Search Tree (BST)
A binary search tree is a binary tree in which each node stores a key, and for every node:
- all keys in its left subtree are less than the node's key, and
- all keys in its right subtree are greater than the node's key.
This ordering property holds recursively for every subtree, so an in-order traversal of a BST visits the keys in sorted (ascending) order. It supports search, insertion, and deletion in time, where is the height ( when balanced).
Example
Inserting the keys in order gives:
50
/ \
30 70
/ \ / \
20 40 60 80
Here every left child is smaller and every right child is larger than its parent. Searching for : compare with (go left), then (go right), then find — only 3 comparisons. In-order traversal yields (sorted).
Prove that the sum of degrees of all vertices in a graph is even.
Handshaking Theorem
Statement. In any undirected graph , the sum of the degrees of all vertices equals twice the number of edges:
Consequently, the sum of degrees is always even.
Proof
Consider the total . The degree counts the number of edge-endpoints incident on vertex . Each edge has exactly two endpoints — one at and one at — and therefore contributes exactly to the total degree sum (it adds to and to ).
Summing this contribution over all edges,
Since is a non-negative integer, is even. Hence the sum of the degrees of all vertices in a graph is even. Q.E.D.
Corollary: the number of vertices of odd degree must be even.
Define modular arithmetic. Compute (17 \bmod 5) and (-7 \bmod 3).
Modular Arithmetic
Modular arithmetic is arithmetic of integers with respect to a fixed positive integer called the modulus. For we take the remainder when is divided by , where the remainder is chosen so that (i.e. with integer ). Two integers and are congruent modulo , written , if .
Computations
1. :
2. : We need with and . Taking :
Answers: and .
State the rules of inference: modus ponens and modus tollens.
Rules of inference are valid argument forms used to derive conclusions from premises in propositional logic.
Modus Ponens (Law of Detachment)
If a conditional and its hypothesis are both true, the conclusion is true.
The form is a tautology. Example: "If it rains, the ground is wet. It is raining. The ground is wet."
Modus Tollens
If a conditional is true and its conclusion is false, then its hypothesis is false.
The form is a tautology. Example: "If it rains, the ground is wet. The ground is not wet. It is not raining."
Frequently asked questions
- Where can I find the BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) question paper 2078?
- The full BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2078 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
- Does the Discrete Structure (BSc CSIT, CSC160) 2078 paper come with solutions?
- Yes. Every question on this Discrete Structure (BSc CSIT, CSC160) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2078 paper?
- The BSc CSIT (TU) Discrete Structure (BSc CSIT, CSC160) 2078 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
- Is practising this Discrete Structure (BSc CSIT, CSC160) past paper free?
- Yes — reading and attempting this Discrete Structure (BSc CSIT, CSC160) past paper on Kekkei is completely free.