Mock Test Solutions
Math-I mid-sem · mock comprehensive exam

Mock Test Solutions

Do it like the real exam first: 40 MCQs (aim for about 40 minutes), then any 4 of the 5 written questions on paper with full working. Only then open the solutions. Every answer links back to the study-guide method it uses.

Part A · 1 mark each

Multiple choice

  1. Calculate 75 × 45.   A) 3375 B) 3425 C) 3275 D) 3500

    Answer

    A) 3375. Difference of squares around 60: 60² − 15² = 3600 − 225. (Guide 13.1)

  2. Using benchmark fractions, approximate 3/4 + 2/5.   A) 1.150 B) 1.250 C) 0.950 D) 1.350

    Answer

    A) 1.150. 0.75 + 0.40. (13.2)

  3. Knowing the repeating cycle of 1/9, the first three digits of 4/9?   A) 0.111 B) 0.333 C) 0.444 D) 0.999

    Answer

    C) 0.444. k/9 = 0.kkk… (13.2)

  4. 0.363636… as a fraction in lowest terms.   A) 36/100 B) 4/11 C) 9/22 D) 36/99

    Answer

    B) 4/11. 36/99 is right but not in lowest terms; divide by 9. (13.2)

  5. P ∨ ¬P is a:   A) Contradiction B) Contingency C) Tautology D) Biconditional

    Answer

    C) Tautology. One of P, ¬P is always true. (5.2)

  6. Which operator is evaluated last?   A) ¬ B) ∧ C) ∨ D) ⇔

    Answer

    D) Biconditional. Order: ( ), ¬, ∧, ∨, ⇒/⇔. (5.1)

  7. The contrapositive of ¬A ⇒ B is:   A) A ⇒ ¬B B) ¬B ⇒ A C) B ⇒ ¬A D) A ⇒ B

    Answer

    B) ¬B ⇒ A. Swap and negate both; ¬¬A = A. (5.3)

  8. Rows in a truth table for W = (P ∧ Q) ⇒ (¬R ∨ S)?   A) 8 B) 16 C) 32 D) 64

    Answer

    B) 16. Four variables, 2⁴. (5.2)

  9. "Some students love logic."   A) ∀x(S⇒L) B) ∃x(S∧L) C) ∀x(S∧L) D) ∃x(S⇒L)

    Answer

    B) ∃x(S(x) ∧ L(x)). ∃ pairs with ∧. (7.1)

  10. Negate ∃x∀y Q(x, y).   A) ∀x∃y ¬Q B) ∃x∃y ¬Q C) ∀x∀y ¬Q D) ¬∀x∃y Q

    Answer

    A) ∀x∃y ¬Q(x, y). Flip each quantifier, negate inside. (7.2)

  11. "Only premium members receive discounts."   A) ∀x(P⇒D) B) ∀x(D⇒P) C) ∃x(D∧P) D) ∀x(¬D⇒P)

    Answer

    B) ∀x(D(x) ⇒ P(x)). The word after "only" goes on the right. (7.1)

  12. P ⇒ Q and P. By Modus Ponens:   A) ¬P B) Q C) ¬Q D) P ∧ Q

    Answer

    B) Q. (6.1)

  13. The range of a function is:   A) all inputs B) the exact set of outputs produced C) the whole codomain D) inputs that map to zero

    Answer

    B). The codomain is what's allowed; the range is what actually comes out. (10.1)

  14. Domain of g(x) = √(x − 3)/(x − 5).   A) [3, ∞) B) (−∞, 5) ∪ (5, ∞) C) [3, 5) ∪ (5, ∞) D) (3, 5) ∪ (5, ∞)

    Answer

    C). x ≥ 3 (3 allowed, √0 = 0 is fine) and x ≠ 5. (10.1)

  15. lim x→3 (x² − 9)/(x − 3).   A) 0 B) 3 C) 6 D) does not exist

    Answer

    C) 6. Factor, cancel, substitute into x + 3. (10.3)

  16. ∫ₐᵇ f(x) dx represents:   A) tangent slope B) rate of change at a C) net area between curve and x-axis from a to b D) y-intercept of the antiderivative

    Answer

    C). "Net" because area below the axis counts negative. (11.1)

  17. ∫₀³ 2x dx.   A) 3 B) 6 C) 9 D) 18

    Answer

    C) 9. [x²]₀³. (11.1)

  18. For ∫3x² cos(x³) dx with u = x³, du = ?   A) x² dx B) 3x² dx C) 3x dx D) cos(x³) dx

    Answer

    B) 3x² dx. (11.3)

  19. ∫₂⁶ f = 8, ∫₂⁶ g = 4. Find ∫₂⁶ (3f + 2g).   A) 32 B) 24 C) 40 D) 12

    Answer

    A) 32. 3(8) + 2(4). (11.1)

  20. Area under y = eˣ from x = 0 to x = ln 2.   A) 1 B) 2 C) e D) e − 1

    Answer

    A) 1. [eˣ]₀^(ln 2) = e^(ln 2) − e⁰ = 2 − 1. (11.1)

  21. "Four more than three times a number is twenty-five."   A) 3x − 4 = 25 B) 4x + 3 = 25 C) 3x + 4 = 25 D) 3(x + 4) = 25

    Answer

    C) 3x + 4 = 25. (14.1)

  22. Sum of two consecutive even integers.   A) x + (x + 1) B) 2x + (2x + 2) C) x(x + 2) D) 2x(2x + 2)

    Answer

    B). 2x is always even, and the next even number is 2 more. (14.1)

  23. 5 data blocks in 2 hours. Speed?   A) 2.5/h B) 10/h C) 0.4/h D) 5/h

    Answer

    A) 2.5 blocks per hour. Amount ÷ time. (14.1)

  24. Profit is defined as:   A) Revenue + Total cost B) Revenue − Fixed cost C) Total cost − Revenue D) Revenue − Total cost

    Answer

    D). (14.1)

  25. 8th term of 5, 9, 13, 17, …   A) 29 B) 33 C) 37 D) 41

    Answer

    B) 33. 5 + 7 × 4. (15.1)

  26. Sum of the infinite GP 12, 4, 4/3, 4/9, …   A) 16 B) 18 C) 24 D) 36

    Answer

    B) 18. 12/(1 − 1/3). (15.2)

  27. First differences of n³ (1, 8, 27, 64, …) are:   A) constant B) linear C) quadratic D) exponential

    Answer

    C) Quadratic. 7, 19, 37: second differences 12, 18 are linear, so the first differences are quadratic. (15.3)

  28. 8 teams, each plays every other once. Matches?   A) 16 B) 28 C) 56 D) 64

    Answer

    B) 28. C(8, 2). (9.2)

  29. 4-letter codes from "LOGIC", no repetition.   A) 20 B) 60 C) 120 D) 24

    Answer

    C) 120. ⁵P₄ = 5·4·3·2. (9.1)

  30. Which strictly requires permutations?   A) 4-person task force B) 3 pizza toppings C) assigning President, VP, Secretary D) a handful of 5 marbles

    Answer

    C). Distinct roles make order matter. (9.1)

  31. Calculate ⁷C₃.   A) 21 B) 35 C) 42 D) 210

    Answer

    B) 35. (7·6·5)/(3·2·1). (9.2)

  32. Sum of all coefficients of (x + y)⁵.   A) 10 B) 16 C) 32 D) 64

    Answer

    C) 32. Put x = y = 1: 2⁵. (9.3)

  33. Most affected by one massive outlier?   A) Median B) Mode C) Mean D) IQR

    Answer

    C) Mean. (12.1)

  34. Standard deviation 4. Variance?   A) 2 B) 8 C) 16 D) 64

    Answer

    C) 16. (12.2)

  35. Normal distribution: % within ±2σ?   A) 68% B) 95% C) 99.7% D) 50%

    Answer

    B) 95%. (12.3)

  36. Every data point × 3. Standard deviation?   A) × 9 B) × 3 C) + 3 D) unchanged

    Answer

    B) Multiplied by 3. Variance would be × 9; that's the trap. (12.3)

  37. X = {a, b, c, d}, Y = {c, d, e}. X ∪ Y?   A) {c, d} B) {a, b, c, d, e} C) {a, b} D) {e}

    Answer

    B). (1.2)

  38. De Morgan: (A ∩ B)′ ≡   A) A′ ∩ B′ B) A′ ∪ B′ C) A ∪ B D) A′ ∪ B

    Answer

    B) A′ ∪ B′. (1.5)

  39. P(X) = 0.7, P(Y) = 0.4, P(X ∪ Y) = 0.9. P(X ∩ Y)?   A) 0.1 B) 0.2 C) 0.3 D) 1.1

    Answer

    B) 0.2. 0.7 + 0.4 − 0.9. (2.2)

  40. A and B are independent iff:   A) P(A∩B) = 0 B) P(A∪B) = 1 C) P(A∩B) = P(A)·P(B) D) P(A|B) = P(B)

    Answer

    C). Option A describes mutually exclusive events, a common trap. (2.3)

Answer key only (for quick marking)

1 A · 2 A · 3 C · 4 B · 5 C · 6 D · 7 B · 8 B · 9 B · 10 A · 11 B · 12 B · 13 B · 14 C · 15 C · 16 C · 17 C · 18 B · 19 A · 20 A · 21 C · 22 B · 23 A · 24 D · 25 B · 26 B · 27 C · 28 B · 29 C · 30 C · 31 B · 32 C · 33 C · 34 C · 35 B · 36 B · 37 B · 38 B · 39 B · 40 C

Part B · 15 marks each · attempt any 4

Written questions, full working

Copy this layout on your answer sheet: label each part, define symbols, name each rule, box each part's answer. Later parts reuse earlier answers, so a boxed result helps the examiner follow you.

Q1Network security rules and violations

Policy: "If a user is external and the user queries the database, then the session is flagged."

Show full solution

A. [3] Let E: the user is external. Q: the user queries the database. F: the session is flagged.
Policy: (E ∧ Q) ⇒ F

B. [4] Using P ⇒ R ≡ ¬P ∨ R:
(E ∧ Q) ⇒ F ≡ ¬(E ∧ Q) ∨ F  (implication equivalence)
≡ ¬E ∨ ¬Q ∨ F  (De Morgan's law)

C. [4] A violation is the negation of the rule:
¬[(E ∧ Q) ⇒ F] ≡ ¬(¬E ∨ ¬Q ∨ F)  (from B)
≡ ¬¬E ∧ ¬¬Q ∧ ¬F  (De Morgan's law)
≡ E ∧ Q ∧ ¬F  (double negation)

D. [4] E ∧ Q ∧ ¬F is a conjunction, which is true only if every part is true. So E = T, Q = T, ¬F = T.
The user is external (T), the user queried the database (T), and the session was not flagged (F = F). These values are unique.

Q2Algorithmic trading proof

P1: If volume is high, the price surges. P2: If the price surges, the bot buys. P3: The bot did not buy.

Show full solution

A. [4] Let V: trading volume is high. S: the stock price surges. B: the bot executes a buy order.
P1: V ⇒ S   P2: S ⇒ B   P3: ¬B

B. [3] Conclusion: ¬V (the trading volume was not high).
Negation for proof by contradiction: V (assume the volume was high).

C. [4] P1: V ⇒ S ≡ ¬V ∨ S.   P2: S ⇒ B ≡ ¬S ∨ B.

D. [4]

  1. ¬V ∨ S  (P1, from C)
  2. ¬S ∨ B  (P2, from C)
  3. ¬B  (P3)
  4. V  (assumption: negated conclusion)
  5. S  (Disjunctive Syllogism on 1 and 4: V is true, so ¬V is false)
  6. B  (Disjunctive Syllogism on 2 and 5)
  7. B ∧ ¬B  (Conjunction of 6 and 3): a contradiction

The assumption V must be false, so ¬V: the trading volume was not high. ∎
Resolution version: resolve 1 and 2 to get ¬V ∨ B; resolve with ¬B to get ¬V; resolve with V to get the empty clause (contradiction).

Q3Space station life-support (predicate logic)

Domain: modules. Policy 1: Every pressurized module contains oxygen. Policy 2: No module containing oxygen triggers a vacuum alarm.

Show full solution

A. [3] Let P(x): x is pressurized. O(x): x contains oxygen. V(x): x triggers a vacuum alarm.
Policy 1: ∀x (P(x) ⇒ O(x))
Policy 2: ∀x (O(x) ⇒ ¬V(x))

B. [4] Let a = Airlock-1.

  1. ∀x (P(x) ⇒ O(x))  (Policy 1)
  2. ∀x (O(x) ⇒ ¬V(x))  (Policy 2)
  3. P(a) ⇒ O(a)  (Universal Instantiation, 1)
  4. O(a) ⇒ ¬V(a)  (Universal Instantiation, 2)
  5. P(a) ⇒ ¬V(a)  (Hypothetical Syllogism, 3 and 4)

So if Airlock-1 is pressurized, it does not trigger a vacuum alarm. ∎

C. [4] P(a) ⇒ ¬V(a) ≡ ¬P(a) ∨ ¬V(a)  (implication equivalence)

D. [4] Given V(a) = T, so ¬V(a) = F.
¬P(a) ∨ F must be true (it was proved in B/C), so ¬P(a) = T by Disjunctive Syllogism, i.e. P(a) = F.
Airlock-1 is not pressurized. (This is Modus Tollens in Boolean form.)

Q4Area between f(x) = x² and g(x) = 2x + 3

Show full solution

A. [3] Set f(x) = g(x):
x² = 2x + 3 → x² − 2x − 3 = 0 → (x − 3)(x + 1) = 0 → x = −1 and x = 3.

B. [4] Test x = 0 (between −1 and 3): g(0) = 3, f(0) = 0. Since 3 > 0, g(x) = 2x + 3 is the upper boundary and f(x) = x² the lower.
Area = ∫₋₁³ [(2x + 3) − x²] dx = ∫₋₁³ (−x² + 2x + 3) dx

C. [4] F(x) = −x³/3 + x² + 3x (+ C)

D. [4]
F(3) = −27/3 + 9 + 9 = −9 + 18 = 9
F(−1) = −(−1)/3 + 1 − 3 = 1/3 − 2 = −5/3
Area = F(3) − F(−1) = 9 − (−5/3) = 27/3 + 5/3 = 32/3 ≈ 10.67 square units

Q5Combinatorial teams (7 backend, 4 frontend, choose 5)

Show full solution

A. [3] 11 developers in total. ¹¹C₅ = 11!/(5!·6!) = (11·10·9·8·7)/(5·4·3·2·1) = 55440/120 = 462

B. [4] 3 backend AND 2 frontend: ⁷C₃ × ⁴C₂ = 35 × 6 = 210
⁷C₃ = (7·6·5)/(3·2·1) = 35; ⁴C₂ = (4·3)/2 = 6

C. [4] P(balanced team) = favourable/total = 210/462. Divide by 42: 5/11

D. [4] Zero frontend = all 5 from backend: ⁷C₅ = ⁷C₂ = 21.
P(zero frontend) = 21/462 = 1/22.
P(at least one frontend) = 1 − 1/22 = 21/22 (complement rule)

Exam strategy

Scoring tips for tomorrow