0

I have a combined data information that requires minimum 35 bits.

Using a 4-state barcode, each bar represents 2 bits, so the above mentioned information can be translated into 18 bars.

enter image description here


I would like to add some strong error correction to this barcode, so if it's somehow damaged, it can be corrected. One of such approach is Reed-Solomon error correction.

My goal is to add as strong error correction as possible, but on the other hand I have a size limitation on the barcode. If I understood the Reed-Solomon algorithm correctly, m∙k  has to be at least the size of my message, i.e. 35 in my case.

Based on the Reed-Solomon Interactive Demo, I can go with (m, n, t, k) being (4, 15, 3, 9), which would allow me to code message up to 4∙9 = 36 bits. This would lead to code word of size 4∙15 = 60 bits, or 30 bars, but the error correction ratio t / n would be just 20.0%.

Next option is to go with (m, n, t, k) being (5, 31, 12, 7), which would allow me to code message up to 5∙7 = 35 bits. This would lead to code word of size 5∙31 = 155 bits, or 78 bars, and the error correction ratio t / n would be ~38.7%.

The first scenario requires use of barcode with 30 bars, which is nice, but 20.0% error correction is not as great as desired. The second scenario offers excellent error correction of 38.7%, but the barcode would have to have 78 bars, which is too many.

Is there some other approach or a different method, that would offer great error correction and a reasonable barcode length?

Ωmega
  • 42,614
  • 34
  • 134
  • 203
  • Reed-Solomon codes are popular in part because they achieve theoretically optimal tradeoffs of error correction and length. If you want that amount of error correction, you need at least that length. – btilly May 07 '20 at 21:16

1 Answers1

1

You could use a shortened code word such as (5, 19, 6, 7) 31.5% correction ratio, 95 bits, 48 bars. One advantage of a shortened code word is reduced chance of mis-correction if it is allowed to correct the maximum of 6 errors. If any of the 6 error locations is outside of the range of valid locations, that is an indication of that there are more than 6 errors. The probability of mis-correction is about (19/31)^6 = 5.3%.

rcgldr
  • 27,407
  • 3
  • 36
  • 61
  • Could you please clarify why the probability of mis-correction is *( n / ( 2 ^ m - 1 ) ) ^ t* ? – Ωmega May 08 '20 at 13:22
  • @Ωmega - assume the correction process produces 6 random locations, but that out of 31 possible locations, there are only 19 valid locations for the shortened code word. So the probability of 6 random locations all being within the 19 valid locations is about (19/31)^6. The probability is a bit less since the generated error locator polynomial may not have 6 distinct roots (duplicate or missing roots). – rcgldr May 08 '20 at 13:38
  • @Ωmega - The smallest number of errors that can result in mis-correction is 7. If there are 7 error locations, decoding may produce what it thinks are 6 error locations, none of which are duplicates of the 7 actual error locations, resulting in 13 errors, more than the number of parity symbols. In this situation, the correction process will produce a valid code word (all syndromes == 0), but it will be the wrong valid code word. – rcgldr May 08 '20 at 13:42
  • @Ωmega - I should have clarified that the probability of mis-correction is assuming there are 7 or more errors. The combined probability would be 5.3% times the probability of 7 or more errors (which you'd have to find a source for). – rcgldr May 08 '20 at 16:27