A gateway drops whole frames while the radio hop flips bits; how do you model a link carrying both kinds of damage?
answer
- two impairments, two granularities
- a dropped frame erases every symbol together
- multiply the survival probabilities
- corrupted frames outnumber missing ones here
- unmarked loss is deletion, not erasure
basics
~20 sModel the two layers separately: bit flips within frames that arrive, and whole-frame loss as a burst erasure of every symbol in that frame at once. A dropped frame is only an erasure if something marks the gap; otherwise the stream silently shortens.
solid answer
~50 sTwo impairments with different granularities do not collapse into one parameter. The radio hop is a **symmetric** impairment: each bit within a delivered frame flips with some probability `p`, silently. The gateway is an **erasure** impairment at frame granularity: with probability `e` the whole frame vanishes, which at symbol level is hundreds or thousands of erasures arriving together and aligned to the frame boundary. Compose them for delivery: a frame arrives intact with probability `(1 - e) * (1 - p)^n`. At `e = 0.02`, `n = 1000`, `p = 0.001` that is `0.98 * 0.368`, about 36 percent. The critical question is whether the receiver can tell a frame is missing. If it can, the loss is a located erasure; if it cannot, the position information is gone and the stream just gets shorter, which is a harder problem than either model.
code
pseudocode · 10 linesfor each frame f in stream:
if random() < e:
mark every symbol of f as ERASED # located gap, no values
continue # no per-bit draw happens
for i in 0 .. n-1:
if random() < p:
invert bit i of f # silent flip, position unknown
# frame intact only if neither branch fired:
# (1 - e) * (1 - p)^ngo deeper
Recall that losing a whole frame and corrupting a few bits are different kinds of damage. One removes a large contiguous chunk, the other changes scattered values inside data that did arrive.
Explain how the two impairments compose: survival probabilities multiply, and the result splits into missing frames versus corrupted arrivals. Be able to state the frame-level and bit-level parameters separately.
Demonstrate that you measure the two paths independently and ask whether the receiver can localise a loss at all, because that answer decides whether the cheap erasure model is available to the design downstream.
The judgement is where to spend: reducing gateway drops, hardening the radio hop, or paying redundancy. The worked split usually shows one of them dominating, and committing the organisation to the wrong one is an expensive, slow mistake to reverse.
## Two loss modes, two granularities A last-mile radio hop feeding a gateway carries two quite different impairments, and the mistake is to average them into one number. - **Within a frame that arrives**, the physical hop corrupts individual bits. This is symmetric-channel damage: a flip probability per bit, silent, position unknown. - **At the gateway**, whole frames disappear — a queue overflows, a deadline is missed, a scheduler drops. This is erasure damage at a much coarser granularity: not one symbol but every symbol in that frame, all at once, aligned to the frame boundary. Both can be summarised as "bit error rate", and doing so destroys the structure that every downstream decision depends on. A frame drop is maximally bursty by construction: the damaged symbols are perfectly contiguous and their count is the frame length. | | radio hop | gateway | |---|---|---| | unit damaged | one bit | one whole frame | | damage announced | no | only if something notices | | positions affected | scattered independently | contiguous, boundary aligned | | natural model | symmetric, parameter p | erasure, parameter e | ## Composing the two Model them as a chain and multiply the survival probabilities. A frame survives the gateway with probability `1 - e`, and given that it arrived, every one of its `n` bits survives the hop with probability `(1 - p)^n`. So: - `P(frame delivered intact) = (1 - e) * (1 - p)^n` - With `e = 0.02`, `n = 1000`, `p = 0.001`: `0.98 * 0.368 = 0.36`, about 36 percent. Notice the structure this exposes. Of the 64 percent of frames that are not intact, only 2 percentage points are missing frames; the rest are frames that **arrived corrupted**. Those are two completely different problems — one is a located gap, the other a silent error — and a single averaged rate would have hidden the split. Cutting the gateway's drop rate to zero here would still leave 63 percent of frames damaged. ## Erasure or deletion: the receiver decides Whether a dropped frame is an **erasure** depends entirely on whether the receiver can see the hole: 1. **The gap is identifiable.** Something in the stream lets the receiver say "a frame belongs here and did not arrive". The loss is then an erasure of `n` known positions, and it is the cheap kind of damage to repair. 2. **The gap is invisible.** The receiver sees a continuous stream with a frame silently absent. The positions are gone, not merely the values, so everything downstream shifts. This is not an erasure channel at all, and it is worse than either model: a repair scheme designed for gaps has nothing to anchor to, and a scheme designed for flips sees an entire stream that no longer lines up. So "whole-frame loss is just a big erasure" is only half true, and the missing half is the part worth saying in an interview. ## What to measure - **Frame drop rate at the gateway**, separately from bit corruption on the hop. They have different causes, different time signatures and different fixes. - **Corrupted-frame rate among frames that arrive**, which is the quantity `(1 - p)^n` predicts. - **Whether losses are independent between frames.** A gateway that drops because of queue pressure loses frames in runs, so consecutive frames vanish together — a burst at a level above the one where bursts are usually discussed. - **Whether the receiver can localise a loss at all**, because that single yes-or-no answer decides which channel model the rest of the design is entitled to assume. ## What interviewers listen for - That you keep the two impairments separate, with their own parameters and their own granularity. - That you multiply survival probabilities and can read the resulting split (missing versus corrupted) out of the numbers. - That you raise the localisation question rather than assuming a dropped frame is automatically an erasure. - That you notice frame drops are themselves correlated when the cause is congestion, so a per-frame independent parameter is another averaging step to justify.
- Why not fold the gateway's frame drops into a single higher bit error rate?Because the two impairments differ in everything that matters downstream: granularity, whether damage is announced, and how the damaged positions cluster. Folding them together gives a number that predicts neither the missing-frame rate nor the corrupted-frame rate, and it hides the fact that one kind of damage is a cheap located gap while the other is an expensive silent error.
- What changes if the gateway drops frames in runs rather than independently?Correlation moves up a level: consecutive frames vanish together, so any scheme that spreads redundancy across a handful of neighbouring frames loses all of it at once. The per-frame drop probability still describes the average, but the distribution of consecutive losses is what determines whether a recovery scheme built over several frames actually survives.
- In the worked numbers, which damage dominates, missing frames or corrupted ones?Corrupted ones, by a wide margin. With a 2 percent drop rate, a 1000-bit frame and a 0.001 flip probability, about 2 percent of frames go missing while roughly 63 percent of the frames that do arrive carry at least one flipped bit. Eliminating the gateway's drops entirely would barely move the total damage rate.
saying these in an interview costs you the question
- Averages frame drops and bit flips into one rate
- Calls every dropped frame an erasure without checking localisation
- Assumes a frame drop damages about half its bits
- Treats frame losses as independent when congestion causes them
- Ignores that corrupted arrivals can outnumber missing frames
- Says an unmarked loss and a marked gap cost the same