Discrete Structure, Past Papers, UOS Main Campus

Discrete Structures BSSE BSCS 2nd Mid Past Paper – UOS Main Campus

ProgramBSSE
Semester2nd
ExamMid Term
CampusUOS Main
AnswersSolved ✓

University of Sargodha main campus (Department of Computer Science & IT) Discrete Structures mid-term exam for BSSE 2nd (Regular, SS) and BSCS 2nd (SS), 20 marks, 1 hour 20 minutes. Retyped from the original paper, with solved answers below.

Solved answers

Q1 (2)

a. p ↔ q: “The election is decided if and only if the votes have been counted.”
b. ¬q ∨ (¬p ∧ q): “The votes have not been counted, or the election is not decided and the votes have been counted.”

Q2 (2)

a. r ∧ ¬q    b. r ↔ (q ∨ p)

Q3 – Is (¬p ∧ (p → q)) → ¬q a tautology? (3)

pq¬pp → q¬p ∧ (p → q)¬qResult
TTFTFFT
TFFFFTT
FTTTTFF
FFTTTTT

The last column has an F (when p is false and q is true), so it is not a tautology.

Q4 (2)

a. ¬∃x (P(x) ∨ Q(x)), equivalently ∀x (¬P(x) ∧ ¬Q(x)).
b. ∃x (P(x) ∧ ¬Q(x)).

Q5 (2)

a. ∃x (x² = −1) is false — the square of a real number is never negative.
b. ∀x ((−x)² = x²) is true — (−x)² = x² for every real number.

Q6 – Square of an even number is even (3)

Direct proof: let n be even, so n = 2k for some integer k. Then n² = 4k² = 2(2k²). Since 2k² is an integer, n² is even. ∎

Q7 – One-to-one and onto, Z → Z (3)

a. f(n) = n − 1: one-to-one (n − 1 = m − 1 ⇒ n = m) and onto (for any integer m, take n = m + 1). So it is a bijection.
b. f(n) = n² + 1: not one-to-one (f(1) = f(−1) = 2) and not onto (no integer gives 0, because n² + 1 ≥ 1).

Q8 – Floor and ceiling (3)

a. ⌊1/2 + ⌈1/2⌉⌋ = ⌊0.5 + 1⌋ = ⌊1.5⌋ = 1.
b. ⌈⌊1/2⌋ + ⌈1/2⌉ + 1/2⌉ = ⌈0 + 1 + 0.5⌉ = ⌈1.5⌉ = 2.

Save this paper for offline studyDownload the question paper, or save the paper together with all solved answers as a PDF.
↓ Download Paper (JPG)

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.