Correctness of the exact Levinson-Durbin algorithm full
This proof shows: correctness, termination.
We prove that LEVINSON returns the solution of Tx=c when every leading principal minor Δ1,…,Δn of T is nonzero, and that it fails exactly when one of them is zero. Notation is as on the main page: K is a field, indices start at 0, T=(ti−j) is n×n, Tk is its leading k×k submatrix, Δk=detTk with Δ0=1, and e1,…,ek are the unit vectors of Kk.
Termination. The loop on line L4 runs n−1 times, and each pass does a fixed number of inner products of length at most n. So the algorithm stops after finitely many steps, either at line L9 or at one of the failures on lines L2 and L6.
Lemma 1 (shift structure). Rows 0,…,k−1 and columns 0,…,k−1 of Tk+1 form Tk, and so do rows 1,…,k and columns 1,…,k, because the entry in row i and column j depends only on i−j. Likewise, deleting row 0 and column 0 of Tk leaves Tk−1, and so does deleting row k−1 and column k−1.
Lemma 2 (padded vectors). Let u∈Kk and let Tku=y. Then
Tk+1(u,0)=(y,j<k∑tk−juj),Tk+1(0,u)=(j<k∑t−1−juj,y). Proof. In (u,0) only columns 0,…,k−1 of Tk+1 are used. By Lemma 1 rows 0,…,k−1 give Tku=y, and row k has entries tk−j in column j. In (0,u), uj sits in column j+1. Rows 1,…,k restricted to columns 1,…,k form Tk by Lemma 1 and give y, and row 0 has entry t0−(j+1)=t−1−j in column j+1. □
Invariant. At the test of line L4 with loop value k (1≤k≤n, with k=n meaning the loop exits), Δ1,…,Δk are nonzero and
Tkf=e1,Tkg=ek,Tkx=(c0,…,ck−1). Initialization. Line L2 passes only if Δ1=t0=0, and line L3 sets f=g=(1/t0) and x=(c0/t0), which satisfy the three equations for T1=(t0).
Maintenance. Assume the invariant for some k<n. With εf, εg, εx from line L5, Lemma 2 gives
Tk+1(f,0)=e1+εfek+1,Tk+1(0,g)=εge1+ek+1,Tk+1(x,0)=(c0,…,ck−1,εx), where now e1 and ek+1 are unit vectors of Kk+1.
Lemma 3. d=1−εfεg=Δk−1Δk+1/Δk2.
Proof. By Cramer's rule, the first entry of f=Tk−1e1 is f0=det(Tk without row 0 and column 0)/Δk, and the last entry of g=Tk−1ek is gk−1=det(Tk without row k−1 and column k−1)/Δk. By Lemma 1 both deleted matrices are Tk−1, so f0=gk−1=Δk−1/Δk; for k=1 this reads 1/t0, as it should.
Let P be the (k+1)×(k+1) matrix whose column 0 is (f,0), whose column k is (0,g), and whose other columns are the unit vectors e2,…,ek in their own places. P differs from the identity only in columns 0 and k, so expanding along the identity columns, detP equals the 2×2 determinant of rows 0 and k of these two columns:
detP=det(f000gk−1)=f0gk−1. Now compute det(Tk+1P). Its column 0 is e1+εfek+1, its column k is εge1+ek+1, and its columns 1,…,k−1 are the columns a1,…,ak−1 of Tk+1. Subtracting εf times column k from column 0 does not change the determinant and makes column 0 equal to (1−εfεg)e1=de1. By linearity in column 0 and then in column k,
det(Tk+1P)=ddet(e1,a1,…,ak−1,εge1+ek+1)=ddet(e1,a1,…,ak−1,ek+1), because the term with εge1 has two equal columns. Expanding along the unit columns e1 and ek+1 leaves the submatrix of Tk+1 in rows 1,…,k−1 and columns 1,…,k−1, which is Tk−1 by Lemma 1. Hence det(Tk+1P)=dΔk−1, and det(Tk+1P)=Δk+1detP gives
Δk+1Δk2Δk−12=dΔk−1. Since Δk−1=0 (it is Δ0=1 or one of the minors in the invariant), dividing by Δk−1 gives the claim. □
So, since Δk−1 and Δk are nonzero, line L6 fails exactly when Δk+1=0, and that is a correct report. Otherwise d=0 and Δk+1=0. Line L7 computes both new vectors from the old f and g:
Tk+1f′=d(e1+εfek+1)−εf(εge1+ek+1)=d(1−εfεg)e1=e1, Tk+1g′=d(εge1+ek+1)−εg(e1+εfek+1)=d(1−εfεg)ek+1=ek+1. Line L8 sets x′=(x,0)+(ck−εx)g′, so
Tk+1x′=(c0,…,ck−1,εx)+(ck−εx)ek+1=(c0,…,ck−1,ck). So the invariant holds for k+1.
Conclusion. If Δ1,…,Δn are all nonzero, line L2 passes and, by Lemma 3, line L6 never fails. The loop ends with the invariant for k=n, so Tx=Tnx=c, and since T is nonsingular this x is the unique solution. If some leading minor is zero, let Δm be the first one. If m=1, line L2 fails. If m≥2, the invariant holds up to k=m−1, and at that pass Lemma 3 gives d=Δm−2Δm/Δm−12=0, so line L6 fails. In both cases the report "some leading principal minor is zero" is correct, and the algorithm never fails when all of them are nonzero. For n=0, line L1 returns the empty vector, which is the solution of the empty system. ■