---
title: "Problem set 8: coded modulation, ARQ and decoders"
heading: "Problem set 8: set partitioning and TCM gains, gaps to capacity, frame errors and ARQ efficiency, window sizes and frame lengths, hybrid ARQ, CRC escapes, and the cost of Viterbi decoding"
eyebrow: S8 · Problem set 8
type: problems
---

::: hook
These problems cover lessons 39 to 41: trellis-coded modulation by set partitioning, coded modulation's gap to capacity, ARQ protocols and their efficiency, frame length and window size, hybrid ARQ with chase combining, undetected errors behind a CRC, and what the Hamming and Viterbi decoders from the coding lab can and can't do.
:::

::: pool
pick: 12

::: check
kind: parts
given: E = 1 | 2 | 5; l = 0 | 1 | 2

## An 8-PSK constellation of symbol energy {E} is set-partitioned for a trellis code.

::: part
answer: 4*E*sin(pi*2^l/8)^2
tolerance: 0.5%

### What is the minimum squared distance within the level-{l} subsets?

::: misses
- [any] $4E_s\sin^2(\pi2^\ell/8)$.
:::
:::

::: part
answer: 10*log(4*E*sin(pi*2^l/8)^2/(2*E))
unit: dB
tolerance: 1%

### How does it compare with uncoded QPSK's minimum squared distance at the same energy, in dB?

::: misses
- [any] QPSK's is $2E_s$.
:::
:::
:::

::: check
kind: parts
given: f = 4 | 4.586 | 5.172 | 6.343

## A trellis code on 8-PSK has energy-normalized free squared distance {f}.

::: part
answer: 10*log(f/2)
unit: dB
tolerance: 0.5%

### What asymptotic gain does it give over uncoded QPSK?

::: misses
- [20*log(f/2)] Squared distances: 10 log.
- [any] $10\log_{10}(d_\text{free}^2/2)$.
:::
:::

::: part
answer: 10*log(f/(4*sin(pi/8)^2))
unit: dB
tolerance: 0.5%

### And over uncoded 8-PSK, whose bits per symbol it doesn't match?

::: misses
- [any] Compare with $4\sin^2(\pi/8) = 0.586$.
:::
:::
:::

::: check
kind: parts
given: k = 8 | 16 | 20

## A trellis code sends 3 bits per symbol on 16-QAM (points 2d apart, Es = 10d²) with free squared distance {k}d².

::: part
answer: k/10
tolerance: 0.5%

### What is its free squared distance relative to Es?

::: misses
- [any] Divide by $E_s = 10d^2$.
:::
:::

::: part
answer: 10*log((k/10)/(4*sin(pi/8)^2))
unit: dB
tolerance: 0.5%

### What gain does it give over uncoded 8-PSK at the same rate and energy?

::: misses
- [any] Compare with 8-PSK's $0.586E_s$.
:::
:::
:::

::: check
kind: parts
given: G = 7 | 9 | 11; c = 5 | 6 | 8; s = 0.5 | 1 | 1.5

## A link's uncoded modulation sits {G} dB from capacity at its target error rate; a code recovers {c} dB and constellation shaping {s} dB.

::: part
answer: G - c - s
unit: dB
tolerance: 0.5%

### How far from capacity is the coded, shaped link?

::: misses
- [any] Subtract both gains.
:::
:::

::: part
answer: 1.53 - s
unit: dB
tolerance: 1%

### How much shaping gain is still theoretically available?

::: misses
- [any] Shaping can recover at most $10\log_{10}(\pi e/6) = 1.53$ dB.
:::
:::
:::

::: check
kind: parts
given: p = 1e-6 | 1e-5 | 3e-5; L = 2000 | 8000 | 12000; a = 2 | 30 | 300

## Frames of {L} bits cross a link with bit error probability {p} and a = {a}.

::: part
answer: 1 - (1 - p)^L
tolerance: 1%

### What is the frame error probability?

::: misses
- [any] $1 - (1 - p)^L$.
:::
:::

::: part
answer: (1 - p)^L/(1 + 2*a)*100
unit: %
tolerance: 0.5%

### What efficiency does stop-and-wait reach?

::: misses
- [any] $(1 - P)/(1 + 2a)$.
:::
:::

::: part
answer: (1 - p)^L/(1 + 2*a*(1 - (1 - p)^L))*100
unit: %
tolerance: 0.5%

### And go-back-N with a large enough window?

::: misses
- [(1 - p)^L*100] That's selective repeat.
- [any] $(1 - P)/(1 + 2aP)$.
:::
:::
:::

::: check
kind: parts
given: d = 100 | 1000 | 6000; R = 1 | 10 | 100; B = 1500 | 9000

## A fiber link {d} km long (light at 2 × 10⁸ m/s) runs at {R} Gb/s with {B}-byte frames.

::: part
answer: d*1e3/2e8/(B*8/(R*1e9))
tolerance: 0.5%

### What is a, the propagation delay over the frame time?

::: misses
- [any] $t_\text{prop}/t_\text{frame}$.
:::
:::

::: part
answer: 1 + 2*d*1e3/2e8/(B*8/(R*1e9))
unit: frames
tolerance: 0.5%

### How large must the window be to keep the link full?

::: misses
- [any] $1 + 2a$.
:::
:::
:::

::: check
kind: parts
given: H = 64 | 128 | 320; p = 1e-6 | 1e-5 | 1e-4

## Frames carry an {H}-bit header over a channel with bit error probability {p}.

::: part
answer: (H + sqrt(H^2 - 4*H/ln(1 - p)))/2
unit: bits
tolerance: 0.5%

### What frame length maximizes the useful fraction?

::: misses
- [any] $L^* = \frac{H + \sqrt{H^2 - 4H/\ln(1 - p)}}{2}$.
:::
:::

::: part
answer: (1 - H/((H + sqrt(H^2 - 4*H/ln(1 - p)))/2))*(1 - p)^((H + sqrt(H^2 - 4*H/ln(1 - p)))/2)*100
unit: %
tolerance: 0.5%

### What useful fraction does that length reach with selective repeat?

::: misses
- [any] $(1 - H/L)(1 - p)^L$.
:::
:::
:::

::: check
kind: parts
given: S = -3 | 0 | 2; T = 4 | 6 | 9

## A hybrid-ARQ decoder needs {T} dB of SNR; each copy of a frame arrives at {S} dB, and the receiver chase-combines copies.

::: part
answer: ceil(10^((T - S)/10) - 1e-9)
unit: transmissions
tolerance: 0

### How many transmissions are needed to reach the threshold?

::: misses
- [any] The smallest k with $S + 10\log_{10}k \ge T$.
:::
:::

::: part
answer: S + 10*log(ceil(10^((T - S)/10) - 1e-9))
unit: dB
tolerance: 0.5%

### What SNR does the combination reach?

::: misses
- [any] $S + 10\log_{10}k$.
:::
:::
:::

::: check
kind: parts
given: P = 0.2 | 0.3 | 0.5; M = 2 | 3

## Frames fail independently with probability {P}, and the link gives up after {M} attempts.

::: part
answer: (1 - P^M)/(1 - P)
tolerance: 0.5%

### What is the average number of transmissions per frame?

::: misses
- [1/(1 - P)] That's with unlimited attempts.
- [any] $\sum_{k=0}^{M-1}P^k = (1 - P^M)/(1 - P)$.
:::
:::

::: part
answer: P^M
tolerance: 0.5%

### What fraction of frames is lost?

::: misses
- [any] All M attempts fail: $P^M$.
:::
:::
:::

::: check
kind: parts
given: p = 0.001 | 0.005 | 0.02

## Four data bits cross a binary symmetric channel with crossover {p}, either raw or Hamming (7,4)-coded.

::: part
answer: 1 - (1 - p)^4
tolerance: 0.5%

### What is the uncoded block error probability?

::: misses
- [any] $1 - (1 - p)^4$.
:::
:::

::: part
answer: 1 - (1 - p)^7 - 7*p*(1 - p)^6
tolerance: 1%

### And the coded one?

::: misses
- [1 - (1 - p)^7] The code corrects any single error.
- [any] Two or more errors in seven bits.
:::
:::
:::

::: check
kind: parts
given: R = 0.5 | 0.333 | 0.75; d = 5 | 7 | 10

## A convolutional code of rate {R} has free distance {d}.

::: part
answer: 10*log(R*d)
unit: dB
tolerance: 0.5%

### What asymptotic soft-decision coding gain does it give?

::: misses
- [10*log(d)] The rate charges for the extra bits: $10\log_{10}(Rd_\text{free})$.
- [any] $10\log_{10}(Rd_\text{free})$.
:::
:::

::: part
answer: floor((d - 1)/2)
unit: errors
tolerance: 0

### How many errors per error event can hard decisions always correct?

::: misses
- [any] $\lfloor(d - 1)/2\rfloor$.
:::
:::
:::

::: check
kind: parts
given: K = 3 | 5 | 7 | 9

## A rate-1/2 Viterbi decoder runs a code of constraint length {K}.

::: part
answer: 2^(K - 1)
unit: states
tolerance: 0

### How many states does its trellis have?

::: misses
- [2^K] The state is the K − 1 previous bits.
- [any] $2^{K-1}$.
:::
:::

::: part
answer: 2^K
unit: branches
tolerance: 0

### How many branch metrics does it compare per decoded bit?

::: misses
- [any] Two branches leave each of $2^{K-1}$ states.
:::
:::

::: part
answer: 5*K
unit: bits
tolerance: 0

### About how deep should its traceback be, by the usual rule of five constraint lengths?

::: misses
- [any] About 5K.
:::
:::
:::

::: check
kind: parts
given: r = 0.5 | 0.667 | 0.833; P = 0.001 | 0.05 | 0.2

## A link uses a rate-{r} code inside selective-repeat ARQ, and frames still fail with probability {P}.

::: part
answer: r*(1 - P)*100
unit: %
tolerance: 0.5%

### What fraction of the channel's bit rate carries delivered data?

::: misses
- [(1 - P)*100] The code's redundancy also costs: multiply by r.
- [any] $r(1 - P)$.
:::
:::
:::

::: check
kind: parts
given: n = 16 | 24 | 32; P = 0.001 | 0.01; F = 1000 | 100000

## A link checks frames with an {n}-bit CRC; {P} of its {F} frames per second arrive corrupted.

::: part
answer: F*P*2^(-n)*86400
tolerance: 0.5%

### On average, how many corrupted frames slip past the CRC per day?

::: misses
- [any] A random corruption passes with probability $2^{-n}$.
:::
:::

::: part
answer: 1/(F*P*2^(-n))/3600
unit: h
tolerance: 0.5%

### What is the mean time between undetected errors?

::: misses
- [any] The inverse of the rate of escapes, $FP2^{-n}$ per second.
:::
:::
:::

::: check
kind: choice

## Why does bit-interleaved coded modulation outperform trellis-coded modulation on fast Rayleigh fading, though TCM is better on a steady channel?

- [ ] BICM uses a larger constellation
- [x] On fading, the error rate falls with a power of the SNR equal to the number of independently faded symbols that separate two codewords; TCM's parallel transitions and short error events differ in few symbols, while BICM's bit interleaver spreads the binary code's whole Hamming distance over independent fades
- [ ] TCM can't be decoded on fading channels
- [ ] BICM doesn't need channel estimates

::: misses
- [1] Both can use the same constellation.
- [3] TCM decodes fine; its diversity is what's low.
- [4] Both need the channel for soft metrics.
:::
:::
:::
