Skip to main content

Chapter 1

Discrete Structures

TU BSc CSIT past exam questions

Past questions and answers

75 questions set from this chapter; 6 are most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 3 of 7 exams
  • 2075 · 5 marks

Solve the recurrence relation a_n = 5a_n-1 – 6a_n-2 with initial conditions a_0 = 1 and a_1 = 2.

Similar questions: Solve the recurrence relation a_n = 5a_n-1 (2078) · Solve the recurrence relation a_n = a_n−1 (2081)

Answer

The recurrence is an=5an−1−6an−2a_n=5a_{n-1}-6a_{n-2}, a linear homogeneous recurrence of order 2.

Characteristic equation

r2−5r+6=0⇒(r−2)(r−3)=0⇒r=2, 3r^2-5r+6=0 \Rightarrow (r-2)(r-3)=0 \Rightarrow r=2,\ 3

The roots are distinct, so the general solution is an=A⋅2n+B⋅3n.a_n=A\cdot 2^n+B\cdot 3^n.

Using the initial conditions

a0=A+B=1,a1=2A+3B=2a_0=A+B=1,\qquad a_1=2A+3B=2

From the first, A=1−BA=1-B. Substituting: 2−2B+3B=2⇒B=02-2B+3B=2\Rightarrow B=0, so A=1A=1.

an=2n\boxed{a_n=2^n}

Check: a2=5(2)−6(1)=4=22a_2=5(2)-6(1)=4=2^2 and a3=5(4)−6(2)=8=23a_3=5(4)-6(2)=8=2^3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • 2075 · 5 marks

Find the value of x such that x = 1 (mod 5) and x = 2 (mod 7) using Chinese remainder theorem.

Similar questions: Find the value of x such that (2076) · Use Chinese Remainder Theorem to find the (2079)

Answer

We solve x≡1(mod5)x\equiv 1 \pmod 5 and x≡2(mod7)x\equiv 2 \pmod 7. The moduli 5 and 7 are coprime, so the Chinese remainder theorem applies.

Step 1. M=5×7=35M=5\times 7=35, M1=M/5=7M_1=M/5=7, M2=M/7=5M_2=M/7=5.

Step 2. Inverses

  • y1y_1 with 7y1≡1(mod5)7y_1\equiv 1 \pmod 5: 7≡27\equiv 2, and 2⋅3=6≡12\cdot 3=6\equiv 1, so y1=3y_1=3.
  • y2y_2 with 5y2≡1(mod7)5y_2\equiv 1 \pmod 7: 5⋅3=15≡15\cdot 3=15\equiv 1, so y2=3y_2=3.

Step 3. Combine

x=a1M1y1+a2M2y2=1(7)(3)+2(5)(3)=21+30=51x = a_1M_1y_1+a_2M_2y_2 = 1(7)(3)+2(5)(3)=21+30=51

x≡51(mod35)⇒x≡16(mod35)x\equiv 51 \pmod{35}\Rightarrow x\equiv 16 \pmod{35}

Check: 16=5⋅3+116=5\cdot 3+1 and 16=7⋅2+216=7\cdot 2+2.

Hence x=16x=16 (the general solution is x=16+35kx=16+35k, k∈Zk\in\mathbb{Z}).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • 2076 · 10 marks

Find the value of x such that x = 1 (mod 3), x = 1 (mod 4), x = 1 (mod 5) and x = 0 (mod 7) using Chinese remainder theorem.

Similar questions: Find the value of x such that (2075) · Use Chinese Remainder Theorem to find the (2079)

Answer

We solve x≡1 ( mod 3),x≡1 ( mod 4),x≡1 ( mod 5),x≡0 ( mod 7).x\equiv1\ (\bmod 3),\quad x\equiv1\ (\bmod 4),\quad x\equiv1\ (\bmod 5),\quad x\equiv0\ (\bmod 7).

The moduli 3,4,5,73,4,5,7 are pairwise coprime, so the Chinese remainder theorem applies.

M=3⋅4⋅5⋅7=420M=3\cdot4\cdot5\cdot7=420.

mim_iaia_iMi=M/miM_i=M/m_iinverse yiy_i of Mi mod miM_i \bmod m_i
31140140≡2140\equiv2, 2⋅2=4≡12\cdot2=4\equiv1, so y1=2y_1=2
41105105≡1105\equiv1, so y2=1y_2=1
518484≡484\equiv4, 4⋅4=16≡14\cdot4=16\equiv1, so y3=4y_3=4
7060not needed since a4=0a_4=0

x=∑aiMiyi=1(140)(2)+1(105)(1)+1(84)(4)+0=280+105+336=721x=\sum a_iM_iy_i=1(140)(2)+1(105)(1)+1(84)(4)+0=280+105+336=721

x≡721(mod420)⇒x≡301(mod420)x\equiv721 \pmod{420}\Rightarrow x\equiv301 \pmod{420}

Check: 301=3⋅100+1301=3\cdot100+1, 301=4⋅75+1301=4\cdot75+1, 301=5⋅60+1301=5\cdot60+1, 301=7⋅43301=7\cdot43.

So x=301x=301 (general solution x=301+420kx=301+420k).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • 2078 · 5 marks

Solve the recurrence relation a_n = 5a_n-1 – 6a_n-2 with initial conditions a_0 = 1, a_1 = 4.

Similar questions: Solve the recurrence relation a_n = 5a_n-1 (2075) · Solve the recurrence relation a_n = a_n−1 (2081)

Answer

The recurrence an=5an−1−6an−2a_n = 5a_{n-1} - 6a_{n-2} is linear, homogeneous, with constant coefficients.

Characteristic equation:

r2−5r+6=0  ⟹  (r−2)(r−3)=0  ⟹  r=2, 3r^2 - 5r + 6 = 0 \implies (r-2)(r-3)=0 \implies r = 2,\ 3

The roots are distinct, so the general solution is

an=α 2n+β 3na_n = \alpha\,2^n + \beta\,3^n

Using the initial conditions:

  • a0=1a_0 = 1: α+β=1\alpha + \beta = 1
  • a1=4a_1 = 4: 2α+3β=42\alpha + 3\beta = 4

Subtracting twice the first equation from the second gives β=2\beta = 2, so α=−1\alpha = -1.

an=2⋅3n−2n\boxed{a_n = 2\cdot 3^n - 2^n}

Check: a1=6−2=4a_1 = 6 - 2 = 4. From the recurrence a2=5(4)−6(1)=14a_2 = 5(4) - 6(1) = 14, and the formula gives 2(9)−4=142(9) - 4 = 14. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • 2079 · 5 marks

Use Chinese Remainder Theorem to find the value of x such that x = 0 ( MOD 2) , x = 2 (MOD 3) and x = 3 (MOD 5).

Similar questions: Find the value of x such that (2075) · Find the value of x such that (2076)

Answer

Solve x≡0(mod2)x\equiv 0 \pmod 2, x≡2(mod3)x\equiv 2 \pmod 3, x≡3(mod5)x\equiv 3 \pmod 5.

The moduli 2, 3, 5 are pairwise coprime, so the Chinese Remainder Theorem applies.

M=2⋅3⋅5=30M = 2\cdot3\cdot5 = 30

For each modulus mim_i let Mi=M/miM_i = M/m_i and find yiy_i with Miyi≡1(modmi)M_i y_i \equiv 1 \pmod{m_i}.

iiaia_imim_iMiM_iyiy_i (inverse of MiM_i mod mim_i)
1021515≡1(mod2)⇒y1=115\equiv1 \pmod 2 \Rightarrow y_1=1
2231010≡1(mod3)⇒y2=110\equiv1 \pmod 3 \Rightarrow y_2=1
33566≡1(mod5)⇒y3=16\equiv1 \pmod 5 \Rightarrow y_3=1

x≡∑aiMiyi=0(15)(1)+2(10)(1)+3(6)(1)=38≡8(mod30)x \equiv \sum a_i M_i y_i = 0(15)(1) + 2(10)(1) + 3(6)(1) = 38 \equiv 8 \pmod{30}

x≡8(mod30)\boxed{x \equiv 8 \pmod{30}}

Check: 8 mod 2=08 \bmod 2 = 0, 8 mod 3=28 \bmod 3 = 2, 8 mod 5=38 \bmod 5 = 3. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • 2081 · 5 marks

Solve the recurrence relation a_n = a_n−1 + 2a_n−2 with initial conditions a_0​ = 2 and a_1​ = 7.

Similar questions: Solve the recurrence relation a_n = 5a_n-1 (2075) · Solve the recurrence relation a_n = 5a_n-1 (2078)

Answer

Recurrence: an=an−1+2an−2a_n=a_{n-1}+2a_{n-2}, a0=2a_0=2, a1=7a_1=7.

This is a linear homogeneous recurrence with constant coefficients. The characteristic equation is

r2−r−2=0  ⇒  (r−2)(r+1)=0  ⇒  r=2, −1.r^2-r-2=0 \;\Rightarrow\; (r-2)(r+1)=0 \;\Rightarrow\; r=2,\ -1.

The general solution is

an=α 2n+β (−1)n.a_n=\alpha\,2^n+\beta\,(-1)^n.

Use the initial conditions:

a0=α+β=2,a1=2α−β=7.a_0=\alpha+\beta=2,\qquad a_1=2\alpha-\beta=7.

Adding: 3α=93\alpha=9, so α=3\alpha=3 and β=−1\beta=-1.

an=3⋅2n−(−1)n\boxed{a_n=3\cdot 2^n-(-1)^n}

Check: a2=a1+2a0=7+4=11a_2=a_1+2a_0=7+4=11, and the formula gives 3⋅4−1=113\cdot4-1=11. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 10 marks

State pigeonhole principle. Solve the recurrence relation a_n = 3a_n-1 – 3a_n-2 + a_n-3 with initial conditions a_0=1 ,a_1 = 3, a_2=7.

Similar questions: State pigeonhole principle. Solve the recurrence relation (2080)

Answer

Pigeonhole principle

If k+1k+1 or more objects are placed into kk boxes, then at least one box contains two or more objects.

Generalised form: if NN objects are placed into kk boxes, some box contains at least ⌈N/k⌉\lceil N/k\rceil objects. Example: among any 13 people, at least two were born in the same month (13 objects, 12 boxes).

Solving the recurrence

an=3an−1−3an−2+an−3,a0=1, a1=3, a2=7.a_n=3a_{n-1}-3a_{n-2}+a_{n-3},\quad a_0=1,\ a_1=3,\ a_2=7.

Characteristic equation: r3−3r2+3r−1=0⇒(r−1)3=0,r^3-3r^2+3r-1=0\Rightarrow (r-1)^3=0, so r=1r=1 is a root of multiplicity 3. The general solution is an=(A+Bn+Cn2) 1n=A+Bn+Cn2.a_n=(A+Bn+Cn^2)\,1^n=A+Bn+Cn^2.

Initial conditions:

  • n=0n=0: A=1A=1.
  • n=1n=1: A+B+C=3⇒B+C=2A+B+C=3\Rightarrow B+C=2.
  • n=2n=2: A+2B+4C=7⇒2B+4C=6⇒B+2C=3A+2B+4C=7\Rightarrow 2B+4C=6\Rightarrow B+2C=3.

Subtracting gives C=1C=1, then B=1B=1.

an=n2+n+1\boxed{a_n=n^2+n+1}

Check: a3=3(7)−3(3)+1=13a_3=3(7)-3(3)+1=13 and 32+3+1=133^2+3+1=13.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Find the GCD of 24 and 32 using Extended Euclidean algorithm.

Similar questions: Find the GCD of 12 and 16 (2081)

Answer

Find gcd⁡(24,32)\gcd(24,32) and express it as a linear combination of 24 and 32.

Euclidean algorithm (forward):

32=1⋅24+832 = 1\cdot 24 + 8 24=3⋅8+024 = 3\cdot 8 + 0

The last non-zero remainder is 8, so gcd⁡(24,32)=8\gcd(24,32)=8.

Back substitution: from the first line,

8=32−1⋅24=1⋅32+(−1)⋅24.8 = 32 - 1\cdot 24 = 1\cdot 32 + (-1)\cdot 24.

So s=−1s=-1 (coefficient of 24) and t=1t=1 (coefficient of 32) satisfy 24s+32t=824s + 32t = 8.

gcd⁡(24,32)=8=(−1)(24)+(1)(32)\boxed{\gcd(24,32)=8 = (-1)(24) + (1)(32)}

Check: −24+32=8-24 + 32 = 8. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

State pigeonhole principle. Solve the recurrence relation a_n = 5a_n-1 – 6a_n-2 with initial conditions a_0 = 1 and a_1 = 3.

Similar questions: State pigeonhole principle. Solve the recurrence relation (2076)

Answer

(a) Pigeonhole principle. If k+1k+1 or more objects (pigeons) are placed into kk boxes (pigeonholes), then at least one box contains at least two objects.

Generalised form: if NN objects are placed into kk boxes, then some box contains at least ⌈N/k⌉\lceil N/k\rceil objects.

Example: among any 13 people, at least two were born in the same month, because 13>1213>12.

(b) Recurrence an=5an−1−6an−2a_n = 5a_{n-1} - 6a_{n-2}, a0=1a_0=1, a1=3a_1=3.

Characteristic equation:

r2−5r+6=0⇒(r−2)(r−3)=0⇒r=2,3.r^2-5r+6=0 \Rightarrow (r-2)(r-3)=0 \Rightarrow r=2,3.

General solution: an=α 2n+β 3na_n = \alpha\,2^n + \beta\,3^n.

  • a0=1a_0=1: α+β=1\alpha+\beta=1.
  • a1=3a_1=3: 2α+3β=32\alpha+3\beta=3.

From the first, α=1−β\alpha = 1-\beta, so 2−2β+3β=3⇒β=12 - 2\beta + 3\beta = 3 \Rightarrow \beta=1 and α=0\alpha=0.

an=3n\boxed{a_n = 3^n}

Check: a2=5(3)−6(1)=9=32a_2 = 5(3)-6(1)=9 = 3^2. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Find the GCD of 12 and 16 using Extended Euclidean Algorithm.

Similar questions: Find the GCD of 24 and 32 (2079)

Answer

GCD of 12 and 16 by the Extended Euclidean Algorithm.

Euclidean steps:

16=1⋅12+416 = 1\cdot 12 + 4 12=3⋅4+012 = 3\cdot 4 + 0

The last non-zero remainder is 4, so gcd⁡(12,16)=4\gcd(12,16)=4.

Back-substitution: from the first line,

4=16−1⋅12=(−1)⋅12+1⋅16.4 = 16 - 1\cdot 12 = (-1)\cdot 12 + 1\cdot 16.

So gcd⁡(12,16)=4=12s+16t\gcd(12,16)=4 = 12s+16t with s=−1, t=1s=-1,\ t=1.

Check: −12+16=4-12+16=4. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 10 marks

Consider a set U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. What will be the computer representation for set containing the numbers which are multiple of 3 not exceeding 6? Describe injective, Surjective and bijective function with example.

Answer

Computer representation of the set

The universal set is U={1,2,…,10}U=\{1,2,\dots,10\}. A subset is stored as a bit string of length 10, where bit ii is 1 if element ii belongs to the set and 0 otherwise.

The multiples of 3 not exceeding 6 are 33 and 66, so S={3,6}S=\{3,6\}.

Element12345678910
Bit0010010000

S=0010010000S = 0010010000

With this representation union is bitwise OR, intersection is bitwise AND and complement is bitwise NOT.

Types of functions (let f:A→Bf:A\to B)

Injective (one-to-one): different elements of AA have different images, i.e. f(a1)=f(a2)⇒a1=a2f(a_1)=f(a_2)\Rightarrow a_1=a_2. Example: f:Z→Zf:\mathbb{Z}\to\mathbb{Z}, f(x)=2x+1f(x)=2x+1. If 2x1+1=2x2+12x_1+1=2x_2+1 then x1=x2x_1=x_2. It is not onto, because even numbers are never obtained.

Surjective (onto): every element of BB is the image of at least one element of AA, i.e. range = codomain. Example: f:R→R≥0f:\mathbb{R}\to\mathbb{R}_{\ge 0}, f(x)=x2f(x)=x^2 is onto, since every y≥0y\ge 0 equals (y)2(\sqrt y)^2. It is not injective because f(2)=f(−2)=4f(2)=f(-2)=4.

Bijective: the function is both injective and surjective, so each element of BB has exactly one pre-image. Example: f:R→Rf:\mathbb{R}\to\mathbb{R}, f(x)=3x−5f(x)=3x-5. For any yy, x=(y+5)/3x=(y+5)/3 is the unique pre-image. A bijection has an inverse function, here f−1(y)=(y+5)/3f^{-1}(y)=(y+5)/3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 10 marks

Compute the following values. a. 3 mod 4 b. 7 mod 5 c. -5 mod 3 d. 11 mod 5 e. -8 mod 6 Write down the recursive algorithm to find the value of b^n and prove its correctness using induction.

Answer

(a) Values of mod

The remainder rr in a=dq+ra=dq+r always satisfies 0≤r<d0\le r<d.

  • 3 mod 4=33 \bmod 4 = 3, since 3=4⋅0+33=4\cdot 0+3.
  • 7 mod 5=27 \bmod 5 = 2, since 7=5⋅1+27=5\cdot 1+2.
  • −5 mod 3=1-5 \bmod 3 = 1, since −5=3⋅(−2)+1-5=3\cdot(-2)+1.
  • 11 mod 5=111 \bmod 5 = 1, since 11=5⋅2+111=5\cdot 2+1.
  • −8 mod 6=4-8 \bmod 6 = 4, since −8=6⋅(−2)+4-8=6\cdot(-2)+4.

(b) Recursive algorithm for bnb^n

procedure power(b, n)      // b real, n non-negative integer
    if n = 0 then
        return 1
    else
        return b * power(b, n - 1)

Proof of correctness by induction on nn

Claim: power(b,n)=bn\text{power}(b,n)=b^n for all n≥0n\ge 0.

Basis (n=0n=0): the algorithm returns 1=b01=b^0.

Inductive step: assume power(b,k)=bk\text{power}(b,k)=b^k for some k≥0k\ge 0 (inductive hypothesis). For n=k+1>0n=k+1>0 the algorithm returns b⋅power(b,k)=b⋅bk=bk+1.b\cdot \text{power}(b,k)=b\cdot b^k=b^{k+1}.

So the claim holds for k+1k+1. By mathematical induction the algorithm correctly computes bnb^n for every n≥0n\ge 0. It makes nn multiplications, so it runs in O(n)O(n) time.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

Prove that 5^n-1 is divisible by 4 using mathematical induction.

Answer

Claim: P(n):5n−1P(n): 5^n-1 is divisible by 4 for every integer n≥1n\ge 1.

Basis step (n=1n=1): 51−1=45^1-1=4, which is divisible by 4. So P(1)P(1) is true.

Inductive step: assume P(k)P(k) is true for some k≥1k\ge 1, i.e. 5k−1=4m5^k-1=4m for some integer mm. Then 5k=4m+15^k=4m+1, and 5k+1−1=5⋅5k−1=5(4m+1)−1=20m+4=4(5m+1).5^{k+1}-1=5\cdot 5^k-1=5(4m+1)-1=20m+4=4(5m+1).

Since 5m+15m+1 is an integer, 5k+1−15^{k+1}-1 is divisible by 4, so P(k+1)P(k+1) is true.

By the principle of mathematical induction, 5n−15^n-1 is divisible by 4 for all n≥1n\ge 1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

Let A = “Aldo is Italian” and B = “Bob is English”. Formalize the following sentences in proposition.
  • Aldo isn’t Italian.
  • Aldo is Italian while Bob is English.
  • If Aldo is Italian then Bob Bob is not English.
  • Aldo is Italian or if Aldo isn’t Italian then Bob is English.
  • Either Aldo is Italian and Bob is English, or neither Aldo is Italian nor Bob is English.

Answer

Let AA = "Aldo is Italian" and BB = "Bob is English".

  1. Aldo isn't Italian: ¬A\neg A
  2. Aldo is Italian while Bob is English ("while" means "and"): A∧BA\wedge B
  3. If Aldo is Italian then Bob is not English: A→¬BA\rightarrow \neg B
  4. Aldo is Italian or, if Aldo isn't Italian, then Bob is English: A∨(¬A→B)A\vee(\neg A\rightarrow B) This simplifies to A∨(A∨B)≡A∨BA\vee(A\vee B)\equiv A\vee B.
  5. Either Aldo is Italian and Bob is English, or neither is: (A∧B)∨(¬A∧¬B)(A\wedge B)\vee(\neg A\wedge \neg B) This is equivalent to the biconditional A↔BA\leftrightarrow B.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

Define Eular path and Hamilton path with examples. Draw the Hasse diagram for the divisible relation on the set { 1, 2, 5, 8, 16, 32} and find the maximal, minimal, greatest and least element if exist.

Answer

Euler path: a path in a graph that uses every edge exactly once. If it starts and ends at the same vertex it is an Euler circuit. A connected graph has an Euler circuit iff every vertex has even degree, and an Euler path (not circuit) iff exactly two vertices have odd degree. Example: the "envelope" graph, or a triangle aa-bb-cc-aa, which has the Euler circuit a,b,c,aa,b,c,a. For the graph with edges ab,bc,cd,bdab, bc, cd, bd, the degrees are a=1,b=3,c=2,d=2a=1, b=3, c=2, d=2, so exactly two odd vertices (aa, bb), and a b c d ba\,b\,c\,d\,b is an Euler path.

Hamilton path: a path that visits every vertex exactly once. If it returns to the start it is a Hamilton circuit. Example: in the square (cycle C4C_4) with vertices 1,2,3,41,2,3,4 and edges 12,23,34,4112,23,34,41, the path 1→2→3→41\to2\to3\to4 is a Hamilton path and 1→2→3→4→11\to2\to3\to4\to1 is a Hamilton circuit.

Hasse diagram of divisibility on {1,2,5,8,16,32}\{1,2,5,8,16,32\}

Divisibility relations: 11 divides everything; 2∣8,16,322\mid 8,16,32; 8∣16,328\mid 16,32; 16∣3216\mid 32; 55 divides only itself and nothing else in the set. The covering pairs are 1 ⁣− ⁣2, 1 ⁣− ⁣5, 2 ⁣− ⁣8, 8 ⁣− ⁣16, 16 ⁣− ⁣321\!-\!2,\ 1\!-\!5,\ 2\!-\!8,\ 8\!-\!16,\ 16\!-\!32.

        32
         |
        16
         |
         8
         |
         2      5
          \    /
            1
  • Maximal elements: 3232 and 55 (nothing above them).
  • Minimal element: 11.
  • Greatest element: none, because 55 and 3232 are not comparable, so no single element is above all.
  • Least element: 11, since 11 divides every element.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

What does primality testing means? Describe how Fermat’s Little Theorem tests for a prime number with suitable example.

Answer

Primality testing means deciding whether a given integer n>1n>1 is prime (has no divisors other than 1 and nn) or composite. For large nn (as in RSA key generation) trial division is too slow, so fast tests such as Fermat's test are used.

Fermat's Little Theorem: if pp is prime and aa is an integer not divisible by pp, then ap−1≡1(modp).a^{p-1}\equiv 1 \pmod p.

Test: to test nn, pick a base aa with 1<a<n1<a<n and gcd⁡(a,n)=1\gcd(a,n)=1, and compute an−1 mod na^{n-1}\bmod n by fast modular exponentiation.

  • If the result is not 1, then nn is definitely composite.
  • If the result is 1, then nn is probably prime. Repeat with other bases to raise confidence.

Example 1 (n=15n=15, a=2a=2): 24=16≡1(mod15)2^4=16\equiv 1 \pmod{15}, so 214=(24)3⋅22≡4(mod15)2^{14}=(2^4)^3\cdot 2^2\equiv 4 \pmod{15}. This is not 1, so 15 is composite.

Example 2 (n=11n=11, a=3a=3): 35=243=22⋅11+1≡13^5=243=22\cdot 11+1\equiv 1, so 310≡1(mod11)3^{10}\equiv 1 \pmod{11}. It passes, and 11 is indeed prime.

Limitation: the converse of the theorem is false. Composite numbers that pass the test for a base aa are pseudoprimes (e.g. 341341 for a=2a=2), and Carmichael numbers such as 561561 pass for every base coprime to them. So a pass shows only "probably prime".

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

List any two applications of conditional probability. You have 9 families you would like to invite to a wedding. Unfortunately, you can only invite 6 families. How many different sets of invitations could you write?

Answer

Two applications of conditional probability

  1. Medical diagnosis: the probability that a patient has a disease given a positive test result, P(disease∣positive)P(\text{disease}\mid\text{positive}), is found using Bayes' theorem, which is built on conditional probability.
  2. Spam filtering: the probability that an email is spam given that it contains certain words, P(spam∣word)P(\text{spam}\mid\text{word}) (naive Bayes classifier).

(Others: quality control in manufacturing, weather forecasting, risk assessment in insurance.)

Number of invitation sets

Choosing which 6 of the 9 families to invite is a combination (order does not matter):

(96)=9!6! 3!=9⋅8⋅73⋅2⋅1=84.\binom{9}{6}=\frac{9!}{6!\,3!}=\frac{9\cdot 8\cdot 7}{3\cdot 2\cdot 1}=84.

So 84 different sets of invitations can be written.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

Define spanning tree and minimum spanning tree. Mention the conditions for two graphs for being isomorphic with an example.

Answer

Spanning tree: for a connected graph GG, a spanning tree is a subgraph that contains all the vertices of GG, is connected, and has no cycles (so it is a tree). A graph with nn vertices has a spanning tree with exactly n−1n-1 edges.

Minimum spanning tree (MST): for a connected weighted graph, the spanning tree whose total edge weight is the smallest among all spanning trees. It is found by Kruskal's or Prim's algorithm.

Isomorphic graphs: G1=(V1,E1)G_1=(V_1,E_1) and G2=(V2,E2)G_2=(V_2,E_2) are isomorphic if there is a bijection f:V1→V2f:V_1\to V_2 such that u,vu,v are adjacent in G1G_1 iff f(u),f(v)f(u),f(v) are adjacent in G2G_2.

Necessary conditions (if any fails, the graphs are not isomorphic):

  1. The same number of vertices.
  2. The same number of edges.
  3. The same degree sequence.
  4. The same number of cycles of each length and the same connectivity.

These conditions are necessary but not sufficient, so finally an explicit adjacency-preserving bijection must be exhibited.

Example: G1G_1 has edges ab,bc,cd,daab, bc, cd, da and G2G_2 has edges 13,32,24,4113, 32, 24, 41. Both have 4 vertices, 4 edges and all degrees 2. The map a→1, b→3, c→2, d→4a\to1,\ b\to3,\ c\to2,\ d\to4 sends ab→13, bc→32, cd→24, da→41ab\to13,\ bc\to32,\ cd\to24,\ da\to41, so every edge maps to an edge. Hence G1≅G2G_1\cong G_2 (both are the cycle C4C_4).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2075 · 5 marks

Prove that the product xy is odd if and only if both x and y are odd integers .

Answer

Claim: for integers x,yx,y, the product xyxy is odd if and only if both xx and yy are odd.

(⇒\Rightarrow) If xyxy is odd then xx and yy are both odd. We prove the contrapositive: if xx or yy is even, then xyxy is even. Suppose xx is even, x=2kx=2k. Then xy=2(ky)xy=2(ky), which is even. The case yy even is the same by symmetry. So if xyxy is odd, neither can be even, so both are odd.

(⇐\Leftarrow) If xx and yy are both odd then xyxy is odd. Let x=2a+1x=2a+1 and y=2b+1y=2b+1. Then xy=(2a+1)(2b+1)=4ab+2a+2b+1=2(2ab+a+b)+1,xy=(2a+1)(2b+1)=4ab+2a+2b+1=2(2ab+a+b)+1, which has the form 2m+12m+1, so xyxy is odd.

Both directions hold, so xyxy is odd iff both xx and yy are odd. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Prove that for every positive integer n ≥ 1, n^2+n is even integer using mathematical induction.

Answer

Claim: P(n):n2+nP(n): n^2+n is even for every integer n≥1n\ge1.

Basis (n=1n=1): 12+1=21^2+1=2, which is even.

Inductive step: assume k2+kk^2+k is even for some k≥1k\ge1, say k2+k=2mk^2+k=2m. Then (k+1)2+(k+1)=k2+2k+1+k+1=(k2+k)+2(k+1)=2m+2(k+1)=2(m+k+1),(k+1)^2+(k+1)=k^2+2k+1+k+1=(k^2+k)+2(k+1)=2m+2(k+1)=2(m+k+1), which is even.

By mathematical induction, n2+nn^2+n is even for all n≥1n\ge1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

All over smart people are stupid. Children of stupid people are naughty. John is a children of Jane. Jane is over smart. Represent these statements in FOPL and prove that John is naughty.

Answer

Predicates: OS(x)OS(x): xx is over smart; S(x)S(x): xx is stupid; C(x,y)C(x,y): xx is a child of yy; N(x)N(x): xx is naughty.

Statements in FOPL

  1. All over smart people are stupid: ∀x (OS(x)→S(x))\forall x\,(OS(x)\rightarrow S(x))
  2. Children of stupid people are naughty: ∀x ∀y ((C(x,y)∧S(y))→N(x))\forall x\,\forall y\,\big((C(x,y)\wedge S(y))\rightarrow N(x)\big)
  3. John is a child of Jane: C(John,Jane)C(John, Jane)
  4. Jane is over smart: OS(Jane)OS(Jane)

Proof that N(John)N(John)

StepStatementReason
1∀x (OS(x)→S(x))\forall x\,(OS(x)\rightarrow S(x))Premise
2OS(Jane)→S(Jane)OS(Jane)\rightarrow S(Jane)Universal instantiation of 1 with x=Janex=Jane
3OS(Jane)OS(Jane)Premise
4S(Jane)S(Jane)Modus ponens on 2, 3
5∀x ∀y ((C(x,y)∧S(y))→N(x))\forall x\,\forall y\,((C(x,y)\wedge S(y))\rightarrow N(x))Premise
6(C(John,Jane)∧S(Jane))→N(John)(C(John,Jane)\wedge S(Jane))\rightarrow N(John)Universal instantiation of 5
7C(John,Jane)C(John,Jane)Premise
8C(John,Jane)∧S(Jane)C(John,Jane)\wedge S(Jane)Conjunction of 7, 4
9N(John)N(John)Modus ponens on 6, 8

Hence John is naughty. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Which of the following are possets?
  • (Z, =)
  • (Z, ≠)
  • (Z, ⊆)

Answer

A poset (S,R)(S,R) needs RR to be reflexive, antisymmetric and transitive on SS.

(Z,=)(\mathbb{Z},=): reflexive (a=aa=a), antisymmetric (a=ba=b and b=ab=a imply a=ba=b) and transitive. It is a poset.

(Z,≠)(\mathbb{Z},\neq): not reflexive, since a≠aa\neq a is false. It is also not antisymmetric: 1≠21\neq2 and 2≠12\neq1 both hold, yet 1≠21\ne2. It is not a poset.

(Z,⊆)(\mathbb{Z},\subseteq): the relation ⊆\subseteq is defined between sets, and integers are not sets, so ⊆\subseteq is not a relation on Z\mathbb{Z} and the structure is not a poset. (If the intended structure were the power set (P(S),⊆)(P(S),\subseteq), it would be a poset, since ⊆\subseteq is reflexive, antisymmetric and transitive.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Define reflexive closure and symmetric closure. Find the remainder when 4x^2 – x + 3 is divided by x + 2 using remainder theorem.

Answer

Reflexive closure: the reflexive closure of a relation RR on a set AA is the smallest reflexive relation containing RR: R∪Δ,Δ={(a,a)∣a∈A}.R\cup\Delta,\quad \Delta=\{(a,a)\mid a\in A\}. Example: A={1,2,3}A=\{1,2,3\}, R={(1,2),(2,3)}R=\{(1,2),(2,3)\}. The reflexive closure is {(1,2),(2,3),(1,1),(2,2),(3,3)}\{(1,2),(2,3),(1,1),(2,2),(3,3)\}.

Symmetric closure: the smallest symmetric relation containing RR: R∪R−1,R−1={(b,a)∣(a,b)∈R}.R\cup R^{-1},\quad R^{-1}=\{(b,a)\mid (a,b)\in R\}. For the same RR, the symmetric closure is {(1,2),(2,1),(2,3),(3,2)}\{(1,2),(2,1),(2,3),(3,2)\}.

Remainder theorem: when a polynomial f(x)f(x) is divided by x−cx-c, the remainder is f(c)f(c).

Here f(x)=4x2−x+3f(x)=4x^2-x+3 and the divisor is x+2=x−(−2)x+2=x-(-2), so c=−2c=-2: f(−2)=4(4)−(−2)+3=16+2+3=21.f(-2)=4(4)-(-2)+3=16+2+3=21.

The remainder is 2121.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Define Euler path and Hamilton path. Give examples of both Euler and Hamilton path.

Answer

Euler path: a path that uses every edge of the graph exactly once. If it begins and ends at the same vertex it is an Euler circuit. A connected graph has an Euler circuit iff all vertices have even degree, and an Euler path that is not a circuit iff exactly two vertices have odd degree.

Example: the graph with vertices a,b,c,da,b,c,d and edges ab,bc,cd,bdab, bc, cd, bd has degrees a=1,b=3,c=2,d=2a=1,b=3,c=2,d=2. Exactly two vertices are odd, so it has an Euler path: a→b→c→d→ba\to b\to c\to d\to b (all four edges used once). A triangle a,b,ca,b,c has the Euler circuit a→b→c→aa\to b\to c\to a.

Hamilton path: a path that visits every vertex exactly once (edges may be left unused). If it returns to its start it is a Hamilton circuit.

Example: in the cycle C5C_5 with vertices 1,2,3,4,51,2,3,4,5 and edges 12,23,34,45,5112,23,34,45,51, the path 1→2→3→4→51\to2\to3\to4\to5 is a Hamilton path, and adding the edge 5→15\to1 gives a Hamilton circuit. In the graph above, a→b→c→da\to b\to c\to d is a Hamilton path.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

How many 3 digits numbers can be formed from the digits 1,2,3,4 and 5 assuming that:
  • Repetitions of digits are allowed
  • Repetitions of digits are not allowed

Answer

We form 3-digit numbers from the digits 1,2,3,4,51,2,3,4,5 (5 digits), using the multiplication principle on the three positions.

(a) Repetition allowed: each of the 3 positions can be filled in 5 ways. 5×5×5=125.5\times5\times5=125.

(b) Repetition not allowed: the first position has 5 choices, the second 4, the third 3. 5×4×3=5P3=5!2!=60.5\times4\times3={}^5P_3=\frac{5!}{2!}=60.

So there are 125 numbers with repetition and 60 without.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

What is minimum spanning tree? Explain Kruskal’s algorithm for finding minimum spanning tree.

Answer

Minimum spanning tree (MST): for a connected, weighted, undirected graph, a spanning tree (connected, acyclic, containing all vertices) whose total edge weight is minimum among all spanning trees.

Kruskal's algorithm (greedy, edge-based)

  1. Sort all edges in non-decreasing order of weight.
  2. Start with an empty forest TT (each vertex is its own component).
  3. Take the next smallest edge. If it joins two different components (adding it creates no cycle), add it to TT; otherwise discard it.
  4. Stop when TT has n−1n-1 edges (for nn vertices).
KRUSKAL(G):
    T = empty set
    sort edges of G by weight
    for each edge (u, v) in sorted order:
        if find(u) != find(v):      // different components
            T = T + {(u, v)}
            union(u, v)
    return T

Cycle detection is done efficiently with the union-find structure. Time complexity is O(Elog⁡E)O(E\log E), dominated by sorting.

Example: vertices A,B,C,D,EA,B,C,D,E; edges AB=1, BC=2, AC=3, CD=4, BD=5, DE=6, CE=7AB=1,\ BC=2,\ AC=3,\ CD=4,\ BD=5,\ DE=6,\ CE=7.

  • AB(1)AB(1): accept.
  • BC(2)BC(2): accept.
  • AC(3)AC(3): rejected, forms the cycle A,B,CA,B,C.
  • CD(4)CD(4): accept.
  • BD(5)BD(5): rejected, forms a cycle.
  • DE(6)DE(6): accept. Now 4 edges =n−1=n-1, so stop.

MST edges: AB,BC,CD,DEAB, BC, CD, DE with total weight 1+2+4+6=131+2+4+6=13.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

List any two applications of graph coloring theorem. Prove that “A tree with n vertices has n-1 edges”

Answer

Two applications of graph colouring

  1. Scheduling / timetabling: vertices are exams (or classes), an edge joins two that share a student, and colours are time slots. The chromatic number is the minimum number of slots needed.
  2. Register allocation in compilers: vertices are variables, an edge joins variables live at the same time, and colours are CPU registers.

(Others: map colouring, frequency assignment for radio/mobile towers, Sudoku.)

Theorem: a tree with nn vertices has n−1n-1 edges.

Proof by induction on nn.

Basis: n=1n=1. A tree with one vertex has 0=n−10=n-1 edges.

Inductive step: assume every tree with kk vertices has k−1k-1 edges, and let TT be a tree with k+1≥2k+1\ge2 vertices. A tree with at least 2 vertices has a leaf (take a longest path; its end vertex has degree 1, otherwise the path could be extended or a cycle would exist). Remove a leaf vv and its one edge. The result T′T' is still connected and acyclic, so it is a tree with kk vertices, and by the hypothesis it has k−1k-1 edges. Adding vv and its edge back gives (k−1)+1=k=(k+1)−1(k-1)+1=k=(k+1)-1 edges for TT.

By induction, every tree with nn vertices has n−1n-1 edges. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Define ceiling and floor function. Why do we need Inclusion – Exclusion principle? Make it clear with suitable example.

Answer

Floor and ceiling functions

  • The floor ⌊x⌋\lfloor x\rfloor is the greatest integer less than or equal to xx. Example: ⌊3.7⌋=3\lfloor 3.7\rfloor=3, ⌊−2.3⌋=−3\lfloor -2.3\rfloor=-3.
  • The ceiling ⌈x⌉\lceil x\rceil is the least integer greater than or equal to xx. Example: ⌈3.2⌉=4\lceil 3.2\rceil=4, ⌈−2.3⌉=−2\lceil -2.3\rceil=-2.

Why we need the inclusion-exclusion principle

When counting the elements in a union of sets that overlap, simply adding the sizes counts the common elements more than once. Inclusion-exclusion corrects for this: ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A\cup B|=|A|+|B|-|A\cap B| ∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|

Example: how many integers from 1 to 100 are divisible by 2 or 5?

  • ∣A∣|A| (divisible by 2) =⌊100/2⌋=50=\lfloor100/2\rfloor=50
  • ∣B∣|B| (divisible by 5) =⌊100/5⌋=20=\lfloor100/5\rfloor=20
  • ∣A∩B∣|A\cap B| (divisible by 10) =⌊100/10⌋=10=\lfloor100/10\rfloor=10

∣A∪B∣=50+20−10=60.|A\cup B|=50+20-10=60.

Adding without the correction would give 70, wrongly counting the 10 multiples of 10 twice.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Prove that for all integers x and y, if x^2 + y^2 is even then x + y is even. Using induction prove that 1^3 + 2^3 + 3^3 + ………………. + n^3 = n^2(n + 1)^2 / 4

Answer

(a) If x2+y2x^2+y^2 is even then x+yx+y is even

Proof by contrapositive. Suppose x+yx+y is odd. Then one of x,yx,y is even and the other is odd; say x=2ax=2a and y=2b+1y=2b+1. Then x2+y2=4a2+4b2+4b+1=2(2a2+2b2+2b)+1,x^2+y^2=4a^2+4b^2+4b+1=2(2a^2+2b^2+2b)+1, which is odd. So if x+yx+y is odd then x2+y2x^2+y^2 is odd. By the contrapositive, if x2+y2x^2+y^2 is even then x+yx+y is even. ■\blacksquare

(b) 13+23+⋯+n3=n2(n+1)241^3+2^3+\dots+n^3=\dfrac{n^2(n+1)^2}{4} by induction

Basis (n=1n=1): LHS =1=1, RHS =1⋅44=1=\dfrac{1\cdot4}{4}=1. True.

Inductive step: assume it holds for n=kn=k: 13+⋯+k3=k2(k+1)24.1^3+\dots+k^3=\frac{k^2(k+1)^2}{4}. Then for n=k+1n=k+1, ∑i=1k+1i3=k2(k+1)24+(k+1)3=(k+1)2[k2+4(k+1)]4=(k+1)2(k+2)24,\sum_{i=1}^{k+1}i^3=\frac{k^2(k+1)^2}{4}+(k+1)^3=\frac{(k+1)^2\left[k^2+4(k+1)\right]}{4}=\frac{(k+1)^2(k+2)^2}{4}, since k2+4k+4=(k+2)2k^2+4k+4=(k+2)^2. This is the formula for n=k+1n=k+1.

By mathematical induction the formula holds for all n≥1n\ge1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

State division and remainder algorithm. Suppose that the domain of the propositional function P(x) consists of the integer 0, 1, 2, 3 and 4. Write out each of the following propositions using disjunctions, conjunctions and negations.
  • ∃x P(x)
  • ∀x P(x)
  • ∃x ¬P(x)
  • ∀x ¬P(x)
  • ¬∃x P(x)
  • ¬∀x P(x)

Answer

Division algorithm: if aa is an integer and dd is a positive integer, there exist unique integers qq (quotient) and rr (remainder) such that a=dq+r,0≤r<d.a=dq+r,\qquad 0\le r<d. Here q=a div dq=a\ \mathrm{div}\ d and r=a mod dr=a\bmod d. Example: 17=5⋅3+217=5\cdot3+2.

Expansions over the domain {0,1,2,3,4}\{0,1,2,3,4\}

  • ∃x P(x)\exists x\,P(x): P(0)∨P(1)∨P(2)∨P(3)∨P(4)P(0)\vee P(1)\vee P(2)\vee P(3)\vee P(4)
  • ∀x P(x)\forall x\,P(x): P(0)∧P(1)∧P(2)∧P(3)∧P(4)P(0)\wedge P(1)\wedge P(2)\wedge P(3)\wedge P(4)
  • ∃x ¬P(x)\exists x\,\neg P(x): ¬P(0)∨¬P(1)∨¬P(2)∨¬P(3)∨¬P(4)\neg P(0)\vee \neg P(1)\vee \neg P(2)\vee \neg P(3)\vee \neg P(4)
  • ∀x ¬P(x)\forall x\,\neg P(x): ¬P(0)∧¬P(1)∧¬P(2)∧¬P(3)∧¬P(4)\neg P(0)\wedge \neg P(1)\wedge \neg P(2)\wedge \neg P(3)\wedge \neg P(4)
  • ¬∃x P(x)\neg\exists x\,P(x): ¬(P(0)∨P(1)∨P(2)∨P(3)∨P(4))≡¬P(0)∧¬P(1)∧¬P(2)∧¬P(3)∧¬P(4)\neg\big(P(0)\vee P(1)\vee P(2)\vee P(3)\vee P(4)\big)\equiv \neg P(0)\wedge \neg P(1)\wedge \neg P(2)\wedge \neg P(3)\wedge \neg P(4)
  • ¬∀x P(x)\neg\forall x\,P(x): ¬(P(0)∧P(1)∧P(2)∧P(3)∧P(4))≡¬P(0)∨¬P(1)∨¬P(2)∨¬P(3)∨¬P(4)\neg\big(P(0)\wedge P(1)\wedge P(2)\wedge P(3)\wedge P(4)\big)\equiv \neg P(0)\vee \neg P(1)\vee \neg P(2)\vee \neg P(3)\vee \neg P(4)

By De Morgan's laws, ¬∃x P(x)≡∀x ¬P(x)\neg\exists x\,P(x)\equiv\forall x\,\neg P(x) and ¬∀x P(x)≡∃x ¬P(x)\neg\forall x\,P(x)\equiv\exists x\,\neg P(x).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is the coefficient of x^2 in (1 + x)^11? Describe how relation can be represented using matrix.

Answer

Coefficient of x2x^2 in (1+x)11(1+x)^{11}

By the binomial theorem, (1+x)11=∑k=011(11k)xk(1+x)^{11}=\sum_{k=0}^{11}\binom{11}{k}x^k, so the coefficient of x2x^2 is (112)=11⋅102=55.\binom{11}{2}=\frac{11\cdot10}{2}=55.

Representing a relation by a matrix

Let RR be a relation from A={a1,…,am}A=\{a_1,\dots,a_m\} to B={b1,…,bn}B=\{b_1,\dots,b_n\}. Its zero-one matrix MR=[mij]M_R=[m_{ij}] is m×nm\times n with mij={1(ai,bj)∈R0(ai,bj)∉R.m_{ij}=\begin{cases}1 & (a_i,b_j)\in R\\ 0 & (a_i,b_j)\notin R.\end{cases}

Example: A={1,2,3}A=\{1,2,3\}, R={(1,1),(1,2),(2,2),(3,1),(3,3)}R=\{(1,1),(1,2),(2,2),(3,1),(3,3)\}: MR=[110010101]M_R=\begin{bmatrix}1&1&0\\0&1&0\\1&0&1\end{bmatrix}

Properties read from the matrix:

  • RR is reflexive if all diagonal entries are 1.
  • RR is symmetric if MR=MRTM_R=M_R^{T}.
  • RR is antisymmetric if mij=1m_{ij}=1 with i≠ji\ne j forces mji=0m_{ji}=0.
  • Union and intersection correspond to entry-wise OR and AND: MR1∪R2=MR1∨MR2M_{R_1\cup R_2}=M_{R_1}\vee M_{R_2}, MR1∩R2=MR1∧MR2M_{R_1\cap R_2}=M_{R_1}\wedge M_{R_2}.
  • The composite relation is the Boolean product: MS∘R=MR⊙MSM_{S\circ R}=M_R\odot M_S.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Prove that if n is positive integer, then n is odd if and only if 5n + 6 is odd.

Answer

Claim: for a positive integer nn, nn is odd   ⟺  \iff 5n+65n+6 is odd. We prove both directions.

(a) If nn is odd, then 5n+65n+6 is odd (direct proof). Let n=2k+1n = 2k+1 for some integer kk. Then

5n+6=5(2k+1)+6=10k+11=2(5k+5)+1,5n + 6 = 5(2k+1) + 6 = 10k + 11 = 2(5k+5) + 1,

which is of the form 2m+12m+1, so 5n+65n+6 is odd.

(b) If 5n+65n+6 is odd, then nn is odd (proof by contrapositive). The contrapositive is: if nn is even, then 5n+65n+6 is even. Let n=2kn = 2k. Then

5n+6=10k+6=2(5k+3),5n + 6 = 10k + 6 = 2(5k+3),

which is even. The contrapositive is true, so the original statement is true.

From (a) and (b), nn is odd if and only if 5n+65n+6 is odd. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Define preposition. Consider the argument “John, a student in this class knows how to write program in C. Everyone who knows how to write program in C can get a high paying job. Therefore, someone in this class can get high paying job”. Now, explain which rules of inferences are sed for each step.

Answer

Proposition: a proposition (statement) is a declarative sentence that is either true or false, but not both. For example, "Kathmandu is the capital of Nepal" is a proposition (true). "Close the door" and "What is your name?" are not propositions.

Argument. Let

  • C(x)C(x): xx is a student in this class
  • P(x)P(x): xx knows how to write a program in C
  • H(x)H(x): xx can get a high paying job

Premises: C(John)∧P(John)C(\text{John}) \wedge P(\text{John}) and ∀x (P(x)→H(x))\forall x\,(P(x) \to H(x)). Conclusion: ∃x (C(x)∧H(x))\exists x\,(C(x) \wedge H(x)).

StepStatementReason (rule of inference)
1C(John)∧P(John)C(\text{John}) \wedge P(\text{John})Premise
2P(John)P(\text{John})Simplification, from 1
3∀x (P(x)→H(x))\forall x\,(P(x) \to H(x))Premise
4P(John)→H(John)P(\text{John}) \to H(\text{John})Universal instantiation, from 3
5H(John)H(\text{John})Modus ponens, from 2 and 4
6C(John)C(\text{John})Simplification, from 1
7C(John)∧H(John)C(\text{John}) \wedge H(\text{John})Conjunction, from 5 and 6
8∃x (C(x)∧H(x))\exists x\,(C(x) \wedge H(x))Existential generalization, from 7

Hence someone in this class can get a high paying job, and the argument is valid.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Show that if there are 30 students in a class, then at least two have same names that begin with the same letter. Explain the pascal’s triangle.

Answer

(a) Names beginning with the same letter. Treat the 26 letters of the English alphabet as the pigeonholes (boxes) and the 30 students as the pigeons. Each student is placed in the box for the first letter of his or her name.

Since 30>2630 > 26, the pigeonhole principle says at least one box contains at least ⌈30/26⌉=2\lceil 30/26 \rceil = 2 students. So at least two students have names beginning with the same letter. ■\blacksquare

(b) Pascal's triangle. Pascal's triangle is a triangular array in which row nn (starting from row 0) lists the binomial coefficients (n0),(n1),…,(nn)\binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n}. Each entry is the sum of the two entries just above it:

(nk)=(n−1k−1)+(n−1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}

The edges of the triangle are all 1.

              1
            1   1
          1   2   1
        1   3   3   1
      1   4   6   4   1
    1   5  10  10   5   1

Properties:

  • Row nn gives the coefficients in the expansion of (x+y)n(x+y)^n. For example, (x+y)4=x4+4x3y+6x2y2+4xy3+y4(x+y)^4 = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4.
  • The entries of row nn sum to 2n2^n.
  • The triangle is symmetric: (nk)=(nn−k)\binom{n}{k} = \binom{n}{n-k}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Illustrate the Dijkstra’s Algorithm to find the shortest path from source node to destination node with an example.

Answer

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

Algorithm

  1. Set d(source)=0d(\text{source}) = 0 and d(v)=∞d(v) = \infty for every other vertex vv. Mark all vertices unvisited.
  2. Choose the unvisited vertex uu with the smallest d(u)d(u) and mark it visited.
  3. For each unvisited neighbour vv of uu, if d(u)+w(u,v)<d(v)d(u) + w(u,v) < d(v), update d(v)=d(u)+w(u,v)d(v) = d(u) + w(u,v) and record uu as the predecessor of vv.
  4. Repeat from step 2 until the destination is visited (or all vertices are visited).

Example. Edges: A-B=7A\text{-}B = 7, A-C=9A\text{-}C = 9, A-F=14A\text{-}F = 14, B-C=10B\text{-}C = 10, B-D=15B\text{-}D = 15, C-D=11C\text{-}D = 11, C-F=2C\text{-}F = 2, D-E=6D\text{-}E = 6, E-F=9E\text{-}F = 9. Source AA, destination EE.

Visited vertexBBCCDDEEFF
start (AA = 0)∞\infty∞\infty∞\infty∞\infty∞\infty
AA (0)79∞\infty∞\infty14
BB (7)7922∞\infty14
CC (9)7920∞\infty11
FF (11)79202011
DD (20)79202011

Vertex EE is reached with distance 20 through FF, and FF was reached through CC, which was reached from AA.

Shortest path from AA to EE: A→C→F→EA \to C \to F \to E, with length 9+2+9=209 + 2 + 9 = 20.

The other shortest distances are d(B)=7d(B)=7, d(C)=9d(C)=9, d(F)=11d(F)=11, d(D)=20d(D)=20 (path A→C→DA \to C \to D).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What are the significance of Minimum Spanning Tree? Describe how Kruskal’s algorithm can be used to find the MST.

Answer

Minimum spanning tree (MST). A spanning tree of a connected weighted graph is a subgraph that includes all vertices, is connected and has no cycle (so it has n−1n-1 edges for nn vertices). The MST is the spanning tree with the least total edge weight.

Significance

  • It gives the cheapest way to connect all nodes, for example laying cable, roads, pipelines or electric lines between towns.
  • It is used in designing computer and telecommunication networks with minimum wiring cost.
  • It is used in clustering, image segmentation and as a step in approximation algorithms (for example the travelling salesman problem).
  • It helps remove redundant links while keeping the network connected.

Kruskal's algorithm (greedy, edge-based)

  1. Sort all edges in non-decreasing order of weight.
  2. Start with an empty set TT of edges.
  3. Take the next smallest edge. If adding it to TT does not create a cycle, add it; otherwise discard it.
  4. Stop when TT has n−1n-1 edges.

Cycle detection is done with a disjoint-set (union-find) structure. Running time is O(Elog⁡E)O(E\log E).

Example. Edges: C-F=2C\text{-}F = 2, D-E=6D\text{-}E = 6, A-B=7A\text{-}B = 7, A-C=9A\text{-}C = 9, E-F=9E\text{-}F = 9, B-C=10B\text{-}C = 10, C-D=11C\text{-}D = 11, A-F=14A\text{-}F = 14, B-D=15B\text{-}D = 15 (6 vertices, so 5 edges are needed).

EdgeWeightDecision
C-FC\text{-}F2accept
D-ED\text{-}E6accept
A-BA\text{-}B7accept
A-CA\text{-}C9accept (joins {A,B}\{A,B\} and {C,F}\{C,F\})
E-FE\text{-}F9accept (joins {A,B,C,F}\{A,B,C,F\} and {D,E}\{D,E\})

Five edges have been chosen, so the algorithm stops. The remaining edges would create cycles.

MST weight=2+6+7+9+9=33\text{MST weight} = 2 + 6 + 7 + 9 + 9 = 33

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Define zero-one matrix. Explain the types of function.

Answer

Zero-one matrix. A zero-one (Boolean) matrix is a matrix whose every entry is either 0 or 1. Such matrices are used to represent relations and graphs. For example,

A=[101011]A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}

is a 2×32\times 3 zero-one matrix. Operations on them include join A∨BA \vee B (entrywise OR), meet A∧BA \wedge B (entrywise AND) and the Boolean product A⊙BA \odot B.

Types of functions. Let f:A→Bf: A \to B.

  1. One-to-one (injective): different elements of AA have different images, so f(a1)=f(a2)⇒a1=a2f(a_1)=f(a_2) \Rightarrow a_1=a_2. Example: f(x)=2x+1f(x)=2x+1 on R\mathbb{R}.
  2. Onto (surjective): every element of BB is the image of at least one element of AA, so the range equals BB. Example: f(x)=x3f(x)=x^3 from R\mathbb{R} to R\mathbb{R}.
  3. One-to-one correspondence (bijective): both injective and surjective. Only a bijective function has an inverse f−1f^{-1}.
  4. Constant function: f(x)=cf(x)=c for all xx.
  5. Identity function: IA(x)=xI_A(x)=x for all x∈Ax \in A.
  6. Inverse function: for a bijection ff, f−1(y)=xf^{-1}(y)=x iff f(x)=yf(x)=y.
  7. Composite function: (g∘f)(x)=g(f(x))(g\circ f)(x) = g(f(x)).
  8. Into function: a function that is not onto.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Represent any three set operations using Venn-diagram. Give a recursive defined function to find the factorial of any given positive integer.

Answer

(a) Set operations using Venn diagrams. Let UU be the universal set (the rectangle) and AA, BB two overlapping circles inside it.

  1. Union A∪BA \cup B: the elements in AA, or in BB, or in both. Shade both circles completely.
  2. Intersection A∩BA \cap B: the elements in both AA and BB. Shade only the lens-shaped overlap of the two circles.
  3. Difference A−BA - B: the elements in AA but not in BB. Shade the part of circle AA outside the overlap.
  4. Complement AcA^c: the elements of UU not in AA. Shade everything in the rectangle outside circle AA.
 +---------------------------+
 |  U                        |
 |     ( A  (////) B )       |     //// = A ∩ B (shaded)
 |                           |
 +---------------------------+

(b) Recursively defined factorial.

n!={1n=0n⋅(n−1)!n≥1n! = \begin{cases} 1 & n = 0 \\ n\cdot (n-1)! & n \ge 1 \end{cases}

The first line is the basis step and the second is the recursive step. For example, 4!=4⋅3!=4⋅3⋅2!=4⋅3⋅2⋅1!=4⋅3⋅2⋅1⋅0!=244! = 4\cdot 3! = 4\cdot 3\cdot 2! = 4\cdot3\cdot2\cdot1! = 4\cdot3\cdot2\cdot1\cdot 0! = 24.

As a function in C:

long factorial(int n) {
    if (n == 0)            /* basis */
        return 1;
    return n * factorial(n - 1);   /* recursive step */
}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

How do you plot the function on graph? Determine whether the function f(x) = x^2 is injective, surjective or bijective with reasons. Solve the recurrence relation a_n = 6a_n-1 – 9a_n-2 with initial conditions a_0 = 1 and a_1 = 6.

Answer

(a) Plotting a function on a graph.

  1. Choose the domain and make a table of values of xx and y=f(x)y=f(x).
  2. Treat each pair (x,f(x))(x, f(x)) as a point on the Cartesian plane.
  3. Plot the points and join them by a smooth curve (for a continuous function on R\mathbb{R}), or leave them as separate dots (for a function on integers).

For f(x)=x2f(x)=x^2:

xx−3-3−2-2−1-100112233
f(x)f(x)9410149

Plotting these gives a U-shaped parabola with its vertex at the origin, symmetric about the yy-axis.

(b) f(x)=x2f(x)=x^2 with f:R→Rf:\mathbb{R}\to\mathbb{R}.

  • Injective? No. f(2)=f(−2)=4f(2)=f(-2)=4 but 2≠−22\ne -2.
  • Surjective? No. There is no real xx with x2=−1x^2=-1, so negative numbers are not in the range [0,∞)[0,\infty).
  • Bijective? No, because it is neither injective nor surjective.

(Restricting to f:[0,∞)→[0,∞)f:[0,\infty)\to[0,\infty) makes it bijective.)

(c) Recurrence an=6an−1−9an−2a_n = 6a_{n-1} - 9a_{n-2}, a0=1a_0=1, a1=6a_1=6.

Characteristic equation: r2−6r+9=0⇒(r−3)2=0r^2-6r+9=0 \Rightarrow (r-3)^2=0, giving a repeated root r=3r=3. The general solution is

an=(α+βn) 3na_n = (\alpha + \beta n)\,3^n

  • a0=1a_0=1: α=1\alpha = 1.
  • a1=6a_1=6: 3(α+β)=6⇒β=13(\alpha+\beta)=6 \Rightarrow \beta = 1.

an=(n+1) 3n\boxed{a_n = (n+1)\,3^n}

Check: a2=6(6)−9(1)=27a_2 = 6(6)-9(1)=27 and the formula gives 3⋅9=273\cdot 9=27. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

A group of 8 scientist is composed of 5 chemist and 3 biologist. In how many ways can a committe of 5 be formed that has 3 chemist and 2 biologist? Using mathematical induction prove that 1^3 + 2^3 + 3^3 + ……………….. + n^3 = n^2(n + 1)^2 / 4) for n ≥ 1.

Answer

(a) Committee selection. Choose 3 chemists from 5 and 2 biologists from 3:

(53)(32)=10×3=30\binom{5}{3}\binom{3}{2} = 10 \times 3 = 30

There are 30 ways.

(b) Prove by induction that 13+23+⋯+n3=n2(n+1)241^3+2^3+\dots+n^3 = \dfrac{n^2(n+1)^2}{4} for n≥1n\ge 1.

Basis step (n=1n=1): LHS =1=1, RHS =1⋅44=1=\dfrac{1\cdot 4}{4}=1. True.

Inductive hypothesis: assume for some k≥1k\ge1

13+23+⋯+k3=k2(k+1)24.1^3+2^3+\dots+k^3 = \frac{k^2(k+1)^2}{4}.

Inductive step: we show it for n=k+1n=k+1. Adding (k+1)3(k+1)^3 to both sides:

13+⋯+k3+(k+1)3=k2(k+1)24+(k+1)3=(k+1)2[k2+4(k+1)]41^3+\dots+k^3+(k+1)^3 = \frac{k^2(k+1)^2}{4} + (k+1)^3 = \frac{(k+1)^2\left[k^2 + 4(k+1)\right]}{4}

=(k+1)2(k2+4k+4)4=(k+1)2(k+2)24,= \frac{(k+1)^2(k^2+4k+4)}{4} = \frac{(k+1)^2(k+2)^2}{4},

which is the formula with n=k+1n=k+1.

By the principle of mathematical induction, the formula holds for all n≥1n\ge 1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

List any one example of tautology. Represent the following sentences into predicate logic.
  • Not all employees are loyal
  • All students having good attitude are lovable.

Answer

Example of a tautology. A tautology is a compound proposition that is true for every assignment of truth values. An example is p∨¬pp \vee \neg p:

pp¬p\neg pp∨¬pp\vee\neg p
TFT
FTT

Predicate logic.

(a) Not all employees are loyal. Let E(x)E(x): xx is an employee and L(x)L(x): xx is loyal.

¬ ∀x (E(x)→L(x))  ≡  ∃x (E(x)∧¬L(x))\neg\,\forall x\,(E(x)\to L(x)) \;\equiv\; \exists x\,(E(x)\wedge \neg L(x))

(b) All students having good attitude are lovable. Let S(x)S(x): xx is a student, G(x)G(x): xx has good attitude, V(x)V(x): xx is lovable.

∀x ((S(x)∧G(x))→V(x))\forall x\,\big((S(x)\wedge G(x)) \to V(x)\big)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Prove that “If the product of two integers a and b are even then either a is even or b is even”, using the contradiction method.

Answer

Claim: if the product abab of two integers is even, then aa is even or bb is even.

Proof by contradiction. Suppose, for contradiction, that abab is even but neither aa nor bb is even, that is, both aa and bb are odd.

Write a=2m+1a = 2m+1 and b=2n+1b = 2n+1 for integers m,nm, n. Then

ab=(2m+1)(2n+1)=4mn+2m+2n+1=2(2mn+m+n)+1,ab = (2m+1)(2n+1) = 4mn + 2m + 2n + 1 = 2(2mn+m+n) + 1,

which is odd. This contradicts the assumption that abab is even.

So the supposition is false, and at least one of aa, bb must be even. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Define bipartile graph with example. State the necessary conditions for the graphs to be isomorphic.

Answer

Bipartite graph. A graph G=(V,E)G=(V,E) is bipartite if its vertex set can be split into two disjoint sets V1V_1 and V2V_2 such that every edge joins a vertex in V1V_1 to a vertex in V2V_2. No edge joins two vertices of the same set. Equivalently, the graph has no odd-length cycle, and its vertices can be coloured with two colours so that adjacent vertices differ.

Example. Take V1={a,b}V_1=\{a,b\}, V2={x,y,z}V_2=\{x,y,z\} and edges ax,ay,bx,bzax, ay, bx, bz. Every edge goes between V1V_1 and V2V_2, so the graph is bipartite. The complete bipartite graph Km,nK_{m,n} has every vertex of V1V_1 joined to every vertex of V2V_2.

Conditions for two graphs G1G_1 and G2G_2 to be isomorphic. There must be a one-to-one correspondence between their vertices that preserves adjacency. The following are necessary conditions (if any fails, the graphs are not isomorphic):

  1. The same number of vertices.
  2. The same number of edges.
  3. The same degree sequence (the same number of vertices of each degree).
  4. The same number of cycles of each length (for example both have a triangle, or neither does).
  5. If one is connected, the other is connected; they have the same number of components.
  6. The same invariants such as the circuit/path structure, and bipartiteness.

These conditions are necessary but not sufficient, so to prove isomorphism an explicit adjacency-preserving mapping must be given.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Given the premises “If it rains or strike holds then the exam will be cancelled. If the doesn’t rain then it will be sunny day. The exam was not cancelled. show that it is sunny day”.

Answer

Let

  • RR: it rains
  • SS: the strike holds
  • CC: the exam is cancelled
  • UU: it is a sunny day

Premises:

  1. (R∨S)→C(R\vee S)\to C
  2. ¬R→U\neg R \to U
  3. ¬C\neg C

Conclusion: UU.

StepStatementReason
1(R∨S)→C(R\vee S)\to CPremise
2¬C\neg CPremise
3¬(R∨S)\neg(R\vee S)Modus tollens, from 1 and 2
4¬R∧¬S\neg R \wedge \neg SDe Morgan's law, from 3
5¬R\neg RSimplification, from 4
6¬R→U\neg R\to UPremise
7UUModus ponens, from 5 and 6

Hence it is a sunny day. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Find the value of -2 MOD 3 and 3^1^5 MOD 5. Illustrate an example to show the join operation between any two boolean matrixes.

Answer

(a) −2 mod 3-2 \bmod 3. Write −2=3(−1)+1-2 = 3(-1) + 1 with 0≤1<30\le 1<3. So

−2 mod 3=1.-2 \bmod 3 = 1.

(b) 315 mod 53^{15} \bmod 5. 31≡33^1\equiv3, 32≡43^2\equiv4, 33≡23^3\equiv2, 34≡1(mod5)3^4\equiv1 \pmod 5. Since 15=4⋅3+315 = 4\cdot3 + 3,

315=(34)3⋅33≡1⋅2=2(mod5).3^{15} = (3^4)^3\cdot 3^3 \equiv 1\cdot 2 = 2 \pmod 5.

So 315 mod 5=23^{15} \bmod 5 = 2.

(c) Join of two Boolean matrices. The join A∨BA\vee B is the entrywise OR: (A∨B)ij=aij∨bij(A\vee B)_{ij} = a_{ij}\vee b_{ij} (1 if either entry is 1). Both matrices must have the same size.

A=[101010100],B=[001110001]A=\begin{bmatrix}1&0&1\\0&1&0\\1&0&0\end{bmatrix},\quad B=\begin{bmatrix}0&0&1\\1&1&0\\0&0&1\end{bmatrix}

A∨B=[1∨00∨01∨10∨11∨10∨01∨00∨00∨1]=[101110101]A\vee B=\begin{bmatrix}1\vee0&0\vee0&1\vee1\\0\vee1&1\vee1&0\vee0\\1\vee0&0\vee0&0\vee1\end{bmatrix}=\begin{bmatrix}1&0&1\\1&1&0\\1&0&1\end{bmatrix}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Given an example of fallacy. State the necessary and sufficient conditions for a graph to have Euler path and Euler circuit.

Answer

Fallacy. A fallacy is an incorrect argument that looks like valid reasoning. Example of the fallacy of affirming the conclusion:

"If it rains, the ground is wet. The ground is wet. Therefore it rained."

In symbols, ((p→q)∧q)→p((p\to q)\wedge q)\to p is not a tautology (take pp false, qq true). The ground may be wet because of a sprinkler. Another common fallacy is denying the hypothesis: ((p→q)∧¬p)→¬q((p\to q)\wedge\neg p)\to\neg q.

Euler path and Euler circuit. An Euler circuit is a closed walk that uses every edge exactly once; an Euler path is a walk that uses every edge exactly once and need not return to the start. For a graph with edges, the graph must be connected (ignoring isolated vertices).

  • Euler circuit exists if and only if GG is connected and every vertex has even degree.
  • Euler path (not a circuit) exists if and only if GG is connected and has exactly two vertices of odd degree. The path must start at one odd vertex and end at the other.

For directed graphs: an Euler circuit exists iff the graph is (weakly) connected and for every vertex in-degree equals out-degree.

Example. The 4-cycle C4C_4 has all vertices of degree 2, so it has an Euler circuit. A path graph on 3 vertices has two odd (degree 1) vertices, so it has an Euler path but no circuit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Explain strong induction in detail. What is recursively defined function? Use mathematical induction to prove 7^n+2 + 8^2^n+1 is divisible by 57.

Answer

(a) Strong induction. Strong (complete) induction proves a statement P(n)P(n) for all integers n≥n0n\ge n_0 in two steps.

  1. Basis step: prove P(n0)P(n_0) (sometimes several base cases P(n0),…,P(n0+j)P(n_0),\dots,P(n_0+j) are needed).
  2. Inductive step: assume P(n0),P(n0+1),…,P(k)P(n_0), P(n_0+1),\dots,P(k) are all true (the strong hypothesis), and prove P(k+1)P(k+1).

In ordinary induction only P(k)P(k) is assumed. Both are equivalent in power, but strong induction is convenient when P(k+1)P(k+1) depends on several earlier cases, not just the previous one. Examples: every integer n≥2n\ge2 is a product of primes; every postage amount of 12 Rs or more can be made with 4 Rs and 5 Rs stamps.

(b) Recursively defined function. A function is recursively defined if its value at nn is given in terms of its values at smaller arguments, with some initial values stated explicitly.

  • Basis: specify f(0)f(0) (or the first few values).
  • Recursive step: a rule to compute f(n)f(n) from f(n−1),f(n−2),…f(n-1), f(n-2),\dots

Example: f(0)=1f(0)=1, f(n)=n f(n−1)f(n)=n\,f(n-1) defines n!n!. The Fibonacci function f(0)=0f(0)=0, f(1)=1f(1)=1, f(n)=f(n−1)+f(n−2)f(n)=f(n-1)+f(n-2) is another.

(c) Prove 7n+2+82n+17^{n+2} + 8^{2n+1} is divisible by 57 for all n≥0n\ge0.

Basis (n=0n=0): 72+81=49+8=57=57⋅17^2 + 8^1 = 49 + 8 = 57 = 57\cdot1. True.

Hypothesis: assume 7k+2+82k+17^{k+2}+8^{2k+1} is divisible by 57 for some k≥0k\ge0.

Step:

7k+3+82k+3=7⋅7k+2+64⋅82k+17^{k+3} + 8^{2k+3} = 7\cdot7^{k+2} + 64\cdot 8^{2k+1} =7(7k+2+82k+1)+(64−7) 82k+1= 7\left(7^{k+2}+8^{2k+1}\right) + (64-7)\,8^{2k+1} =7(7k+2+82k+1)+57⋅82k+1.= 7\left(7^{k+2}+8^{2k+1}\right) + 57\cdot 8^{2k+1}.

The first term is divisible by 57 by the hypothesis, and the second term clearly is. So 7(k+1)+2+82(k+1)+17^{(k+1)+2}+8^{2(k+1)+1} is divisible by 57.

By mathematical induction the statement holds for all n≥0n\ge0. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Explain the principle of inclusion and exclusion. How many integers from 1 to 30 are multiples of 2 or 3?

Answer

Principle of inclusion and exclusion. To count the elements in a union of sets, add the sizes of the sets and then correct for the overlaps counted more than once.

For two sets:

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A\cup B| = |A|+|B|-|A\cap B|

For three sets:

∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣|A\cup B\cup C| = |A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|

In general, sizes of intersections of an odd number of sets are added and those of an even number are subtracted.

Multiples of 2 or 3 from 1 to 30. Let AA be the multiples of 2 and BB the multiples of 3.

  • ∣A∣=⌊30/2⌋=15|A| = \lfloor 30/2\rfloor = 15
  • ∣B∣=⌊30/3⌋=10|B| = \lfloor 30/3\rfloor = 10
  • ∣A∩B∣|A\cap B| = multiples of 6 =⌊30/6⌋=5=\lfloor 30/6\rfloor = 5

∣A∪B∣=15+10−5=20|A\cup B| = 15+10-5 = 20

There are 20 such integers.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Give the example of ceiling, floor and boolean function. How do you plot the graph of the function?

Answer

Floor function. ⌊x⌋\lfloor x\rfloor is the greatest integer less than or equal to xx. Example: ⌊3.7⌋=3\lfloor 3.7\rfloor = 3, ⌊−2.3⌋=−3\lfloor -2.3\rfloor = -3.

Ceiling function. ⌈x⌉\lceil x\rceil is the smallest integer greater than or equal to xx. Example: ⌈3.2⌉=4\lceil 3.2\rceil = 4, ⌈−2.3⌉=−2\lceil -2.3\rceil = -2.

Boolean function. A function f:{0,1}n→{0,1}f:\{0,1\}^n\to\{0,1\}. Example: f(x,y)=x⋅y+xˉf(x,y)=x\cdot y + \bar{x}, with values

xxyyf(x,y)f(x,y)
001
011
100
111

Plotting the graph of a function.

  1. Fix the domain and make a table of xx and f(x)f(x) values.
  2. Draw the xx-axis and yy-axis with a suitable scale.
  3. Plot each point (x,f(x))(x,f(x)).
  4. Join the points: with a smooth curve if the function is continuous, but for a step function such as the floor function, draw horizontal segments with a filled dot at the left end and an open dot at the right end.

For example, f(x)=⌊x⌋f(x)=\lfloor x\rfloor:

xx[0,1)[0,1)[1,2)[1,2)[2,3)[2,3)
f(x)f(x)012

The graph is a staircase of unit-length horizontal steps, rising by 1 at each integer. For a Boolean function the graph consists of isolated points.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Using Chinese remainder theorem solve the following congruences. x = 1 (MOD 3) x = 3 (MOD 5) x = 6 (MOD 7)

Answer

Solve x≡1(mod3)x\equiv1\pmod3, x≡3(mod5)x\equiv3\pmod5, x≡6(mod7)x\equiv6\pmod7.

The moduli are pairwise coprime, so apply the Chinese Remainder Theorem.

M=3⋅5⋅7=105M=3\cdot5\cdot7=105

iiaia_imim_iMi=M/miM_i=M/m_iyiy_i with Miyi≡1(modmi)M_iy_i\equiv1 \pmod{m_i}
1133535≡2(mod3)35\equiv2 \pmod 3, and 2⋅2=4≡12\cdot2=4\equiv1, so y1=2y_1=2
2352121≡1(mod5)21\equiv1 \pmod 5, so y2=1y_2=1
3671515≡1(mod7)15\equiv1 \pmod 7, so y3=1y_3=1

x≡1(35)(2)+3(21)(1)+6(15)(1)=70+63+90=223≡13(mod105)x\equiv 1(35)(2)+3(21)(1)+6(15)(1) = 70+63+90 = 223 \equiv 13 \pmod{105}

x≡13(mod105)\boxed{x\equiv 13 \pmod{105}}

Check: 13 mod 3=113\bmod3=1, 13 mod 5=313\bmod5=3, 13 mod 7=613\bmod7=6. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Find the multiplicative inverse of 4 in Z_11 using extended euclidean algorithm.

Answer

Find 4−14^{-1} in Z11\mathbb{Z}_{11}, that is, xx with 4x≡1(mod11)4x\equiv1\pmod{11}. Since gcd⁡(4,11)=1\gcd(4,11)=1 the inverse exists.

Euclidean algorithm:

11=2⋅4+311 = 2\cdot4 + 3 4=1⋅3+14 = 1\cdot3 + 1 3=3⋅1+03 = 3\cdot1 + 0

Back substitution:

1=4−1⋅3=4−(11−2⋅4)=3⋅4−1⋅11.1 = 4 - 1\cdot3 = 4 - (11-2\cdot4) = 3\cdot4 - 1\cdot 11.

Taking this modulo 11: 3⋅4≡1(mod11)3\cdot4\equiv1\pmod{11}.

4−1=3 in Z11\boxed{4^{-1}=3 \text{ in } \mathbb{Z}_{11}}

Check: 4×3=12=11+1≡14\times3=12=11+1\equiv1. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Express the following sentences using quantifier. a. Not all people are loyal. b. Everybody loves somebody. c. Someone has passed the exam. d. Aquatic animals can’t live without water. e. Some subjects are not interesting.

Answer

(a) Not all people are loyal. Let L(x)L(x): xx is loyal (domain: people).

¬∀x L(x)  ≡  ∃x ¬L(x)\neg\forall x\,L(x) \;\equiv\; \exists x\,\neg L(x)

(b) Everybody loves somebody. Let Love(x,y)Love(x,y): xx loves yy (domain: people).

∀x ∃y  Love(x,y)\forall x\,\exists y\; Love(x,y)

(c) Someone has passed the exam. Let P(x)P(x): xx has passed the exam.

∃x P(x)\exists x\,P(x)

(d) Aquatic animals can't live without water. Let A(x)A(x): xx is an aquatic animal and W(x)W(x): xx can live without water.

∀x (A(x)→¬W(x))\forall x\,\big(A(x)\to\neg W(x)\big)

(e) Some subjects are not interesting. Let S(x)S(x): xx is a subject and I(x)I(x): xx is interesting.

∃x (S(x)∧¬I(x))\exists x\,\big(S(x)\wedge\neg I(x)\big)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is proof by contradiction? Give a proof by contradiction to show that if 3n+2 is odd then n is odd.

Answer

Proof by contradiction. To prove a statement PP, we assume that PP is false (that is, ¬P\neg P holds) and reason logically until we reach a contradiction, either with a known fact or with the assumption itself. Since the assumption ¬P\neg P leads to an impossible situation, ¬P\neg P must be false and so PP is true. For an implication p→qp \to q we assume pp is true and qq is false, and derive a contradiction.

Claim: If 3n+23n+2 is odd, then nn is odd.

Proof. Suppose 3n+23n+2 is odd but nn is not odd, that is, nn is even. Then n=2kn = 2k for some integer kk, and

3n+2=3(2k)+2=6k+2=2(3k+1),3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k+1),

which is even. This contradicts the hypothesis that 3n+23n+2 is odd. So our assumption that nn is even is false, and therefore nn is odd. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

State the necessary conditions for two graphs to be isomorphic. How many different words from “MANAGER” can be generated with or without meaning?

Answer

Necessary conditions for two graphs G1G_1 and G2G_2 to be isomorphic. If G1≅G2G_1 \cong G_2, then there is a one-to-one, onto mapping of vertices that preserves adjacency, so the following isomorphism invariants must be equal in both graphs:

  1. The same number of vertices.
  2. The same number of edges.
  3. The same degree sequence (the same number of vertices of each degree).
  4. The same number of connected components.
  5. Corresponding subgraph structure is preserved, for example the same number of cycles of each length, and a circuit or a simple cycle of a given length exists in both.

These conditions are necessary but not sufficient: if any one of them fails the graphs are not isomorphic, but if all hold the graphs may still be non-isomorphic.

Number of words from MANAGER. The word has 7 letters, in which A occurs twice and every other letter (M, N, G, E, R) once. The number of different arrangements (with or without meaning) is

7!2!=50402=2520.\frac{7!}{2!} = \frac{5040}{2} = 2520.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Define symmetric closure. What is the symmetric closure of the relation R = {(1,1), (1,2), (2,2), (2,3), (3,1), (3,2)} on the set A = {1,2,3}?

Answer

Symmetric closure. The symmetric closure of a relation RR on a set AA is the smallest symmetric relation on AA that contains RR. It is obtained by adding to RR every pair (b,a)(b,a) for which (a,b)∈R(a,b)\in R, that is,

Sym(R)=R∪R−1.\text{Sym}(R) = R \cup R^{-1}.

Given: R={(1,1),(1,2),(2,2),(2,3),(3,1),(3,2)}R = \{(1,1),(1,2),(2,2),(2,3),(3,1),(3,2)\} on A={1,2,3}A=\{1,2,3\}.

The inverse relation is

R−1={(1,1),(2,1),(2,2),(3,2),(1,3),(2,3)}.R^{-1} = \{(1,1),(2,1),(2,2),(3,2),(1,3),(2,3)\}.

Hence

R∪R−1={(1,1),(1,2),(2,1),(2,2),(2,3),(3,2),(1,3),(3,1)}.R \cup R^{-1} = \{(1,1),(1,2),(2,1),(2,2),(2,3),(3,2),(1,3),(3,1)\}.

Check: (1,2),(2,1)(1,2),(2,1); (2,3),(3,2)(2,3),(3,2); (1,3),(3,1)(1,3),(3,1) all occur together, and (1,1),(2,2)(1,1),(2,2) are self-paired, so the relation is symmetric.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

list any four rules of inference. Using direct and indirect proof show that, for any real number x, if x^3 – 7x^2 + x – 7 = 0, then x = 7.

Answer

Rules of inference (any four).

RuleForm
Modus ponensp, p→q  ∴  qp,\ p\to q \;\therefore\; q
Modus tollens¬q, p→q  ∴  ¬p\neg q,\ p\to q \;\therefore\; \neg p
Hypothetical syllogismp→q, q→r  ∴  p→rp\to q,\ q\to r \;\therefore\; p\to r
Disjunctive syllogismp∨q, ¬p  ∴  qp\lor q,\ \neg p \;\therefore\; q
Additionp  ∴  p∨qp \;\therefore\; p\lor q
Simplificationp∧q  ∴  pp\land q \;\therefore\; p

Claim: For real xx, if x3−7x2+x−7=0x^3-7x^2+x-7=0 then x=7x=7.

First factor the polynomial:

x3−7x2+x−7=x2(x−7)+1 (x−7)=(x−7)(x2+1).x^3-7x^2+x-7 = x^2(x-7)+1\,(x-7) = (x-7)(x^2+1).

Direct proof. Assume x3−7x2+x−7=0x^3-7x^2+x-7=0. Then (x−7)(x2+1)=0(x-7)(x^2+1)=0. For real xx, x2≥0x^2\ge 0, so x2+1≥1>0x^2+1\ge 1>0 and x2+1≠0x^2+1\neq 0. Dividing by x2+1x^2+1 gives x−7=0x-7=0, so x=7x=7. ■\blacksquare

Indirect proof (contrapositive). We prove: if x≠7x\neq 7 then x3−7x2+x−7≠0x^3-7x^2+x-7\neq 0. Let x≠7x\neq 7. Then x−7≠0x-7\neq 0, and x2+1≥1≠0x^2+1\ge 1\neq 0. The product of two non-zero real numbers is non-zero, so

(x−7)(x2+1)≠0,(x-7)(x^2+1)\neq 0,

that is, x3−7x2+x−7≠0x^3-7x^2+x-7\neq 0. The contrapositive is true, so the original statement is true. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

What are the necessary and sufficient conditions for graphs to have Euler path only and Euler circuit? Let R be a relation defined on set of natural numbers N, such that a,b∈N,aRb  ⟺  ab=2k, where k ∈ {0,1,2,…}. Show that R is a partial ordering relation on N.

Answer

Euler path and Euler circuit. Let GG be a connected graph (ignoring isolated vertices).

  • Euler circuit exists if and only if GG is connected and every vertex has even degree.
  • Euler path only (a path that is not a circuit) exists if and only if GG is connected and has exactly two vertices of odd degree. The path must start at one odd vertex and end at the other.

(For a directed graph: a circuit needs in-degree equal to out-degree at every vertex; a path needs this at all but two vertices, one with out-degree −- in-degree =1=1 and one with in-degree −- out-degree =1=1.)

Partial order. The relation is aRb  ⟺  a/b=2kaRb \iff a/b = 2^k for some k∈{0,1,2,… }k\in\{0,1,2,\dots\} (that is, a=2kba = 2^k b), on the set N\mathbb N.

Reflexive. For any a∈Na\in\mathbb N, a/a=1=20a/a = 1 = 2^0, so aRaaRa.

Antisymmetric. Let aRbaRb and bRabRa. Then a/b=2ka/b=2^k and b/a=2mb/a=2^m with k,m≥0k,m\ge 0. Multiplying, 1=2k+m1 = 2^{k+m}, so k+m=0k+m=0. Since k,m≥0k,m\ge 0, k=m=0k=m=0, hence a/b=1a/b=1 and a=ba=b.

Transitive. Let aRbaRb and bRcbRc. Then a/b=2ka/b=2^k and b/c=2mb/c=2^m, so

ac=ab⋅bc=2k+m,k+m≥0,\frac{a}{c}=\frac{a}{b}\cdot\frac{b}{c}=2^{k+m},\qquad k+m\ge 0,

so aRcaRc.

The relation is reflexive, antisymmetric and transitive, so RR is a partial ordering on N\mathbb N. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Determine whether the function f(x) = x-1, from set of integers to the set of integers is injective, surjective or bijective. Write the type of Fuzzy set operations with their defination. Give the floor and ceiling value of 1.2 and -1.2.

Answer

Function f(x)=x−1f(x)=x-1 from Z\mathbb Z to Z\mathbb Z.

  • Injective: if f(a)=f(b)f(a)=f(b) then a−1=b−1a-1=b-1, so a=ba=b. Hence ff is one-to-one.
  • Surjective: for any y∈Zy\in\mathbb Z, take x=y+1∈Zx=y+1\in\mathbb Z. Then f(x)=yf(x)=y. Hence ff is onto.

Since it is both, ff is bijective, with inverse f−1(y)=y+1f^{-1}(y)=y+1.

Fuzzy set operations. For fuzzy sets AA and BB with membership functions μA\mu_A and μB\mu_B, for every xx in the universe:

  • Union: μA∪B(x)=max⁡{μA(x),μB(x)}\mu_{A\cup B}(x)=\max\{\mu_A(x),\mu_B(x)\}
  • Intersection: μA∩B(x)=min⁡{μA(x),μB(x)}\mu_{A\cap B}(x)=\min\{\mu_A(x),\mu_B(x)\}
  • Complement: μAˉ(x)=1−μA(x)\mu_{\bar A}(x)=1-\mu_A(x)
  • Equality: A=BA=B if μA(x)=μB(x)\mu_A(x)=\mu_B(x) for all xx.
  • Subset: A⊆BA\subseteq B if μA(x)≤μB(x)\mu_A(x)\le\mu_B(x) for all xx.

Floor and ceiling. The floor ⌊x⌋\lfloor x\rfloor is the greatest integer ≤x\le x; the ceiling ⌈x⌉\lceil x\rceil is the least integer ≥x\ge x.

⌊1.2⌋=1,⌈1.2⌉=2,⌊−1.2⌋=−2,⌈−1.2⌉=−1.\lfloor 1.2\rfloor = 1,\quad \lceil 1.2\rceil = 2,\quad \lfloor -1.2\rfloor = -2,\quad \lceil -1.2\rceil = -1.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Using mathematical induction show that 2+5+8+…+(3n−1)=n(3n+1)2​.2+5+8+…+(3n−1) = \frac{{n(3n+1)}}{{2​}}.

Answer

To prove: P(n): 2+5+8+⋯+(3n−1)=n(3n+1)2P(n):\ 2+5+8+\cdots+(3n-1)=\dfrac{n(3n+1)}{2} for all n≥1n\ge 1.

Basis step (n=1n=1). LHS =3(1)−1=2=3(1)-1=2. RHS =1⋅42=2=\dfrac{1\cdot 4}{2}=2. So P(1)P(1) is true.

Inductive step. Assume P(k)P(k) is true for some k≥1k\ge 1:

2+5+⋯+(3k−1)=k(3k+1)2.2+5+\cdots+(3k-1)=\frac{k(3k+1)}{2}.

Add the next term 3(k+1)−1=3k+23(k+1)-1=3k+2 to both sides:

2+5+⋯+(3k−1)+(3k+2)=k(3k+1)2+(3k+2)=3k2+k+6k+42=3k2+7k+42.2+5+\cdots+(3k-1)+(3k+2)=\frac{k(3k+1)}{2}+(3k+2)=\frac{3k^2+k+6k+4}{2}=\frac{3k^2+7k+4}{2}.

Since 3k2+7k+4=(k+1)(3k+4)3k^2+7k+4=(k+1)(3k+4),

=(k+1)(3k+4)2=(k+1) (3(k+1)+1)2,=\frac{(k+1)(3k+4)}{2}=\frac{(k+1)\,(3(k+1)+1)}{2},

which is P(k+1)P(k+1). By the principle of mathematical induction, P(n)P(n) holds for all n≥1n\ge 1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

State sum rule and product rule. If 26 integers are chosen from the set of consecutive integers {1,2,3,…,50}, prove that there are sure to be two numbers so that one is multiple of the other.

Answer

Sum rule. If a task can be done in one of n1n_1 ways or in one of n2n_2 ways, and no way in the first set is also in the second, then the task can be done in n1+n2n_1+n_2 ways.

Product rule. If a task is made of two successive steps, the first done in n1n_1 ways and the second (for each way of the first) in n2n_2 ways, then the whole task can be done in n1⋅n2n_1\cdot n_2 ways.

Proof of the claim (pigeonhole principle). Every integer nn in {1,…,50}\{1,\dots,50\} can be written as n=2a⋅mn=2^a\cdot m with a≥0a\ge 0 and mm odd. The odd part mm lies in {1,3,5,…,49}\{1,3,5,\dots,49\}, which has 25 elements. These 25 odd numbers are the pigeonholes.

We choose 26 integers, so two of them, say xx and yy with x<yx<y, have the same odd part mm:

x=2am,y=2bm,a<b (since x<y).x=2^a m,\qquad y=2^b m,\qquad a<b\ (\text{since } x<y).

Then y/x=2b−ay/x=2^{b-a} is an integer, so xx divides yy; that is, one is a multiple of the other. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Discuss about meet and join operation between Boolean matrices. What are the values of 5 mod 75 and −5 mod 7?

Answer

Meet and join of Boolean matrices. Let A=[aij]A=[a_{ij}] and B=[bij]B=[b_{ij}] be m×nm\times n zero-one matrices.

  • Join A∨B=[aij∨bij]A\lor B=[a_{ij}\lor b_{ij}]: the (i,j)(i,j) entry is 1 if aij=1a_{ij}=1 or bij=1b_{ij}=1, otherwise 0 (entrywise OR, equivalent to max).
  • Meet A∧B=[aij∧bij]A\land B=[a_{ij}\land b_{ij}]: the (i,j)(i,j) entry is 1 only if both aij=1a_{ij}=1 and bij=1b_{ij}=1, otherwise 0 (entrywise AND, equivalent to min).

Example: for A=(1001)A=\begin{pmatrix}1&0\\0&1\end{pmatrix} and B=(1100)B=\begin{pmatrix}1&1\\0&0\end{pmatrix},

A∨B=(1101),A∧B=(1000).A\lor B=\begin{pmatrix}1&1\\0&1\end{pmatrix},\qquad A\land B=\begin{pmatrix}1&0\\0&0\end{pmatrix}.

Modular values.

5 mod 7=5(and 5 mod 75=5),5 \bmod 7 = 5 \qquad (\text{and } 5 \bmod 75 = 5),

−5 mod 7=2, since −5=7(−1)+2 and 0≤2<7.-5 \bmod 7 = 2,\ \text{since } -5 = 7(-1)+2 \text{ and } 0\le 2<7.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Define chromatic number. How does Kruskal’s algorithm find Minimum Spanning Tree?

Answer

Chromatic number. The chromatic number χ(G)\chi(G) of a graph GG is the smallest number of colours needed to colour its vertices so that no two adjacent vertices get the same colour. For example, χ(Kn)=n\chi(K_n)=n, and χ(G)=2\chi(G)=2 for a non-empty bipartite graph.

Kruskal's algorithm for a Minimum Spanning Tree (MST). It is a greedy algorithm that grows a forest of edges.

  1. Sort all edges of the connected weighted graph in non-decreasing order of weight.
  2. Start with an empty edge set TT (each vertex is its own component).
  3. Take the next edge in sorted order. If adding it to TT does not create a cycle (its end points lie in different components), add it to TT; otherwise discard it.
  4. Repeat step 3 until TT has n−1n-1 edges (nn = number of vertices).

The resulting TT is a spanning tree of minimum total weight. Cycle detection is done with a disjoint-set (union-find) structure, and the running time is O(Elog⁡E)O(E\log E).

Example: edges AB=1, BC=2, AC=3, CD=4AB=1,\ BC=2,\ AC=3,\ CD=4. Take ABAB, take BCBC, reject ACAC (cycle AA-BB-CC), take CDCD. The MST has weight 1+2+4=71+2+4=7.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

What is network flow? Give an example of saturated edge, unsaturated edge, and slack.

Answer

Network flow. A flow network is a directed graph with a source ss, a sink tt, and a capacity c(e)≥0c(e)\ge 0 on every edge ee. A flow ff assigns to each edge a value 0≤f(e)≤c(e)0\le f(e)\le c(e) such that for every vertex other than ss and tt, the flow entering equals the flow leaving (conservation). The value of the flow is the net flow leaving ss (equal to that entering tt). The aim is usually to find the maximum flow.

Saturated edge: an edge with f(e)=c(e)f(e)=c(e), so no more flow can pass through it.

Unsaturated edge: an edge with f(e)<c(e)f(e)<c(e).

Slack: the unused capacity of an edge, c(e)−f(e)c(e)-f(e) (zero for a saturated edge).

Example. Take edges s→as\to a with capacity 5, and a→ta\to t with capacity 3. Send a flow of 3 along s→a→ts\to a\to t.

  • a→ta\to t: f=3=cf=3=c, so it is saturated (slack 00).
  • s→as\to a: f=3<5f=3<5, so it is unsaturated, with slack 5−3=25-3=2.

The maximum flow is 3, limited by the saturated edge a→ta\to t.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

When do we use permutation rather than combination? How many 5-digit numbers can be generated using the digits 0 to 9, if each number starts with 98 and no digit appears more than once?

Answer

Permutation versus combination. We use a permutation when the order (arrangement) of the chosen objects matters, for example forming numbers, words or seating arrangements, where abc≠bcaabc\ne bca. We use a combination when only the selection matters and order does not, for example choosing a committee.

P(n,r)=n!(n−r)!,C(n,r)=n!r! (n−r)!.P(n,r)=\frac{n!}{(n-r)!},\qquad C(n,r)=\frac{n!}{r!\,(n-r)!}.

5-digit numbers starting with 98 with no repeated digit. The first two digits are fixed as 9 and 8. The remaining three positions must be filled from the 8 unused digits {0,1,2,3,4,5,6,7}\{0,1,2,3,4,5,6,7\}, with no repetition and with order mattering (0 is allowed, as the number already begins with 9):

P(8,3)=8×7×6=336.P(8,3)=8\times7\times6=336.

So 336 such numbers can be formed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Define subset and power set. How do you prove correctness of recursive algorithm using Induction? Illustrate with an example.

Answer

Subset. A set AA is a subset of BB, written A⊆BA\subseteq B, if every element of AA is also an element of BB, that is, ∀x (x∈A→x∈B)\forall x\,(x\in A\to x\in B).

Power set. The power set P(S)P(S) of a set SS is the set of all subsets of SS (including ∅\varnothing and SS). If ∣S∣=n|S|=n then ∣P(S)∣=2n|P(S)|=2^n. Example: S={a,b}S=\{a,b\} gives P(S)={∅,{a},{b},{a,b}}P(S)=\{\varnothing,\{a\},\{b\},\{a,b\}\}.

Proving a recursive algorithm correct by induction. A recursive algorithm has base cases and recursive calls on smaller inputs. We prove correctness by induction on the input size nn:

  1. Basis step: show the algorithm gives the correct output for the base case(s).
  2. Inductive step: assume (inductive hypothesis) the algorithm is correct for all inputs smaller than nn (or for n=kn=k). Show that the recursive call returns a correct result for the smaller input, and that the extra work done in the call then gives the correct result for input nn (or k+1k+1).
  3. By induction, the algorithm is correct for all valid inputs. Termination follows because each call reduces the input size towards a base case.

Example. Recursive factorial:

procedure fact(n)       // n is a non-negative integer
    if n = 0 then return 1
    else return n * fact(n - 1)

Claim: fact(n)=n!\text{fact}(n)=n! for all n≥0n\ge 0.

  • Basis: fact(0)=1=0!\text{fact}(0)=1=0!.
  • Step: assume fact(k)=k!\text{fact}(k)=k!. Then fact(k+1)=(k+1)⋅fact(k)=(k+1)⋅k!=(k+1)!\text{fact}(k+1)=(k+1)\cdot\text{fact}(k)=(k+1)\cdot k!=(k+1)!.

So the algorithm is correct for all n≥0n\ge 0. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

State inclusion-exclusion principle. For which number x is true that⌊x⌋=⌈x⌉\lfloor x \rfloor = \lceil x \rceil ?Let f and g be functions from {1, 2, 3, 4} to {a, b, c, d}, and from {a, b, c, d} to {1, 2, 3, 4}, respectively with f(1) = d, f(2) = c, f(3) = a, and f(4) = b, and g(a) = 2, g(b) = 1, g(c) = 3 and g(d) = 2.
  • a. If f and g one-to-one?
  • b. If f and g on-to?
  • c. Does either f or g have an inverse? If so find this inverse.

Answer

Inclusion-exclusion principle. For finite sets,

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣,|A\cup B|=|A|+|B|-|A\cap B|,

∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣.|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|.

In general, add the sizes of single sets, subtract the sizes of pairwise intersections, add triple intersections, and so on alternately.

Floor equal to ceiling. ⌊x⌋=⌈x⌉\lfloor x\rfloor=\lceil x\rceil holds exactly when xx is an integer. For a non-integer xx, ⌈x⌉=⌊x⌋+1\lceil x\rceil=\lfloor x\rfloor+1.

Functions. f:{1,2,3,4}→{a,b,c,d}f:\{1,2,3,4\}\to\{a,b,c,d\} with f(1)=d, f(2)=c, f(3)=a, f(4)=bf(1)=d,\ f(2)=c,\ f(3)=a,\ f(4)=b. g:{a,b,c,d}→{1,2,3,4}g:\{a,b,c,d\}\to\{1,2,3,4\} with g(a)=2, g(b)=1, g(c)=3, g(d)=2g(a)=2,\ g(b)=1,\ g(c)=3,\ g(d)=2.

(a) One-to-one.

  • ff takes four different values d,c,a,bd,c,a,b on four different inputs, so ff is one-to-one.
  • g(a)=g(d)=2g(a)=g(d)=2 with a≠da\ne d, so gg is not one-to-one.

(b) Onto.

  • The range of ff is {d,c,a,b}={a,b,c,d}\{d,c,a,b\}=\{a,b,c,d\}, so ff is onto.
  • The range of gg is {2,1,3}\{2,1,3\}; the element 4 is not hit, so gg is not onto.

(c) Inverses. A function has an inverse only if it is bijective. ff is one-to-one and onto, so it has an inverse:

f−1(d)=1,f−1(c)=2,f−1(a)=3,f−1(b)=4.f^{-1}(d)=1,\quad f^{-1}(c)=2,\quad f^{-1}(a)=3,\quad f^{-1}(b)=4.

gg is neither one-to-one nor onto, so gg has no inverse.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

How many ways are there to assign 24 students to five faculty advisors? \vspace{0.5cm} Find the solution of the recurrence relation an=3an−1–3an−2+an−3a_n = 3a_{n-1} – 3a_{n-2} + a_{n-3} ifa0=2,a1=2,a2=4.a_0 = 2,\quad a_1 = 2,\quad a_2 = 4.

Answer

Assigning 24 students to five faculty advisors. Each of the 24 students can be assigned to any one of the 5 advisors, independently of the others. By the product rule, the number of ways is

524=59,604,644,775,390,625.5^{24}=59{,}604{,}644{,}775{,}390{,}625.

(If each advisor were required to have a particular number of students, a multinomial coefficient would be used; with no restriction the answer is 5245^{24}.)

Recurrence: an=3an−1−3an−2+an−3a_n=3a_{n-1}-3a_{n-2}+a_{n-3}, with a0=2, a1=2, a2=4a_0=2,\ a_1=2,\ a_2=4.

The characteristic equation is

r3−3r2+3r−1=0  ⇒  (r−1)3=0,r^3-3r^2+3r-1=0 \;\Rightarrow\; (r-1)^3=0,

so r=1r=1 is a root of multiplicity 3. The general solution is

an=(α+βn+γn2) 1n=α+βn+γn2.a_n=(\alpha+\beta n+\gamma n^2)\,1^n=\alpha+\beta n+\gamma n^2.

Initial conditions:

a0=α=2a_0=\alpha=2 a1=α+β+γ=2  ⇒  β+γ=0a_1=\alpha+\beta+\gamma=2 \;\Rightarrow\; \beta+\gamma=0 a2=α+2β+4γ=4  ⇒  2β+4γ=2a_2=\alpha+2\beta+4\gamma=4 \;\Rightarrow\; 2\beta+4\gamma=2

From β=−γ\beta=-\gamma: −2γ+4γ=2-2\gamma+4\gamma=2, so γ=1\gamma=1 and β=−1\beta=-1.

an=n2−n+2\boxed{a_n=n^2-n+2}

Check: a3=3a2−3a1+a0=12−6+2=8a_3=3a_2-3a_1+a_0=12-6+2=8, and the formula gives 9−3+2=89-3+2=8. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Find the solution to the system of congruences
x≡1 (mod 4),x≡2 (mod 5),x≡3 (mod 7).x \equiv 1 \ (\mathrm{mod}\ 4), \quad x \equiv 2 \ (\mathrm{mod}\ 5), \quad x \equiv 3 \ (\mathrm{mod}\ 7). using the Chinese Remainder Theorem.

Answer

System: x≡1(mod4),x≡2(mod5),x≡3(mod7)x\equiv1 \pmod 4,\quad x\equiv2 \pmod 5,\quad x\equiv3 \pmod 7.

The moduli 4,5,74,5,7 are pairwise coprime, so the Chinese Remainder Theorem applies. Let

M=4⋅5⋅7=140.M=4\cdot5\cdot7=140.

Compute Mi=M/miM_i=M/m_i and the inverse yiy_i of MiM_i modulo mim_i:

  • M1=35M_1=35: 35≡3(mod4)35\equiv3\pmod4, and 3⋅3=9≡13\cdot3=9\equiv1, so y1=3y_1=3.
  • M2=28M_2=28: 28≡3(mod5)28\equiv3\pmod5, and 3⋅2=6≡13\cdot2=6\equiv1, so y2=2y_2=2.
  • M3=20M_3=20: 20≡6(mod7)20\equiv6\pmod7, and 6⋅6=36≡16\cdot6=36\equiv1, so y3=6y_3=6.

Then

x≡a1M1y1+a2M2y2+a3M3y3=1⋅35⋅3+2⋅28⋅2+3⋅20⋅6=105+112+360=577(mod140).x\equiv a_1M_1y_1+a_2M_2y_2+a_3M_3y_3 = 1\cdot35\cdot3+2\cdot28\cdot2+3\cdot20\cdot6 = 105+112+360=577 \pmod{140}.

577−4⋅140=17.577-4\cdot140=17.

x≡17(mod140)\boxed{x\equiv 17 \pmod{140}}

Check: 17=4⋅4+117=4\cdot4+1, 17=3⋅5+217=3\cdot5+2, 17=2⋅7+317=2\cdot7+3. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Suppose that on an island there are three types of people, knights, knaves, and normals. Knights always tell the truth, knaves always lie, and normals sometimes lie and sometimes tell the truth. Detectives questioned three inhabitants of the island — Amy, Brenda, and Claire — as part of the investigation of a crime. The detectives knew that one of the three committed the crime, but not which one. They also knew that the criminal was a knight, and that the other two were not. Additionally, the detectives recorded these statements: Amy: “I am innocent.” Brenda: “What Amy says is true.” Claire: “Brenda is not a normal.” After analyzing their information, the detectives positively identified the guilty party. Who was it?

Answer

Answer: Brenda is guilty.

Known: exactly one of the three is the criminal, and that person is a knight; the other two are not knights (each is a knave or a normal).

Amy: "I am innocent." If Amy were the criminal she would be a knight and could not lie, but her statement would then be false. So Amy is innocent, her statement is true, and she is not a knight.

So the criminal is Brenda or Claire.

Suppose Claire is the criminal (a knight). Her statement "Brenda is not a normal" is true, so Brenda is not a normal. Brenda is not a knight (Claire is the only one), so Brenda is a knave. But Brenda said "What Amy says is true", and Amy's statement is true, so Brenda told the truth, which a knave never does. Contradiction. So Claire is not guilty.

Suppose Brenda is the criminal (a knight). Then Amy and Claire are non-knights. Brenda's statement is true (Amy is innocent). Claire's statement "Brenda is not a normal" is true, since Brenda is a knight. Claire therefore told the truth, so she is not a knave; she is a normal. Amy's statement is also true, so Amy is also a normal. Everything is consistent.

Hence the guilty party is Brenda.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Use mathematical induction to prove that
13+23+33+⋯+n3=n2(n+1)24.1^3 + 2^3 + 3^3 + \cdots + n^3 = \frac{n^2(n+1)^2}{4}.

Answer

To prove: P(n): 13+23+⋯+n3=n2(n+1)24P(n):\ 1^3+2^3+\cdots+n^3=\dfrac{n^2(n+1)^2}{4} for all n≥1n\ge1.

Basis step (n=1n=1). LHS =13=1=1^3=1. RHS =1⋅44=1=\dfrac{1\cdot 4}{4}=1. So P(1)P(1) is true.

Inductive step. Assume P(k)P(k) is true:

13+23+⋯+k3=k2(k+1)24.1^3+2^3+\cdots+k^3=\frac{k^2(k+1)^2}{4}.

Add (k+1)3(k+1)^3 to both sides:

13+⋯+k3+(k+1)3=k2(k+1)24+(k+1)3=(k+1)2 [k2+4(k+1)]4.1^3+\cdots+k^3+(k+1)^3=\frac{k^2(k+1)^2}{4}+(k+1)^3=\frac{(k+1)^2\,[k^2+4(k+1)]}{4}.

Since k2+4k+4=(k+2)2k^2+4k+4=(k+2)^2,

=(k+1)2(k+2)24,=\frac{(k+1)^2(k+2)^2}{4},

which is exactly P(k+1)P(k+1). By mathematical induction, P(n)P(n) is true for all n≥1n\ge1. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Suppose that R is the relation on the set of strings of English letters such that aRb if and only if L(a) = L(b), where L(x) is the length of the string x. Is R an equivalence relation?

Answer

Yes, RR is an equivalence relation. Here aRbaRb iff L(a)=L(b)L(a)=L(b), where L(x)L(x) is the length of string xx. We check the three properties.

Reflexive. For any string aa, L(a)=L(a)L(a)=L(a), so aRaaRa.

Symmetric. If aRbaRb then L(a)=L(b)L(a)=L(b), hence L(b)=L(a)L(b)=L(a), so bRabRa.

Transitive. If aRbaRb and bRcbRc then L(a)=L(b)L(a)=L(b) and L(b)=L(c)L(b)=L(c), so L(a)=L(c)L(a)=L(c), hence aRcaRc.

The relation is reflexive, symmetric and transitive, so it is an equivalence relation. Its equivalence classes are the sets of all strings having the same length.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

What is the negation of “This is a boring course”? Give a direct proof for the statement: “If n is even, then n + 4 is even.”

Answer

Negation. The negation of "This is a boring course" is "This is not a boring course" (equivalently, "It is not the case that this is a boring course").

Direct proof. Claim: if nn is even, then n+4n+4 is even.

Assume nn is even. Then n=2kn=2k for some integer kk. So

n+4=2k+4=2(k+2),n+4=2k+4=2(k+2),

and k+2k+2 is an integer. Hence n+4n+4 is twice an integer, so n+4n+4 is even. ■\blacksquare

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Define well ordering property. Find the multiplicative inverse of 7 modulo 19 using Extended Euclidean Algorithm.

Answer

Well-ordering property. Every non-empty set of non-negative integers (equivalently, of positive integers) has a least element. It is equivalent to the principle of mathematical induction and is used, for example, to justify the division algorithm and proofs by minimal counterexample.

Multiplicative inverse of 7 modulo 19. Since 19 is prime, gcd⁡(7,19)=1\gcd(7,19)=1 and the inverse exists.

Euclidean algorithm:

19=2⋅7+519=2\cdot7+5 7=1⋅5+27=1\cdot5+2 5=2⋅2+15=2\cdot2+1

Back-substitution:

1=5−2⋅21=5-2\cdot2     =5−2(7−5)=3⋅5−2⋅7\;\;=5-2(7-5)=3\cdot5-2\cdot7     =3(19−2⋅7)−2⋅7=3⋅19−8⋅7.\;\;=3(19-2\cdot7)-2\cdot7=3\cdot19-8\cdot7.

So 7⋅(−8)≡1(mod19)7\cdot(-8)\equiv1\pmod{19}, and −8≡11(mod19)-8\equiv11\pmod{19}.

7−1≡11(mod19)\boxed{7^{-1}\equiv 11 \pmod{19}}

Check: 7⋅11=77=4⋅19+17\cdot11=77=4\cdot19+1. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

What are the necessary conditions for a graph to be isomorphic? List and illustrate with an example.

Answer

Isomorphism. Graphs G1=(V1,E1)G_1=(V_1,E_1) and G2=(V2,E2)G_2=(V_2,E_2) are isomorphic if there is a bijection ϕ:V1→V2\phi:V_1\to V_2 such that u,vu,v are adjacent in G1G_1 if and only if ϕ(u),ϕ(v)\phi(u),\phi(v) are adjacent in G2G_2. Properties that must be preserved (isomorphism invariants), and so are necessary conditions, are:

  1. Same number of vertices.
  2. Same number of edges.
  3. Same degree sequence: the multiset of vertex degrees is the same.
  4. Same number of connected components.
  5. Same cycle structure: for example, the same number of simple cycles of each length, and if one graph has a triangle so must the other. (A vertex of degree dd must map to a vertex of degree dd, with its neighbours' degrees also matching.)

If any one fails, the graphs are not isomorphic. Passing all of them does not guarantee isomorphism.

Example 1 (not isomorphic). G1G_1: a 4-cycle on a,b,c,da,b,c,d (4 vertices, 4 edges, degrees 2,2,2,22,2,2,2). G2G_2: a triangle x,y,zx,y,z with a pendant vertex ww attached to xx (4 vertices, 4 edges, degrees 3,2,2,13,2,2,1). The degree sequences differ, so they are not isomorphic.

Example 2 (isomorphic). G1G_1: 4-cycle a ⁣− ⁣b ⁣− ⁣c ⁣− ⁣d ⁣− ⁣aa\!-\!b\!-\!c\!-\!d\!-\!a. G2G_2: 4-cycle 1 ⁣− ⁣3 ⁣− ⁣2 ⁣− ⁣4 ⁣− ⁣11\!-\!3\!-\!2\!-\!4\!-\!1. Both have 4 vertices, 4 edges and degrees all 2. The map a→1, b→3, c→2, d→4a\to1,\ b\to3,\ c\to2,\ d\to4 preserves every edge, so G1≅G2G_1\cong G_2.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Solve the recurrence relationan=an−1+2an−2a_n = a_{n-1} + 2a_{n-2}with$$ a_0 = 2 \quad \text{and} \quad a_1 = 7.

Answer

Recurrence: an=an−1+2an−2a_n=a_{n-1}+2a_{n-2}, with a0=2, a1=7a_0=2,\ a_1=7.

The characteristic equation is

r2−r−2=0  ⇒  (r−2)(r+1)=0  ⇒  r=2, −1.r^2-r-2=0 \;\Rightarrow\; (r-2)(r+1)=0 \;\Rightarrow\; r=2,\ -1.

The general solution is an=α 2n+β (−1)na_n=\alpha\,2^n+\beta\,(-1)^n.

From the initial conditions:

α+β=2,2α−β=7.\alpha+\beta=2,\qquad 2\alpha-\beta=7.

Adding gives 3α=93\alpha=9, so α=3\alpha=3 and β=−1\beta=-1.

an=3⋅2n−(−1)n\boxed{a_n=3\cdot2^n-(-1)^n}

Check: a2=a1+2a0=11a_2=a_1+2a_0=11, and 3⋅4−1=113\cdot4-1=11. ✓

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BSc CSIT 2075 Second Semester Discrete Structures (TU IOST board exam, 2075), TU BSc CSIT 2076 Second Semester Discrete Structures (TU IOST board exam, 2076), TU BSc CSIT 2078 Second Semester Discrete Structures (TU IOST board exam, 2078), TU BSc CSIT 2079 Second Semester Discrete Structures (TU IOST board exam, 2079), TU BSc CSIT 2080 Second Semester Discrete Structures (TU IOST board exam, 2080), TU BSc CSIT 2081 Second Semester Discrete Structures (TU IOST board exam, 2081), TU BSc CSIT 2082 Second Semester Discrete Structures (TU IOST board exam, 2082), TU BSc CSIT 2075 Second Semester Mathematics II (TU IOST board exam, 2075), TU BSc CSIT 2076 Second Semester Mathematics II (TU IOST board exam, 2076), TU BSc CSIT 2078 Second Semester Mathematics II (TU IOST board exam, 2078), TU BSc CSIT 2079 Second Semester Mathematics II (TU IOST board exam, 2079), TU BSc CSIT 2080 Second Semester Mathematics II (TU IOST board exam, 2080), TU BSc CSIT 2081 Second Semester Mathematics II (TU IOST board exam, 2081), TU BSc CSIT 2082 Second Semester Mathematics II (TU IOST board exam, 2082), TU BSc CSIT 2075 Second Semester Microprocessor (TU IOST board exam, 2075), TU BSc CSIT 2076 Second Semester Microprocessor (TU IOST board exam, 2076), TU BSc CSIT 2078 Second Semester Microprocessor (TU IOST board exam, 2078), TU BSc CSIT 2079 Second Semester Microprocessor (TU IOST board exam, 2079), TU BSc CSIT 2080 Second Semester Microprocessor (TU IOST board exam, 2080), TU BSc CSIT 2081 Second Semester Microprocessor (TU IOST board exam, 2081), TU BSc CSIT 2082 Second Semester Microprocessor (TU IOST board exam, 2082), TU BSc CSIT 2075 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2075), TU BSc CSIT 2076 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2076), TU BSc CSIT 2078 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2078), TU BSc CSIT 2079 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2079), TU BSc CSIT 2080 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2080), TU BSc CSIT 2081 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2081), TU BSc CSIT 2082 Second Semester Object Oriented Programming (C++) (TU IOST board exam, 2082), TU BSc CSIT 2075 Second Semester Statistics I (TU IOST board exam, 2075), TU BSc CSIT 2076 Second Semester Statistics I (TU IOST board exam, 2076), TU BSc CSIT 2078 Second Semester Statistics I (TU IOST board exam, 2078), TU BSc CSIT 2079 Second Semester Statistics I (TU IOST board exam, 2079), TU BSc CSIT 2080 Second Semester Statistics I (TU IOST board exam, 2080), TU BSc CSIT 2081 Second Semester Statistics I (TU IOST board exam, 2081) and TU BSc CSIT 2082 Second Semester Statistics I (TU IOST board exam, 2082). Answers are written for this site; check them against your class notes.