I'm implementing Berlekamp–Massey algorithm for BCH codes, but I have some troubles with it: I don't realize how to verify this algorithm. Is there any methods to prove, that code works correctly or maybe there is useful examples in some books, that I can test my code on?

Thanks for answers.


I'm not aware of any standard test cases for this algorithm. I would try two things:

  1. Generate a valid codeword, and insert errors at random locations. Repeat for $1,2,\ldots,t$ errors. Verify that the algorithm corrects all the errors. Repeat for a large number of codewords.

  2. Try to find BER curves for the BCH codes you're interested in, either in papers or textbooks. Then, try to replicate them using your algorithm. If your implementation is correct, your results should be very close.

  • $\begingroup$ thaks, I'll try to figure it out. Also about codewords: I found several types of generator/parity-check matrices (systematic/nonsystematic, composed via polynomials, primitive elements of field etc.). Which of forms are better or preferable for generating codewords? $\endgroup$ – Kirill Jan 22 '19 at 14:11
  • $\begingroup$ From the point of view of a Matlab implementation, they're basically equivalent. $\endgroup$ – MBaz Jan 22 '19 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.