Cap 5 Against "Must Carry": 0 of 40 Problems Carry
It started with a worksheet that did not add up. In the settings I ticked "must carry", typed 5 into the operand cap, set the problem count to 40, and left everything else at default. To watch only the generation itself, I lifted the problem-making block out of the template and ran it in Node, bypassing the browser and never touching the layout. Scanning the finished sheet problem by problem: 0 problems contained a carry, 17 problems contained a zero addend, and 30 problems repeated within the sheet.
Reading the relaxation log underneath, all four records fired in a single run — duplicate problems, degenerate problems, carry, borrow. The constraints on this sheet were not satisfied; they were stepped aside one by one. The cost shows up directly in the retries: 101 attempts on one problem, 4040 across the whole sheet, and the page footer spells out which requirements gave way.
Why it gives way is explained by the cap itself. With the operand cap pressed down at 5, every number that can enter an equation sits in the low decimal places, and adding two such numbers never reaches the step where the ones column has to pass something forward to the next digit. "Must carry" has no feasible solution at this setting, so the generator either drops problems or relaxes the requirement; what it actually does is the latter: the count still prints full, and the sheet contradicts the checkbox.
The Bounds Are Solved Backwards: the Multiplier Field Does Not Decide
Move the eye to multiplication. Enter multiplier cap 9, multiplicand cap 9, product cap 20, run 30000 samples, group by multiplicand, record the largest multiplier actually observed in each tier, then compare tier by tier against the formula value: 8/8 exact matches. The two loudest ends of the table: the 2 tier multiplies all the way up to 9, while the 9 tier can only reach 2.
The formula value is exactly the integer result of dividing the product cap by the multiplicand — the bigger the multiplicand, the smaller the multiplier it can pair with; a typed-in multiplier cap only counts when it falls below that quotient.
Following this structure, run the contrast: raise the multiplier cap from 9 to 99 while keeping the product cap at 20. Going tier by tier after the run, only the 2 tier moves, from 9 to 10; the other seven tiers gain not a single extra number — those seven already sat under the quotient.
Figure 1: observed multiplier maxima for the multiplicand 2 and 9 tiers when the multiplier cap is entered as 9 versus 99 and the product cap stays at 20.
Two Generation Mechanisms: Pool Enumeration and Construction Are Not the Same Thing
Tick all four operations, ask for 60 problems, and the measured mix is subtraction 40 / addition 18 / division 2 / multiplication 0. At first glance it reads like an adjustable ratio column, but that column has no ratio to set: it is a by-product of the enumerable problem pool. Enumerating the pool entry by entry under the same settings gives the composition addition 2500 / subtraction 4950 / multiplication 36 / division 181 — with only 36 multiplication problems lying in the pool, collecting 0 of them into a 60-problem sheet is not surprising.
The other path writes the upper and lower bounds straight into the construction process and takes the large-cap branch. If all four operations are required here too, this path needs 24 problems before you get a strict six of each operation. The difference is exactly this: pool enumeration only sees what sits inside the pool; construction only sees whether a pair can be assembled from the range. Their compositions are not one and the same set.
Figure 2: composition bars of the enumerable problem pool when all four operations are selected.
Put the two paths side by side and the easiest trap is reading that 60-problem mix as a column you could tune on the panel. It is not: with the same all-four selection, the construction branch yields 24 problems, six per operation, not one off; the pool-enumeration branch yields 60 problems and multiplication collects 0. What differs is the mechanism, not a box you forgot to tick.
Subtraction Guards Non-Negative, Division Guards the Identity, but Caps Get Flattened
Subtraction's worry is producing negatives. Across five setting groups of 4000 runs each, 20000 sampled problems in total, negative differences came out 0 and products over the cap came out 0. But the two input fields are not equals: once the product cap sits below the operand cap, it is flattened upward — enter 50 and 10, and what actually takes effect is 50 and 50; that 10 never enters the generation process at all.
Reviewing 200 whole-sheet division problems with remainders, exact-division problems mixed in came out 0, and violations of the remainder identity came out 0 too — that side of the ledger is clean. The remainder distribution is not: with the divisor cap set to 2, the remainders across 40 problems are all 1. The divisor is squeezed down to a single usable tier, so a non-zero remainder has only one value left to write, and reading the sheet end to end looks like one template spread out 40 times.
One Random Source Only: the Seed Decides the Whole Sheet
Math.random appears 0 times in the full template; problems come from an injectable pseudo-random source that holds one seed for value picking and one seed for ordering. With the same seed, generating 100 problems twice leaves 0 differing problems — the two sheets line up problem by problem; change the seed and all 100 problems change. The sharpest probe is touching only the ordering seed: differing problems remain 0, the only thing swapped is the on-page order.
Pool Capacity, Two-Level Dedup Keys, and the 120-Retry Cap
Deduplication works on two levels. The commutative-law key treats two problems whose addends merely swap positions as the same problem; the literal-problem key is a separate scheme.
The more constraints stack and the smaller the pool, the sooner something has to give — which tier breaks first was measured in the earlier article, so this one only follows up on a single question: set the count to 200 while the pool capacity is only 20. The generator does not drop problems; it hands out duplicates first — 180 duplicates within the sheet by the commutative-law key, 166 by the literal key, and 0 blank slots left unprinted.
Retries are bounded as well: each problem carries a hard cap of 120 generations, structured as 60 attempts on the first tier plus 20 on each of the three later tiers; the worst-case full sheet of 200 problems costs 113 ms, and no branch contains an infinite loop.
| Per-problem retry tier | Generation attempt cap |
|---|---|
| First tier | 60 |
| Later three tiers, each | 20 |
| All four tiers combined | 120 |
| Cap-5 conflict sheet, per problem | 101 |
| Cap-5 conflict sheet, whole sheet | 4040 |
Table 1: the four-tier retry structure, and the attempt counts produced by the run that paired "must carry" with operand cap 5.
This article only measures the interior of the problem generator; the layout line is untouched — problems per A4 sheet, font size, page margins, header fields, and pagination. The earlier article How Many Problems Fit on One A4 Sheet measured that side, so keep the two frames of reference apart. The settings panel itself lives on the Kids' Mental Math Worksheet Generator page; the same family also offers Kids' Handwriting Copybook Generator, which falls outside this article's measurement scope — every bound, ratio, and retry figure above answers for numeric worksheets only.
Q: I ticked "must carry" — why does the sheet hold no carrying problem at all?
A: At the operand-cap-5 tier that requirement simply has no feasible solution. In the measured run all four relaxation records fired — duplicates, degenerates, carry, borrow — and the 40 problems still printed in full: 0 carrying, 17 with a zero addend, 30 repeated inside the sheet. Ticking the box is not the same as collecting the guarantee.
Q: If I ask for more problems than the pool holds, will the sheet come up short?
A: Measured, no. With the count at 200 exceeding the pool capacity of 20, nothing is dropped and 0 slots stay blank; the cost converts into duplicates — 180 by the commutative-law key and 166 by the literal key. Dropped problems only appear when construction itself fails outright.
Q: Can the same settings reproduce the same worksheet?
A: Yes, provided the seed stays put. Same seed, two runs of 100 problems, 0 differing problems; changing only the ordering seed still gives 0 differences — the change lands purely on the order.