This key checks the supplied fictional model. Matching it is not empirical validation. Equivalent reasoning, equivalent reduced fractions and clearly labeled reasonable decimal rounding are acceptable. Decimal answers should retain enough digits to distinguish the grids. Do not penalize a learner for retaining exact fractions. A conceptual trace earns conceptual credit only. The quiz and project are separate formative groups, not a certification or a calibrated pass threshold.
Readiness
R1
h = T/N = 3/6 = 1/2 minute. Step 4 occurs at 4 × 1/2 = 2 minutes. Six transfers require seven states, with indices 0 through 6. The factor kh = (2/3 per minute)(1/2 minute) = 1/3 has no units: the minute in the denominator cancels the minute in h. It is the proposed fraction of the current A mass transferred in one step, not a mass itself. Confusing six states with six steps omits an endpoint; writing kh in grams confuses a fraction with its application to A.
R2
(3/4)^2 = 9/16. (-1/2)^3 = -1/8 because three negative factors have negative product. Two negative factors have positive product, so a recurrence with a negative multiplier can have a negative intermediate value and a positive next value. For example, 8 multiplied successively by -1/2 gives -4 and 2. An endpoint-only check cannot certify a path property such as nonnegativity at every recorded time.
R3
kh = (1/4)(2) = 1/2, and the transfer from the old A is 10 g. New A = 20-10 = 10 g; new B = 5+10 = 15 g. The total remains 25 g. Calculating the addition from new A would add only 5 g and produce a false total of 20 g. The total is an immediate diagnostic of that particular bug. Both container values matter even when the total happens to match.
R4
A conserved recorded total is supported by examining or independently verifying A_j+B_j at every step. Correct implementation of the recurrence needs stronger evidence, such as an independently computed power formula, known state values and tests that would reject plausible wrong updates. Physical predictive adequacy requires relevant observations, justified parameter measurement and a domain-appropriate comparison with the intended apparatus. This lab supplies fictional inputs and numerical checks, not those empirical observations. A hash confirms neither any of these scientific claims nor authorship.
Guided work
G1
The worked inputs are initial masses 64 g and 16 g, constant k = 1/2 per minute, duration T = 2 minutes and base N = 2 steps. The output is the state sequence through 2 minutes and diagnostics for 2, 4 and 8 equal steps. The model assumes a closed pair, one-way transfer, rate proportional to current A with constant k, and no capacity limit or delay. Other relevant assumptions include no conversion or loss and nonnegative initial masses. These are stated masses because the input units are grams; no volumes are supplied. Concentrations cannot be summed to obtain conserved grams.
G2
h = 1 minute and q = 1/2. At time 0, A = 64, B = 16, total = 80 g. The first transfer is (1/2)(1)(64) = 32 g. At time 1, A = 32, B = 48, total = 80 g. The next transfer uses the new step's beginning A = 32, so it is 16 g, not 32 g again. At time 2, A = 16, B = 64, total = 80 g. Constant k means the same fraction per equal step, not the same transferred mass. Both the sequence and the totals should be checked.
G3
The incorrect procedure first produces A = 32 but adds (1/2)(1)(32) = 16 to old B = 16. Its next pair is therefore (32,32), total 64 rather than 80. An assertion such as next_a + next_b == old_a + old_b catches this error in exact rational arithmetic. However, the swapped correct pair (48,32) still totals 80. Assertions about both known values, the one-way direction, or the direct formula for A are needed to expose that different mistake. No single convenient invariant should be mistaken for a complete specification.
G4
For kh = 1/2, q = 1/2: a positive A halves each step, remains nonnegative and never increases. For kh = 1, q = 0: A becomes zero after one step and stays there. Both satisfy the sufficient nonnegativity condition.
For kh = 3/2, q = -1/2: signs alternate with decreasing magnitudes. For kh = 2, q = -1: signs alternate with constant magnitudes. For kh = 3, q = -2: signs alternate with increasing magnitudes. With A_0 > 0 all three have negative A immediately and are physically inadmissible for this mass story, although the first two do not grow in magnitude. The word “stable” alone would hide the stricter physical requirement. If A_0 = 0, the zero trajectory is a special case; it does not make a negative q generally acceptable.
G5
h = 1/2 minute, kh = 3/2 and q = -1/2. At time 0, (A,B) = (8,0). A proposed transfer of 12 g produces (-4,12) at 1/2 minute. The next computed transfer is -6 g, producing (2,6) at 1 minute. That negative transfer contradicts the intended one-way physical story; it is a diagnostic consequence, not an authorized reverse-flow mechanism. Every sum is 8 g. The first negative state occurs at step 1, and the positive endpoint does not repair it.
For N = 4, h = 1/4 minute and kh = 3/4, so q = 1/4. The sufficient condition holds. Its final A = 8(1/4)^4 = 1/32 g and B = 255/32 g. Finer admissible behavior is not retrospective validation of the invalid coarse path or proof that the model describes reality.
G6
At one step A_1 = A_0q. At two steps A_2 = A_0q^2. Repeating the same multiplier N times gives A_N = A_0q^N with q = 1-kT/N. Conservation then gives B_N = A_0+B_0-A_N. For worked N = 4, h = 1/2 minute, q = 3/4 and A_4 = 64(3/4)^4 = 81/4 g; B_4 = 80-81/4 = 239/4 g. A direct power computation checks the loop without duplicating its step-by-step implementation. It still shares the proposed model, so it cannot independently establish the model's truth for a real system.
Independent work
I1
The exact endpoint pairs for 2, 4 and 8 steps are (16,64), (81/4,239/4), and (5764801/262144,15206719/262144), in grams. The final times are all 2 minutes, and each pair sums to 80. Independently calculate them as 64(1-1/N)^N and the complement to 80; checking this formula for each intermediate j also verifies the trajectory.
The gaps in A are |81/4-16| = 17/4 and |5764801/262144-81/4| = 456385/262144. Their ratio is 1114112/456385, about 2.441. They compare two computed approximations, neither of which is known from this comparison alone to bound the mathematical target. A small gap is not automatically a small true error, and three grids are not a proof. Distinguish an actual command/output record from a correctly predicted trace.
I2
With k = 0, kh = 0, q = 1 and every transfer is zero. On every grid A remains 64 g and B remains 16 g. Both gaps are zero, and gap_ratio is null because the requested quotient has zero denominator. The reference also returns A = 64. This is a valuable exact edge-case check. It does not prove behavior for nonzero rates, demonstrate an empirically zero rate, or establish the accuracy of a different model. Reporting a ratio of 1 or claiming “infinite-order accuracy” would invent information.
I3
With A_0 = 0 in failure.json and B_0 still zero, the total is zero and every transfer is zero. On the coarse grid kh = 3/2, so positivity_condition is false, but nonnegative is true, first_negative_step is null and the endpoint is (0,0). The condition is sufficient for every nonnegative starting pair, while the observed flag checks the particular trajectory. A condition can fail without an observed violation for a degenerate start. The two flags answer different questions and should both be retained. A nonzero B_0 would also remain unchanged in this zero-A case.
I4
Both cases use h = 1 minute. For k = 2, q = -1 and the states at times 0, 1, 2 are (1,0), (-1,2), (1,0). For k = 3, q = -2 and the states are (1,0), (-2,3), (4,-3). Totals remain 1 g in both. The first is bounded oscillation in A; the second grows in magnitude and eventually even makes B negative, already at step 2 here. Neither is a physical one-way mass trajectory because A is negative at step 1. Recording only the first case's final pair would misleadingly make it look unchanged.
I5
Accept evidence of a fresh actual worked run and a separate invocation of the saved transfer_model.py against the saved input.json. Verify that run.json parses, status is complete, the four expected payloads are present, and their SHA-256 values match the manifest. Compare report.json and summary.txt byte-for-byte under the same recorded interpreter; paths in run.json need not match. The 15 named tests should pass for the unmodified supplied companion. Record command, interpreter, exit status and output rather than merely writing “tests passed.”
For an existing destination, the command must refuse rather than overwrite. Record the existing files' hashes before and after; equality supports preservation. A late failure may leave input.json and fewer later files, or an incomplete manifest. Preserve the directory and diagnose before using a new destination. A trace-only response may describe every correct check, but it must not fabricate a run, output or successful refusal. The supplied author tests are evidence about this package, not the learner's execution.
I6
Doubling both initial masses doubles every A and B state, total and absolute gap: this is a linear recurrence in the initial state. Endpoints become (32,128), (81/2,239/2), and (5764801/131072,15206719/131072); the total is 160 g. The two gaps become 17/2 and 456385/131072. Their ratio stays 1114112/456385 because numerator and denominator scale together. The reference masses and absolute reference differences also scale by two.
Increasing only B_0 by 5 g leaves A and its gaps unchanged because the transfer rule depends only on A. Every B and total increases by 5 g. Both experiments change initial conditions while retaining each grid. They are sensitivity checks, not a comparison obtained solely by shrinking timestep at fixed model inputs. These scaling results would not automatically hold for a capacity-limited or reverse-transfer model.
Claim audit
H1
The failure fixture conserves 8 g throughout but has A = -4 g at step 1. Conservation alone therefore cannot establish physical admissibility. A defensible statement is: “The recorded recurrence preserves the total mass exactly, but the coarse grid violates nonnegativity at step 1 and is inadmissible for the stated one-way mass model.” Add that a nonnegative path is still only a numerical/model check and not evidence from an actual apparatus. Do not hide the invalid state through clipping or selective endpoint reporting.
H2
Final time is N × h. Halving h while leaving N fixed changes the final time from T to T/2, so the two endpoints refer to different times. A clean refinement pair uses N and 2N steps with h and h/2 respectively; both end at T. Hold A_0, B_0, k, total duration, model equations and reported physical quantity fixed. If any of those change, identify a different study question rather than attributing the difference solely to numerical refinement.
H3
Three decreasing differences do not establish convergence over all finer grids, a rigorous error bound or a universal convergence rate. Decimal precision describes a numerical calculation, not real-world parameter certainty or model accuracy. A numerical follow-up could use more admissible same-horizon grids and an independent reference calculation with stated rounding limits, or analyze this recurrence mathematically. An empirical follow-up could compare appropriately measured A and B masses over time with predictions using independently determined rates, examining loss, reverse flow or rate changes. Neither follow-up is performed merely by rerunning fictional inputs.
Quiz rubric: 30 formative points
Q1 [6]
h = 1/2 minute and q = 1/2. Total M = 90 g. States at times 0, 1/2 and 1 minute are (81,9), (81/2,99/2), and (81/4,279/4). Transfers are 81/2 g and 81/4 g. Award 1 point for h and units, 1 for q, 2 for both changed states, 1 for the conserved total at every state, and 1 for explaining that the same old-A transfer is subtracted and added. Correct endpoints with an incorrect sequential-update explanation do not earn the final point.
Q2 [6]
For N = 4, A = 81(3/4)^4 = 6561/256 g and B = 16479/256 g. For N = 8, A = 81(7/8)^8 = 466948881/16777216 g and B = 1043000559/16777216 g. The gaps are 1377/256 g and 36967185/16777216 g. Award 2 points for each independently justified endpoint pair, 1 for the two gaps, and 1 for interpreting grams and the common one-minute horizon. A stated power formula counts as independent arithmetic reasoning; simply copying printed results does not show that method.
Q3 [6]
The A endpoints are 20.25, approximately 25.628906 and 27.832322 g. Compared with the supplied rounded reference 29.798235 g, their absolute differences are approximately 9.548235, 4.169328 and 1.965913 g. Award 2 points for the differences/trend, 2 for a bounded statement of improved agreement on these grids, 1 for rejecting a proof/error-bound claim from three grids, and 1 for rejecting real-system validation from a model reference. Do not require 50 decimal digits, and do not interpret the reference as an interval certificate.
Q4 [6]
The rational-string contract rejects "1.0" because it permits integer/fraction strings, not decimal spelling. Use "1" (or an equivalent accepted fraction such as "2/2"). JSON true is a boolean, not an accepted integer step count; use 2 for the intended coarse grid, and do not silently reinterpret true as 1. Award 2 points for each diagnosis plus correction. Award the remaining 2 for a valid-format nonphysical example such as failure.json, with kh = 3/2 and a negative first A. Format acceptance and scientific admissibility are intentionally distinct. A negative input mass would instead violate the numeric contract and is not a valid answer to the last part.
Q5 [6]
Use fresh output directories; execute the quiz fixture then invoke its saved source/input into a different directory. Require a parseable complete manifest, four expected payloads and matching hashes. Compare report and summary rather than expecting identical path-dependent manifests. Preserve partial failures, diagnose and retry into a new directory. Award 1 point each for fresh paths, correct completion/hash checks, meaningful comparisons, recovery behavior and honest evidence/interpretation. The sixth point requires actual supported execution of the run and replay; a trace-only answer has maximum 5/6. An unsupported assertion “I ran it” is not evidence. Do not substitute the author's runs for the learner's.
Project rubric: 40 formative points
P1 [8]
The contract is a closed one-way constant-rate mass transfer, in grams and minutes, over T = 4 minutes. For N = 2, h = 2 minutes and kh = 1/2, giving states (48,12), (24,36), (12,48) at 0, 2, 4 minutes. The medium endpoint is (243/16,717/16) g; the fine endpoint is (17294403/1048576,45620157/1048576) g. Each total is 60 g. For all grids 0 ≤ kh ≤ 1, which gives nonnegative A and B; inspect the state checks rather than relying only on final totals.
Award 2 for the contract/units/assumptions, 2 for the complete coarse trace, 2 for both further endpoint pairs using the power oracle, and 2 for conservation and whole-trajectory nonnegativity. A perfect total without independently checked container values is insufficient for the endpoint credit.
P2 [8]
Award 1 point for a clear, safe, new-directory plan; 1 for explaining manifest/path differences and meaningful output comparison; and 1 for an honest, readable execution status and recovery description. These three points are accessible to a trace-only response.
The remaining five require actual evidence: 1 for a successful base project command and outputs, 1 for a genuine saved-source/saved-input replay, 1 for matching payload hashes in both runs, 1 for equal report/summary pairs, and 1 for the actual 15-test result with command/exit evidence. Each claim needs its own support; a completed run does not automatically establish a replay. A manifest carries invocation paths and interpreter information, so manifests may differ despite equal scientific output. An existing directory refusal and unchanged hashes are useful additional evidence but do not replace required computation.
P3 [8]
With k = 1/8 per minute and unchanged T = 4, kT = 1/2. The respective multipliers are 3/4, 7/8 and 15/16. Exact A endpoints are 27 g, 7203/256 g (approximately 28.136719), and 7688671875/268435456 g (approximately 28.642535). Each B is 60 minus A: 33, 8157/256 and 8417455485/268435456 g. Each A exceeds the corresponding base-project A, consistent with slower transfer under the stated model. The continuous reference is approximately 29.113472 g, but this is supplementary, not needed to justify the comparisons.
Award 2 for a separately named changed packet and unchanged comparison inputs, 3 for the three correctly derived A endpoints, 1 for the matching-grid direction and physical explanation, and 2 for distinguishing parameter sensitivity from refinement. You may additionally compare grids within the changed-rate study, but the base-versus-halved-rate difference itself is not a discretization-error estimate. Correct predictions can earn these conceptual points without execution; label them accordingly.
P4 [8]
The exact base-project gaps are 51/16 g and 1369155/1048576 g. The gap ratio equals the worked ratio 1114112/456385 because kT is the same and A_0 scales from 64 to 48. The three A endpoints are 12, 15.1875 and approximately 16.493228 g. Relative to the rounded reference approximately 17.658213 g, absolute differences are approximately 5.658213, 2.470713 and 1.164985 g.
Award 2 for exact gaps, 2 for reference comparisons, 2 for a careful same-model/same-horizon interpretation, and 2 for limitations. A suitable conclusion is: “All three trajectories preserve total and remain nonnegative; for these three grids, smaller timesteps improve agreement with the supplied continuous-model reference.” It is not a rigorous bound, convergence proof, parameter uncertainty estimate or real-system validation. Conservation can hold on invalid paths, and decreasing grid gaps do not settle empirical assumptions.
P5 [8]
A useful limitations note names a concrete failed assumption, such as material leaking from the pair or a transfer rate changing as B fills. Those would require different equations or parameters rather than just more printed digits. A next check could measure both masses over time, independently estimate k, record instrument uncertainty and test whether total mass actually stays fixed, without claiming that this unit supplies such observations.
Award 2 for a specific assumption and its consequence, 2 for separating implementation checks, numerical approximation and empirical validity, 2 for a concrete relevant follow-up, and 2 for recovery/readability and honest execution status. For interruption: preserve the incomplete output, validate the manifest and each listed payload, identify the missing/corrupt stage, correct the cause and choose a new directory. Never fill in missing evidence with predicted output or merely rename an incomplete folder. An accessible report includes labels, units, meaningful fractions/decimals and text explanations, not only a coloured plot.
Delayed transfer
D1
Let outgoing-from-A transfer be u = khA_j and returning-from-B transfer be v = rhB_j, both calculated from the old state. Then A_(j+1) = A_j-u+v and B_(j+1) = B_j+u-v. Adding still cancels both transfers. Rewriting gives A_next = (1-kh)A_j+rhB_j and B_next = khA_j+(1-rh)B_j. For nonnegative k, r and h, the sufficient conditions kh ≤ 1 and rh ≤ 1 make all four coefficients nonnegative, guaranteeing nonnegative next states for every nonnegative start. No combined kh+rh ≤ 1 restriction is required for this sufficient coefficient argument.
The old five-field runner has no r and no reverse transfer. Adding an extra field is rejected; changing the title is not implementation. A valid extension needs a new explicit contract, equations, independent oracles and edge tests, including r = 0 recovery of the current model. The current unit does not claim to supply that extension.
D2
If A is 2 g/L in 3 L, its mass is 6 g. If B is 1 g/L in 5 L, its mass is 5 g. Total mass is 11 g, not the sum 3 g/L of the concentrations. If the contents could be fully mixed with volumes adding, the combined concentration would be 11/8 g/L, but that is an additional mixing interpretation, not a mass sum. A new model needs volumes, concentration-to-mass conversion, information about volume changes and precisely what flows.
The mass-only companion conserves A+B in grams. Relabeling A and B as concentrations while using different volumes would apply the wrong invariant and wrong physical interpretation. New variable definitions and a dimensional check come before a new loop or plot. The numeric recurrence might still run after relabeling, which demonstrates why successful execution does not establish correct scientific meaning.