Recall warm-up
- Minimum frame size for CSMA/CD?
Stuck? Peek at 2.3.3 CSMA and its persistence variants; CSMA/CD; minimum frame size = 2·Tp·B
- CSMA: sense before sending; collisions still possible within T_p.
- 1-persistent / non-persistent / p-persistent: what to do when busy.
- CSMA/CD: listen while sending; on collision jam, stop, back off.
- L_min = 2·T_p·B; d_max = L_min·v/(2B); i.e. T_t ≥ 2T_p.
- CSMA/CA (Foundation): wireless avoids collisions instead of detecting them.
- Slotted ALOHA maximum throughput?
Stuck? Peek at 2.3.2 Pure and slotted ALOHA: vulnerable time, throughput, maximum efficiency
- T = frame time; G = attempts per T.
- Pure: vulnerable 2T, S = G·e⁻²ᴳ, max 1/(2e) ≈ 0.184 at G = 0.5.
- Slotted: vulnerable T, S = G·e⁻ᴳ, max 1/e ≈ 0.368 at G = 1.
- Finite N: P(success) = N·p·(1 − p)ᴺ⁻¹.
- Expected tries until success with probability p each?
Stuck? Peek at 0.2.4 Exponents, logarithms and basic probability
- 2ᵃ·2ᵇ = 2ᵃ⁺ᵇ; 2¹⁰ ≈ 10³ (estimates only).
- log₂ x = power of 2 giving x; bits for N values = ⌈log₂ N⌉.
- P(none) = (1−p)ⁿ · P(≥ 1) = 1 − (1−p)ⁿ · P(exactly 1) = n·p·(1−p)ⁿ⁻¹.
- (1 − 1/n)ⁿ → 1/e ≈ 0.368; 1/(2e) ≈ 0.184.
- 1 + 2 + … + 2ᵏ⁻¹ = 2ᵏ − 1; expected tries = 1/p.
The Hook
Two people bump into each other in a doorway. If both step back and step forward again at the same moment, they bump again. The fix: each picks a random pause — and if they keep bumping, they pick from longer and longer pauses. That is binary exponential backoff, the retry rule of CSMA/CD.
Predict First
After their first collision, A and B each choose a wait of 0 or 1 slot at random. What is the probability they collide again?
,1/2: both choose 0 or both choose 1. A wins (picks a smaller wait) with probability 1/4, B wins with 1/4.
Core Concept
The rule
Slot time = 512 bit times in classic 10 Mbps shared LANs (51.2 µs), the same as the minimum frame time from Lesson 2.3.3.
| Collision number n | K chosen from | Number of choices |
|---|---|---|
| 1 | {0, 1} | 2 |
| 2 | {0, …, 3} | 4 |
| 3 | {0, …, 7} | 8 |
| 10 | {0, …, 1023} | 1024 |
| 11–15 | {0, …, 1023} | 1024 (capped) |
| 16 | — | give up |
Why exponential?
Each collision hints that many stations are competing. Doubling the range spreads their retries out quickly, so the chance of another clash drops — at the cost of longer waits under heavy load.
Probability of winning
"Winning" = choosing a strictly smaller K than every rival. For two stations with ranges of size a and b, count the (KA, KB) pairs with KA < KB and divide by a·b.
A classic twist (the capture effect): if A won the previous round and now collides with B again, A's counter restarts at its first collision (range 2) while B is at its second (range 4) — so A is more likely to win again.
| K_A ↓ / K_B → | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | tie | A | A | A |
| 1 | B | tie | A | A |
Putting it together
- Each collision doubles the random backoff range (cap 1024, give up at 16).
- Winning means drawing a strictly smaller K; count the pairs.
- Recent winners restart small, so they tend to win again (capture).
Visual
Worked Examples
A and B collide for the first time. Probability that A transmits first without colliding? Probability they collide again?
Show the full solution
Both pick from {0, 1}: 4 equally likely pairs. A wins only with (0, 1): 1/4. Tie (0,0) or (1,1): 1/2.
10 Mbps network, slot = 512 bit times. After its 3rd collision a station picks K = 5. How long does it wait?
Show the full solution
Slot = 512 / 10⁷ = 51.2 µs. Wait = 5 × 51.2 = 256 µs. (K = 5 is allowed because the range after 3 collisions is 0..7.)
A and B collide; A wins and sends its frame. A's next frame immediately collides with B's retry. Now A is at its 1st collision (for the new frame) and B at its 2nd. Probability that A wins this round?
Show the full solution
KA ∈ {0, 1}, KB ∈ {0, 1, 2, 3}: 8 pairs. A wins when KA < KB: KA = 0 → 3 pairs; KA = 1 → 2 pairs. P = 5/8 = 0.625.
GATE Traps
- After the n-th collision the range is {0, …, 2ⁿ − 1} — it includes 0 and has 2ⁿ values.
- The range stops growing after 10 collisions but attempts continue until 16.
- A station that just succeeded restarts its own counter; its rival keeps its larger range (capture effect).
Memory Hook
"Bump once: pick from 2. Bump again: pick from 4." Double the doorway dance each time.
Connect the Dots
Random access works well under light load but wastes slots in collisions under heavy load. Next (2.3.5): the third family — stations take turns in an orderly way, so collisions never happen.
Self-Test
- NAT
After the 4th collision, from how many values is K chosen?
Write your answer before opening the key.
- NAT
Two stations both at their 2nd collision. Probability they collide again (3 decimals)?
Write your answer before opening the key.
- NAT
Both stations at their 2nd collision. Probability that A wins (3 decimals)?
Write your answer before opening the key.
- MCQ
After the 13th collision a station chooses K from:
- {0, …, 8191}
- {0, …, 1023}
- {0, …, 12}
- it gives up
- MSQ
Which are true of binary exponential backoff?
- The range doubles after each collision up to a cap.
- K is always at least 1.
- Under heavy load average waits grow.
- Slot time equals the minimum frame time.
Rule Card
- After the n-th collision: K uniform in {0, …, 2^min(n,10) − 1}; wait K × slot; abort after 16.
- Slot = 512 bit times (51.2 µs at 10 Mbps).
- P(A wins) = #{K_A < K_B} / (a·b); both at range 2: win 1/4, tie 1/2.
- Capture: A at range 2 vs B at range 4 → A wins 5/8.
Concept Ledger
- binary exponential backoff
- slot time (512 bit times)
- backoff range 0..2ⁿ − 1, cap at 10, abort at 16
- probability of winning
- capture effect
Answer Vault
Try the questions first. Open when you are ready to check.
Warm-up answers
- L_min = 2·T_p·B.
- 1/e ≈ 0.368 at G = 1.
- 1/p.
Self-test answers
- 16 — 2⁴ = 16 values (0..15).
- 0.25 — 4 matching pairs out of 16 = 0.25.
- 0.375 — Pairs with K_A < K_B: 6 of 16 = 0.375.
- B — The range is capped at 2¹⁰ = 1024 values.
- A: The exponent is capped at 10.
- C: Not linear.
- D: It gives up only after 16 attempts.
- ACD — Doubling with cap; longer waits; slot = 512 bit times.
- B: K may be 0 (retry immediately).
Flashcards
- Range after the n-th collision?
Reveal answer
{0, …, 2^min(n,10) − 1}. - Both at the first collision: P(collide again)?
Reveal answer
1/2. - A at range 2, B at range 4: P(A wins)?
Reveal answer
5/8.
Exam shortcuts
- Two stations, ranges a and b: P(A wins) = #{K_A < K_B} / (a·b); P(tie) = min(a,b)/(a·b). — uniform independent choices, ties = another collision.
- Range after n collisions = 2^min(n,10); give up after 16 attempts. — classic binary exponential backoff.