Party Puzzle Parcel
← All paper puzzle sessions

Variable-length code boundaries and ambiguity

Message Boundary Lab

Decode a message whose letters have different-length binary labels. The puzzle is deciding where one label ends and the next begins. A complete printed codebook replaces guesswork about words. The group first reads a safe code, then finds exactly how a different code can make one bit string mean two messages.

Suggested ages 9-13 · 2-6 players with an adult host · Plan 20-30 minutes

Work together, or form two small teams and rotate the writer. Age and time are planning estimates; choose the reading and arithmetic support that suit your group.

Get the complete free materials

Print one player sheet per team and one host guide for the adult. Both are black and white. Keep the host guide separate to avoid revealing answers. No cutting, folding, special props or account required.

A4 paper

Player sheet PDF Host answers PDF

Players: 1 page · Host: 2 pages

US Letter paper

Player sheet PDF Host answers PDF

Players: 2 pages · Host: 2 pages

No printer? Copy the grids and prompts onto plain paper. The full activity is below; hints and answers stay closed until selected.

Set up and rules

Bring pencils, an eraser and one sheet of paper per team. Print at 100% / actual size. Read the rules together, try the warm-up, work through two rounds, and finish with the final challenge.

  1. A codebook maps each printed letter to a string of zeroes and ones. Encoding joins those strings in letter order without spaces. Decoding must use every bit exactly once, with no skipped, inserted or rearranged bits.
  2. Each challenge prints its own complete codebook; do not carry a codebook into the next challenge. Messages may be any sequence of the listed letters, including repeated letters. They need not spell dictionary words.
  3. If no codeword is the beginning of another, read until one complete codeword is reached, write its letter, then start again. If a challenge asks for every decoding, keep every possible full split rather than stopping at the first.

Warm-up: find the first boundary

Codebook: A=0; B=10; C=110; D=111. Decode bits 010. Give the letters and show the codeword splits.

Hint 1

Find a complete codeword beginning at the first bit.

Hint 2

After A, only two bits remain.

Check the answer and reasoning

AB. Split: 0 | 10.

The initial 0 is A. The remaining 10 is B. No other codeword begins with 0, and the remaining bits form exactly B, so this decoding uses every bit once.

Round 1: the longer message

Codebook: A=0; B=10; C=110; D=111. Decode bits 110010111. Give the full letter sequence and split every codeword.

Hint 1

The first three bits form one codeword.

Hint 2

After C and A, the remaining bits are 10111.

Check the answer and reasoning

CABD. Split: 110 | 0 | 10 | 111.

Read 110 as C, then 0 as A. The next two bits are 10, B; the final three are 111, D. None of these codewords starts another codeword, so each completed codeword fixes a boundary. Rejoining them gives the original nine bits.

Round 2: send a message back

Codebook: A=0; B=10; C=110; D=111. Encode letters DBAC with no spaces. Then decode your result to check it.

Hint 1

Write each letter code separately before removing spaces.

Hint 2

The four codeword lengths are 3,2,1,3.

Check the answer and reasoning

111100110. Split: 111 | 10 | 0 | 110; decoding returns DBAC.

Look up the letters in the printed order: D is 111, B is 10, A is 0, C is 110. Concatenating gives nine bits, 111100110. Reading the same codewords from the beginning returns exactly D,B,A,C; do not reverse either the letters or their codewords.

Final: when one strip has two meanings

NEW codebook: X=0; Y=01; Z=1. Find EVERY complete decoding of bits 01. Give all letter sequences and explain why the earlier stop-at-a-codeword rule is unsafe here.

Hint 1

Check both codewords that begin with 0.

Hint 2

Try using all the bits for one letter, then for two letters.

Check the answer and reasoning

Exactly two: Y, split 01; and XZ, split 0 | 1.

The first bit 0 can finish X, leaving 1 for Z, so XZ works. It can instead be the beginning of Y=01, which uses both bits at once. These exhaust the possibilities: a first codeword must be either 0 or 01. Unlike the earlier book, X=0 is a prefix of Y=01, so stopping as soon as X appears would hide the other valid reading.

Host script

  1. Say: "We are finding boundaries. A letter can take one, two or three bits, so cutting the strip into equal pieces may fail." Demonstrate a separate code P=0,Q=11 on 011.
  2. Let one player point to bits, one locate codewords and another write letters. Rotate after each challenge.
  3. When a decoding stalls, return to the last boundary that matched a full codeword. Offer hint 1 before naming the next letter; a complete re-encoding is the final check.
  4. In the final, invite two competing splits and test both. Explain that ambiguity is a property of that codebook, not evidence that one player read carelessly.

Offer support

Underline a codeword and put a pencil divider after it before continuing. An adult can read the bits aloud in order while another player checks the codebook. The bits are labels, not a number to add or convert to decimal.

Finish together

Re-encode each proposed message and compare its bits with the original string. When a string has two decodings, show both splits. A readable-looking word is not a substitute for matching the entire printed codebook.

If you disagree about an answer, return to the stated rules and compare the written steps. Keep the activity cooperative; a hint is part of play, and nobody needs to be eliminated.

Choose another paper puzzle · Try a shorter group game · Find a full mystery adventure