002 Why a torn QR still scans

Tear away nearly a quarter of this code. It still scans.

Published
Length
38.5 s
Claims
7
Sources
3

Summary

A QR code stores your bytes as points on a curve, plus spare points on the same curve: a Reed–Solomon code. A scanner can’t see which points are damaged, so every bad byte costs two spares. This tear breaks 22 bytes; this code carries exactly 44 spares.

Claims 7

Each claim as said or shown in the video, with the value it states, its source and the date it was checked.

  1. Claim 1: “Tear away nearly a quarter of this code. It still scans.” The tear on screen

    Value
    columns 19–28 × rows 9–28 = 200 of 841 modules = 23.8 %; decodes
    Source
    I, D
    Checked
    . verify.py step 4: zbar decodes HTTPS://INSTAGRAM.COM/HOWITLOOPS with this tear; one column more → no decode. D: level H restores “Approx 30%” of codewords
    Simplified
    Verified on the dark-on-light symbol with one decoder (zbar). The video shows the code light-on-dark, and some phone scanners don’t read inverted codes from a screen.
  2. Claim 2: “Two points are enough to draw a line.” / “store four points … lose any two — the other two still draw it”

    Value
    a polynomial of degree < m is fixed by any m of its values
    Source
    R
    Checked
    . R p. 300: “a polynomial P(x) of degree m − 1 … mapping of m symbols into 2ⁿ symbols” (a line is the case m = 2)
    Simplified
    Losing points at known positions (erasures) is the easy case. Row 4 covers unknown positions.
  3. Claim 3: “A QR code does this with your data. The bytes become a curve, and the code stores extra points on it.”

    Value
    QR error correction = Reed–Solomon over GF(256); 1 codeword = 8 bits
    Source
    D, R
    Checked
    . D: “implemented by adding a Reed-Solomon Code to the original data”; “One codeword of QR Code is equal to 8 bits”. R p. 300: the codeword is the values of P(x)
    Simplified
    QR does this arithmetic in a finite field (GF(256)), not on a plotted curve, and stores the data in the systematic form (generator polynomial), which is equivalent. Drawn as a real-valued curve for intuition.
  4. Claim 4: “a scanner can’t tell which points are wrong. So every bad point costs two spare ones.”

    Value
    t = (n − k)/2 symbol errors
    Source
    R, D
    Checked
    . R p. 300: “(2ⁿ − m)/2 … symbol correcting”. D: “Reed-Solomon Code requires twice the amount of codewords to be corrected”
  5. Claim 5: “This tear breaks twenty-two bytes.”

    Value
    22 codewords hold at least one torn dark module (11 per block)
    Source
    I
    Checked
    . verify.py steps 2 and 4: module → codeword map from the ISO 18004 placement rules (567 data modules = 70 codewords + 7 remainder bits), tear → [11, 11]
    Simplified
    A torn module reads as light, so only the torn dark modules are errors. That is how the count is made.
  6. Claim 6: “That’s forty-four spares — every one this code has.” / on screen: data vs spare share of the code

    Value
    version 3-H: 2 blocks × (13 data + 22 spare) = 70 codewords; 44 spare = 63 %
    Source
    I
    Checked
    . verify.py step 3: both 35-codeword blocks have syndromes S0–S21 = 0 and S22 ≠ 0 in GF(256), proving exactly 22 parity codewords each. I is the defining standard (not open access; proven from the symbol instead)
    Simplified
    Correcting 11 errors uses all 22 spares of a block. Exactly at the limit, as row 1 shows.
  7. Claim 7: Level H, about 30 %

    Value
    L ≈ 7 %, M ≈ 15 %, Q ≈ 25 %, H ≈ 30 % of codewords restorable
    Source
    D
    Checked
    . D’s table “QR Code Error Correction Capability”, read from the page image

Simplifications

As stated in the post’s caption.

Simplified: a real QR code does this arithmetic in a finite field (GF(256)), not on a curve you can draw. The tear is real: this exact code still decodes in an open-source scanner (zbar), and tearing one more column breaks it.

Sources 3

  1. Source D: DENSO WAVE (inventor of the QR code), “Error correction feature”, QRcode.com. https://www.qrcode.com/en/about/error_correction.html

    Claims 1, 3, 4, 7

  2. Source R: I. S. Reed, G. Solomon, “Polynomial Codes over Certain Finite Fields”, J. SIAM 8(2), 300–304 (1960). doi:10.1137/0108018

    Claims 2, 3, 4

  3. Source I: ISO/IEC 18004:2015, “QR Code bar code symbology specification”.

    Claims 1, 5, 6

Transcript

Tear away nearly a quarter of this code. It still scans.

Here’s the trick. Two points are enough to draw a line. So store four points on that line, not two. Lose any two — the other two still draw it.

A QR code does this with your data. The bytes become a curve, and the code stores extra points on it. But a scanner can’t tell which points are wrong. So every bad point costs two spare ones.

This tear breaks twenty-two bytes. That’s forty-four spares — every one this code has. The scanner redraws the curve, and the tear is gone.

Timing

Fig. 1 Video 002 as a dial: one turn is 38.5 s. Heavy arcs are the narration. The last word ends 1.7 s before the seam, where the video starts again.