Configure repeating positional weights.
Initialising algorithm engine for Custom Weight Sequence Builder...
How Custom Weight Sequence Builder Works?
The Custom Weight Sequence Builder works by letting the user enter a repeating list of weights, previewing which weight lands on each position, and testing the sequence's error detection.
- 1Type the weight cycle (for example 7, 3, 1).
- 2Choose whether the cycle starts at the left or right end.
- 3Preview the weight for every position of a sample payload.
- 4Choose the modulus.
- 5Run substitution and transposition tests on the sequence.
Custom Weight Sequence Builder Formula
The weight assignment formula is wᵢ = W[(i − 1) mod k], where W is the cycle of length k.
wᵢ = W[(i − 1) mod k] Good cycle for modulus m: gcd(w, m) = 1 for every w, and wᵢ ≠ wᵢ₊₁ (mod m)
kis the cycle length.gcdis the greatest common divisor.
Positions: 1 2 3 4 5 6 7 8 9 10 Weights: 7 3 1 7 3 1 7 3 1 7 Weighted sum = 147 Mod 10 check = 3
Custom Weight Sequence Builder Conversion Table
The weight builder table tests 6 cycles with modulus 10 on the same test strings.
| Weight cycle | Used by | Single errors caught | Adjacent swaps caught |
|---|---|---|---|
| 3, 1 | GS1 keys | 100.0% | 88.9% |
| 1, 3 | EAN-13 from the left | 100.0% | 88.9% |
| 7, 3, 1 | MRZ, Finnish reference | 100.0% | 88.9% |
| 3, 7, 1 | ABA routing | 100.0% | 88.9% |
| 2, 4 | Poor example: even weights | 88.9% | 88.9% |
| 1, 2, 3, 4, 5, 6, 7, 8, 9 | Linear weights | 91.1% | 100.0% |
What is Custom Weight Sequence Builder?
A Custom Weight Sequence Builder is a tool that designs and tests the positional weights of a check digit scheme. Weights decide which errors the check digit catches.
With modulus 10, every weight must be odd and not 5, so that each substitution changes the sum. Two odd weights always differ by an even amount, so a modulus 10 scheme always misses swaps of digits that differ by 5; a prime modulus such as 11 removes that limit.
What are the uses of Custom Weight Sequence Builder?
There are 3 main uses of the Custom Weight Sequence Builder, including scheme design, legacy reverse engineering, and documentation.
- Scheme design: Engineers test weight cycles before publishing a format.
- Legacy reverse engineering: Analysts find the weights an old system used.
- Documentation: Teams record the exact weight mapping for each position.