Coding - Decoding
🔒 Log in to trackhigh importance~4 Q in Tier 16 formulas⚡ 10 shortcuts7 subtopics
Every formula in this topic, grouped by subtopic. Print it and pin it above your desk.
Letter shift coding
Shift tuple
Q(code_i) = Q(word_i) + d_i \pmod{26}
Compute d_i from the sample; apply the identical tuple to the probe.
Decode = negative shift
Q(word_i) = Q(code_i) - d_i \pmod{26}
For decoding questions subtract the tuple instead of adding.
Number coding
Position sum
\text{code} = \sum Q(w_i)
Q = A1..Z26 positions.
Affine code
\text{code} = k \cdot \sum Q(w_i) + r
Fit k and r from the sample pair.
Weighted sum
\text{code} = \sum i \cdot Q(w_i)
Letter i multiplies its position.
Reverse positions
Q^{rev}(c) = 27 - Q(c)
Z=1 ... A=26; small codes for long words.