Lecture 26 · Mathematics

Decode without a giant lookup table

Video in production

This lecture is still face down. Its script is written; filming and animation are under way.

Meanwhile, read the outline

What you will learn

Decode the prepared packet using exact bit-to-card mapping and verified feedback rules, including the zero-state exception.

Before this lecture

In this lecture

An outline of the lecture, scene by scene, with the statements that appear on screen. It follows the draft script, so details may change in production.

  1. Pose compact decoding instead of a lookup list

    • Colour window → card identity
    • Five cells; one feedback bit
    • 31-state rule, then explicit 32-state patch
  2. Define exact suit and rank coding

    • 00♣ 01♠ 10♦ 11♥
    • 000 means rank 8
    • 01001→A♠; 10010→2♦
  3. Introduce XOR feedback and one step

    • abcde → bcde(a XOR c)
    • Equal bits→0; different bits→1
    • 01001→10010→00101→01011
  4. Complete five-card decode without locating a row

    • A♠,2♦,5♣,3♠,6♦
    • Decode identities without a position index
    • One worked run is not full-cycle verification
  5. Verify nonzero 31 cycle and zero fixed point

    • 31 nonzero states in one verified cycle
    • 00000→00000
    • Omit 8♣ for the unmodified rule
  6. Patch zero into 32 cycle and explain exact exception

    • 10000→00000→00001
    • All other transitions unchanged
    • 32 states; cyclic five-bit windows unique
  7. Compare feedback rules and define interactive diagnostics

    • Run until first repeated state
    • Rotation rule: orbit length 5 from 00001
    • Verify the rule actually used
  8. Retrieve three mappings and close implementation lesson

    • Identity map
    • Successor rule
    • Verified orbit and deck version

Companion interactive

Planned

Test feedback cycles and decode the correct deck version.

The interactive for this lecture is being built and will appear here.

Notes

Written notes for this lecture will appear here.

Sources

How these sources were used
  • Persi Diaconis and Ron Graham, Magical Mathematics: Exact suit/rank map and 31 state feedback method; zero insertion made explicit for earlier 32 card packet.
  • Colm Mulcahy, Mathematical Card Magic: Do not generalize the presented XOR idea to arbitrary taps or lengths without checking its orbit.