BTT Mathematics / Primary Mathematics Learning Hub / Optimisation and Minimum Moves
Optimisation asks for the best valid solution under a stated objective. “Best” might mean fewest moves, shortest path, smallest perimeter, largest area, least material or fewest pieces. A candidate is not optimal merely because it works; we need a reason that no valid solution can do better.
A clean optimisation proof often has two parts. First establish a lower bound: every valid solution needs at least a certain amount. Then give a construction that reaches that bound. When the two meet, the construction is optimal.
Suppose a path must move four grid steps right and three steps up. Any valid right/up path needs at least seven moves because the horizontal and vertical requirements together total seven. A path such as RRRRUUU uses exactly seven. The lower bound and construction match, so seven is the minimum.
This guide is Primary Mathematics enrichment. It connects Bounds, Extremes and Guaranteed Conclusions, Systematic Listing, measurement, number sense and spatial construction. It is not a claim that formal optimisation theory is required at every Primary level. Use the MOE Primary curriculum page and the learner’s school programme for required scope.
Objective and constraints · Lower bounds · Shortest paths · Efficient arithmetic constructions · Transfers and balancing · Area and perimeter · Why greedy can fail · 24 questions · Worked answers
1. State what is being minimised or maximised
A problem can have the same valid arrangements but different optimal answers depending on its objective. Twelve unit squares may be arranged to minimise perimeter, maximise perimeter or fit inside a restricted width. These are different tasks.
Feasibility comes before optimality
A solution must first obey every rule. A three-move path is irrelevant if one of its moves is not permitted. A rectangle with decimal side lengths is irrelevant if the puzzle requires whole-number sides. A coin construction using a denomination not available is invalid even if it uses fewer coins.
Worked example A: Two valid coin constructions
Using coin values 1, 3 and 4 to make six, one construction is 4+1+1, using three coins. Another is 3+3, using two. The second is better for the objective “fewest coins.”
But if the objective were “use at least one 4-coin,” the first construction might be the only feasible one among those two. Objective and constraints must remain visible.
Optimal does not mean unique
Two different paths can both have the same minimum length. On a right/up grid, RRU and URR may each be shortest between the same endpoints. Optimisation asks for the best value; uniqueness of the arrangement is a separate question.
2. A lower bound says no solution can be better than this
If every move changes horizontal position by at most one, moving eight units horizontally needs at least eight moves. If a coin has value at most six, making twenty-nine requires at least five coins by value alone, but that coarse bound may not be achievable because five sixes make thirty, not twenty-nine.
Strengthen a weak lower bound with arithmetic
To make twenty-nine using only 6 and 1, four sixes give twenty-four and five ones finish the amount, for nine pieces. Could eight suffice? With eight pieces, if x of them are sixes, the total is 6x+(8−x)=5x+8. Setting this equal to twenty-nine gives 5x=21, impossible for a whole x. Seven or fewer pieces have maximum value at most forty-two but must also satisfy the same residue restriction; systematic checking confirms nine is minimal.
For Primary enrichment, a short organised list can replace algebra: try four sixes, then three, then two, and count the required ones. The proof still needs to explain why no untested case can use fewer pieces.
Upper bounds serve the opposite role
If looking for a maximum area under a fixed perimeter, construct a candidate to show at least that much is possible, then prove no arrangement can exceed it. The direction of the bound depends on the objective.
3. Shortest paths come from unavoidable displacement
Worked example B: Orthogonal grid movement
Move from (0,0) to (8,5) using only one-unit horizontal or vertical steps. The horizontal coordinate must change by eight and the vertical by five, so every path needs at least thirteen moves. Eight right and five up achieve thirteen. Minimum=13.
Worked example C: Diagonal moves allowed
Now allow a diagonal move that changes both coordinates by one in the needed directions. From (0,0) to (8,5), use five diagonals to handle five units of both coordinates, then three horizontal moves. Total=8.
No path can use fewer than eight because the horizontal displacement alone is eight and no legal move changes horizontal position by more than one.
Worked example D: Non-zero starting point
From (2,3) to (9,8), orthogonal movement needs |9−2|+|8−3|=7+5=12 moves. With diagonal steps also allowed, five diagonals and two horizontal moves give 7, and seven is a lower bound from the horizontal displacement.
Blocked paths require a new feasibility check
The displacement gives a lower bound, but an obstacle can force extra moves. If a wall blocks every shortest route, the optimal path is longer. A lower bound is not automatically achievable.
4. Efficient arithmetic constructions need an exact fit
Worked example E: Reach twenty-nine with +6 or +1
Four +6 moves reach twenty-four; five +1 moves reach twenty-nine. Nine moves work. Five +6 moves overshoot and are not a valid exact construction. Testing fewer total moves shows none fit, so nine is optimal.
Worked example F: Reach twenty-nine with +7 or +3
Two sevens and five threes give 14+15=29 using 7 moves. An organised check of higher seven-counts shows three sevens leave eight, not divisible by three; four sevens leave one. Thus this seven-move construction is optimal.
Worked example G: Coin values 1, 3 and 4
To make eight, 4+4 uses two coins. One coin cannot have value eight, so two is automatically minimal.
Worked example H: Coin values 1, 4 and 6
To make ten, 6+4 uses two coins. Again, one coin is impossible because no available denomination equals ten.
5. Balancing by transfer turns a gap into a move requirement
When one counter moved from a larger pile to a smaller pile, the difference between the piles shrinks by two: one side falls by one while the other rises by one.
Worked example I: Two piles
Piles contain twenty and twelve counters. Their difference is eight. Moving four counters from the larger to the smaller produces sixteen and sixteen. Fewer than four transferred counters cannot close an eight-counter gap because each transferred counter reduces it by only two.
Worked example J: Another pair
Piles contain thirty-two and eighteen, total fifty. Equal final piles must contain twenty-five each, so move 7 counters from the larger to the smaller.
Worked example K: Three piles with a flexible transfer
Piles contain fourteen, eight and two counters, total twenty-four. The equal target is eight each. One move is defined to transfer any positive number of counters from one pile to another. Move six from the first pile to the third, producing 8,8,8. Since the start is not already equal, zero moves cannot work, so one move is optimal.
If a move were defined as transferring exactly one counter, the optimum would be six moves. The move definition changes the optimisation problem.
6. Compact rectangles often minimise perimeter for fixed area
For whole-number rectangles with fixed area, compare factor pairs. Perimeter is 2(length+width), so factor pairs closer together usually give smaller perimeter.
Worked example L: Area twelve
Whole-number factor pairs are 1×12, 2×6 and 3×4. Perimeters are 26,16 and 14. Thus the 3×4 rectangle minimises perimeter.
Worked example M: Area twenty-four
Factor pairs are 1×24, 2×12, 3×8 and 4×6. Perimeters are 50,28,22 and 20. The 4×6 rectangle is optimal.
Worked example N: Fixed perimeter, maximise area
An integer-sided rectangle has perimeter twenty, so adjacent sides sum to ten. The possible positive pairs are 1+9,2+8,3+7,4+6,5+5. Their areas are 9,16,21,24,25. Maximum area is 25 at 5×5.
Worked example O: Area thirty-six
Factor pairs 1×36,2×18,3×12,4×9 and6×6 have perimeters 74,40,30,26 and 24. The square is best among whole-number rectangles.
7. Taking the largest available step first can fail
A greedy rule makes the locally largest or apparently best choice at each stage. Sometimes that rule is optimal; sometimes it is not.
Counterexample: coins 1, 3 and 4 making six
Greedy takes four first, leaving two ones: 4+1+1, three coins. But 3+3 uses only two. Therefore “always take the largest coin not exceeding the remainder” is not a correct general rule for these denominations.
Why one counterexample is enough
The claim said the greedy rule always gives a minimum. One valid amount where it does not is enough to refute the universal claim. It does not mean greedy fails for every amount: for eight, greedy gives 4+4, which is optimal.
Prove optimum, do not merely beat greedy
Showing that 3+3 beats the greedy three-coin answer proves greedy is not optimal. To prove two coins is the true optimum, observe that one coin cannot equal six because the available values are one, three and four.
8. Practice: 24 original questions
Every optimisation question asks for the best valid value under the stated move or construction rules. Give both a construction and a reason no better value is possible where requested.
Questions 1–8: Paths and arithmetic moves
1. From (0,0) to (4,3), move only one unit right or up. Find the minimum number of moves.
2. From (0,0) to (8,5), use one-unit horizontal or vertical moves. Find the minimum.
3. Repeat Question 2, now also allowing a one-unit diagonal move that changes both coordinates toward the target. Find the minimum.
4. From (2,3) to (9,8), use only one-unit horizontal or vertical moves. Find the minimum.
5. Repeat Question 4 with diagonal moves also allowed. Find the minimum.
6. Start at zero and reach exactly 29 using moves +6 or +1. Find the minimum number of moves.
7. Start at zero and reach exactly 29 using moves +7 or +3. Find the minimum number of moves.
8. Make value 6 using coin values 1, 3 and 4. Find the minimum number of coins.
Questions 9–16: Constructions, transfers and rectangles
9. Make value 8 using coin values 1, 3 and 4. Find the minimum number of coins.
10. Make value 10 using coin values 1, 4 and 6. Find the minimum number of coins.
11. Using the greedy rule “take the largest coin first,” make 6 from coin values 1, 3 and 4. Compare the greedy count with the true optimum.
12. Two piles have 20 and 12 counters. One transferred counter moves from the larger pile to the smaller. What minimum number of counters must be transferred to equalise them?
13. Two piles have 32 and 18 counters. How many counters must be transferred from the larger to equalise them?
14. Three piles contain 14, 8 and 2 counters. One move may transfer any positive number from one pile to another. Find the minimum moves needed to make all three equal.
15. Twelve unit squares must form one rectangle with positive whole-number side lengths. Find the minimum perimeter.
16. Twenty-four unit squares must form one rectangle with positive whole-number side lengths. Find the minimum perimeter.
Questions 17–24: Extremes and efficiency proofs
17. A rectangle has positive whole-number side lengths and perimeter 20. Find the maximum possible area.
18. A rectangle has positive whole-number side lengths and area 36. Find the minimum perimeter.
19. Sort the list 3,1,2 into 1,2,3 using adjacent swaps only. Find the minimum number of swaps.
20. Sort 2,1,4,3 using swaps of any two positions. Find the minimum number of swaps.
21. Sixteen unit squares must form one rectangle with positive whole-number sides. Find the minimum perimeter.
22. Arrange those sixteen squares instead as a 1×16 strip. Find its perimeter and compare with Question 21.
23. Start at zero and reach exactly 31 using moves +5 or +2. Find the minimum number of moves.
24. Explain why “always take the largest available step first” is not a valid general optimisation rule, using the 1,3,4 coin system for value 6.
9. Worked answers
Answers 1–8
1. 7 moves. Four right and three up movements are unavoidable, giving lower bound seven. Any ordering of those seven valid moves achieves it.
2. 13 moves. Eight horizontal plus five vertical units are unavoidable.
3. 8 moves. Use five diagonals and three horizontal moves. Fewer than eight cannot cover the eight-unit horizontal displacement.
4. 12 moves. Horizontal difference seven plus vertical difference five.
5. 7 moves. Five diagonals handle five of each coordinate difference; two horizontal moves finish. Seven is also the horizontal lower bound.
6. 9 moves. Four +6 moves give twenty-four and five +1 moves finish. No eight-move mixture solves 6x+1(8−x)=29 because it would require 5x=21.
7. 7 moves. Two +7 moves and five +3 moves give twenty-nine. Six moves cannot achieve the total under the available combinations.
8. 2 coins. Use 3+3. One coin cannot equal six.
Answers 9–16
9. 2 coins. 4+4=8, and no single available coin has value eight.
10. 2 coins. 6+4=10.
11. Greedy uses 3; optimum is 2. Greedy gives 4+1+1. Better construction is 3+3.
12. 4 counters. The gap is eight, and each transferred counter reduces the gap by two.
13. 7 counters. Total fifty gives equal target twenty-five each; move seven from thirty-two.
14. 1 move. Move six from the pile of fourteen to the pile of two, producing 8,8,8. Zero moves cannot work because the starting piles differ.
15. 14 units. Whole-number rectangles are 1×12,2×6,3×4 with perimeters 26,16,14.
16. 20 units. The best factor pair is 4×6, perimeter twenty.
Answers 17–24
17. 25 square units. Side pairs summing to ten give products 9,16,21,24,25; maximum at 5×5.
18. 24 units. The closest factor pair is 6×6, giving perimeter twenty-four.
19. 2 adjacent swaps. Swap 3 and 1 to get 1,3,2, then swap 3 and 2. One adjacent swap cannot fix both inversions.
20. 2 swaps. Swap the first two entries, then the last two. Each incorrect pair is disjoint, so at least two swaps are required.
21. 16 units. A 4×4 square uses the sixteen cells and has perimeter sixteen, smaller than 2×8 or 1×16 rectangles.
22. 34 units, which is 18 more. Perimeter is 2(1+16)=34 compared with sixteen for 4×4.
23. 8 moves. Five +5 moves give twenty-five and three +2 moves give six more. Seven moves cannot fit the exact total under the available denominations.
24. Greedy chooses four first and then needs two ones, using three coins. Choosing two threes uses only two. One counterexample is enough to disprove an “always optimal” claim.
10. Teaching and transfer
If a learner finds a working construction and stops, ask two different questions: “Why does this work?” and “Why can nothing better work?” Optimisation needs both feasibility and comparison.
Build a lower bound before searching widely
In a grid path, count unavoidable coordinate changes. In a coin problem, compare the target with the largest denomination. In balancing, measure the gap. A useful bound reduces the search space and gives the final construction something to meet.
When the bound is not achievable
Making twenty-nine with sixes has a rough lower bound of five pieces because five sixes reach thirty. But exact equality and the available one-unit pieces force more. Teach the learner to distinguish “at least five” from “therefore five works.”
When greedy seems natural
Use the six-value coin example. Ask the learner to compare 4+1+1 with 3+3. Then test another amount such as eight, where greedy 4+4 is optimal. The goal is not “greedy is bad”; it is “greedy needs proof before being treated as a general rule.”
Use factor pairs to make shape optimisation inspectable
For fixed rectangle area with whole-number sides, list factor pairs in order and compute perimeters. The pattern that closer factors give smaller perimeter becomes visible and checkable.
Connect optimisation to proof habits
A lower bound is a guaranteed-conclusion argument. A construction establishes possibility. Their equality proves optimality. This creates a direct bridge to Bounds, Extremes and Guaranteed Conclusions and Logic, Deduction and Truth Conditions.
Continue through the puzzle-enrichment collection
For hidden-digit searches, use Cryptarithms, Alphametics and Digit Puzzles. For balancing many simultaneous line sums, use Magic Squares, Number Grids and Balanced Sums. For geometric coverage and impossibility, use Tessellations, Tiling and Spatial Construction Puzzles.
Return to the BTT Primary Mathematics Learning Hub.
Original enrichment guide with 24 original practice questions and separate worked answers. Every optimum is relative to the local rules stated in the question. No official examination requirement or performance guarantee is implied.

