tinycodinglm / math /math-0164.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 16)
d517dc9 verified
|
Raw History Blame Contribute Delete
1.01 kB
{"type": "session", "harness": "opencode", "id": "math-0164", "name": "Gaussian Elimination"}
{"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}}
{"type": "message", "message": {"role": "user", "content": "Explain Gaussian elimination"}}
{"type": "message", "message": {"role": "assistant", "content": "Solve Ax=b in O(n^3).\n\n1. Forward elimination: for each column, find pivot (largest abs for stability), swap rows, eliminate below.\n2. Back substitution: solve from last row upward.\n\nPartial pivoting: largest |A_{kk}| in column. Prevents div-by-zero, reduces error.\nFor determinant: elimination to upper triangular, det = product of diagonal (sign from swaps).\nFor inverse: [A|I] -> [I|A^{-1}] via elimination.\n\nModular: use modular inverse for division. Works over any field.\nO(n^3) time, O(n^2) space. Sparse matrices use iterative methods.\n\nApplications: solve equations, matrix rank, 2-SAT, inverse mod prime, determinant."}}