Sort Rotations and Keep the Last Column
Rearrange a message through sorted cyclic rotations and reverse the transform.
Adult planning suggestion: about 9–12 · Logic & rule checking
- Players
- 2–4; cooperate, then exchange the checker role
- Time
- 15–25 minutes
- Materials
- Paper, pencil and the supplied player sheet; keep the host sheet separate.
Prepare
Use the string ABA followed by a single terminal symbol $, giving ABA$. Define alphabet order $ before A before B. Write every cyclic left rotation on a separate row; keep all symbols, including $.
Follow the rule
Sort those four equal-length rows lexicographically. Read the final column from top to bottom as output L. Record the zero-based row index of the original ABA$ string.
Check each step
For a paper inverse start with four empty rows. Prepend L[i] to row i and sort the rows after each round. Repeat four rounds. Select the original indexed row and remove its terminal $ to recover the data.
Worked example
Track the row order carefully: prepending is followed by a full sort every time, not sorting L just once. $ must appear exactly once and must not be a data symbol.
Finish and adapt
Finish when inversion recovers ABA and the rotation multiset is unchanged. This transform rearranges symbols; by itself it does not shorten the string or guarantee compression. Our tiny paper case is separate from the source programming assignment.
Purpose, observation and provenance
Within this activity: Rearrange a message through sorted cyclic rotations and reverse the transform.
Ask the checker to name a particular rule and show the recorded evidence. Speed alone is not the goal.
Our rules, examples and printable diagrams are separately prepared. The earliest inventor of the broader mechanism is not established here.
Duke Computer Science · Burrows–Wheeler background — Mechanism background only. Our small paper instance and role rotation are separate; no endorsement or unique-solution claim.
Secondary practice: Cooperation and explaining a check.
For a class of 30, use ten groups of three. Prepare one player-material set per group and keep the host key with the adult. Rotate operator, recorder and checker after each worked example; a reader or scribe may help without choosing answers. Avoid public ranking or diagnostic labels.
Age bands are planning suggestions. Background references may address older learners and do not validate suitability for this age band. Goals describe observable actions, not measured long-term gains or institutional endorsement.
Free alternative: Copy the supplied grids, labels and cards onto reused paper. No specialist product is needed. Adults may prepare pieces or act as a scribe.
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.
Sort Rotations and Keep the Last Column · Player materials
Use the string ABA followed by a single terminal symbol $, giving ABA$. Define alphabet order $ before A before B. Write every cyclic left rotation on a separate row; keep all symbols, including $.
Sort those four equal-length rows lexicographically. Read the final column from top to bottom as output L. Record the zero-based row index of the original ABA$ string.
For a paper inverse start with four empty rows. Prepend L[i] to row i and sort the rows after each round. Repeat four rounds. Select the original indexed row and remove its terminal $ to recover the data.
| Rotation index / 轮转号 | String / 串 |
|---|---|
| 0 | ABA$ |
| 1 | BA$A |
| 2 | A$AB |
| 3 | $ABA |
| Step / cell | Decision / value | Rule checked |
|---|---|---|
| ________ | ________ | ________ |
| ________ | ________ | ________ |
| ________ | ________ | ________ |
| ________ | ________ | ________ |
Sort Rotations and Keep the Last Column · Host key — keep separate
Sorted $ABA,A$AB,ABA$,BA$A. Last column AB$A, original row2. Four prepend-and-sort rounds reconstruct the same four sorted rows; row2 is ABA$.
Lead and check
Use the string ABA followed by a single terminal symbol $, giving ABA$. Define alphabet order $ before A before B. Write every cyclic left rotation on a separate row; keep all symbols, including $.
Sort those four equal-length rows lexicographically. Read the final column from top to bottom as output L. Record the zero-based row index of the original ABA$ string.
For a paper inverse start with four empty rows. Prepend L[i] to row i and sort the rows after each round. Repeat four rounds. Select the original indexed row and remove its terminal $ to recover the data.
Track the row order carefully: prepending is followed by a full sort every time, not sorting L just once. $ must appear exactly once and must not be a data symbol.
Finish when inversion recovers ABA and the rotation multiset is unchanged. This transform rearranges symbols; by itself it does not shorten the string or guarantee compression. Our tiny paper case is separate from the source programming assignment.
Classroom: ten trios for 30 learners; one kit per trio. Rotate operator, recorder and checker. Age guidance is a planning suggestion; prerequisite support may be necessary.