Thomas algorithm

from Wikipedia, the free encyclopedia

The Thomas algorithm (after Llewellyn Thomas ) or also tridiagonal matrix algorithm (TDMA) is a simplified form of the Gaussian elimination method , which is used to quickly solve linear systems of equations with a tridiagonal matrix .

Procedure

A tridiagonal system with n unknowns can be written as

where: and .

In matrix form the system is written as:

Examples of these matrices usually arise from the discretization of the one-dimensional Poisson equation (e.g. one-dimensional diffusion problems ) and from natural cubic spline interpolation .

For such systems, the solution can be found with the Thomas algorithm after operations: A first pass eliminates the s, then the solution is obtained with the help of a backward insertion process .

The first step is to recursively modify the coefficients as follows (the "new" modified coefficients are marked with a dash):

This is the forward pass. The solution then results from a backward insertion process:

variants

In some situations, especially in those with periodic boundary conditions , it may be that a slightly different form of the tridiagonal system has to be solved:

In matrix form:

In this case the Sherman-Morrison-Woodbury formula can be used to utilize the Thomas algorithm and avoid the additional operations of the Gaussian elimination method.

In other cases the system of equations can be block- tridiagonal, i.e. H. the elements of the above system of equations are smaller block matrices (e.g. in the two-dimensional Poisson equation ). Simplified variants of Gaussian elimination have also been developed for these cases.

Another variant of the Thomas algorithm is the Hu-Gallash algorithm, which uses a forward insertion method instead of the backward insertion method.

Derivation

Let the unknowns be . The equations to be solved are:

The second equation ( ) is now modified with the first equation as follows:

This gives:

This eliminated from the second equation. Using an analogous procedure, the modified second and third equations result:

Now has been eliminated. If this procedure is repeated up to the -th line, the modified -th equation contains only one unknown. This equation is now solved and the result used to solve the -th equation. This continues until all unknowns are known.

Understandably, the coefficients get more complicated with each step when they are explicitly represented. However, the coefficients can also be represented recursively:

In order to further accelerate the solution process, it is divided out (if ). The new coefficients are:

This gives:

The last equation contains only one unknown. Finding them reduces the number of unknowns in the penultimate equation to one so that this backward insertion method can be used to determine all of the unknowns.

Individual evidence

  • Conte, SD, and deBoor, C .: Elementary Numerical Analysis . McGraw-Hill, New York., 1972.