Algorithm Search⌘K

Proofs: Vincent-Collins-Akritas algorithm

These are the human proofs of Vincent-Collins-Akritas algorithm, at full length.

The Vincent-Collins-Akritas method isolates every real root exactly once full

This proof shows: correctness.

Let f=∑i=0nfixi∈Z[x]f = \sum_{i=0}^{n} f_i x^i \in \mathbb{Z}[x] be square-free with n≥1n \ge 1 and fn≠0f_n \ne 0. For a polynomial pp of degree at most nn and real a≠ba \ne b write Ta,b p(y)=(y+1)np((ay+b)/(y+1))T_{a,b}\,p(y) = (y + 1)^n p((ay + b)/(y + 1)), and write Var⁡\operatorname{Var} for the number of sign changes in a coefficient list, zeros ignored. The algorithm is the one in the main pseudocode, lines L1 to L12.

Notation for the work list. For integers c≥0c \ge 0 and k≥0k \ge 0 put hk=2B/2kh_k = 2B/2^k, uc,k=−B+c hku_{c,k} = -B + c\, h_k, and I(c,k)=(uc,k,uc,k+hk)I(c, k) = (u_{c,k}, u_{c,k} + h_k), an open interval with midpoint mc,k=uc,k+hk/2m_{c,k} = u_{c,k} + h_k/2.

Claim 1 (the bound). Every real root α\alpha of ff satisfies ∣α∣<B|\alpha| < B. Let M=max⁡i<n∣fi/fn∣M = \max_{i < n} |f_i/f_n|, so B≥1+MB \ge 1 + M by line L1. If M=0M = 0, then f=fnxnf = f_n x^n, and square-free forces n=1n = 1 and α=0\alpha = 0. If M>0M > 0 and ∣α∣≥1+M|\alpha| \ge 1 + M, then

∣∑i<nfiαi∣≤M∣fn∣∑i<n∣α∣i=M∣fn∣∣α∣n−1∣α∣−1≤∣fn∣(∣α∣n−1)<∣fnαn∣,\Big|\sum_{i<n} f_i \alpha^i\Big| \le M |f_n| \sum_{i<n} |\alpha|^i = M |f_n| \frac{|\alpha|^n - 1}{|\alpha| - 1} \le |f_n| (|\alpha|^n - 1) < |f_n \alpha^n|,

so f(α)≠0f(\alpha) \ne 0. Hence ∣α∣<1+M≤B|\alpha| < 1 + M \le B, and all real roots lie in I(0,0)=(−B,B)I(0, 0) = (-B, B).

Claim 2 (the invariant of an entry). Every entry (A,c,k)(A, c, k) that is pushed onto the stack satisfies

A(x)=λ f(uc,k+hkx)for some λ>0.(J)A(x) = \lambda\, f(u_{c,k} + h_k x) \quad \text{for some } \lambda > 0. \tag{J}

Line L2 sets A=f(2Bx−B)A = f(2Bx - B), which is (J) for c=k=0c = k = 0 with λ=1\lambda = 1. Suppose (A,c,k)(A, c, k) satisfies (J), and let u=uc,ku = u_{c,k} and h=hkh = h_k. Line L9 gives

AL(x)=2nA(x/2)=2nλ f(u+h2x),AR(x)=AL(x+1)=2nλ f(u+h2+h2x).A_L(x) = 2^n A(x/2) = 2^n \lambda\, f\big(u + \tfrac{h}{2} x\big), \qquad A_R(x) = A_L(x + 1) = 2^n \lambda\, f\big(u + \tfrac{h}{2} + \tfrac{h}{2} x\big).

Since hk+1=h/2h_{k+1} = h/2, u2c,k+1=uu_{2c, k+1} = u and u2c+1,k+1=u+h/2u_{2c+1, k+1} = u + h/2, both children satisfy (J), with the constant 2nλ>02^n \lambda > 0. In particular each AA has degree exactly nn, since its leading coefficient is λfnhkn≠0\lambda f_n h_k^n \ne 0.

Claim 3 (the test). Let (A,c,k)(A, c, k) satisfy (J) and let NN be the number of roots of ff in I(c,k)I(c, k). Then the number vv of line L6 satisfies v≥Nv \ge N and v−Nv - N is even. In particular v=0v = 0 implies N=0N = 0, and v=1v = 1 implies N=1N = 1.

With u=uc,ku = u_{c,k} and h=hkh = h_k,

(x+1)nA(1x+1)=λ(x+1)nf(u+hx+1)=λ(x+1)nf(ux+(u+h)x+1)=λ Tu, u+hf(x).(x + 1)^n A\Big(\frac{1}{x + 1}\Big) = \lambda (x + 1)^n f\Big(u + \frac{h}{x + 1}\Big) = \lambda (x + 1)^n f\Big(\frac{u x + (u + h)}{x + 1}\Big) = \lambda\, T_{u,\, u + h} f(x).

The map x↦(ux+u+h)/(x+1)x \mapsto (ux + u + h)/(x + 1) is a bijection from (0,∞)(0, \infty) onto (u,u+h)(u, u + h), and (x+1)n≠0(x + 1)^n \ne 0 for x>0x > 0, so the positive roots of Tu,u+hfT_{u, u+h} f, with multiplicity, correspond to the roots of ff in I(c,k)I(c, k). These roots are simple because ff is square-free, so there are NN of them. The factor λ>0\lambda > 0 does not change the signs. Descartes' rule of signs says that vv is at least the number of positive roots counted with multiplicity and differs from it by an even number. This is the claim.

Claim 4 (the midpoint). For (A,c,k)(A, c, k) with (J), AR(0)=AL(1)=2nA(1/2)=2nλf(mc,k)A_R(0) = A_L(1) = 2^n A(1/2) = 2^n \lambda f(m_{c,k}). So line L10 reports mc,km_{c,k} if and only if it is a root of ff.

Claim 5 (the partition invariant). At the start of each pass of the loop in line L4, the following hold.

  • (P1) The open intervals of the stack entries and the items of out are pairwise disjoint.
  • (P2) Each item of out is either an open interval I(c,k)I(c, k) that contains exactly one root of ff, or a single point that is a root of ff.
  • (P3) Each real root of ff lies in exactly one stack interval or in exactly one item of out, and not in both.

Initially the stack holds (A,0,0)(A, 0, 0) and out is empty. (P1) and (P2) hold trivially, and (P3) holds by claim 1. Suppose the invariant holds and line L5 pops (A,c,k)(A, c, k), with interval I=I(c,k)I = I(c, k) and midpoint mm.

  • If v=0v = 0, then II holds no root by claim 3, so dropping it keeps (P3); (P1) and (P2) are unchanged.
  • If v=1v = 1, then II holds exactly one root by claim 3. Moving II from the stack to out keeps (P1), adds an item that satisfies (P2), and moves that root from a stack interval to an item of out, which keeps (P3).
  • If v≥2v \ge 2, then I=I(2c,k+1)∪{m}∪I(2c+1,k+1)I = I(2c, k+1) \cup \{m\} \cup I(2c+1, k+1), a disjoint union. Line L10 adds {m}\{m\} to out exactly when mm is a root, by claim 4, and line L11 pushes the two halves. The new items are pairwise disjoint subsets of II, so (P1) holds, (P2) holds for {m}\{m\}, and each root that was in II is now in exactly one of the three parts, either reported or on the stack. If mm is not a root, dropping it loses nothing. So (P3) holds.

Claim 6 (termination). If n=1n = 1, then Tu,u+hfT_{u, u+h} f has degree at most 11, so v≤1v \le 1 for every entry and the root entry is never split. Let n≥2n \ge 2 and let sep⁡(f)>0\operatorname{sep}(f) > 0 be the least distance between two distinct complex roots of ff, which exists because ff is square-free. An entry at depth kk has interval length hk=2B/2kh_k = 2B/2^k. If hk≤sep⁡(f)/3h_k \le \operatorname{sep}(f)/\sqrt 3, then part 3 of Vincent's theorem gives Var⁡(Tu,u+hkf)≤1\operatorname{Var}(T_{u, u + h_k} f) \le 1, so v≤1v \le 1 by claim 3 and the entry is not split. So no entry has depth greater than K=max⁡(0,⌈log⁡2(23 B/sep⁡(f))⌉)K = \max(0, \lceil \log_2(2\sqrt 3\, B / \operatorname{sep}(f)) \rceil). Each pass of the loop pops one entry and pushes at most two entries of depth one more, and each pair (c,k)(c, k) with k≤Kk \le K is pushed at most once, since (c,k)(c, k) is pushed only by its parent (⌊c/2⌋,k−1)(\lfloor c/2 \rfloor, k - 1). So at most 2K+1−12^{K+1} - 1 entries are ever pushed, and the loop ends.

Conclusion. When the loop ends, the stack is empty. By (P3) every real root of ff lies in exactly one item of out, by (P2) every item holds exactly one root (an open interval) or is a root (a point), and by (P1) the items are disjoint. Line L12 only sorts the list. Hence the output is a list of disjoint isolating intervals and exact roots, one for each real root of ff. ■\blacksquare

Back to Vincent-Collins-Akritas algorithm