Skip to content

Add Mathematica notebook solving 27-matchstick puzzle (88 ÷ 31 = 14)#4

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/solve-matchstick-problem
Draft

Add Mathematica notebook solving 27-matchstick puzzle (88 ÷ 31 = 14)#4
Copilot wants to merge 2 commits intomainfrom
copilot/solve-matchstick-problem

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

The equation 88 ÷ 31 = 14 is displayed with 27 matchsticks using 7-segment digit style. The equation is incorrect (88/31 ≈ 2.84); the task is to rearrange matchsticks—no additions or removals—to form a valid equation.

Approach

  • Segment counts modeled as an Association: 0→6, 1→2, 2→5, 3→5, 4→4, 5→5, 6→6, 7→3, 8→7, 9→6
  • Search space: all XX ÷ YY = ZZ with leading zeros permitted per digit slot, total segment count = 27
  • Minimum physical moves computed per candidate: sum of segment increases across fixed digit positions (equals segments to be removed, since total is conserved)

Result

56 ÷ 04 = 14 — requires only 3 matchstick moves, the minimum over all valid solutions:

Position Original New Δ segments
Tens of dividend 8 (7) 5 (5) −2
Units of dividend 8 (7) 6 (6) −1
Tens of divisor 3 (5) 0 (6) +1
Units of divisor 1 (2) 4 (4) +2
Result 14 unchanged 0

Segment totals: 11 + 10 + 6 = 27 ✓, and 56 / 4 = 14 ✓.

Notebook: cerillos.nb

  • Digit segment table and helper functions (cer, cer2)
  • Original equation verification (27 matchsticks confirmed)
  • Brute-force Reap/Sow search over all 2-digit × 2-digit candidates
  • Results table sorted by minimum physical moves, optimal rows highlighted
  • Detailed per-digit change breakdown for the optimal solution

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…puzzle 88 ÷ 31 = 14

Co-authored-by: calculuscalculus <120034106+calculuscalculus@users.noreply.github.com>
Copilot AI changed the title [WIP] Resolve matchstick equation with 27 sticks Add Mathematica notebook solving 27-matchstick puzzle (88 ÷ 31 = 14) Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants