Algorithm Search⌘K

Proofs: Levinson-Durbin algorithm

These are the human proofs of Levinson-Durbin algorithm, at full length.

Correctness of the exact Levinson-Durbin algorithm full

This proof shows: correctness, termination.

We prove that LEVINSON returns the solution of Tx=cT x = c when every leading principal minor Δ1,…,Δn\Delta_1, \ldots, \Delta_n of TT is nonzero, and that it fails exactly when one of them is zero. Notation is as on the main page: KK is a field, indices start at 00, T=(ti−j)T = (t_{i - j}) is n×nn \times n, TkT_k is its leading k×kk \times k submatrix, Δk=det⁡Tk\Delta_k = \det T_k with Δ0=1\Delta_0 = 1, and e1,…,eke_1, \ldots, e_k are the unit vectors of KkK^k.

Termination. The loop on line L4 runs n−1n - 1 times, and each pass does a fixed number of inner products of length at most nn. 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−10, \ldots, k - 1 and columns 0,…,k−10, \ldots, k - 1 of Tk+1T_{k+1} form TkT_k, and so do rows 1,…,k1, \ldots, k and columns 1,…,k1, \ldots, k, because the entry in row ii and column jj depends only on i−ji - j. Likewise, deleting row 00 and column 00 of TkT_k leaves Tk−1T_{k-1}, and so does deleting row k−1k - 1 and column k−1k - 1.

Lemma 2 (padded vectors). Let u∈Kku \in K^k and let Tku=yT_k u = y. Then

Tk+1(u,0)=(y,∑j<ktk−juj),Tk+1(0,u)=(∑j<kt−1−juj,y).T_{k+1} (u, 0) = \Big(y, \sum_{j<k} t_{k-j} u_j\Big), \qquad T_{k+1} (0, u) = \Big(\sum_{j<k} t_{-1-j} u_j, y\Big).

Proof. In (u,0)(u, 0) only columns 0,…,k−10, \ldots, k - 1 of Tk+1T_{k+1} are used. By Lemma 1 rows 0,…,k−10, \ldots, k - 1 give Tku=yT_k u = y, and row kk has entries tk−jt_{k - j} in column jj. In (0,u)(0, u), uju_j sits in column j+1j + 1. Rows 1,…,k1, \ldots, k restricted to columns 1,…,k1, \ldots, k form TkT_k by Lemma 1 and give yy, and row 00 has entry t0−(j+1)=t−1−jt_{0 - (j + 1)} = t_{-1-j} in column j+1j + 1. □\square

Invariant. At the test of line L4 with loop value kk (1≤k≤n1 \le k \le n, with k=nk = n meaning the loop exits), Δ1,…,Δk\Delta_1, \ldots, \Delta_k are nonzero and

Tkf=e1,Tkg=ek,Tkx=(c0,…,ck−1).T_k f = e_1, \qquad T_k g = e_k, \qquad T_k x = (c_0, \ldots, c_{k-1}).

Initialization. Line L2 passes only if Δ1=t0≠0\Delta_1 = t_0 \ne 0, and line L3 sets f=g=(1/t0)f = g = (1/t_0) and x=(c0/t0)x = (c_0 / t_0), which satisfy the three equations for T1=(t0)T_1 = (t_0).

Maintenance. Assume the invariant for some k<nk < n. With εf\varepsilon_f, εg\varepsilon_g, εx\varepsilon_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),T_{k+1} (f, 0) = e_1 + \varepsilon_f e_{k+1}, \qquad T_{k+1} (0, g) = \varepsilon_g e_1 + e_{k+1}, \qquad T_{k+1} (x, 0) = (c_0, \ldots, c_{k-1}, \varepsilon_x),

where now e1e_1 and ek+1e_{k+1} are unit vectors of Kk+1K^{k+1}.

Lemma 3. d=1−εfεg=Δk−1Δk+1/Δk2d = 1 - \varepsilon_f \varepsilon_g = \Delta_{k-1} \Delta_{k+1} / \Delta_k^2.

Proof. By Cramer's rule, the first entry of f=Tk−1e1f = T_k^{-1} e_1 is f0=det⁡(Tk without row 0 and column 0)/Δkf_0 = \det(T_k \text{ without row } 0 \text{ and column } 0) / \Delta_k, and the last entry of g=Tk−1ekg = T_k^{-1} e_k is gk−1=det⁡(Tk without row k−1 and column k−1)/Δkg_{k-1} = \det(T_k \text{ without row } k-1 \text{ and column } k-1) / \Delta_k. By Lemma 1 both deleted matrices are Tk−1T_{k-1}, so f0=gk−1=Δk−1/Δkf_0 = g_{k-1} = \Delta_{k-1} / \Delta_k; for k=1k = 1 this reads 1/t01 / t_0, as it should.

Let PP be the (k+1)×(k+1)(k + 1) \times (k + 1) matrix whose column 00 is (f,0)(f, 0), whose column kk is (0,g)(0, g), and whose other columns are the unit vectors e2,…,eke_2, \ldots, e_k in their own places. PP differs from the identity only in columns 00 and kk, so expanding along the identity columns, det⁡P\det P equals the 2×22 \times 2 determinant of rows 00 and kk of these two columns:

det⁡P=det⁡(f000gk−1)=f0gk−1.\det P = \det \begin{pmatrix} f_0 & 0 \\ 0 & g_{k-1} \end{pmatrix} = f_0 g_{k-1}.

Now compute det⁡(Tk+1P)\det (T_{k+1} P). Its column 00 is e1+εfek+1e_1 + \varepsilon_f e_{k+1}, its column kk is εge1+ek+1\varepsilon_g e_1 + e_{k+1}, and its columns 1,…,k−11, \ldots, k - 1 are the columns a1,…,ak−1a_1, \ldots, a_{k-1} of Tk+1T_{k+1}. Subtracting εf\varepsilon_f times column kk from column 00 does not change the determinant and makes column 00 equal to (1−εfεg)e1=de1(1 - \varepsilon_f \varepsilon_g) e_1 = d e_1. By linearity in column 00 and then in column kk,

det⁡(Tk+1P)=ddet⁡(e1,a1,…,ak−1,εge1+ek+1)=ddet⁡(e1,a1,…,ak−1,ek+1),\det (T_{k+1} P) = d \det (e_1, a_1, \ldots, a_{k-1}, \varepsilon_g e_1 + e_{k+1}) = d \det (e_1, a_1, \ldots, a_{k-1}, e_{k+1}),

because the term with εge1\varepsilon_g e_1 has two equal columns. Expanding along the unit columns e1e_1 and ek+1e_{k+1} leaves the submatrix of Tk+1T_{k+1} in rows 1,…,k−11, \ldots, k - 1 and columns 1,…,k−11, \ldots, k - 1, which is Tk−1T_{k-1} by Lemma 1. Hence det⁡(Tk+1P)=dΔk−1\det (T_{k+1} P) = d \Delta_{k-1}, and det⁡(Tk+1P)=Δk+1det⁡P\det (T_{k+1} P) = \Delta_{k+1} \det P gives

Δk+1Δk−12Δk2=dΔk−1.\Delta_{k+1} \frac{\Delta_{k-1}^2}{\Delta_k^2} = d \Delta_{k-1}.

Since Δk−1≠0\Delta_{k-1} \ne 0 (it is Δ0=1\Delta_0 = 1 or one of the minors in the invariant), dividing by Δk−1\Delta_{k-1} gives the claim. □\square

So, since Δk−1\Delta_{k-1} and Δk\Delta_k are nonzero, line L6 fails exactly when Δk+1=0\Delta_{k+1} = 0, and that is a correct report. Otherwise d≠0d \ne 0 and Δk+1≠0\Delta_{k+1} \ne 0. Line L7 computes both new vectors from the old ff and gg:

Tk+1f′=(e1+εfek+1)−εf(εge1+ek+1)d=(1−εfεg)e1d=e1,T_{k+1} f' = \frac{(e_1 + \varepsilon_f e_{k+1}) - \varepsilon_f (\varepsilon_g e_1 + e_{k+1})}{d} = \frac{(1 - \varepsilon_f \varepsilon_g) e_1}{d} = e_1,
Tk+1g′=(εge1+ek+1)−εg(e1+εfek+1)d=(1−εfεg)ek+1d=ek+1.T_{k+1} g' = \frac{(\varepsilon_g e_1 + e_{k+1}) - \varepsilon_g (e_1 + \varepsilon_f e_{k+1})}{d} = \frac{(1 - \varepsilon_f \varepsilon_g) e_{k+1}}{d} = e_{k+1}.

Line L8 sets x′=(x,0)+(ck−εx)g′x' = (x, 0) + (c_k - \varepsilon_x) g', so

Tk+1x′=(c0,…,ck−1,εx)+(ck−εx)ek+1=(c0,…,ck−1,ck).T_{k+1} x' = (c_0, \ldots, c_{k-1}, \varepsilon_x) + (c_k - \varepsilon_x) e_{k+1} = (c_0, \ldots, c_{k-1}, c_k).

So the invariant holds for k+1k + 1.

Conclusion. If Δ1,…,Δn\Delta_1, \ldots, \Delta_n are all nonzero, line L2 passes and, by Lemma 3, line L6 never fails. The loop ends with the invariant for k=nk = n, so Tx=Tnx=cT x = T_n x = c, and since TT is nonsingular this xx is the unique solution. If some leading minor is zero, let Δm\Delta_m be the first one. If m=1m = 1, line L2 fails. If m≥2m \ge 2, the invariant holds up to k=m−1k = m - 1, and at that pass Lemma 3 gives d=Δm−2Δm/Δm−12=0d = \Delta_{m-2} \Delta_m / \Delta_{m-1}^2 = 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=0n = 0, line L1 returns the empty vector, which is the solution of the empty system. ■\blacksquare

Back to Levinson-Durbin algorithm