Exercise 2: Grouping the Eight Bugs by Root Cause — Possible Solution ==================================================================== CATEGORY A: FIXABLE BY ALGORITHM CHOICE (THE PROBLEM ITSELF WAS FINE) ------------------------------ Steps 1, 2, 3, 4, 6, 7, and 8 all belong here - in each case, the underlying quantity being computed (whether two sensors sum to a reference value, a daily total, a rate of change, a variance, a set-point, a blended output, or a trajectory) was not itself sensitive to small input changes. What was actually broken was the specific sequence of arithmetic operations chosen to compute it: - Step 1: exact-equality comparison instead of tolerance comparison - Step 2: round-half-up instead of round-half-to-even - Step 3: too-small a step size triggering cancellation - Step 4: the naive one-pass variance formula instead of two-pass - Step 6: no iteration cap/fallback on Newton's method - Step 7: no row pivoting during Gaussian elimination - Step 8: a fixed grid instead of an adaptive one In every one of these cases, this chapter verified that switching to a different, better-chosen algorithm or formula for the SAME underlying problem produced a dramatically more reliable result - exactly Chapter 5's definition of a stability problem, fixable because the algorithm, not the problem, was where the trouble lived. CATEGORY B: NOT FIXABLE BY ALGORITHM CHOICE ALONE ------------------------------ Step 5 stands alone in this category. This chapter's own diagnosis verified, using Chapter 6's exact-arithmetic experiment, that the dual-sensor system's own condition number (~40,000) reflects a genuine property of the two sensors' near-redundant relationship, not a property of any particular solving algorithm. No reformulation of the arithmetic changes how close to parallel the two sensors' equations are - this is exactly Chapter 6's ill-conditioning category, where the sensitivity belongs to the problem itself and persists no matter which correct algorithm is used to solve it. WHY THIS GROUPING MATTERS ------------------------------ The distinction determines what kind of fix is even worth attempting. For every bug in Category A, more engineering effort on the algorithm genuinely pays off, and this chapter demonstrated a specific, verified fix for each one. For Step 5, in Category B, further algorithmic effort would be wasted - the honest, correct response documented in this chapter was to measure and report the condition number and recommend a hardware change, not to keep searching for a smarter solver. WHY THIS WORKS AS AN ANSWER ------------------------------ The grouping correctly places seven bugs in the algorithm-fixable category and isolates Step 5 as the one genuine exception, justifying each placement by tying back to this course's own established stability-vs-conditioning distinction (Chapters 5 and 6) rather than grouping by surface similarity alone.