📡 23ECE467 · Quiz 2 Masterguide

Channels · Fields · Polynomials · Cyclic Codes

1 · Exam Intel — what Quiz 2 actually is

Syllabus told by sir: Channel models / capacity, polynomials, cyclic codes (systematic + non-systematic), groups and fields. When class asked “only ppts 2, 3, 8?”, he said yes.

TopicRead this
Channel models + capacityInformation_Theory_and_Coding (1).pdf slides 49–80 (Unit-II)
Groups + Fields + PolynomialsLECTURE SLIDE 2.pdf (all 42 slides)
Extended GF(2m), minimal poly, vector spaceLECTURE SLIDE 3.pdf (14 slides)
Systematic vs non-systematic idea + trellis/ViterbiLECTURE SLIDE 8.pdf (convolutional example)
Gap you must know: none of the 3 PPTs has a full cyclic-code encoder page. Slide 8 is convolutional, not cyclic. But cyclic needs no new math: it is just polynomial division over GF(2) (Slides 2+3) + systematic idea (Slide 8). Prof expects you to combine them: c=m·g vs c=x^{n-k}m + rem.

Course Plan mapping: Lectures 9–15 = CO3 channels, Lectures 16–25 = CO4 Galois/poly/linear block, Lectures 26–40 = cyclic + convolutional + Viterbi. Quiz 2 sits at the 9–25 boundary, hence this mix.

2 · Formula Sheet (memorize)

Channels

Row sums to 1: Σj P(yj|xi)=1
P(x,y)=P(y|x)P(x) · Bayes: P(x|y)=P(y|x)P(x)/P(y)
P(Y)=P(X)·M (row vector × matrix) · H(Y|X)=Σ P(xi)·H(row i)
BSC C = 1 − Hb(ε), max at P(0)=P(1)=½
BEC C = 1 − γ
C = maxP(X) I(X;Y) · I=H(Y)−H(Y|X)
R = log2M / n · Noisy theorem: H/Ts ≤ C/Tc ⇒ reliable
Shannon–Hartley: C = B log2(1+S/N) · Slin=10dB/10

Fields + Polynomials + Cyclic

GF(2): 1+1=0 (XOR add, AND mul) · GF(p): mod-p ops
aq−1=1 · order divides q−1 · primitive generates all non-zero
f = q·g + r, deg r < deg g · f(1)=0 ⇒ (X+1) divides f
Irreducible: no divisor · Primitive deg m: smallest n with p|Xn+1 is n=2m−1
Non-systematic cyclic: c(x)=m(x)·g(x)
Systematic cyclic: c(x)=xn−km(x)+r(x), r=rem(xn−km / g)
Check: c mod g = 0 · h=(xn+1)/g · syndrome s=r mod g

3 · Watch ONLY this — your playlist, in order

Playlist PLXnsjPD8-xutVH9OHMzeBHFc-PYaEZ6AV (Vaishali). Same teacher, same notation. Durations from yt-dlp. Skip everything else if time is short.

#VideoTimeWhy + slide match
1L5 DMC14:11Channel matrix. Main deck 49-54.
2L6 Hartley16:39Capacity gap filler. Slide 80.
3L9 Linear Block11:13GF(2) background for cyclic. Slide 2.
4L10 Block Question9:35Practice. Same.
5L12 Cyclic Intro ★16:54Start cyclic here.
6L13 Poly Sys/Non-sys ★★12:05Prof hint. Watch twice. Do Q14 with it.
7L14 Matrix8:52G/H method.
8L15 Decoding17:45Syndrome.
9L16 Conv Intro12:42Slide 8 start.
10L17 Tree9:17Slide 8 tree.
11L19 State8:01Slide 8 FSM.
12L20 Trellis6:51Slide 8 trellis.
13L18 Viterbi7:11Slide 8 decode.

Total 2h31m, 1.5x ≈ 1h41m. No time? 58 min: L13 (12:05) + L15 (17:45) + L5 (14:11) + L20 (6:51) + L18 (7:11). Skip L1-L4 (Unit-I), L21 Sequential, L22 Turbo — not Quiz 2. Slides 2+3 proofs (mod-5 tables, Lagrange, GF(7), GF(4) α²=1+α, conjugates) are NOT in playlist — read slides for those.

4 · MIT OpenCourseWare

MIT 6.441 Information Theory — BSC/BEC capacity, Ch.4–5 MIT 6.02 Digital Comm — noisy channels, Shannon-Hartley, Viterbi MIT 6.450 Digital Comm I (Gallager) — GF(2), polynomials, cyclic MIT 6.451 Digital Comm II — systematic vs non-systematic, convolutional

Also: Prof. Ranjan Bose NPTEL course 117102062 (IIT Delhi) on Ansys/NPTEL portal covers linear block + Galois + cyclic + division algorithm — same as textbook T1. Duke ECE590 cyclic slides (pfister.ee.duke.edu) give the cleanest systematic proof: p = −xn−km mod g.

5 · Books from Course Plan — where to open

BookOpen this for Quiz 2
Bose 2nd edCh.2.2–2.7 channels + BSC/BEC + Hartley; Ch.4.2–4.4 poly division + cyclic c=m·g vs remainder-append; Ch.5.2–5.4 GF/minimal poly; Ch.6 trellis/Viterbi
SatyanarayanaCh.3 DMC matrix, Ch.4 Gaussian/Hartley, Ch.6 block-code algebra + GF tables, Ch.7 cyclic systematic + syndrome, Ch.8 convolutional
Lin & Costello 2nd edCh.1 BSC/AWGN models; Ch.2 groups/rings/fields + GF(2m) + minimal poly; Ch.5 cyclic encode (5.4–5.6) + syndrome; Ch.11–12 convolutional + Viterbi
WellsCh.2 DMC + symmetric C=log|Y|−H(row) + BSC/BEC; Ch.4–5 binary fields + poly mod xn+1 + systematic encoder + Meggitt; Ch.6 trellis/Viterbi/puncturing

If short on time: Bose Ch.2 + Ch.4.4 + Lin Ch.2.5–2.7 + Ch.5.4 covers 90% of Quiz 2.

6 · Channels in plain words

Matrix row = “if I send this, what can come out?” Rows sum to 1. P(Y)=P(X)·M. Joint = scale each row by P(xi). Then H(Y|X) = average entropy of rows, I=H(Y)−H(Y|X).

BSC flips with prob ε. BEC erases with prob γ (never flips). So BEC hurts less: C=1−γ vs BSC 1−Hb(ε). Ex: ε=0.1 → Hb≈0.469 → C≈0.531. γ=0.2 → C=0.8. Hartley: B=4kHz, 10dB (S/N=10) → 4000·log2(11)≈13.8kbps. Remember 1023→1024=210 trick for clean logs.

7 · Galois fields — the only 10 ideas you need

1. Group vs field in 1 line: group = add + undo. Field = add + undo and multiply + undo (except 0). Coding lives in fields so you can divide polynomials for parity.

2. GF(2) = {0,1}: add = XOR (1+1=0), mul = AND. This is 90% of Quiz 2. GF(3) = {0,1,2} mod-3. GF(p) only if p is prime.

GF(2) +01GF(2) ×01
001000
110101

3. Characteristic is prime: smallest λ with 1+1+…+1 (λ times) = 0. GF(2): 1+1=0 → λ=2. GF(7): λ=7.

4. aq−1=1: in GF(q), every non-zero to power q−1 = 1. Order of a divides q−1. Ex GF(7): 3→3,2,6,4,5,1 (order 6, primitive). 4→4,2,1 (order 3, not primitive).

5. GF(4) is NOT 0,1,2,3 mod-4: 4 not prime, 2 has no inverse mod-4. Build as {0,1,α,α2} with α2=1+α from X2+X+1=0. Powers: 1, α, α2=1+α, α3=1 cycle length 3=22−1.

6. GF(2m) recipe: take primitive degree-m poly p(X), set p(α)=0. Ex GF(16): p=X4+X+1 → α4=1+α. Then {0,1,α,…,α14}, α15=1. Poly form for add, power form for mul.

7. Conjugates: if β root, so are β2,β4,… Minimal poly = product (X+conjugates). Ex β=α3 in GF(16): conjugates α3,α6,α12,α9 → minimal X4+X3+X2+X+1.

8. Why for cyclic? Codewords are multiples of g. GF guarantees division works, remainder degree < deg g always exists, so systematic parity r = rem(xn−km/g) is unique.

Memorize: GF(2):1+1=0 · aq−1=1 · GF(2m) has 2m elements, α2m−1=1

Drill: write GF(3) add/mul tables from memory. Find inverses: 1−1=1, 2−1=2. Solve 2x+1=0 → x=1 (see Q9). List powers of α in GF(4) until back to 1.

8 · Polynomials over GF(2) — add / mul / div / irreducible

Bits = coefficients: 1011 = X3+X+1. Add = XOR columns, no carries. Mul = distribute + XOR. Div: f = q·g + r, deg r < deg g.

Add ex: (X3+X+1)+(X2+X+1) → 1011⊕0111=1100 → X3+X2 (X and 1 cancel).

Mul ex: (X2+1)(X+1)=X3+X2+X+1. Note (X+1)2=X2+1 (middle 2X=0).

Div ex (Slide 2, must do by hand): (X6+X5+X4+X+1) ÷ (X3+X+1):

X6÷X3=X3 → rem X5+X3+X+1 → +X2 → rem X2+X+1 → stop. q=X3+X2, r=X2+X+1 ✓

Root test: f(1)=0 ⇒ (X+1) divides f. Ex X4+X3+X2+1 at X=1: 1+1+1+1=0 → divisible.

Irreducible checklist: deg 2–3: check f(0)≠0 and f(1)≠0 → done. Deg ≥4: also rule out product of irreducible quadratics. Trap: X4+X2+1 = (X2+X+1)2, no root but reducible.

Primitive: irreducible deg m dividing Xn+1 smallest at n=2m−1. Ex X2+X+1 divides X3+1 → primitive, builds GF(4). X3+X+1: f(0)=1,f(1)=1 → irreducible → check divides X7+1 → primitive, builds GF(8).

For cyclic: need g | Xn+1. (7,4) g=X3+X+1 divides X7+1 ✓. Then h=(X7+1)/g, syndrome s = r mod g.

Drill: divide (X5+X+1)/(X3+X+1) → q=X2+1, r=X2 (Q12). Do Q10–Q12 twice without looking.

9 · Cyclic codes — systematic vs non-systematic

prof hint
Non-systematic: c(x) = m(x)·g(x) — message hidden
Systematic: xn−km(x) ÷ g(x) → remainder r(x) · c(x)=xn−km(x)+r(x) — message visible + parity

(7,4) demo, g=X3+X+1, m=1101 (m=X3+X2+1):
Non-sys: m·g = X6+X5+X4+X3+X2+X+1 → 1111111.
Sys: X3m=X6+X5+X3 ÷ g → r=1 → c=X6+X5+X3+1 → 1101001 (message 1101 readable). Both satisfy c mod g=0.
Checklist: deg g=n−k, deg m<k, g | Xn+1, h=(Xn+1)/g, syndrome s=r mod g.

10 · Convolutional (Slide 8) in 4 lines

Block = combinational (no memory). Convolutional = sequential (memory m, 2m states). Slide-8 code: rate ½, g0=1011, g1=1111, non-systematic feedforward. u=(10111) → v=(11,01,00,01,01,01,00,11). Poly form g0(D)=1+D2+D3. Viterbi = keep best path per state by Hamming distance (add-compare-select), traceback at end. Rate k/n, states 2m.

11 · 15 Practice Qs with solutions (click to open)

Do in order. Clean numbers chosen so logs collapse (½,¼,⅛, 1023/1024). If intermediate looks ugly, re-read the question.

Q1 — Matrix → P(Y), joint, H, I (uniform input)

Given

  • X ∈ {0, 1}, PX = [½, ½] (uniform)
  • Channel matrix M = [[¾, ¼], [¼, ¾]] — each row sums to 1

Steps

  1. PY = PX · M = [½·¾ + ½·¼,  ½·¼ + ½·¾] = [½, ½]
  2. Joint = scale row i of M by P(xi): row 0 → ½·[¾, ¼] = [⅜, ⅛]; row 1 → ½·[¼, ¾] = [⅛, ⅜]

Joint P(X, Y)

P(x, y)y = 0y = 1
x = 0⅜⅛
x = 1⅛⅜

H — entropies

  • H(X) = 1 bit (uniform), H(Y) = 1 bit (uniform)
  • Each row of M is Bernoulli(¼): H(row) = Hb(¼) ≈ 0.811
  • H(Y|X) = ½·Hb(¼) + ½·Hb(¼) ≈ 0.811 bits
  • H(X, Y) = H(X) + H(Y|X) ≈ 1 + 0.811 = 1.811 bits

I — mutual information

I(X; Y) = H(Y) − H(Y|X) ≈ 1 − 0.811 ≈ 0.189 bits
Q2 — Non-uniform input

Given

  • X ∈ {0, 1}, PX = [¼, ¾] (not uniform)
  • Channel matrix M = [[1, 0], [½, ½]] — row 0 is noiseless, row 1 is fair coin

Steps

  1. Joint row 0 = ¼ · [1, 0] = [¼, 0]
  2. Joint row 1 = ¾ · [½, ½] = [⅜, ⅜]
  3. PY = column sums of the joint = [¼ + ⅜, 0 + ⅜] = [⅝, ⅜]

Joint P(X, Y)

P(x, y)y = 0y = 1
x = 0¼0
x = 1⅜⅜

H — entropies

  • H(X) = −¼·log₂¼ − ¾·log₂¾ ≈ 0.811 bits
  • H(Y) = −⅝·log₂⅝ − ⅜·log₂⅜ ≈ 0.954 bits
  • H(Y|X) = ¼·H([1, 0]) + ¾·H([½, ½]) = ¼·0 + ¾·1 = 0.75 bits
  • H(X, Y) = H(X) + H(Y|X) ≈ 0.811 + 0.75 = 1.561 bits

I — mutual information

I(X; Y) = H(Y) − H(Y|X) ≈ 0.954 − 0.75 ≈ 0.204 bits
Q3 — BSC p = ¼

Given

  • Binary Symmetric Channel with crossover probability ε = ¼
  • Capacity is the max of I(X; Y) over P(X) — achieved at P(0) = P(1) = ½

Steps

  1. Hb(¼) ≈ 0.811 bits
  2. C = 1 − Hb(ε) = 1 − Hb(¼) = 1 − 0.811

Answer

C ≈ 0.189 bits/use
Q4 — BSC p = ⅛

Given

  • Binary Symmetric Channel with crossover probability ε = ⅛
  • Capacity is the max of I(X; Y) over P(X) — achieved at P(0) = P(1) = ½

Steps

  1. Hb(⅛) ≈ 0.544 bits
  2. C = 1 − Hb(ε) = 1 − Hb(⅛) = 1 − 0.544

Answer

C ≈ 0.456 bits/use
Q5 — BEC α = ¼

Given

  • Binary Erasure Channel with erasure probability γ (α) = ¼
  • BEC never flips a bit — it only erases it; capacity is max at P(0) = P(1) = ½

Steps

  1. C = 1 − γ = 1 − ¼ = ¾ bit/use
  2. For n = 1000 uses: max info bits = n · C = 1000 × ¾ = 750

Answer

C = ¾ bit/use · 1000 uses → 750 info bits max
Q6 — Hartley B=4kHz SNR=4.77dB

Step 1 — convert dB to a linear power ratio (the step that usually goes wrong):

Slin = 10dB/10 = 104.77/10 = 100.477 ≈ 3

Step 2 — Shannon–Hartley capacity:

C = B · log2(1 + S/N) = 4000 · log2(1 + 3) = 4000 · log24

Step 3 — evaluate: log24 = 2, so C = 4000 × 2 = 8000 bps.

Q7 — Hartley B=1MHz SNR=30dB

Step 1 — convert dB to a linear power ratio:

Slin = 10dB/10 = 1030/10 = 103 = 1000

Step 2 — Shannon–Hartley capacity:

C = B · log2(1 + S/N) = 106 · log2(1 + 1000) = 106 · log2(1001)

Step 3 — approximate: 1024 = 210, so log2(1024) = 10 and 1001 is just under it:

log2(1001) ≈ 9.97  ⇒  C ≈ 9.97 × 106 bps ≈ 10 Mbps
Q8 — Is ({0,1},+₂) a group? Field?

Step 1 — test the additive structure ({0,1}, +₂) as a group:

  1. Closure: 0+0 = 0, 0+1 = 1, 1+1 = 0 — every sum stays in {0,1}. ✓
  2. Identity: 0, since x + 0 = x for both elements. ✓
  3. Inverse: each element is its own inverse (0+0 = 0, 1+1 = 0). ✓
  4. Associative + commutative: +₂ is XOR, so both hold. ✓

⇒ ({0,1}, +₂) is an Abelian group.

Step 2 — test the multiplicative structure ({0,1}, ×) as a group:

  1. Closure: products stay in {0,1}. ✓
  2. Identity: 1, since x · 1 = x. ✓
  3. Inverse: 0 has none — 0 · x = 0 ≠ 1 for every x. ✗

⇒ ({0,1}, ×) is NOT a group.

Step 3 — field verdict: drop 0; the non-zero set {1} is a group under ×, and × distributes over +₂ on all of {0,1}:

GF(2) = ({0,1}, +₂, ×) is a field
Q9 — GF(3) tables + solve 2x+1=0

Step 1 — addition table (mod 3):

 + | 0  1  2
---+---------
 0 | 0  1  2
 1 | 1  2  0
 2 | 2  0  1

Step 2 — multiplication table (mod 3):

 × | 0  1  2
---+---------
 0 | 0  0  0
 1 | 0  1  2
 2 | 0  2  1

Step 3 — inverses: 1−1 = 1 (since 1·1 = 1); 2−1 = 2 (since 2·2 = 4 ≡ 1 mod 3).

Step 4 — solve 2x + 1 = 0 (mod 3):

2x ≡ −1 ≡ 2 (mod 3)
x ≡ 2−1 · 2 ≡ 2 · 2 ≡ 4 ≡ 1 (mod 3)

Check: 2(1) + 1 = 3 ≡ 0 (mod 3). ✓

Q10 — Add (x³+x+1)+(x²+x+1)

Step 1 — write both polynomials as GF(2) coefficient columns (x³ x² x¹ x⁰):

   x³ x² x¹ x⁰
   -----------
   1  0  1  1    (x³+x+1)
⊕  0  1  1  1    (x²+x+1)
   -----------
   1  1  0  0    (x³+x²)

Step 2 — XOR each column: 1⊕0 = 1, 0⊕1 = 1, 1⊕1 = 0, 1⊕1 = 0.

(x³+x+1) + (x²+x+1) = x³+x²   →   1011 ⊕ 0111 = 1100

GF(2) addition is XOR — no carries, coefficients mod 2.

Q11 — Multiply (x²+1)(x+1)

Steps (all arithmetic over GF(2): coefficients mod 2, add = XOR):

  1. Message / polys: A(x)=x²+1 → 101 · B(x)=x+1 → 11
  2. Distribute: x²·(x+1) = x³+x² and 1·(x+1) = x+1
  3. Add (XOR, no carries): (x³+x²) ⊕ (x+1) — no coefficient cancels, all four terms survive
  4. Result: x³+x²+x+1 → codeword 1111
Check: (x²+1)(x+1) = x³+x²+x+1 ✓
Q12 — Divide (x⁵+x+1)/(x³+x+1) + irreducible?

Steps (polynomial long division over GF(2), subtract = XOR):

  1. Divide this: f(x)=x⁵+x+1 → 100011  ÷  g(x)=x³+x+1 → 1011
  2. First term: x⁵÷x³ = x² · x²·g = x⁵+x³+x² · f ⊕ x²g = x³+x²+x+1
  3. Second term: x³÷x³ = 1 · 1·g = x³+x+1 · (x³+x²+x+1) ⊕ g = x²
  4. Quotient: q(x)=x²+1 → 101  ·  Remainder: r = x² → 100
Verify: f = q·g + r → (x²+1)(x³+x+1) + x² = x⁵+x+1 ✓

Irreducible check on g: g(0)=1, g(1)=1+1+1=1 (mod 2) → no linear factor. deg g = 3, so any non-trivial factor would be linear → g is irreducible.

Q13 — Cyclic non-systematic (7,4) m=1101

Steps 1–4 — non-systematic encoding (c = m·g, message hidden in the product):

  1. Message: m = 1101 → m(x) = x³+x²+1
  2. Generator: g(x) = x³+x+1 → 1011, deg g = n−k = 3, and g | (X⁷+1)
  3. Multiply: c(x) = m(x)·g(x) = (x³+x²+1)(x³+x+1)
    x³·g = x⁶+x⁴+x³ · x²·g = x⁵+x³+x² · 1·g = x³+x+1
    XOR (x³ appears 3× → survives): c(x) = x⁶+x⁵+x⁴+x³+x²+x+1
  4. Codeword: c = 1111111 — the message 1101 is not readable in it
Verify: c mod g = 0 — holds by construction, since c = m·g is a multiple of g ✓
Q14 — Cyclic systematic (7,4) m=1101 ★ most likely

Steps 1–4 — systematic encoding (message visible up front, parity appended):

  1. Message, shifted by n−k = 3: m = 1101 → m(x) = x³+x²+1
    x³·m(x) = x⁶+x⁵+x³ → 1101000
  2. Divide by g: (x⁶+x⁵+x³) ÷ (x³+x+1)
    x³·g = x⁶+x⁴+x³ → rem x⁵+x⁴ · x²·g = x⁵+x³+x² → rem x⁴+x³+x² · x·g = x⁴+x²+x → rem x³+x · 1·g = x³+x+1 → rem 1
    Remainder: r = 1 → parity 001
  3. Append parity: c(x) = x³m(x) + r(x) = x⁶+x⁵+x³+1
  4. Codeword: c = 1101001 — message 1101 readable up front, parity 001 at the tail
Verify: c mod g = (x³m mod g) ⊕ r = 1 ⊕ 1 = 0 ✓
Same m = 1101, same gNon-systematic (Q13)Systematic (Q14)
Formulac = m·gc = x³m + rem(x³m/g)
Codeword11111111101001
Message visible?NoYes — 1101 + parity 001
Checkc mod g = 0 ✓c mod g = 0 ✓

Both codewords are valid — different codewords of the same (7,4) code. The systematic form is the examinable one: always work out rem(xⁿ⁻ᵏm / g) by long division, never by spotting.

Q15 — Convolutional rate + Viterbi step

Steps (Slide-8 code: rate ½, feedforward, non-systematic):

  1. Parameters: k=1, n=2, memory m=2 → R = k/n = ½, states = 2ᵐ = 4
  2. Generators: g0 = 1011 → g0(D) = 1+D²+D³ · g1 = 1111 → g1(D) = 1+D+D²+D³
  3. Branch metric: for received pair y and branch label l, metric = Hamming(y, l)
  4. ACS (add–compare–select), per state: add each incoming branch metric to its path metric → two paths merge per state → compare → keep the smaller survivor, discard the other
  5. Traceback: after the last bit, start from the best final state and walk back the survivor pointers to read off u
Example, from state 00, received y = 00: input 0 → label 00, metric = 0  ·  input 1 → label 11, metric = 2 → keep the input-0 path

u = 10111 → v = (11,01,00,01,01,01,00,11). If two paths tie, either may be kept (Viterbi arbitrary-tie rule).