erasure codes erasure code example example
play

Erasure Codes. Erasure Code: Example. Example Make polynomial, P ( - PowerPoint PPT Presentation

Erasure Codes. Erasure Code: Example. Example Make polynomial, P ( x ) = a 2 x 2 + a 1 x + a 0 Satellite n packet message. So send n + k ! with P ( 1 ) = 1, P ( 2 ) = 4, P ( 3 ) = 4. Send message of 1,4, and 4. Modulo 7 to accommodate at least


  1. Erasure Codes. Erasure Code: Example. Example Make polynomial, P ( x ) = a 2 x 2 + a 1 x + a 0 Satellite n packet message. So send n + k ! with P ( 1 ) = 1, P ( 2 ) = 4, P ( 3 ) = 4. Send message of 1,4, and 4. Modulo 7 to accommodate at least 6 packets. Make polynomial, P ( x ) = a 2 x 2 + a 1 x + a 0 ··· n + k 1 2 Linear equations: ······ with P ( 1 ) = 1, P ( 2 ) = 4, P ( 3 ) = 4. How? P ( 1 ) = a 2 + a 1 + a 0 ≡ 1 ( mod 7 ) Lose k packets. Lagrange Interpolation. P ( 2 ) = 4 a 2 + 2 a 1 + a 0 ≡ 4 ( mod 7 ) Linear System. ··· n + k 1 2 P ( 3 ) = 2 a 2 + 3 a 1 + a 0 ≡ 4 ( mod 7 ) ······ Work modulo 5. 6 a 1 + 3 a 0 = 2 ( mod 7 ) , 5 a 1 + 4 a 0 = 0 ( mod 7 ) P ( x ) = x 2 ( mod 5 ) P ( 1 ) = 1 , P ( 2 ) = 4 , P ( 3 ) = 9 = 4 ( mod 5 ) a 1 = 2 a 0 ( mod 7 ) a 0 = 2 ( mod 7 ) a 1 = 4 ( mod 7 ) a 2 = 2 ( mod 7 ) GPS device Any n packets is enough! P ( x ) = 2 x 2 + 4 x + 2 Send ( 0 , P ( 0 )) ... ( 5 , P ( 5 )) . 6 points. Better work modulo 7 at least! P ( 1 ) = 1, P ( 2 ) = 4, and P ( 3 ) = 4 n packet message. Why? ( 0 , P ( 0 )) = ( 5 , P ( 5 )) ( mod 5 ) Send Packets: ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 4 ) , ( 4 , 7 ) , ( 5 , 2 ) , ( 6 , 0 ) Optimal. Notice that packets contain “x-values”. Bad reception! Questions for Review Polynomials. Send: ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 4 ) , ( 4 , 7 ) , ( 5 , 2 ) , ( 6 , 0 ) Recieve: (1,1) (3,4), (6,0) You want to encode a secret consisting of 1,4,4. Reconstruct? How big should modulus be? Format: ( i , R ( i )) . ◮ ..give Secret Sharing. Larger than 144 and prime! Lagrange or linear equations. ◮ ..give Erasure Codes. You want to send a message consisting of packets 1,4,2,3,0 P ( 1 ) = a 2 + a 1 + a 0 ≡ 1 ( mod 7 ) through a noisy channel that loses 3 packets. Error Correction: P ( 2 ) = 4 a 2 + 2 a 1 + a 0 ≡ 4 ( mod 7 ) How big should modulus be? Noisy Channel: corrupts k packets. (rather than loss.) Larger than 8 and prime! P ( 6 ) = 2 a 2 + 3 a 1 + a 0 ≡ 0 ( mod 7 ) Additional Challenge: Finding which packets are corrupt. Send n packets b -bit packets, with k errors. Modulus should be larger than n + k and also larger than 2 b . Channeling my inner linear algebra genius ... P ( x ) = 2 x 2 + 4 x + 2 Message? P ( 1 ) = 1 , P ( 2 ) = 4 , P ( 3 ) = 4.

  2. Error Correction The Scheme. Properties: proof. P ( x ) : degree n − 1 polynomial. Problem: Communicate n packets m 1 ,..., m n Send P ( 1 ) ,..., P ( n + 2 k ) on noisy channel that corrupts ≤ k packets. Receive R ( 1 ) ,..., R ( n + 2 k ) Satellite 3 packet message. Send 5. At most k i ’s where P ( i ) � = R ( i ) . Reed-Solomon Code: Properties: 1 2 3 1 2 1. Make a polynomial, P ( x ) of degree n − 1, (1) P ( i ) = R ( i ) for at least n + k points i , that encodes message. A B C D E (2) P ( x ) is unique degree n − 1 polynomial ◮ P ( 1 ) = m 1 ,..., P ( n ) = m n . that contains ≥ n + k received points. Corrupts 1 packets. ◮ Comment: could encode with packets as coefficients. Proof: 3 1 2 1 2 (1) Sure. Only k corruptions. 2. Send P ( 1 ) ,..., P ( n + 2 k ) . A B’ C D E (2) Degree n − 1 polynomial Q ( x ) consistent with n + k points. Q ( x ) agrees with R ( i ) , n + k times. After noisy channel: Recieve values R ( 1 ) ,..., R ( n + 2 k ) . P ( x ) agrees with R ( i ) , n + k times. Properties: Total points contained by both: 2 n + 2 k . P Pigeons. GPS device (1) P ( i ) = R ( i ) for at least n + k points i , : n + 2 k . Total points to choose from H Holes. (2) P ( x ) is unique degree n − 1 polynomial Points contained by both : ≥ n . ≥ P − H Collisions. that contains ≥ n + k received points. = ⇒ Q ( i ) = P ( i ) at n points. = ⇒ Q ( x ) = P ( x ) . Example. Slow solution. Example. Received R ( 1 ) = 3 , R ( 2 ) = 1 , R ( 3 ) = 6 , R ( 4 ) = 0 , R ( 5 ) = 3 Brute Force: For each subset of n + k points Find P ( x ) = p 2 x 2 + p 1 x + p 0 that contains n + k = 3 + 1 points. Fit degree n − 1 polynomial, Q ( x ) , to n of them. Message: 3 , 0 , 6. All equations.. Check if consistent with n + k of the total points. Reed Solomon Code: P ( x ) = x 2 + x + 1 ( mod 7 ) has If yes, output Q ( x ) . P ( 1 ) = 3 , P ( 2 ) = 0 , P ( 3 ) = 6 modulo 7. p 2 + p 1 + p 0 ≡ 3 ( mod 7 ) ◮ For subset of n + k pts where R ( i ) = P ( i ) , Send: P ( 1 ) = 3 , P ( 2 ) = 0 , P ( 3 ) = 6 , P ( 4 ) = 0 , P ( 5 ) = 3 . method will reconstruct P ( x ) ! 4 p 2 + 2 p 1 + p 0 ≡ 1 ( mod 7 ) (Aside: Message in plain text!) 2 p 2 + 3 p 1 + p 0 ≡ 6 ( mod 7 ) ◮ For any subset of n + k pts, Receive R ( 1 ) = 3 , R ( 2 ) = 1 , R ( 3 ) = 6 , R ( 4 ) = 0 , R ( 5 ) = 3 . 2 p 2 + 4 p 1 + p 0 ≡ 0 ( mod 7 ) 1. there is unique degree n − 1 polynomial Q ( x ) that fits n of 1 p 2 + 5 p 1 + p 0 ≡ 3 ( mod 7 ) P ( i ) = R ( i ) for n + k = 3 + 1 = 4 points. them 2. and where Q ( x ) is consistent with n + k points = ⇒ P ( x ) = Q ( x ) . Assume point 1 is wrong and solve..no consistent solution! Reconstructs P ( x ) and only P ( x ) !! Assume point 2 is wrong and solve...consistent solution!

  3. In general.. Ditty... Where oh where can my bad packets be? E ( 1 )( p n − 1 + ··· p 0 ) ≡ R ( 1 ) E ( 1 ) ( mod p ) P ( x ) = p n − 1 x n − 1 + ··· p 0 and receive R ( 1 ) ,... R ( m = n + 2 k ) . 0 × E ( 2 )( p n − 1 2 n − 1 + ··· p 0 ) ≡ R ( 2 ) E ( 2 ) ( mod p ) Oh where, Oh where . has my little dog gone? . p n − 1 + ··· p 0 ≡ R ( 1 ) ( mod p ) . Oh where, oh where can he be p n − 1 2 n − 1 + ··· p 0 E ( m )( p n − 1 ( m ) n − 1 + ··· p 0 ) ≡ R ( 2 ) ( mod p ) ≡ R ( n + 2 k ) E ( m ) ( mod p ) With his ears cut short · And his tail cut long p n − 1 i n − 1 + ··· p 0 Idea: Multiply equation i by 0 if and only if P ( i ) � = R ( i ) . ≡ R ( i ) ( mod p ) Oh where, oh where can he be? All equations satisfied!!!!! · p n − 1 ( m ) n − 1 + ··· p 0 But which equations should we multiply by 0? Where oh where...?? ≡ R ( m ) ( mod p ) Oh where, Oh where We will use a polynomial!!! That we don’t know. But can find! have my packets gone.. wrong? Error!! .... Where??? Errors at points e 1 ,..., e k . (In diagram above, e 1 = 2.) Oh where, oh where do they not fit. Could be anywhere!!! ...so try everywhere. � n + 2 k � Runtime: possibilitities. Error locator polynomial: E ( x ) = ( x − e 1 )( x − e 2 ) ... ( x − e k ) . With the polynomial well put k Something like ( n / k ) k ...Exponential in k !. But the channel a bit wrong E ( i ) = 0 if and only if e j = i for some j Where, oh where do we look? Multiply equations by E ( · ) . (Above E(x) = (x-2).) How do we find where the bad packets are efficiently?!?!?! All equations satisfied!! Example. ..turn their heads each day, Finding Q ( x ) and E ( x ) ? E ( 1 )( p n − 1 + ··· p 0 ) ≡ R ( 1 ) E ( 1 ) ( mod p ) Received R ( 1 ) = 3 , R ( 2 ) = 1 , R ( 3 ) = 6 , R ( 4 ) = 0 , R ( 5 ) = 3 . Find P ( x ) = p 2 x 2 + p 1 x + p 0 that contains n + k = 3 + 1 points. . . ◮ E ( x ) has degree k ... E ( i )( p n − 1 i n − 1 + ··· p 0 ) Plugin points... ≡ R ( i ) E ( i ) ( mod p ) ( 1 − 2 )( p 2 + p 1 + p 0 ) ≡ ( 3 )( 1 − 2 ) ( mod 7 ) . ( 1 − e )( p 2 + p 1 + p 0 ) ≡ ( 3 )( 1 − e ) ( mod 7 ) E ( x ) = x k + b k − 1 x k − 1 ··· b 0 . . . ( 2 − e )( 4 p 2 + 2 p 1 + p 0 ) ( 2 − 2 )( 4 p 2 + 2 p 1 + p 0 ) ≡ ≡ ( 1 )( 2 − e ) ( mod 7 ) ( 1 )( 2 − 2 ) ( mod 7 ) E ( m )( p n − 1 ( n + 2 k ) n − 1 + ··· p 0 ) ≡ R ( m ) E ( m ) ( mod p ) = ⇒ k (unknown) coefficients. Leading coefficient is 1. ( 3 − 2 )( 2 p 2 + 3 p 1 + p 0 ) ≡ ( 6 )( 3 − 2 ) ( mod 7 ) ( 3 − e )( 2 p 2 + 3 p 1 + p 0 ) ≡ ( 3 )( 3 − e ) ( mod 7 ) ◮ Q ( x ) = P ( x ) E ( x ) has degree n + k − 1 ... ( 4 − 2 )( 2 p 2 + 4 p 1 + p 0 ) ( 4 − e )( 2 p 2 + 4 p 1 + p 0 ) ≡ ≡ ( 0 )( 4 − 2 ) ( mod 7 ) ( 0 )( 4 − e ) ( mod 7 ) ...so satisfied, I’m on my way. ( 1 − 2 )( 4 p 2 + 5 p 1 + p 0 ) ≡ ( 3 )( 5 − 2 ) ( mod 7 ) ( 5 − e )( 4 p 2 + 5 p 1 + p 0 ) ≡ ( 3 )( 5 − e ) ( mod 7 ) m = n + 2 k satisfied equations, n + k unknowns. But nonlinear! Q ( x ) = a n + k − 1 x n + k − 1 + a n + k − 2 x n + k − 2 + ··· a 0 Let Q ( x ) = E ( x ) P ( x ) = a n + k − 1 x n + k − 1 + ··· a 0 . Error locator polynomial: ( x − 2 ) . = ⇒ n + k (unknown) coefficients. Equations: Multiply equation i by ( i − 2 ) . All equations satisfied! Q ( i ) = R ( i ) E ( i ) . Number of unknown coefficients: n + 2 k . But don’t know error locator polynomial! Do know form: ( x − e ) . and linear in a i and coefficients of E ( x ) ! 4 unknowns ( p 0 , p 1 , p 2 and e ), 5 nonlinear equations.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend