arXiv:2610.08466cs.DSOct 2026

Manuscript Offprint

arXiv:2610.08466

Faster dynamic programming for tridiagonal maximum-entropy sampling

Marcia Fampa, Jon Lee

Abstract

The maximum-entropy sampling problem (MESP) seeks, for an order-n covariance matrix C, a principal submatrix of order s with maximum log-determinant. Mostly for convenience, we assume that C is nonsingular. Al-Thani and Lee (2023) solved MESP in O(n5)O(n^{5}) time when C or C−1C^{-1} is tridiagonal. We show that the inner maximization of their recursion depends only on a prefix of the index set and that no piece of a solution is longer than s; this gives an O(ns2)O(ns^{2})-time algorithm that returns the optimal value for every budget t≤st \leq s. When C−1C^{-1} is tridiagonal, C is, up to scaling, the covariance matrix of an Ornstein–Uhlenbeck process observed at unevenly spaced times, and MESP becomes choosing points on a line under a concave gap function with the Monge property; this gives an O(ns)O(ns)-time algorithm and, in the first-order autoregressive case, a closed-form solution. Given only C, we solve MESP in O(n2)O(n^{2}) time whenever C or C−1C^{-1} is tridiagonal, up to a symmetric permutation, and we recognize these cases within the same bound. For spiders, we make explicit, and sharpen, the dependence on the number of legs, and, drawing on a hardness result of Ohsaka for stars, we observe that, unless P = NP, the exponent of the running time must grow with the number of legs.

Keywords: maximum-entropy sampling, dynamic programming, tridiagonal matrix, determinant, Monge property, autoregressive process, spider, nonlinear combinatorial optimization

Email addresses: fampa@cos.ufrj.br (M. Fampa), jonxlee@umich.edu (J. Lee)

1. Introduction

Let CC be an order-nn symmetric positive-semidefinite matrix, the covariance matrix of a Gaussian random vector YNnY_{N_n}, where Nn:={1,…,n}N_n := \{1, \ldots, n\}, and let 0<s<n0 < s < n. We write ldet:=log⁡det\text{ldet} := \log \text{det}, and we write C[S,S]C[S, S] for the principal submatrix of CC indexed by SS. The maximum-entropy sampling problem (MESP) [1] is

z(C,s):=max⁡{ldetC[S,S]:∣S∣=s,S⊂Nn}.z(C,s):=\max\{\mathrm{ldet}C[S,S]:|S|=s,S\subset N_{n}\}.

(MESP)

The input to MESP is the matrix CC and the integer ss. We exclude s=ns = n because it is trivial: z(C,n)=ldetCz(C, n) = \text{ldet} C, which we compute in O(n)O(n) time when CC or C−1C^{-1} is tridiagonal (by Lemma 2, or by the preprocessing of Section 5). We still use the notation z(C,t)z(C, t) for every 0≤t≤n0 \leq t \leq n, with z(C,0)=0z(C, 0) = 0. We assume that CC is nonsingular. When we exploit the structure of C−1C^{-1}, we never invert CC by a general-purpose method or form a dense C−1C^{-1}, and we account for the cost of every quantity that we derive from CC. We state running times in the arithmetic model, in which each addition, subtraction, multiplication, division, and comparison of real numbers costs O(1)O(1) time; we do not use logarithms or exponentials as primitive operations (see Section 2). MESP is NP-hard [2]; see [3] for a comprehensive treatment. [4] (see also, [5]) established the first significant polynomial-solvable case of MESP: when CC (or C−1C^{-1}, or a symmetric permutation of either) is tridiagonal, they solve MESP by dynamic programming in O(n5)O(n^{5}) time. Their algorithm is also a building block for spider-structured matrices and for upper bounds that come from tridiagonal masks (see [4]).

Contribution. We demonstrate that the recursion of [4] performs redundant work in two places. First, its inner maximization ranges over all O(n2)O(n^2) earlier pieces, although it depends only on a prefix of NnN_n and on a budget; therefore, it collapses to a single running maximum, computed once and reused. Second, no piece is longer than s. The resulting algorithm (Algorithm 1) runs in O(ns2)O(ns^2) time and uses O(ns)O(ns) memory (Theorem 4).

In Section 5, we treat the case in which C−1C^{-1} is tridiagonal directly, rather than by complementation. Every such C is, up to scaling, the covariance matrix of an Ornstein–Uhlenbeck process observed at unevenly spaced times — a classical fact, in several equivalent forms (see [6, 7, 8]) — and, from this viewpoint, MESP becomes the problem of choosing s of those times to maximize a sum of node weights and of a concave function of consecutive gaps. This viewpoint gives a simple closed-form solution in the first-order autoregressive case (Proposition 7), an O(ns)O(ns)-time algorithm based on the Monge property (Theorem 8), and, together with Theorem 4, an O(n2)O(n^2)-time algorithm whenever CC or C−1C^{-1} is tridiagonal (Corollary 10).

Two structures (CC tridiagonal or C−1C^{-1} tridiagonal) and two families of methods (that of [4] and ours) give four combinations. Table 1 previews the running times and memory requirements; in each structure, our best bound is O(n2)O(n^2), compared with O(n5)O(n^5).

Table 1: Running time and memory, given CC as input. The rows are grouped by the structure of CC. Within each group, the column “Applied to” gives the matrix on which the method is run, and “Budget” gives the corresponding budget; for example, when CC is tridiagonal, Theorem 8 is run on C−1C^{-1}, whose inverse CC is tridiagonal, with budget n−sn - s. Every bound includes the O(n)O(n) preprocessing that computes the needed entries of CC or C−1C^{-1} (Section 5); if it is not known in advance whether C−1C^{-1} is tridiagonal, deciding this costs O(n2)O(n^2) time (Proposition 9, and Remark 11 for symmetric permutations). Both bounds of Corollary 10 are O(n2)O(n^2), and both bounds of Al-Thani and Lee are O(n5)O(n^5).

MethodApplied toBudgetTimeMemory
Structure: CC tridiagonal
Al-Thani and Lee [4]CCssO(n4s)O(n^4 s)O(n2s)O(n^2 s)
Theorem 4CCssO(ns2)O(ns^2)O(ns)O(ns)
Theorem 8C−1C^{-1}n−sn - sO(n(n−s))O(n(n - s))O(n(n−s))O(n(n - s))
Corollary 10better of the twoO(nmin⁡{s2,n−s})O(n\min \{s^2, n - s\})
Structure: C−1C^{-1} tridiagonal
Al-Thani and Lee [4]C−1C^{-1}n−sn - sO(n4(n−s))O(n^4 (n - s))O(n2(n−s))O(n^2 (n - s))
Theorem 4C−1C^{-1}n−sn - sO(n(n−s)2)O(n(n - s)^2)O(n(n−s))O(n(n - s))
Theorem 8CCssO(ns)O(ns)O(ns)O(ns)
Corollary 10better of the twoO(nmin⁡{s,(n−s)2})O(n\min \{s,(n - s)^2\})

In Section 6, we turn to spiders. We show that the legs interact only through the body and, when the body is chosen, only through a single scalar Schur complement. This observation yields an explicit running time that is linear in nn and exponential only in the number rr of legs (Theorem 14), and it isolates the source of hardness: stars (spiders with n−1n - 1 legs) are exactly the case in which that scalar coupling is unrestricted, and MESP is NP-hard on stars [9]. When the support graph G(C−1)G(C^{-1}) of C−1C^{-1} is a spider instead, the same holds with budget n−sn - s, and we can recognize this case, and find the spider, in O(n2)O(n^2) time (Appendix A).

References (16)