Round & Revel / Costed multi-input program synthesis: each instruction compares two positions and conditionally swaps them, while one fixed instruction sequence must sort an entire test family.

Common Sort

One little program. Several very different starting rows.

Design one sequence of comparisons that sorts four starting rows together. Twelve workshops change the available comparisons and their costs; each also has an all-input certification challenge.

1–4 players, solo or cooperatingEstimated 20–40 minutes

An authored print-and-play edition from Round & Revel. Time is a planning estimate for play, excluding preparation. This edition has not had a live group playtest; balance and duration are not established by live play.

How to play

What you need

  • Twelve workshop sheets with four complete input rows, allowed comparisons, costs and checked budgets
  • Program sheet, test ledger, all 24 input permutations for optional certification, and separate hints and answer programs
  • Paper, pencils and eraser; no cards, computer, calculator or cutting required

One sequence must work on every row

Choose two workshops. Each supplies four different rows containing the numbers 1, 2, 3 and 4 once each. Build a single program that changes EVERY supplied row to 1, 2, 3, 4. Positions are fixed left to right, numbered 1–4. Use only the comparisons listed on that workshop. Its PAR is the checked minimum total program cost, not a time target. All inputs, costs and current test results are public.

What a comparison does

An instruction such as 13 means compare the numbers currently in positions 1 and 3. Put the smaller in position 1 and the larger in position 3; leave the other two positions unchanged. If those two numbers are already in that order, nothing moves. The instruction still costs its printed amount. An instruction always places the smaller number in the lower-numbered position.

Apply the same entire written sequence, in order, to each input row independently. Restart from that row’s original numbers, not another row’s output. You may use a listed comparison repeatedly, paying its cost each time. You cannot choose a different next instruction for different rows, reverse a comparator, move a number by hand, stop a difficult row early, or use an unlisted pair. A program may contain fewer instructions than the ledger has spaces.

Design, test and improve

Begin with an empty program. Choose a first editor and rotate clockwise after each proposed edit, continuing across workshops. On your turn append, insert, replace or remove one instruction, or pass the editing role. Discuss freely and test as many drafts as you need. Everyone can examine a different input or look for an instruction useful to several inputs; the editor makes the current edit. Solo, do all checking yourself.

Write each instruction and its cost, then sum the costs. Run the whole candidate on all four inputs, recording each row after every instruction. Check both comparisons and cost before accepting a completion. A cheaper draft that fails one row has not solved the workshop. Copying and arithmetic errors may be corrected without changing the chosen program; when an old trace is unclear, rerun that input from its printed start.

Score and close a workshop

A program that sorts every required row within PAR and uses no hint earns 2 shared points. A valid program within PAR + 3 earns 1; any hint caps the score at 1. A sorting program costing more than PAR + 3 earns no completion score; keep revising or concede. A conceded workshop or one whose complete answer was read before solving earns 0. Draft revisions and failed scratch tests carry no penalty. You may concede whenever you wish. No unique program is required: every legal solution earns its proper score.

After success or concession, record the cost and score, clear the program and traces, and begin the next workshop with the continuing editor rotation. After two workshops, total 0–4. There is no individual winner or tiebreaker. No timer or minimum editing speed applies.

A comparison in two different rows

Apply 13 to the row 4, 1, 2, 3: positions 1 and 3 hold 4 and 2, so the result is 2, 1, 4, 3. Apply that same instruction to 1, 4, 3, 2: positions 1 and 3 already hold 1 before 3, so this row stays unchanged. If this workshop prices 13 at 2, the program pays 2 once, regardless of how many input rows are being tested. Repeating 13 later costs another 2.

Replay: certify every input

For a different challenge on a familiar workshop, choose CERTIFICATION before starting. Keep that workshop’s allowed pairs and prices, but replace the four tests with ALL 24 rows in the supplied certification bank. Use its CERTIFICATION PAR and the same scoring rule. Your one fixed program must sort all 24; a program that passed the four-row puzzle may fail this larger family. The full answer includes a separately checked certification program for every workshop. Record which mode you played.

Different missing comparisons and prices change which programs are efficient; workshops are not interchangeable renamed inputs. These are twelve finite workshops and their stricter test modes. Known sorting techniques may help, and no new basic sorting principle is claimed. Enlarge the four-number rows, read each instruction aloud or use a scribe. Additional players share analysis; no hidden roles or mental-arithmetic race are involved.

Printable materials

Print this page single-sided or copy the components onto paper. The preparation rules specify which components need cutting, opaque backs or special sizing. Use a ruler wherever a measurement matters.

Program sheet

Workshop ____ . Mode FOUR TESTS / CERTIFICATION. PAR ____ . Use one sequence for every required row. Prices come from the chosen workshop, not from the pair number.

Instruction numberComparison pairPrinted costRunning cost
1____________
2____________
3____________
4____________
5____________
6____________
7____________
8____________
9____________
10____________
11____________
12____________
13____________
14____________
15____________
16____________
17____________
18____________

Program ends after instruction ____ . Total cost ____ . Pair 13 compares positions 1 and 3; it does not add thirteen.

Single-input test ledger: copy as needed

Workshop ____ . Input ID ____ . Original row ____ ____ ____ ____ . Reset to that original before testing another candidate.

After instructionPairPosition 1Position 2Position 3Position 4
START—________________
1____________________
2____________________
3____________________
4____________________
5____________________
6____________________
7____________________
8____________________
9____________________
10____________________
11____________________
12____________________
13____________________
14____________________
15____________________
16____________________
17____________________
18____________________

Final row must be 1, 2, 3, 4. An already ordered compared pair is unchanged, but the instruction still counts toward program cost.

All 24 certification inputs

Use every row below in CERTIFICATION mode. This bank is complete: each permutation of 1, 2, 3, 4 occurs once. There is no hidden additional test.

IDPosition 1Position 2Position 3Position 4
P011234
P021243
P031324
P041342
P051423
P061432
P072134
P082143
P092314
P102341
P112413
P122431
P133124
P143142
P153214
P163241
P173412
P183421
P194123
P204132
P214213
P224231
P234312
P244321

CS01 workshop

FOUR-TEST PAR: 8. CERTIFICATION PAR: 10. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
123
143
231
342
InputPosition 1Position 2Position 3Position 4
R11423
R23142
R33214
R44132

CS02 workshop

FOUR-TEST PAR: 5. CERTIFICATION PAR: 10. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
122
131
232
243
342
InputPosition 1Position 2Position 3Position 4
R13241
R23214
R32134
R41243

CS03 workshop

FOUR-TEST PAR: 10. CERTIFICATION PAR: 12. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
123
133
233
341
InputPosition 1Position 2Position 3Position 4
R12413
R22143
R32134
R43412

CS04 workshop

FOUR-TEST PAR: 7. CERTIFICATION PAR: 9. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
121
142
233
341
InputPosition 1Position 2Position 3Position 4
R11423
R23142
R34231
R42413

CS05 workshop

FOUR-TEST PAR: 6. CERTIFICATION PAR: 9. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
123
132
142
232
241
341
InputPosition 1Position 2Position 3Position 4
R12431
R21324
R31423
R41342

CS06 workshop

FOUR-TEST PAR: 5. CERTIFICATION PAR: 7. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
121
132
141
232
243
341
InputPosition 1Position 2Position 3Position 4
R12431
R24132
R32134
R44231

CS07 workshop

FOUR-TEST PAR: 8. CERTIFICATION PAR: 11. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
121
233
243
342
InputPosition 1Position 2Position 3Position 4
R14231
R24123
R31423
R42431

CS08 workshop

FOUR-TEST PAR: 8. CERTIFICATION PAR: 11. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
122
133
142
233
241
342
InputPosition 1Position 2Position 3Position 4
R13241
R21342
R32341
R43412

CS09 workshop

FOUR-TEST PAR: 13. CERTIFICATION PAR: 15. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
122
133
233
343
InputPosition 1Position 2Position 3Position 4
R12314
R23142
R32143
R44321

CS10 workshop

FOUR-TEST PAR: 5. CERTIFICATION PAR: 7. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
121
133
142
231
241
342
InputPosition 1Position 2Position 3Position 4
R12431
R21324
R32143
R44321

CS11 workshop

FOUR-TEST PAR: 7. CERTIFICATION PAR: 9. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
123
131
141
232
341
InputPosition 1Position 2Position 3Position 4
R13142
R22143
R33421
R44321

CS12 workshop

FOUR-TEST PAR: 13. CERTIFICATION PAR: 15. Only the listed pairs are allowed; each use pays its listed cost.

Allowed pairCost per use
123
133
233
342
InputPosition 1Position 2Position 3Position 4
R14132
R24231
R31324
R42413
CS01 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 23, 12.

CS01 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 23 → 12 → 23 → 34 → 23. Cost: 1 + 3 + 1 + 2 + 1 = 8.

StepPairR1 afterR2 afterR3 afterR4 after
START—1 4 2 33 1 4 23 2 1 44 1 3 2
1231 2 4 33 1 4 23 1 2 44 1 3 2
2121 2 4 31 3 4 21 3 2 41 4 3 2
3231 2 4 31 3 4 21 2 3 41 3 4 2
4341 2 3 41 3 2 41 2 3 41 3 2 4
5231 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 23 → 34 → 23 → 12 → 23 → 34. Cost: 1 + 2 + 1 + 3 + 1 + 2 = 10. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS02 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 34, 13.

CS02 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 34 → 13 → 12. Cost: 2 + 1 + 2 = 5.

StepPairR1 afterR2 afterR3 afterR4 after
START—3 2 4 13 2 1 42 1 3 41 2 4 3
1343 2 1 43 2 1 42 1 3 41 2 3 4
2131 2 3 41 2 3 42 1 3 41 2 3 4
3121 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 13 → 34 → 13 → 23 → 12 → 34. Cost: 1 + 2 + 1 + 2 + 2 + 2 = 10. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS03 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 23, 34.

CS03 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 23 → 34 → 12 → 23. Cost: 3 + 1 + 3 + 3 = 10.

StepPairR1 afterR2 afterR3 afterR4 after
START—2 4 1 32 1 4 32 1 3 43 4 1 2
1232 1 4 32 1 4 32 1 3 43 1 4 2
2342 1 3 42 1 3 42 1 3 43 1 2 4
3121 2 3 41 2 3 41 2 3 41 3 2 4
4231 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 34 → 13 → 34 → 23 → 34 → 12. Cost: 1 + 3 + 1 + 3 + 1 + 3 = 12. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS04 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 14, 23.

CS04 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 14 → 23 → 12 → 34. Cost: 2 + 3 + 1 + 1 = 7.

StepPairR1 afterR2 afterR3 afterR4 after
START—1 4 2 33 1 4 24 2 3 12 4 1 3
1141 4 2 32 1 4 31 2 3 42 4 1 3
2231 2 4 32 1 4 31 2 3 42 1 4 3
3121 2 4 31 2 4 31 2 3 41 2 4 3
4341 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 12 → 34 → 14 → 23 → 12 → 34. Cost: 1 + 1 + 2 + 3 + 1 + 1 = 9. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS05 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 14, 24.

CS05 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 14 → 24 → 34 → 23. Cost: 2 + 1 + 1 + 2 = 6.

StepPairR1 afterR2 afterR3 afterR4 after
START—2 4 3 11 3 2 41 4 2 31 3 4 2
1141 4 3 21 3 2 41 4 2 31 3 4 2
2241 2 3 41 3 2 41 3 2 41 2 4 3
3341 2 3 41 3 2 41 3 2 41 2 3 4
4231 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 24 → 13 → 34 → 12 → 23. Cost: 1 + 2 + 1 + 3 + 2 = 9. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS06 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 14, 12.

CS06 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 14 → 12 → 24. Cost: 1 + 1 + 3 = 5.

StepPairR1 afterR2 afterR3 afterR4 after
START—2 4 3 14 1 3 22 1 3 44 2 3 1
1141 4 3 22 1 3 42 1 3 41 2 3 4
2121 4 3 21 2 3 41 2 3 41 2 3 4
3241 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 14 → 23 → 12 → 34 → 23. Cost: 1 + 2 + 1 + 1 + 2 = 7. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS07 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 12, 24.

CS07 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 12 → 24 → 12 → 23. Cost: 1 + 3 + 1 + 3 = 8.

StepPairR1 afterR2 afterR3 afterR4 after
START—4 2 3 14 1 2 31 4 2 32 4 3 1
1122 4 3 11 4 2 31 4 2 32 4 3 1
2242 1 3 41 3 2 41 3 2 42 1 3 4
3121 2 3 41 3 2 41 3 2 41 2 3 4
4231 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 12 → 24 → 12 → 23 → 12 → 34. Cost: 1 + 3 + 1 + 3 + 1 + 2 = 11. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS08 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 13, 14.

CS08 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 13 → 14 → 24 → 34. Cost: 3 + 2 + 1 + 2 = 8.

StepPairR1 afterR2 afterR3 afterR4 after
START—3 2 4 11 3 4 22 3 4 13 4 1 2
1133 2 4 11 3 4 22 3 4 11 4 3 2
2141 2 4 31 3 4 21 3 4 21 4 3 2
3241 2 4 31 2 4 31 2 4 31 2 3 4
4341 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 12 → 34 → 24 → 13 → 23. Cost: 2 + 2 + 1 + 3 + 3 = 11. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS09 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 13, 12.

CS09 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 13 → 12 → 34 → 23 → 12. Cost: 3 + 2 + 3 + 3 + 2 = 13.

StepPairR1 afterR2 afterR3 afterR4 after
START—2 3 1 43 1 4 22 1 4 34 3 2 1
1131 3 2 43 1 4 22 1 4 32 3 4 1
2121 3 2 41 3 4 21 2 4 32 3 4 1
3341 3 2 41 3 2 41 2 3 42 3 1 4
4231 2 3 41 2 3 41 2 3 42 1 3 4
5121 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 12 → 23 → 12 → 34 → 23 → 12. Cost: 2 + 3 + 2 + 3 + 3 + 2 = 15. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS10 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 24, 12.

CS10 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 24 → 12 → 23 → 34. Cost: 1 + 1 + 1 + 2 = 5.

StepPairR1 afterR2 afterR3 afterR4 after
START—2 4 3 11 3 2 42 1 4 34 3 2 1
1242 1 3 41 3 2 42 1 4 34 1 2 3
2121 2 3 41 3 2 41 2 4 31 4 2 3
3231 2 3 41 2 3 41 2 4 31 2 4 3
4341 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 24 → 23 → 12 → 24 → 23 → 34. Cost: 1 + 1 + 1 + 1 + 1 + 2 = 7. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS11 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 14, 23.

CS11 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 14 → 23 → 34 → 12. Cost: 1 + 2 + 1 + 3 = 7.

StepPairR1 afterR2 afterR3 afterR4 after
START—3 1 4 22 1 4 33 4 2 14 3 2 1
1142 1 4 32 1 4 31 4 2 31 3 2 4
2232 1 4 32 1 4 31 2 4 31 2 3 4
3342 1 3 42 1 3 41 2 3 41 2 3 4
4121 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 14 → 13 → 34 → 23 → 34 → 12. Cost: 1 + 1 + 1 + 2 + 1 + 3 = 9. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

CS12 hints: spoilers

SPOILER HINT: Compare the same positions across all four inputs. A pair that does nothing in one row can still be useful in others. Count price rather than instruction count.

SPOILER OPENING: One minimum-cost four-test program begins 23, 34.

CS12 answer programs: spoilers

SPOILER FOUR-TEST PROGRAM: 23 → 34 → 13 → 34 → 12. Cost: 3 + 2 + 3 + 2 + 3 = 13.

StepPairR1 afterR2 afterR3 afterR4 after
START—4 1 3 24 2 3 11 3 2 42 4 1 3
1234 1 3 24 2 3 11 2 3 42 1 4 3
2344 1 2 34 2 1 31 2 3 42 1 3 4
3132 1 4 31 2 4 31 2 3 42 1 3 4
4342 1 3 41 2 3 41 2 3 42 1 3 4
5121 2 3 41 2 3 41 2 3 41 2 3 4

SPOILER CERTIFICATION PROGRAM: 34 → 13 → 34 → 23 → 34 → 12. Cost: 2 + 3 + 2 + 3 + 2 + 3 = 15. Applied separately to every P01–P24 row, it finishes at 1, 2, 3, 4. Use the complete bank and test ledger to check any alternative. The stated costs were checked by exhaustive shortest-path search; a different minimum program may exist.

Two-workshop result

WorkshopModeProgram costHint?Points
____________________
____________________

Shared total ____ / 4. A program’s cost is paid once, not multiplied by its number of test rows.