# A note on Dodgson's determinant condensation algorithm

Recently, the Dodgson's determinant condensation algorithm was revisited in many papers [College Math. Journal 42(1)(2011): 43--54, College Math. Journal 38(2)(2007): 85--95, Math Horizons 14(2)(2006): 12--15,etc.]. This method is attractive, but there also exist some shortcomings. In this paper, a symbolic algorithm and the corresponding problems are discussed to overcome these shortcomings. Numerical experiments show that this symbolic modified algorithm has highly sensitivity on initial configuration of the matrix in condensation process.

## Authors

• 4 publications
• 14 publications
• 20 publications
06/26/2018

### Scientometric analysis of Condensed Matter Physics journal

The paper is dedicated to 25th anniversary of Condensed Matter Physics j...
12/07/2021

### How do scientific papers with different levels of journals spread online? Exploring the temporal dynamics in the diffusion processes

Social media has become an important channel for publicizing academic re...
11/05/2019

### Impact Factor volatility to a single paper: A comprehensive analysis

We study how a single paper affects the Impact Factor (IF) by analyzing ...
11/05/2019

### Impact Factor volatility to a single paper: A comprehensive analysis of 11639 journals

We study how a single paper affects the Impact Factor (IF) by analyzing ...
12/13/2019

### A farewell to Professor RNDr. Věra Trnková, DrSc

This is an introduction of the volume of the journal Commentationes Math...
06/06/2019

### How a Single Paper Affects the Impact Factor: Implications for Scholarly Publishing

Because the Impact Factor (IF) is an average quantity and most journals ...
11/15/2017

### IKBT: solving closed-form Inverse Kinematics with Behavior Tree

Serial robot arms have complicated kinematic equations which must be sol...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

In this paper, we mainly consider an matrix with elements real or complex number. Its determinant is denoted by , also written . For the calculation of determinants, the Dodgson’s determinant condensation algorithm was recently revisited in many papers [1, 5, 9, 10]. This method is uncomplicated by the calculation of determinants and unique utilization of matrix condensation techniques which has promise for parallel computing architectures. However, there does not seem to be sensitivity on initial configuration of the matrix in condensation process for intermediate matrices, which effects its application.

By observing the computation process of the Dodgson’s determinant condensation algorithm, a modified symbolic algorithm with highly sensitivity to initial conditions is presented in this paper and the corresponding problems are discussed to overcome the above shortcoming.

## 2 The Dodgson’s condensation algorithm

As it is well-known, Dodgson’s condensation algorithm is also referred to as the Lewis’ method (see [1, 2, 5, 9, 10]). This algorithm is one of considerable computational simplicity, achieved by restricting itself entirely to the calculation of determinants, which usually consists of the following steps [9]:

1. Use elementary row and column operations to remove all zeros from the interior of . Here, the interior of an () matrix , or intA, is the consecutive minor that results when the first and last rows and columns of matrix are deleted.

2. Find the determinant for every four adjacent terms to form a new matrix .

3. Repeat this step to produce an matrix, and then divide each term by the corresponding entry in the interior of the original matrix , to obtain matrix .

4. Continue “condensing” the matrix down, until a single number is obtained. This final number will be .

Obviously, each iterate is a condensation of the previous iterate . In fact, we have that

###### Theorem 1.

(Dodgson’s Condensation Theorem, [10]). Let be an matrix. After successful condensations, Dodgson’s method produces the matrix

 A(n−k)=⎡⎢ ⎢ ⎢ ⎢ ⎢⎣|A1…k+1,1…k+1||A1…k+1,2…k+2|⋯|A1…k+1,n−k…n||A2…k+2,1…k+1||A2…k+2,2…k+2|⋯|A2…k+2,n−k…n|⋮⋮⋱⋮|An−k…n,1…k+1||An−k…n,2…k+2|⋯|An−k…n,n−k…n|⎤⎥ ⎥ ⎥ ⎥ ⎥⎦, (1)

whose entries are the determinants of all submatrices of , where denotes the submatrix composed of rows and columns of .

If Dodgson’s method terminates successfully, it computes the determinant of an matrix using

 2[(n−1)2+(n−2)2+⋯+12]=23n3−n2+13n≈23n3 (2)

multiplications, which has the same multiplications as the Chiò’s condensation method [4]. However, division presents Dodgson’s method with a huge drawback, if the central element of for any is null, the reduction method cannot be directly applied. Fortunately, we sometimes may, for instance, before applying the method, permutate cyclically the lines (or columns) of in such a way that the new central element turns to be a non-null element. But, as mentioned in [5], there also exist some matrices (see the following example 2) making this technology noneffective.

###### Example 2.

([5]). No combination of row or column swaps allows Dodgson’s method to compute the determinant of

 A=⎡⎢ ⎢ ⎢⎣10300−10111200201⎤⎥ ⎥ ⎥⎦, (3)

because there will always be a zero in the interior of .

## 3 Methods for overcoming the Dodgson’s drawback

In this section, we will review some new methods to overcome the above Dodgson’s problem caused by zeros in the interior of a matrix in Section 1.

Firstly, D. Leggett et al. presented a double-crossing method to solve this problem in the literature [5] whenever the non-zero element is immediately above, below, left, right, or catty-corner to the zero; that is, the non-zero element is adjacent to the zero. But if the zero appears in a block of zeros, then the double-crossing method may fail and its corresponding calculations are very complex.

Since a determinant is a continuous function on its elements, one may choose some symbolic variables to replace the zeros which occur in the interior of the matrix during the computing process and then compute and as usual. Finally, let these symbolic variables approach to zero in the matrix or , and obtain the determinant value. This technology was even used to find the inverse of a tridiagonal matrix in [3, 8]. To illustrate this method, let us firstly consider the following fourth order determinant.

###### Example 3.

. Let be the matrix of Example 2. We have one zero element in the interior, at . As set forth in the Double-Crossing Theorem [5], this affects element of , i.e.,

 A(3)=⎡⎢⎣−1331−2−22−42⎤⎥⎦→A(2)=[1?0−6].

Next, let us solve this problem by the above symbolic variables method. Let the zero element of , at , be denoted symbolically by and continue computing as usual.

 A(4)=⎡⎢ ⎢ ⎢⎣10300−1x111200201⎤⎥ ⎥ ⎥⎦→A(3)=⎡⎢⎣−1331−(x+2)−22−42⎤⎥⎦→A(2)=[1−x32x−x−6]; (4)
 A(1)=(∣∣A(2)∣∣−(x+2))=x2−x−6−(x+2)=3−x. (5)

In (4) and (5), taking the limit as approaches zero, we obtain the determinant of .

Comparing the above process with the double-crossing method, it is obvious that the symbolic method seems more simple, since it does not need new sub-matrices or determinant calculates. Specially, it preserves the general simplicity and the idea of Dodgson’s method.

However, the above method does not yield the correct result in some cases if we replace the zero entries in the interior of intermediate matrix with symbolic variables instead of changing the corresponding entries of the original matrix. For example,

###### Example 4.

([7]). Consider the following matrix

 A=⎡⎢ ⎢ ⎢⎣3−212−14413334252−1⎤⎥ ⎥ ⎥⎦. (6)

The original Dodgson’s method yields

 A(3)=⎡⎢⎣10−12−7−150139−9−11⎤⎥⎦, (7)

whose interior element, , is zero. Suppose we replace with the symbolic variable to get the matrix , i.e.,

 B(3)=⎡⎢⎣10−12−7−15x139−9−11⎤⎥⎦. (8)

And then we obtain the by applying Dodgson’s condensation to :

 B(2)=⎡⎣5x−9027x−156445−3x117−11x3⎤⎦⇒B(1)=(2674x−4712x2)/(2674x−4712x2)xx=2674−4712x.

Taking the limit as approaches zero, we have

 limx→0det(B)=limx→0(2674−4712x)=2674≠213=detA.

A very natural question is what happens for the above process. In fact, the computation of determinants differs from the literature [3, 8]. Because the inversion of a general nonsingular matrix is unique, however, the -order determinants with the same value are ubiquitous. For example, the following matrices have the same intermediate matrix (7) in the computing process of the Dodgson’s method.

 A1=⎡⎢ ⎢ ⎢⎣1−21234416334752−1⎤⎥ ⎥ ⎥⎦,A2=⎡⎢ ⎢ ⎢⎣0.259124.75−14413334252−1⎤⎥ ⎥ ⎥⎦,
 A3=⎡⎢ ⎢ ⎢⎣3−210.25−144−6333−1.25252−4.5⎤⎥ ⎥ ⎥⎦,A4=⎡⎢ ⎢ ⎢⎣−45−5−20.5−7−123−81−23.5−252−1328.25⎤⎥ ⎥ ⎥⎦,
 A5=⎡⎢ ⎢ ⎢ ⎢⎣015−8.5−102−22−7.53−3−3.5−82−5−136⎤⎥ ⎥ ⎥ ⎥⎦,A6=⎡⎢ ⎢ ⎢ ⎢ ⎢⎣0143112−1061263512−14−1256−34648−58⎤⎥ ⎥ ⎥ ⎥ ⎥⎦.

However, their determinants are not the same:

 detA1=detA2=detA3=213,detA4=5665.5,detA5=451.5,detA6=2073,

which show that there doesn’t seem to be sensitivity on initial configuration of the matrix in the Dodgson’s determinant condensation calculations, see Figure 1.

## 4 Modified Dodgson’s condensation Algorithm

To solve the above problem, there exist several tactics.

(1) Firstly, we may add a symbolic variable to an entry of the submatrix of original matrices () whose determinant leads to the zero entry of (see (7)). Continuing with Dodgson’s method, we will have the correct results, as shown below. For example, for and , we have respectively that

(i)

 ¯A1=⎡⎢ ⎢ ⎢⎣1−2123441633+x4752−1⎤⎥ ⎥ ⎥⎦⇒¯A(3)1=⎡⎢⎣[]∗20c10−12−7−154x13−x9−9−5x−11−x⎤⎥⎦⇒¯A(2)1=[10x−4510x−3945+13x39−9x]⇒¯A(1)1=852x−220x24x=213−55x;

(ii)

 ¯A4=⎡⎢ ⎢ ⎢⎣−45−5−20.5−7−1+x23−81−23.5−252−1328.25⎤⎥ ⎥ ⎥⎦⇒¯A(3)4=⎡⎢⎣10−45x−12+2x−7−15+8x−2x139−9−11⎤⎥⎦⇒¯A(2)4=[74x+1806x−78135−54x−1172−11x]⇒¯A(1)4=−11331x−490x2−2x=113312+245x.

Taking the limit as approaches zero, we have

 limx→0det(¯A1)=limx→0(213−55x)=213;limx→0det(¯A4)=limx→0(113312+245x)=5665.5.

That is to say, the symbolic modified Dodgson s algorithm is sensitivity on “initial value” in the condensation calculation process, see Figure 2.

Therefore, the sensitivity of the algorithm to “initial value” is very important in algorithm design. Next, let us look at the following specific example.

 A7=⎡⎢ ⎢ ⎢⎣1−ai1233a+bi163a+i4752−1⎤⎥ ⎥ ⎥⎦,

where the changes from to , the changes from to . The real and imaginary parts of the corresponding determinant by the symbolic modified Dodgson s algorithm are shown in Figure 3.

However, there exist also some matrices which we may replace the zero entries in the interior of intermediate matrix with symbolic variables instead of changing the determinant of original matrix by Dodgson’s method. For example,

 A=⎡⎢ ⎢ ⎢ ⎢ ⎢ ⎢⎣101010111112112−1112101010⎤⎥ ⎥ ⎥ ⎥ ⎥ ⎥⎦.

The special computing process may be not described in detail here. But which of determinants can be calculated like this is still an open problem.

(2) In addition, by the above special examples, we may see that the reason why the symbolic algorithm is successful is that the determinant is a continuous function on these symbolic variables, which makes us may evaluate its limit when these variables approximate zero. Therefore, we may also let some non-zero elements of the determinant be some corresponding symbolic variables and then make these variables approximate their real values to obtain its determinant.

To better understand this method, let us reexamine Example 4:

###### Example 5.

([6]). Computing the determinant of the following matrix

 A1=⎡⎢ ⎢ ⎢⎣1−21234416334752−1⎤⎥ ⎥ ⎥⎦. (9)

Let

 ¯A1=⎡⎢ ⎢ ⎢⎣1−21234416x34752−1⎤⎥ ⎥ ⎥⎦⇒¯A(3)1=⎡⎢⎣[]∗20c10−12−73x−2412−4x1330−7x2x−15−11⎤⎥⎦⇒¯A(2)1=[−x−42−7x−18111−22x21+6x]⇒¯A(1)1=−4(40x+93)(x−3)12−4x=40x+93.

Taking the limit as approaches , we have

 detA1=limx→3det(¯A1)=limx→3(40x+93)=213.

(3) For multiple zeros case, the implementation of the algorithm using Computer Algebra Systems (CAS) such as MAPLE, MACSYMA, MATHEMATICA, and MATLAB is also very straightforward and effective. The following two examples illustrate this case.

###### Example 6.

Consider the following fourth order determinant:

 |A|=∣∣ ∣ ∣ ∣∣1234500670089101112∣∣ ∣ ∣ ∣∣. (10)

We use four symbolic parameters , , and to avoid handling zeros, that is, we define a new determinant

 |¯¯¯¯A|=∣∣ ∣ ∣ ∣∣12345xy67zw89101112∣∣ ∣ ∣ ∣∣. (11)

The original Dodgson’s method yields

 ¯A(3)=⎡⎢⎣x−102y−3x18−4y5z−7xxw−yz8y−6w70−9z11z−10w12w−88⎤⎥⎦⇒⋯⇒¯A(1)=−24xw+184x+128w+24yz−136z−176y+16. (12)

Taking the limit as and approach zero, we have

 limx→0,y→0,z→0,w→0¯A(1)=16,

which shows that the value of the determinant (10) is 16.

Finally, when the zero appears in a block of zeros, we know that the double-crossing method may fail. However, in this case, the symbolic algorithm still succeeds, but it needs more parameters. For example, the following determinant will require nine parameters to calculate its value by Dodgson’s method.

 |A|=∣∣ ∣ ∣ ∣ ∣∣13579−2000−4−6000−8−10000−1297531∣∣ ∣ ∣ ∣ ∣∣.

Finally, let us summarize the above symbolic modified algorithm as follows:

1. Firstly, replace the elements that cause entries in the interior of matrix to be zeros with the symbolic variables (e.g., ).

2. Find the determinant for every four adjacent terms to form a new matrix .

3. Repeat this step to produce an matrix, and then divide each term by the corresponding entry in the interior of the original matrix , to obtain matrix .

4. Continue “condensing” the matrix down, until a single symbolic expression, i.e., is obtained. This final limit of this symbolic expression as symbolic variables approach the original values in matrix will be .

All in all, this symbol algorithm can work in all cases and preserve the idea of Dodgson’s method, which are also suited for implementation using Computer Algebra Systems (CAS) such as MATLAB, MACSYMA, MAPLE and MATHEMATICA.

## 5 Concluding remarks

From the above discussion, one can see that unique utilization of matrix condensation techniques yield an elegant process that has promise for parallel computing architectures. In this paper, we mainly summarize some progress on the research of Dodgson’s method, and some examples are given to clarify these corresponding problems. Numerical experiments show that the symbolic algorithm may be used to overcome the drawback of Dodgson’s method by the aid of computer algebra systems (CAS).

## References

• [1] F. F. Abeles. Dodgson condensation: The historical and mathematical development of an experiental method. Lin. Alge. Appl., 429(2):429–438, 2008.
• [2] C.L. Dodgson. Condensation of Determinants, being a new and brief method for computing their arithmetical values. Proceedings of the Royal Society of London, 15(1):150–155, 1866.
• [3] Moawwad El-Mikkawy and Abdelrahman Karawia. Inversion of general tridiagonal matrices. Appl. Math. Lett., 19(8):712–720, 2006.
• [4] L. E. Fuller and J. D. Logan. On the Evaluation of Determinants by Chiò’s Method. The Two-Year College Mathematics Journal, 6(1):8–10, 1975.
• [5] D. Leggett, J. Perry, and Torrence E. Computing determinants by double-crossing. Coll. Math. J., 42(1):43–54, 2011.
• [6] D. R. Leggett. Fraction-free methods for determinants. PhD thesis, University of Southern Mississippi, Department of Mathematics, 2011.
• [7] Deanna Leggett, John Perry, and Eve Torrence. Computing determinants by double-crossing. College Math. J., 42(1):43–54, 2011.
• [8] Hou-Biao Li, Ting-Zhu Huang, Xing-Ping Liu, and Hong Li. On the inverses of general tridiagonal matrices. Linear Algebra Appl., 433(5):965–983, 2010.
• [9] A. Rice and E. Torrence. Lewis Carroll’s condensation method for evaluating determinants. Math Horizons, 14(2):12–15, 2006.
• [10] A. Rice and E. Torrence. ”Shutting up like a telescope”: Lewis Carroll’s ”Curious” condensation method for evaluating determinants. Coll. Math. J., 38(2):85–95, 2007.