A tape that counts its runs.
When does a shorter description help?
When does a shorter description help?
Fit the feed, counter and punch first.
Run-length encoding replaces a repeated symbol sequence with its symbol and count. Long runs can save bits. Short runs add overhead: alternating symbols need sixteen five-bit pairs here, which is eighty bits. Decoding must reconstruct the exact input before the tape earns its check.
Sixteen binary symbols; each run is stored as one symbol bit and a four-bit positive count, for five bits per run. Tape length and format are agreed out of band. This illustrative format differs from Princeton’s byte-count implementation and can expand its input.
Recover the original tape using fewer than 16 bits.
Compress the tape and recover the original exactly.