Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 2 of 4

Recover accumulated rewards from endpoint potentials

Prove a local reward identity, telescope it between arbitrary configurations and separate stopping choices from terminal states.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

A workshop combines packets of material. Combining packets of sizes a and b earns ab points. Sizes are positive integers, a merge replaces the two packets by one of size a+b, and nothing is lost. A configuration records all current pile sizes; their order does not matter. Start with sizes 1, 2 and 3. Before merging, predict whether the order of work changes the total score.

First combine 1 and 2: earn 2, leaving 3 and 3. Combining those earns 9, for a total of 11. Alternatively, combine 2 and 3: earn 6, leaving 1 and 5. Their merge earns 5, again totaling 11. These two traces suggest a rule, but they do not prove it for other sizes or longer runs.

Write down the score if the workshop stops after only the first merge. The results are now 2 and 6. The distinction is not an accounting error: the two stopping configurations differ. A theorem about completed work cannot silently become a theorem about every voluntary stopping point.

Predict

Try a quantity that remembers how concentrated the material is: square each pile size and add. Call this potential Φ. It is a bookkeeping function of the current configuration, not accumulated reward and not physical energy. Initially Φ=1²+2²+3²=14. One final pile of size 6 has potential 36.

Predict the relationship between a merge reward and the potential increase. Should the total reward be 36−14, half that difference, or something depending on the number of moves? Explain your choice before reading the next table. Also predict whether a larger potential necessarily means that no legal move remains.

Experiment

Reproduce this trace on paper, recording the configuration before computing its potential. Then change the first merge and build your own second trace.

ConfigurationPotential ΦReward just earnedAccumulated reward
1, 2, 31400
3, 31822
636911

The increases 4 and 18 are twice the rewards 2 and 9. The alternative intermediate configuration 1, 5 has potential 26. It has the same mass and pile count as 3, 3, but not the same potential. Thus neither mass nor pile count alone determines the score at an arbitrary stopping point.

For a changed experiment, use four unit piles. Compare stopping at 2, 2 with stopping at 1, 3. Both take two merges, but their potentials are 8 and 10, so their rewards are 2 and 3. Draw the groups of original units that form each final pile. This checks legality rather than treating mass conservation as sufficient for reachability.

Understand

For one merge, every untouched pile contributes the same square before and after. The only change is

(a+b)²−a²−b²=2ab.

Therefore the local reward is half the potential increase. For a finite route with configurations C₀,C₁,…,C_t, add these local identities. Every intermediate potential appears once positively and once negatively. The total reward is [Φ(C_t)−Φ(C₀)]/2. The formula also covers t=0, when no move occurs and both sides are zero.

This proof starts and ends at arbitrary configurations along a legal route. For a fixed initial configuration, two actual routes earn the same reward exactly when their final potentials agree. Ending at the same configuration is sufficient, but not required; agreeing only on the number of piles is insufficient. The identity does not prove that a proposed final configuration is reachable.

Termination is a separate claim. Every merge reduces the number of piles by one. Starting with m piles, there can be at most m−1 moves. If two or more piles remain, a merge is still available, so a run that cannot be extended ends with one pile. Such a terminal pile has size M, the sum of all initial sizes. Every complete run therefore earns [M²−Σs_i²]/2, where s_i are the initial sizes. A voluntary stop with multiple piles is a stopping state but is not terminal.

Notice the sign: merging raises Φ. Calling Φ a decreasing resource would reverse the argument. One may instead use the remaining-reward potential [M²−Φ]/2, which falls by ab. Either convention works when stated consistently.

Apply

Start with 1, 3 and 5. Without enumerating every order, compute the reward when all material is combined. Then stop after merging the smallest two piles and compute the remaining possible reward. Review: initial Φ=35, final Φ=81, so the complete reward is 23. The early merge earns 3 and leaves sizes 4, 5 with Φ=41; the remaining reward is 20.

Now allow splitting a pile into two positive piles. If a split earns the negative of the corresponding merge reward, the same endpoint formula survives for every finite route. But merging and immediately splitting can repeat forever, so the former pile-count termination proof fails. If both directions earn a positive bonus, even endpoint reward invariance fails: a closed two-move route earns positive points. Explain these two failures separately.

Continue

Use the lesson practice to derive a new potential for a changed reward rule and to compare distinct stopping configurations. In each proof record the state space, legal move, local identity, endpoint condition and any independent termination argument. A potential identity can explain a score without proving progress; a decreasing move count can prove termination without determining the score. Keeping those obligations separate makes the argument reusable in other processes.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Start with piles 2,3,4. Compare the complete routes that first merge 2 with 3 and first merge 3 with 4. Record rewards and potentials at every stage. Compare both with stopping after the first merge. Explain which equality is general.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

For any finite sequence of permitted merges from configuration C to D, prove the total reward formula using Φ(C)=Σs². State exactly when two routes from C, possibly ending at different configurations, earn equal rewards. Explain why this does not assert that every proposed endpoint is reachable.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Starting from six piles each of size 1, exhibit legal routes to (3,3), (1,5) and (2,4). Compute each reward. Refute the statement that the initial mass and number of remaining piles determine the reward. Explain how the grouping interpretation checks legality.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove that every merge-only run starting with m≥1 piles has at most m−1 moves and that every maximal run ends with one pile. Express its reward in terms of initial sizes s₁,…,s_m. Is a learner who stops after fewer moves in a terminal state? Address m=1.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Change the merge reward to 3ab−2. Find a potential Ψ whose increase equals the reward, using Φ and the number N of piles. Prove a route formula. Compute the reward from (1,2,4) to (7), and explain why a reward that can be negative in other variants would not invalidate telescoping.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Allow a pile a+b to split into positive integer piles a,b. Compare two reward policies: signed policy gives −ab for a split; bonus policy gives +ab for both merges and splits. Prove an endpoint formula or exhibit its failure for each. Decide whether finite mass now guarantees termination.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.