Lecture 31 · Mathematics

Decode the hidden packet—and diagnose mistakes

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

Derive and audit a complementary-packet decoder, including order changes and input errors.

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. Track both receiving reversals

    • Arrival order ≠ final pile order
  2. Derive the index correspondence

    • Final position j comes from pair m + 1 − j
  3. Specify the evidence-driven decoder

    • recordActual(colour)
    • submitClaim(colour)
  4. Audit a complete worked record

    • Observed R B R R
    • Expected B R B B
    • Verdicts T F F T
  5. Repair a known reversal

    • Reverse hidden ⇒ reverse expected
  6. Expose a collection-order error

    • Correct inventory does not guarantee correct order
  7. Separate three failure types

    • Inventory / position map / reliable input
  8. Apply and retrieve

    • Same permutation on both piles preserves correspondence

Companion interactive

Planned

Reconstruct hidden colours and repair known changes without reading hidden state.

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: Formalizes the complementary-packet routine and adds explicit input-channel and collection-order diagnostics.