Lecture 19 · Mathematics

Build your own de Bruijn deck

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

Construct, verify and export an order-four de Bruijn card stack and matching decoder.

Before this lecture

Ideas you will use

  • Graph correspondence and Euler proof

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. Define an executable construction task

    • Target: order 4,16 windows
    • Outputs: cycle +stack +decoder
    • Extend or finish; never jump
  2. Specify algorithm data and operation

    • Unused edge: mark and push
    • No unused edge: pop to finished list
    • Reverse finished list to read tour
  3. Show small cycle splicing before large run

    • Stack implements cycle splicing
    • Used edges never reset
    • Two views, one construction
  4. Run a verified order 4 tour and spell it

    • Linear spelling has 16+3 symbols
    • Discard repeated closing context
    • Cycle 0000100110101111
  5. Convert bit cycle into physical identities

    • 0→next unused club
    • 1→next unused heart
    • 8 zero positions; 8 one positions
  6. Construct decoder and verify all cuts

    • Stack order≠lookup sort order
    • One entry per cyclic start
    • Test all 16 cuts
  7. Give complete construction failure diagnostics

    • Graph →tour →cycle →cards →decoder
    • Report the first specific failure
    • Never silently repair the protocol
  8. Companion export challenge and retrieval

    • Export stack, lookup and rules
    • All checks tied to the same data
    • Next: larger alphabets

Companion interactive

Planned

Produce a complete 16-card preparation and decoder with all checks passing.

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: Euler construction; explicit implementation and alternate 16-cycle are checked teaching developments.