Benchmark AI / Public workspace

SciCode / 4 / IncomChol

Problem

Answer published by the source. Consult the official source to check your work against its answer.

problem background main

Background: An incomplete Cholesky factorization provides a sparse approximation of the Cholesky factorization for a symmetric positive definite matrix. This factorization is commonly employed as a preconditioner for iterative algorithms such as the conjugate gradient method. In the Cholesky factorization of a positive definite matrix AA, we have $A = LL*$, where LL is a lower triangular matrix. The incomplete Cholesky factorization yields a sparse lower triangular matrix KK that closely approximates LL. The corresponding preconditioner is $KK*$. A popular approach to find the matrix KK is to adapt the algorithm for the exact Cholesky decomposition, ensuring that KK retains the same sparsity pattern as AA (any zero entry in AA leads to a zero entry in KK). This method produces an incomplete Cholesky factorization that is as sparse as matrix AA. For ii from 11 to NN : Lii=(aiik=1i1Lik2)12 L_{i i}=\left(a_{i i}-\sum_{k=1}^{i-1} L_{i k}^2\right)^{\frac{1}{2}} For jj from i+1i+1 to NN : Lji=1Lii(ajik=1i1LikLjk) L_{j i}=\frac{1}{L_{i i}}\left(a_{j i}-\sum_{k=1}^{i-1} L_{i k} L_{j k}\right)
Plain-text mathematical notation (without MathML)
Background:
An incomplete Cholesky factorization provides a sparse approximation of the Cholesky factorization for a symmetric positive definite matrix. This factorization is commonly employed as a preconditioner for iterative algorithms such as the conjugate gradient method.

In the Cholesky factorization of a positive definite matrix A, we have $A = LL*$, where L is a lower triangular matrix. The incomplete Cholesky factorization yields a sparse lower triangular matrix K that closely approximates L. The corresponding preconditioner is $KK*$.

A popular approach to find the matrix K is to adapt the algorithm for the exact Cholesky decomposition, ensuring that K retains the same sparsity pattern as A (any zero entry in A leads to a zero entry in K). This method produces an incomplete Cholesky factorization that is as sparse as matrix A.

For i from 1 to N :
L_(ii)=(a_(ii)−∑_(k=1)^(i−1)L_(ik)²)^((1)/(2))

For j from i+1 to N :
L_(ji)=(1)/(L_(ii))(a_(ji)−∑_(k=1)^(i−1)L_(ik)L_(jk))
Original LaTeX notation
Background:
An incomplete Cholesky factorization provides a sparse approximation of the Cholesky factorization for a symmetric positive definite matrix. This factorization is commonly employed as a preconditioner for iterative algorithms such as the conjugate gradient method.

In the Cholesky factorization of a positive definite matrix $A$, we have $A = LL*$, where $L$ is a lower triangular matrix. The incomplete Cholesky factorization yields a sparse lower triangular matrix $K$ that closely approximates $L$. The corresponding preconditioner is $KK*$.

A popular approach to find the matrix $K$ is to adapt the algorithm for the exact Cholesky decomposition, ensuring that $K$ retains the same sparsity pattern as $A$ (any zero entry in $A$ leads to a zero entry in $K$). This method produces an incomplete Cholesky factorization that is as sparse as matrix $A$.

For $i$ from $1$ to $N$ :
$$
L_{i i}=\left(a_{i i}-\sum_{k=1}^{i-1} L_{i k}^2\right)^{\frac{1}{2}}
$$

For $j$ from $i+1$ to $N$ :
$$
L_{j i}=\frac{1}{L_{i i}}\left(a_{j i}-\sum_{k=1}^{i-1} L_{i k} L_{j k}\right)
$$

problem description main

Create a function to compute the incomplete Cholesky factorization of an input matrix.

problem io

"""
Inputs:
A : Matrix, 2d array M * M

Outputs:
A : Matrix, 2d array M * M
"""

problem name

IncomChol

required dependencies

import numpy as np

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import