REVISION AND PRACTICE

How to Solve Week 1 Questions

19 min read
On this page 9 headings

Swipe long formulas, tables or code sideways to see the rest.

Practise past-paper questions

Try each question, then reveal the answer and worked solution.

18 of 18 questions

Start here Week 1 topics appear in every Quiz 1 paper. This page has every Week 1 question from five past papers (2025 T1, T2, T3 and 2026 T1, T2), grouped into 4 question types. Learn the method for each type, then work through the real questions. All answers were checked with code.

Type 1 — McCulloch–Pitts (MP) neuron

Learn the method

Level 1 — find the output.

  1. Check inhibitory inputs first. If any inhibitory input is 1 → output 0. Stop.
  2. Add the inputs: g=x1+x2+…+xng = x_{1} + x_{2} + \ldots + x_{n}.
  3. g≥θ→g \ge \theta \to 1, else 0.

Level 2 — find θ\theta . “Fires when at least k inputs are 1” →θ=k\to \theta = k. OR→θ=1OR \to \theta = 1. AND (n inputs) →θ=n\to \theta = n.

Level 3 — count how many inputs give 1. With n inputs and threshold θ\theta , the number of input rows with output 1=1 = (ways to choose θ\theta ones) ++ (θ + 1 ones) + … + (n ones) =C(n,θ)+C(n,θ+1)+…+C(n,n)= C(n, \theta ) + C(n, \theta +1) + \ldots + C(n, n).

Forn=5:C(5,0)=1,C(5,1)=5,C(5,2)=10,C(5,3)=10,C(5,4)=5,C(5,5)=1For n = 5: C(5,0)=1, C(5,1)=5, C(5,2)=10, C(5,3)=10, C(5,4)=5, C(5,5)=1 (total 32).

Past-paper question
2026 T1 Quiz 1Q22 marks

Question: Which among the following is true for a McCulloch–Pitts (MP) neuron?

  1. It can implement Boolean functions with a non-linear decision boundary. (b) It can implement linearly separable Boolean functions with a linear decision boundary. (c) It can be used to approximate a real-valued function. (d) It can accurately represent the XOR function by adjusting its weights and thresholds.
Reveal answer and solution

Answer: (b)

How to solve:

  1. An MP neuron fires when x1+…+xn≥θx_{1} + \ldots + x_{n} \ge \theta . The boundary x1+…+xn=θx_{1} + \ldots + x_{n} = \theta is a straight line (plane). So its boundary is linear → (a) is false, (b) is true.
    1. Inputs and output are only 0/1, so it cannot approximate real-valued functions → false.
    1. XOR is not linearly separable, and an MP neuron has no weights to adjust anyway → false.
Past-paper question
2026 T2 Quiz 1Q32 marks

Question: Statement I: A single MP neuron can be used to represent all linearly separable Boolean functions. Statement II: Every linearly separable Boolean function can be represented using at least one MP neuron. Options: Only I is true · Only II is true · Both are true · None is true.

Reveal answer and solution

Answer: Only Statement II is true (as per the key)

How to solve:

  1. Statement I says one neuron covers all such functions. That is false: AND needs θ=n,OR\theta = n, OR needs θ=1\theta = 1 — one fixed neuron can’t be both.
  2. Statement II says each linearly separable function has its own MP neuron. This is the idea taught in the lecture → true.
  3. Note: strictly, an MP neuron has no weights, so a separable function like “2x1+x2+x3≥22x_{1} + x_{2} + x_{3} \ge 2” can’t be built from one MP unit. The key follows the lecture’s simpler reading — choose “Only II”.
Past-paper question
2025 T3 Quiz 1Q513 marks

Question: We want to implement a 3-input NOR Boolean function using an MP neuron (g=∑xi,y=1g = \sum x_{i}, y = 1 if g≥θg \ge \theta , else 0; an inhibitory input forces the output to 0). How many inhibitory inputs are required?

Reveal answer and solution

Answer: 3

How to solve:

  1. NOR is 1 only when all inputs are 0.
  2. If any input is 1, the output must be 0 → every input must be able to veto → all 3 inputs inhibitory.
  3. With all three inhibitory and θ=0\theta = 0: input (0,0,0) → no veto, sum 0≥0→10 \ge 0 \to 1 ✔. Any 1 → veto → 0 ✔.
Past-paper question
2026 T2 Quiz 1Q93 marks

Question: MP neuron with x1,x2x_{1}, x_{2} excitatory, x3x_{3} inhibitory, threshold 2. It fires if the inhibitory input is inactive and the sum of excitatory inputs ≥\ge threshold. Which are correct?

  1. (1,1,0) → 1 (b) (1,1,1) → 1 (c) (1,0,0) → 0 (d) Raising the threshold from 2 to 3 would not change the output for any input.
Reveal answer and solution

Answer: (a) and (c)

How to solve:

    1. x3=0x_{3} = 0, no veto. Sum=1+1=2≥2→Sum = 1 + 1 = 2 \ge 2 \to 1 ✔.
    1. x3=1→x_{3} = 1 \to veto → 0, not 1 ✘.
    1. No veto. Sum=1<2→Sum = 1 < 2 \to 0 ✔.
    1. With θ=3\theta = 3, input (1,1,0) has sum 2<3→02 < 3 \to 0 instead of 1. The output changes ✘.
Past-paper question
2025 T2 Quiz 1Q67–692 + 2 + 4 marks

Question: h:{0,1}5→{0,1}h: \{0,1\}^{5} \to \{0,1\}. An MP neuron with five excitatory binary inputs gives f=1f = 1 if x1+…+x5≥θx_{1} + \ldots + x_{5} \ge \theta , else 0, where θ\theta is a positive integer and f=hf = h for all 32 inputs. (Sub-questions are independent.) Q67:Ifθ=1Q67: If \theta = 1, which are true? (h is OR⋅hOR \cdot h is linearly separable · h is AND⋅hAND \cdot h is neither ORnorAND⋅hOR nor AND \cdot h is not linearly separable) Q68:h=0Q68: h = 0 for 26 of the 32 inputs and 1 for the rest. Find θ\theta . Q69: Is there aθa \theta with h=1h = 1 for exactly 16 tuples? Enter θ\theta , or −1 if none.

Reveal answer and solution

Answer: Q67: “h is OR” and “h is linearly separable” ⋅Q68:θ=4⋅Q69:θ=3\cdot Q68: \theta = 4 \cdot Q69: \theta = 3

How to solve:

  1. Q67:θ=1→Q67: \theta = 1 \to fires when at least one input is 1 → OR. Every single MP neuron computes a linearly separable function → separable.
  2. Q68:h=1Q68: h = 1 for 32−26=32 - 26 = 6 inputs. Count rows with sum ≥θ\ge \theta :
    • θ=5:C(5,5)=1\theta = 5: C(5,5) = 1
    • θ=4:C(5,4)+C(5,5)=5+1=\theta = 4: C(5,4) + C(5,5) = 5 + 1 = 6✔→θ=4 ✔ \to \theta = 4
  3. Q69: need 16 rows with sum ≥θ\ge \theta :
    • θ=3:C(5,3)+C(5,4)+C(5,5)=10+5+1=\theta = 3: C(5,3) + C(5,4) + C(5,5) = 10 + 5 + 1 = 16✔→θ=3 ✔ \to \theta = 3

Type 2 — Perceptron: weights, bias and counting

Learn the method

  1. Write wTxw^{T}x (add w_{0} if there is a bias, x0=1x_{0} = 1).
  2. Output 1 if wTx≥0w^{T}x \ge 0, else 0 (watch: =0= 0 counts as 1).
  3. Find weights/bias: one inequality per row, then look for values that satisfy all of them. If two rows contradict, no value works.
  4. Count points with label 1: go through all possible inputs and count those with wTx≥0w^{T}x \ge 0.
Past-paper question
2025 T3 Quiz 1Q454 marks

Question: A perceptron outputs y^=1\hat{y} = 1 if wTx≥0w^{T}x \ge 0, else 0. Weights w1=−2,w2=−1w_{1} = -2, w_{2} = -1. Data: (0,0) → 0, (0,1) → 1, (1,0) → 1, (1,1) → 1. What is the possible range of the bias w0w_{0} so that all points are classified correctly? Options: w0∈(−∞,0)⋅(1,∞)⋅(1,3]⋅[3,∞)⋅w_{0} \in (-\infty , 0) \cdot (1, \infty ) \cdot (1, 3] \cdot [3, \infty ) \cdot no possible value of w0w_{0}

Reveal answer and solution

Answer: No possible value of w0w_{0}

How to solve:

  1. (0,0)→0:w0+0+0<0→(0,0) \to 0: w_{0} + 0 + 0 < 0 \to w0<0w_{0} < 0.
  2. (0,1)→1:w0−1≥0→(0,1) \to 1: w_{0} - 1 \ge 0 \to w0≥1w_{0} \ge 1.
  3. w0<0w_{0} < 0 and w0≥1w_{0} \ge 1 cannot both be true → no value works.
  4. (With negative weights, the perceptron leans towards 0 when inputs are 1 — the opposite of OR.)
Past-paper question
2026 T1 Quiz 1Q8–91 + 3 marks

Question: NAND truth table: (0,0)→1, (0,1)→1, (1,0)→1, (1,1)→0. A perceptron outputs 1 if ∑i=02wixi≥0\sum _{i=0}^{2} w_{i}x_{i} \ge 0, with x0=1x_{0} = 1. Q8: Is NAND linearly separable? Q9: Which (w0,w1,w2)(w_{0}, w_{1}, w_{2}) produce NAND? (2, −1, −1) · (1, −1, −1) · (−2, −1, −1) · (0.5, −0.25, −0.25)

Reveal answer and solution

Answer: Q8:Yes⋅Q9Q8: Yes \cdot Q9: only (1, −1, −1)

How to solve:

  1. Q8: one line can cut off the single point (1,1) → Yes.
  2. Q9 — test each option on all 4 rows (sum =w0+w1x1+w2x2= w_{0} + w_{1}x_{1} + w_{2}x_{2}):
    • (2,−1,−1):(1,1)→2−1−1=0≥0→1(2, -1, -1): (1,1) \to 2 - 1 - 1 = 0 \ge 0 \to 1 ✘ (should be 0)
    • (1, −1, −1): (0,0) → 1 → 1 ✔; (0,1) → 0 → 1 ✔; (1,0) → 0 → 1 ✔; (1,1) → −1 → 0 ✔ → NAND
    • (−2, −1, −1): (0,0) → −2 → 0 ✘
    • (0.5,−0.25,−0.25):(1,1)→0.5−0.5=0→1✘(0.5, -0.25, -0.25): (1,1) \to 0.5 - 0.5 = 0 \to 1 ✘
Past-paper question
2025 T1 Quiz 1Q64–652 + 2 marks

Question: A perceptron has four binary features. The dataset has 16 points, no two the same (so all 16 binary patterns). w=(1,1,−1,−1)w = (1, 1, -1, -1), no bias, y^=1\hat{y} = 1 if wTx≥0w^{T}x \ge 0, else 0. There are zero misclassifications. Q64: how many points have true label 1? Q65: how many have label 0?

Reveal answer and solution

Answer: Q64: 11 · Q65: 5

How to solve:

  1. Zero errors → the label equals the perceptron’s output. So count patterns with x1+x2−x3−x4≥0,ix_{1} + x_{2} - x_{3} - x_{4} \ge 0, i.e. (ones in x1,x2x_{1},x_{2}) ≥ (ones in x3,x4x_{3},x_{4}).
  2. Leta=Let a = ones in (x1,x2),b=(x_{1},x_{2}), b = ones in (x3,x4)(x_{3},x_{4}). Number of ways: a=0→1,a=1→2,a=2→1a = 0 \to 1, a = 1 \to 2, a = 2 \to 1 (same for b).
  3. Add all cases with a≥ba \ge b:
    • a=0,b=0:1×1=1a = 0, b = 0: 1 \times 1 = 1
    • a=1,b=0:2×1=2;a=1,b=1:2×2=4a = 1, b = 0: 2 \times 1 = 2; a = 1, b = 1: 2 \times 2 = 4
    • a=2,b=0:1×1=1;b=1:1×2=2;b=2:1×1=1a = 2, b = 0: 1 \times 1 = 1; b = 1: 1 \times 2 = 2; b = 2: 1 \times 1 = 1
  4. Total =1+2+4+1+2+1== 1 + 2 + 4 + 1 + 2 + 1 = 11 → label 0:16−11=0: 16 - 11 = 5.

Type 3 — Perceptron Learning Algorithm (PLA) step by step

Learn the method

  1. Start with the given w. Take the points in the given order.
  2. For each point compute wTxw^{T}x (+ b if there is a bias).
  3. Labels 0/1: positive point with wTx<0→w=w+xw^{T}x < 0 \to w = w + x; negative point with wTx≥0→w=w−xw^{T}x \ge 0 \to w = w - x. Labels ±1: if the prediction is wrong →w=w+y⋅x\to w = w + y\cdot x (and b=b+yb = b + y). Same thing: y=+1y = +1 adds x,y=−1x, y = -1 subtracts x.
  4. Count updates. “Converged” == one full pass with no update.
  5. Angle questions: cos⁡θ=(a⋅b)/(∥a∥∥b∥)\cos \theta = (a \cdot b) / (\Vert a\Vert \Vert b\Vert ).
Past-paper question
2025 T3 Quiz 1Q57–601 + 1 + 1 + 1 marks

Question: Fill in the blanks a, b, c, d of the Perceptron Learning Algorithm.

Options for a and c:∑i=0nwi⋅xi<0⋅∑xi<0⋅∑wi>0⋅∑wi<0⋅∑wi⋅xi≥0⋅∑xi>0c: \sum _{i=0}^{n} w_{i}\cdot x_{i} < 0 \cdot \sum x_{i} < 0 \cdot \sum w_{i} > 0 \cdot \sum w_{i} < 0 \cdot \sum w_{i}\cdot x_{i} \ge 0 \cdot \sum x_{i} > 0. Options for b and d:w=w+x⋅w=w−x⋅w=w−η∇wL⋅w=w−η∇xLd: w = w + x \cdot w = w - x \cdot w = w - \eta \nabla _{\mathrm{wL}} \cdot w = w - \eta \nabla _{\mathrm{xL}}.

Question figure — open to inspect the labels.
Question figure — open to inspect the labels.
Open image ↗
Question figure (redrawn exactly from the paper)
Reveal answer and solution

Answer: a:∑wixi<0⋅b:w=w+x⋅c:∑wixi≥0⋅d:w=w−xa: \sum w_{i}x_{i} < 0 \cdot b: w = w + x \cdot c: \sum w_{i}x_{i} \ge 0 \cdot d: w = w - x

How to solve:

  1. a: a positive point is wrong when the perceptron says 0, i.e. ∑wixi<0\sum w_{i}x_{i} < 0 (it uses both w and x — options with only w or only x make no sense).
  2. b: fix by turning w towards x → w=w+xw = w + x.
  3. c: a negative point is wrong when it says 1, i.e. ∑wixi≥0\sum w_{i}x_{i} \ge 0.
  4. d: turn w away from x → w=w−xw = w - x. (Theη∇LThe \eta \nabla L options are gradient descent, not PLA.)
Past-paper question
2025 T1 Quiz 1Q68–702 + 2 + 2 marks

Question: Data (x1,x2,y):(1,1,1),(−1,1,1),(1,−1,0)(x_{1}, x_{2}, y): (1, 1, 1), (-1, 1, 1), (1, -1, 0). PLA starts from w=(0,0)w = (0, 0), no bias, points processed top to bottom, y^=1\hat{y} = 1 if wTx≥0w^{T}x \ge 0, else 0. It converges to w* after k updates. Q68: possible w*? (0,0) · (0,1) · (−1,1) · (1,1). Q69:k=Q69: k = ? Q70: For a test point ((x1,x2),y)((x_{1}, x_{2}), y) classified correctly, which are true? x2−x1≥0x_{2} - x_{1} \ge 0 and y=1⋅x2−x1<0y = 1 \cdot x_{2} - x_{1} < 0 and y=0⋅x1+x2≥0y = 0 \cdot x_{1} + x_{2} \ge 0 and y=1⋅x1+x2<0y = 1 \cdot x_{1} + x_{2} < 0 and y=0y = 0

Reveal answer and solution

Answer: Q68:(−1,1)⋅Q69:k=1⋅Q70Q68: (-1, 1) \cdot Q69: k = 1 \cdot Q70: the first two options

How to solve:

  1. Pass 1:
    • (1,1),y=1:wTx=0≥0→(1, 1), y = 1: w^{T}x = 0 \ge 0 \to says 1 ✔ no update
    • (−1,1),y=1:wTx=0→(-1, 1), y = 1: w^{T}x = 0 \to says 1 ✔
    • (1,−1),y=0:wTx=0≥0→(1, -1), y = 0: w^{T}x = 0 \ge 0 \to says 1 ✘ →w=(0,0)−(1,−1)=\to w = (0,0) - (1,-1) = (−1, 1) (update 1)
  2. Pass 2 with w=(−1,1):(1,1)→0→1w = (-1, 1): (1,1) \to 0 \to 1 ✔; (−1,1) → 2 → 1 ✔; (1,−1) → −2 → 0 ✔. No update → converged.
  3. So w∗=(−1,1)w* = (-1, 1) and k=1k = 1.
  4. Q70:w∗Tx=−x1+x2=x2−x1Q70: w*^{T}x = -x_{1} + x_{2} = x_{2} - x_{1}. The perceptron says 1 when x2−x1≥0,0x_{2} - x_{1} \ge 0, 0 when x2−x1<0x_{2} - x_{1} < 0. “Correct” means the label matches → options 1 and 2.
Past-paper question
2026 T1 Quiz 1Q10–113 + 2 marks

Question: PLA on (x1,x2,y):(2,1,+1),(−1,−2,−1),(1,3,+1),(−2,−1,−1)(x_{1}, x_{2}, y): (2, 1, +1), (-1, -2, -1), (1, 3, +1), (-2, -1, -1). Start w=(0,0)w = (0, 0), points in table order, y=1y = 1 if wTx≥0w^{T}x \ge 0, else −1. Q10: w after one epoch? (3,4) · (1,2) · (1,3) · (−2,−1). Q11: “After one epoch the model has converged.” True or false?

Reveal answer and solution

Answer: Q10:w=(1,2)⋅Q11Q10: w = (1, 2) \cdot Q11: True

How to solve:

  1. (2,1),y=+1:wTx=0≥0→+1✔(2, 1), y = +1: w^{T}x = 0 \ge 0 \to +1 ✔
  2. (−1,−2),y=−1:wTx=0→+1✘→w=w+y⋅x=(0,0)−(−1,−2)=(-1, -2), y = -1: w^{T}x = 0 \to +1 ✘ \to w = w + y\cdot x = (0,0) - (-1,-2) = (1, 2)
  3. (1,3),y=+1:1+6=7→+1✔(1, 3), y = +1: 1 + 6 = 7 \to +1 ✔
  4. (−2,−1),y=−1:−2−2=−4→−1✔(-2, -1), y = -1: -2 - 2 = -4 \to -1 ✔
  5. Check again with (1,21, 2): 2 + 2 = 4 (+1 ✔), −1−4=−5-1 - 4 = -5 (−1 ✔), 7 (+1 ✔), −4 (−1 ✔) → no more updates → converged (True).
Past-paper question
2026 T2 Quiz 1Q104 marks

Question: Perceptron w=(2,−1),b=0w = (2, -1), b = 0. Predict +1 if wTx+b≥0w^{T}x + b \ge 0, else −1. On a mistake: w ← w+yixi,bw + y_{i}x_{i}, b ← b+yib + y_{i}. Points processed once in order A(3,1, +1), B(2,0, −1), C(1,2, −1), D(4,4, +1). Which are correct? (a) First update after B. (b) Second update after C. (c) Final bias =−1= -1. (d) Exactly two updates.

Reveal answer and solution

Answer: (a) and (d)

How to solve:

  1. A:2⋅3−1⋅1+0=5≥0→+1A: 2\cdot 3 - 1\cdot 1 + 0 = 5 \ge 0 \to +1 ✔ (correct)
  2. B:2⋅2−0+0=4→+1B: 2\cdot 2 - 0 + 0 = 4 \to +1 ✘ (true −1-1) → w = (2,−1) − (2,0) = (0, −1), b = 0 − 1 = −1 → first update after B ✔
  3. C:0⋅1−1⋅2−1=−3→−1C: 0\cdot 1 - 1\cdot 2 - 1 = -3 \to -1 ✔ (correct, no update) → (b) ✘
  4. D:0⋅4−1⋅4−1=−5→−1D: 0\cdot 4 - 1\cdot 4 - 1 = -5 \to -1 ✘ (true +1+1) → w = (0,−1) + (4,4) = (4, 3), b = −1 + 1 = 0 → (c) ✘
  5. Updates at B and D → exactly two ✔
Past-paper question
2026 T2 Quiz 1Q63 marks

Question: Current w=(3,4)w = (3, 4). A misclassified example x=(4,3)x = (4, 3) with y=−1y = -1 is used: wnew=w−xw_{\mathrm{new}} = w - x. LetθnewLet \theta _{\mathrm{new}} be the angle between wneww_{\mathrm{new}} and x. Which equals θnew\theta _{\mathrm{new}}? cos⁡−1(24/(52))⋅cos⁡−1(152)⋅cos⁡−1(−152)⋅0∘\cos ^{-1}(24/(5\sqrt{2})) \cdot \cos ^{-1}(\frac{1}{5\sqrt{2}}) \cdot \cos ^{-1}(-\frac{1}{5\sqrt{2}}) \cdot 0{}^\circ

Reveal answer and solution

Answer: cos⁡−1(−152)\cos ^{-1}(-\frac{1}{5\sqrt{2}})

How to solve:

  1. wnew=(3−4,4−3)=w_{\mathrm{new}} = (3 - 4, 4 - 3) = (−1, 1).
  2. wnew⋅x=(−1)(4)+(1)(3)=−4+3=w_{\mathrm{new}} \cdot x = (-1)(4) + (1)(3) = -4 + 3 = −1.
  3. ∥wnew∥=1+1=2;∥x∥=16+9=5.\Vert w_{\mathrm{new}}\Vert = \sqrt{1 + 1} = \sqrt{2}; \Vert x\Vert = \sqrt{16 + 9} = 5.
  4. cos⁡θnew=−152→θnew=\cos \theta _{\mathrm{new}} = -\frac{1}{5\sqrt{2}} \to \theta _{\mathrm{new}} = cos⁡−1(−152)\cos ^{-1}(-\frac{1}{5\sqrt{2}}) (just over 90°, as we want for a negative point).

Type 4 — Linear separability and networks of perceptrons

Learn the method

  1. Separable? Can one straight line (plane) put all 1s on one side and all 0s on the other? If a line through the data meets + − + (or − + −) in a row, it is not.
  2. A change of features (like x1→x12x_{1} \to x_{1}^{2}) can make data separable.
  3. Network theorem: any Boolean function of n inputs needs at most 2n2^{n} hidden perceptrons (+1 output).
  4. XOR with 2 hidden units: h1=OR,h2=ANDh_{1} = OR, h_{2} = AND, output fires for “OR but not AND”.
Past-paper question
2025 T2 Quiz 1Q652 marks

Question: f is a Boolean function with 10 inputs, represented exactly by a network of perceptrons with one hidden layer and one output perceptron. Let k be the sufficient number of perceptrons needed in the hidden layer. Enter k.

Reveal answer and solution

Answer: 1024

How to solve:

  1. The theorem uses one hidden perceptron per input pattern.
  2. 10 binary inputs →210\to 2^{10} patterns == 1024.
Past-paper question
2025 T3 Quiz 1Q473 marks

Question: Which statement best describes the main representational advantage of a Multi-Layer Perceptron (MLP) over a Single-Layer Perceptron (SLP)?

Reveal answer and solution

Answer: An MLP can learn non-linear decision boundaries, so it can classify data that is not linearly separable.

How to solve:

  1. An SLP draws one line → only linearly separable data.
  2. Hidden layers combine many lines → curved / non-linear boundaries (e.g. XOR).
  3. The other options (faster convergence, less overfitting, “only classification”) are not what the lecture’s representation-power result says.
Past-paper question
2026 T2 Quiz 1Q21 mark

Question: True or false: The decision boundary learned by a neural network is always non-linear.

Reveal answer and solution

Answer: False

How to solve:

  1. A single perceptron / sigmoid neuron is a neural network, and its boundary is a straight line.
  2. A network with only linear activations also gives a linear boundary. So “always non-linear” is false.
Past-paper question
2026 T1 Quiz 1Q43 marks

Question: An MLP with binary inputs x1,x2x_{1}, x_{2} has hidden outputs h1=h_{1} = step(−0.5+x1+x2-0.5 + x_{1} + x_{2}), h_{2} = step(−1.5+x1+x2-1.5 + x_{1} + x_{2}) and output y=y = step(w0+w1h1+w2h2w_{0} + w_{1}h_{1} + w_{2}h_{2}), where step(zz) = 1 if z≥0z \ge 0, else 0. Given w0=−0.5,w1=1w_{0} = -0.5, w_{1} = 1, which w2w_{2} make the network compute XOR? 0.5 · −0.55 · −0.60 · 1

Reveal answer and solution

Answer: −0.55 and −0.60

How to solve:

  1. h1=1h_{1} = 1 when x1+x2≥0.5→x_{1} + x_{2} \ge 0.5 \to OR. h2=1h_{2} = 1 when x1+x2≥1.5→x_{1} + x_{2} \ge 1.5 \to AND.
  2. Table:
    • (0,0):h=(0,0)→−0.5<0→0✔(0,0): h = (0,0) \to -0.5 < 0 \to 0 ✔
    • (0,1),(1,0):h=(1,0)→−0.5+1=0.5≥0→1✔(0,1), (1,0): h = (1,0) \to -0.5 + 1 = 0.5 \ge 0 \to 1 ✔
    • (1,1):h=(1,1)→−0.5+1+w2=0.5+w2(1,1): h = (1,1) \to -0.5 + 1 + w_{2} = 0.5 + w_{2}. XOR needs 0→0.5+w2<0→0 \to 0.5 + w_{2} < 0 \to w2<−0.5w_{2} < -0.5
  3. −0.55 ✔, −0.60 ✔; 0.5 and 1 give 1 for (1,1) ✘.
Past-paper question
2025 T2 Quiz 1Q644 marks

Question: Dataset D1D_{1} in R2\mathbb{R}^{2} (+ and − points shown). D2D_{2} is obtained by the transformation (x1,x2)→(x12,x2)(x_{1}, x_{2}) \to (x_{1}^{2}, x_{2}). Which are true? (a)D2(a) D_{2} is linearly separable (b) PLA will converge on D2(c)D1D_{2} (c) D_{1} is linearly separable (d) PLA will converge on D1D_{1}

Question figure — open to inspect the labels.
Question figure — open to inspect the labels.
Open image ↗
Question figure (redrawn exactly from the paper)
Reveal answer and solution

Answer: (a) and (b)

How to solve:

  1. InD1In D_{1}, every + lies above the parabola x2=x12x_{2} = x_{1}^{2} (inside the U) and every − lies below it (outside). A curve separates them, not a line. Along the line x2=1youx_{2} = 1 you meet −(x1=−1.5),+(x1=0.25),−(x1=1.5)→- (x_{1} = -1.5), + (x_{1} = 0.25), - (x_{1} = 1.5) \to no single line works → (c) ✘, (d) ✘ (PLA never stops).
  2. Putu=x12Put u = x_{1}^{2}. The boundary x2=x12x_{2} = x_{1}^{2} becomes x2=ux_{2} = u, a straight line. + points have x2>u,−x_{2} > u, - points have x2<u→D2x_{2} < u \to D_{2} is linearly separable → (a) ✔.
  3. PLA converges on separable data → (b) ✔.

Practice set (new questions)

P1. MP neuron, 4 excitatory inputs, θ=2\theta = 2. How many of the 16 inputs give output 1? C(4,2)+C(4,3)+C(4,4)=6+4+1=11. C(4,2) + C(4,3) + C(4,4) = 6 + 4 + 1 = 11.
P2. Perceptron w=(1,1),b=−1.5w = (1, 1), b = -1.5, output 1 if wTx+b≥0w^{T}x + b \ge 0. Which Boolean function? (1,1): 0.5 → 1; others −0.5 or −1.5 → 0. It is AND.
P3. PLA (labels ±1, update w ← w+yxw + yx): w = (1, −1), point x=(1,2),y=+1x = (1, 2), y = +1. New w? wTx=1−2=−1→w^{T}x = 1 - 2 = -1 \to predicts −1 ✘. w=(1,−1)+(1,2)=(2,1)w = (1,-1) + (1,2) = (2, 1).
P4. w=(2,0)w = (2, 0), misclassified x=(1,1)x = (1, 1) with y=+1,wnew=w+xy = +1, w_{\mathrm{new}} = w + x. Angle between wneww_{\mathrm{new}} and x? wnew=(3,1)w_{\mathrm{new}} = (3, 1). Dot=4Dot = 4. ∥wnew∥=10,∥x∥=2→cos⁡θ=4/20=0.894→θ≈26.6∘\Vert w_{\mathrm{new}}\Vert = \sqrt{10}, \Vert x\Vert = \sqrt{2} \to \cos \theta = 4/\sqrt{20} = 0.894 \to \theta \approx 26.6{}^\circ .
P5. Hidden perceptrons sufficient for any Boolean function of 6 inputs? 26=64. 2^{6} = 64.
P6. In the 2026 T1 Q4 network, which w2w_{2} makes it compute OR instead of XOR? Need (1,11,1) → 1: 0.5 + w_{2} ≥ 0 → any w_{2} ≥ −0.5 (e.g. 0 or 1).
P7. MP neuron, 5 inputs: is there aθa \theta giving exactly 10 ones? Possible counts are 31, 26, 16, 6, 1 for θ=1…5\theta = 1\ldots 5 (and 32 for θ=0\theta = 0). 10 is not one of them → no.
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑