CRT = HDC

Hyperdimensional computing (HDC) represents data as high-dimensional vectors. Three operations: binding (multiply), bundling (add), permutation (shift). Standard HDC uses random vectors of 10,000+ dimensions. CRT gives structured vectors of 7 channels with algebraic guarantees that random vectors cannot match.

CRT decomposition IS HDC. Each character maps to 7 residues: (c%8, c%9, c%25, c%49, c%11, c%13, c%17). Ring multiplication = binding. Ring addition = bundling. CRT reconstruction = decoding. Same algebra -- but with structure instead of randomness.

Collision Analysis

128 ASCII characters need unique encodings. CRT guarantees uniqueness: any two characters < 214,414,200 have distinct 7-channel vectors. Random encoding (same moduli, random mapping) has no such guarantee. At 3+ shared channels, CRT has zero collisions while random encoding has 68.

CRT 2+ shared
160 pairs
Of 8128 total pairs. Structural: residues collide in individual channels.
Random 2+ shared
661 pairs
4.1x more than CRT. Unstructured collisions accumulate.
CRT 3+ shared
0 pairs
Zero. Algebraic independence prevents multi-channel collision.
Random 3+ shared
68 pairs
Random encoding loses cross-channel independence.

Bigram Prediction

Test: predict the next character from the previous one, using a per-channel tally of bigram frequencies. For each predecessor character, record which residues appear in each channel for successor characters. Majority voting decodes the prediction. 471-character diverse corpus.

CRT: 172/470 correct (36.6%). Best random (3 seeds): 168/470 (35.7%). CRT wins across all seeds because majority vectors map cleanly back to real characters. Random majority vectors can be hallucinations -- combinations that match no actual character.

CRT accuracy
172/470 (36.6%)
Tally-based majority decoding on 471-char diverse corpus.
Random seed 42
161/470 (34.3%)
Same architecture, random encoding. CRT wins by 11.
Random seed 137
159/470 (33.8%)
Different random table. CRT still wins.
Random seed 999
168/470 (35.7%)
Best random seed. CRT still wins.

Noise Tolerance

Corrupt channels by overwhelming tally entries with noise. CRT maintains higher accuracy at every corruption level because its algebraic independence means uncorrupted channels still carry valid structure. With 4 of 7 channels corrupted, CRT retains 91/470 vs random 82/470.

1ch corrupt
CRT 168 vs RND 159
CRT advantage: +5.7%
2ch corrupt
CRT 155 vs RND 154
Both degrade. CRT holds.
3ch corrupt
CRT 147 vs RND 140
CRT advantage persists: +5%
4ch corrupt
CRT 91 vs RND 82
Rate 3/7 capacity: 3 channels suffice for 128 chars.

Capacity: Rate 3/7

With CRT encoding, any 3 of 7 channels uniquely identify 128 ASCII characters. The product of the 3 smallest moduli: 8 * 9 * 11 = 792 > 128. This is error correction for free -- lose 4 channels, keep 3, still decode perfectly. Random encoding: 13 collisions with just 3 channels.

With only 2 channels (product 8*9=72 < 128), CRT has 56 collisions -- decoding fails. The capacity threshold is sharp: 3 channels work, 2 do not. This is error correction (rate 4/7 for Z/214,414,200, rate 3/7 for 128 ASCII) built into the encoding.

CRT 3ch unique
0 collisions
Channels {mod 8, mod 9, mod 11}: product 792 > 128. Every char is unique.
Random 3ch
13 collisions
Same 3 channels, random encoding. Cannot uniquely decode.
CRT 2ch
56 collisions
Channels {mod 8, mod 9}: product 72 < 128. Threshold is sharp.
Error correction
Rate 3/7
Lose 4 of 7 channels and still decode. Built into the algebra.

Source code · Public domain (CC0)

Report issue

.ax source compiled to WASM via self-hosting compiler. Zero HTML authored.