Discussion 5B

Erasures

Alice wants to send a message of nn packets to Bob. She can send a number of packets through a channel; however, the channel erases kk packets. How many packets does Alice need to send in order for Bob to receive the message?
(The packets contain information about their positions, so we know which packets are lost.)

Solution

Let the nn packets in the message be m1,,mnm_1, \cdots, m_n. They can represented as the points (1,m1),,(n,mn)(1, m_1), \cdots, (n, m_n), which can be used to construct a unique polynomial P(x)P(x) of degree at most n1n-1
If Bob can construct P(x)P(x), then he can figure out what the original message is. In order to do so, he needs to receive nn points to reconstruct P(x)P(x). Since the channel erases kk, Alice must send n+kn+k points. So Alice sends the packets P(1),,P(n+k)P(1), \cdots, P(n+k), from which Bob will receive nn points to reconstruct the polynomial with. Once Bob has P(x)P(x), he can determine the original message by evaluating P(1),,P(n)P(1), \cdots, P(n).

General Errors

What if the channel changes the values in kk packets instead of just erasing them? Can Alice still transmit a message that Bob can decode; if so, how many packets does Alice need to send?

Berlekamp-Welch

  1. Again, Alice creates P(x)P(x) with degree n1n-1.
  1. Alice sends n+2kn+2 k packets: P(1),,P(n+2k)P(1), \cdots, P(n + 2 k)
  1. Bob receives n+2kn+2 k packets, kk of which are now changed
  1. Let the packets received be r1,,rn+2kr_1, \cdots, r_{n+2k}
  1. Let these errors occur at positions e1,,eke_1, \cdots, e_k
  1. Define E(x)=(xe1)(xek)=xk+bk1xk1++b0E(x) = (x-e_1) \cdots (x-e_k) = x^k + b_{k-1} x^{k-1} + \cdots + b_0
  1. Then P(i)E(i)=riE(i)P(i) E(i) = r_i E(i) for all i{1,,n+2k}i \in \{ 1, \cdots, n+2k \} because
  1. if ii is a location of an error, then E(i)=0E(i)=0
  1. if ii is not a location of an error, then P(i)=riP(i) = r_i
  1. Let Q(x)=P(x)E(x)=an+k1xn+k1++a0Q(x) = P(x) E(x) = a_{n+k-1} x^{n+k-1} + \cdots + a_0
  1. Then from (5) we know Q(i)=riE(i)Q(i) = r_i E(i) for i{1,,n+2k}i \in \{ 1, \cdots, n+2k \}
  1. this gives us a system of n+2kn+2k equations
  1. E()E(\cdot) has kk unknown coefficients
  1. Q()Q(\cdot) has n+kn + k unknown coefficients
  1. Once we find E(x)E(x) and Q(x)Q(x), we can find P(x)=Q(x)E(x)P(x) = \frac{Q(x)}{E(x)}

We actually do the above over a finite field GF(p)GF(p) instead of the reals; reason is here: Shamir’s Secret Sharing