Office Supplies & Stationery

Single flip code puzzle: recover four labels with five positions

A fictional binary worksheet constructs disjoint correction neighborhoods and checks the exact limit of its one-flip guarantee.

By Republeq Editorial · 10 min read ·
Single flip code puzzle worksheet compares four fictional five-position binary labels and highlights a one-position correction.

A single flip code puzzle can recover one of four fictional labels even when one binary position has changed. The extra positions do useful work: the allowed codewords are far enough apart that a received word within one change of one label cannot also be within one change of another. This worksheet constructs a five-position code, checks every one-change possibility, and proves that four positions could not provide the same guarantee for four labels.

The four labels are A, B, C and D. Assign A the word 00000, B the word 11100, C the word 10011, and D the word 01111. Each word has exactly five positions, each containing either zero or one. Positions run from left to right, and leading zeros are part of a word. These are authored paper inputs, not product identifiers, payment instructions or a coding standard. You can inspect the entire example without sending a message or operating equipment.

Keep the change model beside the code

The guarantee allows no change or one substitution in a complete word. A substitution changes a zero to one or a one to zero at a single fixed position. No position is inserted, deleted, moved or left unreadable. The receiver knows this code list and knows that the intended label is one of its four entries. A five-symbol word drawn from some other message system does not acquire these assumptions merely because it contains zeros and ones.

Our decoder compares the received word with all four allowed words. If exactly one allowed word differs in at most one position, it reports that word's label. We will establish that there cannot be two such candidates. If there is no candidate, the received word does not fit the promised model, so the worksheet leaves the label unresolved. Choosing the visually most familiar row would add an unsupported answer rather than complete the stated test.

Count differences at fixed positions

Define the distance between two five-position words as the number of positions where their symbols differ. Compare A, 00000, with B, 11100. The first, second and third positions differ, while the last two agree, giving distance three. Compare A with C, 10011: the first, fourth and fifth positions differ, again giving three. A compared with D, 01111, differs at the second through fifth positions, giving four.

The remaining comparisons complete the six unordered pairs. B, 11100, and C, 10011, differ at positions two, three, four and five, giving four. B and D, 01111, differ at positions one, four and five, giving three. C and D differ at positions one, two and three, also giving three. Thus every two allowed words differ in at least three positions. We have checked all six pairs, rather than assuming the first comparison represents the rest.

Distance here counts mismatching positions. It does not subtract the binary words as numerical values, count how far a digit moves, or permit neighboring symbols to exchange places as a single operation. For example, the leading zero in D remains its first position. Removing it would change the word's length and move later symbols, producing a different problem from the fixed-position substitutions used in this proof.

List the no-change and one-change neighborhoods

For A, include the unchanged word and the result of flipping each position once. Its six possible received words are 00000, 10000, 01000, 00100, 00010 and 00001. The unchanged case belongs in the list because the guarantee is at most one change. Exactly one change would exclude that case and would be a different condition.

B's six words are 11100, 01100, 10100, 11000, 11110 and 11101. C's are 10011, 00011, 11011, 10111, 10001 and 10010. D's are 01111, 11111, 00111, 01011, 01101 and 01110. In each list, the first word is unchanged and the next five flip positions one through five in order. That convention lets another reader audit a list directly against its assigned word.

There are six distinct words per label because flipping different positions gives different results, and none of those results equals the unchanged word. The four lists contain twenty-four different received words altogether. No word appears in two lists. A complete binary five-position space contains thirty-two words, so eight words fall outside all four lists. The code does not need to use every possible received word to provide its stated guarantee.

Explain why the neighborhoods cannot overlap

Suppose a received word differed from one allowed word at at most one position and from another allowed word at at most one position. The two allowed words could then differ only among those two possible mismatch positions. They would differ in at most two positions. But our complete pair check found that any two allowed words differ in at least three. Therefore no received word can belong to both one-change neighborhoods.

This reasoning establishes unique decoding for every allowed no-change or one-change case. The sender's allowed word is a candidate because the received word is at most one substitution away from it. The separation argument rules out any other candidate. The change bound supplies a candidate, and separation rules out a second one. The argument does not depend on guessing which position changed first or on assigning probabilities to the positions.

Decode one received word completely

Take the received word 11000. It differs from A's 00000 at positions one and two, so its distance from A is two. It differs from B's 11100 only at position three, giving distance one. Against C's 10011 it differs at positions two, four and five, giving three. Against D's 01111 it differs at positions one, three, four and five, giving four.

The four distances are therefore two, one, three and four in A, B, C, D order. Only B is within one position, so the decoder reports B. The corresponding permitted correction changes the third received symbol from zero to one, yielding 11100. Retain the original received word and comparison record beside the decoded label, so that the conclusion can be checked without pretending that the changed symbol was never observed.

Now consider the received word 00101. Its distances from A, B, C and D are two, three, three and two. No label is within one position. The decoder leaves it unresolved under this worksheet's rule. This result identifies a failure of the promised model for that input; it does not identify which assumption failed. The word could arise in a different change process, but this exercise supplies no authority to select one history or label.

Keep the one-change limit explicit

Suppose A was sent as 00000, but its first two positions both changed. The received word would be 11000. We just established that the one-change decoder reports B for that word. Under this two-change history, the reported label would be wrong. The same received word is one change away from B and two changes away from A. Without the promised bound, those competing histories cannot be settled by its appearance alone.

This counterexample is stronger than saying that some two-change inputs might be rejected. Here an input outside the guarantee is accepted with the wrong label. Do not expand the guarantee to two changed positions because the decoder produced an answer. Its correctness proof uses at most one substitution. No actual transmission rate, reliability percentage, security property or tolerance of missing symbols follows from this finite paper example.

Prove that four positions cannot suffice

A different fixed-length code with four positions would have only sixteen binary words available. Each allowed word would need five possible received words reserved for it: the unchanged word and the four results obtained by flipping one position. Those five are distinct. To guarantee recovery of four labels, the four five-word neighborhoods would have to be disjoint; an overlapping word would leave two permitted labels possible under the same change bound.

Four disjoint groups of five would require twenty distinct received words, exceeding the sixteen available. Thus no four-position binary code can provide this guarantee for four labels. The conclusion covers every proposed choice of four codewords, not just a shortened version of our construction. Trying a different four-position list cannot create the missing received-word capacity.

The shorter lengths fail the same necessary count. With one position, four labels would require eight no-change or one-change words, while only two binary words exist. With two positions, they would require twelve while only four exist. With three positions, they would require sixteen while only eight exist. These are impossibility checks for the fixed-length binary substitution model, without a claim about variable-length messages or other kinds of observations.

Five positions provide thirty-two possible words, and four six-word neighborhoods require twenty-four. That count alone would not prove that a suitable construction exists. Our actual four-word list and its disjoint neighborhoods supply the missing construction. The shorter-length impossibility and the explicit five-position success together establish five as the minimum length under the stated four-label, at-most-one-substitution conditions.

Keep related methods and retail sources separate

The yes-or-no card puzzle, plan a yes-or-no card puzzle, identifies eight labels through truthful answers and audits every branch. Our code reserves extra separation to recover a label after a wrong symbol. A truthful identification tree does not itself provide that correction guarantee.

The row and column control guide, row and column total mismatch for one entry, uses independently trusted totals and a stipulated single changed numerical entry. This worksheet instead constructs four binary neighborhoods and proves a minimum code length. It supplies no correction to an actual table.

The HomeRoots account, 3D Modern Triangle Marble Bookends, shows a light triangular pair beside three closed books. Those books are unconfirmed display props. The catalog maker and material claims are not authenticated here, and no weight, retention, non-slip, size or performance test is reported.

The Bey-Berk account, Black Zebra Marble Wedge Bookends, shows two black-and-white veined wedges. Its material and seven-pound wording remain seller statements rather than measured results. Neither account supplies binary cards, a code, a message channel or an error-correction result.

Keep payment instructions outside the code puzzle

If you separately consider buying a shelf item, read the actual product account and current checkout terms before authorizing payment. The fictional binary words in this worksheet are not order identifiers, prices or instructions for a transfer. Its one-change correction rule must not be applied to a wallet address or any other real payment detail. Such an alteration would have no authority from this paper model. For an order on republeq.com, inspect the methods presented for your specific transaction. If cryptocurrency is offered and you consider USDT, confirm the exact asset, network, amount, receiving details, fees and any time limit through the current checkout. A familiar token name alone does not settle its network or the amount that would arrive after applicable charges. Do not copy receiving details from a product image, an earlier order or a fictional code list. Review the intended quantity, shipping destination, delivery estimate and final total. Ask how cancellation, returns and any approved refund would be handled, including the refund asset or currency, network where relevant, calculation basis and possible deductions. Keep those answers with the actual offer they concern. If another person is arranging the purchase, agree on the selected item and ask them to clarify proposed substitutions before proceeding. Retain the product reference, order confirmation and any transaction record together. If an essential instruction is missing or conflicting, pause and obtain clarification through the responsible service. A plausible sequence of symbols does not authenticate a destination, and a decoded label does not establish that a payment succeeded. This is conditional purchasing guidance, not a completed transaction, a promise of any current payment option or advice to select a particular asset. Every code comparison can be completed without buying anything, and any eventual purchase needs its own current evidence.

Save the four allowed words, their six pair distances and all four no-change or one-change lists together. They show why every permitted received word identifies one label, while the twenty-versus-sixteen count rules out a four-position alternative. The two-change 00000-to-11000 example remains beside the result as its limit: a decoded answer is guaranteed correct only within the exact change model used to prove it.