English

Minimum symbol edits

Find a shortest edit sequence with insertion, deletion and replacement, then justify the cost with a prefix table.

Adult planning suggestion: about 9–12 · Logic & rule checking · Language & storytelling

Players
Pairs
Time
15–20 minutes
Materials and quantities
Symbol strings, insert/delete/replace operation cards and a 4×4 cost table per pair.

Thirty pupils: fifteen pairs; editor and matrix checker swap for a smaller string.

Prepare

Work with abstract symbols, not dictionary words. The main task changes ABC into CAB. Inserting one symbol, deleting one symbol or replacing one symbol each costs one. Keeping an equal symbol costs zero. A swap of two symbols is not a single permitted action. The same rules apply in English and Chinese because A/B/C are arbitrary labels rather than an English vocabulary quiz.

Play

First write a candidate sequence and charge every action. Then fill a prefix-cost grid whose row labels are the prefixes of ABC and column labels the prefixes of CAB, including the empty prefix. The first row and column are 0,1,2,3. At each remaining cell take the minimum of the cell above plus one, the cell to the left plus one and the diagonal plus zero for equal symbols or one for unequal symbols. Use the row/column labels, not a guessed reading direction.

Worked example

ABC → AB deletes the final C, then AB → CAB inserts C at the front, total two. Replacing all three positions would cost three. The bottom-right grid entry is two and confirms the shorter result. The smaller check ABCA → ACA costs one deletion of B. AB → BA costs two, since a direct swap has not been authorized. The key includes the complete main grid and these concrete edit sequences.

Finish and check

Finish after the main two-step sequence and the cost grid agree, or after twenty minutes with unfinished cells marked. A different two-step path is accepted if every intermediate string and cost is valid. The matrix certifies this finite symbolic task; the page does not run an editor or automatically correct spelling. Do not omit an insertion or deletion from the record merely because the final letters look right.

Adaptation and practical limits

Thirty pupils: fifteen pairs, editor and grid checker, then swap for a smaller task. Adult planning suggestion is roughly 9–12 with adult support for tables. The official database documentation defines the three edit operations as a technical reference, not an educational validation. Use large letter cards or handwritten strings. A child may dictate edits to a partner without losing the chance to reason about cost.

Aim: Find a shortest edit sequence with insertion, deletion and replacement, then justify the cost with a prefix table.

Practice within this activity: Distinguish an allowed edit from an unpriced swap and audit a minimum.

Adult observation: Ask for an intermediate string and charged operation, not just a final answer.

Mechanism and adaptation: Our version uses unit-cost Levenshtein editing with variable string length. Examples and sheets are separately written; the earliest inventor is not established here.

Reference checked 25 October 2026: PostgreSQL documentation · fuzzystrmatch — Official technical definition of insertion, deletion and substitution edit distance; our handwritten prefix table is a separate finite activity, not a database tutorial or age validation.

Goals describe observable activity choices, not measured long-term gains or institutional endorsement.

Free alternatives: Use paper or clean reused cardboard and a pencil. Copy the supplied diagrams and tables by hand; no specialist kit or purchase is needed.

Printable materials

Preview at 100% scale, with browser headers and footers off. Cut with suitable help. Keep host keys separate. This is a manual tabletop kit, not an online opponent, automatic judge or solver.

Player edit operations and tasks

Insert1 symbol: cost1
Delete1 symbol: cost1
Replace1 symbol: cost1

Keep equal symbol: cost0. No one-action swap. Main ABC→CAB; smaller ABCA→ACA and AB→BA.

Player prefix costs and edit log

ABC / CAB∅CCACAB
∅0123
A1____________
AB2____________
ABC3____________
BeforeOperationAfterCost
________________________________
________________________________
________________________________
________________________________
________________________________

Host / teacher checked example · separate

Thirty pupils: fifteen pairs; editor and matrix checker swap for a smaller string.

Symbol strings, insert/delete/replace operation cards and a 4×4 cost table per pair.

Keep this answer page separate. Read the full web rules and preview materials before leading; allow pauses, passing and supported writing.

ABC / CAB∅CCACAB
∅0123
A1112
AB2221
ABC3232

ABC→AB deleteC; AB→CAB insertC at front:2. ABCA→ACA deleteB:1. AB→BA needs2, not an unauthorized single swap.

Related activities

Classroom games · All 190 games