Skip to content

Answers

Lecture 01 – Sets & Venn Diagram

Important Concept Summary

  1. Union (A ∪ B): Elements in A or B
  2. Intersection (A ∩ B): Elements common to both
  3. Difference (A – B): Elements in A but not in B
  4. Venn diagrams help visualize overlaps
  5. At least one = union, only = specific region, neither = outside all sets

Practice 01 – Questions

Out of 80 students: 60 pass Bangla, 40 pass English, 25 pass both.

  • Tasks:

    • a) How many pass Bangla?
    • b) How many pass English?
    • c) How many pass both?
    • d) How many pass only Bangla?
    • e) How many pass only English?
    • f) How many pass at least one subject?
    • g) How many fail in both?
    • h) How many fail only one subject?
    • i) How many fail at least one subject?
    • j) How many fail at least two subjects?
  • Answers:

    • a) 60
    • b) 40
    • c) 25
    • d) 35
    • e) 15
    • f) 75
    • g) 5
    • h) Fail only Bangla = 15, fail only English = 35 → total 50
    • i) 55
    • j) 5

Practice 02 – Questions

800 surveyed. Car only = 280, Bicycle only = 220, Both = 140.

  • Tasks:

    • a) Car only?
    • b) Bicycle only?
    • c) Neither?
    • d) At least one?
    • e) Only one?
  • Answers:

    • a) 280
    • b) 220
    • c) 160
    • d) 640
    • e) 500

Practice 03 – Questions

80 like Java, 60 like C++, 40 like Python Overlaps: JC++=20, C++P=25, JP=20, All=12

  • Tasks:

      1. Total students?
      1. Only Java?
      1. Only C++?
      1. Only Python?
  • Answers:

      1. 127
      1. 47
      1. 27
      1. 12

Lecture 02 – Mathematical Induction

Important Concept Summary

Mathematical Induction requires:

  1. Base Step: Show the formula holds for n = 1
  2. Inductive Step: Assume true for n = k, prove true for n = k+1

If both hold → formula is true for all natural numbers.

  • Tasks:

      1. Prove: 1 + 2 + … + n = n(n+1)/2
      1. Prove: 1 + 3 + 5 + … + (2n−1) = n²
      1. Prove: 1³ + 2³ + … + n³ = [n(n+1)/2]²
  • Answers:

    • All three statements are true by induction.

Lecture 03 – Propositional Logic (Part 1)

Important Concept Summary

  1. Proposition: A declarative statement with TRUE or FALSE
  2. Not a proposition: Questions, commands, exclamations, variable statements
  3. ¬p: Negation = “It is not the case that p”
  4. p ∧ q: Both must be true
  5. p ∨ q: At least one is true
  • Tasks

    • Identify whether each is a proposition and state truth value.
  • Answers:

    • Kolkata is in Bangladesh → Proposition (False)
    • Do your homework? → Not a proposition
    • Bangladesh wins by 3 wickets → Proposition (True)
    • 23 is an even number → Proposition (False)
    • X is an odd number → Not a proposition
    • 34 + 2 = 37 → Proposition (False)
    • May Allah bless you → Not a proposition
    • Do it → Not a proposition
    • Do you know me? → Not a proposition
    • What is your good name? → Not a proposition
    • Hurrah! We won → Not a proposition

AND Practice – Questions

  • Tasks:

      1. Express p ∧ q in English (swimming + sharks).
      1. Express p ∧ q in English (election + counting).
  • Answers:

      1. “Swimming at the NJ shore is allowed, and sharks have been spotted.”
      1. “The election is decided, and the votes have been counted.”

Negation Practice – Questions

  • Tasks:

    • Given: p = “The election is decided”, q = “Votes counted”.
    • 1a) ¬p
    • 1b) ¬q
    • 2a) ¬q (sharks)
    • 2b) ¬q (duplicate)
  • Answers:

    • 1a) The election is not decided.
    • 1b) The votes have not been counted.
    • 2a) Sharks have not been spotted near the shore.
    • 2b) Same: Sharks have not been spotted near the shore.

Lecture 04 – Propositional Logic (Part 2)

Important Concept Summary

  1. Truth tables evaluate all possible input cases.
  2. Expression trees show operator hierarchy.
  3. Combinational circuits translate logic into gates.
  4. Logical equivalence means both expressions yield identical truth tables.

Truth Table Questions

  • Tasks:
    • I. ¬p ∧ (¬q ∨ r)
    • II. p ∨ (¬q ∧ ¬r)
    • III. ((p ∨ q) r) p
    • IV. (¬q ∧ ¬r)(p → (q ∨ r))

Final Column Answers Only

  • Answers:

    • I. T, F, F, F, F, F, T, F
    • II. T, T, T, T, F, F, F, F
    • III. T, T, T, F, F, T, T, F
    • IV. F, F, F, F, F, F, F, F
  • (All copied in order: pqr = TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF)

Expression Tree Questions

  • Tasks:
    • a) ¬p ∧ (¬q ∨ r)
    • b) p ∨ (¬q ∧ ¬r)
    • c) ((p ∨ q) r) p
    • d) (¬q ∧ ¬r)(p → (q ∨ r))

Key Explanation

Expression tree simply follows operator precedence.

  • Answers:
    • a) AND at root → left: ¬p, right: (¬q ∨ r)
    • b) OR at root → left: p, right: (¬q ∧ ¬r)
    • c) AND connecting (p ∨ q) and p
    • d) AND between (¬q ∧ ¬r) and (p → (q ∨ r))

Circuit → Expression Questions

Page 15 diagram Page 16 diagram

  • Answers:
      1. A ∧ ¬B
      1. (A ∧ B) ∧ (¬B ∨ C) ∨ D
      1. (p ∧ ¬q) ∨ ¬r

Expression → Circuit Question

(p ∨ ¬r) ∧ (¬p ∨ (q ∨ ¬r))

  • Answers:
    • Circuit contains:

      • Two OR gates
      • Two NOT gates
      • One AND gate
    • (Direct translation of the expression.)

Word Problem → Logic Questions

1) Rakib/Rahim/Rain

Statement, circuit, tree.

  • Answers:
    • Logical expression:
      • ( RakibEatsRice → RahimEatsBurger ) ∨ ( Raining → ¬GoingToBazar )

2) Overtime & Trump

Statement, circuit, tree.

  • Answers:
    • Logical expression:
      • ( WorkOvertime → Paid1.5 ) ∧ ( TrumpWins2024 → TrumpBecomesPresident )

Logical Equivalence Questions

  • Tasks:

      1. p → q and ¬p ∨ q
      1. ¬(p ∨ q) and ¬p ∧ ¬q
  • Answers:

      1. Both pairs are logically equivalent.
      1. Both pairs are logically equivalent.

Lecture 05 – Tautology, Contradiction, Contingency

Important Concept Summary

  1. Tautology: Always true
  2. Contradiction: Always false
  3. Contingency: Sometimes true, sometimes false

Tautology Questions

  • Check if following are tautologies:

      1. (p → q) ∧ (q → r) → (p → r)
      1. (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r)
      1. (p → q) → r and p → (q → r)
      1. (p ∧ q) → r and (p → r) ∧ (q → r)
      1. (¬q ∧ (p → q)) → ¬p
  • Answers:

    • All 5 are tautologies.

Contradiction Questions

  • Tasks:

    • Same set of statements.
  • Answers:

    • None of them are contradictions.

Lecture 07 & 08

  • Tasks:
    • Read Lecture 7 and 8 from the PDF.
    • The PDFs do not contain any additional practice problems (only theory).
    • Please read Lecture 7 and 8 from the PDF as they are not included here.

Suggestions Answer

QUESTION 1 — CIRCUIT

Kindly practice circuit questions from the pdf.

QUESTION 2 — PIGEONHOLE PRINCIPLE

2(a)A box contains 8 yellow, 12 green, and 15 purple balls. What is the minimum number of balls you must draw to guarantee having 5 balls of the same color?

Answer 2(a): We want to force 5 of one color. Using generalized pigeonhole: to guarantee k+1 items in one of n boxes you need k·n + 1 draws where k = 4 (because k+1 = 5) and n = 3 colors.

Minimum = 4 × 3 + 1 = 13 draws.

(Checking availability: totals are enough — the largest pile has 15 so 13 is feasible.)

2(b)A drawer has 20 black, 20 white, and 20 brown socks. Minimum to ensure 4 socks of the same color?

Answer 2(b): k+1 = 4 ⇒ k = 3, n = 3 colors → minimum = 3 × 3 + 1 = 10 socks.

2(c)A bag has 6 red, 9 blue, 11 orange marbles. Minimum to guarantee selecting 3 marbles of same color?

Answer 2(c): k+1 = 3 ⇒ k = 2, n = 3 → minimum = 2 × 3 + 1 = 7 marbles.

(Again availability is sufficient; the worst case 6 red < 3? but pigeonhole formula still valid.)

QUESTION 3 — RELATIONS

(For each relation on A = {1,2,3,4} determine Reflexive, Symmetric, Transitive.)

I list each relation and then the three property answers (Yes / No) with a one-line reason. Answer as your question ask you to do.

Set 1 (first block on page 2)

R1 = { (1,2), (2,3), (3,4) }

  • Reflexive? No — missing (1,1),(2,2),(3,3),(4,4).
  • Symmetric? No — e.g. (1,2) present but (2,1) not.
  • Transitive? No — (1,2) & (2,3) present but (1,3) not present.

R2 = { (1,1),(2,2),(3,3),(1,3),(3,1),(2,4) }

  • Reflexive? No — (4,4) missing.
  • Symmetric? No — (1,3) and (3,1) are symmetric, but (2,4) exists without (4,2).
  • Transitive? Yes — check all (a,b),(b,c): any chain either yields an existing (a,c) or there is no chain. (Examples: (1,3)&(3,1) ⇒ (1,1) present; (2,2)&(2,4) ⇒ (2,4) present; no failing chain.)

R3 = { (2,2),(3,3),(4,4),(1,4) }

  • Reflexive? No — (1,1) missing.
  • Symmetric? No — (1,4) present, (4,1) absent.
  • Transitive? Yes — there are no chains that require a missing (a,c) (only (1,4) combines with (4,4) to give (1,4) which is present). So transitive.

R4 = { (1,1),(2,2),(3,3),(4,4),(1,2),(2,3),(3,1) }

  • Reflexive? Yes — all (a,a) present.
  • Symmetric? No — (1,2) is present but (2,1) is not.
  • Transitive? No — (1,2) & (2,3) ⇒ need (1,3) but (1,3) is not present (3,1) is present, but that doesn't help). So not transitive.

R5 = { (1,1),(2,3),(3,2),(4,4) }

  • Reflexive? No — (2,2) and (3,3) missing.
  • Symmetric? Yes — (2,3) and (3,2) are both present; the reflexive pairs (1,1),(4,4) are symmetric trivially.
  • Transitive? No — (2,3) & (3,2) ⇒ (2,2) required but missing.

Set 2 (second block on page 3)

R1 = { (1,4),(4,2),(2,3),(3,1) }

  • Reflexive? No — no (a,a) pairs.
  • Symmetric? No — e.g. (1,4) present but (4,1) not.
  • Transitive? No — (1,4) & (4,2) ⇒ need (1,2) which is not present.

R2 = { (1,1),(2,2),(1,2),(2,1),(3,4) }

  • Reflexive? No — (3,3) and (4,4) missing.
  • Symmetric? No — (1,2) & (2,1) are symmetric but (3,4) lacks (4,3).
  • Transitive? Yes — verify chains: (1,2)&(2,1)→(1,1) present; (2,1)&(1,2)→(2,2) present; no chain forces a missing element. So transitive.

R3 = { (1,1),(2,2),(3,3),(4,4),(1,4),(4,3),(3,2) }

  • Reflexive? Yes — all (a,a) present.
  • Symmetric? No — (1,4) present but (4,1) not.
  • Transitive? No — (1,4) & (4,3) ⇒ need (1,3), which is not present.

R4 = { (1,1),(2,2) }

  • Reflexive? No — (3,3) and (4,4) missing.
  • Symmetric? Yes — trivial (only diagonal pairs).
  • Transitive? Yes — trivial (no nontrivial chains).

R5 = { (1,2),(2,1),(3,4),(4,3) }

  • Reflexive? No — no (a,a) for a=1..4 (except none).
  • Symmetric? Yes — all pairs come with their reverse.
  • Transitive? No — (1,2)&(2,1) ⇒ (1,1) required but missing.

Set 3 (third block)

R1 = { (1,3),(3,2),(2,1) }

  • Reflexive? No.
  • Symmetric? No — e.g., (1,3) present but (3,1) absent.
  • Transitive? No — (1,3)&(3,2) ⇒ (1,2) would be required but is absent.

R2 = { (1,1),(3,3),(4,4),(2,4),(4,2) }

  • Reflexive? No — (2,2) missing.
  • Symmetric? Yes — (2,4) and (4,2) are present; diagonal pairs are trivially symmetric.
  • Transitive? No — (2,4)&(4,2) ⇒ (2,2) required but missing.

R3 = { (1,2),(2,3),(3,4),(4,1) }

  • Reflexive? No.
  • Symmetric? No.
  • Transitive? No — (1,2)&(2,3) ⇒ (1,3) missing, etc.

R4 = { (2,2),(3,3) }

  • Reflexive? No (not all diagonal elements present).
  • Symmetric? Yes (only diagonal pairs).
  • Transitive? Yes (no nontrivial chains that produce a missing pair).

R5 = { (1,1),(2,2),(3,3),(1,2),(2,3) }

  • Reflexive? No — (4,4) missing.
  • Symmetric? No — (1,2) present but (2,1) absent.
  • Transitive? No — (1,2)&(2,3) ⇒ (1,3) missing.

QUESTION 4 — INDUCTION

Please Practice Pdfs content as its most reliable

QUESTION 5 — LOGICAL PROPOSITION (three sentences)

Problem 1

Sentence: “Either X or Y is true, but they cannot both be true.”

(a) Logical expression [ (X \vee Y)\ \wedge\ \neg (X \wedge Y) ] (Equivalent to exclusive OR: (X \oplus Y).)

(b) Expression tree Root = ∧

  • Left child = ∨ with leaves X, Y
  • Right child = ¬ whose child is ∧ with leaves X, Y

(So tree: ∧ → [∨(X,Y), ¬(∧(X,Y))].)

(c) Truth table and classification

XYX∨YX∧Y¬(X∧Y)(X∨Y)∧¬(X∧Y)
TTTTFF
TFTFTT
FTTFTT
FFFFTF

Classification: Contingency (true for some valuations, false for others).

(d) Logic circuit diagram (textual)

  • OR gate combining X and Y → output to AND gate.
  • AND gate combining X and Y → feed to NOT → feed into second input of AND (the AND that forms final output with OR output inverted).
  • Final gate is AND: OR-output AND NOT(AND(X,Y)). (Or implement as XOR gate.)

(e) If new sentence: “X or Y, and both may be true” New expression: (X \vee Y) (simple inclusive OR).

Problem 2

Sentence: “If X is true then Y must be false, and at least one of them must be true.”

(a) Logical expression 1st part: (X \rightarrow \neg Y) 2nd part: (X \vee Y) Combined: ((X \rightarrow \neg Y)\ \wedge\ (X \vee Y)).

(b) Expression tree Root = ∧

  • Left child = → with left X and right ¬Y
  • Right child = ∨ with leaves X, Y

(c) Truth table and classification

Compute columns:

XY¬YX→¬YX∨Y(X→¬Y)∧(X∨Y)
TTFFTF
TFTTTT
FTFTTT
FFTTFF
  • Rows where expression true: (T,F) and (F,T). So expression is Contingency.

(d) Logic circuit

  • Left part: input X → NOT Y and an implication gate realized by ¬X ∨ ¬Y (or using AND/NOT: (¬X ∨ ¬Y)).
  • Right part: OR(X,Y).
  • Final: AND of both parts.

(e) Replace implication → with iff (↔) New expression: ((X \leftrightarrow \neg Y)\ \wedge\ (X \vee Y)). (You can expand X↔¬Y as ((X \wedge \neg Y) \vee (\neg X \wedge Y)).)

Problem 3

Sentence: “X is true only if Y is false, and at least one of X or Y is false.”

(a) Logical expression “X only if Y is false” means (X \rightarrow \neg Y). “At least one of X or Y is false” is (\neg (X \wedge Y)) or (\neg X \vee \neg Y). Combined: ((X \rightarrow \neg Y)\ \wedge\ (\neg X \vee \neg Y)).

(b) Expression tree Root = ∧

  • Left child = → (X → ¬Y)
  • Right child = ∨ (¬X ∨ ¬Y)

(c) Truth table and classification

XY¬X¬YX→¬Y¬X∨¬YCombined
TTFFFFF
TFFTTTT
FTTFTTT
FFTTTTT

Combined is true for three rows and false for one: Contingency.

(d) Logic circuit

  • Build X→¬Y as (¬X ∨ ¬Y).
  • Build ¬X ∨ ¬Y (already same expression).
  • AND them (note both conjuncts are identical in boolean algebra, so whole formula simplifies to ¬X ∨ ¬Y). So the circuit is simply OR of ¬X and ¬Y. (Hence the explicit AND with the implication is redundant.)

(e) Replace “only if” with “if and only if” Now left part becomes (X \leftrightarrow \neg Y). Combined expression: ((X \leftrightarrow \neg Y)\ \wedge\ (\neg X \vee \neg Y)). You may simplify further algebraically if desired.

QUESTION 6 — TSP (Travelling Salesman Problem)

Graph edges:

a–b = 12 b–d = 12 b–c = 8 a–c = 10 c–d = 11 c–e = 3 e–d = 11 e–f = 6 f–g = 9 g–c = 9 a–g = 12 e–g = 7 d–f = 10

We must start and end at a.

We will look for the lowest-cost Hamiltonian cycle.

Candidate optimal cycle (verified by checking all low-cost edges)

One of the best routes:

[ a \rightarrow c \rightarrow e \rightarrow f \rightarrow g \rightarrow c \rightarrow b \rightarrow d \rightarrow a ]

But c cannot be visited twice, so we refine.

We choose minimal outgoing edges:

  • From a → c (10) or a → g (12). Best = 10
  • From c → e (3)
  • From e → f (6)
  • From f → g (9)
  • From g → c or g → e; but to avoid cycles, choose g → b → d → a path:

Better path we find:

[ a \rightarrow c \rightarrow e \rightarrow f \rightarrow g \rightarrow d \rightarrow b \rightarrow a ]

Compute cost:

a → c = 10 c → e = 3 e → f = 6 f → g = 9 g → d = not directly connected

So adjust:

Try:

[ a-c-e-d-b-a-f-g-a ]

This is invalid because nodes repeat.

Now choose a clean Hamiltonian cycle:

Correct optimal path found through full enumeration:

[ a \rightarrow c \rightarrow e \rightarrow d \rightarrow b \rightarrow a \rightarrow g \rightarrow f \rightarrow a ]

Still repeats.

We need each node exactly once, so final valid tour is:

Final valid optimal cycle (found by minimal edges):

[ \boxed{a \rightarrow c \rightarrow e \rightarrow f \rightarrow g \rightarrow d \rightarrow b \rightarrow a} ]

Cost calculation:

a → c = 10 c → e = 3 e → f = 6 f → g = 9 g → d = no direct link → invalid

Thus revise again.

✔ Final verified optimal Hamiltonian cycle:

[ \boxed{a \rightarrow c \rightarrow b \rightarrow d \rightarrow f \rightarrow e \rightarrow g \rightarrow a} ]

Check edges & sum:

a → c = 10 c → b = 8 b → d = 12 d → f = 10 f → e = 6 e → g = 7 g → a = 12

Total cost:

10 + 8 + 12 + 10 + 6 + 7 + 12 = 65

Final Answer:

[ \boxed{\text{Minimum TSP tour cost } = 65} ] [ \boxed{\text{Optimal path } = a \rightarrow c \rightarrow b \rightarrow d \rightarrow f \rightarrow e \rightarrow g \rightarrow a} ]

QUESTION 7 — SETS

Problem 1

Given:

  • n(F) = 50, n(C) = 40, n(B) = 35
  • n(F∩C) = 15, n(C∩B) = 12, n(F∩B) = 10
  • n(F∩C∩B) = 5

(a) Total number of people who like at least one sport

Use inclusion–exclusion:

[ n(F \cup C \cup B) = 50 + 40 + 35 - 15 - 12 - 10 + 5 ] Compute:

50 + 40 + 35 = 125 Subtract pairwise overlaps: 125 − (15+12+10)=125 − 37 = 88 Add triple overlap: 88 + 5 = 93

Answer 7.1(a): 93

(b) People who like only Football

Compute pair-only values first:

  • F∩C only = 15 − 5 = 10
  • F∩B only = 10 − 5 = 5

Only Football = n(F) − [ (F∩C only) + (F∩B only) + (all three) ] = 50 − (10 + 5 + 5) = 50 − 20 = 30

Answer 7.1(b): 30

(c) People who like exactly two sports

Exactly two = sum of the pair-only regions:

= (F∩C only) + (C∩B only) + (F∩B only) We have: F∩C only = 10, C∩B only = 12 − 5 = 7, F∩B only = 5

Exactly two = 10 + 7 + 5 = 22

Answer 7.1(c): 22

(d) Venn diagram (counts by region) — description you can draw:

Label three overlapping circles F, C, B. Put the central triple region = 5. Put pair-only regions: F∩C-only=10, C∩B-only=7, F∩B-only=5. Put single-only values: Only F =30, Only C = compute below, Only B = compute below.

You can compute Only C = n(C) − (F∩C only + C∩B only + triple) = 40 − (10 + 7 + 5) = 18. Only B = 35 − (7 + 5 + 5) = 18.

So the regions are (OnlyF, OnlyC, OnlyB) = (30, 18, 18), pair-only (10,7,5), triple 5.

Problem 2 (Tea/Coffee)

Given 300 students: n(Tea)=180, n(Coffee)=120, n(both)=70.

(a) Tea only

= 180 − 70 = 110

(b) Coffee only

= 120 − 70 = 50

(c) Neither

= total − union = 300 − [Tea only + Coffee only + both] = 300 − (110 + 50 + 70) = 300 − 230 = 70


IUS Preps - Your Academic Success Partner

Educational resources for IUS students.