FAILURE MAP
← Case archive

FA-6051 / Linear algebra / Open access

Matrix one norm · case 01

Maximum row sum computes the infinity norm.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Maximum row sum computes the infinity norm.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return max((sum(abs(x) for x in col) for col in zip(*m)),default=0)

Unsuccessful approach: Signed column sums cancel magnitudes.

Case contract

Integer matrix/vector entries, rectangular rows, compatible multiplication dimensions, and square matrices for determinant, trace, inverse, symmetry and characteristic-polynomial operations. Rational matrix outputs are reduced Fraction strings. Return the maximum absolute column sum, with zero for an empty matrix. Exact operational definition: max((sum(abs(x) for x in col) for col in zip(*m)),default=0)

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Linear algebra results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return max((sum(abs(x) for x in row) for row in m),default=0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2], [3, 4]],)', solve(*([[1, 2], [3, 4]],)), 6)
check('fixture 2: ([[1, -5], [2, 1]],)', solve(*([[1, -5], [2, 1]],)), 6)
check('fixture 3: ([],)', solve(*([],)), 0)
check('fixture 4: ([[-3]],)', solve(*([[-3]],)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2], [3, 4]],)76Failed
fixture 2: ([[1, -5], [2, 1]],)66Passed
fixture 3: ([],)00Passed
fixture 4: ([[-3]],)33Passed

SHA-256 / ad6777a02e93f585eae407ffe32ef9a4a4a561631e820a896fa648701575c4e2

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return max((sum(x for x in col) for col in zip(*m)),default=0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2], [3, 4]],)', solve(*([[1, 2], [3, 4]],)), 6)
check('fixture 2: ([[1, -5], [2, 1]],)', solve(*([[1, -5], [2, 1]],)), 6)
check('fixture 3: ([],)', solve(*([],)), 0)
check('fixture 4: ([[-3]],)', solve(*([[-3]],)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2], [3, 4]],)66Passed
fixture 2: ([[1, -5], [2, 1]],)36Failed
fixture 3: ([],)00Passed
fixture 4: ([[-3]],)-33Failed

SHA-256 / 0014684dac77e84c61d4f58b1b216c6b5f2b33443105bb06f729362f64d4077e

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return max((sum(abs(x) for x in col) for col in zip(*m)),default=0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 2], [3, 4]],)', solve(*([[1, 2], [3, 4]],)), 6)
check('fixture 2: ([[1, -5], [2, 1]],)', solve(*([[1, -5], [2, 1]],)), 6)
check('fixture 3: ([],)', solve(*([],)), 0)
check('fixture 4: ([[-3]],)', solve(*([[-3]],)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 2], [3, 4]],)66Passed
fixture 2: ([[1, -5], [2, 1]],)66Passed
fixture 3: ([],)00Passed
fixture 4: ([[-3]],)33Passed

SHA-256 / f0d816d6da1dd1b08088b68e05778ed3cc9dbf458254e12342cc9c8bd4642648

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:56.950802+00:00.

Case digest / 51736018e5253a32fe24c72bcbcf52e1868eeda2ea7cd87feecfeaff89bec1b1