Welcome to Edugrown – Your Learning Partner EduGrown
🕑 Aaj 2 free content aur bacha hai. Login karein →
← Back to UG & PG Content
Exam Papers

Btech 3rd Sem Discrete Structure Solved Paper December 2025 (RGPV CS-302)

RGPV University (RGPV) · MP · Engineering (B.Tech / B.E.) · Computer science · 2nd Year · Semester 3 · 15 views

Advertisement

Btech 3rd Sem — Discrete Structure Solved Paper

RGPV Bhopal · CSIT(CI)/CS/IS-302 (GS) · Examination: December 2025
B.Tech III SemesterGrading System (GS)Time: 3 HoursMax Marks: 70
Exam instructions:
  • Attempt any five questions. All questions carry equal marks (14 each).
  • Each part (a)/(b) carries 7 marks — answers below are written to that length: definition → working/proof → example/diagram → conclusion.
  • In case of any doubt, the English version of the question is final.

Question-wise topics

Q.No.Topics asked
Q1Countable & uncountable sets, Q is countable; distributive law by Venn diagram
Q2Equivalence relation & partial order; checking R on {1,2,3}, equivalence classes
Q3One-one, onto, bijective; inverse exists ⇔ bijective; pigeonhole principle
Q4Tautology (p→q)↔(¬p∨q); predicate logic and negation
Q5Induction Σn = n(n+1)/2; √2 irrational by contradiction
Q6Group, abelian group, uniqueness of identity; subgroups of Z8
Q7FSM as language recognizer; FSM for strings ending with 01
Q8Euler path/circuit conditions; Dijkstra's shortest-path algorithm
Question 1
Q.1 (a)7 Marks
Define countable and uncountable sets. Prove that the set of rational numbers is countable.
Answer
A set A is countable if it is finite or if there is a bijection f : N → A (countably infinite, |A| = ℵ0); i.e. its elements can be listed as a sequence a1, a2, a3, …
A set that is not countable is uncountable.
  • Countable: N, Z (list 0, 1, −1, 2, −2, …), the set of even numbers, Q, set of all finite strings over an alphabet.
  • Uncountable: R, the interval (0, 1), P(N), set of irrational numbers.

Theorem: The set of rational numbers Q is countable

Step 1 — Q+ is countable. Write every positive rational p/q in an infinite array: row p, column q.

p \ q12345…
11/11/21/31/41/5…
22/12/22/32/42/5…
33/13/23/33/43/5…
44/14/24/34/44/5…
…………………

List the entries along the diagonals p + q = 2, 3, 4, … (Cantor's diagonal listing), skipping fractions not in lowest terms (e.g. 2/2, 2/4):

1/1, 1/2, 2/1, 3/1, 1/3, 1/4, 2/3, 3/2, 4/1, 5/1, 1/5, …

Every positive rational appears exactly once in this list at a finite position, so we get a bijection f : N → Q+. Hence Q+ is countable: q1, q2, q3, …

Step 2 — Q is countable. Q = Q− ∪ {0} ∪ Q+. Now list Q as

0, q1, −q1, q2, −q2, q3, −q3, …

This defines f(1) = 0, f(2k) = qk, f(2k + 1) = −qk — a bijection from N onto Q.

Therefore Q is countable (countably infinite). By contrast, R is uncountable (Cantor's diagonal argument).
Q.1 (b)7 Marks
Using Venn diagram, prove: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Answer

This is the distributive law of intersection over union. We shade both sides step by step and compare.

Left-hand side: A ∩ (B ∪ C)

UABCStep 1: B ∪ C
UABCLHS: A ∩ (B ∪ C)

B ∪ C = everything inside B or C. Intersecting with A keeps only the part of A that lies in B or in C: regions A∩B only, A∩C only and A∩B∩C.

Right-hand side: (A ∩ B) ∪ (A ∩ C)

UABCStep 2: A ∩ B
UABCStep 3: A ∩ C
UABCRHS: (A ∩ B) ∪ (A ∩ C)

A ∩ B and A ∩ C are the two lens-shaped overlaps of A; their union covers exactly the same three regions: A∩B only, A∩C only and A∩B∩C.

Element-wise check: x ∈ A ∩ (B ∪ C) ⇔ x ∈ A and (x ∈ B or x ∈ C) ⇔ (x ∈ A and x ∈ B) or (x ∈ A and x ∈ C) ⇔ x ∈ (A ∩ B) ∪ (A ∩ C).

The shaded region of the LHS diagram is identical to the shaded region of the RHS diagram, hence A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
Question 2
Q.2 (a)7 Marks
Define relation. Explain equivalence relation and partial ordering relation with suitable examples.
Answer
A relation R from a set A to a set B is a subset of A × B; (a, b) ∈ R is written aRb. A relation on A is a subset of A × A.

Example: A = {1, 2, 3}, R = {(a, b) : a < b} = {(1, 2), (1, 3), (2, 3)}. Relations are represented by sets of pairs, matrices or digraphs.

Equivalence relation

R on A is an equivalence relation if it is reflexive (aRa ∀a), symmetric (aRb ⇒ bRa) and transitive (aRb ∧ bRc ⇒ aRc).
  • Congruence modulo n on Z: a ≡ b (mod n) — classes [0], [1], …, [n − 1].
  • “Is parallel to or equal to” on the set of lines in a plane.
  • “Has the same age as” on a set of students.

An equivalence relation partitions A into disjoint equivalence classes [a] = {x : xRa}.

Partial ordering relation

A relation R on a set A is a partial ordering if it is reflexive (aRa ∀a), antisymmetric (aRb and bRa ⇒ a = b) and transitive (aRb and bRc ⇒ aRc). The pair (A, R) is called a partially ordered set (poset), written (A, ≤).
  • (Z, ≤) — usual less-than-or-equal relation.
  • (Z+, |) — divisibility: 2 | 6, but 2 and 3 are not comparable.
  • (P(S), ⊆) — set inclusion on the power set.

Elements a, b are comparable if a ≤ b or b ≤ a. If every pair is comparable the order is a total (linear) order, e.g. (Z, ≤); otherwise it is only partial, e.g. (Z+, |). A poset is represented by a Hasse diagram.

Difference

Equivalence relationPartial order
PropertiesReflexive, symmetric, transitiveReflexive, antisymmetric, transitive
Idea“sameness” — groups alike elements“order / ranking” — compares elements
StructurePartition into classesPoset, drawn as Hasse diagram
Examplea ≡ b (mod 3)a | b, A ⊆ B, a ≤ b
Q.2 (b)7 Marks
Let A = {1, 2, 3}, R = {(1,1), (2,2), (3,3), (1,2), (2,1)}. Check whether R is an equivalence relation and find equivalence classes.
Answer
123
1110
2110
3001
123
Digraph of R

Reflexive

(1,1), (2,2), (3,3) ∈ R — all diagonal entries are 1. ✔

Symmetric

Off-diagonal pairs: (1,2) ∈ R and (2,1) ∈ R; there is no other. The matrix equals its transpose. ✔

Transitive

(a,b) ∈ R(b,c) ∈ RNeed (a,c)In R?
(1,2)(2,1)(1,1)✔
(2,1)(1,2)(2,2)✔
(1,2)(2,2)(1,2)✔
(2,1)(1,1)(2,1)✔
(1,1)(1,2)(1,2)✔
(2,2)(2,1)(2,1)✔

Every required pair is present (pairs involving 3 only give (3,3)). ✔

R is reflexive, symmetric and transitive ⇒ R is an equivalence relation.

Equivalence classes

[1] = {x : x R 1} = {1, 2},   [2] = {1, 2},   [3] = {3}.

Distinct classes: {1, 2} and {3}, which form the partition A = {1, 2} ∪ {3}.
Question 3
Q.3 (a)7 Marks
Define one–one, onto and bijective functions. Prove that inverse of a function exists if and only if the function is bijective.
Answer
Let f : A → B.
• One-one (injective): f(a1) = f(a2) ⇒ a1 = a2 (distinct elements have distinct images). Example f(x) = 2x + 3 on R.
• Onto (surjective): for every b ∈ B there is a ∈ A with f(a) = b (range = co-domain). Example f(x) = x³ on R.
• Bijective: both one-one and onto. Example f(x) = x + 1 on Z. (f(x) = x² on R is neither one-one nor onto.)

Inverse: g : B → A is the inverse of f if g ∘ f = IA and f ∘ g = IB, i.e. g(f(a)) = a ∀a ∈ A and f(g(b)) = b ∀b ∈ B.

(⇒) If f⁻¹ exists then f is bijective

Let g = f⁻¹ exist.
One-one: f(a1) = f(a2) ⇒ g(f(a1)) = g(f(a2)) ⇒ a1 = a2.
Onto: for any b ∈ B put a = g(b) ∈ A; then f(a) = f(g(b)) = b.

(⇐) If f is bijective then f⁻¹ exists

Take any b ∈ B. Since f is onto, there is some a ∈ A with f(a) = b; since f is one-one, this a is unique.
Define g : B → A by g(b) = that unique a. g is a well-defined function.
Then g(f(a)) = a for all a ∈ A and f(g(b)) = b for all b ∈ B, i.e. g ∘ f = IA, f ∘ g = IB. So g = f⁻¹.

Example: f : R → R, f(x) = 2x + 3 is bijective, f⁻¹(x) = (x − 3)/2. But f(x) = x² on R has no inverse (f(2) = f(−2)).

f⁻¹ exists if and only if f is one-one and onto (bijective).
Q.3 (b)7 Marks
State and prove Pigeonhole Principle.
Answer
Pigeonhole Principle: If n + 1 (or more) objects (pigeons) are placed into n boxes (pigeonholes), then at least one box contains two or more objects.
Generalized: If N objects are placed into k boxes, then at least one box contains at least ⌈N/k⌉ objects.

Proof (by contradiction)

Suppose no box contains more than one object. Then the total number of objects ≤ 1 + 1 + … + 1 (n times) = n. But we have n + 1 objects, and n + 1 > n — a contradiction. Hence at least one box must contain at least two objects.

Generalized form proof: If every box had at most ⌈N/k⌉ − 1 objects, total ≤ k(⌈N/k⌉ − 1) < k(N/k + 1 − 1) = N — contradiction.

Applications / examples

  • In a group of 15 people there are 15 objects (people) and 12 boxes (months). Since 15 > 12, at least two people share the same birth month. (Generalized: at least ⌈15/12⌉ = 2.)
  • Among any 5 integers, two leave the same remainder when divided by 4 (only 4 remainders).
  • If 10 letters are put into 3 mail-boxes, some box gets at least ⌈10/3⌉ = 4 letters.
With more objects than boxes, some box must hold at least two objects.
Question 4
Q.4 (a)7 Marks
Construct truth table for the proposition (p → q) ↔ (¬p ∨ q) and show that it is a tautology.
Answer
pqp → q¬p¬p ∨ q(p → q) ↔ (¬p ∨ q)
TTTFTT
TFFFFT
FTTTTT
FFTTTT

Columns p → q and ¬p ∨ q are identical in all four rows (both false only when p = T, q = F). A biconditional of two identical columns is always true.

The last column is T in every row ⇒ (p → q) ↔ (¬p ∨ q) is a tautology, i.e. p → q ≡ ¬p ∨ q (implication law).
Q.4 (b)7 Marks
Convert the following statement into predicate logic and write its negation: “Every student studies Discrete Mathematics.”
Answer

Let the domain be all people. S(x): “x is a student”; D(x): “x studies Discrete Mathematics”.

Predicate form

∀x ( S(x) → D(x) )

(If the domain is taken as the set of students only: ∀x D(x).)

Negation

¬∀x (S(x) → D(x))
≡ ∃x ¬(S(x) → D(x)) (¬∀ ≡ ∃¬)
≡ ∃x ¬(¬S(x) ∨ D(x)) (implication law)
≡ ∃x (S(x) ∧ ¬D(x)) (De Morgan)
Negation: ∃x (S(x) ∧ ¬D(x)) — “There is at least one student who does not study Discrete Mathematics.” (Note: “No student studies DM” is NOT the negation.)
Question 5
Q.5 (a)7 Marks
Prove by mathematical induction that: 1 + 2 + 3 + … + n = n(n + 1)/2.
Answer

Let P(n): 1 + 2 + 3 + … + n = n(n + 1)2, n ≥ 1.

Step 1 — Basis (n = 1)

LHS = 1, RHS = 1 × 22 = 1. LHS = RHS, so P(1) is true.

Step 2 — Inductive hypothesis

Assume P(k) is true: 1 + 2 + … + k = k(k + 1)2 …(1)

Step 3 — Inductive step (prove P(k + 1))

1 + 2 + … + k + (k + 1) = k(k + 1)2 + (k + 1) [using (1)]
= (k + 1)(k2 + 1) = (k + 1)(k + 2)2
which is the formula with n = k + 1. So P(k + 1) is true.
By the principle of mathematical induction, 1 + 2 + … + n = n(n + 1)/2 for all n ≥ 1.
Q.5 (b)7 Marks
Prove by contradiction that √2 is irrational.
Answer

Method: assume the opposite of what is to be proved and derive a contradiction.

Assumption: suppose √2 is rational. Then √2 = pq where p, q are integers, q ≠ 0, and p, q have no common factor (fraction in lowest terms, gcd(p, q) = 1).

Squaring: 2 = p²q² ⇒ p² = 2q² …(1)
So p² is even ⇒ p is even (if p were odd, p² would be odd). Let p = 2k.
Put in (1): 4k² = 2q² ⇒ q² = 2k² ⇒ q² is even ⇒ q is even.

Thus both p and q are even, so 2 is a common factor of p and q. This contradicts our assumption that p and q have no common factor.

The assumption is false. Hence √2 is irrational. ∎
Question 6
Q.6 (a)7 Marks
Define group and Abelian group. Prove that identity element of a group is unique.
Answer
A non-empty set G with a binary operation * is a group if: (1) closure a * b ∈ G; (2) associativity (a * b) * c = a * (b * c); (3) identity ∃ e ∈ G with a * e = e * a = a; (4) inverse ∀a ∃a⁻¹ with a * a⁻¹ = a⁻¹ * a = e.
A group is abelian (commutative) if in addition a * b = b * a for all a, b ∈ G.

Examples: (Z, +), (R − {0}, ×), (Zn, +n) are abelian groups; the symmetric group S3 and the group of invertible 2 × 2 matrices under multiplication are non-abelian.

Theorem: The identity element of a group is unique

Proof: Suppose e and e′ are both identity elements of G.

Since e is an identity: e * e′ = e′ …(1)
Since e′ is an identity: e * e′ = e …(2)
From (1) and (2): e = e * e′ = e′
Hence a group has only one identity element. (Similarly each element has a unique inverse.)
Q.6 (b)7 Marks
Find all subgroups of the group Z8.
Answer

Z8 = {0, 1, 2, 3, 4, 5, 6, 7} under addition modulo 8 — a cyclic group of order 8 generated by 1.

By Lagrange's theorem the order of a subgroup divides 8, so possible orders are 1, 2, 4, 8. In a cyclic group there is exactly one subgroup for each divisor, namely the subgroup generated by a single element.

Cyclic subgroup generated by each element

Element(s) a⟨a⟩ = {0, a, 2a, …} (mod 8)Order
0{0}1
1, 3, 5, 7{0, 1, 2, 3, 4, 5, 6, 7} = Z88
2, 6{0, 2, 4, 6}4
4{0, 4}2

e.g. ⟨2⟩: 2, 4, 6, 8 ≡ 0 ⇒ {0, 2, 4, 6}; ⟨6⟩: 6, 12 ≡ 4, 18 ≡ 2, 24 ≡ 0 ⇒ same set; ⟨4⟩: 4, 8 ≡ 0 ⇒ {0, 4}. Each set is closed under +8 and contains inverses.

{0}{0,4}{0,2,4,6}Z8
Lattice of subgroups of Z8 (a chain)
Z8 has exactly 4 subgroups: {0} (trivial), {0, 4}, {0, 2, 4, 6} and Z8 itself (improper). The proper non-trivial ones are {0, 4} and {0, 2, 4, 6}.
Question 7
Q.7 (a)7 Marks
Define Finite State Machine. Explain FSM as a language recognizer.
Answer
A finite state machine (FSM) is an abstract model of computation with a finite number of states. It reads input symbols one at a time and changes state according to a transition function. With output it is the 6-tuple M = (S, I, O, f, g, s0) — S states, I inputs, O outputs, f : S × I → S next-state function, g : S × I → O output function, s0 initial state. Without output (used for recognition) it is a finite state automaton.

Examples of FSMs: vending machines, traffic lights, lift controllers, serial adders, lexical analysers.

FSM as a language recognizer

A Finite State Automaton (FSA) used as a language recognizer is a 5-tuple M = (S, I, f, s0, F) where S = finite set of states, I = input alphabet, f : S × I → S is the transition function, s0 ∈ S is the initial state and F ⊆ S is the set of final (accepting) states.

The machine reads an input string one symbol at a time starting from s0. A string x is accepted (recognized) if after reading x the machine is in a final state; otherwise it is rejected. The set of all accepted strings is the language recognized by M, L(M) = {x ∈ I* : f(s0, x) ∈ F}. Languages recognized by FSAs are exactly the regular languages.

Example: FSA that accepts binary strings containing an even number of 1s. States: E (even, initial & final) and O (odd).

EO1100start
Double circle = final state
StateInput 0Input 1
→ * EEO
OOE

Input 1011: E →1 O →0 O →1 E →1 O — ends in O, so rejected (three 1s). Input 1001: E → O → O → O → E — accepted.

Uses: lexical analysers in compilers (recognizing identifiers, keywords, numbers), pattern matching, protocol checking, vending machines.

An FSM recognizes a language L if it accepts exactly the strings of L; the class of such languages is the class of regular languages.
Q.7 (b)7 Marks
Design a finite state machine that accepts all binary strings ending with 01.
Answer

Input alphabet I = {0, 1}. Accepted language L = {x ∈ {0,1}* : x ends with 01}, e.g. 01, 101, 0001, 11001. The machine only needs to remember how much of the suffix “01” has just been seen.

States

  • q0 (start): no useful suffix yet — last symbol was 1 (not preceded by 0) or nothing read.
  • q1: the last symbol read was 0 (half of “01” seen).
  • q2 (final/accepting): the last two symbols were 0 then 1.

Transition table

StateInput 0Input 1
→ q0q1q0
q1q1q2
* q2q1q0

M = ({q0, q1, q2}, {0, 1}, f, q0, {q2}) with f as in the table.

q0q1q2010110start
Double circle = accepting state q2

Traces

  • 1101: q0 →1 q0 →1 q0 →0 q1 →1 q2 ⇒ accepted (ends with 01).
  • 0110: q0 →0 q1 →1 q2 →1 q0 →0 q1 ⇒ rejected.
  • 1001: q0 →1 q0 →0 q1 →0 q1 →1 q2 ⇒ accepted.
The 3-state DFA above accepts exactly the binary strings ending with 01.
Question 8
Q.8 (a)7 Marks
Define Euler path and Euler circuit. State necessary and sufficient conditions for their existence.
Answer
Euler path (trail): a path in a graph that traverses every edge exactly once (vertices may repeat).
Euler circuit: an Euler path that starts and ends at the same vertex. A graph having an Euler circuit is an Euler graph.

Necessary and sufficient conditions (connected graph G, ignoring isolated vertices)

Undirected graphDirected graph
Euler circuitEvery vertex has even degreein-degree = out-degree at every vertex
Euler path (not circuit)Exactly two vertices of odd degree — the path starts at one and ends at the otherone vertex out − in = 1 (start), one vertex in − out = 1 (end), all others balanced

Why necessary: every time the walk passes through a vertex it uses one edge to enter and one to leave, contributing 2 to its degree. In a circuit this holds for every vertex (even the start, whose first exit pairs with the final entry) ⇒ all degrees even. In an open path only the start and end vertices get one unpaired edge ⇒ exactly two odd vertices. Sufficiency is shown constructively by Fleury's / Hierholzer's algorithm.

Examples

ABCDE
All degrees even ⇒ Euler circuit A–B–C–D–E–C–A
ABCD
A, C odd ⇒ Euler path A–B–C–D–A–C only

The Königsberg bridge graph has 4 vertices of odd degree, so it has neither an Euler path nor an Euler circuit.

Connected G has an Euler circuit ⇔ 0 odd vertices; an Euler path ⇔ 0 or 2 odd vertices.
Q.8 (b)7 Marks
Explain Dijkstra's Algorithm and find the shortest path from a given source vertex in a weighted graph.
Answer

Dijkstra's algorithm finds the shortest distance from a source vertex s to every other vertex of a weighted graph with non-negative edge weights. It is a greedy algorithm.

Algorithm

  1. Set d(s) = 0 and d(v) = ∞ for every other vertex; mark all vertices as temporary (unvisited).
  2. Choose the temporary vertex u with the smallest d(u) and make it permanent.
  3. Relax every edge (u, v) with v temporary: if d(u) + w(u, v) < d(v), set d(v) = d(u) + w(u, v) and predecessor(v) = u.
  4. Repeat steps 2–3 until all vertices are permanent. Trace predecessors back to get each shortest path.

Time complexity: O(V²) with an array, O((V + E) log V) with a binary heap.

Example (no graph was printed, so a standard example is solved)

Source A. Edges: AB = 4, AC = 2, BC = 1, BD = 5, CD = 8, CE = 10, DE = 2, DF = 6, EF = 2.

ABCDEF4215810262
Red edges: shortest-path tree from A

Each cell shows distance (predecessor); ✔ = already permanent.

StepVertex made permanentBCDEF
Initial—∞∞∞∞∞
1A (0)4 (A)2 (A)∞∞∞
2C (2)3 (C)✔10 (C)12 (C)∞
3B (3)✔✔8 (B)12 (C)∞
4D (8)✔✔✔10 (D)14 (D)
5E (10)✔✔✔✔12 (E)
6F (12)✔✔✔✔✔

Result

VertexShortest distance from AShortest path
A0A
B3A → C → B
C2A → C
D8A → C → B → D
E10A → C → B → D → E
F12A → C → B → D → E → F
Shortest path A → F: A → C → B → D → E → F with length 2 + 1 + 5 + 2 + 2 = 12.
Exam tip: In 7-mark answers, write the definition first, show every step of proof/working, draw a neat diagram wherever possible and box the final answer. Underline key terms — examiners award step marks.
Advertisement

💬 Comments & Doubts

💭

Abhi tak koi comment nahi

Sabse pehle comment karne wale bano!

Apna comment likhein

Doubt ho ya suggestion — kuch bhi poochh sakte hain. Login zaroori nahi hai.

20 + 18 =

Ye sirf ye confirm karne ke liye hai ki aap robot nahi hain.

Comment publish hone se pehle admin check karta hai.

🔒 Content copy nahi kar sakte