Alice wants to send a message of n packets to Bob. She can send a number of packets through a channel; however, the channel erases k 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 n packets in the message be m1,⋯,mn. They can represented as the points (1,m1),⋯,(n,mn), which can be used to construct a unique polynomial P(x) of degree at most n−1.
If Bob can construct P(x), then he can figure out what the original message is. In order to do so, he needs to receive n points to reconstruct P(x). Since the channel erases k, Alice must send n+k points. So Alice sends the packets P(1),⋯,P(n+k), from which Bob will receive n points to reconstruct the polynomial with. Once Bob has P(x), he can determine the original message by evaluating P(1),⋯,P(n).
General Errors
What if the channel changes the values in k 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
Again, Alice creates P(x) with degree n−1.
Alice sends n+2k packets: P(1),⋯,P(n+2k)
Bob receives n+2k packets, k of which are now changed
Let the packets received be r1,⋯,rn+2k
Let these errors occur at positions e1,⋯,ek
Erasures
Solution
General Errors
Berlekamp-Welch