Scientific Computing and Reproducible Workflows, TMP-SCI-204. These are mathematical explanations and author observations, not learner execution evidence. Accept equivalent exact forms and valid reasoning. Keep a learner's first attempt and revision distinguishable. A copied program result without an explanation does not establish the invariant or model assumptions.
Quiz: five 6-point tasks, 30 total. Project: five 8-point tasks, 40 total. These are separate formative groups, not validated course grades or a certification. No pass threshold has been calibrated. Q5 reserves one point for actual execution; P2 reserves five. Trace-only work can earn conceptual and communication credit but not those execution points.
Readiness
R1
The first qualifying reading is 15, fourth in one-based position and index 3 in Python. The following 13 also qualifies but is not first. A result of 4 as a Python index confuses the indexing convention. A result of 13 confuses the first hit with the last hit. A result of index 0 after sorting is answering a changed question rather than the original one.
R2
Initial width is 2-1=1. Three halvings leave width 1/8. The furthest possible point in the retained interval is an endpoint, 1/16 from its midpoint. The error bound is half the final width, not the full width. This reasoning needs an established enclosure of the desired point; arbitrarily shrinking an interval that does not contain it proves nothing.
R3
At 1, residual is 1+2-5=-2. At 2, it is 4+4-5=3. One negative and one positive value are the first numerical ingredients of a bracket. Continuity on the whole interval is additionally needed for the root-existence conclusion. The supplied polynomial has that property.
R4
Need the requested tolerance, the returned bracket/candidate, a justified error certificate, the numerical stopping reason and the assumptions under which the certificate holds. A work-budget stop may be safe termination without numerical convergence. A successful process exit can also mean only that a report, including failed numerical cases, was written successfully.
Guided practice
G1
Threshold 12: index 3, value 15, four comparisons. Threshold 15: the same result because equality qualifies. Threshold 16: no hit, five comparisons. Before testing index i, all earlier readings have been checked and failed the threshold rule. That makes the first positive test the earliest qualifying observation in the original sequence.
Sorting changes the observation order. A sorted first qualifying value might be the smallest qualifying magnitude, but it is not necessarily the first recorded occurrence. The invariant is tied to the original task. The companion validates all entries before searching, so comparison counts are not a complete measure of data access or runtime.
G2
The residual signs are -2 and +3. The polynomial is defined and continuous on [1,2], so at least one root lies there. For y>x>=0, (y-x)(y+x+2)>0, proving strict increase and hence at most one root. Together these establish exactly one.
On [2,3], residuals are 3 and 10, both positive. Because this particular model is increasing throughout that interval, the response remains above target there. This is not an acceptable bracket for target 5, but the previously established root in [1,2] still exists. Distinguish “not enclosed by this interval” from “does not exist anywhere,” and distinguish the fixed model's monotonicity from a generic sign test.
G3
First midpoint 3/2 has residual (9/4)+3-5=1/4>0, so the increasing response reaches target earlier; retain [1,3/2]. Second midpoint 5/4 has residual 25/16+5/2-5=-15/16<0, so the crossing is later; retain [5/4,3/2]. Third midpoint 11/8 has residual 121/64+11/4-5=-23/64<0; retain [11/8,3/2].
Each update preserves a nonpositive lower residual and nonnegative upper residual. A mnemonic such as “negative means move right” is insufficient without the increasing-model context. General bisection uses signs relative to a bracket endpoint, not a universal assertion that every negative residual lies before every root.
G4
Initial width W=1. To ensure midpoint error<=1/128, require 1/2^(n+1)<=1/128=1/2^7, giving n>=6. At five cuts the bound is 1/64, so six is the least guaranteed nonexact count. An exact root can be found earlier.
After four cuts, bracket [23/16,3/2] has width 1/16, midpoint 47/32 and bound 1/32. That is a valid root enclosure but does not meet 1/128. After six cuts, [23/16,93/64] has width 1/64, midpoint 185/128 and bound 1/128, which meets the request exactly. Termination follows from the finite cut budget even when it is insufficient. Convergence follows only from an exact root or a verified sufficient certificate, not from termination alone.
G5
f(1)=-2 response units. g(1)=-2×10^-12 in the scaled response convention. Multiplication by a nonzero constant preserves zeros, so both functions have the same root. Because R(1.25)=4.0625<5 and the model is increasing, the root is later than 1.25 seconds. Time 1 is therefore more than 0.25 second from it, certainly not within 10^-10 second. This is an exact bound without needing the root's decimal expansion.
The scaled residual passes the proposed small residual cutoff while the coordinate claim is grossly wrong. A residual-to-coordinate guarantee needs model sensitivity information and consistent units. The exercise does not claim residual stopping rules are always useless; it demonstrates why a bare residual magnitude is insufficient.
G6
Float stagnation: the two endpoints are adjacent representable numbers in the checked environment. Their arithmetic midpoint rounds to the lower endpoint. Updating that endpoint to the same value fails to reduce the interval, invalidating a progress argument based on exact halving. A positive finite iteration cap still guarantees program termination but not requested accuracy. Detect the lack of a strict interior midpoint and report it honestly.
For h(t)=1/(t-1), h(0)=-1 and h(2)=1, but the function is undefined at 1 and never equals zero. The continuity/defined-domain condition fails. For k(t)=(t-1)^2, k(0)=k(2)=1 while k(1)=0. Opposite signs are a useful sufficient bracketing condition for a continuous function, not a necessary condition for a root to exist. Neither counterexample is supported by the companion's fixed polynomial interface, and the learner should not relabel it as a general solver.
Independent practice
I1
Index 1, value 14, after two threshold comparisons. The sequence is unsorted and need not be monotone: the later value 3 falls below the threshold again. No rule establishes that an arbitrary discarded half contains no earlier hit. Sorting would change original-order meaning. A correct early-stop invariant concerns already-tested earlier items, not a continuous curve between sample values.
I2
Need 3/2^(n+1)<=1/100. Equivalently 2^(n+1)>=300. At n=7 the bound is 3/256=0.01171875 second, too large. At n=8 it is 3/512=0.005859375 second, sufficient. Thus eight is the least guaranteed nonexact cut count. The actual bracket location does not enter this count; its initial width does. An exact-root shortcut may stop sooner.
I3
The midpoint is 2 and R(2)=4+4=8. Status is exact_root, candidate 2, error bound 0, and halving count 0. The solver evaluates endpoint and candidate conditions before deciding whether another cut is available. The budget governs interval cuts, not all arithmetic operations or function evaluations. This naming must remain explicit in a run report to avoid a false “no computation” claim.
I4
The first negative trial midpoint is 5/4. Its residual is -15/16. Incorrectly replacing the upper endpoint with it produces [1,5/4], whose residuals are both negative. The increasing model has not yet reached 5 anywhere in that retained interval, so the root has been discarded. The correct update replaces the lower endpoint and keeps [5/4,3/2]. Merely checking that interval width shrank would miss the defect; inspect signs and enclosure.
I5
One discriminating set:
- Search [1,2] for threshold 3: no hit, two comparisons. This checks an exhausted finite list without confusing no-hit with index zero.
- Solve target 8 on [1,3] with positive tight tolerance and zero cuts: exact root 2, zero bound. This checks shortcut semantics.
- Solve target 5 on [1,2], tolerance 1/128, four cuts: budget_exhausted, bracket [23/16,3/2], bound 1/32, converged=false. It checks honest failure while preserving valid partial knowledge.
- Search [3,True] at threshold 2: ValueError, because the complete input contract is checked before returning an early hit. Boolean values must not pass as integer measurements.
Expected values must not be generated by the same helper under test. These tests exercise specified cases, not every possible input or physical model.
I6
Cut counts omit input validation, final checks, source/output writing and other overhead. Rational operations vary in cost as numerators and denominators grow. Different functions or input sizes can have different evaluation costs. One timing run also includes uncontrolled scheduling/caching noise and may compare different accuracy or failure outcomes. Half as many cuts is not automatically half the runtime.
A careful bounded comparison uses the same task, model, input, accuracy criterion, environment and correctly classified status; separately counts decision/evaluation work and measures repeated timings with a stated method. Report variability and what is included. Do not infer universal algorithmic superiority or asymptotic complexity from one example. Counting the maximum n threshold comparisons is a defensible bounded operation argument; it is not a direct wall-clock prediction.
Audit
H1
The report deliberately contains a four-cut worked case with status budget_exhausted and converged=false. Its JSON can be valid, hashes correct and file-writing process successful while the requested numerical accuracy was not attained. Distinguish transport/file integrity, algorithmic stopping status and scientific adequacy. All three can require separate evidence.
H2
Opposite signs do not guarantee a root without continuity/definedness: 1/(t-1) on [0,2] is the counterexample. Same signs do not exclude a root for every continuous function: (t-1)^2 on [0,2] has root 1. These refute the two universal statements separately. They do not undermine the correctly stated continuous sign-change theorem.
H3
The certificate bounds the distance to the root of the stipulated exact mathematical model under the interval/algorithm conditions. It does not establish that the polynomial models a real instrument, that coefficients/targets are exact measured quantities, or that observations are calibrated. Model error and input uncertainty can dominate a very small numerical bound. More cuts alone do not close those scientific gaps.
Quiz: 30 points
Q1 — 6 points
For target 7, residuals on [1,2] are 3-7=-4 and 8-7=1. Continuity establishes a root between them; the same strict-increase argument gives uniqueness. Initial width 1 with tolerance 1/256=1/2^8 requires n>=7 because midpoint bound is 1/2^(n+1). Six cuts permit only 1/128, too large.
Rubric: endpoint values/signs 2; continuity/existence 1; strict increase/uniqueness 1; seven-cut plan with half-width reasoning 2. A calculator approximation to the root does not replace the guarantee.
Q2 — 6 points
At 117/64, residual is -7/4096. At 235/128, it is 697/16384. Thus signs correctly enclose the root. Convert the lower endpoint to 234/128: width is 1/128, midpoint is (234/128+235/128)/2=469/256, and midpoint error bound is 1/256. The tolerance is met. The candidate residual is 1337/65536 response units, which is not itself the time-error bound.
Rubric: two endpoint residual signs with valid calculation 2; midpoint 1; width and half-width 2; justified status 1. A merely positive width is not evidence that the interval contains a root.
Q3 — 6 points
R(1)-7=3-7=-4, so the scaled residual is -4×10^-12, with magnitude below 10^-10. Scaling by a nonzero constant leaves roots unchanged. R(1.5)=2.25+3=5.25<7; therefore the root is later than 1.5 seconds and time 1 is more than half a second away. The claimed 10^-10-second accuracy is false despite the small scaled residual.
Rubric: unscaled/scaled values 2; roots unchanged 1; independently demonstrated time-error gap 2; explanation of sensitivity/units versus a raw residual cutoff 1. Do not convert response units directly into seconds without a justified relation.
Q4 — 6 points
After six cuts the bracket is [117/64,59/32], midpoint 235/128, bound 1/128. For the requested 1/256, status is budget_exhausted and converged=false. The interval still provides useful partial knowledge. If a float midpoint equals an endpoint, updating to that same endpoint cannot shrink the bracket. Report non-progress/stagnation when the target is unmet; neither repeating unchanged updates nor labelling them converged is acceptable.
Rubric: insufficient six-cut certificate 2; correct status/partial-knowledge distinction 2; float non-progress diagnosis and honest response 2. A finite iteration cap alone prevents an endless loop but does not establish accuracy.
Q5 — 6 points
A suitable comparison is the seven-cut versus six-cut quiz run, using identical target, initial bracket and tolerance. Predict seven-cut tolerance_met versus six-cut budget_exhausted before execution. Verify endpoint signs and the two half-width bounds independently, not only the status string. Record source/interpreter/commands, actual results or clearly labelled predictions, and a limitation such as exact fictional model assumptions or unavailable learner execution.
Rubric: predictions 1; reproducible source/command identification 1; correct numerical status/certificate comparison 1; independent discriminating test 1; limitation and truthful executed/traced status 1; authentic actual execution 1. Trace-only maximum is 5/6. An attributed author result remains an author result.
Project: 40 points
P1 — 8 points
For target 11, f(2)=8-11=-3 and f(3)=15-11=4. Continuity and increase establish a unique root in [2,3]. Width is 1. The least guaranteed nonexact count is nine: after eight, midpoint error bound 1/512 exceeds 1/1000; after nine, 1/1024 is below it. Maintain nonpositive lower residual, nonnegative upper residual and root enclosure at every cut. Each nonexact cut halves width and consumes one unit of a finite cut budget; the program returns an explicit status at the stopping check.
Rubric: signs/bracket 2; existence/uniqueness reasoning 1; budget and one-fewer comparison 2; invariant 1; termination argument 1; success criterion distinguished from termination 1.
P2 — 8 points
The returned bracket is [1261/512,631/256]=[1261/512,1262/512], width 1/512. Its midpoint is 2523/1024 and error bound 1/1024 second = 0.0009765625 second, meeting 1/1000. Lower residual is -2199/262144; upper residual is 337/65536. Candidate residual is -1703/1048576 response units. The status is tolerance_met after nine cuts, not exact_root. The candidate is not asserted to equal the root.
Actual run evidence should include your new output folder, source snapshot, environment/commands, parsed manifest and verified hashes of the known source/report. Reproduce using the saved source into another new folder. Report bytes should match under the same checked conditions; paths/invocation metadata can differ. A successful write does not replace the independent sign/bound checks.
Rubric: correct predicted midpoint/certificate 2; provenance/comparison plan 1; authentic first execution 2; authentic repeat-from-source execution 2; actually verified hashes/report comparison 1. The last five points require execution; trace-only maximum is 3/8. Do not award them for a proposed plan or copied author evidence.
P3 — 8 points
The bracket alone straddles 2.464: 1261/512=2.462890625<2.464<2.46484375=631/256. It cannot decide whether the model crossing is strictly before that threshold. Meeting an error tolerance is not automatically enough for a nearby decision.
Use t=308/125. The exact residual is (308/125)^2+2(308/125)-11 = (94864+77000-171875)/15625 = -11/15625 response units. It is negative, so the strictly increasing response has not reached target at 2.464. The unique crossing is strictly later. Therefore the answer to “strictly before 2.464?” is no under this exact model. This decision follows from evaluating a specified threshold, not from pretending the earlier bracket was narrower than it was.
Rubric: bracket-alone limitation 2; exact threshold substitution/arithmetic 3; monotonicity-based later/not-before conclusion 2; distinction between root approximation and direct decision 1. No more bisection is required for this exact decision. A changed or uncertain physical model would require further scientific evidence.
P4 — 8 points
For target 11, nine cuts meet the 1/1000 time tolerance; eight leave bound 1/512 and budget_exhausted. Target 8 on [1,3] provides exact midpoint 2 with zero cuts. The adjacent-float demonstration has no distinct interior midpoint and cannot establish a tighter requested bound by repeating unchanged endpoints. Test each expected status with independently checked numerical conditions, not just a message string.
For an arbitrary new function, recheck domain/definedness, continuity, existence of a sign bracket, any uniqueness/first-crossing claims, evaluation error and stopping/progress logic. The fixed solver has no arbitrary-function input and must not be silently presented as if it validates those facts. A test with an unbracketed target should be rejected rather than accepted under a larger tolerance.
Rubric: sufficient/insufficient budget comparison 2; exact-root shortcut 1; stagnation diagnosis 1; independent status tests 2; new-model assumptions and interface limits 2.
P5 — 8 points
Example report within the requested word range; replace the evidence clause with your true status:
The fictional model R(t)=t²+2t, evaluated with time in seconds and its stated response-unit coefficients, reaches target 11 once on [2,3]. Exact rational bisection with nine interval cuts returns candidate 2523/1024 seconds and bracket [1261/512,631/256]. The enclosing half-width is 1/1024 second, meeting the requested 1/1000-second numerical error bound; status is tolerance_met, not an exact root. That bracket alone straddles the separate 2.464-second decision threshold. Direct exact substitution at 308/125 gives residual -11/15625 response units. Because the model is increasing, the crossing occurs strictly later than the threshold, so it is not strictly before 2.464 seconds. This account is a mathematical trace, not my execution record. A completed computational submission would preserve my source snapshot, interpreter, commands, actual outputs and verified hashes, then reproduce into a new directory. The certificate concerns the exact supplied polynomial, not a real instrument's calibration or uncertain measurements. More numerical refinement would not by itself establish that the physical system follows this model.
Rubric: model/domain/units 1; candidate and bracket/certificate 2; truthful stopping status 1; threshold decision and reason 1; true executed/traced status 1; recoverable evidence description 1; scientific limitation 1. Communication points do not replace P2's execution-only credit.
Delayed transfer
D1
Sorted order supplies information absent from I1. Compare the sought value 8 with the middle item, which is 8, so this case ends immediately with a match. More generally, if the middle item is smaller than the target, every item at or before it is also smaller; that half can be discarded. If larger, every item at or after it is larger. Maintain the invariant that any matching index, if one exists, remains inside the current candidate index interval. Stop on equality or when that interval is empty. Each unsuccessful comparison must remove at least the middle item, giving finite progress.
This discrete task asks for an exact value in a sorted finite list. It does not need continuity, a real-valued sign bracket or a midpoint time-error certificate. If duplicate matches matter, “any match” and “first match” are different contracts that need distinct handling. Do not silently promise first occurrence from a generic exact-match search.
D2
With continuity and an opposite-sign bracket, a properly implemented sign-based bisection can preserve an interval containing at least one root. It need not preserve every root or identify a particular one. Uniqueness and first-crossing claims are unavailable without further assumptions. For example, (t-1)(t-2)(t-3) on [0,4] has opposite endpoint signs and roots 1,2,3. Its midpoint 2 is a root but not the first one. Our supplied increasing-model solver cannot be reused unchanged as a validator for this new function. State which root-selection question is actually intended and obtain the conditions needed for that question.
Feedback and evidence limits
When a learner's answer fails, distinguish the error: wrong task/order, lost invariant, invalid bracket assumptions, insufficient work budget, floating-point non-progress, confusing residual with coordinate error, or overstating model truth. Correcting only the final decimal may leave the reasoning defective. Ask for an independent counterexample or changed-target test and retain the original attempt. Internal mathematical/program review is not competent human moderation, learner calibration or assistive-technology validation. No accreditation, credit or complete-semester inference follows.