Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Theoretical Computer Science

182 missions · 115 completed

The mathematical foundations of computation: which problems can be solved, by what algorithms, and at what cost in time, space, or communication. Distinguished by its emphasis on rigor and unconditional lower bounds, it spans computational complexity, algorithm design, automata and computability, cryptography, and the analysis of Boolean functions.

Missions

Open67Completed115All182
CombinatoricsGraph Theory·Captain: mikedeng1

Eigenvalues and Expanders: A Regular Bipartite Graph Is a Strong Expander If and Only If λ(G) Is Bounded Away from 0Research Paper

Motivation

Expander graphs are sparse graphs in which every set of vertices has many neighbours. Families of them with bounded degree and expansion bounded away from zero are a basic tool of theoretical computer science: they are the main component of the sorting network of Ajtai, Komlós and Szemerédi (AKS 1983), the building block of superconcentrators and other graphs with strong connectivity properties, and an ingredient of many later constructions in coding theory, derandomization and complexity.

Expansion is hard to certify. Checking that every set of vertices has many neighbours means looking at exponentially many sets, and computing the exact expansion of a graph is coNP-complete. A spectral quantity, by contrast, is computable in polynomial time. N. Alon's paper Eigenvalues and expanders (Combinatorica 6 (1986) 83–96) proves that for regular bipartite graphs the two notions are equivalent: a graph is a strong expander if and only if the second-smallest eigenvalue of its Laplacian is bounded away from 0, with explicit constants in both directions. This is a discrete counterpart of Cheeger's inequality for Riemannian manifolds.

Timeline.

  • 1983: Ajtai, Komlós and Szemerédi use bounded-degree bipartite expanders to build sorting networks of depth O(log⁡n)O(\log n)O(logn).
  • 1984: Tanner (SIAM J. Alg. Disc. Meth. 5) bounds the neighbourhood size of a set in a regular bipartite graph by its second eigenvalue, the direction "eigenvalue gap implies expansion".
  • 1985: Alon and Milman (J. Combin. Theory Ser. B 38) prove isoperimetric inequalities for graphs in terms of λ(G)\lambda(G)λ(G) and introduce enlargers.
  • 1986: Alon proves the converse direction, "expansion implies an eigenvalue gap" (Lemma 2.4 and Theorem 3.4 of the paper).

Setting

All graphs are finite and simple. For a graph G=(V,E)G = (V, E)G=(V,E) and a set X⊆VX \subseteq VX⊆V, N(X)={v∈V:vx∈E for some x∈X}N(X) = \{v \in V : vx \in E \text{ for some } x \in X\}N(X)={v∈V:vx∈E for some x∈X} is the set of neighbours of XXX; it may meet XXX.

The Laplacian of GGG is QG=diag(d(v))v∈V−AGQ_G = \mathrm{diag}(d(v))_{v \in V} - A_GQG​=diag(d(v))v∈V​−AG​, where AGA_GAG​ is the 0–1 adjacency matrix and d(v)d(v)d(v) the degree of vvv. It is symmetric with eigenvalues 0=λ0≤λ1≤⋯≤λn−10 = \lambda_0 \le \lambda_1 \le \dots \le \lambda_{n-1}0=λ0​≤λ1​≤⋯≤λn−1​, counted with multiplicity, and λ(G)=λ1\lambda(G) = \lambda_1λ(G)=λ1​ is its second-smallest eigenvalue. It is positive exactly when GGG is connected.

  • An (n,d,c)(n, d, c)(n,d,c)-magnifier is a graph on nnn vertices with maximal degree ddd in which every X⊆VX \subseteq VX⊆V with ∣X∣≤n/2|X| \le n/2∣X∣≤n/2 satisfies ∣N(X)−X∣≥c∣X∣|N(X) - X| \ge c|X|∣N(X)−X∣≥c∣X∣.
  • An (n,d,ε)(n, d, \varepsilon)(n,d,ε)-enlarger is a graph on nnn vertices with maximal degree ddd and λ(G)≥ε\lambda(G) \ge \varepsilonλ(G)≥ε.
  • A bipartite graph G=(I,O;E)G = (I, O; E)G=(I,O;E) has inputs III, outputs OOO and edges only between III and OOO. It is a strong (n,d,c)(n, d, c)(n,d,c)-expander if ∣I∣=∣O∣=n|I| = |O| = n∣I∣=∣O∣=n, the maximal degree is ddd, and for every X⊆IX \subseteq IX⊆I
∣N(X)∣≥(1+c(1−∣X∣n))∣X∣.|N(X)| \ge \Bigl(1 + c\Bigl(1 - \frac{|X|}{n}\Bigr)\Bigr)|X|.∣N(X)∣≥(1+c(1−n∣X∣​))∣X∣.

Formalization targets

Goal: Theorem 3.4

Let G=(I,O;E)G = (I, O; E)G=(I,O;E) be a ddd-regular bipartite graph with ∣I∣=∣O∣=n|I| = |O| = n∣I∣=∣O∣=n and λ=λ(G)\lambda = \lambda(G)λ=λ(G).

  1. If GGG is a strong (n,d,c)(n, d, c)(n,d,c)-expander then
λ≥c21024+2c2.\lambda \ge \frac{c^2}{1024 + 2c^2}.λ≥1024+2c2c2​.
  1. If λ≥ε\lambda \ge \varepsilonλ≥ε then GGG is a strong (n,d,c)(n, d, c)(n,d,c)-expander with
c=2dε−ε2d2.c = \frac{2d\varepsilon - \varepsilon^2}{d^2}.c=d22dε−ε2​.

Milestones, in the order of the paper

  • Lemma 2.2 (Alon–Milman, already on the platform): for disjoint sets A,BA, BA,B at distance ϱ>1\varrho > 1ϱ>1, b≤(1−a)/(1+(λ/d)aϱ2)b \le (1-a)/(1 + (\lambda/d)a\varrho^2)b≤(1−a)/(1+(λ/d)aϱ2).
  • Corollary 2.3: every (n,d,ε)(n, d, \varepsilon)(n,d,ε)-enlarger is an (n,d,2ε/(d+2ε))(n, d, 2\varepsilon/(d+2\varepsilon))(n,d,2ε/(d+2ε))-magnifier.
  • Eq. (2.1): if fff is an eigenvector of QGQ_GQG​ for λ(G)\lambda(G)λ(G) and ggg its positive part, then ∑uv∈E(g(u)−g(v))2≤λ∑vg2(v)\sum_{uv \in E}(g(u)-g(v))^2 \le \lambda \sum_v g^2(v)∑uv∈E​(g(u)−g(v))2≤λ∑v​g2(v).
  • Lemma 2.4: every (n,d,c)(n, d, c)(n,d,c)-magnifier has λ(G)≥c2/(4+2c2)\lambda(G) \ge c^2/(4 + 2c^2)λ(G)≥c2/(4+2c2).
  • Lemma 3.1: a strong (n,d,c)(n, d, c)(n,d,c)-expander is a (2n,d,c/16)(2n, d, c/16)(2n,d,c/16)-magnifier.
  • Proof of Lemma 3.3, spectrum: the two largest eigenvalues of CTCC^TCCTC, with CCC the I×OI \times OI×O biadjacency matrix, are d2d^2d2 and (d−λ)2(d - \lambda)^2(d−λ)2.
  • Proof of Lemma 3.3, Tanner's bound: ∣N(X)∣≥d2∣X∣/(α(d2−(d−λ)2)+(d−λ)2)|N(X)| \ge d^2|X| / \bigl(\alpha(d^2 - (d-\lambda)^2) + (d-\lambda)^2\bigr)∣N(X)∣≥d2∣X∣/(α(d2−(d−λ)2)+(d−λ)2) with α=∣X∣/n\alpha = |X|/nα=∣X∣/n.
  • Lemma 3.3: a ddd-regular bipartite graph is a strong (n,d,(2dλ−λ2)/d2)(n, d, (2d\lambda - \lambda^2)/d^2)(n,d,(2dλ−λ2)/d2)-expander.

Part (1) of the goal combines Lemmas 3.1 and 2.4; part (2) follows from Lemma 3.3.

Significance

The result. Theorem 3.4 makes expansion of regular bipartite graphs checkable in polynomial time up to a constant-factor loss. A random regular bipartite graph can be generated and its expansion certified by computing one eigenvalue. Lemma 2.4 is one of the first discrete Cheeger inequalities. Together with Corollary 2.3 it shows that magnifiers and enlargers are the same graphs up to the constants, and it underlies the later theory of spectral expanders, including the Alon–Boppana bound and Ramanujan graphs.

The formalization. The results are proved in the paper. The work is to formalize the known proofs. That includes Tanner's eigenvalue bound, which the paper only cites, and a max-flow min-cut argument, for which Mathlib has no general theorem. No machine-checked version of Lemma 2.4, Lemma 3.1, Lemma 3.3 or Theorem 3.4 is known to exist. Lemma 2.2 is already stated and proved on the platform as part of the Alon–Milman mission.

Difficulty

The direction "eigenvalue gap implies expansion" is a variational argument on the spectrum of CTCC^TCCTC. The converse is the hard one. A first attempt bounds λ(G)\lambda(G)λ(G) from below by testing the Rayleigh quotient on indicator vectors of sets. That only gives upper bounds on λ\lambdaλ: any one test vector does. A lower bound has to control every vector orthogonal to the constants at once. The paper first reduces to the positive part of an eigenvector (Eq. (2.1)). It then turns the combinatorial expansion of the graph into an analytic inequality for that function, using a network flow whose existence comes from the max-flow min-cut theorem. Step (ii) of the flow conditions printed on p. 87 is false as stated: the arcs (u,u)(u, u)(u,u) of the network absorb part of the flow. The flow argument has to be repaired before it can be formalized.

Lemma 3.1 has its own obstacle: one-sided expansion of inputs must be converted into expansion of arbitrary vertex sets that mix inputs and outputs. This needs the strong form of expansion; for ordinary expanders the lemma is false.

Formalization scope

Graphs are SimpleGraph V on a Fintype. A bipartite graph lives on the sum type I ⊕ O, and IsIOBipartite forbids edges inside I and inside O. Cardinalities ∣N(X)∣|N(X)|∣N(X)∣ are Set.ncard. "Maximal degree ddd" is read as G.maxDegree ≤ d; every statement is monotone in ddd or fixes ddd by regularity (G.IsRegularOfDegree d). The condition ∣X∣≤n/2|X| \le n/2∣X∣≤n/2 is written 2∣X∣≤n2|X| \le n2∣X∣≤n in N\mathbb{N}N. All constants are real, and every subtraction and division is taken in R\mathbb{R}R.

Reused published items:

  • λ(G)\lambda(G)λ(G) is AlonMilman.Diameter.lambda1, the second-smallest eigenvalue of G.lapMatrix ℝ, which is 000 by convention on fewer than two vertices.
  • N(X)N(X)N(X) is AKSSorting.Core.neighbours.
  • Lemma 2.2 is AlonMilman.Diameter.theorem_2_5, which carries Alon–Milman's standing hypotheses that GGG is connected and n≥2n \ge 2n≥2; outside them the inequality is trivial.

The page omits a few degenerate cases, and the following hypotheses are added for them. Each is necessary, with a counterexample recorded in the item's statement:

  • n≥1n \ge 1n≥1 and c≥0c \ge 0c≥0 in Theorem 3.4 (1);
  • ε>0\varepsilon > 0ε>0 in Theorem 3.4 (2);
  • n≥2n \ge 2n≥2 and c≥0c \ge 0c≥0 in Lemma 2.4;
  • n≥2n \ge 2n≥2 in Lemma 3.1 and in the CTCC^TCCTC statement;
  • d≥1d \ge 1d≥1 in Lemma 3.3;
  • ε≥0\varepsilon \ge 0ε≥0 in Corollary 2.3.

Eq. (2.1) is stated in multiplied form, so no quotient by ∑g2\sum g^2∑g2 appears.

The closing sentences of Theorem 2.5 and Theorem 3.4 ("Thus … one can prove efficiently …") are not formalized. Read as implications between expanders they reduce to monotonicity in ccc, because c′≤cc' \le cc′≤c; their content is algorithmic.

Several encodings would trivialize the mission and are excluded:

  • a λ\lambdaλ other than the published second-smallest Laplacian eigenvalue, in particular one defined as the best constant of a quotient;
  • expansion or magnifier conditions with a negative constant in a hypothesis;
  • ∣X∣≤n/2|X| \le n/2∣X∣≤n/2 with truncating natural-number division.

Contributions are welcome:

  • Tanner's bound in Lean, which is reusable for any regular bipartite graph;
  • a max-flow min-cut theorem for finite networks;
  • the corrected flow lemma behind Eqs. (2.2)–(2.3);
  • the spectral facts about λ(G)\lambda(G)λ(G) for bipartite graphs (λ≤d\lambda \le dλ≤d for n≥2n \ge 2n≥2, and λ=d−σ2(C)\lambda = d - \sigma_2(C)λ=d−σ2​(C)).

Selected references

  • N. Alon, Eigenvalues and expanders, Combinatorica 6 (1986) 83–96. https://doi.org/10.1007/BF02579166
  • N. Alon and V. D. Milman, λ₁, isoperimetric inequalities for graphs, and superconcentrators, J. Combin. Theory Ser. B 38 (1985) 73–88. https://doi.org/10.1016/0095-8956(85)90092-9
  • R. M. Tanner, Explicit concentrators from generalized N-gons, SIAM J. Algebraic Discrete Methods 5 (1984) 287–293. https://doi.org/10.1137/0605030
  • M. Ajtai, J. Komlós and E. Szemerédi, Sorting in c log n parallel steps, Combinatorica 3 (1983) 1–19. https://doi.org/10.1007/BF02579338
16 thms3 active usersReviewed
🏆Completed
Algorithmic Game TheoryLinear OptimizationOperations Research·Captain: mikedeng1

Online Primal-Dual Algorithms for Maximizing Ad-Auctions Revenue: The Competitive Ratio of the Primal-Dual Allocation AlgorithmResearch Paper

Motivation

Search engines sell advertisement slots next to their results through ad-auctions. Advertisers bid on keywords, and each advertiser also sets a daily budget: the most it is willing to pay in a day. Queries arrive one at a time and each must be assigned to an advertiser at once, with no knowledge of the queries still to come. The seller's revenue from an advertiser is capped by its budget, so an allocation rule that ignores budgets can exhaust a high bidder early and forgo revenue that a more even allocation would have collected. The question is how much of the offline optimum an online rule can guarantee against every arrival sequence.

Mehta, Saberi, Vazirani and Vazirani (FOCS 2005 / J. ACM 2007) gave a deterministic algorithm whose competitive ratio tends to 1−1/e1 - 1/e1−1/e when bids are small compared with budgets, and showed that no deterministic algorithm does better. Their algorithm builds on online bipartite matching (Karp, Vazirani and Vazirani, STOC 1990) and online bbb-matching (Kalyanasundaram and Pruhs, 2000). Buchbinder, Jain and Naor (ESA 2007) rederived the 1−1/e1 - 1/e1−1/e bound with an online primal-dual algorithm, which gives the ratio in closed form for every value of the bid-to-budget ratio and extends to multiple slots, stochastic information, bounded degree and budget flexibility. This mission formalizes the basic algorithm of that paper and its Theorem 1.

Setting

There is a finite nonempty set III of buyers. Buyer iii has a known budget B(i)>0B(i) > 0B(i)>0. Products j=1,…,mj = 1, \dots, mj=1,…,m arrive one by one; when product jjj arrives, every buyer's bid b(i,j)≥0b(i,j) \ge 0b(i,j)≥0 on it is revealed. The bid-to-budget ratio is

Rmax⁡=max⁡i∈I, jb(i,j)B(i).R_{\max} = \max_{i \in I,\, j} \frac{b(i,j)}{B(i)} .Rmax​=i∈I,jmax​B(i)b(i,j)​.

A fractional allocation y(i,j)≥0y(i,j) \ge 0y(i,j)≥0 assigns fractions of products to buyers; the revenue from buyer iii is the minimum of ∑jb(i,j) y(i,j)\sum_j b(i,j)\,y(i,j)∑j​b(i,j)y(i,j) and B(i)B(i)B(i).

The offline fractional problem is the packing LP, which the paper calls the dual:

max⁡∑j∑ib(i,j) y(i,j)s.t.∑iy(i,j)≤1  ∀j,∑jb(i,j) y(i,j)≤B(i)  ∀i,y≥0.\max \sum_{j}\sum_{i} b(i,j)\,y(i,j) \quad\text{s.t.}\quad \sum_i y(i,j) \le 1 \ \ \forall j,\qquad \sum_j b(i,j)\,y(i,j) \le B(i)\ \ \forall i,\qquad y \ge 0 .maxj∑​i∑​b(i,j)y(i,j)s.t.i∑​y(i,j)≤1  ∀j,j∑​b(i,j)y(i,j)≤B(i)  ∀i,y≥0.

Its LP dual, the paper's primal, is the covering LP:

min⁡∑iB(i) x(i)+∑jz(j)s.t.b(i,j) x(i)+z(j)≥b(i,j)  ∀i,j,x,z≥0.\min \sum_i B(i)\,x(i) + \sum_j z(j) \quad\text{s.t.}\quad b(i,j)\,x(i) + z(j) \ge b(i,j)\ \ \forall i,j,\qquad x, z \ge 0 .mini∑​B(i)x(i)+j∑​z(j)s.t.b(i,j)x(i)+z(j)≥b(i,j)  ∀i,j,x,z≥0.

The Allocation Algorithm has a parameter c>1c > 1c>1 and starts from x≡0x \equiv 0x≡0. When product jjj arrives it takes a buyer iii maximizing b(i,j)(1−x(i))b(i,j)(1 - x(i))b(i,j)(1−x(i)). If x(i)≥1x(i) \ge 1x(i)≥1, the product is not sold. Otherwise it charges iii the minimum of b(i,j)b(i,j)b(i,j) and iii's remaining budget, sets y(i,j)←1y(i,j) \leftarrow 1y(i,j)←1 and z(j)←b(i,j)(1−x(i))z(j) \leftarrow b(i,j)(1 - x(i))z(j)←b(i,j)(1−x(i)), and updates

x(i)←x(i)(1+b(i,j)B(i))+b(i,j)(c−1) B(i).x(i) \leftarrow x(i)\Big(1 + \frac{b(i,j)}{B(i)}\Big) + \frac{b(i,j)}{(c-1)\,B(i)} .x(i)←x(i)(1+B(i)b(i,j)​)+(c−1)B(i)b(i,j)​.

Its revenue is the total amount charged.

Formalization targets

Goal: Theorem 1

For every instance and every bound R>0R > 0R>0 with b(i,j)≤R B(i)b(i,j) \le R\,B(i)b(i,j)≤RB(i) for all i,ji, ji,j, the Allocation Algorithm run with c=(1+R)1/Rc = (1+R)^{1/R}c=(1+R)1/R, under any tie-breaking of the maximum, satisfies for every feasible y′y'y′ of the packing LP

Revenue  ≥  (1−1c)(1−R)∑j∑ib(i,j) y′(i,j).\mathrm{Revenue} \;\ge\; \Big(1 - \frac1c\Big)(1 - R)\sum_{j}\sum_{i} b(i,j)\,y'(i,j).Revenue≥(1−c1​)(1−R)j∑​i∑​b(i,j)y′(i,j).

With R=Rmax⁡R = R_{\max}R=Rmax​ this is the paper's statement that the algorithm is (1−1/c)(1−Rmax⁡)(1 - 1/c)(1 - R_{\max})(1−1/c)(1−Rmax​)-competitive; the fractional optimum bounds every integral offline allocation.

Milestones

The proof of Theorem 1 rests on three claims and three auxiliary facts, each a milestone:

  1. the inequality ln⁡(1+x)/x≥ln⁡(1+y)/y\ln(1+x)/x \ge \ln(1+y)/yln(1+x)/x≥ln(1+y)/y for 0<x≤y≤10 < x \le y \le 10<x≤y≤1;
  2. Claim (1): the final (x,z)(x, z)(x,z) is feasible for the covering LP;
  3. Claim (2): the covering cost of the run equals (1+1/(c−1))(1 + 1/(c-1))(1+1/(c−1)) times the packing value of the run's own yyy;
  4. Inequality (1): x(i)≥1c−1(c∑jb(i,j)y(i,j)/B(i)−1)x(i) \ge \frac{1}{c-1}\big(c^{\sum_j b(i,j) y(i,j)/B(i)} - 1\big)x(i)≥c−11​(c∑j​b(i,j)y(i,j)/B(i)−1) at every stage of the run;
  5. Claim (3): ∑jb(i,j) y(i,j)≤B(i)+max⁡jb(i,j)\sum_j b(i,j)\,y(i,j) \le B(i) + \max_j b(i,j)∑j​b(i,j)y(i,j)≤B(i)+maxj​b(i,j), and the amount charged to iii is at least (1−R)∑jb(i,j) y(i,j)(1 - R)\sum_j b(i,j)\,y(i,j)(1−R)∑j​b(i,j)y(i,j);
  6. weak duality for the LP pair above;

and, separately, the second sentence of Theorem 1,

lim⁡R→0+(1−1(1+R)1/R)(1−R)=1−1e.\lim_{R\to 0^+}\Big(1 - \frac{1}{(1+R)^{1/R}}\Big)(1-R) = 1 - \frac1e .R→0+lim​(1−(1+R)1/R1​)(1−R)=1−e1​.

Significance

Theorem 1 gives an explicit ratio for every value of Rmax⁡R_{\max}Rmax​, not only in the limit. It tends to the optimal deterministic ratio 1−1/e1 - 1/e1−1/e as bids become small, and it quantifies how the guarantee degrades as single bids become a larger share of a budget. The primal-dual analysis is the template for the paper's later sections and for a line of work on online packing and covering problems, surveyed in Buchbinder and Naor's monograph The Design of Competitive Online Algorithms via a Primal-Dual Approach (Foundations and Trends in TCS, 2009).

The result is proved in the paper, and the proof is short. What this mission adds is a machine-checked proof about an algorithm that is defined, not described: the run is computed by recursion from the instance, and the guarantee is proved for that run and every tie-breaking. A related private mission on the platform, The Design of Competitive Online Algorithms via a Primal-Dual Approach VI: Maximizing Ad-Auctions Revenue, states the monograph's Theorem 10.1, which is this theorem, in a form that takes the analysis's intermediate inequalities as hypotheses over arbitrary lists of won bids; the present mission states it for the algorithm itself. No machine-checked proof of Theorem 1 is known to this mission.

Difficulty

Each step of the proof is elementary; the difficulty is the bookkeeping of an online process. Claims (1) and (2) are statements about a single iteration that must be lifted to the whole run: Claim (1) uses that xxx only increases, and Claim (2) that each product is processed once. Inequality (1) is an induction over the iterations that allocate to one buyer, interleaved with iterations that allocate to others and is the only place where the value of ccc matters. Claim (3) needs a further invariant: the amount charged equals the minimum of the allocated bids and the budget.

A tempting shortcut is to take Inequality (1) and the "at most one undercharge" fact as hypotheses about some list of bids. That does not describe the algorithm and is not the theorem; here the only hypotheses are on the instance and on the tie-breaking rule.

Formalization scope

Buyers are a type I with [Fintype I] and [Nonempty I]; products are Fin m, whose order is the arrival order. Bids and budgets are real, with B(i)>0B(i) > 0B(i)>0 and b(i,j)≥0b(i,j) \ge 0b(i,j)≥0. The state of the algorithm records xxx, the amounts charged, yyy and zzz; one iteration is step, the run after kkk products is runPrefix, and revenue sums the charges of the final state. The tie-breaking rule is a function sel of the current xxx and the product, required to return a maximizer of b(i,j)(1−x(i))b(i,j)(1-x(i))b(i,j)(1−x(i)); the theorem holds for every such rule. The constant c=(1+R)1/Rc = (1+R)^{1/R}c=(1+R)1/R is a real power and requires R>0R > 0R>0. The theorem is stated for any bound RRR on the ratios, of which the exact maximum is one instance. Claims (1) and (2) are stated for every c>1c > 1c>1, which covers the paper's choice. The paper's inequality for ln⁡(1+x)/x\ln(1+x)/xln(1+x)/x allows x=0x = 0x=0, read as a limit; the Lean statement requires x>0x > 0x>0.

A statement over an unconstrained allocation, or one conditioned on the proof's own intermediate inequalities, would be trivially true or false; the targets here concern only the run the definitions compute.

The development needs finite sums, real powers and logarithms from Mathlib and an induction principle for the run. The LP pair and weak duality are reusable for the paper's extensions, and the run invariants for any primal-dual online algorithm with multiplicative updates. Proofs of any milestone are welcome, as are sharper variants, such as the exact-Rmax⁡R_{\max}Rmax​ form or the bound against integral allocations.

Selected references

  • N. Buchbinder, K. Jain, J. Naor, Online Primal-Dual Algorithms for Maximizing Ad-Auctions Revenue, Algorithms – ESA 2007, LNCS 4698, 2007. https://doi.org/10.1007/978-3-540-75520-3_24
  • A. Mehta, A. Saberi, U. Vazirani, V. Vazirani, AdWords and Generalized Online Matching, Journal of the ACM 54(5), 2007. https://doi.org/10.1145/1284320.1284321
  • R. M. Karp, U. V. Vazirani, V. V. Vazirani, An Optimal Algorithm for On-line Bipartite Matching, STOC 1990. https://doi.org/10.1145/100216.100262
  • B. Kalyanasundaram, K. R. Pruhs, An Optimal Deterministic Algorithm for Online b-Matching, Theoretical Computer Science 233(1–2), 2000. https://doi.org/10.1016/S0304-3975(99)00140-1
  • N. Buchbinder, J. Naor, The Design of Competitive Online Algorithms via a Primal-Dual Approach, Foundations and Trends in Theoretical Computer Science 3(2–3), 2009. https://doi.org/10.1561/0400000024
10 thms3 active usersReviewed
🏆Completed
Number TheoryProbabilityQuantum Information·Captain: mikedeng1

Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer 3: The Success Probability of Quantum Order FindingResearch Paper

Motivation

The security of the RSA cryptosystem rests on the assumed difficulty of factoring large integers, and the best known classical algorithms for factoring run in super-polynomial time. In 1994 Peter Shor showed that a quantum computer can factor an nnn-digit integer in time polynomial in nnn (Shor, SIAM J. Comput. 1997; conference version FOCS 1994). The algorithm has two parts. A classical reduction, due to Miller (1976), turns factoring into order finding: given xxx coprime to nnn, find the least r≥1r \ge 1r≥1 with xr≡1(modn)x^r \equiv 1 \pmod nxr≡1(modn). The quantum part solves order finding.

This mission formalizes the quantum part as Shor analyzes it in §5 of the journal paper: the construction of the quantum state, the probability of each measurement outcome, and the classical post-processing that reads rrr off the measured value. The paper's claim is that one run of this procedure returns rrr with probability at least φ(r)/3r\varphi(r)/3rφ(r)/3r.

Timeline:

  • 1976: Miller reduces factoring to order finding (with randomization).
  • 1985–1994: Deutsch, Bernstein–Vazirani and Simon give the quantum Fourier sampling ideas the algorithm builds on.
  • 1994: Shor's FOCS paper introduces the factoring and discrete logarithm algorithms.
  • 1997: the SIAM J. Comput. version gives the analysis formalized here, with qqq the power of 222 in [n2,2n2)[n^2, 2n^2)[n2,2n2).

Setting

Fix an integer n≥2n \ge 2n≥2 and an integer xxx coprime to nnn. Its order rrr is the least r≥1r \ge 1r≥1 with xr≡1(modn)x^r \equiv 1 \pmod nxr≡1(modn); since xxx is a unit, r≤φ(n)<nr \le \varphi(n) < nr≤φ(n)<n. Let q=2lq = 2^lq=2l be the power of 222 with n2≤q<2n2n^2 \le q < 2n^2n2≤q<2n2.

A quantum state on two registers, the first holding 0≤a<q0 \le a < q0≤a<q and the second a residue y∈Z/ny \in \mathbb{Z}/ny∈Z/n, is a complex vector ψ(a,y)\psi(a, y)ψ(a,y) indexed by the basis states ∣a,y⟩|a, y\rangle∣a,y⟩. Measuring it returns ∣a,y⟩|a, y\rangle∣a,y⟩ with probability ∣ψ(a,y)∣2|\psi(a, y)|^2∣ψ(a,y)∣2.

The Fourier matrix AqA_qAq​ is the q×qq \times qq×q matrix with entries (Aq)a,c=q−1/2exp⁡(2πiac/q)(A_q)_{a,c} = q^{-1/2}\exp(2\pi i a c/q)(Aq​)a,c​=q−1/2exp(2πiac/q), with rows indexing inputs and columns outputs. The algorithm

  1. prepares 1q1/2∑a=0q−1∣a⟩∣xa mod n⟩\frac{1}{q^{1/2}}\sum_{a=0}^{q-1}|a\rangle|x^a \bmod n\rangleq1/21​∑a=0q−1​∣a⟩∣xamodn⟩ (eq. (5.2)),
  2. applies AqA_qAq​ to the first register, obtaining 1q∑a,cexp⁡(2πiac/q)∣c⟩∣xa mod n⟩\frac1q\sum_{a,c}\exp(2\pi iac/q)|c\rangle|x^a \bmod n\rangleq1​∑a,c​exp(2πiac/q)∣c⟩∣xamodn⟩ (eq. (5.4)),
  3. measures, obtaining some ∣c,y⟩|c, y\rangle∣c,y⟩,
  4. rounds c/qc/qc/q to the nearest fraction with denominator smaller than nnn.

The observed ccc gives us rrr if some fraction with lowest-terms denominator below nnn is within 1/2q1/2q1/2q of c/qc/qc/q, and every such fraction has lowest-terms denominator exactly rrr. In the Lean development these objects are preFourierState, finalState, outcomeProb and yieldsOrder, in the namespace ShorAlgorithms.OrderFinding, and the shared definition ShorAlgorithms.Shared.fourierMatrix.

Formalization targets

Goal: success probability at least φ(r)/3r\varphi(r)/3rφ(r)/3r

For all sufficiently large nnn, with xxx, rrr and qqq as above,

Pr⁡[the observed c gives us r]  =  ∑c gives r ∑y∈Z/n∣Ψ(c,y)∣2  ≥  φ(r)3r,\Pr\bigl[\text{the observed } c \text{ gives us } r\bigr] \;=\; \sum_{c\ \text{gives}\ r}\ \sum_{y \in \mathbb{Z}/n} |\Psi(c, y)|^2 \;\ge\; \frac{\varphi(r)}{3r},Pr[the observed c gives us r]=c gives r∑​ y∈Z/n∑​∣Ψ(c,y)∣2≥3rφ(r)​,

where Ψ\PsiΨ is the state (5.4). The threshold on nnn is uniform in xxx and qqq; it is the paper's "for sufficiently large nnn" from the per-state bound.

Milestones

  1. Eqs. (5.5)–(5.6). For 0≤k<r0 \le k < r0≤k<r, the probability of ∣c,xk⟩|c, x^k\rangle∣c,xk⟩ equals ∣1q∑b=0⌊(q−k−1)/r⌋exp⁡(2πi(br+k)c/q)∣2\left|\frac1q\sum_{b=0}^{\lfloor (q-k-1)/r\rfloor}\exp(2\pi i(br+k)c/q)\right|^2​q1​∑b=0⌊(q−k−1)/r⌋​exp(2πi(br+k)c/q)​2.
  2. Eq. (5.11). For nnn past a threshold, every ∣c,xk⟩|c, x^k\rangle∣c,xk⟩ with −r/2≤rc−dq≤r/2-r/2 \le rc - dq \le r/2−r/2≤rc−dq≤r/2 for some integer ddd has probability at least 1/3r21/3r^21/3r2.
  3. Eq. (5.13). If n2≤qn^2 \le qn2≤q, at most one fraction with denominator below nnn lies within 1/2q1/2q1/2q of c/qc/qc/q.
  4. p. 1500. Such a fraction is a convergent of the continued fraction of c/qc/qc/q.
  5. p. 1501. At least φ(r)\varphi(r)φ(r) values of ccc are within 1/2q1/2q1/2q of some d/rd/rd/r with gcd⁡(d,r)=1\gcd(d, r) = 1gcd(d,r)=1; with the rrr distinct values of xkx^kxk this gives at least rφ(r)r\varphi(r)rφ(r) states ∣c,xk⟩|c, x^k\rangle∣c,xk⟩, and each such ccc gives us rrr.

Significance

The goal is the quantitative statement behind "order finding is in bounded-error quantum polynomial time": since φ(r)/r≥δ/log⁡log⁡r\varphi(r)/r \ge \delta/\log\log rφ(r)/r≥δ/loglogr for a constant δ\deltaδ (Hardy and Wright, Thm. 328), O(log⁡log⁡r)O(\log\log r)O(loglogr) repetitions find rrr with high probability, and Miller's reduction then factors nnn. Without the bound, the algorithm is a procedure with no guarantee.

The result is proved, in the paper and in textbooks (Nielsen and Chuang, 2000, §5.3), usually with a phase-estimation analysis rather than Shor's direct count. What this mission adds is a machine-checked proof of Shor's own argument, with his choice of qqq and his constants, starting from the state built by applying AqA_qAq​ to (5.2). Formal proofs of idealized versions exist elsewhere, for instance in the exact-period model where rrr divides qqq and the output is uniform on rrr peaks, but that model removes the approximation that the 1/3r21/3r^21/3r2 bound is about. Legendre's theorem on continued fractions is already on the platform (FamousTheorems.legendre_continued_fraction_theorem) and is included as a reference item.

Difficulty

The obvious route is to compute the output distribution in closed form. That works only when rrr divides qqq; here qqq is a power of 222 and rrr is arbitrary, so the amplitudes are geometric sums of ⌊(q−k−1)/r⌋+1\lfloor (q-k-1)/r\rfloor + 1⌊(q−k−1)/r⌋+1 terms whose phases do not cancel exactly. The per-state bound 1/3r21/3r^21/3r2 requires a lower bound on such a sum that is uniform in rrr, ccc and kkk, with error terms of order 1/q1/q1/q controlled against a main term of order 1/r21/r^21/r2. The constant 1/31/31/3 leaves only a small margin below the limiting value 4/π2≈0.4054/\pi^2 \approx 0.4054/π2≈0.405, so the errors must be bounded explicitly, not merely shown to vanish.

The second difficulty is the counting: distinct coprime numerators ddd must give distinct outcomes ccc in [0,q)[0, q)[0,q), and each good ccc must determine rrr uniquely, which uses r<nr < nr<n and n2≤qn^2 \le qn2≤q.

Formalization scope

Conventions the statements commit to:

  • States are functions Fin q × ZMod n → ℂ; the matrix convention is row = input, so applying AqA_qAq​ to the first register gives the amplitude ∑aψ(a,y)(Aq)a,c\sum_a \psi(a, y)(A_q)_{a,c}∑a​ψ(a,y)(Aq​)a,c​ at (c,y)(c, y)(c,y).
  • The final state is built by applying AqA_qAq​ to the state (5.2); the closed forms (5.5) and (5.6) are theorems, not definitions. No normalization hypothesis is assumed.
  • Probabilities are squared moduli; the probability of the event "ccc gives us rrr" sums over all y∈Z/ny \in \mathbb{Z}/ny∈Z/n, which is exact because yyy that are not powers of xxx have probability zero.
  • xxx is a natural number with gcd⁡(x,n)=1\gcd(x, n) = 1gcd(x,n)=1; rrr is orderOf (x : ZMod n). qqq enters through the three hypotheses q=2lq = 2^lq=2l, n2≤qn^2 \le qn2≤q, q<2n2q < 2n^2q<2n2, not through a function of nnn.
  • Fractions are rationals, and "in lowest terms" is Rat.den.
  • Thresholds "for sufficiently large nnn" are ∃N, ∀n≥N\exists N,\ \forall n \ge N∃N, ∀n≥N, with NNN quantified before xxx, qqq, ccc and kkk.
  • Condition (5.11) is stated in its equivalent form (5.12), with an integer ddd.
  • Printed slip. Eq. (5.13)'s justification says "Because q>n2q > n^2q>n2", but qqq was chosen with n2≤qn^2 \le qn2≤q, and q=n2q = n^2q=n2 when nnn is a power of 222. The uniqueness claim holds under n2≤qn^2 \le qn2≤q, and that is what is stated.

Typing the closed form (5.4)–(5.6) in as the definition of the final state would make milestone 1 trivial and hide whether the probability model is the paper's; the definitions exclude this by construction.

Not stated: the polynomial running time of any step, the O(log⁡log⁡r)O(\log\log r)O(loglogr) repetition count (no explicit constant), the reversible modular exponentiation of §3, and the post-processing heuristics on p. 1501. Needed infrastructure: bounds on geometric exponential sums, Euler's totient, Diophantine approximation by fractions with bounded denominator, and Mathlib's continued fractions. Lemmas on geometric sums of roots of unity and on the order of units mod nnn are reusable in the companion discrete logarithm mission.

Selected references

  • P. W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM J. Comput. 26(5):1484–1509, 1997. https://doi.org/10.1137/S0097539795293172
  • P. W. Shor, Algorithms for quantum computation: discrete logarithms and factoring, Proc. 35th FOCS, 1994. https://doi.org/10.1109/SFCS.1994.365700
  • G. L. Miller, Riemann's hypothesis and tests for primality, J. Comput. System Sci. 13(3):300–317, 1976. https://doi.org/10.1016/S0022-0000(76)80043-8
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford, 1979 (Ch. X, continued fractions; Thm. 328).
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge, 2000. https://doi.org/10.1017/CBO9780511976667
12 thms3 active usersReviewed
Linear OptimizationOperations ResearchProbability·Captain: mikedeng1

Competitive Randomized Algorithms for Nonuniform Problems IV: The Optimal Randomized Two-Server Ratio 1652/1069 on the 3-4-5 TriangleResearch Paper

Motivation

The kkk-server problem is a basic model of on-line decision making. kkk mobile servers move in a metric space, requests for points arrive one at a time, and each request has to be covered by a server before the next one arrives. The cost is the total distance the servers move. The problem includes paging, caching and disk-head scheduling as special cases (Manasse, McGeoch, Sleator 1990). An on-line algorithm is judged by its competitive factor: how much its cost can exceed that of an off-line algorithm that knows the whole request sequence in advance.

For randomized algorithms against an oblivious adversary (one that fixes the whole request sequence before the algorithm flips any coins), the best-understood case is paging, which is the kkk-server problem on a uniform metric space. There the optimal factor is the harmonic number Hk=∑i=1k1/iH_k=\sum_{i=1}^k 1/iHk​=∑i=1k​1/i. Fiat et al. proved the lower bound (1991) and McGeoch and Sleator the matching upper bound (1991). Karlin, Manasse, McGeoch and Owicki (Algorithmica 11, 1994, §5) asked whether HkH_kHk​-competitive algorithms also exist when the metric space is not uniform. They answered no, already for two servers on three points: on certain triangles the optimal randomized factor is strictly larger than H2=3/2H_2 = 3/2H2​=3/2. This mission formalizes their Theorem 13, which gives the exact optimal factor on the triangle with edge lengths 3, 4 and 5.

Timeline:

  • 1990: Manasse, McGeoch and Sleator introduce the kkk-server problem; kkk is the deterministic optimum for k=2k=2k=2.
  • 1991: Fiat, Karp, Luby, McGeoch, Sleator and Young prove the HkH_kHk​ lower bound for randomized paging. McGeoch and Sleator give an HkH_kHk​-competitive paging algorithm.
  • 1994: Karlin, Manasse, McGeoch and Owicki determine the optimal randomized two-server factors on the isosceles triangles 111-ddd-ddd (Theorem 12) and on the 3-4-5 triangle (Theorem 13, the ratio 1652/10691652/10691652/1069). Both exceed 3/23/23/2.

Setting

Let MMM be a metric space with exactly three points a,b,ca, b, ca,b,c, where d(a,b)=3d(a,b)=3d(a,b)=3, d(a,c)=5d(a,c)=5d(a,c)=5 and d(b,c)=4d(b,c)=4d(b,c)=4. A configuration CCC gives the positions of two labelled servers in MMM. A request sequence σ\sigmaσ is a finite list of points of MMM.

A deterministic on-line algorithm assigns to each prefix of a request sequence a configuration, in which the last request is covered. Its configuration after a prefix therefore cannot depend on later requests. Its initial configuration is the one it assigns to the empty prefix, and its cost CA(σ)C_A(\sigma)CA​(σ) on σ\sigmaσ is the total distance its servers move while serving σ\sigmaσ request by request.

The optimal off-line cost Copt(σ)C_{opt}(\sigma)Copt​(σ) from an initial configuration C0C_0C0​ is the infimum, over all schedules that start at C0C_0C0​ and cover each request of σ\sigmaσ in turn, of the total distance moved.

A randomized on-line algorithm AAA is a probability distribution over deterministic on-line algorithms, all starting at C0C_0C0​. The cost on each fixed σ\sigmaσ is required to be measurable in the random choice, and ECA(σ)\mathbf{E}C_A(\sigma)ECA​(σ) is the expected cost. AAA is ρ\rhoρ-competitive against an oblivious adversary if there is a constant aaa such that for every request sequence σ\sigmaσ,

ECA(σ)≤ρ⋅Copt(σ)+a.\mathbf{E}C_A(\sigma) \le \rho\cdot C_{opt}(\sigma) + a .ECA​(σ)≤ρ⋅Copt​(σ)+a.

These are the definitions of p. 543 of the paper. They are the platform's published KServer_model and KServer_randomized, which this mission reuses unchanged: KServer.RandomizedAlgorithm 2 M and A.IsCompetitiveFrom C₀ ρ.

Formalization targets

Goal: Theorem 13

For every initial configuration C0C_0C0​ of the two servers,

(∀A, ∀ρ, A is ρ-competitive from C0⇒ρ≥16521069) ∧ (∃A, A is 16521069-competitive from C0).\Big(\forall A,\ \forall \rho,\ A \text{ is } \rho\text{-competitive from } C_0 \Rightarrow \rho \ge \tfrac{1652}{1069}\Big)\ \wedge\ \Big(\exists A,\ A \text{ is } \tfrac{1652}{1069}\text{-competitive from } C_0\Big).(∀A, ∀ρ, A is ρ-competitive from C0​⇒ρ≥10691652​) ∧ (∃A, A is 10691652​-competitive from C0​).

The first claim is quantified over all randomized algorithms, so it also covers deterministic ones (point masses). The second claim asks for one algorithm. Together they say that 1652/1069≈1.5451652/1069 \approx 1.5451652/1069≈1.545 is the exact optimal randomized factor on this triangle.

Milestones

  1. The phase LP lower bound (p. 568). Twelve linear constraints in nine probabilities π1,…,π9\pi_1,\dots,\pi_9π1​,…,π9​, three potentials Φab,Φac,Φbc\Phi_{ab},\Phi_{ac},\Phi_{bc}Φab​,Φac​,Φbc​ and a ratio α\alphaα, one constraint for each possible phase of the request sequence, of the form
A’s cost≤α⋅(opt’s cost)+Φinitial−Φfinal.\text{A's cost} \le \alpha\cdot(\text{opt's cost}) + \Phi_{\text{initial}} - \Phi_{\text{final}}.A’s cost≤α⋅(opt’s cost)+Φinitial​−Φfinal​.

Every real solution has α≥1652/1069\alpha \ge 1652/1069α≥1652/1069. 2. The LP attainment (p. 568). The paper's printed probabilities lie in [0,1][0,1][0,1], and with suitable potentials they satisfy all twelve constraints at α=1652/1069\alpha = 1652/1069α=1652/1069. 3. Theorem 13, first claim: the lower bound for every randomized algorithm. 4. Theorem 13, second claim: a 1652/10691652/10691652/1069-competitive randomized algorithm exists.

Significance

The result. Theorem 13 shows that the HkH_kHk​ behaviour of randomized paging does not carry over to general metric spaces. Two servers on a three-point space already force a factor above 3/23/23/2. The value is exact, which makes this triangle a test case for any general theory of randomized kkk-server algorithms on small metric spaces. With Theorem 12 (the isosceles triangles, a companion mission of this series), it is one of the few non-uniform metric spaces with a known optimal randomized factor.

Formalizing it. The result has been proved since 1994. To our knowledge there is no machine-checked proof. The paper derives both bounds from two framework theorems for phase-based algorithms: Theorem 3 (an LP lower bound for phase-based algorithms bounds every algorithm) and Theorem 2 (a lazy phase-based algorithm with LP bound α\alphaα is α\alphaα-competitive). The phase tables themselves (which phases can occur and what they cost) are stated without detailed proof. A formal proof has to supply both framework arguments for this space and verify the phase tables, as well as the finite linear algebra of milestones 1 and 2. The milestones isolate the exact-arithmetic core so that it can be closed independently of the probabilistic part.

Difficulty

The two LP milestones are finite exact-arithmetic facts. The hard part is linking them to Theorem 13.

For the lower bound, an algorithm need not be phase-based at all. Its probabilities may depend on the whole history, not only on the current phase, and it may leave the configuration of the off-line optimum at the end of a phase. The obvious attempt is to fix one hard request sequence and compare costs, but that cannot work: randomization defeats any single sequence. The reduction from arbitrary algorithms to phase-based ones (the paper's Theorem 3) is the substantive step.

For the upper bound, the printed probabilities describe the algorithm's marginal position after each prefix of a phase. They have to be realized as a single probability distribution over deterministic on-line algorithms that is lazy (it moves only to serve a request) and whose expected cost per phase equals the table's entry. On top of this, the LP accounting has to be turned into a bound on arbitrary request sequences, including partial phases and a start away from the optimum's configuration.

Formalization scope

  • Model. The platform definitions KServer_model and KServer_randomized are used unchanged. Servers are labelled (Config 2 M = Fin 2 → M). A deterministic algorithm is a function of the request prefix, which makes it on-line by construction. A randomized algorithm is a mixed strategy with a probability measure and a measurability field, and its expected cost is the lower Lebesgue integral of the nonnegative cost. The off-line optimum is a real infimum over schedules from C0C_0C0​; the set is nonempty and bounded below by 000. Competitiveness allows any real additive constant.
  • The triangle is given by hypotheses on an arbitrary metric space: every point equals aaa, bbb or ccc, and d(a,b)=3d(a,b)=3d(a,b)=3, d(a,c)=5d(a,c)=5d(a,c)=5, d(b,c)=4d(b,c)=4d(b,c)=4. These hypotheses are satisfiable (3+4≥53+4\ge53+4≥5) and force three distinct points.
  • Initial configuration. Both claims are stated for every initial configuration C0C_0C0​, including both servers on one point. The paper does not fix the start; the additive constant absorbs it.
  • LP milestones. The thirteen LP variables are free reals, with no box 0≤πi≤10\le\pi_i\le 10≤πi​≤1, exactly as the paper permits. This makes milestone 1 stronger than the boxed version; the minimum is the same either way. The twelve constraints are written out one per hypothesis, in the table's order, with the potential difference Φinitial−Φfinal\Phi_{\text{initial}} - \Phi_{\text{final}}Φinitial​−Φfinal​ on the right. In milestone 2 the potentials are existentially quantified, since the paper names none.
  • Not stated. The paper's Theorems 2 and 3 (the phase framework) and the phase tables are not separate milestones. Milestone 1 feeds the first claim through Theorem 3, and milestone 2 feeds the second claim through Theorem 2. Contributions formalizing phase-based algorithms, laziness and the LP-bound reduction for finite metric spaces would be reusable for Theorem 12 and Theorem 14 of the same paper.
  • Ruled out. The lower bound is not restricted to deterministic or to phase-based algorithms, and it is not stated as "one sequence defeats every algorithm". The constant is exactly 1652/10691652/10691652/1069, not an approximation, and the attainment claim is not weakened to "for some initial configuration".

Selected references

  • A. R. Karlin, M. S. Manasse, L. A. McGeoch, S. Owicki, Competitive Randomized Algorithms for Nonuniform Problems, Algorithmica 11 (1994) 542–571. https://doi.org/10.1007/BF01189993
  • M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive Algorithms for Server Problems, Journal of Algorithms 11 (1990) 208–230. https://doi.org/10.1016/0196-6774(90)90003-W
  • A. Fiat, R. M. Karp, M. Luby, L. A. McGeoch, D. D. Sleator, N. E. Young, Competitive Paging Algorithms, Journal of Algorithms 12 (1991) 685–699. https://doi.org/10.1016/0196-6774(91)90041-V
  • L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6 (1991) 816–825. https://doi.org/10.1007/BF01759073
7 thms3 active usersReviewed
Linear OptimizationOperations ResearchProbability·Captain: mikedeng1

Competitive Randomized Algorithms for Nonuniform Problems III: The Optimal Randomized Two-Server Ratio on the 1-d-d Isosceles TriangleResearch Paper

Motivation

The k-server problem of Manasse, McGeoch and Sleator (J. Algorithms 11 (1990)) asks how kkk mobile servers in a metric space should respond, on-line, to a sequence of requests at points of the space, each of which must be covered by a server. It is the central model of on-line computation: paging is the special case of a uniform metric, and many caching and scheduling problems reduce to it. For two servers the deterministic picture is complete: the optimal competitive ratio is 222 on every metric space with at least three points.

Randomization changes the picture, and the smallest nontrivial case already shows how. On the equilateral triangle the optimal randomized ratio against an oblivious adversary is 3/23/23/2. Karlin, Manasse, McGeoch and Owicki (Algorithmica 11 (1994) 542–571) computed the exact optimal randomized ratio for several nonuniform triangles, where the distances differ, and showed that it depends on the geometry. Their Theorem 12 settles the whole family of isosceles triangles with edge lengths 111, ddd, ddd. These exact values are among the few known optimal randomized ratios for server problems.

Timeline:

  • 1990: Manasse, McGeoch and Sleator introduce the kkk-server problem and prove the deterministic two-server ratio is 222.
  • 1990–1994: Karlin, Manasse, McGeoch and Owicki submit this paper (received August 1990, revised September 1991) and publish it in Algorithmica in 1994, with the isosceles-triangle ratios of Theorem 12 and the 3-4-5 triangle ratio 1652/10691652/10691652/1069 of Theorem 13.
  • Later: Karloff, Rabani and Ravid extend the technique to Ω(log⁡log⁡k)\Omega(\log\log k)Ω(loglogk) and Ω(log⁡k)\Omega(\log k)Ω(logk) randomized lower bounds (cited on p. 564); Bubeck, Coester and Rabani (STOC 2023) refute the randomized kkk-server conjecture.

Setting

Fix an integer d≥1d\ge1d≥1. The isosceles triangle MMM has three points aaa, bbb, ccc with

dist⁡(a,b)=1,dist⁡(a,c)=dist⁡(b,c)=d.\operatorname{dist}(a,b)=1,\qquad \operatorname{dist}(a,c)=\operatorname{dist}(b,c)=d.dist(a,b)=1,dist(a,c)=dist(b,c)=d.

A configuration C:{0,1}→MC:\{0,1\}\to MC:{0,1}→M places two labelled servers on points of MMM. A deterministic on-line algorithm assigns to every finite request sequence σ=(r1,…,rn)\sigma=(r_1,\dots,r_n)σ=(r1​,…,rn​) a configuration, computed from σ\sigmaσ alone and covering the last request; its value on the empty sequence is its initial configuration. Its cost CA(σ)C_A(\sigma)CA​(σ) is the total distance its servers move while serving σ\sigmaσ request by request. The off-line optimum Copt(σ)C_{opt}(\sigma)Copt​(σ) from an initial configuration C0C_0C0​ is the least total movement of any schedule that starts at C0C_0C0​ and covers each request in turn, knowing σ\sigmaσ in advance.

A randomized algorithm is a probability distribution on deterministic on-line algorithms; its expected cost is ECA(σ)\mathbf{E}C_A(\sigma)ECA​(σ). It is ρ\rhoρ-competitive against an oblivious adversary from C0C_0C0​ if every algorithm in its support starts at C0C_0C0​ and there is a constant aaa such that

ECA(σ)≤ρ⋅Copt(σ)+afor every request sequence σ.\mathbf{E}C_A(\sigma)\le\rho\cdot C_{opt}(\sigma)+a\qquad\text{for every request sequence }\sigma.ECA​(σ)≤ρ⋅Copt​(σ)+afor every request sequence σ.

The request sequence is fixed in advance and does not react to the algorithm's coin flips.

Write ep=(1+1/p)pe_p=(1+1/p)^pep​=(1+1/p)p and

αd=e2d−1+1/4d(e2d−1−1)+1/2d,e2d−1=(2d2d−1)2d−1.\alpha_d=\frac{e_{2d-1}+1/4d}{(e_{2d-1}-1)+1/2d},\qquad e_{2d-1}=\left(\frac{2d}{2d-1}\right)^{2d-1}.αd​=(e2d−1​−1)+1/2de2d−1​+1/4d​,e2d−1​=(2d−12d​)2d−1.

In Lean this is NonuniformCompetitive.Isosceles.isoscelesRatio d.

Formalization targets

Goal: Theorem 12

For every d≥1d\ge1d≥1 and every initial configuration C0C_0C0​:

∀A, ∀ρ,A is ρ-competitive from C0 ⟹ ρ≥αd,\forall A,\ \forall\rho,\quad A\text{ is }\rho\text{-competitive from }C_0\ \Longrightarrow\ \rho\ge\alpha_d,∀A, ∀ρ,A is ρ-competitive from C0​ ⟹ ρ≥αd​, ∃A: A is αd-competitive from C0.\exists A:\ A\text{ is }\alpha_d\text{-competitive from }C_0.∃A: A is αd​-competitive from C0​.

The two claims are also milestones of their own (no_better_ratio, ratio_attained).

The phase LP (§5, pp. 565–566)

For free real π1,…,π2d−1\pi_1,\dots,\pi_{2d-1}π1​,…,π2d−1​ and real α\alphaα with

(πk)2d+∑i=1k(1−πi)≤αk  (1≤k<2d),2d+∑i=12d−1(1−πi)+12≤α⋅2d,(\pi_k)2d+\sum_{i=1}^k(1-\pi_i)\le\alpha k\ \ (1\le k<2d),\qquad 2d+\sum_{i=1}^{2d-1}(1-\pi_i)+\tfrac12\le\alpha\cdot2d,(πk​)2d+i=1∑k​(1−πi​)≤αk  (1≤k<2d),2d+i=1∑2d−1​(1−πi​)+21​≤α⋅2d,

one has α≥αd\alpha\ge\alpha_dα≥αd​ (lp_lower_bound); and πk=(αd−1)((2d/(2d−1))k−1)\pi_k=(\alpha_d-1)\big((2d/(2d-1))^k-1\big)πk​=(αd​−1)((2d/(2d−1))k−1), π2d=1\pi_{2d}=1π2d​=1 is nondecreasing from π1≥0\pi_1\ge0π1​≥0 to 111 and makes every constraint an equality (lp_attained).

The limit remark (§5, p. 566)

α1<α2<α3<⋯ ,lim⁡d→∞αd=ee−1\alpha_1<\alpha_2<\alpha_3<\cdots,\qquad \lim_{d\to\infty}\alpha_d=\frac{e}{e-1}α1​<α2​<α3​<⋯,d→∞lim​αd​=e−1e​

(ratio_increases_to_e_ratio).

Significance

The theorem gives an exact optimal randomized ratio for an infinite family of metric spaces. It shows that the optimal randomized two-server ratio is not a constant: it runs from 3/23/23/2 on the equilateral triangle to e/(e−1)≈1.582e/(e-1)\approx1.582e/(e−1)≈1.582 as the triangle becomes long and thin, where the problem resembles ski rental. With the deterministic ratio 222, it quantifies exactly how much randomization gains on these spaces.

The results are proved in the paper; none is formalized on Prove2Me, and no machine-checked proof of them is known. A formal proof would require the paper's phase framework (Theorems 1–3 and the appendix's Theorem 15) for server problems, which this mission does not state separately, and a concrete randomized algorithm as a measurable mixed strategy. Both would be reusable for Theorem 13 (the 3-4-5 triangle) and for other exact ratios on small metric spaces.

Difficulty

The phase LP milestones are finite real arithmetic. The difficulty is the passage between them and the goal. The lower bound must hold for every randomized algorithm, not only phase-based lazy ones: an arbitrary algorithm may condition on the whole history, move non-lazily, and randomize in ways that do not reduce to the probabilities πk\pi_kπk​. The paper handles this with Theorem 3, which says that the LP bound of phase-based algorithms bounds the competitive factor of all algorithms; its proof uses an averaging argument over histories that must be made rigorous. The upper bound needs a mixed strategy over infinitely many phases, with measurable costs, an explicit additive constant covering the first partial phase from an arbitrary initial configuration, and an accounting of CoptC_{opt}Copt​ across phase boundaries.

Formalization scope

The model is the platform's published KServer_model and KServer_randomized (reference items): labelled servers Fin 2 → M; a deterministic on-line algorithm as a map from request prefixes to configurations; a randomized algorithm as a probability measure over deterministic algorithms, with the cost of each fixed sequence measurable in the random outcome; expected cost as a lower Lebesgue integral in [0,∞][0,\infty][0,∞]; the off-line optimum as a real infimum over schedules from C0C_0C0​ (nonempty and bounded below by 000); and IsCompetitiveFrom A C₀ c with a real additive constant.

Committed conventions:

  • The triangle is any metric space whose points are exactly a,b,ca,b,ca,b,c at distances 1,d,d1,d,d1,d,d, with ddd a natural number and d≥1d\ge1d≥1. Every such space is isometric to the paper's triangle; at d=0d=0d=0 it would not be a triangle.
  • Both claims are stated for every initial configuration, including both servers on one point. The paper treats the initial state {a,b}\{a,b\}{a,b} separately and absorbs the first partial phase into the additive constant.
  • The lower bound quantifies over all randomized algorithms (deterministic ones are point masses), never over phase-based ones only.
  • In the LP milestones the πk\pi_kπk​ are free reals, as printed; no box 0≤πk≤10\le\pi_k\le10≤πk​≤1 is imposed.
  • "Grows" in the limit remark is read as strictly increasing.
  • The paper prints the recurrence on p. 565 as πk=α−1+(πk−1)2d−12d\pi_k=\frac{\alpha-1+(\pi_{k-1})2d-1}{2d}πk​=2dα−1+(πk−1​)2d−1​; the equations (∗)(*)(∗) give πk=α−1+2d πk−12d−1\pi_k=\frac{\alpha-1+2d\,\pi_{k-1}}{2d-1}πk​=2d−1α−1+2dπk−1​​. The recurrence is not used; the closed form printed on p. 566 is correct and is the one stated.

Without the measurability field of a randomized algorithm the lower integral would under-report expected cost and the attainment claim would become easier than the paper's; the published definition includes it. The lower bound is not vacuous: the triangle hypotheses are satisfiable for every d≥1d\ge1d≥1.

Welcome contributions: a formal version of the phase framework (Theorems 1–3, 15) for finite metric spaces, reusable across missions III and IV; a measurable construction of phase-based randomized algorithms; and proofs of the LP milestones.

Selected references

  • A. R. Karlin, M. S. Manasse, L. A. McGeoch, S. Owicki, Competitive Randomized Algorithms for Nonuniform Problems, Algorithmica 11 (1994) 542–571. https://doi.org/10.1007/BF01189993
  • M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive Algorithms for Server Problems, J. Algorithms 11 (1990) 208–230. https://doi.org/10.1016/0196-6774(90)90003-W
  • H. Karloff, Y. Rabani, Y. Ravid, Lower Bounds for Randomized k-Server and Motion-Planning Algorithms, SIAM J. Comput. 23 (1994) 293–312. https://doi.org/10.1137/S0097539792224838
  • S. Bubeck, C. Coester, Y. Rabani, The Randomized k-Server Conjecture Is False!, STOC 2023. https://arxiv.org/abs/2211.05753
9 thms3 active usersReviewed
🏆Completed
CombinatoricsComplexity TheoryOperations Research+2·Captain: mikedeng1

Maximizing Non-Monotone Submodular Functions V: Beating 1/2 for Symmetric Functions Requires Exponentially Many Value QueriesResearch Paper

Motivation

Maximizing a nonnegative submodular set function without constraints contains Max Cut, Max Directed Cut and facility-location problems as special cases. In the value-oracle model an algorithm knows nothing about the function except the values f(S)f(S)f(S) of the sets SSS it queries, and it is judged by the number of queries it makes. Feige, Mirrokni and Vondrák (SIAM J. Comput. 40(4), 2011) gave constant-factor algorithms in this model and matching limits on what any algorithm can do. For symmetric functions, such as cut functions of undirected graphs, a uniformly random set already achieves 12\tfrac1221​ of the optimum in expectation (Theorem 2.1 of the paper). The question this mission formalizes is whether any algorithm can do better, and the answer given by Theorem 4.5 is: not without exponentially many value queries. The same factor 12\tfrac1221​ was later shown to be achievable for general (non-symmetric) nonnegative submodular functions by Buchbinder, Feldman, Naor and Schwartz (FOCS 2012 / SIAM J. Comput. 2015), so the bound of Theorem 4.5 is the tight limit of the whole problem in the value-oracle model.

Timeline:

  • 2007 (FOCS) / 2011 (SIAM J. Comput.): Feige, Mirrokni and Vondrák prove that no algorithm with subexponentially many value queries achieves (12+ϵ)(\tfrac12 + \epsilon)(21​+ϵ) of the optimum on symmetric nonnegative submodular functions, and give 25\tfrac2552​ for general functions.
  • 2011: Vondrák's symmetry-gap framework (SIAM J. Comput. 42(1), 2013) generalizes the construction to constrained problems.
  • 2012: Buchbinder, Feldman, Naor and Schwartz give a randomized 12\tfrac1221​-approximation for general nonnegative submodular functions, matching the bound.

Setting

Let [n]={0,…,n−1}[n] = \{0, \dots, n-1\}[n]={0,…,n−1} be the ground set, with nnn even. A set function f:2[n]→Rf : 2^{[n]} \to \mathbb{R}f:2[n]→R is submodular if f(S∪T)+f(S∩T)≤f(S)+f(T)f(S \cup T) + f(S \cap T) \le f(S) + f(T)f(S∪T)+f(S∩T)≤f(S)+f(T) for all S,TS, TS,T, symmetric if f([n]∖S)=f(S)f([n]\setminus S) = f(S)f([n]∖S)=f(S) for all SSS, and OPT(f)=max⁡Sf(S)\mathrm{OPT}(f) = \max_{S} f(S)OPT(f)=maxS​f(S).

Fix an integer mmm with 1≤m≤n/21 \le m \le n/21≤m≤n/2 and write ϵ=m/n\epsilon = m/nϵ=m/n, so that ϵn\epsilon nϵn is an integer. For integers k,ℓk, \ellk,ℓ put

f(k,ℓ)={(k+ℓ)(n−k−ℓ)∣k−ℓ∣≤m,k(n−2ℓ)+(n−2k)ℓ+m2−2m∣k−ℓ∣∣k−ℓ∣>m.f(k,\ell) = \begin{cases} (k+\ell)(n-k-\ell) & |k-\ell| \le m,\\ k(n-2\ell) + (n-2k)\ell + m^2 - 2m|k-\ell| & |k-\ell| > m. \end{cases}f(k,ℓ)={(k+ℓ)(n−k−ℓ)k(n−2ℓ)+(n−2k)ℓ+m2−2m∣k−ℓ∣​∣k−ℓ∣≤m,∣k−ℓ∣>m.​

For a set C⊆[n]C \subseteq [n]C⊆[n] with ∣C∣=n/2|C| = n/2∣C∣=n/2 and D=[n]∖CD = [n] \setminus CD=[n]∖C, the hard instance is fC(S)=f(∣S∩C∣,∣S∩D∣)f_C(S) = f(|S\cap C|, |S\cap D|)fC​(S)=f(∣S∩C∣,∣S∩D∣). The cut function of the complete graph is g(S)=∣S∣(n−∣S∣)g(S) = |S|(n-|S|)g(S)=∣S∣(n−∣S∣), with maximum 14n2\tfrac14 n^241​n2. A set QQQ is balanced for CCC if ∣∣Q∩C∣−∣Q∩D∣∣≤m\bigl||Q\cap C| - |Q\cap D|\bigr| \le m​∣Q∩C∣−∣Q∩D∣​≤m; on balanced sets fC=gf_C = gfC​=g.

A deterministic adaptive qqq-query algorithm AAA chooses each query from the answers received so far, and after qqq answers outputs a set A(h)A(h)A(h) when run against an oracle hhh. A randomized algorithm is a distribution μ\muμ over deterministic ones, with expected value EA∼μ[h(A(h))]\mathbb{E}_{A\sim\mu}[h(A(h))]EA∼μ​[h(A(h))].

Formalization targets

Goal: Theorem 4.5 with the constants of its proof

For every such n,mn, mn,m:

  1. every fCf_CfC​ with ∣C∣=n/2|C| = n/2∣C∣=n/2 is nonnegative, symmetric and submodular, with
OPT(fC)=12n2(1−2ϵ+2ϵ2);\mathrm{OPT}(f_C) = \tfrac12 n^2 (1 - 2\epsilon + 2\epsilon^2);OPT(fC​)=21​n2(1−2ϵ+2ϵ2);
  1. for every q<eϵ2n/8q < e^{\epsilon^2 n/8}q<eϵ2n/8 and every randomized qqq-query algorithm μ\muμ there is a CCC with ∣C∣=n/2|C| = n/2∣C∣=n/2 and
EA∼μ[fC(A(fC))]≤14n2+(2e−ϵ2n/8+2e−ϵ2n/4) OPT(fC).\mathbb{E}_{A\sim\mu}\bigl[f_C(A(f_C))\bigr] \le \tfrac14 n^2 + \bigl(2e^{-\epsilon^2 n/8} + 2e^{-\epsilon^2 n/4}\bigr)\,\mathrm{OPT}(f_C).EA∼μ​[fC​(A(fC​))]≤41​n2+(2e−ϵ2n/8+2e−ϵ2n/4)OPT(fC​).

Hence the ratio attained is at most 12(1−2ϵ+2ϵ2)+4e−ϵ2n/8=12+ϵ+O(ϵ2)+4e−ϵ2n/8\frac{1}{2(1-2\epsilon+2\epsilon^2)} + 4e^{-\epsilon^2 n/8} = \tfrac12 + \epsilon + O(\epsilon^2) + 4e^{-\epsilon^2 n/8}2(1−2ϵ+2ϵ2)1​+4e−ϵ2n/8=21​+ϵ+O(ϵ2)+4e−ϵ2n/8.

Milestones

  • Theorem 1.2, the Chernoff bound for independent variables in [−1,1][-1,1][−1,1].
  • Submodularity of fCf_CfC​.
  • The value OPT(fC)=12n2(1−2ϵ+2ϵ2)\mathrm{OPT}(f_C) = \tfrac12 n^2(1 - 2\epsilon + 2\epsilon^2)OPT(fC​)=21​n2(1−2ϵ+2ϵ2), attained at S=CS = CS=C.
  • A fixed query is unbalanced for at most a 2e−ϵ2n/42e^{-\epsilon^2 n/4}2e−ϵ2n/4 fraction of the half-size sets CCC.
  • If all queries are balanced, the algorithm cannot distinguish fCf_CfC​ from ggg.
  • The deterministic case of the bound, averaged over CCC.

Significance

The theorem shows that the factor 12\tfrac1221​ for symmetric submodular maximization, and hence for unconstrained submodular maximization in general, cannot be improved by any algorithm that uses a subexponential number of value queries, whatever its running time. It is an information-theoretic bound and needs no complexity assumption. Along with the later matching 12\tfrac1221​-approximation, it settles the value-oracle approximability of the problem. The construction, a function equal to a symmetric function on "balanced" sets and larger elsewhere, is the prototype of the symmetry-gap technique used for many later oracle lower bounds.

The result is proved in the paper. No machine-checked version is known to exist: the platform has no value-oracle or query-lower-bound statement. Formalizing it requires a precise model of adaptive randomized query algorithms, a concentration bound for the hypergeometric distribution, and a finite verification of submodularity of an explicit two-regime function, and it fixes the constants that the printed statement leaves as O(⋅)O(\cdot)O(⋅) terms.

Difficulty

Two steps of the printed argument do not go through as written. First, the proof bounds the probability that a fixed query is unbalanced by citing the Chernoff bound for independent variables, but for a uniformly random half-size set CCC the count ∣Q∩C∣|Q\cap C|∣Q∩C∣ is hypergeometric, and the summands are not independent. A bound for sampling without replacement is needed instead. Replacing the balanced partition by independent coin flips is not an option: then ∣C∣≠n/2|C| \ne n/2∣C∣=n/2 in general, and the function is no longer the paper's instance.

Second, the argument counts only the queries, but the value an algorithm receives is fCf_CfC​ of its output, which equals ggg of the output only if the output is balanced as well. That event has to be controlled too.

Finally, submodularity of fCf_CfC​ must be checked across the boundary ∣k−ℓ∣=ϵn|k-\ell| = \epsilon n∣k−ℓ∣=ϵn between the two regimes, where the formula changes.

Formalization scope

  • The ground set is Fin n with nnn even; ϵn\epsilon nϵn is an integer mmm with 1≤m1 \le m1≤m and 2m≤n2m \le n2m≤n, following the paper's "assume that ϵn\epsilon nϵn is an integer". Sets are Finset (Fin n), and all values are real.
  • OPT\mathrm{OPT}OPT is Finset.sup' over all subsets. There is no junk value.
  • The partition (C,D)(C, D)(C,D) is uniform over half-size sets; probabilities over it are counts of n/2-subsets divided by (nn/2)\binom{n}{n/2}(n/2n​), written multiplied out.
  • A deterministic algorithm is a pair of decision rules query, output : List ℝ → Finset (Fin n) making exactly qqq adaptive queries with arbitrary real answers. A randomized algorithm is a PMF over deterministic algorithms, which covers every randomization with countable support. The algorithm sees fff only through query answers; it never receives CCC.
  • Pinned-down constants. The printed theorem, "fewer than eϵ2n/8e^{\epsilon^2 n/8}eϵ2n/8 queries" and "expected value at least (12+ϵ)OPT(\tfrac12+\epsilon)\mathrm{OPT}(21​+ϵ)OPT", is not what the proof gives for one and the same ϵ\epsilonϵ. On the proof's instances OPT=12n2(1−2ϵ+2ϵ2)\mathrm{OPT} = \tfrac12 n^2(1-2\epsilon+2\epsilon^2)OPT=21​n2(1−2ϵ+2ϵ2), and the ratio held is 12(1−2ϵ+2ϵ2)>12+ϵ\frac{1}{2(1-2\epsilon+2\epsilon^2)} > \tfrac12 + \epsilon2(1−2ϵ+2ϵ2)1​>21​+ϵ. The formal goal states the explicit bound the proof establishes. The literal printed pair, stated for the proof's family with the same ϵ\epsilonϵ, is false: the zero-query algorithm that outputs a fixed half-size set gets at least 14n2>(12+ϵ)OPT\tfrac14 n^2 > (\tfrac12+\epsilon)\mathrm{OPT}41​n2>(21​+ϵ)OPT.
  • Added term. The error term 2e−ϵ2n/42e^{-\epsilon^2 n/4}2e−ϵ2n/4 for the output set is added to the paper's 2e−ϵ2n/82e^{-\epsilon^2 n/8}2e−ϵ2n/8.
  • Ruled-out trivializations. A restricted algorithm class (non-adaptive, deterministic, or one that must return a queried set) would give a different, weaker theorem. So would a bound that lets the algorithm read CCC, which would make the statement false. Both the instance's properties (nonnegativity, symmetry, submodularity, the value of OPT) and the bound are part of the goal, so an empty or degenerate family cannot satisfy it. The quantifier order is: for every algorithm there is an instance.
  • Needed infrastructure: a value-oracle algorithm model; tail bounds for the hypergeometric distribution (Hoeffding's inequality for sampling without replacement), which Mathlib lacks; averaging over a PMF of algorithms. The algorithm model and the hypergeometric bound are reusable for other oracle lower bounds. Proofs of any milestone, and alternative derivations of the balance bound, are welcome.

Selected references

  • U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4):1133–1153, 2011. https://doi.org/10.1137/090779346
  • N. Alon, J. H. Spencer, The Probabilistic Method, Wiley (source of Theorem 1.2).
  • W. Hoeffding, Probability Inequalities for Sums of Bounded Random Variables, J. Amer. Statist. Assoc. 58(301):13–30, 1963. https://doi.org/10.1080/01621459.1963.10500830
  • J. Vondrák, Symmetry and Approximability of Submodular Maximization Problems, SIAM J. Comput. 42(1):265–304, 2013. https://doi.org/10.1137/110832318
  • N. Buchbinder, M. Feldman, J. Naor, R. Schwartz, A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization, SIAM J. Comput. 44(5):1384–1402, 2015. https://doi.org/10.1137/130929205
12 thms3 active usersReviewed
🏆Completed
CombinatoricsOperations ResearchOptimization+1·Captain: mikedeng1

Maximizing Non-Monotone Submodular Functions IV: Smooth Local Search Achieves 2/5 of the OptimumResearch Paper

Motivation

Many optimization problems ask for a subset of a finite ground set that maximizes a submodular function, a set function with diminishing marginal returns. Max Cut and Max Directed Cut in graphs, facility location with fixed costs, and the maximization of mutual information or entropy of a subset of random variables are all of this form. Unlike the monotone case, where a greedy algorithm achieves 1−1/e1 - 1/e1−1/e, a general nonnegative submodular function may decrease when elements are added, and the empty set and the full set can both be poor. The question is how large a constant fraction of the optimum a polynomial-time algorithm can guarantee when the function is given only through an oracle that returns f(S)f(S)f(S) for a queried set SSS.

Feige, Mirrokni and Vondrák (SIAM J. Comput. 40(4), 2011) gave the first constant-factor algorithms for this problem. A uniformly random set achieves 1/41/41/4 of the optimum, a deterministic local search achieves 1/3−ϵ/n1/3 - \epsilon/n1/3−ϵ/n, and a randomized smooth local search achieves 2/5−o(1)2/5 - o(1)2/5−o(1). The last result is the paper's best approximation for general nonnegative submodular functions (Table 1, p. 1136), and it is the subject of this mission.

Timeline. Feige, Mirrokni and Vondrák: 1/41/41/4, 1/31/31/3 and 2/52/52/5 (FOCS 2007; journal version 2011). Gharan and Vondrák (SODA 2011): about 0.410.410.41 by simulated annealing. Buchbinder, Feldman, Naor and Schwartz (FOCS 2012; SIAM J. Comput. 2015): a randomized double greedy algorithm achieving 1/21/21/2, which matches the 1/21/21/2 hardness in the value oracle model proved in the same paper by Feige, Mirrokni and Vondrák.

Setting

Let XXX be a finite ground set with n=∣X∣≥1n = |X| \ge 1n=∣X∣≥1 elements and f:2X→Rf : 2^X \to \mathbb{R}f:2X→R a function with f(S)≥0f(S) \ge 0f(S)≥0 for all SSS and

f(S∪T)+f(S∩T)≤f(S)+f(T)(S,T⊆X).f(S \cup T) + f(S \cap T) \le f(S) + f(T) \quad (S, T \subseteq X).f(S∪T)+f(S∩T)≤f(S)+f(T)(S,T⊆X).

Write OPT=max⁡S⊆Xf(S)OPT = \max_{S \subseteq X} f(S)OPT=maxS⊆X​f(S). The multilinear extension of fff is

F(x)=∑S⊆Xf(S)∏i∈Sxi∏j∉S(1−xj),F(x) = \sum_{S \subseteq X} f(S) \prod_{i \in S} x_i \prod_{j \notin S} (1 - x_j),F(x)=S⊆X∑​f(S)i∈S∏​xi​j∈/S∏​(1−xj​),

the expected value of fff on a random set containing each iii independently with probability xix_ixi​.

For A⊆XA \subseteq XA⊆X and δ∈[−1,1]\delta \in [-1,1]δ∈[−1,1], the random set R(A,δ)\mathcal{R}(A,\delta)R(A,δ) is sampled with bias δ\deltaδ based on AAA: each element of AAA is included independently with probability p=(1+δ)/2p = (1+\delta)/2p=(1+δ)/2, each element of B=X∖AB = X \setminus AB=X∖A with probability q=(1−δ)/2q = (1-\delta)/2q=(1−δ)/2. The potential is Φ(A)=E[f(R(A,δ))]\Phi(A) = \mathbf{E}[f(\mathcal{R}(A,\delta))]Φ(A)=E[f(R(A,δ))] and the smoothed marginal value of xxx is

ωA,δ(x)=E[f(R(A,δ)∪{x})]−E[f(R(A,δ)∖{x})].\omega_{A,\delta}(x) = \mathbf{E}[f(\mathcal{R}(A,\delta) \cup \{x\})] - \mathbf{E}[f(\mathcal{R}(A,\delta) \setminus \{x\})].ωA,δ​(x)=E[f(R(A,δ)∪{x})]−E[f(R(A,δ)∖{x})].

Algorithm SLS starts from A=∅A = \emptysetA=∅. At each iteration it obtains estimates ω~A,δ(x)\tilde\omega_{A,\delta}(x)ω~A,δ​(x) within ±1n2OPT\pm\frac{1}{n^2}OPT±n21​OPT of ωA,δ(x)\omega_{A,\delta}(x)ωA,δ​(x). If some x∉Ax \notin Ax∈/A has ω~A,δ(x)>2n2OPT\tilde\omega_{A,\delta}(x) > \frac{2}{n^2}OPTω~A,δ​(x)>n22​OPT it adds xxx; otherwise, if some x∈Ax \in Ax∈A has ω~A,δ(x)<−2n2OPT\tilde\omega_{A,\delta}(x) < -\frac{2}{n^2}OPTω~A,δ​(x)<−n22​OPT it removes xxx; otherwise it stops and returns a random set R(A,δ′)\mathcal{R}(A, \delta')R(A,δ′).

Formalization targets

Goal: Theorem 3.6 in the explicit form of its proof

With δ=1/3\delta = 1/3δ=1/3, and δ′=1/3\delta' = 1/3δ′=1/3 with probability 0.90.90.9 or δ′=−1\delta' = -1δ′=−1 with probability 0.10.10.1: for every run from ∅\emptyset∅ whose estimates are all accurate and which has terminated at AAA,

910 E[f(R(A,13))]+110 f(X∖A)≥(25−95n)OPT,\tfrac{9}{10}\,\mathbf{E}[f(\mathcal{R}(A,\tfrac13))] + \tfrac{1}{10}\,f(X \setminus A) \ge \Big(\frac{2}{5} - \frac{9}{5n}\Big) OPT,109​E[f(R(A,31​))]+101​f(X∖A)≥(52​−5n9​)OPT,

and, for every δ∈(0,1]\delta \in (0,1]δ∈(0,1], every run of kkk iterations with accurate estimates has k<n2/δk < n^2/\deltak<n2/δ (fewer than 3n23n^23n2 for δ=1/3\delta = 1/3δ=1/3).

Milestones, in attack order

  • Lemma 2.2: E[g(A(p))]≥(1−p)g(∅)+p g(A)\mathbf{E}[g(A(p))] \ge (1-p)g(\emptyset) + p\,g(A)E[g(A(p))]≥(1−p)g(∅)+pg(A).
  • Display (∗): for three independently sampled sets, E[f(A1(p1)∪A2(p2)∪A3(p3))]≥∑I⊆{1,2,3}∏i∈Ipi∏i∉I(1−pi)f(⋃i∈IAi)\mathbf{E}[f(A_1(p_1) \cup A_2(p_2) \cup A_3(p_3))] \ge \sum_{I \subseteq \{1,2,3\}} \prod_{i\in I} p_i \prod_{i \notin I}(1-p_i) f(\bigcup_{i \in I} A_i)E[f(A1​(p1​)∪A2​(p2​)∪A3​(p3​))]≥∑I⊆{1,2,3}​∏i∈I​pi​∏i∈/I​(1−pi​)f(⋃i∈I​Ai​).
  • The increment identity Φ(A∪{x})−Φ(A)=δ ωA,δ(x)\Phi(A \cup \{x\}) - \Phi(A) = \delta\,\omega_{A,\delta}(x)Φ(A∪{x})−Φ(A)=δωA,δ​(x) for x∉Ax \notin Ax∈/A, and its removal counterpart.
  • 0≤Φ(A)≤OPT0 \le \Phi(A) \le OPT0≤Φ(A)≤OPT.
  • The terminal upper estimates E[f(R∪(B∩C))], E[f(R∩(B∪C))]≤E[f(R)]+2nOPT\mathbf{E}[f(R \cup (B\cap C))],\ \mathbf{E}[f(R \cap (B \cup C))] \le \mathbf{E}[f(R)] + \frac{2}{n}OPTE[f(R∪(B∩C))], E[f(R∩(B∪C))]≤E[f(R)]+n2​OPT.
  • The two lower bounds in 272727ths on the same two expectations.
  • The final chain E[f(R)]+19f(B)+2nOPT≥49OPT\mathbf{E}[f(R)] + \frac19 f(B) + \frac2n OPT \ge \frac49 OPTE[f(R)]+91​f(B)+n2​OPT≥94​OPT.

Significance

The 2/52/52/5 bound showed that local search on a smoothed objective, the multilinear extension restricted to points with two coordinate values, beats both uniform sampling and plain local search for non-monotone submodular maximization. The multilinear extension later became the standard tool for submodular maximization under constraints, through continuous greedy methods, contention resolution schemes and the analysis of randomized rounding. Display (∗) and Lemma 2.2 are the basic sampling inequalities for submodular functions and are reused throughout that literature.

The result is proved in the paper; it has been superseded in ratio by later algorithms reaching 1/21/21/2. To our knowledge none of it is machine-checked: Mathlib has no multilinear extension and no submodular maximization results. This mission produces a checked form of the analysis with every constant explicit: the o(1)o(1)o(1) as 95n\frac{9}{5n}5n9​, "polynomial time" as n2/δn^2/\deltan2/δ iterations, and the dependence on the accuracy of the sampled estimates as an explicit hypothesis.

Difficulty

The iteration bound and the increment identity are routine once the multilinear extension is set up. The substance lies in the lower bounds. The returned set RRR is random, so the comparison with the optimal set CCC cannot be made through a single local-optimality inequality as in deterministic local search; and approximate local optimality holds only for the smoothed marginals ωA,δ\omega_{A,\delta}ωA,δ​, which are averages over the random set, not for fff at any fixed set. Sampling inequalities such as (∗) are stated for independent samples of arbitrary, possibly overlapping sets, and their expectations are sums over products of subsets; the bookkeeping of such sums is the main formalization burden. The constants must also balance exactly: with δ=1/3\delta = 1/3δ=1/3 the 272727ths add up so that the 910/110\frac{9}{10}/\frac{1}{10}109​/101​ mixture yields 2/52/52/5. A different split or a different δ\deltaδ gives a different constant.

Formalization scope

The ground set is a Fintype X with decidable equality; sets are Finset X; fff is real valued, with nonnegativity and submodularity as hypotheses. The standing assumptions of the paper are made explicit: f≥0f \ge 0f≥0 (§3), value-oracle access (modelled by fff itself), n=∣X∣n = |X|n=∣X∣, and n≥1n \ge 1n≥1 (Nonempty X), so that 1n2\frac{1}{n^2}n21​ and 95n\frac{9}{5n}5n9​ are not Lean's junk value of division by zero. OPTOPTOPT is Finset.sup' over all subsets, which has no junk value. Every expectation over independently sampled sets is an exact finite sum: the multilinear extension for R(A,δ)\mathcal{R}(A,\delta)R(A,δ), and iterated sums over subsets for the several independent samples in Lemma 2.2 and (∗). Sampling probabilities carry 0≤p≤10 \le p \le 10≤p≤1.

The algorithm is a relation, not a choice: any element meeting the step-3 condition may be added, and removal is allowed only when no addition applies. The goal quantifies over every run from ∅\emptyset∅, every choice of accurate estimates, recomputed at every iteration, and every termination point. Accuracy is non-strict ("within ±\pm±"); the thresholds are strict. The thresholds and accuracy use OPTOPTOPT itself, as the proof does, although step 1 of the algorithm says an estimate of OPTOPTOPT is used. The sampling that produces the estimates and its "with high probability" are not modelled, and the goal is conditional on accurate estimates. The value of the δ′=−1\delta' = -1δ′=−1 branch is written as E[f(R(A,−1))]\mathbf{E}[f(\mathcal{R}(A,-1))]E[f(R(A,−1))], which equals f(X∖A)f(X \setminus A)f(X∖A).

A statement "every AAA satisfying the terminal conditions gives 2/5−9/(5n)2/5 - 9/(5n)2/5−9/(5n)" would be the final milestone plus arithmetic and is not the goal. The goal fixes the start at ∅\emptyset∅, the thresholds, the step order, the accuracy of every estimate, termination and the 0.9/0.10.9/0.10.9/0.1 mixture.

A complete development needs basic calculus of the multilinear extension: affinity in one coordinate, translation f(⋅∪D)f(\cdot \cup D)f(⋅∪D) and restriction f(⋅∩D)f(\cdot \cap D)f(⋅∩D), and splitting a sample into disjoint pieces. These lemmas are reusable for any work on submodular maximization, and contributions of them as separate theorems are welcome. The golden-ratio variant δ=δ′\delta = \delta'δ=δ′ (proof omitted in the paper), the tight example and the hardness results of §4 are out of scope.

Selected references

  • U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4):1133–1153, 2011. https://doi.org/10.1137/090779346
  • S. O. Gharan, J. Vondrák, Submodular Maximization by Simulated Annealing, SODA 2011. https://doi.org/10.1137/1.9781611973082.83
  • N. Buchbinder, M. Feldman, J. Naor, R. Schwartz, A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization, SIAM J. Comput. 44(5):1384–1402, 2015. https://doi.org/10.1137/130929205
  • G. Calinescu, C. Chekuri, M. Pál, J. Vondrák, Maximizing a Monotone Submodular Function Subject to a Matroid Constraint, SIAM J. Comput. 40(6):1740–1766, 2011. https://doi.org/10.1137/080733991
14 thms3 active usersReviewed
🏆Completed
Combinatorics·Captain: mikedeng1

Three Partition Refinement Algorithms 1: Distinguishing-Prefix Refinement Finds Every Distinguishing Prefix Within m′ Refinement StepsResearch Paper

Motivation

Sorting a collection of strings in lexicographic order is a basic subroutine in compilers, string indexing, suffix sorting and the construction of tries. The classical method, due to Aho, Hopcroft and Ullman (The Design and Analysis of Computer Algorithms, 1974), is a multipass radix sort that processes the strings from the last position to the first and runs in time proportional to the total length mmm of the input plus the alphabet size kkk. Mehlhorn showed that a straightforward first-to-last scan of equal-length strings needs Ω(km)\Omega(km)Ω(km) time.

Paige and Tarjan (Three Partition Refinement Algorithms, SIAM J. Comput. 16(6):973–989, 1987, doi:10.1137/0216062) observed that most of the input is usually irrelevant to the sorted order: only the shortest prefix of each string that tells it apart from the others matters. Their algorithm separates the problem into two steps: (1) find this distinguishing prefix of every string, and (2) sort the distinguishing prefixes. The first step is carried out by partition refinement, the same technique that the paper then applies to the relational coarsest partition problem (the second mission of this series) and to double lexical ordering. This mission formalizes the correctness and the termination bound of the first step.

Setting

Fix k≥1k \ge 1k≥1 and the alphabet Σ={1,2,…,k}\Sigma = \{1, 2, \dots, k\}Σ={1,2,…,k}, together with an end marker 000 that is smaller than every symbol. A string is a finite sequence over Σ∪{0}\Sigma \cup \{0\}Σ∪{0}; λ\lambdaλ is the empty string, ∣x∣|x|∣x∣ is the length of xxx, and x(i)x(i)x(i) is its iii-th symbol (positions start at 111). A string α\alphaα is a prefix of yyy if y=αzy = \alpha zy=αz for some string zzz; every string is a prefix of itself. Σ∗0\Sigma^*0Σ∗0 is the set of strings over Σ\SigmaΣ followed by one 000.

The input is a multiset U={x1,…,xn}⊆Σ∗0U = \{x_1, \dots, x_n\} \subseteq \Sigma^*0U={x1​,…,xn​}⊆Σ∗0 with n≥1n \ge 1n≥1; repeated strings are allowed. The distinguishing prefix xi′x'_ixi′​ of xix_ixi​ in UUU is

  1. the shortest prefix of xix_ixi​ that is not a prefix of any other string of UUU, if xix_ixi​ occurs only once in UUU;
  2. xix_ixi​ itself, if xix_ixi​ occurs more than once.

Write m′=∑i=1n∣xi′∣m' = \sum_{i=1}^n |x'_i|m′=∑i=1n​∣xi′​∣.

For a string α\alphaα, the labeled block BαB_\alphaBα​ is the multiset of strings of UUU having α\alphaα as a prefix, and α\alphaα is its associated prefix. The block is finished if α=xi′\alpha = x'_iα=xi′​ for some iii, and unfinished otherwise. A state PPP is a set of labeled blocks. For an unfinished block Bα∈PB_\alpha \in PBα​∈P,

split(Bα,P)=(P∖{Bα})∪{ Bαu:u∈Σ∪{0}, ∃x∈Bα, x(∣α∣+1)=u }.\mathrm{split}(B_\alpha, P) = \bigl(P \setminus \{B_\alpha\}\bigr) \cup \{\, B_{\alpha u} : u \in \Sigma \cup \{0\},\ \exists x \in B_\alpha,\ x(|\alpha| + 1) = u \,\}.split(Bα​,P)=(P∖{Bα​})∪{Bαu​:u∈Σ∪{0}, ∃x∈Bα​, x(∣α∣+1)=u}.

The refinement algorithm starts from P0={Bλ}P_0 = \{B_\lambda\}P0​={Bλ​} and repeatedly applies the step Refine: pick any unfinished block Bα∈PB_\alpha \in PBα​∈P and replace PPP by split(Bα,P)\mathrm{split}(B_\alpha, P)split(Bα​,P). A run with KKK steps is a sequence P0,P1,…,PKP_0, P_1, \dots, P_KP0​,P1​,…,PK​ produced this way; any choice of unfinished block is allowed at every step.

Formalization targets

Goal: Theorem 1 with its explicit bound

For every run P0,…,PKP_0, \dots, P_KP0​,…,PK​ of the refinement algorithm,

K≤m′and(no block of PK is unfinished)  ⟹  PK={Bx1′,…,Bxn′}.K \le m' \qquad\text{and}\qquad \bigl(\text{no block of } P_K \text{ is unfinished}\bigr) \implies P_K = \{B_{x'_1}, \dots, B_{x'_n}\}.K≤m′and(no block of PK​ is unfinished)⟹PK​={Bx1′​​,…,Bxn′​​}.

The paper states Theorem 1 as "The algorithm terminates and is correct"; the bound K≤m′K \le m'K≤m′ is the explicit count proved in the last sentence of its proof (p. 975). The goal leaves the choice of unfinished block free, so it holds for every refinement order.

Milestones

  1. End markers (§2, p. 974). No string of UUU is a proper prefix of another string of UUU.
  2. Lemma 1 (p. 975). Along every run, every finished block BβB_\betaBβ​ is contained in a block of the current state, and there is Bα∈PjB_\alpha \in P_jBα​∈Pj​ with α\alphaα a prefix of β\betaβ.
  3. Proof of Theorem 1, second sentence. For every state of every run, ∑Bα∈Pj∣α∣≤m′\sum_{B_\alpha \in P_j} |\alpha| \le m'∑Bα​∈Pj​​∣α∣≤m′.
  4. Proof of Theorem 1, third sentence. Every Refine step strictly increases ∑Bα∈P∣α∣\sum_{B_\alpha \in P} |\alpha|∑Bα​∈P​∣α∣.

A supplementary item states the fact on p. 974 that motivates the two-step design: distinct strings have distinct distinguishing prefixes, and xi≤xjx_i \le x_jxi​≤xj​ iff xi′≤xj′x'_i \le x'_jxi′​≤xj′​ in lexicographic order.

Significance

Theorem 1 is the correctness half of the lexicographic sorting algorithm: once the distinguishing prefixes are known, sorting UUU reduces to sorting strings of total length m′m'm′, which is how the paper obtains its O(m′+k)O(m' + k)O(m′+k) time bound in place of O(m+k)O(m + k)O(m+k). The paper notes that under a natural probability model m′m'm′ is of order nlog⁡knn \log_k nnlogk​n, so the gain is large whenever the strings are long. The invariant of Lemma 1 is also the pattern on which the later partition refinement algorithms of the paper are built: a target partition is shown to refine every intermediate partition, and a potential function bounds the number of refinement steps.

The result has been proved since 1987. What this mission adds is a machine-checked account of the algorithm at the level of its abstract refinement steps, with the explicit bound m′m'm′ rather than an asymptotic statement, and with the standing assumptions of §2 (non-empty input, end markers) made explicit. No formal proof of this algorithm is present in Mathlib or on the platform.

Difficulty

The obvious argument, "each step makes the labels longer, and labels never grow past the distinguishing prefixes", needs two facts that are not immediate from the definitions. First, the labels of a reached state must form a partition of UUU into non-empty blocks whose labels are pairwise incomparable under the prefix order; this is an invariant of the algorithm, not part of the definition of a state, and it fails for arbitrary sets of labels. Second, the label of an unfinished block must be a proper prefix of every finished label below it, which rests on the end marker: without end markers a string can be a proper prefix of another, a block can be unfinished yet have no strictly longer children, and the algorithm can stall. Bounding the sum of label lengths by m′m'm′ is not a label-by-label comparison: a state can have fewer labels than strings, and the distinguishing prefixes of different strings can share a label as a common prefix.

Formalization scope

Strings are List (Fin (k + 1)), with 0 : Fin (k + 1) the end marker and prefix the Mathlib relation <+:. The multiset UUU is a family x : Fin n → List (Fin (k + 1)), so repetitions are distinct indices. The hypotheses 0 < n and EndMarked x (U⊆Σ∗0U \subseteq \Sigma^*0U⊆Σ∗0) are the paper's standing assumptions. A block is identified by its label, not by its set of members: two different labels can carry the same strings (for instance Bλ=B1B_\lambda = B_1Bλ​=B1​ when every string begins with 111), and they are different blocks. A state is a Finset of labels; a run is a map Fin (K + 1) → Finset (List (Fin (k + 1))) starting at {[]}. Positions are 1-based in the paper and 0-based in Lean, so x(∣α∣+1)x(|\alpha|+1)x(∣α∣+1) is (x i)[α.length]?. The distinguishing prefix follows the literal definition; for n=1n = 1n=1 it is the empty string.

The running times O(m′+k)O(m' + k)O(m′+k) and O(n+k)O(n + k)O(n+k) space, the implementation with a queue and a global index, and step two (sorting the prefixes via the refinement tree) are RAM-model statements and are not formalized. Only the explicit step count m′m'm′ is. A formalization in which split added all k+1k + 1k+1 children, added none, or allowed refining a finished block would change the theorem (the bound fails or the goal becomes vacuous); the definitions add exactly the children realized by some string of the block and refine only unfinished blocks.

Contributions welcome: proofs of the milestones, a general API for prefix-closed partition refinement on List, and a proof of the order-preservation item via Mathlib's List.Lex.

Selected references

  • R. Paige, R. E. Tarjan, Three Partition Refinement Algorithms, SIAM Journal on Computing 16(6):973–989, 1987. https://doi.org/10.1137/0216062
  • A. V. Aho, J. E. Hopcroft, J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, 1974.
  • K. Mehlhorn, Data Structures and Algorithms 1: Sorting and Searching, Springer, 1984. https://doi.org/10.1007/978-3-642-69672-5
7 thms3 active usersReviewed
🏆Completed
CombinatoricsGraph TheoryOperations Research·Captain: mikedeng1

A Linear-Time Algorithm for Finding a Sparse k-Connected Spanning Subgraph of a k-Connected Graph 2: FOREST's Forests E_i Preserve Local Node-Connectivity up to i in a Simple GraphResearch Paper

Motivation

Given a kkk-connected graph, many connectivity algorithms run in time that grows with the number of edges ∣E∣|E|∣E∣. A sparse certificate is a spanning subgraph with only O(k∣V∣)O(k|V|)O(k∣V∣) edges that is still kkk-connected; computing one first and running the expensive algorithm on it replaces ∣E∣|E|∣E∣ by k∣V∣k|V|k∣V∣ in the bound. Finding a kkk-connected spanning subgraph with the minimum number of edges is NP-complete for every fixed k≥2k \ge 2k≥2 (Garey and Johnson, problem GT31), so the question is how cheaply a sparse, not necessarily minimum, certificate can be found.

Nagamochi and Ibaraki (Algorithmica 7 (1992) 583–596) answered this with a single linear-time scanning procedure, FOREST, which partitions the edges into classes E1,E2,…,E∣E∣E_1, E_2, \dots, E_{|E|}E1​,E2​,…,E∣E∣​. They showed that the prefix unions E1∪⋯∪EkE_1 \cup \dots \cup E_kE1​∪⋯∪Ek​ are certificates for edge-connectivity and, for simple graphs, for node-connectivity. The node-connectivity result is the subject of this mission; the edge-connectivity result is the preceding mission of this series.

Timeline:

  • 1980: Galil gives an algorithm testing κ(G)≥k\kappa(G) \ge kκ(G)≥k whose running time depends on ∣E∣|E|∣E∣ (SIAM J. Comput. 9).
  • Before 1992 (as cited on p. 583): Suzuki et al. give O(∣E∣)O(|E|)O(∣E∣)-time algorithms for sparse 2- and 3-node-connected spanning subgraphs; Nishizeki and Poljak find, for general kkk, a kkk-node-connected spanning subgraph with at most k(∣V∣−1)k(|V|-1)k(∣V∣−1) edges in O(∣V∣1/2∣E∣2)O(|V|^{1/2}|E|^2)O(∣V∣1/2∣E∣2) time.
  • 1992: Nagamochi and Ibaraki prove that FOREST, which runs in O(∣V∣+∣E∣)O(|V| + |E|)O(∣V∣+∣E∣) time, yields a kkk-node-connected spanning subgraph GkG_kGk​ of every simple kkk-node-connected graph, with ∣E(Gk)∣≤k∣V∣−k(k+1)/2|E(G_k)| \le k|V| - k(k+1)/2∣E(Gk​)∣≤k∣V∣−k(k+1)/2. Their Theorem 3.1 states a stronger, local form.
  • 1993: Cheriyan, Kao and Thurimella isolate "scan-first search" as the general principle behind such certificates (SIAM J. Comput. 22 (1993)).

Setting

A graph G=(V,E)G = (V, E)G=(V,E) has a finite node set VVV with ∣V∣≥2|V| \ge 2∣V∣≥2 and a finite edge set EEE; each edge has an unordered pair of two distinct end nodes. In this mission the graph is simple: no two edges have the same end nodes. For F⊆EF \subseteq EF⊆E, (V,F)(V, F)(V,F) is the spanning subgraph with edge set FFF.

The local node-connectivity κ(x,y;H)\kappa(x, y; H)κ(x,y;H) of nodes x,yx, yx,y in a graph HHH on VVV is ∣V∣−1|V| - 1∣V∣−1 if xxx and yyy are adjacent in HHH, and otherwise the minimum size of a node set W⊆V−{x,y}W \subseteq V - \{x, y\}W⊆V−{x,y} whose deletion leaves no xxx–yyy path. The node connectivity is κ(G)=min⁡x,yκ(x,y;G)\kappa(G) = \min_{x, y} \kappa(x, y; G)κ(G)=minx,y​κ(x,y;G).

Procedure FOREST keeps a label r(v)≥0r(v) \ge 0r(v)≥0 on each node, initially 000. While some node is unscanned, it chooses an unscanned node xxx of largest label; for each unscanned edge e=(x,y)e = (x, y)e=(x,y) it puts eee into the class Er(y)+1E_{r(y)+1}Er(y)+1​, increases r(x)r(x)r(x) by one if r(x)=r(y)r(x) = r(y)r(x)=r(y), and increases r(y)r(y)r(y) by one; then it marks xxx scanned. Ties are broken arbitrarily. The time instants are the states between these elementary operations; Ei∗E^*_iEi∗​ denotes the class iii at an instant, and EiE_iEi​ its final value. Put

Gi=(V, E1∪E2∪⋯∪Ei).G_i = (V,\ E_1 \cup E_2 \cup \dots \cup E_i).Gi​=(V, E1​∪E2​∪⋯∪Ei​).

Formalization targets

Goal: Theorem 3.1

For a simple graph GGG and the classes of any completed run of FOREST, for 1≤i≤∣E∣1 \le i \le |E|1≤i≤∣E∣,

κ(x,y;Gi) ≥ min⁡{κ(x,y;G), i}for any x,y∈V.(3.1)\kappa(x, y; G_i) \ \ge\ \min\{\kappa(x, y; G),\ i\} \qquad \text{for any } x, y \in V. \tag{3.1}κ(x,y;Gi​) ≥ min{κ(x,y;G), i}for any x,y∈V.(3.1)

The statement is local: it holds pair by pair, not only for the global minimum, and for every tie-breaking of the procedure.

Milestones, in the order the proof uses them

  1. Lemma 2.2: at every instant, a node vvv meets EiE_iEi​ exactly for i=1,…,r(v)i = 1, \dots, r(v)i=1,…,r(v).
  2. Lemma 2.4(b): at every instant, a uuu–vvv path in Ej∗E^*_jEj∗​ yields uuu–vvv paths in every Ei∗E^*_iEi∗​, i<ji < ji<j.
  3. In-degree at most one (§2, p. 588): orienting each edge from the earlier-scanned to the later-scanned end, every node has at most one entering arc in each class.
  4. Lemma 3.1: if an xxx–yyy path of Ej∗E^*_jEj∗​ has the form x,u1,…,uk=w,yx, u_1, \dots, u_k = w, yx,u1​,…,uk​=w,y with k=1k = 1k=1 or u1u_1u1​ scanned before www, then any www–xxx and www–yyy paths in Ei∗E^*_iEi∗​ (i<ji < ji<j) share a node other than www.
  5. Lemma 3.2: for a node cut set W={w1,…,wi}W = \{w_1, \dots, w_i\}W={w1​,…,wi​} of Gi+1G_{i+1}Gi+1​ (in scan order) separating a component XXX from the rest YYY, immediately after wtw_twt​ is scanned every XXX–YYY path of Et∗E^*_tEt∗​ passes through wtw_twt​, and Ej∗E^*_jEj∗​ has no XXX–YYY path for t+1≤j≤i+1t + 1 \le j \le i + 1t+1≤j≤i+1.

A companion item states the paper's announcement in §3: GkG_kGk​ is kkk-node-connected for every 1≤k≤κ(G)1 \le k \le \kappa(G)1≤k≤κ(G).

Significance

Theorem 3.1 at i=ki = ki=k shows that the first kkk classes of FOREST form a kkk-node-connected spanning subgraph whenever GGG is, and the edge-count analysis of the companion mission bounds its size by k∣V∣−k(k+1)/2k|V| - k(k+1)/2k∣V∣−k(k+1)/2. Since FOREST runs in linear time, any algorithm testing κ(G)≥k\kappa(G) \ge kκ(G)≥k can be run on GkG_kGk​ instead of GGG; the paper uses this to improve the bound for testing κ(G)≥k\kappa(G) \ge kκ(G)≥k from O(max⁡{k2∣V∣1/2,k∣V∣}∣E∣)O(\max\{k^2|V|^{1/2}, k|V|\}|E|)O(max{k2∣V∣1/2,k∣V∣}∣E∣) to O(max⁡{k3∣V∣3/2,k2∣V∣2})O(\max\{k^3|V|^{3/2}, k^2|V|^2\})O(max{k3∣V∣3/2,k2∣V∣2}), and similar gains for computing the number of node-disjoint paths between two nodes. The local form (3.1) is what makes the sss–ttt applications possible.

The result is proved on paper. As far as a search of the platform shows, neither FOREST nor local node-connectivity has a machine-checked treatment there; Mathlib has no notion of vertex connectivity of a pair of nodes. This mission produces a formal model of FOREST as a nondeterministic transition system and the statements needed to verify the paper's proof step by step.

Difficulty

For edge-connectivity the analogous statement follows from a general principle: any sequence of maximal spanning forests, each taken in what remains of the graph, preserves local edge-connectivity up to its length. The obvious attempt is to prove (3.1) the same way, from the fact that each EiE_iEi​ is a maximal spanning forest of what the earlier classes leave. The paper gives no such argument for node-connectivity: its proof uses the specific scan order of FOREST in an essential way, through the orientation of edges from earlier- to later-scanned nodes and the in-degree bound of that orientation (Lemmas 3.1 and 3.2). The argument tracks, for a hypothetical node cut WWW of size iii in Gi+1G_{i+1}Gi+1​, the classes at the moments the nodes of WWW are scanned, which requires reasoning about intermediate states of the algorithm and about paths in several classes at once. None of this reduces to a static property of the output partition.

Formalization scope

  • Graphs. A node type V and an edge type E, both finite, with ends : E → Sym2 V; loop-freeness is ∀ e, ¬ (ends e).IsDiag and simplicity is Function.Injective ends. The standing assumptions of p. 583 and p. 589 (∣V∣≥2|V| \ge 2∣V∣≥2, no self-loop, a simple graph when node-connectivity is discussed) appear as hypotheses; §2 items are stated for loopless graphs, as on the page.
  • Connectivity. κ(x,y;(V,F))\kappa(x, y; (V, F))κ(x,y;(V,F)) is valued in N∞\mathbb N_\inftyN∞​: ∣V∣−1|V| - 1∣V∣−1 on adjacent pairs, the minimum node cut otherwise, and ⊤\top⊤ when x=yx = yx=y, where (3.1) holds trivially.
  • FOREST. A nondeterministic step relation with three steps (select, scan, finish), a run of length KKK from the initial state, and completion when every node is scanned. Every tie-breaking is allowed, so the theorems quantify over all completed runs. A time instant is a state of a run; "scanned before" compares positions in the run's selection order; "immediately after wtw_twt​ has been scanned" is the state right after the finish step of wtw_twt​.
  • Excluded. The running time "O(∣V∣+∣E∣)O(|V| + |E|)O(∣V∣+∣E∣)" and everything in §4 (the connectivity-testing algorithms and their bounds) are not stated: the paper fixes no machine model. The edge bounds on ∣Ei∣|E_i|∣Ei​∣ belong to the edge-connectivity mission.
  • Ruled out. Stating (3.1) for an arbitrary partition into maximal spanning forests, or reading the classes Ej∗E^*_jEj∗​ of Lemmas 3.1–3.2 off the final state, would state a different theorem from the one the paper proves; the classes are those of a run of FOREST at the instant the page specifies.
  • Infrastructure. Reachability avoiding a node set, walks and paths in SimpleGraph, and invariants of the FOREST transition system. The definitions duplicate those of the edge-connectivity mission by design and are candidates for a shared layer. Contributions of general lemmas about the run (label invariants, monotonicity of classes along a run) are welcome.

Selected references

  • H. Nagamochi, T. Ibaraki, A linear-time algorithm for finding a sparse kkk-connected spanning subgraph of a kkk-connected graph, Algorithmica 7 (1992), 583–596. https://doi.org/10.1007/BF01758778
  • Z. Galil, Finding the vertex connectivity of graphs, SIAM J. Comput. 9 (1980), 197–199. https://doi.org/10.1137/0209016
  • J. Cheriyan, M.-Y. Kao, R. Thurimella, Scan-first search and sparse certificates: an improved parallel algorithm for kkk-vertex connectivity, SIAM J. Comput. 22 (1993), 157–174. https://doi.org/10.1137/0222013
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979.
9 thms3 active usersReviewed
🏆Completed
CombinatoricsGraph TheoryOperations Research·Captain: mikedeng1

A Linear-Time Algorithm for Finding a Sparse k-Connected Spanning Subgraph of a k-Connected Graph 1: The FOREST Decomposition Preserves Local Edge-ConnectivityResearch Paper

Motivation

Many graph algorithms for connectivity questions run in time proportional to the number of edges. When the question is only whether a graph is kkk-edge-connected, or what its local edge-connectivities are up to a threshold kkk, most edges are irrelevant: a spanning subgraph with O(k∣V∣)O(k|V|)O(k∣V∣) edges already carries the answer. Such a subgraph is called a sparse certificate. Computing one first and running the expensive algorithm on it replaces ∣E∣|E|∣E∣ by k∣V∣k|V|k∣V∣ in the running time of connectivity testing, of Matula-type edge-connectivity algorithms, and of sss–ttt flow computations used as connectivity oracles.

Nagamochi and Ibaraki (Algorithmica 7, 1992) gave a procedure, FOREST, that computes such a certificate for edge-connectivity and, on simple graphs, for node-connectivity, with a single graph search. The same partition of the edges into forests is the engine of their deterministic minimum-cut algorithm for multigraphs (SIAM J. Discrete Math. 5, 1992), which later became the maximum-adjacency ordering of the Stoer–Wagner minimum-cut algorithm (J. ACM 44, 1997).

Timeline:

  • 1927: Menger identifies the minimum number of edges separating two nodes with the maximum number of edge-disjoint paths between them.
  • 1992: Nagamochi and Ibaraki publish Procedure FOREST and prove that its iii-th prefix preserves local edge-connectivity up to iii in multigraphs, and local node-connectivity up to iii in simple graphs.
  • 1993: Cheriyan, Kao and Thurimella (SIAM J. Comput. 22) obtain sparse certificates by scan-first search; Frank, Ibaraki and Nagamochi (J. Graph Theory 17) give a shorter proof for the node-connectivity case.
  • 1994: Nishizeki and Poljak (Discrete Appl. Math. 55) publish the forest-decomposition lemma (Lemma 2.1 below), found independently.

Setting

A graph G=(V,E)G = (V, E)G=(V,E) is finite and undirected, has ∣V∣≥2|V| \ge 2∣V∣≥2 nodes, may have multiple edges (several edges with the same pair of end nodes), and has no self-loop. It is simple if no two edges have the same end nodes. For F⊆EF \subseteq EF⊆E, (V,F)(V, F)(V,F) is the spanning subgraph with edge set FFF. It is a forest if it has no cycle; two parallel edges form a cycle. It is a maximal spanning forest in (V,H)(V, H)(V,H), for F⊆HF \subseteq HF⊆H, if adding any edge of H∖FH \setminus FH∖F to FFF creates a cycle.

The local edge-connectivity λ(x,y;H)\lambda(x, y; H)λ(x,y;H) is the minimum number of edges of HHH whose removal leaves no path from xxx to yyy; parallel edges count separately. It is ∞\infty∞ when x=yx = yx=y.

Procedure FOREST keeps a label r(v)∈Nr(v) \in \mathbb{N}r(v)∈N on every node, initially 000, and classes E1,E2,…,E∣E∣E_1, E_2, \dots, E_{|E|}E1​,E2​,…,E∣E∣​, initially empty. While an unscanned node exists, it picks an unscanned node xxx of largest label; for every unscanned edge eee from xxx to a node yyy, it puts eee into Er(y)+1E_{r(y)+1}Er(y)+1​, increases r(x)r(x)r(x) by one if r(x)=r(y)r(x) = r(y)r(x)=r(y), increases r(y)r(y)r(y) by one, and marks eee scanned; then it marks xxx scanned. Ties among nodes and the order of edges are free. On termination, Gi=(V,E1∪⋯∪Ei)G_i = (V, E_1 \cup \cdots \cup E_i)Gi​=(V,E1​∪⋯∪Ei​).

Formalization targets

Goal: Theorem 2.1 (pp. 588–589), without the running time

For every graph GGG and every completed execution of FOREST on GGG:

  1. every edge lies in exactly one class EiE_iEi​, 1≤i≤∣E∣1 \le i \le |E|1≤i≤∣E∣;
  2. for i=1,…,∣E∣i = 1, \dots, |E|i=1,…,∣E∣,
λ(x,y;Gi)≥min⁡{λ(x,y;G), i}for all x,y∈V;(2.1)\lambda(x, y; G_i) \ge \min\{\lambda(x, y; G),\ i\} \qquad \text{for all } x, y \in V; \tag{2.1}λ(x,y;Gi​)≥min{λ(x,y;G), i}for all x,y∈V;(2.1)
  1. ∣Ei∣≤∣V∣−1|E_i| \le |V| - 1∣Ei​∣≤∣V∣−1 for all iii;
  2. if GGG is simple, ∣Ei∣≤∣V∣−i|E_i| \le |V| - i∣Ei​∣≤∣V∣−i for i≤∣V∣−1i \le |V| - 1i≤∣V∣−1 and Ei=∅E_i = \emptysetEi​=∅ for i≥∣V∣i \ge |V|i≥∣V∣.

Milestones

  • Lemma 2.2 (p. 587): during the execution, a node vvv has incident edges in exactly the classes E1,…,Er(v)E_1, \dots, E_{r(v)}E1​,…,Er(v)​.
  • Lemma 2.3 (p. 587): each (V,Ei)(V, E_i)(V,Ei​) is a forest at every instant.
  • Lemma 2.4 (p. 588): (a) an edge (u,v)(u, v)(u,v) added to EiE_iEi​ has its end nodes joined by a path in Ei−1E_{i-1}Ei−1​; (b) a path in EjE_jEj​ between uuu and vvv yields a path in every EiE_iEi​, i<ji < ji<j.
  • Lemma 2.5 (p. 588): each output (V,Ei)(V, E_i)(V,Ei​) is a maximal spanning forest in G−E1∪⋯∪Ei−1G - E_1 \cup \cdots \cup E_{i-1}G−E1​∪⋯∪Ei−1​.
  • Lemma 2.1 (p. 584): any sequence of successive maximal spanning forests satisfies (2.1).

Companions

  • the sparse certificate (p. 589): if λ(x,y;G)≥k\lambda(x, y; G) \ge kλ(x,y;G)≥k for all x,yx, yx,y, then GkG_kGk​ is kkk-edge-connected with ∣E(Gk)∣≤k(∣V∣−1)|E(G_k)| \le k(|V| - 1)∣E(Gk​)∣≤k(∣V∣−1), and ∣E(Gk)∣≤k∣V∣−k(k+1)/2|E(G_k)| \le k|V| - k(k+1)/2∣E(Gk​)∣≤k∣V∣−k(k+1)/2 for simple GGG;
  • Lemma 2.6 (p. 589): for k≤δ(G)k \le \delta(G)k≤δ(G), GkG_kGk​ has a node of degree exactly kkk.

Significance

(2.1) says that one search produces, for every threshold kkk at once, a subgraph with at most k(∣V∣−1)k(|V|-1)k(∣V∣−1) edges that keeps every local edge-connectivity up to kkk. Any algorithm whose running time grows with ∣E∣|E|∣E∣ can then be run on GkG_kGk​ in place of GGG; §4 of the paper uses this to speed up kkk-connectivity tests and the computation of local connectivities. The same forest partition is the structural fact behind the Nagamochi–Ibaraki and Stoer–Wagner minimum-cut algorithms. Lemma 2.6 shows that the certificate is tight: its edge-connectivity is exactly kkk when λ(G)≥k\lambda(G) \ge kλ(G)≥k.

The results are proved in the paper. No machine-checked proof of them is known. Formalizing them means formalizing a graph search with free tie-breaking as a transition system, reasoning about invariants of all its executions, and proving a cut-counting statement for multigraphs. Mathlib's connectivity notions, such as SimpleGraph.IsEdgeReachable, do not see parallel edges, so the multigraph cut theory here is new.

Difficulty

Lemma 2.1 is a short cut argument once maximality is available. The difficulty is showing that FOREST, which assigns each edge to a class by looking only at the label of one end node, produces maximal forests in the successive residual graphs (Lemma 2.5). The obvious invariant, that the class of an edge is the first forest it does not close a cycle in, is not what line 7 computes. The label r(y)r(y)r(y) records only which classes touch yyy, not which component of each class contains yyy. The paper's argument needs Lemma 2.4(a): at the moment an edge is added to EiE_iEi​ its ends already lie in one tree of Ei−1E_{i-1}Ei−1​. That relies on the choice of the unscanned node of largest label, on the order of lines 8 and 9, and on an argument about the scan order of tree roots.

Formalization scope

  • Graphs. A graph is a finite node type V with ∣V∣≥2|V| \ge 2∣V∣≥2, a finite edge type E, and ends : E → Sym2 V with no diagonal value (no self-loops). Parallel edges are distinct elements of E. Simplicity is injectivity of ends, and edge subsets are Finset E. A forest is an edge set in which every edge is a bridge, a condition that sees parallel edges.
  • Connectivity. λ\lambdaλ is an infimum in ℕ∞ over separating edge sets, ∞\infty∞ at x=yx = yx=y. (2.1) is kept "for all x,yx, yx,y", as printed.
  • FOREST. FOREST is a nondeterministic step relation (select, scan, finish) on explicit states: labels, class index per edge (000 = unscanned), scanned nodes, current node and selection order. The theorems quantify over every run from the initial state, so no tie-breaking rule is fixed. "At some time instant" is a state of the run; "upon completion" is a run whose last state has every node scanned. Lemma 2.2 is stated at every state, not only after a scan block (the other steps change neither labels nor classes). Lemma 2.4(a) assumes i≥2i \ge 2i≥2, since E0E_0E0​ does not exist.
  • Exclusions. Theorem 2.1's clause "is found in O(∣V∣+∣E∣)O(|V| + |E|)O(∣V∣+∣E∣) time", the bucket implementation, and the time bound of the certificate are not formalized: the paper fixes no machine model. The goal consists of the structural conclusions only. The bound printed "if GGG is multiple" is stated for every loopless graph.
  • Non-triviality. The goal is about the classes of a run of FOREST. An arbitrary partition of EEE into maximal spanning forests is Lemma 2.1's hypothesis, not a formalization of Theorem 2.1. A statement in which the classes are unconstrained variables, or in which the run hypotheses cannot be met, would be trivial. A separate sanity file checks that a complete run on the triangle K3K_3K3​ exists and attains ∣E1∣=∣V∣−1|E_1| = |V| - 1∣E1​∣=∣V∣−1, ∣E2∣=∣V∣−2|E_2| = |V| - 2∣E2​∣=∣V∣−2.
  • Welcome contributions. Useful reusable infrastructure includes:
    • a cut and Menger layer for finite multigraphs;
    • forest and bridge lemmas for edge-indexed graphs;
    • invariant-style reasoning over runs.

Selected references

  • H. Nagamochi, T. Ibaraki, A linear-time algorithm for finding a sparse kkk-connected spanning subgraph of a kkk-connected graph, Algorithmica 7 (1992) 583–596. https://doi.org/10.1007/BF01758778
  • H. Nagamochi, T. Ibaraki, Computing edge-connectivity in multigraphs and capacitated graphs, SIAM J. Discrete Math. 5 (1992) 54–66. https://doi.org/10.1137/0405004
  • T. Nishizeki, S. Poljak, kkk-connectivity and decomposition of graphs into forests, Discrete Appl. Math. 55 (1994) 295–301. https://doi.org/10.1016/0166-218X(94)90014-0
  • J. Cheriyan, M.-Y. Kao, R. Thurimella, Scan-first search and sparse certificates: an improved parallel algorithm for kkk-vertex connectivity, SIAM J. Comput. 22 (1993) 157–174. https://doi.org/10.1137/0222013
  • A. Frank, T. Ibaraki, H. Nagamochi, On sparse subgraphs preserving connectivity properties, J. Graph Theory 17 (1993) 275–281. https://doi.org/10.1002/jgt.3190170302
  • M. Stoer, F. Wagner, A simple min-cut algorithm, J. ACM 44 (1997) 585–591. https://doi.org/10.1145/263867.263872
10 thms3 active usersReviewed
🏆Completed
Control TheoryOperations Research·Captain: mikedeng1

Supervisory Control of a Class of Discrete Event Processes I: Minimally Restrictive Supervisors Exist iff the Supremal Controllable Legal Sublanguage Contains the Minimal Acceptable LanguageResearch Paper

Motivation

Manufacturing cells, communication protocols, traffic systems and database transaction managers are naturally described not by differential equations but by sequences of discrete events: a machine starts, a part arrives, a message is lost. Ramadge and Wonham's 1987 paper (SIAM J. Control Optim. 25(1)) set up a control theory for such systems in which the plant is an automaton, the controller is another automaton that may disable some events, and specifications are formal languages. The framework, now called supervisory control theory or the Ramadge–Wonham framework, is the standard model for the logical control of discrete event systems and underlies the textbook treatment in Cassandras and Lafortune (Introduction to Discrete Event Systems, 2008) and Wonham and Cai (Supervisory Control of Discrete-Event Systems, 2019).

The question the paper answers is the basic synthesis question of the theory: given a plant, a set of legal behaviours and a set of minimally acceptable behaviours, when does a controller exist that keeps the plant legal, achieves at least the acceptable behaviour, and never deadlocks, and what is the least restrictive such controller?

Setting

A generator is G=(Q,Σ,δ,q0,Qm)\mathcal G = (Q, \Sigma, \delta, q_0, Q_m)G=(Q,Σ,δ,q0​,Qm​) with a state set QQQ, a finite alphabet Σ\SigmaΣ of events, a partial transition function δ:Σ×Q→Q\delta : \Sigma \times Q \to Qδ:Σ×Q→Q, an initial state q0q_0q0​ and marker states Qm⊆QQ_m \subseteq QQm​⊆Q. Extending δ\deltaδ to strings, the generated language L(G)L(\mathcal G)L(G) is the set of strings www for which δ(w,q0)\delta(w, q_0)δ(w,q0​) is defined, and the marked language Lm(G)L_m(\mathcal G)Lm​(G) is the subset of those that end in QmQ_mQm​. The closure Kˉ\bar KKˉ of a language KKK is its set of prefixes; KKK is closed if K=KˉK = \bar KK=Kˉ. Throughout, G\mathcal GG is assumed trim in the sense L(G)=Lˉm(G)L(\mathcal G) = \bar L_m(\mathcal G)L(G)=Lˉm​(G): every generated string can be completed to a marked one.

The alphabet is split into controllable events Σc\Sigma_cΣc​ and uncontrollable events Σu=Σ−Σc\Sigma_u = \Sigma - \Sigma_cΣu​=Σ−Σc​. A supervisor S=(S,ϕ)\mathcal S = (S, \phi)S=(S,ϕ) consists of a deterministic, accessible automaton S=(X,Σ,ξ,x0,Xm)S = (X, \Sigma, \xi, x_0, X_m)S=(X,Σ,ξ,x0​,Xm​), whose state set XXX may be infinite, and a map ϕ\phiϕ assigning to each state xxx the set of controllable events it enables; uncontrollable events are always enabled. The closed loop S/G\mathcal S/\mathcal GS/G runs SSS and G\mathcal GG in lockstep: an event occurs when the plant can execute it, the supervisor enables it, and the supervisor's automaton can follow it. This defines the languages L(S/G)L(\mathcal S/\mathcal G)L(S/G), Lm(S/G)L_m(\mathcal S/\mathcal G)Lm​(S/G) and the controlled language Lc(S/G)=L(S/G)∩Lm(G)L_c(\mathcal S/\mathcal G) = L(\mathcal S/\mathcal G) \cap L_m(\mathcal G)Lc​(S/G)=L(S/G)∩Lm​(G).

S\mathcal SS is complete if its automaton never refuses an event that the plant can execute and ϕ\phiϕ enables; it is proper if it is complete and

Lˉm(S/G)=Lˉc(S/G)=L(S/G),\bar L_m(\mathcal S/\mathcal G) = \bar L_c(\mathcal S/\mathcal G) = L(\mathcal S/\mathcal G),Lˉm​(S/G)=Lˉc​(S/G)=L(S/G),

that is, every closed-loop string can be completed to a marked task. A language KKK is controllable if K⊆L(G)K \subseteq L(\mathcal G)K⊆L(G) and KˉΣu∩L(G)⊆Kˉ\bar K \Sigma_u \cap L(\mathcal G) \subseteq \bar KKˉΣu​∩L(G)⊆Kˉ. For L⊆L(G)L \subseteq L(\mathcal G)L⊆L(G), CG(L)\mathbf C_{\mathcal G}(L)CG​(L) is the class of controllable sublanguages of LLL and FG(L)\mathbf F_{\mathcal G}(L)FG​(L) the class of sublanguages KKK of LLL with K=Kˉ∩Lm(G)K = \bar K \cap L_m(\mathcal G)K=Kˉ∩Lm​(G).

Given ∅≠La⊆Lg⊆Lm(G)\emptyset \neq L_a \subseteq L_g \subseteq L_m(\mathcal G)∅=La​⊆Lg​⊆Lm​(G), the Supervisory Marking Problem (SMP) asks for a proper S\mathcal SS with La⊆Lm(S/G)⊆LgL_a \subseteq L_m(\mathcal S/\mathcal G) \subseteq L_gLa​⊆Lm​(S/G)⊆Lg​, and the Supervisory Control Problem (SCP) for a proper S\mathcal SS with La⊆Lc(S/G)⊆LgL_a \subseteq L_c(\mathcal S/\mathcal G) \subseteq L_gLa​⊆Lc​(S/G)⊆Lg​.

Formalization targets

Goal: Theorem 7.1 (pp. 218–219)

SMP solvable  ⟺  sup⁡CG(Lg)⊇La,SCP solvable  ⟺  sup⁡{CG(Lg)∩FG(Lg)}⊇La,\text{SMP solvable} \iff \sup \mathbf C_{\mathcal G}(L_g) \supseteq L_a, \qquad \text{SCP solvable} \iff \sup\{\mathbf C_{\mathcal G}(L_g) \cap \mathbf F_{\mathcal G}(L_g)\} \supseteq L_a,SMP solvable⟺supCG​(Lg​)⊇La​,SCP solvable⟺sup{CG​(Lg​)∩FG​(Lg​)}⊇La​,

and in each case the solving supervisor can be taken minimally restrictive: its marked (respectively controlled) language equals the supremal element and contains that of every proper supervisor whose language lies in LgL_gLg​.

Milestones

  1. Proposition 4.1 (i), (ii): marking is independent of control; every K⊆Lm(G)K \subseteq L_m(\mathcal G)K⊆Lm​(G), or K⊆L∩Lm(G)K \subseteq L \cap L_m(\mathcal G)K⊆L∩Lm​(G) for an achievable closed LLL, is the marked language of a complete supervisor.
  2. Proposition 5.1: a complete supervisor realizes (Lm,Lc,L)=(K1,K2,K3)(L_m, L_c, L) = (K_1, K_2, K_3)(Lm​,Lc​,L)=(K1​,K2​,K3​) iff K1⊆K2K_1 \subseteq K_2K1​⊆K2​, K2=K3∩Lm(G)K_2 = K_3 \cap L_m(\mathcal G)K2​=K3​∩Lm​(G) and K3K_3K3​ is closed and controllable.
  3. Theorem 6.1 (i), (ii): a proper supervisor with Lm(S/G)=KL_m(\mathcal S/\mathcal G) = KLm​(S/G)=K exists iff KKK is controllable; one with Lc(S/G)=KL_c(\mathcal S/\mathcal G) = KLc​(S/G)=K exists iff KKK is controllable and Lm(G)L_m(\mathcal G)Lm​(G)-closed.
  4. Proposition 7.1: CG(L)\mathbf C_{\mathcal G}(L)CG​(L) and FG(L)\mathbf F_{\mathcal G}(L)FG​(L) contain ∅\emptyset∅ and are closed under arbitrary unions.
  5. The supremal elements (p. 218): sup⁡CG(L)\sup \mathbf C_{\mathcal G}(L)supCG​(L), sup⁡FG(L)\sup \mathbf F_{\mathcal G}(L)supFG​(L) and sup⁡{CG(L)∩FG(L)}\sup\{\mathbf C_{\mathcal G}(L) \cap \mathbf F_{\mathcal G}(L)\}sup{CG​(L)∩FG​(L)} belong to their classes.

Significance

Theorem 7.1 reduces the existence of a correct, non-blocking controller to a single language inclusion, and identifies the supremal controllable sublanguage as the behaviour of the least restrictive solution. That object is the backbone of the later theory: modular and decentralized control, control under partial observation, and the computational results that sup⁡CG(L)\sup \mathbf C_{\mathcal G}(L)supCG​(L) is regular and computable when G\mathcal GG is finite and LLL regular all start from it.

The result is proved in the paper and has been taught for decades; it is not open. Mathlib has no model of generators with partial transitions, supervisors or controllability (its DFA has a total transition function and a single accepted language), and no formalization of this theory exists on the platform. This mission provides one: a reusable Lean model of generators with partial transitions, supervisors with possibly infinite state, closed loops and controllability, together with the paper's existence theorems stated against it. A second mission on the same paper (quotients of supervisors, Theorem 10.1) builds on the same objects.

Difficulty

The combinatorial core of Proposition 7.1 is a short prefix-closure computation. The work lies in the constructions: to show existence, a supervisor must be built for an arbitrary controllable language, which in general is not regular, so the supervisor needs an infinite state set (for example strings of the target language) together with a proof that the closed loop generates exactly the intended language, is complete, and is proper. The converse directions require relating the closed-loop run to separate runs of the plant and of the supervisor's automaton. The naive shortcut of reading the "sup" as an arbitrary member of CG(Lg)\mathbf C_{\mathcal G}(L_g)CG​(Lg​) containing LaL_aLa​ skips the content of the supremal-element milestone; the goal is stated with the actual union.

Formalization scope

  • The alphabet is a type α with [Fintype α]; strings are List α, the empty string is [], and sσs\sigmasσ is s ++ [σ]. Languages are Set (List α); the closure is pre K = {s | ∃ t, s ++ t ∈ K}.
  • A generator is a structure with a state type Q : Type, a partial transition δ : α → Q → Option Q, an initial state and a marker set. No finiteness is assumed on states, of the plant or of the supervisor. Supervisors and generators live in Type 1.
  • ϕ\phiϕ maps states to Ec → Bool; an event outside Σc\Sigma_cΣc​ is enabled by definition, so uncontrollable events cannot be disabled.
  • The closed loop is the product run from (x0,q0)(x_0, q_0)(x0​,q0​); the accessible part in the paper's display (2.1) changes no language and is not built.
  • Standing assumptions carried by every theorem: Σ\SigmaΣ finite, L(G)=Lˉm(G)L(\mathcal G) = \bar L_m(\mathcal G)L(G)=Lˉm​(G), supervisor automata accessible (as a hypothesis on every input supervisor and a conjunct of every "there exists a supervisor").
  • sup⁡\supsup is sSup in the complete lattice Set (List α).
  • A formalization in which the closed loop ignores ϕ\phiϕ or the plant, in which completeness is dropped from properness, or in which the supervisor is restricted to finitely many states, is not the paper's theorem and is ruled out by the definitions above.

Welcome contributions: the basic run lemmas (closed-loop runs project to plant and supervisor runs), the string-state supervisor construction, and proofs of the milestones in the given order.

Selected references

  • P. J. Ramadge and W. M. Wonham, Supervisory Control of a Class of Discrete Event Processes, SIAM J. Control Optim. 25(1):206–230, 1987. https://doi.org/10.1137/0325013
  • W. M. Wonham and P. J. Ramadge, On the Supremal Controllable Sublanguage of a Given Language, SIAM J. Control Optim. 25(3):637–659, 1987. https://doi.org/10.1137/0325036
  • C. G. Cassandras and S. Lafortune, Introduction to Discrete Event Systems, 2nd ed., Springer, 2008. https://doi.org/10.1007/978-0-387-68612-7
  • W. M. Wonham and K. Cai, Supervisory Control of Discrete-Event Systems, Springer, 2019. https://doi.org/10.1007/978-3-319-77452-7
12 thms3 active usersReviewed
🏆Completed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

Approximation Algorithms for Combinatorial Problems V: The Overlap-Ratio Greedy C2 Is Within 1 + ln k of the Least-Overlap Cover on EC(k)Research Paper

Motivation

David S. Johnson's 1974 paper Approximation Algorithms for Combinatorial Problems (J. Comput. System Sci. 9 (1974) 256–278) was one of the first systematic worst-case analyses of polynomial-time heuristics for NP-complete optimization problems. Its Section 5 proves the harmonic bound ∑j=1k1/j\sum_{j=1}^k 1/j∑j=1k​1/j for the greedy algorithm on minimum-cardinality set cover, a result that still underlies the standard ln⁡n\ln nlnn approximation guarantee.

Section 6, the subject of this mission, asks what happens when the cost of a cover is its total size rather than its number of sets. This problem, SET COVERING II (EC), is the optimization version of the EXACT COVER recognition problem of Karp's list (Karp 1972): a family has a disjoint subcover exactly when the optimum equals the number of covered points. Johnson shows that the change of measure breaks the cardinality greedy but that a greedy rule based on an overlap ratio recovers essentially the same guarantee. The same accounting (paying for each newly covered point) later became the standard analysis of greedy weighted set cover (Chvátal 1979).

Setting

An input is a finite family F={S1,…,Sp}F = \{S_1, \dots, S_p\}F={S1​,…,Sp​} of finite sets. Its covered set is T=⋃S∈FST = \bigcup_{S \in F} ST=⋃S∈F​S. A subcover is a subfamily F′⊆FF' \subseteq FF′⊆F with ⋃S∈F′S=T\bigcup_{S\in F'} S = T⋃S∈F′​S=T, and its measure is

mEC(F′)=∑S∈F′∣S∣.m_{EC}(F') = \sum_{S \in F'} |S|.mEC​(F′)=S∈F′∑​∣S∣.

The optimum F∗F^*F∗ is the least measure of a subcover; since every subcover has measure at least ∣T∣|T|∣T∣, an optimal subcover is one with the least possible overlapping. The subproblem EC(k)(k)(k) admits only families in which every set has at most kkk points.

Algorithm C2 keeps a subfamily SUB (initially empty), the unused sets LEFT (initially FFF) and the uncovered points UNCOV (initially TTT). While UNCOV is nonempty it chooses S′∈S' \inS′∈ LEFT minimizing

Ratio(S)=∣S−UNCOV∣∣S∩UNCOV∣,\mathrm{Ratio}(S) = \frac{|S - \mathrm{UNCOV}|}{|S \cap \mathrm{UNCOV}|},Ratio(S)=∣S∩UNCOV∣∣S−UNCOV∣​,

the number of already-covered points of SSS per newly covered point, and moves S′S'S′ from LEFT to SUB, removing its points from UNCOV. When several sets tie, any of them may be chosen; a subcover is choosable by C2 if some sequence of admissible choices returns it.

The overlap of a chosen set is ∣S′−UNCOV∣|S' - \mathrm{UNCOV}|∣S′−UNCOV∣ at the moment it is chosen, and the cumulative overlap OV(F1)\mathrm{OV}(F_1)OV(F1​) of a run returning F1F_1F1​ is the sum of these overlaps.

Formalization targets

Goal: Theorem 6 (p. 271)

For all k≥1k \ge 1k≥1 and n>0n > 0n>0,

R[C2,EC(k)](n)≤1+ln⁡(k)≤∑j=1k1j+12,R[C2, EC(k)](n) \le 1 + \ln(k) \le \sum_{j=1}^k \frac1j + \frac12,R[C2,EC(k)](n)≤1+ln(k)≤j=1∑k​j1​+21​,

and for all sufficiently large nnn, R[C2,EC(k)](n)≥∑j=1k(1/j)R[C2, EC(k)](n) \ge \sum_{j=1}^k (1/j)R[C2,EC(k)](n)≥∑j=1k​(1/j). In the size-free form used here, for every k≥1k \ge 1k≥1:

  1. every subcover MMM choosable by C2 on an input of EC(k)(k)(k) satisfies mEC(M)≤(1+ln⁡k) F∗m_{EC}(M) \le (1 + \ln k)\,F^*mEC​(M)≤(1+lnk)F∗;
  2. 1+ln⁡k≤∑j=1k1/j+1/21 + \ln k \le \sum_{j=1}^k 1/j + 1/21+lnk≤∑j=1k​1/j+1/2;
  3. some input of EC(k)(k)(k) with F∗>0F^* > 0F∗>0 has a choosable subcover with mEC(M)≥(∑j=1k1/j)F∗m_{EC}(M) \ge \big(\sum_{j=1}^k 1/j\big) F^*mEC​(M)≥(∑j=1k​1/j)F∗.

Milestones (proof of Theorem 6, pp. 271–272)

  • the measure of the output is ∣T∣+OV(F1)|T| + \mathrm{OV}(F_1)∣T∣+OV(F1​);
  • if C2 may choose a set with Ratio(S′)≥y\mathrm{Ratio}(S') \ge yRatio(S′)≥y, then (y+1) ∣UNCOV∣≤F∗(y+1)\,|\mathrm{UNCOV}| \le F^*(y+1)∣UNCOV∣≤F∗;
  • with a=F∗/∣T∣a = F^*/|T|a=F∗/∣T∣ and x=∣T−UNCOV∣/∣T∣x = |T - \mathrm{UNCOV}|/|T|x=∣T−UNCOV∣/∣T∣, the next chosen set has Ratio(S′)≤a/(1−x)−1\mathrm{Ratio}(S') \le a/(1-x) - 1Ratio(S′)≤a/(1−x)−1;
  • on EC(k)(k)(k), OV(F1)≤∣T∣ (a[ln⁡(k)+1]−1)\mathrm{OV}(F_1) \le |T|\,(a[\ln(k) + 1] - 1)OV(F1​)≤∣T∣(a[ln(k)+1]−1);
  • the analytic inequality 1+ln⁡(k)≤∑j=1k1/j+1/21 + \ln(k) \le \sum_{j=1}^k 1/j + 1/21+ln(k)≤∑j=1k​1/j+1/2;
  • the lower-bound input (Fig. 1 of the paper with every set of F1F_1F1​ filled out to exactly kkk points) on which C2 may pay ∑j=1k1/j\sum_{j=1}^k 1/j∑j=1k​1/j times the optimum.

Significance

The result. The measure ∑∣S∣\sum|S|∑∣S∣ penalizes overlap, and the paper notes (without proof, p. 270) that an algorithm returning an optimal cover for the cardinality measure can be a factor kkk from optimal for this one. Theorem 6 shows that the ratio rule C2 is within 1+ln⁡k1 + \ln k1+lnk of the least-overlap cover, and the lower bound shows that no analysis of C2 can beat ∑j=1k1/j\sum_{j=1}^k 1/j∑j=1k​1/j. The two bounds differ by less than 1/21/21/2 for every kkk. The theorem was an early instance of a logarithmic guarantee for a weighted covering problem, where each set's cost is its size.

Formalizing it. The theorem has been proved since 1974; no machine-checked proof is known to exist. The mission produces a formal model of the EC problem and of C2 as a nondeterministic process, the overlap identity, and the discrete form of the paper's area-under-a-curve estimate. The last is the part the paper argues informally, through a step function and an integral.

Difficulty

The cardinality argument for C1 counts the sets chosen; here the sets have different sizes, so it does not apply. The overlap C2 pays per newly covered point is not bounded by a constant: early choices can be free and late ones cost up to k−1k-1k−1 per point, and the bound on the cumulative overlap must hold against the whole run, for every sequence of tie-breaks.

In a formal proof the integral must be replaced by a sum. Covered points arrive in blocks (one block per chosen set), the charge is constant on a block but the bound depends on the covered fraction at the start of the block, and the sum has to be compared with a logarithm. The terms aln⁡aa\ln aalna and a/ka/ka/k that the paper drops using 1≤a≤k1 \le a \le k1≤a≤k must be controlled as well, and the relation 1≤a≤k1 \le a \le k1≤a≤k must itself be proved from optimality. The lower bound needs an explicit run of C2 through ties on an input with k⋅k!k \cdot k!k⋅k! points, checking at every stage that the intended set is a ratio minimizer.

Formalization scope

  • Inputs. A family is p : ℕ with S : Fin p → Finset α (0-based, repetitions allowed; a repeated set counts twice in the measure if both copies are chosen, which C2 never does). Subcovers and SUB, LEFT are index sets. F∗F^*F∗ is a minimum over the finite, nonempty set of subcovers (Finset.inf'), never a junk value.
  • Algorithm. C2 is a step relation on states (SUB, LEFT, UNCOV). The choice at Step 3 is existential over all minimizers, so every result quantifies over every choosable output (the paper's WORST). Ratio(S)\mathrm{Ratio}(S)Ratio(S) is +∞+\infty+∞ when S∩UNCOV=∅S \cap \mathrm{UNCOV} = \emptysetS∩UNCOV=∅; the formal rule requires the chosen set to meet UNCOV and compares ratios by cross-multiplication, with no division.
  • Overlap. The cumulative overlap depends on the run, not on the output alone, so it is carried by an inductive run relation RunOV.
  • No problem size. The paper's R[A,P](n)R[A, P](n)R[A,P](n) maximizes over inputs of size at most nnn in an unspecified encoding. Upper bounds are stated for every input and every choosable output; the lower bound exhibits one input and one choosable output. Given monotonicity of RRR in nnn, these are equivalent to the paper's claims. Ratios are stated multiplicatively, so F∗=0F^* = 0F∗=0 does not create a vacuous bound.
  • Numbers. Measures are natural numbers cast to R\mathbb RR; ln⁡\lnln is Real.log; ∑j=1k1/j\sum_{j=1}^k 1/j∑j=1k​1/j is Mathlib's harmonic k.
  • Ruled out. A deterministic tie-break would prove a weaker upper bound and could not realize the lower-bound run, and a ratio with x/0=0x/0 = 0x/0=0 would make disjoint-from-UNCOV sets the most attractive choice. The formalization uses neither.

The overlap identity and the discrete integral comparison are reusable for any greedy covering analysis that charges cost per newly covered point. Contributions welcome include proofs of the milestones, the invariants of the C2 run relation (SUB and LEFT partition the indices; UNCOV =T−⋃= T - \bigcup=T−⋃ SUB), and the explicit lower-bound run.

Selected references

  • D. S. Johnson, Approximation algorithms for combinatorial problems, J. Comput. System Sci. 9 (1974), 256–278. https://doi.org/10.1016/S0022-0000(74)80044-9
  • R. M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations, Plenum, 1972, 85–103. https://doi.org/10.1007/978-1-4684-2001-2_9
  • V. Chvátal, A greedy heuristic for the set-covering problem, Math. Oper. Res. 4 (1979), 233–235. https://doi.org/10.1287/moor.4.3.233
10 thms3 active usersReviewed
🏆Completed
CombinatoricsLinear algebra·Captain: mikedeng1

Sparse Approximate Solutions to Linear Systems 2: An Exact Cover by 3-Sets Exists iff Its Incidence System Has a 1/2-Approximate Solution with at Most m/3 NonzerosResearch Paper

Motivation

Many problems in signal processing, statistics and function interpolation ask for a solution of a linear system Ax≈bAx\approx bAx≈b that uses as few columns of AAA as possible: a sparse approximate solution. Natarajan's 1995 paper Sparse Approximate Solutions to Linear Systems (SIAM J. Comput. 24(2):227–234) was motivated by radial basis interpolation, where each column corresponds to a basis function and fewer columns mean a cheaper interpolant. The paper does two things. It proves that finding the sparsest approximate solution is computationally hard (§2, Theorem 1), and it analyses a greedy column-selection algorithm whose number of chosen columns is within a factor, depending on the conditioning of AAA, of the optimum (§3, Theorem 2; a separate mission of this series).

The hardness theorem is the reason the second half of the paper exists: once exact minimization is ruled out, one settles for approximation guarantees. It is cited throughout the compressed-sensing literature as the canonical statement that ℓ0\ell_0ℓ0​-minimization under an ℓ2\ell_2ℓ2​ error constraint is NP-hard, and is the starting point for the later theory of when convex relaxations recover sparse solutions.

The argument follows the classical reduction from Exact Cover by 3-sets (X3C) to minimum-weight solutions of linear systems in Garey and Johnson (1979), pp. 221 and 246, adapted to an approximate right-hand side.

Setting

Sparse approximate solution (SAS). Given a matrix A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n, a vector b∈Rmb\in\mathbb R^mb∈Rm and a tolerance ε>0\varepsilon>0ε>0, find a vector x∈Rnx\in\mathbb R^nx∈Rn with ∥Ax−b∥2≤ε\|Ax-b\|_2\le\varepsilon∥Ax−b∥2​≤ε whose number of nonzero entries, written ∥x∥0=∣{j:xj≠0}∣\|x\|_0=|\{j : x_j\neq0\}|∥x∥0​=∣{j:xj​=0}∣, is as small as possible. Here ∥⋅∥2\|\cdot\|_2∥⋅∥2​ is the Euclidean norm.

Exact Cover by 3-sets (X3C). An instance is a ground set S={s1,…,sm}S=\{s_1,\dots,s_m\}S={s1​,…,sm​} and a list C=c1,…,cnC=c_1,\dots,c_nC=c1​,…,cn​ of subsets of SSS, each with exactly three elements. An exact cover is a sub-collection C^={cj:j∈J}\hat C=\{c_j : j\in J\}C^={cj​:j∈J}, J⊆{1,…,n}J\subseteq\{1,\dots,n\}J⊆{1,…,n}, such that every element of SSS occurs in exactly one set of C^\hat CC^.

The transformation. From an X3C instance build the SAS instance with

  • the incidence matrix A∈Rm×nA\in\mathbb R^{m\times n}A∈Rm×n: Aij=1A_{ij}=1Aij​=1 if si∈cjs_i\in c_jsi​∈cj​ and Aij=0A_{ij}=0Aij​=0 otherwise, so column jjj is the characteristic vector of cjc_jcj​;
  • the all-ones vector b=(1,1,…,1)∈Rmb=(1,1,\dots,1)\in\mathbb R^mb=(1,1,…,1)∈Rm;
  • the tolerance ε=12\varepsilon=\tfrac12ε=21​.

In Lean, SSS is Fin m, the collection is C : Fin n → Finset (Fin m) with hC : ∀ j, (C j).card = 3, an exact cover is an index set J with IsExactCover C J, the matrix is incidence C, the vector bbb is onesVec m, AxAxAx is Matrix.toEuclideanLin (incidence C) x, and ∥x∥0\|x\|_0∥x∥0​ is nnz x.

Formalization targets

Goal: correctness of the reduction

For every X3C instance (S,C)(S,C)(S,C) as above,

(∃J, {cj}j∈J is an exact cover of S)  ⟺  (∃x∈Rn, ∥Ax−b∥2≤12 and 3 ∥x∥0≤m).\bigl(\exists J,\ \{c_j\}_{j\in J}\text{ is an exact cover of }S\bigr)\iff\bigl(\exists x\in\mathbb R^n,\ \|Ax-b\|_2\le\tfrac12\ \text{and}\ 3\,\|x\|_0\le m\bigr).(∃J, {cj​}j∈J​ is an exact cover of S)⟺(∃x∈Rn, ∥Ax−b∥2​≤21​ and 3∥x∥0​≤m).

This is the sentence the proof of Theorem 1 (p. 228) establishes: "the constructed instance of SAS has a solution with m/3m/3m/3 or fewer entries if and only if the given instance of X3C has a solution."

Milestones

  1. Forward direction. If {cj}j∈J\{c_j\}_{j\in J}{cj​}j∈J​ is an exact cover, the indicator vector x=1Jx=\mathbf 1_Jx=1J​ satisfies Ax=bAx=bAx=b and 3∥x∥0=m3\|x\|_0=m3∥x∥0​=m.
  2. Entry bounds. For every xxx with ∥Ax−b∥2≤12\|Ax-b\|_2\le\frac12∥Ax−b∥2​≤21​, each entry of AxAxAx lies in [12,32][\frac12,\frac32][21​,23​].
  3. Lower bound on sparsity. For every such xxx, m≤3∥x∥0m\le3\|x\|_0m≤3∥x∥0​.
  4. Exact cover from a sparse solution. If moreover 3∥x∥0≤m3\|x\|_0\le m3∥x∥0​≤m, the sets cjc_jcj​ with xj≠0x_j\neq0xj​=0 form an exact cover.

Significance

The result. The equivalence shows that deciding whether a sparse approximate solution with a prescribed number of nonzeros exists is at least as hard as X3C, which is NP-complete. Consequently no polynomial-time algorithm computes the optimum of SAS unless P = NP, and approximation algorithms such as the greedy method of §3 are the natural object of study. The same instance shows hardness persists for 0/1 matrices, a right-hand side of all ones and a constant tolerance, so the difficulty does not come from ill-conditioned data or from vanishing precision.

Formalizing it. The reduction is proved in the paper; this mission produces a machine-checked proof of its correctness, the combinatorial core of every NP-hardness claim for ℓ0\ell_0ℓ0​-constrained least squares. No prior machine-checked version is known to exist, on the platform or elsewhere. The complexity-theoretic wrapper is out of scope (see below).

Difficulty

The forward direction is a direct computation. The converse contains the only real step, which the paper passes over with "it is clear". From ∥Ax−b∥2≤12\|Ax-b\|_2\le\frac12∥Ax−b∥2​≤21​ one gets only that every entry of AxAxAx is in [12,32][\frac12,\frac32][21​,23​]; the entries of xxx themselves are arbitrary reals, possibly negative or not equal to 111, so xxx need not be an indicator vector and Ax=bAx=bAx=b need not hold. The exact-cover property must therefore be extracted from support sizes alone: every element is covered by some column in the support, the support has at most m/3m/3m/3 columns of three elements each, and a counting argument forces the chosen sets to be pairwise disjoint. Reading off a cover from the values of xxx (for instance, taking the jjj with xj=1x_j=1xj​=1) does not work.

Formalization scope

  • Vectors live in EuclideanSpace ℝ (Fin m) and EuclideanSpace ℝ (Fin n), so ‖·‖ is the paper's ∥⋅∥2\|\cdot\|_2∥⋅∥2​. Using the sup norm of Fin m → ℝ would give a different statement.
  • The tolerance is exactly ε=12\varepsilon=\frac12ε=21​, as printed.
  • The collection is indexed, C : Fin n → Finset (Fin m): repeated sets are allowed and are distinct indices; an exact cover is a set of indices, and on the SAS side one nonzero entry is counted per index, so both sides treat duplicates consistently.
  • "m/3m/3m/3 or fewer" is written 3∥x∥0≤m3\|x\|_0\le m3∥x∥0​≤m, never with natural-number division. With this form the equivalence holds for every mmm (both sides are false when 3∤m3\nmid m3∤m), which absorbs the paper's "without loss of generality mmm is a multiple of 3"; no divisibility hypothesis is assumed. For m=0m=0m=0 both sides are true.
  • The hypothesis that every set has exactly three elements is essential for the converse (with m=9m=9m=9, O={s3,…,s9}O=\{s_3,\dots,s_9\}O={s3​,…,s9​}, c1={s1}∪Oc_1=\{s_1\}\cup Oc1​={s1​}∪O, c2={s2}∪Oc_2=\{s_2\}\cup Oc2​={s2​}∪O, c3=Oc_3=Oc3​=O, the vector x=(1,1,−1)x=(1,1,-1)x=(1,1,−1) solves Ax=bAx=bAx=b with 3∥x∥0=m3\|x\|_0=m3∥x∥0​=m, yet CCC has no exact cover since c1c_1c1​ and c2c_2c2​ must both be chosen) and is kept as hC.
  • Not formalized: the infinite-precision RAM machine model, polynomial-time many-one reductions, polynomial-time computability of the transformation (evident: an m×nm\times nm×n 0/1 matrix), and the NP-completeness of X3C (cited by the paper from Garey–Johnson). The goal is therefore the correctness of the transformation, not a statement titled "SAS is NP-hard". A statement that only records the forward direction, or that fixes xxx to be a 0/1 vector on the SAS side, would trivialize the converse and is not the target.
  • Tools a solver will need are in Mathlib: coordinate bounds for the Euclidean norm (PiLp.norm_apply_le), Finset.card_biUnion_le, and Finset.card_biUnion for disjoint unions. Contributions of a reusable exact-cover API, or of a polynomial-time reduction framework that could later wrap this equivalence into an NP-hardness theorem, are welcome.

Selected references

  • B. K. Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM Journal on Computing 24(2):227–234, 1995. https://doi.org/10.1137/s0097539792240406
  • M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (X3C: problem [SP2], p. 221; minimum weight solution to linear equations: [MP5], p. 246).
  • F. P. Preparata and M. I. Shamos, Computational Geometry: An Introduction, Springer, 1985 (the real RAM model). https://doi.org/10.1007/978-1-4612-1098-6
6 thms3 active usersReviewed
🏆Completed
CombinatoricsGraph TheoryNumber Theory·Captain: mikedeng1

Fast Algorithms for Finding Nearest Common Ancestors II: Nearest Common Ancestors in a Complete Binary Tree by Symmetric-Order ArithmeticResearch Paper

Motivation

The nearest common ancestor (nca) problem asks, for a fixed rooted tree and a sequence of vertex pairs (v,w)(v, w)(v,w), for the deepest vertex that is an ancestor of both. It is a basic step in suffix-tree string algorithms and is equivalent to range-minimum queries (Bender, Farach-Colton, 2000). Harel and Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13 (1984) 338–355, gave the first algorithm answering each query on a static tree in constant time on a random-access machine after linear preprocessing.

Their construction reduces the general problem to the case of a complete binary tree, where §3 of the paper shows that nca queries can be answered "by direct calculation" on vertex numbers: multiplication, division, powers of two, the base-two logarithm and bitwise exclusive or. The later simplification of Schieber and Vishkin (1988) is built on the same in-order numbering of a complete binary tree. This mission formalizes that arithmetic core.

Timeline, as reviewed in the paper's §1 (pp. 338–340):

  • 1976: Aho, Hopcroft and Ullman (SIAM J. Comput. 5) give an O(n+mα(m+n,n))O(n + m\alpha(m+n, n))O(n+mα(m+n,n))-time off-line algorithm on a pointer machine, and for static trees a random-access algorithm with O(nlog⁡log⁡n)O(n \log\log n)O(nloglogn) preprocessing and O(log⁡log⁡n)O(\log\log n)O(loglogn) time per query.
  • 1976: van Leeuwen (unpublished report) gives an O(n+mlog⁡log⁡n)O(n + m \log\log n)O(n+mloglogn)-time algorithm for linking roots and static trees that runs on a pointer machine in O(n)O(n)O(n) space.
  • 1980: Harel (Proc. 21st FOCS) gives a preliminary version of the paper's results.
  • 1984: Harel and Tarjan prove that pointer machines need Ω(log⁡log⁡n)\Omega(\log\log n)Ω(loglogn) time per query on static trees (Theorem 1), and give the O(n)O(n)O(n)-preprocessing, O(1)O(1)O(1)-query random-access algorithm whose base case is the subject of this mission.

Setting

Fix d≥0d \ge 0d≥0 and let TTT be the complete binary tree of depth ddd. A vertex is identified with the path from the root to it, a word of at most ddd left or right turns; the root is the empty word and TTT has n=2d+1−1n = 2^{d+1} - 1n=2d+1−1 vertices. Following the paper's Appendix (pp. 354–355):

  • www is an ancestor of vvv (vvv a descendant of www) if the word www is a prefix of the word vvv; every vertex is its own ancestor. vvv and www are unrelated if neither is an ancestor of the other.
  • The depth of vvv is its distance to the root; its height h(v)h(v)h(v) is the length of the longest path from a leaf to vvv, which in TTT is d−depth⁡(v)d - \operatorname{depth}(v)d−depth(v).
  • nca⁡(v,w)\operatorname{nca}(v, w)nca(v,w) is the vertex of greatest depth that is an ancestor of both: the longest common prefix.

The vertices of TTT are numbered from 111 to nnn in symmetric order (in-order): at every vertex, first the left subtree, then the vertex, then the right subtree. sym(v)\mathrm{sym}(v)sym(v) is the number of vvv and sym−1(i)\mathrm{sym}^{-1}(i)sym−1(i) the vertex numbered iii. For d=4d = 4d=4 (Fig. 1 of the paper) the root is 161616, its children 888 and 242424, and the leaves 1,3,5,…,311, 3, 5, \dots, 311,3,5,…,31. i⊕ji \oplus ji⊕j denotes bitwise exclusive or and lg⁡\lglg the base-two logarithm.

Two procedures of §3 use only numbers, heights and ddd:

  • the nca depth algorithm: return d−h(v)d - h(v)d−h(v) if sym(w)∈[sym(v)−2h(v)+1,sym(v)+2h(v)−1]\mathrm{sym}(w) \in [\mathrm{sym}(v) - 2^{h(v)} + 1, \mathrm{sym}(v) + 2^{h(v)} - 1]sym(w)∈[sym(v)−2h(v)+1,sym(v)+2h(v)−1]; else d−h(w)d - h(w)d−h(w) if the same holds with v,wv, wv,w exchanged; else d−⌊lg⁡(sym(v)⊕sym(w))⌋d - \lfloor \lg(\mathrm{sym}(v) \oplus \mathrm{sym}(w)) \rfloord−⌊lg(sym(v)⊕sym(w))⌋;
  • the depth algorithm: given vvv and a depth d2≤depth⁡(v)d_2 \le \operatorname{depth}(v)d2​≤depth(v), with h=d−d2h = d - d_2h=d−d2​, return sym−1(2h+1⌊sym(v)/2h+1⌋+2h)\mathrm{sym}^{-1}\bigl(2^{h+1}\lfloor \mathrm{sym}(v)/2^{h+1}\rfloor + 2^h\bigr)sym−1(2h+1⌊sym(v)/2h+1⌋+2h).

Formalization targets

Goal: the nca algorithm is correct

The algorithm to compute nca⁡(v,w)\operatorname{nca}(v,w)nca(v,w) (p. 342) runs the nca depth algorithm to obtain d0d_0d0​ and then the depth algorithm on (v,d0)(v, d_0)(v,d0​). The goal states that it returns the nearest common ancestor: for all vertices v,wv, wv,w of TTT, with d0d_0d0​ the output of the nca depth algorithm and h=d−d0h = d - d_0h=d−d0​,

sym(nca⁡(v,w))=2h+1⌊sym(v)2h+1⌋+2h.\mathrm{sym}(\operatorname{nca}(v,w)) = 2^{h+1}\left\lfloor \frac{\mathrm{sym}(v)}{2^{h+1}} \right\rfloor + 2^h .sym(nca(v,w))=2h+1⌊2h+1sym(v)​⌋+2h.

Milestones

In the order the paper uses them:

  1. Numbers at height hhh (p. 341): the vertices of height hhh are numbered 2h,3⋅2h,5⋅2h,…2^h, 3\cdot 2^h, 5\cdot 2^h, \dots2h,3⋅2h,5⋅2h,… from left to right.
  2. Lemma 1: h(v)h(v)h(v) is the largest hhh with 2h∣sym(v)2^h \mid \mathrm{sym}(v)2h∣sym(v).
  3. Lemma 2: the descendants of vvv are the vertices numbered in [sym(v)−2h(v)+1,sym(v)+2h(v)−1][\mathrm{sym}(v) - 2^{h(v)} + 1, \mathrm{sym}(v) + 2^{h(v)} - 1][sym(v)−2h(v)+1,sym(v)+2h(v)−1].
  4. Lemma 3: for a height h≥h(v)h \ge h(v)h≥h(v), the height-hhh ancestor of vvv has number 2h+1⌊sym(v)/2h+1⌋+2h2^{h+1}\lfloor \mathrm{sym}(v)/2^{h+1}\rfloor + 2^h2h+1⌊sym(v)/2h+1⌋+2h.
  5. Lemma 4: for unrelated v,wv, wv,w,
h(nca⁡(v,w))=⌊lg⁡(sym(v)⊕sym(w))⌋.h(\operatorname{nca}(v,w)) = \lfloor \lg(\mathrm{sym}(v) \oplus \mathrm{sym}(w)) \rfloor .h(nca(v,w))=⌊lg(sym(v)⊕sym(w))⌋.
  1. The nca depth algorithm returns depth⁡(nca⁡(v,w))\operatorname{depth}(\operatorname{nca}(v,w))depth(nca(v,w)).
  2. The depth algorithm returns the number of the depth-d2d_2d2​ ancestor of vvv.

Two supporting statements pin the definitions to the paper: sym\mathrm{sym}sym is a bijection onto {1,…,2d+1−1}\{1, \dots, 2^{d+1} - 1\}{1,…,2d+1−1}, and the longest common prefix is the deepest common ancestor.

Significance

The constant-time nca computation on complete binary trees is the base case of the whole paper: §§4–5 embed an arbitrary tree into a moderately sized complete binary tree through a compressed tree and a balanced binary tree, and every query ends with the arithmetic of §3. The same idea, that in-order numbers encode ancestry in their low-order bits, underlies the Schieber–Vishkin algorithm. Lemma 1 identifies the height with the 2-adic valuation of the number, and Lemma 4 identifies the nca height with the position of the highest differing bit.

The results are proved in the paper, with the proofs left as "easy to verify". No machine-checked version of this numbering or of these four lemmas is known to exist in Mathlib or on this platform. A formal development supplies proofs of the four lemmas and the two algorithms, and a reusable library connecting in-order ranks of a complete binary tree to binary arithmetic (Nat.log, bitwise xor, 2-adic valuation).

Difficulty

The numbering is defined by a traversal order, while the lemmas speak about divisibility, floor division and exclusive or. The work lies in connecting the rank of a vertex in symmetric order to its closed form (2j+1)⋅2h(v)(2j+1)\cdot 2^{h(v)}(2j+1)⋅2h(v), where jjj is its left-to-right position. That counting argument sums the sizes of the subtrees that precede vvv and is where most of the effort goes. Lemma 4 then needs the observation that two unrelated numbers agree in all bits above the height of their nca and differ in the bit at that height. This is a statement about Nat.testBit of the exclusive or, and it fails for related vertices. The algorithm statements add a case analysis whose first two cases overlap when v=wv = wv=w.

Formalization scope

  • A vertex of the tree of depth ddd is a List Bool of length at most ddd (false = left). Ancestry is the prefix relation, nca⁡\operatorname{nca}nca the longest common prefix, depth the length, and height d−lengthd - \text{length}d−length. None of these structural notions uses the numbering.
  • sym(v)\mathrm{sym}(v)sym(v) is the number of vertices whose in-order sort key is lexicographically at most that of vvv. The key is the path with left ↦0\mapsto 0↦0, right ↦2\mapsto 2↦2, followed by 111. The numbering is not defined by the closed form or by a recursion on numbers: a definition of that kind would make the height-hhh numbering and Lemma 1 immediate and move the content of the mission into an uncheckable definition.
  • ⌊lg⁡x⌋\lfloor \lg x \rfloor⌊lgx⌋ is Nat.log 2 x, which agrees for x≥1x \ge 1x≥1. ⊕\oplus⊕ is ^^^ on N\mathbb NN, and floor division is / on N\mathbb NN.
  • Interval tests a∈[b−c+1,b+c−1]a \in [b - c + 1, b + c - 1]a∈[b−c+1,b+c−1] are written additively as b+1≤a+cb + 1 \le a + cb+1≤a+c and a+1≤b+ca + 1 \le b + ca+1≤b+c. The subtractions d−h(v)d - h(v)d−h(v) and d−d2d - d_2d−d2​ never truncate for heights and depths of vertices.
  • Lemma 3 states explicitly that h≤dh \le dh≤d ("hhh is a height") and that the ancestor exists. The depth algorithm assumes d2≤depth⁡(v)d_2 \le \operatorname{depth}(v)d2​≤depth(v), as printed.
  • sym−1\mathrm{sym}^{-1}sym−1 is not defined as a function. The goal and the depth algorithm state that a vertex has the computed number if and only if it is the nearest common ancestor (respectively the ancestor at depth d2d_2d2​), which says that sym−1\mathrm{sym}^{-1}sym−1 of that number is that vertex.
  • The O(1)O(1)O(1) time bounds are not formalized, since the random-access machine model is out of scope.

Proofs of any milestone are welcome.

Selected references

  • D. Harel and R. E. Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13(2) (1984), 338–355. https://doi.org/10.1137/0213024
  • A. V. Aho, J. E. Hopcroft and J. D. Ullman, On Finding Lowest Common Ancestors in Trees, SIAM J. Comput. 5(1) (1976), 115–132. https://doi.org/10.1137/0205011
  • B. Schieber and U. Vishkin, On Finding Lowest Common Ancestors: Simplification and Parallelization, SIAM J. Comput. 17(6) (1988), 1253–1262. https://doi.org/10.1137/0217079
  • M. A. Bender and M. Farach-Colton, The LCA Problem Revisited, LATIN 2000, LNCS 1776, 88–94. https://doi.org/10.1007/10719839_9
11 thms3 active usersReviewed
🏆Completed
CombinatoricsComplexity Theory·Captain: mikedeng1

Fast Algorithms for Finding Nearest Common Ancestors I: A Lower Bound for Pointer MachinesResearch Paper

Motivation

The nearest common ancestor problem asks, for a rooted tree and two of its vertices xxx and yyy, for the deepest vertex that is an ancestor of both, written nca⁡(x,y)\operatorname{nca}(x,y)nca(x,y). It appears as a subroutine in string algorithms (suffix trees), in graph algorithms (path queries, dominators) and in the analysis of set-union structures. Aho, Hopcroft and Ullman (On finding lowest common ancestors in trees, SIAM J. Comput. 5, 1976) posed it in several versions, differing in how much the tree changes while the queries are answered.

Harel and Tarjan (Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13, 1984) study how the answer depends on the machine model. On a random-access machine, where addresses can be computed arithmetically, they preprocess a static tree in linear time and then answer each query in constant time. On a pointer machine, where memory can only be traversed by following pointers, their §2 shows that no representation of the tree allows constant-time queries: Ω(log⁡log⁡n)\Omega(\log\log n)Ω(loglogn) steps are needed in the worst case. This mission formalizes that lower bound.

Timeline.

  • 1976: Aho, Hopcroft and Ullman give an O(log⁡log⁡n)O(\log\log n)O(loglogn)-per-query random-access algorithm for static trees.
  • 1976: van Leeuwen (Finding lowest common ancestors in less than logarithmic time, unpublished report, reference [14] of Harel–Tarjan) gives an O(n+mlog⁡log⁡n)O(n + m\log\log n)O(n+mloglogn) algorithm for static trees that runs on a pointer machine.
  • 1984: Harel and Tarjan prove Theorem 1, the matching Ω(log⁡log⁡n)\Omega(\log\log n)Ω(loglogn) lower bound for pointer machines, and the O(1)O(1)O(1)-per-query random-access algorithm.

Setting

A pointer machine stores its data as a collection of nodes. Each node has a fixed number of fields, and a pointer field holds either a node or nil. The machine can follow a pointer from a node it holds, but it cannot compute an address. Following Harel and Tarjan (p. 340), a static tree is represented by a list structure: each tree vertex vvv is represented by a single node rep(v)\mathrm{rep}(v)rep(v), distinct vertices by distinct nodes, and the structure may contain further nodes that represent no vertex. Each node has two pointer fields; the paper reduces any fixed number of pointers to two "without loss of generality". To answer a query on xxx and yyy, the machine is given pointers to rep(x)\mathrm{rep}(x)rep(x) and rep(y)\mathrm{rep}(y)rep(y) and must return a pointer to rep(nca⁡(x,y))\mathrm{rep}(\operatorname{nca}(x,y))rep(nca(x,y)).

The node bbb is accessible from aaa in jjj steps or less if it can be reached from aaa by following at most jjj pointers. Write accj(a)\mathrm{acc}_j(a)accj​(a) for the set of such nodes. A run of ttt steps from input nodes aaa and bbb is a sequence n1,…,ntn_1,\dots,n_tn1​,…,nt​ in which each nsn_sns​ is the content of a pointer field of a node among a,b,n1,…,ns−1a, b, n_1, \dots, n_{s-1}a,b,n1​,…,ns−1​. A query with answer ccc is answered in kkk steps if some run of at most kkk steps holds ccc.

The tree is the complete binary tree TTT of height hhh, with n=2hn = 2^hn=2h leaves. Its vertices are the words w∈{0,1}≤hw \in \{0,1\}^{\le h}w∈{0,1}≤h (the root-to-vertex path, 000 = left), the ancestors of vvv are its prefixes, the depth of www is ∣w∣|w|∣w∣ and its height is h−∣w∣h - |w|h−∣w∣. Then nca⁡(x,y)\operatorname{nca}(x,y)nca(x,y) is the longest common prefix of xxx and yyy. Logarithms are binary: lg⁡=log⁡2\lg = \log_2lg=log2​.

Formalization targets

Goal: Theorem 1 in the explicit form of its proof

For every hhh, every node type, every list structure with two pointers per node and every injective representation rep\mathrm{rep}rep of the complete binary tree with n=2hn = 2^hn=2h leaves: if every nca query on two leaves is answered in kkk steps, then

k>lg⁡lg⁡n−2.k > \lg\lg n - 2 .k>lglgn−2.

This is the last display of the proof (p. 341), which is what the paper's Ω(log⁡log⁡n)\Omega(\log\log n)Ω(loglogn) means. The representation is arbitrary and is quantified before the query bound, so the bound holds for every representation.

Milestones: the claims of the proof

  1. A query answered in kkk steps reaches only nodes in acck(rep(x))∪acck(rep(y))\mathrm{acc}_k(\mathrm{rep}(x)) \cup \mathrm{acc}_k(\mathrm{rep}(y))acck​(rep(x))∪acck​(rep(y)).
  2. ∣accj(a)∣≤2j+1−1|\mathrm{acc}_j(a)| \le 2^{j+1} - 1∣accj​(a)∣≤2j+1−1 for every node aaa.
  3. With AxA_xAx​ the set of vertices whose nodes are accessible from rep(x)\mathrm{rep}(x)rep(x) in kkk steps or less: for a nonleaf www with children u,vu, vu,v, either w∈Axw \in A_xw∈Ax​ for every leaf xxx below uuu, or w∈Ayw \in A_yw∈Ay​ for every leaf yyy below vvv.
  4. A vertex of height i≥1i \ge 1i≥1 lies in AxA_xAx​ for at least 2i−12^{i-1}2i−1 leaves xxx.
∑x∈L∣Ax∣≥n2lg⁡n,\sum_{x \in L} |A_x| \ge \frac{n}{2}\lg n,x∈L∑​∣Ax​∣≥2n​lgn,

where LLL is the set of leaves.

Significance

The result. Theorem 1 shows that van Leeuwen's pointer-machine algorithm for static trees is optimal up to a constant factor, and that the constant-time queries of the paper's §§3–5 depend on address arithmetic. It is an early nontrivial lower bound for pointer machines on a natural problem; the paper compares it with Tarjan's lower bound for disjoint-set union on a pointer machine (J. Comput. System Sci. 18, 1979).

Formalizing it. The theorem is proved in the paper; as far as could be determined no machine-checked version exists, and Mathlib has no pointer-machine model. The mission produces an explicit, reusable definition of pointer-machine runs and accessibility together with a complete proof of the explicit bound. A formal model of this kind is the precondition for stating any other pointer-machine lower bound.

Difficulty

The statement must hold for every representation, including structures with many auxiliary nodes and arbitrary pointers between tree nodes. Arguing about one natural representation, such as parent pointers, where a leaf is far from its ancestors, says nothing about other representations: a structure with shortcut pointers or auxiliary nodes may bring some ancestors close to some leaves, and the bound must survive every such choice. In the formal setting the counting also has to handle overlaps: nodes reachable from several leaves, nodes that represent no vertex, and pointer cycles.

Formalization scope

  • Model. Nodes form an arbitrary type N, not necessarily finite. ptr : N → Fin 2 → Option N gives the two pointer fields (none = nil), and rep : Vertex h → N is required to be injective. acc ptr j a is defined recursively. Run ptr a b t held is an inductive predicate for runs of ttt steps, AnsweredIn asks for some run of at most kkk steps holding the answer, and AnswersLeafQueriesIn ptr rep k requires this for every pair of leaves.
  • Conventions.
    • Two pointer fields per node, as the paper's "without loss of generality" reduction allows; the reduction itself is not formalized.
    • Only queries on two leaves are assumed answerable. This is weaker than all queries, so the theorem is at least as strong as the paper's.
    • Time is counted as pointer-following steps. Mutation of the structure during a query and non-pointer fields are not modelled: neither lets the machine hold a node it has not reached by following pointers. The clause "the algorithm remembers nothing between queries" is built into the static structure.
    • Vertex h is {s : List Bool // s.length ≤ h}, nca is the longest common prefix, and a separate theorem identifies it with the Appendix's deepest common ancestor. n=2hn = 2^hn=2h counts leaves, not vertices.
    • lg⁡\lglg is Real.logb 2. For h=0h = 0h=0 Lean's log⁡20=0\log_2 0 = 0log2​0=0 gives the true statement k>−2k > -2k>−2; for h≥1h \ge 1h≥1, lg⁡lg⁡n=log⁡2h\lg\lg n = \log_2 hlglgn=log2​h.
    • Cardinalities in the milestones are Set.encard in N∪{∞}\mathbb N \cup \{\infty\}N∪{∞}, so finiteness is part of each claim. Divisions are cleared: h 2h≤2∑x∣Ax∣h\,2^h \le 2\sum_x |A_x|h2h≤2∑x​∣Ax​∣.
  • Ruling out trivial formalizations. The hypothesis AnswersLeafQueriesIn is satisfiable: the parent-pointer representation answers every leaf query in hhh steps. If rep were not injective, a constant rep would answer every query in zero steps, so injectivity is kept in the goal. The milestones do not need it and do not assume it.
  • Infrastructure. The goal needs finite-set counting over the leaves of the complete binary tree and a double count over heights. The run and accessibility definitions are reusable for other pointer-machine arguments. Proofs of the milestones, and of the ℕ form h<2k+2h < 2^{k+2}h<2k+2 that the goal reduces to, are welcome.

Selected references

  • D. Harel, R. E. Tarjan, Fast Algorithms for Finding Nearest Common Ancestors, SIAM J. Comput. 13(2):338–355, 1984. https://doi.org/10.1137/0213024
  • A. V. Aho, J. E. Hopcroft, J. D. Ullman, On finding lowest common ancestors in trees, SIAM J. Comput. 5(1):115–132, 1976. https://doi.org/10.1137/0205011
  • A. Schönhage, Storage modification machines, SIAM J. Comput. 9(3):490–508, 1980. https://doi.org/10.1137/0209036
  • R. E. Tarjan, A class of algorithms which require nonlinear time to maintain disjoint sets, J. Comput. System Sci. 18(2):110–127, 1979. https://doi.org/10.1016/0022-0000(79)90042-4
8 thms3 active usersReviewed
🏆Completed
Graph TheoryOperations ResearchOptimization·Captain: mikedeng1

A New Approach to the Maximum-Flow Problem 2: The Nonsaturating-Push Bound for FIFO Push-RelabelResearch Paper

Motivation

The maximum-flow problem asks how much of a commodity can be sent from a source to a sink through a network whose edges carry capacities. It is a basic model of operations research. Transportation, scheduling, bipartite matching and image segmentation reduce to it, and it is the inner step of many combinatorial algorithms.

Goldberg and Tarjan introduced the push–relabel (preflow) method in A New Approach to the Maximum-Flow Problem (J. ACM 35(4), 1988). Ford–Fulkerson-type algorithms augment along whole source–sink paths. The push–relabel method instead moves excess flow across single edges, guided by integer distance labels on the vertices. Whatever order its local operations are applied in, it is correct and performs O(n2m)O(n^2 m)O(n2m) of them (§3 of the paper). Section 4 shows that one particular order, processing the active vertices first-in, first-out, cuts the dominant term, the number of nonsaturating pushes, to O(n3)O(n^3)O(n3). The method and its FIFO and highest-label variants are the standard practical maximum-flow codes.

Timeline:

  • 1956: Ford and Fulkerson, augmenting paths and max-flow min-cut.
  • 1970–72: Dinic, and Edmonds and Karp, give polynomial augmenting-path bounds.
  • 1974: Karzanov introduces preflows and obtains O(n3)O(n^3)O(n3).
  • 1982: Shiloach and Vishkin give a parallel O(n2log⁡n)O(n^2 \log n)O(n2logn) preflow algorithm with a first-in, first-out flavour.
  • 1988: Goldberg and Tarjan, the generic push–relabel method, the FIFO bound of this mission, and O(nmlog⁡(n2/m))O(nm \log(n^2/m))O(nmlog(n2/m)) with dynamic trees.

Setting

A flow network has a finite vertex set VVV with n=∣V∣n = |V|n=∣V∣, a capacity c(v,w)≥0c(v,w) \ge 0c(v,w)≥0 on every ordered pair, a source sss and a sink t≠st \neq st=s. The edges are the pairs with c(v,w)>0c(v,w) > 0c(v,w)>0, and there are no loops. A preflow is a function fff on vertex pairs with f(v,w)≤c(v,w)f(v,w) \le c(v,w)f(v,w)≤c(v,w) and f(v,w)=−f(w,v)f(v,w) = -f(w,v)f(v,w)=−f(w,v). Its excess e(v)=∑uf(u,v)e(v) = \sum_u f(u,v)e(v)=∑u​f(u,v) must be nonnegative at every v≠sv \neq sv=s. The residual capacity is rf(v,w)=c(v,w)−f(v,w)r_f(v,w) = c(v,w) - f(v,w)rf​(v,w)=c(v,w)−f(v,w). A labeling ddd assigns each vertex a value in N∪{∞}\mathbb{N} \cup \{\infty\}N∪{∞}. A vertex v∉{s,t}v \notin \{s,t\}v∈/{s,t} is active if d(v)<∞d(v) < \inftyd(v)<∞ and e(v)>0e(v) > 0e(v)>0.

The two basic operations (Fig. 1 of the paper) are:

  • push(v,w)(v,w)(v,w), applicable when vvv is active, rf(v,w)>0r_f(v,w) > 0rf​(v,w)>0 and d(v)=d(w)+1d(v) = d(w)+1d(v)=d(w)+1. It sends δ=min⁡(e(v),rf(v,w))\delta = \min(e(v), r_f(v,w))δ=min(e(v),rf​(v,w)) from vvv to www. The push is saturating if rf(v,w)=0r_f(v,w) = 0rf​(v,w)=0 afterwards and nonsaturating otherwise.
  • relabel(v)(v)(v), applicable when vvv is active and d(v)≤d(w)d(v) \le d(w)d(v)≤d(w) for every residual edge (v,w)(v,w)(v,w). It sets d(v)←min⁡{d(w)+1:rf(v,w)>0}d(v) \leftarrow \min\{d(w)+1 : r_f(v,w) > 0\}d(v)←min{d(w)+1:rf​(v,w)>0}.

The algorithm starts by saturating every edge leaving sss, with d(s)=nd(s) = nd(s)=n and d(v)=0d(v) = 0d(v)=0 for v≠sv \neq sv=s.

In the first-in, first-out algorithm (§4), each vertex vvv scans a fixed list L(v)L(v)L(v) of its neighbours through a current edge. The push/relabel(v)(v)(v) operation pushes through the current edge if possible. Otherwise it advances the current edge, or, at the end of the list, returns to the first edge and relabels vvv. Active vertices wait in a queue QQQ, initially {v∈V−{s,t}:c(s,v)>0}\{v \in V - \{s,t\} : c(s,v) > 0\}{v∈V−{s,t}:c(s,v)>0}. The discharge operation removes the front vertex vvv and repeats push/relabel(v)(v)(v) until e(v)=0e(v) = 0e(v)=0 or d(v)d(v)d(v) increases. Every vertex that becomes active meanwhile is appended to QQQ, and vvv is appended too if it is still active. Passes over the queue are defined inductively. Pass 1 consists of the discharges of the initially queued vertices. Pass i+1i+1i+1 consists of the discharges of vertices added during pass iii.

Formalization targets

Goal: Corollary 4.4 (p. 931)

For every network, every edge-list order, every initial queue order, and every run of the FIFO algorithm,

#{nonsaturating pushes}≤4n3.\#\{\text{nonsaturating pushes}\} \le 4n^3 .#{nonsaturating pushes}≤4n3.

The constant is the printed one.

Milestones

  • Lemma 4.1 (p. 929): the push/relabel operation relabels only when relabeling is applicable.
  • Lemma 3.5 (p. 926): from any vertex with positive excess, the source is reachable in the residual graph.
  • Lemma 3.7 (p. 927): at any time, d(v)≤2n−1d(v) \le 2n-1d(v)≤2n−1 for every vertex.
  • Lemma 3.8 (p. 927): at most 2n−12n-12n−1 relabelings per vertex and at most (2n−1)(n−2)<2n2(2n-1)(n-2) < 2n^2(2n−1)(n−2)<2n2 in total.
  • Lemma 4.3 (p. 930): at most 4n24n^24n2 passes over the queue.

Significance

Corollary 4.4 is the combinatorial core of Theorem 4.5, which states that the FIFO algorithm runs in O(n3)O(n^3)O(n3) time. Theorem 4.2 shows that the remaining work of the implementation is O(nm)O(nm)O(nm) plus constant time per nonsaturating push. The bound of Corollary 4.4 is therefore what separates the O(n3)O(n^3)O(n3) FIFO method from the O(n2m)O(n^2 m)O(n2m) bound of the generic method, which matters on dense networks. The same pass-counting argument is reused for the parallel algorithm of §6 and underlies later analyses of highest-label and wave variants.

The results are proved in the paper. Formalizing them adds an analysis of a push–relabel algorithm, which the platform does not yet have. Its existing network-flow material states max-flow min-cut and Ford–Fulkerson termination in an arc-based model with nonnegative flows (the Introduction to Linear Optimization missions). The mission builds a precise operational model of the FIFO implementation, with edge lists, current edges and a queue carrying pass numbers, and states an explicit operation count for it. A companion mission in this series treats the generic algorithm's correctness and its (2n−1)(n−2)+2nm+4n2m(2n-1)(n-2) + 2nm + 4n^2m(2n−1)(n−2)+2nm+4n2m operation bound.

Difficulty

The obvious argument is the potential-function count of §3, over the sum of the labels of active vertices. It yields only 4n2m4n^2 m4n2m and does not use the queue discipline at all. The 4n34n^34n3 bound has to charge nonsaturating pushes to passes over the queue, and then bound the number of passes by the total growth of the labels. Neither step is visible in the generic algorithm, because both depend on the order in which vertices are processed.

Making this rigorous requires invariants of the implementation that the paper uses silently:

  • a vertex is in the queue exactly when it is active, and at most once;
  • pass numbers are nondecreasing along the queue;
  • current edges only move forward between relabelings.

Lemma 4.1 in particular depends on the current-edge scan: an edge passed over earlier stays inadmissible until vvv is relabeled.

Formalization scope

The Lean development works in namespace GoldbergTarjan.FIFO. Vertices form a type V with [Fintype V] [DecidableEq V], and nnn is Fintype.card V. Capacities are c : V → V → ℝ with c ≥ 0 and c v v = 0. Flows are antisymmetric real functions on all ordered pairs, not nonnegative arc flows. Excess is computed from the flow. Labels are in ℕ∞, and the empty minimum in relabel is ⊤.

The state of the algorithm consists of the flow, the labels, the current-edge index cur v into the edge list L v, and the queue Q : List (V × ℕ), each entry tagged with its pass number. Push/relabel (Fig. 3) is a total function, and a discharge (Fig. 4) is a relation carrying the number of push/relabel operations it performs. A run consists of the states S 0, …, S K with S 0 the initial state and consecutive states related by one discharge. The printed variant of Fig. 4, which stops as soon as vvv is relabeled, is the one formalized. Counts are natural numbers over all push/relabel operations of all discharges. The number of passes is the largest pass tag of a discharged entry.

All constants are explicit, exactly as printed:

  • 2n−12n-12n−1 (Lemmas 3.7, 3.8);
  • (2n−1)(n−2)(2n-1)(n-2)(2n−1)(n−2) and 2n22n^22n2 (Lemma 3.8);
  • 4n24n^24n2 (Lemma 4.3);
  • 4n34n^34n3 (Corollary 4.4).

No asymptotic notation is used, and no m≥n−1m \ge n-1m≥n−1 assumption is made.

A model without current edges, where relabeling happens whenever no push applies, would make Lemma 4.1 vacuous and change the algorithm. Pass numbers that are not propagated by the "added during pass iii" rule would make the pass count arbitrary. Both are ruled out by the definitions. A sorry-free check, outside the proposal, exhibits a three-vertex network with two legal discharges, two passes and no nonsaturating push, so the run hypotheses are satisfiable.

Reusable beyond this mission are the network, preflow, push and relabel definitions and Lemma 3.5, which is about an arbitrary preflow. Contributions welcome: invariants of FIFO runs (preflow, valid labeling, queue = active set, cur within bounds), proofs of the milestones, and the reduction of Corollary 4.4 to Lemma 4.3.

Selected references

  • A. V. Goldberg, R. E. Tarjan, A New Approach to the Maximum-Flow Problem, Journal of the ACM 35(4):921–940, 1988. https://doi.org/10.1145/48014.61051
  • A. V. Karzanov, Determining the maximal flow in a network by the method of preflows, Soviet Math. Doklady 15:434–437, 1974.
  • Y. Shiloach, U. Vishkin, An O(n² log n) parallel max-flow algorithm, Journal of Algorithms 3(2):128–146, 1982. https://doi.org/10.1016/0196-6774(82)90013-X
  • L. R. Ford, D. R. Fulkerson, Maximal flow through a network, Canadian Journal of Mathematics 8:399–404, 1956. https://doi.org/10.4153/CJM-1956-045-5
  • J. Edmonds, R. M. Karp, Theoretical improvements in algorithmic efficiency for network flow problems, Journal of the ACM 19(2):248–264, 1972. https://doi.org/10.1145/321694.321699
10 thms3 active usersReviewed
🏆Completed
Graph TheoryOperations ResearchOptimization·Captain: mikedeng1

A New Approach to the Maximum-Flow Problem 1: The Generic Push-Relabel Algorithm and Its Operation BoundResearch Paper

Motivation

The maximum-flow problem asks how much of a commodity can be sent from a source to a sink through a network whose edges have capacities. It is a basic model in operations research (transportation, scheduling, bipartite matching) and a standard subroutine in combinatorial optimization.

Classical algorithms, from Ford and Fulkerson (1956) through Edmonds–Karp and Dinic (1970–1972) and Karzanov (1974), increase a feasible flow along augmenting paths or blocking flows. Goldberg and Tarjan, A New Approach to the Maximum-Flow Problem (J. ACM 35(4), 1988, doi:10.1145/48014.61051), replaced this global view by a local one: the push-relabel method maintains a preflow, which may violate conservation at intermediate vertices, and moves excess along edges toward vertices with smaller distance labels. The generic method, with the basic operations applied in any order, is the starting point of the FIFO, highest-label and dynamic-tree implementations analysed later in the same paper, and push-relabel codes remain among the fastest practical maximum-flow solvers.

This mission formalizes §2–§3 of the paper: the generic algorithm is correct, and it stops after a number of basic operations bounded by an explicit polynomial in the numbers of vertices and edges, whatever order of operations is chosen.

Setting

A flow network has a finite vertex set VVV with n=∣V∣n = |V|n=∣V∣, a source sss and a sink t≠st \ne st=s, and a capacity c(v,w)≥0c(v,w) \ge 0c(v,w)≥0 for every ordered pair of vertices, positive exactly on the edges E={(v,w):c(v,w)>0}E = \{(v,w) : c(v,w) > 0\}E={(v,w):c(v,w)>0}; m=∣E∣m = |E|m=∣E∣, and there are no loops, c(v,v)=0c(v,v) = 0c(v,v)=0.

Flows are real functions on all vertex pairs. A function fff satisfies the capacity constraint if f(v,w)≤c(v,w)f(v,w) \le c(v,w)f(v,w)≤c(v,w) and antisymmetry if f(v,w)=−f(w,v)f(v,w) = -f(w,v)f(v,w)=−f(w,v) for all pairs. The excess of vvv is e(v)=∑uf(u,v)e(v) = \sum_{u} f(u,v)e(v)=∑u​f(u,v). A flow also has e(v)=0e(v) = 0e(v)=0 for v∉{s,t}v \notin \{s,t\}v∈/{s,t}; a preflow only e(v)≥0e(v) \ge 0e(v)≥0 for v≠sv \ne sv=s. The value of a flow is ∣f∣=∑vf(v,t)|f| = \sum_v f(v,t)∣f∣=∑v​f(v,t), and a maximum flow is a flow of maximum value.

The residual capacity is rf(v,w)=c(v,w)−f(v,w)r_f(v,w) = c(v,w) - f(v,w)rf​(v,w)=c(v,w)−f(v,w); pairs with rf(v,w)>0r_f(v,w) > 0rf​(v,w)>0 are the edges of the residual graph GfG_fGf​. A valid labeling is d:V→N∪{∞}d : V \to \mathbb{N} \cup \{\infty\}d:V→N∪{∞} with d(s)=nd(s) = nd(s)=n, d(t)=0d(t) = 0d(t)=0 and d(v)≤d(w)+1d(v) \le d(w) + 1d(v)≤d(w)+1 on every residual edge. A vertex vvv is active if v∉{s,t}v \notin \{s,t\}v∈/{s,t}, d(v)<∞d(v) < \inftyd(v)<∞ and e(v)>0e(v) > 0e(v)>0.

The two basic operations (Fig. 1 of the paper) are:

  • Push(v,w)(v,w)(v,w), applicable when vvv is active, rf(v,w)>0r_f(v,w) > 0rf​(v,w)>0 and d(v)=d(w)+1d(v) = d(w)+1d(v)=d(w)+1: send δ=min⁡(e(v),rf(v,w))\delta = \min(e(v), r_f(v,w))δ=min(e(v),rf​(v,w)), i.e. f(v,w)+=δf(v,w) \mathrel{+}= \deltaf(v,w)+=δ, f(w,v)−=δf(w,v) \mathrel{-}= \deltaf(w,v)−=δ. It is saturating if rf(v,w)=0r_f(v,w) = 0rf​(v,w)=0 afterwards and nonsaturating otherwise.
  • Relabel(v)(v)(v), applicable when vvv is active and d(v)≤d(w)d(v) \le d(w)d(v)≤d(w) for every residual edge (v,w)(v,w)(v,w): set d(v)←min⁡{d(w)+1:(v,w)∈Ef}d(v) \leftarrow \min\{d(w)+1 : (v,w) \in E_f\}d(v)←min{d(w)+1:(v,w)∈Ef​} (∞\infty∞ if there is none).

The generic algorithm (Fig. 2) starts from the preflow that saturates every edge leaving sss and is zero elsewhere, with the simple labeling d(s)=nd(s) = nd(s)=n, d(v)=0d(v) = 0d(v)=0 otherwise, and applies applicable basic operations in any order while one exists. An execution with KKK basic operations is a sequence of states (f0,d0),…,(fK,dK)(f_0,d_0),\dots,(f_K,d_K)(f0​,d0​),…,(fK​,dK​) from the initial state, each obtained from the previous one by one applicable operation.

Formalization targets

Goal: Theorems 3.11 and 3.4

Assume the paper's standing assumption m≥n−1m \ge n-1m≥n−1. For every execution with KKK basic operations,

K≤(2n−1)(n−2)+2nm+4n2m,K \le (2n-1)(n-2) + 2nm + 4n^2 m,K≤(2n−1)(n−2)+2nm+4n2m,

and if no basic operation applies in the final state, then fKf_KfK​ is a maximum flow. The paper states the bound as O(n2m)O(n^2m)O(n2m) and proves it as "immediate from Lemmas 3.8, 3.9, and 3.10"; the goal states the sum of those three printed bounds. Since every execution is this short, no order of operations runs forever.

Milestones

In the order the proof uses them: Lemma 2.1 (at an active vertex a push or a relabel applies); Lemma 3.1 (the labeling stays valid); Theorem 3.2 (Ford–Fulkerson: a flow is maximum iff ttt is unreachable from sss in GfG_fGf​); Lemma 3.3 (under a valid labeling ttt is unreachable from sss); Lemma 3.5 (from any vertex with positive excess, sss is reachable); Lemma 3.6 (labels never decrease; a relabeling increases the label); Lemma 3.7 (d(v)≤2n−1d(v) \le 2n-1d(v)≤2n−1 throughout); Theorem 3.4 (termination with finite labels gives a maximum flow); Lemma 3.8 (≤2n−1\le 2n-1≤2n−1 relabelings per vertex, ≤(2n−1)(n−2)<2n2\le (2n-1)(n-2) < 2n^2≤(2n−1)(n−2)<2n2 in total); Lemma 3.9 (≤2nm\le 2nm≤2nm saturating pushes); Lemma 3.10 (≤4n2m\le 4n^2m≤4n2m nonsaturating pushes, under m≥n−1m \ge n-1m≥n−1). A further, non-milestone item states the unnumbered invariant that every fkf_kfk​ is a preflow.

Significance

The generic bound shows that push-relabel terminates in a polynomial number of steps without any rule for choosing the next operation; the specific orderings of §4–§5 of the paper (first-in first-out, O(n3)O(n^3)O(n3); dynamic trees, O(nmlog⁡(n2/m))O(nm\log(n^2/m))O(nmlog(n2/m))) refine only the count of nonsaturating pushes, and reuse Lemmas 3.1–3.9 unchanged. The correctness argument, a valid labeling excludes augmenting paths, is the template for the push-relabel minimum-cost flow and assignment algorithms that followed.

These results are proved in the paper and are textbook material. Their machine-checked counterparts are, as far as is known here, not on the Prove2Me platform: the platform's network-flow statements (from Introduction to Linear Optimization, e.g. LinearOptimization.max_flow_min_cut) use a different model, with arc-indexed nonnegative flows and extended-real capacities, and contain nothing about preflows, labels or operation counts. This mission produces a formal account of the antisymmetric-flow model, of Ford–Fulkerson in that model, and of the amortized counting arguments, with the constants the paper prints.

Difficulty

The correctness half is short once the invariants are in place; the difficulty is in the counting. The label bound (Lemma 3.7) is a statement about the whole execution, and it depends on a structural fact about preflows (Lemma 3.5) whose truth rests on antisymmetry and on the nonnegativity of excesses. The obvious first idea for the push counts, bounding pushes per edge or per vertex locally, fails for nonsaturating pushes: flow pushed across a pair can be pushed back later, and nothing local limits how often this happens, so Lemma 3.10 holds only as an amortized statement over the entire execution and depends on both earlier counts. Saturating pushes on a pair can also recur, in both directions, and Lemma 3.9 has to control the interaction between the two directions.

Formally, all of this is reasoning about arbitrary interleavings of operations, with labels in N∪{∞}\mathbb{N} \cup \{\infty\}N∪{∞} and real-valued flows.

Formalization scope

  • Vertices form a finite type with decidable equality; nnn is its cardinality, s≠ts \ne ts=t, so n≥2n \ge 2n≥2 and the natural-number subtractions 2n−12n-12n−1 and n−2n-2n−2 are exact. Capacities are a real function on all pairs, nonnegative, zero on the diagonal; EEE is its support and mmm its cardinality.
  • Flows and preflows are antisymmetric real functions on all pairs (not nonnegative arc flows); the excess is computed from fff, never stored. A maximum flow is a flow whose value is at least that of every flow.
  • Labels live in ℕ∞, with ∞+1=∞\infty + 1 = \infty∞+1=∞; the relabel value is an infimum, which is ∞\infty∞ on the empty set.
  • An execution is a sequence of states σ : ℕ → State V with a length KKK, starting at the Fig. 2 state with the simple labeling (the paper's own assumption for its proofs), each step an applicable push or relabel. "Terminates" means that no basic operation applies, the loop guard of Fig. 2. The three counts are cardinalities of the sets of step indices of each kind.
  • Explicit constants: 2n−12n-12n−1 per-vertex relabelings, (2n−1)(n−2)<2n2(2n-1)(n-2) < 2n^2(2n−1)(n−2)<2n2 total relabelings, 2nm2nm2nm saturating pushes, 4n2m4n^2m4n2m nonsaturating pushes, label bound 2n−12n-12n−1, and the total (2n−1)(n−2)+2nm+4n2m(2n-1)(n-2)+2nm+4n^2m(2n−1)(n−2)+2nm+4n2m. The standing assumption m≥n−1m \ge n-1m≥n−1 appears only on Lemma 3.10 and the goal.
  • A trivializing formalization is ruled out: the step relation fixes the pushed amount δ=min⁡(e(v),rf(v,w))\delta = \min(e(v), r_f(v,w))δ=min(e(v),rf​(v,w)) and the new label exactly as in Fig. 1, termination is the loop guard rather than "the result is a flow", and a sorry-free check exhibits a concrete network s→a→ts \to a \to ts→a→t with a two-step execution (relabel aaa, then push (a,t)(a,t)(a,t)), so the run hypotheses are satisfiable.

Welcome contributions: proofs of the invariants (preflow, valid labeling, label monotonicity), of Ford–Fulkerson for antisymmetric flows (reusable beyond this mission), and of the counting lemmas. The FIFO bound of §4 is the subject of a companion mission.

Selected references

  • A. V. Goldberg, R. E. Tarjan, A New Approach to the Maximum-Flow Problem, Journal of the ACM 35(4):921–940, 1988. doi:10.1145/48014.61051
  • L. R. Ford, D. R. Fulkerson, Flows in Networks, Princeton University Press, 1962.
  • J. Edmonds, R. M. Karp, Theoretical improvements in algorithmic efficiency for network flow problems, Journal of the ACM 19(2):248–264, 1972. doi:10.1145/321694.321699
  • R. K. Ahuja, T. L. Magnanti, J. B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice Hall, 1993.
17 thms3 active usersReviewed
🏆Completed
Operations ResearchProbability·Captain: mikedeng1

Competitive Paging Algorithms III: No Randomized Paging Algorithm Is Better than H_k-CompetitiveResearch Paper

Motivation

Paging is the problem of managing a two-level memory: a cache holds kkk of the nnn pages a program uses, every request must find its page in the cache, and a request to a page outside the cache (a page fault) forces the algorithm to bring the page in and evict another. An on-line algorithm chooses what to evict without seeing future requests. Sleator and Tarjan (CACM 1985) measured on-line paging algorithms against the optimal off-line algorithm, which knows the whole request sequence, and showed that no deterministic on-line algorithm can be within a factor smaller than kkk of it.

Randomization changes that picture. Fiat, Karp, Luby, McGeoch, Sleator and Young (J. Algorithms 1991; arXiv:cs/0205038) gave a randomized algorithm, the marking algorithm, whose expected number of faults is within 2Hk2H_k2Hk​ of the optimum, where Hk=1+12+⋯+1k≈ln⁡kH_k = 1 + \tfrac12 + \dots + \tfrac1k \approx \ln kHk​=1+21​+⋯+k1​≈lnk. This mission formalizes the other half of their paper's picture: no randomized paging algorithm can do better than HkH_kHk​. The bound says that the logarithmic behaviour is not an artefact of one algorithm but a property of the problem.

Timeline:

  • 1985 — Sleator and Tarjan: deterministic paging algorithms have competitive factor at least kkk; LRU and FIFO achieve kkk.
  • 1988 — Karlin, Manasse, Rudolph and Sleator (Algorithmica 3, 1988) introduce the term competitive; Manasse, McGeoch and Sleator (STOC 1988; J. Algorithms 1990) extend it to randomized algorithms and pose the kkk-server problem, of which paging is the uniform-metric case.
  • 1991 — Fiat et al.: the marking algorithm is 2Hk2H_k2Hk​-competitive, and no randomized algorithm is better than HkH_kHk​-competitive (Theorem 4 and Corollary 5 of the paper). Raghavan gave an alternative proof of the lower bound through Yao's minimax principle.
  • 1991 — McGeoch and Sleator give an HkH_kHk​-competitive randomized paging algorithm (Algorithmica 6, 1991), so the lower bound is tight.

Setting

Let MMM be a set of nnn vertices with the uniform metric: any two distinct vertices are at distance 111. A configuration of kkk servers is a map C:{1,…,k}→MC : \{1,\dots,k\} \to MC:{1,…,k}→M; server sss sits at C(s)C(s)C(s), and a vertex is covered when some server sits on it. A request sequence σ\sigmaσ is a finite list of vertices. A deterministic on-line algorithm assigns to every prefix of requests the configuration after serving it, in such a way that the vertex just requested is covered; its cost on σ\sigmaσ is the total distance travelled by its servers, which on the uniform metric is the number of server moves. Paging with kkk cache slots and nnn pages is exactly this kkk-server problem on nnn uniform vertices.

The optimal off-line cost OPTC0(σ)\mathrm{OPT}_{C_0}(\sigma)OPTC0​​(σ) is the least cost of any schedule of configurations that starts at C0C_0C0​ and covers each request of σ\sigmaσ in turn.

A randomized on-line algorithm AAA is a probability space (Ω,μ)(\Omega,\mu)(Ω,μ) of coin outcomes together with a deterministic on-line algorithm AωA_\omegaAω​ for each outcome ω\omegaω. Its expected cost CA(σ)C_A(\sigma)CA​(σ) is the average of the cost of AωA_\omegaAω​ on σ\sigmaσ over ω\omegaω. The request sequence is fixed in advance and does not depend on the coins (an oblivious adversary). Following the paper, AAA is ccc-competitive from the initial configuration C0C_0C0​ if there is a constant aaa such that

CA(σ)  ≤  c⋅OPTC0(σ)+afor every request sequence σ.C_A(\sigma) \;\le\; c \cdot \mathrm{OPT}_{C_0}(\sigma) + a \qquad \text{for every request sequence } \sigma .CA​(σ)≤c⋅OPTC0​​(σ)+afor every request sequence σ.

For the lower-bound argument, the probability vector p=(pi)i∈Mp=(p_i)_{i\in M}p=(pi​)i∈M​ after a prefix σ\sigmaσ has pip_ipi​ equal to the probability, over ω\omegaω, that vertex iii is not covered by AωA_\omegaAω​ after serving σ\sigmaσ. A set SSS of marked vertices and the number u=n−∣S∣u = n - |S|u=n−∣S∣ of unmarked vertices are bookkeeping of the adversary, updated as the marking algorithm would update them.

Formalization targets

Goal: Corollary 5

For 1≤k≤n−11 \le k \le n-11≤k≤n−1, every randomized on-line algorithm AAA with kkk servers on nnn uniform vertices, every initial configuration C0C_0C0​ and every real ccc,

c<Hk  ⟹  A is not c-competitive from C0.c < H_k \;\Longrightarrow\; A \text{ is not } c\text{-competitive from } C_0 .c<Hk​⟹A is not c-competitive from C0​.

Theorem 4 (milestone)

The case k=n−1k = n-1k=n−1: no randomized algorithm for the uniform (n−1)(n-1)(n−1)-server problem on nnn vertices is ccc-competitive with c<Hn−1c < H_{n-1}c<Hn−1​.

Claims of the proof of Theorem 4 (milestones)

With ppp the probability vector, SSS the marked set, P=∑i∈SpiP = \sum_{i\in S} p_iP=∑i∈S​pi​ and u=n−∣S∣u = n - |S|u=n−∣S∣:

∑ipi=1(servers on distinct vertices),CA(σ i)≥CA(σ)+pi,\sum_i p_i = 1 \quad(\text{servers on distinct vertices}),\qquad C_A(\sigma\,i) \ge C_A(\sigma) + p_i,i∑​pi​=1(servers on distinct vertices),CA​(σi)≥CA​(σ)+pi​, P=0⇒∃ i∉S, pi≥1u,P>ϵ>0⇒max⁡j∈Spj≥ϵ∣S∣>0,P = 0 \Rightarrow \exists\, i\notin S,\ p_i \ge \tfrac1u, \qquad P > \epsilon > 0 \Rightarrow \max_{j\in S} p_j \ge \tfrac{\epsilon}{|S|} > 0,P=0⇒∃i∈/S, pi​≥u1​,P>ϵ>0⇒j∈Smax​pj​≥∣S∣ϵ​>0, pj=max⁡j′∉Spj′⇒pj≥1−Pu,P≤ϵ⇒ϵ+pj≥ϵ+1−Pu≥ϵ+1−ϵu≥1u.p_j = \max_{j'\notin S} p_{j'} \Rightarrow p_j \ge \tfrac{1-P}{u}, \qquad P \le \epsilon \Rightarrow \epsilon + p_j \ge \epsilon + \tfrac{1-P}{u} \ge \epsilon + \tfrac{1-\epsilon}{u} \ge \tfrac1u .pj​=j′∈/Smax​pj′​⇒pj​≥u1−P​,P≤ϵ⇒ϵ+pj​≥ϵ+u1−P​≥ϵ+u1−ϵ​≥u1​.

Significance

The result. Together with the marking algorithm's 2Hk2H_k2Hk​ upper bound, the corollary pins the randomized competitive ratio of paging to Θ(log⁡k)\Theta(\log k)Θ(logk), an exponential improvement over the deterministic ratio kkk that no randomized algorithm can push below HkH_kHk​. For k=n−1k = n-1k=n−1 the marking algorithm itself is Hn−1H_{n-1}Hn−1​-competitive, so Theorem 4 makes it optimal there. The HkH_kHk​ bound is the benchmark every later randomized paging algorithm is measured against, including the HkH_kHk​-competitive algorithm of McGeoch and Sleator, and it is the uniform-metric base case of the randomized kkk-server conjecture.

Formalizing it. The theorem is proved and classical; no machine-checked proof is known to exist. The platform already has the deterministic bound (KServer.uniform_not_competitive_below_k, ratio kkk) and a formal Yao averaging principle for randomized kkk-server algorithms (KServer.randomized_yao_averaging), but no randomized paging lower bound. This mission produces the first formal HkH_kHk​ lower bound, stated against the published randomized kkk-server model, and a formal version of the paper's adversary argument. Either route — the paper's adaptive construction of a nemesis sequence from the probability vector, or Raghavan's distributional argument through Yao's principle — is welcome.

Difficulty

The adversary may not look at the coins, yet it must build one fixed sequence against which the expected cost is high in every phase. Requesting an uncovered vertex is not available, since which vertex is uncovered depends on the coins; requesting the vertex with the largest uncovered probability gives only 1/n1/n1/n per request and loses the harmonic sum. Lifting the per-phase bound to the asymptotic statement also requires handling the additive constant aaa, the initial configuration of the off-line algorithm, and, for Corollary 5, the reduction from nnn vertices to k+1k+1k+1 of them for an algorithm that may still place servers on the others.

Formalization scope

The Lean development reuses the published definitions KServer_model (configurations Fin k → M, deterministic on-line algorithms as functions of the request prefix, offlineCost) and KServer_randomized (RandomizedAlgorithm: a probability measure on coin outcomes, a deterministic algorithm per outcome, measurable costs; expCost as a lower Lebesgue integral in [0,∞][0,\infty][0,∞]; IsCompetitiveFrom C₀ c: every drawn algorithm starts at C0C_0C0​ and there is one constant aaa, fixed before the sequence, with expCost σ ≤ ENNReal.ofReal (c * offlineCost C₀ σ + a)). The clamp at 000 in ENNReal.ofReal only weakens the property the goal refutes. The vertex set is an abstract type MMM with an equivalence Fin n ≃ M and the uniform metric as a hypothesis, never the line metric of Fin n. HkH_kHk​ is Mathlib's harmonic k cast to R\mathbb RR. The goal quantifies over every algorithm and every initial configuration, with no laziness or distinct-positions assumption, and over every real c<Hkc < H_kc<Hk​, including c≤0c \le 0c≤0.

A formalization in which competitiveness is vacuous (a model with no algorithms, or a cost that is always infinite), in which the adversary may choose the sequence after seeing the coins, or which fixes ccc or the additive constant, would be a different statement and is ruled out by the published definitions used here.

The probability vector is the one new definition, uncoveredProb A σ i. Milestones about it assume the uncovered events measurable, the standing convention that pip_ipi​ is a probability; the model itself only guarantees measurable costs. The milestone ∑ipi=1\sum_i p_i = 1∑i​pi​=1 assumes the n−1n-1n−1 servers occupy distinct vertices, as in the paper; in general ∑ipi≥1\sum_i p_i \ge 1∑i​pi​≥1. The arithmetic milestones are stated for an arbitrary probability vector on a finite set. Reusable pieces: the probability vector and the cost lemma apply to any randomized kkk-server algorithm on a uniform metric, and a restriction lemma (from nnn vertices to k+1k+1k+1) would serve other paging lower bounds.

Selected references

  • A. Fiat, R. M. Karp, M. Luby, L. A. McGeoch, D. D. Sleator, N. E. Young, Competitive Paging Algorithms, J. Algorithms 12(4):685–699, 1991. https://doi.org/10.1016/0196-6774(91)90041-V ; preprint arXiv:cs/0205038v1 (cited version). https://arxiv.org/abs/cs/0205038
  • D. D. Sleator, R. E. Tarjan, Amortized Efficiency of List Update and Paging Rules, Comm. ACM 28(2):202–208, 1985. https://doi.org/10.1145/2786.2793
  • M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive Algorithms for Server Problems, J. Algorithms 11(2):208–230, 1990. https://doi.org/10.1016/0196-6774(90)90003-W
  • L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6:816–825, 1991.
  • P. Raghavan, Lecture Notes on Randomized Algorithms, IBM Research Report, Yorktown Heights, 1990 (the alternative proof of the lower bound, pp. 118–119).
11 thms3 active usersReviewed
🏆Completed
Operations ResearchProbability·Captain: mikedeng1

Competitive Paging Algorithms II: Algorithm EATR Is 3/2-Competitive for Two ServersResearch Paper

Motivation

Paging is the problem of managing a two-level memory: a fast cache holding kkk pages and a slow memory holding the rest. When a requested page is not in the cache (a page fault), it must be brought in and, if the cache is full, some page must be evicted. An on-line paging algorithm decides which page to evict without knowing future requests. Sleator and Tarjan (CACM 1985) compared on-line algorithms with the optimal off-line algorithm on every request sequence and showed that the best deterministic algorithms (LRU, FIFO) lose a factor of exactly kkk, and that no deterministic on-line algorithm does better.

Randomization changes this picture. Fiat, Karp, Luby, McGeoch, Sleator and Young (J. Algorithms 1991; arXiv:cs/0205038) showed that the randomized marking algorithm is 2Hk2H_k2Hk​-competitive, where Hk=1+12+⋯+1kH_k=1+\tfrac12+\dots+\tfrac1kHk​=1+21​+⋯+k1​, and that no randomized algorithm is better than HkH_kHk​-competitive. For k<n−1k<n-1k<n−1 the marking algorithm does not reach HkH_kHk​, already for k=2k=2k=2 and n=4n=4n=4. For two servers the same paper gives a different algorithm, EATR ("end after twice requested"), and proves it 3/23/23/2-competitive. Since H2=3/2H_2=3/2H2​=3/2, EATR is strongly competitive for k=2k=2k=2: no randomized algorithm has a smaller competitive factor. This mission formalizes that result.

Timeline:

  • 1985: Sleator and Tarjan, deterministic paging: factor kkk, and kkk is optimal.
  • 1988: Karlin, Manasse, Rudolph and Sleator introduce the term competitive (Algorithmica 3:79–119); Manasse, McGeoch and Sleator formulate the kkk-server problem and extend competitiveness to randomized algorithms (J. Algorithms 1990).
  • 1991: Fiat et al.: the marking algorithm is 2Hk2H_k2Hk​-competitive, the lower bound HkH_kHk​, and EATR is 3/23/23/2-competitive for k=2k=2k=2.
  • 1991: McGeoch and Sleator give an HkH_kHk​-competitive algorithm for every kkk (Algorithmica 6, 1991; reference [12] of the paper).

Setting

The uniform 222-server problem has a finite set MMM of n≥2n\ge 2n≥2 vertices, any two distinct vertices at distance 111, and two servers. A request sequence σ=σ(0),σ(1),…\sigma=\sigma(0),\sigma(1),\dotsσ=σ(0),σ(1),… is a list of vertices; each request must be covered by a server when it is served, and the cost is the number of server moves. This is paging with a cache of two pages: vertices are pages and the covered vertices are the cache.

A deterministic algorithm BBB has a cost CB(σ)C_B(\sigma)CB​(σ); a randomized algorithm AAA has an expected cost CA(σ)C_A(\sigma)CA​(σ), averaged over its random choices. AAA is ccc-competitive if there is a constant aaa such that for every request sequence σ\sigmaσ and every deterministic algorithm BBB (on-line or off-line),

CA(σ)≤c⋅CB(σ)+a.C_A(\sigma)\le c\cdot C_B(\sigma)+a.CA​(σ)≤c⋅CB​(σ)+a.

Algorithm EATR. The servers start on the vertices 111 and 222. The algorithm divides σ\sigmaσ into phases; the first phase starts at the first request to a vertex other than 111 and 222. Let PPP be the set of vertices occupied by the servers at the end of the previous phase ({1,2}\{1,2\}{1,2} before the first phase). During a phase, a vertex is clean if it is not in PPP and has not been requested during this phase; a vertex is stale if it is neither clean nor the most recently requested vertex ℓ\ellℓ. EATR keeps one server on ℓ\ellℓ and the other uniformly at random on the stale set. When a stale vertex rrr is requested, the servers are placed on ℓ\ellℓ and rrr and the phase ends; the next phase starts at the next request to a vertex not covered by a server. Requests between phases, and repeated requests to ℓ\ellℓ, move nothing.

For a phase, lll denotes the number of clean vertices requested in it. For a deterministic algorithm AAA, ddd and d′d'd′ denote the numbers of AAA's servers that do not coincide with any of EATR's servers at the beginning and at the end of the phase. An algorithm is lazy if it moves no server on a request to a covered vertex and exactly one server on a request to an uncovered one.

Formalization targets

Goal: Theorem 3

With OPT(σ)\mathrm{OPT}(\sigma)OPT(σ) the optimal off-line cost of serving σ\sigmaσ from the servers' starting position (1,2)(1,2)(1,2), there is a constant ccc such that for all σ\sigmaσ

CEATR(σ)≤32 OPT(σ)+c.C_{\mathrm{EATR}}(\sigma)\le \tfrac32\,\mathrm{OPT}(\sigma)+c.CEATR​(σ)≤23​OPT(σ)+c.

The constant ccc is left free; the factor 3/23/23/2 is the paper's and is optimal.

Milestones, in the order of the proof

  1. Laziness (p. 4): every deterministic algorithm is dominated by a lazy one (a published theorem, reused).
  2. Adversary bound for structured phases (p. 5): in a complete EATR phase with lll clean requests, a lazy AAA pays at least l−d+d′l-d+d'l−d+d′.
  3. Stale set before the terminating request (p. 6): it has l+1l+1l+1 elements, each covered with probability 1/(l+1)1/(l+1)1/(l+1).
  4. Expected cost of a phase to EATR (p. 6): exactly l+ll+1l+\frac{l}{l+1}l+l+1l​.
  5. Per-phase ratio (p. 6): EATR's expected phase cost is at most 32(CA+d−d′)\tfrac32(C_A+d-d')23​(CA​+d−d′), since l+l/(l+1)l=1+1l+1≤32\frac{l+l/(l+1)}{l}=1+\frac{1}{l+1}\le\frac32ll+l/(l+1)​=1+l+11​≤23​.

Significance

The result. Theorem 3 settles the randomized competitive ratio of paging with two cache slots: combined with the paper's lower bound HkH_kHk​ (Corollary 5, the subject of a companion mission), the optimal factor for k=2k=2k=2 is exactly 3/23/23/2, against 222 for every deterministic algorithm. The general case was settled later by McGeoch and Sleator's HkH_kHk​-competitive partitioning algorithm, which is considerably more complicated.

Formalizing it. The result has been proved since 1991; no machine-checked proof of it is on the platform (a search for EATR, randomized paging and two-server results on 2026-09-26 found only deterministic kkk-server theorems). The mission produces a formal model of a randomized on-line algorithm as a probability distribution over states evolving with the request sequence, a formal treatment of the phase decomposition and of the telescoping amortization that relates expected on-line cost to the optimal off-line cost, and a first strongly competitive randomized paging result on the platform, alongside the deterministic kkk-server results already there.

Difficulty

The per-phase computations are short. The main difficulty is the global accounting. The adversary's cost in a phase is bounded only in amortized form, l−d+d′l-d+d'l−d+d′, where ddd and d′d'd′ compare the adversary's servers with EATR's at the phase boundaries; the bound becomes a statement about OPT\mathrm{OPT}OPT only after the ddd and d′d'd′ terms telescope across phases. This needs care with the requests that lie outside every phase (before the first phase, between phases, and in an unfinished last phase), during which the adversary may move. A further difficulty is that the off-line optimum ranges over arbitrary schedules, which may move several servers on one request, while the phase bound is proved for lazy on-line algorithms: the reduction from one to the other must be made explicit. Finally, the uniform law of the stale server is an invariant of a Markov chain on states that must be tracked through the whole phase.

Formalization scope

The vertices are an abstract metric space MMM with an enumeration e:Fin n≃Me:\mathrm{Fin}\,n\simeq Me:Finn≃M, 2≤n2\le n2≤n, and the hypothesis that distinct points are at distance 111; the metric of Fin n\mathrm{Fin}\,nFinn is not used. The starting vertices 1,21,21,2 are e(0),e(1)e(0),e(1)e(0),e(1). OPT\mathrm{OPT}OPT is KServer.offlineCost of the published KServer model: the infimum of total movement over all schedules serving σ\sigmaσ from (e(0),e(1))(e(0),e(1))(e(0),e(1)). Comparing with this infimum covers every deterministic BBB starting from EATR's position; a BBB starting elsewhere differs by at most 222, which the constant absorbs. The constant is quantified before σ\sigmaσ.

EATR is a PMF over states: a deterministic record (the set PPP, whether a phase is in progress, the last requested vertex, the vertices requested in the phase) and the random position of the second server. Its expected cost is the expected number of server moves, summed over the requests. The paper fixes only that the second server is uniform on the stale set; when a clean request enlarges the stale set, the formalization moves one server by a fixed coupling that keeps the law uniform, and this choice is stated in the definition. A formalization that defines EATR's expected cost by the closed formula of the proof, or that restricts σ\sigmaσ to complete phases, would make the goal a different statement; neither is done here. The pre-phase prefix and an unfinished last phase belong to σ\sigmaσ and are covered by the constant.

Needed infrastructure: finite probability distributions (Mathlib's PMF), the published KServer model and its laziness theorem, and bookkeeping lemmas on the deterministic phase record. The phase record and the amortization argument are reusable for the marking algorithm of the companion mission. Proofs of any milestone, and alternative decompositions of the goal, are welcome.

Selected references

  • A. Fiat, R. M. Karp, M. Luby, L. A. McGeoch, D. D. Sleator, N. E. Young, Competitive Paging Algorithms, Journal of Algorithms 12(4):685–699, 1991. https://doi.org/10.1016/0196-6774(91)90041-V ; arXiv:cs/0205038v1, https://arxiv.org/abs/cs/0205038
  • D. D. Sleator, R. E. Tarjan, Amortized Efficiency of List Update and Paging Rules, Communications of the ACM 28(2):202–208, 1985. https://doi.org/10.1145/2786.2793
  • M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive Algorithms for Server Problems, Journal of Algorithms 11(2):208–230, 1990. https://doi.org/10.1016/0196-6774(90)90003-W
  • L. A. McGeoch, D. D. Sleator, A Strongly Competitive Randomized Paging Algorithm, Algorithmica 6:816–825, 1991 (reference [12] of the paper).
  • A. R. Karlin, M. S. Manasse, L. Rudolph, D. D. Sleator, Competitive Snoopy Caching, Algorithmica 3(1):79–119, 1988 (reference [9] of the paper).
8 thms3 active usersReviewed
CombinatoricsComplexity TheoryOperations Research+1·Captain: mikedeng1

A Threshold of ln n for Approximating Set Cover II: The Inapproximability of Max k-CoverResearch Paper

Motivation

Max kkk-cover is the basic coverage problem of combinatorial optimization. The input is a collection of subsets of a finite ground set and a number kkk; the task is to choose kkk subsets that together cover as many points as possible. It models facility and sensor placement, the selection of a small committee or feature set representing a population, and budgeted versions of set cover. It is also the prototype of maximizing a monotone submodular function under a cardinality constraint.

The greedy algorithm covers at least a 1−1/e≈0.6321-1/e\approx 0.6321−1/e≈0.632 fraction of the optimum. This bound goes back to Hochbaum and Pathria and, for general submodular functions, to Nemhauser, Wolsey and Fisher (1978). For two decades it was not known whether a polynomial-time algorithm could do better. Uriel Feige answered the question in A Threshold of ln n for Approximating Set Cover (J. ACM 45(4), 1998, pp. 634–652, doi:10.1145/285055.285059), Section 5. His Theorem 5.3 (p. 648) states: "For any ϵ>0\epsilon > 0ϵ>0, max kkk-cover cannot be approximated in polynomial time within a ratio of (1−1/e+ϵ)(1 - 1/e + \epsilon)(1−1/e+ϵ), unless P=NPP = NPP=NP." Together with the greedy bound, it makes 1−1/e1-1/e1−1/e the exact approximation threshold of max kkk-cover.

Timeline:

  • 1978: Nemhauser, Wolsey and Fisher prove the greedy 1−1/e1-1/e1−1/e bound for monotone submodular maximization.
  • 1992: Arora, Lund, Motwani, Sudan and Szegedy prove the PCP theorem. With Papadimitriou–Yannakakis (1991) it gives Theorem 2.1.1 of the paper: MAX 3SAT-B has a constant gap unless P = NP.
  • 1994: Lund and Yannakakis introduce partition-system reductions from multi-prover proof systems to set cover.
  • 1995: Raz proves the parallel repetition theorem (Theorem 2.2.2 of the paper).
  • 1998: Feige proves the ln n threshold for set cover (the subject of mission I of this series) and the 1−1/e1-1/e1−1/e threshold for max kkk-cover.

Setting

An instance consists of nnn points {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, a list of subsets S1,…,SsS_1,\dots,S_sS1​,…,Ss​ of the points, and a number kkk. Its value opt\mathrm{opt}opt is the largest number of points covered by at most kkk of the sets. Instances are written over a three-letter alphabet:

  • nnn in unary;
  • each set as its characteristic bit-vector;
  • kkk in unary.

Following p. 648, a polynomial-time algorithm approximates max kkk-cover within a ratio δ\deltaδ if on every input it outputs a number vvv with

δ⋅opt≤v≤opt.\delta\cdot\mathrm{opt}\le v\le\mathrm{opt}.δ⋅opt≤v≤opt.

The algorithm need not name the sets. This is the non-constructive notion of approximation.

The proof is a reduction from the MAX 3SAT-5 problem. A 3CNF-5 formula has exactly three literals per clause, over three distinct variables, and every variable occurs in exactly five clauses. The reduction goes through a kkk-prover proof system for such a formula φ\varphiφ with MMM clauses:

  • The verifier picks ℓ\ellℓ clauses at random, and a distinguished variable in each; there are R=(3M)ℓR=(3M)^\ellR=(3M)ℓ random strings rrr.
  • Each prover PiP_iPi​ is attached to a code word of length ℓ\ellℓ and weight ℓ/2\ell/2ℓ/2; distinct words are at Hamming distance at least ℓ/3\ell/3ℓ/3.
  • On coordinate jjj, prover PiP_iPi​ receives the clause if its bit is 1, and the distinguished variable if its bit is 0.
  • Answers are satisfying assignments of the received clauses and bits for the received variables.
  • Two provers are consistent if they assign the same values to the distinguished variables. The verifier weakly accepts if some pair of distinct provers is consistent, and strongly accepts if every pair is.

The max k′k'k′-cover instance of §5 attaches to every random string rrr a copy BrB_rBr​ of the explicit partition system. Its points are the vectors in {0,…,k−1}L\{0,\dots,k-1\}^L{0,…,k−1}L with L=2ℓL=2^\ellL=2ℓ, so m=kLm=k^Lm=kL. Its LLL partitions are labelled by the ℓ\ellℓ-bit strings, and each splits the points by the value of one coordinate. There are N=mRN=mRN=mR points in all. For each prover iii, question qqq and answer aaa, the set S(q,a,i)S_{(q,a,i)}S(q,a,i)​ collects, for every rrr on which PiP_iPi​ receives qqq, the iiith part of the partition of BrB_rBr​ labelled by the values that aaa gives to the distinguished variables of rrr. The budget is k′=kQk'=kQk′=kQ, where QQQ is the number of questions a single prover can receive.

Formalization targets

Goal: Theorem 5.3

∀ε>0:max k-cover is approximable within 1−1e+ε ⟹ P=NP,\forall\varepsilon>0:\quad \text{max } k\text{-cover is approximable within } 1-\tfrac1e+\varepsilon \ \Longrightarrow\ \mathrm{P}=\mathrm{NP},∀ε>0:max k-cover is approximable within 1−e1​+ε ⟹ P=NP,

conditional on the two cited results below. The ratio is left free (any ε>0\varepsilon>0ε>0), so the goal records the shape of the threshold and not a particular constant.

Milestones

  • Proposition 2.1.2 (p. 640): for some ε>0\varepsilon>0ε>0 it is NP-hard to distinguish satisfiable 3CNF-5 formulas from those in which at most a (1−ε)(1-\varepsilon)(1−ε)-fraction of the clauses can be satisfied simultaneously.
  • Lemma 2.3.1 (p. 643): a satisfiable φ\varphiφ admits a strategy that always strongly accepts; on a far-from-satisfiable φ\varphiφ the weak acceptance probability is at most k2 2−cℓk^2\,2^{-c\ell}k22−cℓ.
  • Coverage of the explicit partition system (p. 649): jjj subsets from pairwise different partitions cover exactly (1−(1−1/k)j)m(1-(1-1/k)^j)m(1−(1−1/k)j)m points.
  • Proposition 5.4 (p. 649): if at most kQkQkQ sets cover a (1−1/e+ε)(1-1/e+\varepsilon)(1−1/e+ε)-fraction of the points, then at least an ε/3\varepsilon/3ε/3-fraction of the random strings are good. Here rrr is good if wr≤3k/εw_r\le3k/\varepsilonwr​≤3k/ε sets meet BrB_rBr​ and two of them from different provers lie in the same partition.
  • Decoding (p. 649): such a covering yields a strategy that weakly accepts with probability at least (ε/3)(ε/3k)2(\varepsilon/3)(\varepsilon/3k)^2(ε/3)(ε/3k)2.
  • Gap (p. 649): a satisfiable formula gives a cover of all NNN points by kQkQkQ sets. If at most a (1−ε′)(1-\varepsilon')(1−ε′)-fraction of the clauses are satisfiable, kQkQkQ sets cover at most (1−1/e+g(k))N(1-1/e+g(k))N(1−1/e+g(k))N points, where g(k)→0g(k)\to0g(k)→0, for all large ℓ\ellℓ.
  • Proposition 5.1 (p. 647): every greedy run covers at least (1−1/e) opt(1-1/e)\,\mathrm{opt}(1−1/e)opt points.

Significance

The result closes the approximability of max kkk-cover: the greedy algorithm cannot be beaten by any constant unless P = NP. Consequences:

  • Submodular maximization. Coverage functions are monotone submodular, so the bound transfers to monotone submodular maximization under a cardinality constraint, whenever the function is given in a form that encodes a coverage instance.
  • Other problems. Hardness results for facility location, budgeted allocation, and welfare maximization with coverage valuations reduce from it.
  • The reduction itself. The ℓ\ellℓ-fold kkk-prover system combined with a partition system that is exactly countable is the template for later 1−1/e1-1/e1−1/e hardness proofs.

Status: the theorem has been proved since 1998. It has not been formalized; neither the reduction nor the underlying proof systems exist in Mathlib or on this platform. This mission produces:

  • a machine-checked reduction from MAX 3SAT-5 to max kkk-cover;
  • an exact counting lemma for product partition systems;
  • the averaging and concavity argument of Proposition 5.4;
  • a formal statement of the greedy bound for coverage.

The cited PCP-based gap (Theorem 2.1.1) and parallel repetition (Theorem 2.2.2) remain hypotheses. They are separate, much larger formalization projects.

Difficulty

The obvious argument uses the soundness of the proof system directly: a large cover should force consistent answers. It fails because a cover may spend many sets on a few random strings and cover them completely, while covering the rest partially without any two sets from the same partition. What saves the argument is exact counting. For sets from pairwise different partitions, coverage is exactly h(j)=(1−(1−1/k)j)mh(j)=(1-(1-1/k)^j)mh(j)=(1−(1−1/k)j)m, a concave function of the number jjj of sets used. Since the sets meet a random string kkk times on average, Jensen's inequality caps the total coverage of such "unstructured" strings at about (1−(1−1/k)k)(1-(1-1/k)^k)(1−(1−1/k)k), which tends to 1−1/e1-1/e1−1/e. A further obstacle is that the reduction must run in polynomial time. The paper therefore takes ℓ\ellℓ and kkk constant (unlike the set-cover reduction, where ℓ=Θ(log⁡log⁡n)\ell=\Theta(\log\log n)ℓ=Θ(loglogn)), and the soundness bound k22−cℓk^2 2^{-c\ell}k22−cℓ must beat (ε/3)(ε/3k)2(\varepsilon/3)(\varepsilon/3k)^2(ε/3)(ε/3k)2 at a constant ℓ\ellℓ. The quantifier order (kkk large first, then ℓ\ellℓ large) is part of the difficulty.

A second obstacle is the machine model. The goal is a statement about polynomial-time Turing machines, so the reduction and the decision procedure built from a hypothetical approximation algorithm must be compiled into Cook's one-tape machines.

Formalization scope

  • Machine model. CookPvsNP_defs (a published platform definition): one-tape Turing machines, P\mathrm{P}P, NP\mathrm{NP}NP, polynomial-time computable functions, CNF formulas and their encoding. "P = NP" is P Bool = NP Bool, the form in which CookPvsNP.P_ne_NP states the open problem.
  • Cited results as hypotheses. Theorem 2.1.1 enters as Thm211. Raz's theorem enters as RazRepetition, its consequence stated on p. 642: the ℓ\ellℓ-fold clause–variable game on a far-from-satisfiable 3CNF-5 formula has acceptance probability at most 2−cℓ2^{-c\ell}2−cℓ. This is weaker than Raz's general theorem, so the conditional statement is stronger. No hypothesis about max kkk-cover is assumed.
  • Approximation. The value form above, with no size threshold. For ε>1/e\varepsilon>1/eε>1/e the ratio exceeds one and the hypothesis is unsatisfiable on any instance with opt>0\mathrm{opt}>0opt>0; those values are vacuous, as in the paper.
  • opt\mathrm{opt}opt. Taken over at most kkk sets. This agrees with the paper's "exactly kkk" whenever k≤sk\le sk≤s.
  • Probability and counting. Probabilities are uniform counts over the (3M)ℓ(3M)^\ell(3M)ℓ random strings. Fractions in lower-bound statements are written as counts compared with multiples of RRR.
  • Canonical answers. The type of answers is restricted to satisfying assignments of the received clauses, following the paper's "without loss of generality" (p. 643). All indices are 0-based.
  • Partition system. The §4 construction is defined for any partition system with ℓ\ellℓ-bit partition labels and instantiated with the explicit product system. Its L=2ℓL=2^\ellL=2ℓ coordinates are the ℓ\ellℓ-bit strings themselves.
  • Not formalized. The running time of the greedy algorithm, and the constructive variant (Proposition 5.2), which belongs to the set-cover mission.

A trivializing formalization is ruled out: every cited input is a named, satisfiable proposition about 3CNF formulas or the two-prover game, never about max kkk-cover, and the approximation hypothesis is satisfiable for ratios up to 111.

Needed infrastructure, reusable beyond this mission:

  • composition and simulation lemmas for Cook's machines;
  • the uniformity of the verifier's questions on 3CNF-5 formulas;
  • concavity of j↦1−(1−1/k)jj\mapsto 1-(1-1/k)^jj↦1−(1−1/k)j;
  • (1−1/k)k→1/e(1-1/k)^k\to 1/e(1−1/k)k→1/e bounds.

Contributions to any of these, or to either cited theorem, are welcome.

Selected references

  • U. Feige, A threshold of ln n for approximating set cover, J. ACM 45(4) (1998) 634–652. https://doi.org/10.1145/285055.285059
  • R. Raz, A parallel repetition theorem, SIAM J. Comput. 27(3) (1998) 763–803 (STOC 1995). https://doi.org/10.1137/S0097539795280895
  • S. Arora, C. Lund, R. Motwani, M. Sudan, M. Szegedy, Proof verification and the hardness of approximation problems, J. ACM 45(3) (1998) 501–555. https://doi.org/10.1145/278298.278306
  • C. Papadimitriou, M. Yannakakis, Optimization, approximation, and complexity classes, J. Comput. System Sci. 43(3) (1991) 425–440. https://doi.org/10.1016/0022-0000(91)90023-X
  • C. Lund, M. Yannakakis, On the hardness of approximating minimization problems, J. ACM 41(5) (1994) 960–981. https://doi.org/10.1145/185675.306789
  • G. L. Nemhauser, L. A. Wolsey, M. L. Fisher, An analysis of approximations for maximizing submodular set functions—I, Math. Programming 14 (1978) 265–294. https://doi.org/10.1007/BF01588971
  • S. Cook, The P versus NP problem, Clay Mathematics Institute. https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf
13 thms3 active usersReviewed
CombinatoricsComplexity TheoryOperations Research·Captain: mikedeng1

A Threshold of ln n for Approximating Set Cover I: The ln n Inapproximability of Set CoverResearch Paper

Motivation

Set cover is the problem of covering a finite ground set with as few members of a given family of subsets as possible. It models facility location, crew scheduling, test-suite minimization and many other selection problems in operations research, and it is one of the canonical NP-hard problems. The greedy algorithm, which repeatedly picks the subset covering the most uncovered points, finds a cover at most about ln⁡n\ln nlnn times larger than the optimum on an instance with nnn points (Johnson 1974; Lovász 1975; Chvátal 1979). Whether any efficient algorithm does substantially better was open for two decades.

Timeline of the lower bounds:

  • 1992. The PCP theorem (Arora, Lund, Motwani, Sudan, Szegedy) implies that set cover cannot be approximated within some constant 1+ε1+\varepsilon1+ε unless P = NP.
  • 1994. Lund and Yannakakis showed that set cover cannot be approximated within 14log⁡2n\tfrac14\log_2 n41​log2​n unless NP⊆TIME(nO(polylog n))\mathrm{NP}\subseteq\mathrm{TIME}(n^{O(\mathrm{polylog}\, n)})NP⊆TIME(nO(polylogn)), and within 12log⁡2n≈0.72ln⁡n\tfrac12\log_2 n\approx 0.72\ln n21​log2​n≈0.72lnn under a randomized assumption.
  • 1998. Feige showed that for every ε>0\varepsilon>0ε>0, set cover cannot be approximated within (1−ε)ln⁡n(1-\varepsilon)\ln n(1−ε)lnn unless NP⊆TIME(nO(log⁡log⁡n))\mathrm{NP}\subseteq\mathrm{TIME}(n^{O(\log\log n)})NP⊆TIME(nO(loglogn)) (J. ACM 45(4), 634–652). This matches the greedy bound up to lower-order terms.
  • 2014. Dinur and Steurer replaced the assumption by P ≠ NP (STOC 2014).

This mission formalizes Feige's theorem, the result that fixed ln⁡n\ln nlnn as the threshold.

Setting

An instance consists of nnn points {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1} and a list of subsets S1,…,SsS_1,\dots,S_sS1​,…,Ss​. A cover is a set of indices whose subsets together contain every point. The instance is coverable if every point lies in some SiS_iSi​. It is written as a string: nnn in unary, then each subset as its characteristic vector.

A deterministic polynomial-time algorithm approximates set cover within ρ(n)\rho(n)ρ(n) if, for some threshold n0n_0n0​ and every coverable instance with n≥n0n \ge n_0n≥n0​ points, the value vvv it outputs satisfies OPT≤v≤ρ(n)⋅OPT\mathrm{OPT}\le v\le\rho(n)\cdot\mathrm{OPT}OPT≤v≤ρ(n)⋅OPT, where OPT\mathrm{OPT}OPT is the size of a smallest cover.

TIME(nO(log⁡log⁡n))\mathrm{TIME}(n^{O(\log\log n)})TIME(nO(loglogn)) is the class of languages that a deterministic one-tape Turing machine decides within ∣w∣c(log⁡2log⁡2∣w∣+1)+c|w|^{c(\log_2\log_2|w|+1)}+c∣w∣c(log2​log2​∣w∣+1)+c steps, for some constant ccc. Machines, P\mathrm{P}P and NP\mathrm{NP}NP are those of the published definition CookPvsNP_defs.

The proof passes through three objects, each defined in the mission:

  1. 3CNF-5 formulas: CNF formulas in which every clause has three literals on distinct variables and every variable occurs in exactly five clauses.
  2. The kkk-prover proof system of §2.3. A verifier picks ℓ\ellℓ random clauses and a distinguished variable in each. Each prover, according to its code word, receives some of these clauses and the distinguished variables of the others. Under the weak acceptance predicate, some two provers give consistent answers on the distinguished variables. Under the strong acceptance predicate, all provers do.
  3. Partition systems B(m,L,k,d)B(m,L,k,d)B(m,L,k,d) (Definition 3.1). These are LLL partitions of mmm points, each into kkk parts, such that covering the points with parts taken from pairwise different partitions needs at least ddd parts.

Formalization targets

Goal: Theorem 4.4

∃ ε>0: set cover is approximable within (1−ε)ln⁡n ⟹ NP⊆TIME(nO(log⁡log⁡n)).\exists\,\varepsilon>0:\ \text{set cover is approximable within }(1-\varepsilon)\ln n\ \Longrightarrow\ \mathrm{NP}\subseteq\mathrm{TIME}\big(n^{O(\log\log n)}\big).∃ε>0: set cover is approximable within (1−ε)lnn ⟹ NP⊆TIME(nO(loglogn)).

The statement fixes no constant beyond ε\varepsilonε. The parameters kkk, ℓ\ellℓ and mmm of the reduction are choices made inside the proof. The goal carries three cited results as hypotheses: Theorem 2.1.1 (MAX 3SAT-B gap), the consequence of Raz's parallel repetition theorem for the clause–variable game, and the Naor–Schulman–Srinivasan construction of partition systems.

Milestones, in the order the proof uses them

  1. Proposition 2.1.2: MAX 3SAT-5 is gap NP-hard.
  2. Proposition 2.2.1: the one-round clause–variable game has value 1−ε/31-\varepsilon/31−ε/3.
  3. Lemma 2.3.1: the kkk-prover system is complete with strong acceptance and has soundness k22−cℓk^2 2^{-c\ell}k22−cℓ for weak acceptance.
  4. Lemma 3.2: partition systems with d=(1−2/k)kln⁡md=(1-2/k)k\ln md=(1−2/k)klnm exist.
  5. Propositions 4.2 and 4.3: a cover with (1−δ)kQln⁡m(1-\delta)kQ\ln m(1−δ)kQlnm subsets yields a prover strategy that is weakly accepted with probability at least 2δ/(kln⁡m)22\delta/(k\ln m)^22δ/(klnm)2.
  6. Lemma 4.1: the gap between kQkQkQ and (1−2f(k))kQln⁡m(1-2f(k))kQ\ln m(1−2f(k))kQlnm.

Significance

The result. Combined with the greedy algorithm, Theorem 4.4 shows that ln⁡n\ln nlnn is the approximation threshold of set cover under a mild complexity assumption. Set cover reduces approximation-preservingly to many covering problems, so the threshold transfers to them. Examples are dominating set, several facility-location and group Steiner problems, and hitting-set formulations used in scheduling and testing. The kkk-prover system with two acceptance predicates and the partition-system gadget became standard tools for later hardness-of-approximation proofs.

Formalizing it. The theorem is proved and has been strengthened (Dinur–Steurer 2014), but no machine-checked proof of any Ω(log⁡n)\Omega(\log n)Ω(logn) inapproximability of set cover is known. This mission contributes:

  • a Lean model of multi-prover proof systems with uniform-count probabilities;
  • partition systems and their probabilistic existence proof;
  • a gap-preserving reduction whose running time is analysed on Turing machines, not merely asserted.

Difficulty

  • The ratio comes from two gaps at once. One is a gap in acceptance probability. The other is a gap between strong and weak acceptance. A reduction from a two-prover system, as in Lund–Yannakakis, loses a constant factor because a cheating cover can use two parts of the same partition. Feige's analysis must turn every small cover into a strategy under which some pair of provers is consistent (Proposition 4.3), and this averaging argument has to lose only a factor (kln⁡m)2(k\ln m)^2(klnm)2.
  • Parameters interlock. ℓ=Θ(log⁡log⁡n)\ell=\Theta(\log\log n)ℓ=Θ(loglogn) must make k22−cℓk^2 2^{-c\ell}k22−cℓ smaller than 2δ/(kln⁡m)22\delta/(k\ln m)^22δ/(klnm)2 while keeping the instance of size nO(log⁡log⁡n)n^{O(\log\log n)}nO(loglogn). The time bound must hold for a one-tape machine, including the deterministic partition-system construction.
  • Encoding. The reduction must be computed by an explicit machine on string encodings. Showing that a "clearly polynomial" construction meets the time bound on such a machine is substantial work.

Formalization scope

  • Cited results as hypotheses. Theorem 2.1.1, Raz's theorem and the Naor et al. construction are not proved in the mission; each is a named proposition (Thm211, RazRepetition, NaorPartitionSystems) and a hypothesis of the goal.
    • RazRepetition is only the consequence of Raz's theorem that the paper uses (p. 642): a 2−cℓ2^{-c\ell}2−cℓ error bound for the repeated clause–variable game on 3CNF-5 formulas far from satisfiable.
    • NaorPartitionSystems relaxes "time linear in mmm" to polynomial time and renders "LLL polynomial in ddd" as L≤⌊log⁡2m⌋aL\le\lfloor\log_2 m\rfloor^aL≤⌊log2​m⌋a. Both relaxations weaken the hypothesis.
  • Approximation in value form. The algorithm outputs a number vvv with OPT≤v≤ρ(n)OPT\mathrm{OPT}\le v\le\rho(n)\mathrm{OPT}OPT≤v≤ρ(n)OPT, and only on coverable instances with n≥n0n\ge n_0n≥n0​. Any algorithm that outputs a cover yields such a value, so this hypothesis is weaker than the paper's. The guard n≥n0n\ge n_0n≥n0​ is needed because (1−ε)ln⁡n<1(1-\varepsilon)\ln n<1(1−ε)lnn<1 for small nnn.
  • Machine model. The machines are Cook's deterministic one-tape machines. Multi-tape simulation costs a quadratic factor, which the class absorbs.
  • Probabilities are uniform counts over the (5n)ℓ(5n)^\ell(5n)ℓ random strings. Strategies are deterministic. Answers are canonical (satisfying on clause coordinates), as the paper assumes without loss of generality.
  • Not formalized. Randomized classes (ZTIME) are not defined here, so the following are omitted: the last sentence of Lemma 3.2, Proposition 6.1, and the randomized variants.
  • Ruling out a trivial formalization. The gap notion requires far-from-satisfiable formulas to have at least one clause. Otherwise the empty formula would be both a yes-instance and a no-instance, and Theorem 2.1.1 would hold trivially.
  • Infrastructure and reuse. The shared layer can serve other PCP-based hardness proofs: 3CNF-5 formulas, the kkk-prover system, partition systems, and the gap-NP-hardness notion. Welcome contributions include:
    • time bounds for list and table manipulations on one-tape machines;
    • a Hadamard-code construction satisfying the weight and distance conditions;
    • the union-bound and averaging lemmas behind Lemma 2.3.1 and Proposition 4.2.

Selected references

  • U. Feige, A threshold of ln n for approximating set cover, J. ACM 45(4), 634–652, 1998. https://doi.org/10.1145/285055.285059
  • C. Lund, M. Yannakakis, On the hardness of approximating minimization problems, J. ACM 41(5), 960–981, 1994. https://doi.org/10.1145/185675.306789
  • R. Raz, A parallel repetition theorem, SIAM J. Comput. 27(3), 763–803, 1998 (STOC 1995). https://doi.org/10.1137/S0097539795280895
  • M. Naor, L. J. Schulman, A. Srinivasan, Splitters and near-optimal derandomization, FOCS 1995, 182–191. https://doi.org/10.1109/SFCS.1995.492475
  • S. Arora, C. Lund, R. Motwani, M. Sudan, M. Szegedy, Proof verification and the hardness of approximation problems, J. ACM 45(3), 501–555, 1998. https://doi.org/10.1145/278298.278306
  • C. Papadimitriou, M. Yannakakis, Optimization, approximation, and complexity classes, J. Comput. Syst. Sci. 43(3), 425–440, 1991. https://doi.org/10.1016/0022-0000(91)90023-X
  • V. Chvátal, A greedy heuristic for the set-covering problem, Math. Oper. Res. 4(3), 233–235, 1979. https://doi.org/10.1287/moor.4.3.233
  • I. Dinur, D. Steurer, Analytical approach to parallel repetition, STOC 2014, 624–633. https://doi.org/10.1145/2591796.2591884
15 thms3 active usersReviewed
CombinatoricsComplexity TheoryOperations Research·Captain: mikedeng1

Scheduling Subject to Resource Constraints: Classification and Complexity I: Unit-Time Chains on Two Identical Machines with One Unit Resource Are Strongly NP-hardResearch Paper

Resource constraints and the easy/hard borderline in scheduling

Machine scheduling asks how to assign jobs to machines over time so that a criterion such as the makespan Cmax⁡C_{\max}Cmax​, the time at which the last job completes, is as small as possible. In practice jobs also compete for scarce resources beyond the machines themselves: tools, operators, memory, power. Błażewicz, Lenstra and Rinnooy Kan (DAM 1983) extended the standard three-field classification α∣β∣γ\alpha\mid\beta\mid\gammaα∣β∣γ of Graham, Lawler, Lenstra and Rinnooy Kan (1979) by a resource field resλσρres\lambda\sigma\rhoresλσρ. They then settled the complexity of every problem with parallel identical or uniform machines, unit-time jobs, precedence constraints and the Cmax⁡C_{\max}Cmax​ criterion. Their Fig. 2 separates the maximal polynomially solvable problems from the minimal NP-hard ones, and it has been the reference map for resource-constrained scheduling since.

Brief timeline of the problems involved:

  • 1975. Garey and Johnson (SIAM J. Comput. 4) show that P2∣res⋯ ,pj=1∣Cmax⁡P2\mid res\cdots, p_j=1\mid C_{\max}P2∣res⋯,pj​=1∣Cmax​ is solvable in polynomial time via matchings, and that P3∣res1⋅⋅,pj=1∣Cmax⁡P3\mid res1\cdot\cdot, p_j=1\mid C_{\max}P3∣res1⋅⋅,pj​=1∣Cmax​ and P2∣res1⋅⋅,tree,pj=1∣Cmax⁡P2\mid res1\cdot\cdot, tree, p_j=1\mid C_{\max}P2∣res1⋅⋅,tree,pj​=1∣Cmax​ are NP-hard in the strong sense, by reduction from 3-PARTITION.
  • 1976. Ullman (Complexity of sequencing problems, in Coffman, ed., Computer & Job/Shop Scheduling Theory, Wiley) gives strong NP-hardness of P2∣res111,prec,pj=1∣Cmax⁡P2\mid res111, prec, p_j=1\mid C_{\max}P2∣res111,prec,pj​=1∣Cmax​ under arbitrary precedence constraints.
  • 1983. Błażewicz, Lenstra and Rinnooy Kan prove Theorem 7: chains suffice. Two identical machines, one resource of size one, requirements in {0,1}\{0,1\}{0,1} and chain-like precedence already give a strongly NP-hard problem. The result dominates both earlier two-machine results.

Setting

There are nnn jobs J1,…,JnJ_1,\dots,J_nJ1​,…,Jn​ and mmm machines M1,…,MmM_1,\dots,M_mM1​,…,Mm​. Every job has processing time 111 on every machine, each machine handles at most one job at a time, and jobs are not preempted. There are lll resources; resource RhR_hRh​ has a positive integer size shs_hsh​, the amount available at any time, and job JjJ_jJj​ has a nonnegative integer requirement rhjr_{hj}rhj​, the amount it holds throughout its execution. A directed acyclic graph HHH on the jobs gives the precedence constraints: if HHH has a path from jjj to kkk (Jj→JkJ_j\to J_kJj​→Jk​), then JjJ_jJj​ must complete before JkJ_kJk​ starts. The precedence is chain-like when every vertex of HHH has indegree and outdegree at most one.

A schedule gives each job a machine and a real start time SjS_jSj​; the job occupies [Sj,Sj+1)[S_j, S_j+1)[Sj​,Sj​+1) and completes at Cj=Sj+1C_j = S_j+1Cj​=Sj​+1. It is feasible if jobs on one machine do not overlap, precedence is respected, and at every time ttt the jobs running at ttt require at most shs_hsh​ of each resource RhR_hRh​. The makespan is Cmax⁡=max⁡jCjC_{\max} = \max_j C_jCmax​=maxj​Cj​.

The problem P2∣res111,chain,pj=1∣Cmax⁡P2\mid res111, chain, p_j=1\mid C_{\max}P2∣res111,chain,pj​=1∣Cmax​ restricts this to m=2m=2m=2, one resource (λ=1\lambda=1λ=1) of size 111 (σ=1\sigma=1σ=1), every requirement at most 111 (ρ=1\rho=1ρ=1), and chain-like precedence. The problem P3∣res1⋅⋅,pj=1∣Cmax⁡P3\mid res1\cdot\cdot, p_j=1\mid C_{\max}P3∣res1⋅⋅,pj​=1∣Cmax​ has m=3m=3m=3, one resource of arbitrary size and requirements, and no precedence.

3-PARTITION: given ttt, a positive integer bbb and positive integers a1,…,a3ta_1,\dots,a_{3t}a1​,…,a3t​ with ∑jaj=tb\sum_j a_j = tb∑j​aj​=tb and 14b<aj<12b\tfrac14 b<a_j<\tfrac12 b41​b<aj​<21​b, can {1,…,3t}\{1,\dots,3t\}{1,…,3t} be split into ttt disjoint 3-element sets SiS_iSi​ with ∑j∈Siaj=b\sum_{j\in S_i}a_j=b∑j∈Si​​aj​=b?

A problem is NP-hard in the strong sense if it remains NP-hard when every number of the instance is written in unary.

Formalization targets

Goal: Theorem 7

3-PARTITION is NP-hard in the strong sense  ⟹  P2∣res111, chain, pj=1∣Cmax⁡ is NP-hard in the strong sense.\text{3-PARTITION is NP-hard in the strong sense} \;\Longrightarrow\; P2\mid res111,\ chain,\ p_j=1\mid C_{\max}\ \text{is NP-hard in the strong sense.}3-PARTITION is NP-hard in the strong sense⟹P2∣res111, chain, pj​=1∣Cmax​ is NP-hard in the strong sense.

The hypothesis is Garey and Johnson's theorem on 3-PARTITION, which the paper cites and does not prove. The conclusion concerns the decision version: given an instance and y∈Ny\in\mathbb Ny∈N, is there a feasible schedule with Cmax⁡≤yC_{\max}\le yCmax​≤y?

Milestones

  1. Proof of Theorem 4, the saturation equivalence. For positive bbb, aja_jaj​ with ∑jaj=tb\sum_j a_j=tb∑j​aj​=tb, the P3∣res1⋅⋅P3\mid res1\cdot\cdotP3∣res1⋅⋅ instance with 3t3t3t unit jobs, resource size bbb and requirements aja_jaj​ has a feasible schedule with Cmax⁡≤tC_{\max}\le tCmax​≤t iff the 3-PARTITION instance has a solution.
  2. Theorem 4 (Garey and Johnson). Under the same hypothesis as the goal, P3∣res1⋅⋅,pj=1∣Cmax⁡P3\mid res1\cdot\cdot, p_j=1\mid C_{\max}P3∣res1⋅⋅,pj​=1∣Cmax​ is NP-hard in the strong sense.
  3. Proof of Theorem 7, "if". A 3-PARTITION solution yields a feasible schedule of the constructed two-machine instance with Cmax⁡=2tbC_{\max}=2tbCmax​=2tb.
  4. Proof of Theorem 7, "only if". A feasible schedule of the constructed instance with Cmax⁡≤2tbC_{\max}\le 2tbCmax​≤2tb yields a 3-PARTITION solution.

Significance

Theorem 7 is the sharpest hardness result of the paper's classification. Without resources, two-machine unit-time scheduling with arbitrary precedence is polynomial (Coffman and Graham, Acta Inform. 1972); without precedence, it is polynomial under arbitrary resources (Theorem 1 of the paper). The theorem shows that combining the weakest nontrivial versions of both constraints, chains and one unit resource, already crosses the borderline. The paper's §4.1 extends the same reduction to the ∑Cj\sum C_j∑Cj​ and Lmax⁡L_{\max}Lmax​ criteria.

On the formal side, the mission provides a machine-checked model of resource-constrained scheduling with real start times, a definition of NP-hardness in the strong sense on top of the platform's Turing-machine formalization of P\mathrm PP and NP\mathrm{NP}NP, and 3-PARTITION as a reusable source problem. As far as the platform's corpus shows, none of Theorems 4 and 7, 3-PARTITION, or strong NP-hardness has been formalized before. Both theorems are proved in the literature; what remains is to formalize the reductions and their polynomial running time.

Difficulty

The combinatorial heart is the "only if" direction: a schedule of length 2tb2tb2tb must be shown to be rigid. Start times are arbitrary reals, so the first obstacle is to show that both machines are busy throughout [0,2tb)[0,2tb)[0,2tb), that the chain LLL forces unit spacing, and that the primed jobs of the chains Kj′K'_jKj′​ can only run in the intervals the chain LLL leaves free of the resource. Only after this is established can the index sets SiS_iSi​ be read off. Arguing on integer time slots from the start is not enough: the model allows fractional start times, and ruling them out is part of the proof.

The second obstacle is the complexity layer. NP-hardness is stated with respect to polynomial-time many-one reductions computed by one-tape Turing machines. The reduction from 3-PARTITION therefore has to be implemented and its running time bounded on unary codes. The constructed instance has 4tb4tb4tb jobs, which is polynomial in the unary length of the 3-PARTITION instance; this is exactly why the reduction proves hardness in the strong sense.

Formalization scope

  • Model. Jobs are Fin n and machines Fin m, 0-based. Only identical machines with unit processing times are modelled. Start times are real, execution intervals are half-open, and the resource constraint is imposed at every real time. Precedence is the transitive closure of the arc list of HHH. Cmax⁡=0C_{\max}=0Cmax​=0 for an empty instance.
  • Decision version. Thresholds yyy are natural numbers; this narrower class makes the hardness statement stronger.
  • Encoding. An instance is described by its list of numbers (n,m,ln,m,ln,m,l, the sizes, the requirements row by row, the number of arcs and the arcs, then yyy). The unary language is the set of unary codes of yes-instances over a two-letter alphabet. No pairing function is used. The class conditions (two machines, one unit resource, requirements at most one, chain-like acyclic HHH) are part of the yes-predicate.
  • Strong sense. Strong NP-hardness is NP-hardness of the unary language. This is equivalent to Garey and Johnson's definition, which bounds the largest number by a polynomial in the instance length.
  • Cited hypothesis. The goal and Theorem 4 assume strong NP-hardness of 3-PARTITION (with 14b<aj<12b\tfrac14 b<a_j<\tfrac12 b41​b<aj​<21​b) and nothing else. Stating the goal as a bare reduction between the two languages, or adding P≠NP\mathrm P\ne\mathrm{NP}P=NP, would not be Theorem 7.
  • Constructions. The two scheduling instances built from a 3-PARTITION instance are explicit definitions following the page, not arbitrary instances with a property.
  • Reuse. The scheduling model and the strong-NP-hardness layer are shared with the other missions of this series; 3-PARTITION serves any strong NP-hardness proof by number partitioning.

Welcome contributions: proofs of the four milestones; a formalized polynomial-time implementation of the reduction on unary codes; general lemmas about composing polynomial-time reductions on the one-tape machine model.

Selected references

  • J. Błażewicz, J. K. Lenstra, A. H. G. Rinnooy Kan, Scheduling subject to resource constraints: classification and complexity, Discrete Applied Mathematics 5 (1983) 11–24. https://doi.org/10.1016/0166-218X(83)90012-4
  • M. R. Garey, D. S. Johnson, Complexity results for multiprocessor scheduling under resource constraints, SIAM J. Comput. 4 (1975) 397–411. https://doi.org/10.1137/0204035
  • M. R. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979.
  • R. L. Graham, E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Ann. Discrete Math. 5 (1979) 287–326. https://doi.org/10.1016/S0167-5060(08)70356-X
  • J. D. Ullman, Complexity of sequencing problems, in: E. G. Coffman, Jr., ed., Computer & Job/Shop Scheduling Theory, Wiley, 1976, 139–164.
  • E. G. Coffman, Jr., R. L. Graham, Optimal scheduling for two-processor systems, Acta Informatica 1 (1972) 200–213. https://doi.org/10.1007/BF00288685
  • S. Cook, The P versus NP problem, Clay Mathematics Institute official problem description.
11 thms3 active usersReviewed
🏆Completed
CombinatoricsOperations ResearchOptimization+1·Captain: mikedeng1

Maximizing Non-Monotone Submodular Functions II: A Nonadaptive Algorithm Achieves 1/3 of the OptimumResearch Paper

Motivation

Maximizing a submodular set function without constraints contains Max Cut, Max Directed Cut, maximum facility location and several graph and hypergraph cut problems as special cases, and it appears in operations research wherever a value exhibits diminishing returns but is not monotone (profit that combines coverage with a cost, for example). These problems are NP-hard, so the question is which fraction of the optimum an efficient algorithm can guarantee when the function is accessible only through a value oracle that returns f(S)f(S)f(S) for a queried set SSS.

Feige, Mirrokni and Vondrák (SIAM J. Comput. 40(4), 2011) gave the first constant-factor approximation algorithms for maximizing a general nonnegative submodular function. The simplest of them returns a uniformly random set and achieves 1/41/41/4 of the optimum; this mission is about the next one, a nonadaptive algorithm: it decides all of its oracle queries before seeing any answer, then computes a set from the answers. Such an algorithm can be run in one round of parallel queries. The paper shows that this restricted access already beats 1/41/41/4 and reaches 1/31/31/3.

Timeline. For Max Directed Cut, a random cut achieves 1/41/41/4. Feige, Mirrokni and Vondrák (FOCS 2007; journal version 2011) proved 1/41/41/4 for a random set and 1/31/31/3 nonadaptively for general nonnegative submodular functions, 1/31/31/3 and 2/52/52/5 by adaptive local search, and that 1/21/21/2 requires exponentially many queries. Buchbinder, Feldman, Naor and Schwartz (FOCS 2012, SIAM J. Comput. 2015) later reached the optimal 1/21/21/2 with a randomized double-greedy algorithm.

Setting

Let XXX be a finite ground set with n=∣X∣≥1n = |X| \ge 1n=∣X∣≥1 elements. A function f:2X→Rf : 2^X \to \mathbb{R}f:2X→R is submodular (Definition 1.1) if

f(S∪T)+f(S∩T)≤f(S)+f(T)for all S,T⊆X.f(S \cup T) + f(S \cap T) \le f(S) + f(T) \qquad \text{for all } S, T \subseteq X .f(S∪T)+f(S∩T)≤f(S)+f(T)for all S,T⊆X.

Throughout, fff is nonnegative, the paper's standing assumption, and OPT=max⁡S⊆Xf(S)OPT = \max_{S \subseteq X} f(S)OPT=maxS⊆X​f(S).

For p∈[0,1]p \in [0,1]p∈[0,1], X(p)X(p)X(p) denotes the random subset of XXX containing each element independently with probability ppp; R=X(1/2)R = X(1/2)R=X(1/2) is a uniformly random subset. For a set A⊆XA \subseteq XA⊆X, A(p)A(p)A(p) is the analogous random subset of AAA. The averaged marginal value of an element (Definition 2.4) is

ω(x)=E[f(R∪{x})−f(R∖{x})],R=X(1/2).\omega(x) = \mathbf{E}\big[f(R \cup \{x\}) - f(R \setminus \{x\})\big], \qquad R = X(1/2).ω(x)=E[f(R∪{x})−f(R∖{x})],R=X(1/2).

Algorithm NA (p. 1139):

  1. by random sampling, compute estimates ω~(x)\tilde\omega(x)ω~(x) with ∣ω~(x)−ω(x)∣<OPT/n2|\tilde\omega(x) - \omega(x)| < OPT/n^2∣ω~(x)−ω(x)∣<OPT/n2 for all xxx, with high probability;
  2. independently, sample R=X(1/2)R = X(1/2)R=X(1/2);
  3. with probability 8/98/98/9 return RRR;
  4. with probability 1/91/91/9 return A={x∈X:ω~(x)>0}A = \{x \in X : \tilde\omega(x) > 0\}A={x∈X:ω~(x)>0}.

Given the estimates, the expected value NA returns is 89 E[f(X(1/2))]+19f(A)\tfrac89\,\mathbf{E}[f(X(1/2))] + \tfrac19 f(A)98​E[f(X(1/2))]+91​f(A).

Formalization targets

Goal: Theorem 2.6 in the explicit form of its proof

For every nonnegative submodular fff and every estimate ω~\tilde\omegaω~ with ∣ω~(x)−ω(x)∣<OPT/n2|\tilde\omega(x) - \omega(x)| < OPT/n^2∣ω~(x)−ω(x)∣<OPT/n2 for all xxx,

89 E[f(X(1/2))]+19 f({x:ω~(x)>0}) ≥ (13−49n) OPT.\frac89\,\mathbf{E}[f(X(1/2))] + \frac19\, f\big(\{x : \tilde\omega(x) > 0\}\big) \ \ge\ \Big(\frac13 - \frac{4}{9n}\Big)\, OPT .98​E[f(X(1/2))]+91​f({x:ω~(x)>0}) ≥ (31​−9n4​)OPT.

The printed theorem says "at least (1/3−o(1)) OPT(1/3 - o(1))\,OPT(1/3−o(1))OPT"; the term 4/(9n)4/(9n)4/(9n) is what the proof establishes (p. 1140, last display).

Milestones

  1. Lemma 2.2: E[g(A(p))]≥(1−p) g(∅)+p g(A)\mathbf{E}[g(A(p))] \ge (1-p)\,g(\emptyset) + p\,g(A)E[g(A(p))]≥(1−p)g(∅)+pg(A) for submodular ggg.
  2. Lemma 2.3: E[f(A(p)∪B(q))]≥(1−p)(1−q)f(∅)+p(1−q)f(A)+(1−p)qf(B)+pqf(A∪B)\mathbf{E}[f(A(p) \cup B(q))] \ge (1-p)(1-q) f(\emptyset) + p(1-q) f(A) + (1-p)q f(B) + pq f(A \cup B)E[f(A(p)∪B(q))]≥(1−p)(1−q)f(∅)+p(1−q)f(A)+(1−p)qf(B)+pqf(A∪B) for independently sampled, possibly overlapping A,BA, BA,B.
  3. For B=X∖AB = X \setminus AB=X∖A and any CCC: f(A)+f(B∩C)+f(B∪C)≥f(C)f(A) + f(B \cap C) + f(B \cup C) \ge f(C)f(A)+f(B∩C)+f(B∪C)≥f(C).
  4. If ω≤OPT/n2\omega \le OPT/n^2ω≤OPT/n2 on BBB: E[f(R∪(B∩C))]≤E[f(R)]+OPT/(2n)\mathbf{E}[f(R \cup (B \cap C))] \le \mathbf{E}[f(R)] + OPT/(2n)E[f(R∪(B∩C))]≤E[f(R)]+OPT/(2n).
  5. E[f(R∪(B∩C))]≥14f(B∩C)+14f(C)\mathbf{E}[f(R \cup (B \cap C))] \ge \tfrac14 f(B \cap C) + \tfrac14 f(C)E[f(R∪(B∩C))]≥41​f(B∩C)+41​f(C).
  6. If ω≥−OPT/n2\omega \ge -OPT/n^2ω≥−OPT/n2 on AAA and B=X∖AB = X \setminus AB=X∖A: E[f(R)]≥E[f(R∩(B∪C))]−OPT/(2n)\mathbf{E}[f(R)] \ge \mathbf{E}[f(R \cap (B \cup C))] - OPT/(2n)E[f(R)]≥E[f(R∩(B∪C))]−OPT/(2n).
  7. E[f(R∩(B∪C))]≥14f(C)+14f(B∪C)\mathbf{E}[f(R \cap (B \cup C))] \ge \tfrac14 f(C) + \tfrac14 f(B \cup C)E[f(R∩(B∪C))]≥41​f(C)+41​f(B∪C).

Milestones 3–7 are the displayed steps of the proof of Theorem 2.6, stated for arbitrary sets where the page's argument does not use the optimality of CCC.

Significance

The theorem shows that nonadaptive access, a fixed batch of polynomially many value queries followed by a computation, suffices for a 1/31/31/3-approximation of unconstrained nonnegative submodular maximization, strictly better than the 1/41/41/4 of any algorithm that must return one of its queried sets (the paper shows 1/41/41/4 is optimal in that class, §4.2). The quantity ω\omegaω generalizes the in-degree/out-degree test for Max Directed Cut to arbitrary submodular functions, and Lemmas 2.2 and 2.3 are general sampling inequalities for submodular functions that the paper reuses for its adaptive smooth local search.

Formalizing it produces machine-checked versions of Lemmas 2.2 and 2.3 as statements about exact finite averages, a reusable expectation operator on product-distributed random subsets, and a checked version of the 1/31/31/3 argument with its explicit error term. The result is proved in the paper; to our knowledge none of it has been formalized in a proof assistant.

Difficulty

The two regimes the proof separates, "AAA is already good" and "one of f(B∩C)f(B \cap C)f(B∩C), f(B∪C)f(B \cup C)f(B∪C) is large", must be tied to the value of a uniformly random set, whereas the elements of AAA and BBB are chosen from estimated averages, not from the optimal set CCC. The natural attempt, comparing f(R)f(R)f(R) with f(C)f(C)f(C) element by element, fails because fff is not monotone: adding elements of CCC to RRR can decrease the value. The accuracy OPT/n2OPT/n^2OPT/n2 of the estimates must also be propagated through a sum over up to nnn elements, which is where the error term 4/(9n)4/(9n)4/(9n) comes from. The sampling lemmas require handling expectations over pairs of independent random subsets of possibly overlapping sets.

Formalization scope

  • The ground set is a Fintype X with DecidableEq, assumed Nonempty, so n=∣X∣≥1n = |X| \ge 1n=∣X∣≥1 and the divisions by nnn and n2n^2n2 are genuine; sets are Finset X; fff is real valued with nonnegativity ∀S, 0≤f(S)\forall S,\ 0 \le f(S)∀S, 0≤f(S) as an explicit hypothesis. Lemmas 2.2 and 2.3 are stated for real fff with no sign condition, as printed.
  • OPTOPTOPT is Finset.univ.sup' _ f, the true maximum over all subsets.
  • Every expectation over an independently sampled random set is the exact finite sum F(x)=∑Sf(S)∏i∈Sxi∏i∉S(1−xi)F(x) = \sum_{S} f(S)\prod_{i \in S} x_i \prod_{i \notin S}(1 - x_i)F(x)=∑S​f(S)∏i∈S​xi​∏i∈/S​(1−xi​); X(1/2)X(1/2)X(1/2) is x≡1/2x \equiv 1/2x≡1/2. Expectations over two independent samples (Lemma 2.3) are the corresponding iterated sums. Sampling probabilities carry the hypotheses 0≤p,q≤10 \le p, q \le 10≤p,q≤1.
  • The goal quantifies over every estimate ω~\tilde\omegaω~ satisfying the printed accuracy ∣ω~(x)−ω(x)∣<OPT/n2|\tilde\omega(x) - \omega(x)| < OPT/n^2∣ω~(x)−ω(x)∣<OPT/n2 (strict), with A={x:ω~(x)>0}A = \{x : \tilde\omega(x) > 0\}A={x:ω~(x)>0} (strict). The "with high probability" of NA's first step is this hypothesis; the sampling estimate that makes it likely (Lemma 2.5, a Chernoff-bound argument) is not part of the goal. When OPT=0OPT = 0OPT=0 the hypothesis is unsatisfiable, but then f≡0f \equiv 0f≡0 and nothing is lost.
  • The left-hand side is exactly the mixture 89 E[f(X(1/2))]+19f(A)\tfrac89\,\mathbf{E}[f(X(1/2))] + \tfrac19 f(A)98​E[f(X(1/2))]+91​f(A). A statement with the maximum of the two terms, with exact values ω~=ω\tilde\omega = \omegaω~=ω, or with the o(1)o(1)o(1) replaced by an existential constant or a limit, is a different (and weaker or stronger) theorem and does not close this mission.
  • Printed slip corrected: in the second display on p. 1140, the "===" before −∣A∖C∣ OPT/(2n2)-|A \setminus C|\,OPT/(2n^2)−∣A∖C∣OPT/(2n2) should be "≥\ge≥"; milestone 6 states the inequality.

Welcome contributions: proofs of Lemmas 2.2 and 2.3 (reusable for mission IV of this series), the identity E[f(R∪{x})−f(R)]=12ω(x)\mathbf{E}[f(R \cup \{x\}) - f(R)] = \tfrac12\omega(x)E[f(R∪{x})−f(R)]=21​ω(x), and general lemmas about the operator FFF (splitting a uniform random set along a partition).

Selected references

  • U. Feige, V. S. Mirrokni, J. Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4):1133–1153, 2011. https://doi.org/10.1137/090779346
  • N. Buchbinder, M. Feldman, J. Naor, R. Schwartz, A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization, SIAM J. Comput. 44(5):1384–1402, 2015. https://doi.org/10.1137/130929205
12 thms3 active usersReviewed
🏆Completed
Graph TheoryProbability·Captain: mikedeng1

A Simple Parallel Algorithm for the Maximal Independent Set Problem I: One Round of Monte Carlo Algorithm A or B Removes an Expected Eighth of the EdgesResearch Paper

Motivation

A maximal independent set (MIS) of a graph is a set of vertices, no two adjacent, to which no further vertex can be added. Sequentially an MIS is found greedily in linear time, but the greedy scan is inherently serial. Whether an MIS can be found fast in parallel was a central question of parallel complexity in the early 1980s: an MIS algorithm is a subroutine for maximal matching, vertex colouring with Δ+1\Delta + 1Δ+1 colours, and many other symmetry-breaking tasks.

  • Karp and Wigderson (STOC 1984; J. ACM 32, 1985) gave the first fast parallel algorithms for MIS: a randomized one and a deterministic one, both with running time O((log⁡n)4)O((\log n)^4)O((logn)4), placing MIS in NC4^44.
  • Luby (SIAM J. Comput. 15(4), 1986) gave the Monte Carlo algorithms analysed in this mission, together with a derandomization that yields a deterministic EREW P-RAM algorithm with O((log⁡n)2)O((\log n)^2)O((logn)2) running time, placing MIS in NC2^22. Alon, Babai and Itai (J. Algorithms 7, 1986) independently found a Monte Carlo algorithm similar to Algorithm B.

Luby's algorithm is the standard textbook example of a randomized parallel algorithm and remains the basis of distributed MIS algorithms in the LOCAL model. Its analysis rests on one statement, Theorem 1 of the paper, which this mission formalizes.

Setting

All algorithms in the paper run the same loop on a finite simple undirected input graph G=(V,E)G = (V, E)G=(V,E) with n=∣V∣n = |V|n=∣V∣ vertices. The current graph is G′=(V′,E′)G' = (V', E')G′=(V′,E′), initially GGG. For W⊆V′W \subseteq V'W⊆V′ the neighbourhood is N(W)={i∈V′:∃j∈W, (i,j)∈E′}N(W) = \{ i \in V' : \exists j \in W,\ (i,j) \in E' \}N(W)={i∈V′:∃j∈W, (i,j)∈E′}. One execution of the loop body selects a set I′⊆V′I' \subseteq V'I′⊆V′ independent in G′G'G′, adds it to the output, and replaces G′G'G′ by the subgraph induced on V′−(I′∪N(I′))V' - (I' \cup N(I'))V′−(I′∪N(I′)). The loop stops when G′G'G′ is empty.

For i∈V′i \in V'i∈V′ write adj(i)\mathrm{adj}(i)adj(i) for its neighbours and d(i)=∣adj(i)∣d(i) = |\mathrm{adj}(i)|d(i)=∣adj(i)∣ for its degree. The two Monte Carlo select steps are:

  • Algorithm A. Every vertex draws a priority π(i)\pi(i)π(i) uniformly from {1,…,n4}\{1, \dots, n^4\}{1,…,n4}, independently. A vertex enters I′I'I′ when its priority is strictly smaller than the priority of each of its neighbours.
  • Algorithm B. Every vertex independently sets coin(i)=1\mathrm{coin}(i) = 1coin(i)=1 with probability 1/(2d(i))1/(2d(i))1/(2d(i)), or always if d(i)=0d(i) = 0d(i)=0. Let XXX be the set of vertices with coin 111. A vertex of XXX enters I′I'I′ when each of its neighbours in XXX has strictly smaller degree.

Let YkY_kYk​ be the number of edges of E′E'E′ before the kkk-th execution of the loop body. The number of edges eliminated by that execution is Yk−Yk+1Y_k - Y_{k+1}Yk​−Yk+1​: exactly the edges of G′G'G′ with at least one endpoint in I′∪N(I′)I' \cup N(I')I′∪N(I′). For d(i)≥1d(i) \ge 1d(i)≥1 the paper uses the weight sum(i)=∑j∈adj(i)1/d(j)\mathrm{sum}(i) = \sum_{j \in \mathrm{adj}(i)} 1/d(j)sum(i)=∑j∈adj(i)​1/d(j).

Formalization targets

Goal: Theorem 1

For the current graph G′G'G′ and n≥max⁡(1,∣V′∣)n \ge \max(1, |V'|)n≥max(1,∣V′∣),

E[YkA−Yk+1A]≥18 YkA−116,E[YkB−Yk+1B]≥18 YkB.E\big[Y_k^A - Y_{k+1}^A\big] \ge \tfrac18\, Y_k^A - \tfrac1{16}, \qquad E\big[Y_k^B - Y_{k+1}^B\big] \ge \tfrac18\, Y_k^B .E[YkA​−Yk+1A​]≥81​YkA​−161​,E[YkB​−Yk+1B​]≥81​YkB​.

The constants are those printed in the paper. No connectivity, degree or size condition on G′G'G′ is assumed.

Milestones

  1. §3.2, p. 1040. The priorities of Algorithm A are pairwise distinct with probability at least 1−1/(2n2)1 - 1/(2n^2)1−1/(2n2).
  2. TECHNICAL LEMMA, p. 1043. For p1≥⋯≥pn≥0p_1 \ge \dots \ge p_n \ge 0p1​≥⋯≥pn​≥0 and c>0c > 0c>0, with αl=∑j≤lpj\alpha_l = \sum_{j \le l} p_jαl​=∑j≤l​pj​, βl=∑j<k≤lpjpk\beta_l = \sum_{j < k \le l} p_j p_kβl​=∑j<k≤l​pj​pk​ and γl=αl−cβl\gamma_l = \alpha_l - c\beta_lγl​=αl​−cβl​,
max⁡1≤l≤nγl≥12min⁡{αn,1/c}.\max_{1 \le l \le n} \gamma_l \ge \tfrac12 \min\{\alpha_n, 1/c\}.1≤l≤nmax​γl​≥21​min{αn​,1/c}.
  1. LEMMA A (Beame), p. 1041. For Algorithm A and d(i)≥1d(i) \ge 1d(i)≥1,
Pr⁡[i∈N(I′)]≥[14min⁡{sum(i),1}](1−12n2).\Pr[i \in N(I')] \ge \big[\tfrac14\min\{\mathrm{sum}(i), 1\}\big]\big(1 - \tfrac{1}{2n^2}\big).Pr[i∈N(I′)]≥[41​min{sum(i),1}](1−2n21​).
  1. LEMMA B, p. 1042. For Algorithm B and d(i)≥1d(i) \ge 1d(i)≥1,
Pr⁡[i∈N(I′)]≥14min⁡{sum(i)/2,1}.\Pr[i \in N(I')] \ge \tfrac14 \min\{\mathrm{sum}(i)/2, 1\}.Pr[i∈N(I′)]≥41​min{sum(i)/2,1}.
  1. Proof of Theorem 1, first display, p. 1041. For any random choice of I′I'I′,
E[Yk−Yk+1]≥12∑id(i)Pr⁡[i∈I′∪N(I′)]≥12∑id(i)Pr⁡[i∈N(I′)].E[Y_k - Y_{k+1}] \ge \tfrac12 \sum_i d(i)\Pr[i \in I' \cup N(I')] \ge \tfrac12 \sum_i d(i) \Pr[i \in N(I')].E[Yk​−Yk+1​]≥21​i∑​d(i)Pr[i∈I′∪N(I′)]≥21​i∑​d(i)Pr[i∈N(I′)].
  1. Proof of Theorem 1, closing chain, p. 1041.
12∑sum(i)≤2d(i) sum(i)+∑sum(i)>2d(i)≥∣E′∣.\tfrac12 \sum_{\mathrm{sum}(i) \le 2} d(i)\,\mathrm{sum}(i) + \sum_{\mathrm{sum}(i) > 2} d(i) \ge |E'|.21​sum(i)≤2∑​d(i)sum(i)+sum(i)>2∑​d(i)≥∣E′∣.

Significance

Theorem 1 says that each round removes, in expectation, a constant fraction of the remaining edges. From it the paper derives that the expected number of rounds of either algorithm is O(log⁡n)O(\log n)O(logn), and hence that MIS has a Monte Carlo algorithm running in O(log⁡n)O(\log n)O(logn) expected time on a CRCW P-RAM and O((log⁡n)2)O((\log n)^2)O((logn)2) on an EREW P-RAM with O(m)O(m)O(m) processors. Algorithm B and the proof of part (2) are also the basis of the paper's deterministic algorithm: the analysis of Lemma B uses only pairwise independence of the coins. The companion mission (A Simple Parallel Algorithm for the Maximal Independent Set Problem II) formalizes that derandomization and reuses the statements of milestones 2, 5 and 6.

The results are proved in the paper and reproduced in textbooks (e.g. Motwani and Raghavan, Randomized Algorithms), but not formalized: no statement of Theorem 1, Lemma A or Lemma B was found on the platform. A formal proof would make the per-round analysis of a standard parallel randomized algorithm reusable. That includes the degree-weighted counting of milestone 6 and the Bonferroni-type bound of the Technical Lemma, both of which recur in later analyses of distributed symmetry breaking.

Difficulty

The obvious argument tries to show that a fixed vertex enters I′I'I′ with good probability. That fails, because a high-degree vertex rarely wins against all its neighbours. The analysis instead bounds the probability that a vertex is removed, i.e. lands in N(I′)N(I')N(I′). This event is a union over neighbours of dependent events, so the first Bonferroni inequality alone does not give a lower bound: the pairwise-intersection terms must be controlled. The union bound can also be very lossy when sum(i)\mathrm{sum}(i)sum(i) is large, which is why the conclusion involves a minimum with a constant.

A second obstacle is the passage from vertices to edges: vertices of small sum(i)\mathrm{sum}(i)sum(i) can have high degree while contributing little probability. The per-vertex bounds therefore have to be summed with degree weights and redistributed over edges. For Algorithm A there is an additional complication: priorities from {1,…,n4}\{1, \dots, n^4\}{1,…,n4} can collide, so the argument about a uniformly random order holds only on the event that π\piπ is injective. That event appears as the factor 1−1/(2n2)1 - 1/(2n^2)1−1/(2n2).

Formalization scope

  • Graph. The current graph G′G'G′ is a SimpleGraph V on a finite type with decidable adjacency, and V′=VV' = VV′=V. The degree is SimpleGraph.degree, adj(i)\mathrm{adj}(i)adj(i) is neighborFinset, and Yk=∣E′∣Y_k = |E'|Yk​=∣E′∣ is edgeFinset.card.
  • Conditional form. Theorem 1 is stated for a fixed current graph G′G'G′, i.e. conditionally on the first k−1k - 1k−1 rounds, as in the paper's proof. The unconditional statement follows by averaging.
  • Input size. nnn is a parameter with 1≤n1 \le n1≤n and ∣V′∣≤n|V'| \le n∣V′∣≤n. It is not fixed to ∣V′∣|V'|∣V′∣, which would cover only the first round.
  • Select steps. Both endpoints' ALGEDGE runs are applied to every edge, since E′E'E′ contains each edge in both orientations. Hence Algorithm A keeps iii iff π(i)<π(j)\pi(i) < \pi(j)π(i)<π(j) for all neighbours jjj. Algorithm B keeps i∈Xi \in Xi∈X iff d(j)<d(i)d(j) < d(i)d(j)<d(i) for all neighbours j∈Xj \in Xj∈X. Algorithm B's I′I'I′ starts at XXX; the page leaves I′I'I′ uninitialized in §3.3, and Algorithm D's code (p. 1047) has I′←XI' \leftarrow XI′←X.
  • Laws. Probabilities and expectations are explicit finite sums: uniform over the (n4)∣V∣(n^4)^{|V|}(n4)∣V∣ priority vectors, and the product law over the 2∣V∣2^{|V|}2∣V∣ coin vectors. A coin of an isolated vertex is 111 with probability 111, as on the page.
  • Milestones. Milestone 5 is stated for an arbitrary finite distribution of I′I'I′, which contains both algorithms' laws. Milestone 6 divides out the common factor 18\tfrac1881​ of the printed chain.

Theorem 1 is false for arbitrary distributions of priorities or coins. A formalization that takes "Pr" as an unconstrained parameter, conditions on the event of interest, or replaces nnn by ∣V′∣|V'|∣V′∣ does not state the paper's theorem.

A complete development needs finite product probability spaces, inclusion–exclusion (Bonferroni) inequalities for finite unions, the symmetry of uniform priorities conditioned on injectivity, and degree-sum identities (SimpleGraph.sum_degrees_eq_twice_card_edges). The Technical Lemma and milestones 5 and 6 are reusable beyond this mission. Proofs of any milestone, and alternative proofs of Lemmas A and B, are welcome.

Selected references

  • M. Luby, A Simple Parallel Algorithm for the Maximal Independent Set Problem, SIAM J. Comput. 15(4):1036–1053, 1986. https://doi.org/10.1137/0215074
  • R. M. Karp and A. Wigderson, A Fast Parallel Algorithm for the Maximal Independent Set Problem, J. ACM 32(4):762–773, 1985. https://doi.org/10.1145/4221.4226
  • N. Alon, L. Babai and A. Itai, A Fast and Simple Randomized Parallel Algorithm for the Maximal Independent Set Problem, J. Algorithms 7(4):567–583, 1986. https://doi.org/10.1016/0196-6774(86)90019-2
  • R. Motwani and P. Raghavan, Randomized Algorithms, Cambridge University Press, 1995. https://doi.org/10.1017/CBO9780511814075
8 thms3 active usersReviewed
CombinatoricsOperations ResearchOptimization·Captain: mikedeng1

Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms 4: First-Fit Decreasing Uses at Most 71/60 L* + 5 Bins When No Item Exceeds 1/2Research Paper

Motivation

Bin packing asks how to place a list of items with sizes in (0,1](0,1](0,1] into as few unit-capacity bins as possible. It models the cutting of stock material, the packing of files onto tracks of a disc and the assignment of jobs to machines with a common deadline. Deciding the optimum is NP-hard, so in practice simple rules are used, and the question is how far they can stray from the optimum in the worst case.

Johnson, Demers, Ullman, Garey and Graham (SIAM J. Comput. 3(4), 1974) gave the first sharp worst-case bounds for the four classical rules. For First-Fit Decreasing (FFD), the rule that sorts the items into nonincreasing order and then places each into the first bin with room, they announced the bound FFD(L)≤119L∗+4FFD(L)\le\frac{11}{9}L^*+4FFD(L)≤911​L∗+4, whose full proof in Johnson's thesis exceeds 75 pages. To show the method, Section 4 of the paper proves a simpler bound in detail: when no item exceeds 1/21/21/2, FFD uses at most 7160L∗+5\frac{71}{60}L^*+56071​L∗+5 bins. That result is the subject of this mission.

Timeline:

  • 1973: D. S. Johnson's MIT thesis, Near-optimal bin packing algorithms, contains the complete proofs of the 11/911/911/9 and 71/6071/6071/60 bounds.
  • 1974: Johnson, Demers, Ullman, Garey and Graham publish the 71/6071/6071/60 bound for lists in (0,1/2](0,1/2](0,1/2] (Theorem 4.1) with a proof that is complete except for parts of two lemmas, and show by example that 71/6071/6071/60 cannot be lowered.
  • 1985: B. S. Baker gives a shorter proof of the 11/911/911/9 bound for FFD (J. Algorithms 6, 1985).
  • 2007: G. Dósa determines the tight additive constant 6/96/96/9 in the 11/911/911/9 bound (ESCAPE 2007, LNCS 4614).

Setting

A list is a finite sequence L=(a1,…,an)L=(a_1,\dots,a_n)L=(a1​,…,an​) of real numbers in (0,1](0,1](0,1]; values may repeat. A bin has capacity 111; its level is the sum of the numbers in it. The optimum L∗L^*L∗ is the least number of bins into which the elements of LLL can be placed with no bin level exceeding 111.

First-Fit places a1,a2,…a_1,a_2,\dotsa1​,a2​,… in order into bins B1,B2,…B_1,B_2,\dotsB1​,B2​,…, each initially at level 000: aia_iai​ goes into the bin of least index whose level β\betaβ satisfies β≤1−ai\beta\le 1-a_iβ≤1−ai​. First-Fit Decreasing first arranges LLL into nonincreasing order and then runs First-Fit. FFD(L)FFD(L)FFD(L) is the number of bins it uses.

The proof uses a weight WWW on finite sets of elements. For an integer k≥1k\ge1k≥1, xxx is a kkk-piece if x∈(1k+1,1k]x\in(\frac1{k+1},\frac1k]x∈(k+11​,k1​], and a kkk-bin is a bin whose largest element is a kkk-piece. Set w1(x)=⌊1/x⌋−1w_1(x)=\lfloor 1/x\rfloor^{-1}w1​(x)=⌊1/x⌋−1. A pair (x,y)(x,y)(x,y) obeys relation kkk if xxx is a kkk-piece and kx+y≤1kx+y\le1kx+y≤1; then w2(x,y)=w1(x)+k−1kw1(y)w_2(x,y)=w_1(x)+\frac{k-1}{k}w_1(y)w2​(x,y)=w1​(x)+kk−1​w1​(y), and otherwise w2(x,y)=w1(x)+w1(y)w_2(x,y)=w_1(x)+w_1(y)w2​(x,y)=w1​(x)+w1​(y). For a partition π\piπ of XXX into one- and two-element sets, with each pair ordered (earlier, later) in the nonincreasing order,

w12(π)=∑{x}∈πw1(x)+∑(x,y)∈πw2(x,y),W(X)=min⁡πw12(π).w_{12}(\pi)=\sum_{\{x\}\in\pi}w_1(x)+\sum_{(x,y)\in\pi}w_2(x,y),\qquad W(X)=\min_\pi w_{12}(\pi).w12​(π)={x}∈π∑​w1​(x)+(x,y)∈π∑​w2​(x,y),W(X)=πmin​w12​(π).

BASIC is the set of elements of LLL that are kkk-pieces lying in a kkk-bin of the FFD packing of LLL, for some kkk; SURPLUS is the rest of LLL.

Formalization targets

Goal: Theorem 4.1

for every list L⊆(0,12]:FFD(L)≤7160L∗+5.\text{for every list } L\subseteq(0,\tfrac12]:\qquad FFD(L)\le\frac{71}{60}L^*+5 .for every list L⊆(0,21​]:FFD(L)≤6071​L∗+5.

The constants are those printed in the paper. The multiplicative constant 71/6071/6071/60 is best possible.

Milestones

  1. Lemma 3.3 (FFD part): if FFD(L)>rL∗+dFFD(L)>rL^*+dFFD(L)>rL∗+d with r,d≥1r,d\ge1r,d≥1, the list L′L'L′ of the elements of LLL exceeding (r−1)/r(r-1)/r(r−1)/r also has FFD(L′)>rL′∗+dFFD(L')>rL'^*+dFFD(L′)>rL′∗+d.
  2. Claim 4.2.1: for N≥4N\ge4N≥4 and L⊆(1N,12]L\subseteq(\frac1N,\frac12]L⊆(N1​,21​], ∑x∈BASICw1(x)≥FFD(L)−∑j=2N−1j−1j\sum_{x\in\mathrm{BASIC}}w_1(x)\ge FFD(L)-\sum_{j=2}^{N-1}\frac{j-1}{j}∑x∈BASIC​w1​(x)≥FFD(L)−∑j=2N−1​jj−1​.
  3. Claim 4.2.2: for N≥4N\ge4N≥4, L⊆(1N,12]L\subseteq(\frac1N,\frac12]L⊆(N1​,21​] and every partition π\piπ of LLL into one- and two-element sets, w12(π)≥w1(BASIC)−∑j=3N−11jw_{12}(\pi)\ge w_1(\mathrm{BASIC})-\sum_{j=3}^{N-1}\frac1jw12​(π)≥w1​(BASIC)−∑j=3N−1​j1​.
  4. Lemma 4.2: for N≥4N\ge4N≥4 and L⊆(1N,12]L\subseteq(\frac1N,\frac12]L⊆(N1​,21​], W(L)≥FFD(L)−N+2W(L)\ge FFD(L)-N+2W(L)≥FFD(L)−N+2.
  5. Subadditivity: W(X1∪⋯∪Xk)≤∑iW(Xi)W(X_1\cup\dots\cup X_k)\le\sum_i W(X_i)W(X1​∪⋯∪Xk​)≤∑i​W(Xi​).
  6. Lemma 4.3: if X⊆(17,12]X\subseteq(\frac17,\frac12]X⊆(71​,21​] and ∑x∈Xx≤1\sum_{x\in X}x\le1∑x∈X​x≤1, then W(X)≤7160W(X)\le\frac{71}{60}W(X)≤6071​.

A companion item states the Remark after Theorem 4.1: for every N≥1N\ge1N≥1 there is a list with all elements below 1/31/31/3, L∗=60NL^*=60NL∗=60N and FFD(L)=71NFFD(L)=71NFFD(L)=71N.

Significance

Theorem 4.1 shows the weighting-function method in its simplest nontrivial form: a weight whose total is within a constant of the algorithm's bin count, and which no feasible bin can exceed by more than the target ratio. The same method, with more elaborate weights, gives the 11/911/911/9 bound for FFD, and it is the model for later worst-case analyses of packing heuristics. The Remark shows that 71/6071/6071/60 is exact for items in (0,1/2](0,1/2](0,1/2], and the Corollary on p. 322 extends the analysis to the asymptotic ratio RFFDαR^\alpha_{FFD}RFFDα​ when items are bounded by α∈(8/29,1/2]\alpha\in(8/29,1/2]α∈(8/29,1/2].

The source proof is partial. The billing argument behind Claim 4.2.2 is given only when two auxiliary conditions (G1) and (G2) hold ("The more intricate argument here omitted", p. 321), and Lemma 4.3 is checked in four of about seventy-four cases ("leaving the remaining 70-odd, more or less routine, cases to the ambitious reader", p. 321). Complete details are in Johnson's thesis. The theorem itself is established. A formalization therefore gives the first complete, checked proof in a single place. The finite case analysis of Lemma 4.3 is well suited to machine checking. No machine-checked proof of any FFD bound is known to exist.

Difficulty

The obvious weight w1w_1w1​ alone fails. Claim 4.2.1 shows that w1(BASIC)w_1(\mathrm{BASIC})w1​(BASIC) covers the FFD bins, but many sets XXX of elements with sum at most 111 have w1(X)>71/60w_1(X)>71/60w1​(X)>71/60, for example two 222-pieces, a 555-piece and a 666-piece. The pair discounts of w2w_2w2​ repair Lemma 4.3, but they must then be paid for in Lemma 4.2, for every partition. That is Claim 4.2.2: a charge from each discounted pair to distinct SURPLUS elements that are no larger. The charge is straightforward only when no member of a pair obeying relation kkk lies in a bin of type k′<kk'<kk′<k. In general a pair's larger element may already have been charged by a smaller relation, and the paper omits the argument that handles this. Lemma 4.3 is elementary but has many cases, each determined by the piece types in XXX and the relations they obey.

Formalization scope

A list is L : List ℝ with IsList L (0<a≤10<a\le10<a≤1 for each element) in every statement. L∗L^*L∗ is optBins L, the least bbb such that some map from positions to Fin b has every bin sum at most 111. The First-Fit run keeps the nonempty bins as a List (List ℝ), and opens a new bin at the end exactly when no existing bin fits, which is the paper's "least jjj". The fit test is β+a≤1\beta+a\le1β+a≤1. FFD is First-Fit on sortDesc L, the mergeSort into nonincreasing order; ties do not affect the bin count. Indices are 000-based.

W(X)W(X)W(X) sorts XXX into nonincreasing order and minimises w12w_{12}w12​ over the involutions of its positions: fixed points are singletons, and a pair i<σ(i)i<\sigma(i)i<σ(i) is oriented (larger, smaller). The minimum is over a finite nonempty set, so it is attained. BASIC is a set of positions of sortDesc L, and each position's bin is its bin in the final FFD packing. In w2w_2w2​, k=⌊1/x⌋k=\lfloor1/x\rfloork=⌊1/x⌋ is the piece type of the first element. Sums ∑j=2N−1\sum_{j=2}^{N-1}∑j=2N−1​ are over Finset.Icc 2 (N - 1) with N≥4N\ge4N≥4.

The goal's range is (0,1/2](0,1/2](0,1/2]. The restriction to (1/7,1/2](1/7,1/2](1/7,1/2] belongs only to the proof, through Lemma 3.3. Stating the goal for (1/7,1/2](1/7,1/2](1/7,1/2], weakening 71/6071/6071/60 or 555, or making WWW an unattained infimum would each change the theorem. Only the FFD half of Lemma 3.3 is stated. Claim 4.2.1 is stated with Lemma 4.2's standing hypothesis N≥4N\ge4N≥4. The Remark's printed range 0<ε≤5/870<\varepsilon\le5/870<ε≤5/87 is a misprint: its FFD packing needs ε<1/174\varepsilon<1/174ε<1/174, and the companion item states only the existence claim.

Infrastructure needed: a usable API for the First-Fit run (the invariants of the fold, bin levels, the order of bins), a lemma that FFD bins receive items in nonincreasing order, and a decision procedure for Lemma 4.3's case analysis over piece types. The model file and the weight file are reusable for the 11/911/911/9 bound (mission 3 of this series) and for the bounded-α\alphaα corollaries. Contributions of proofs of Lemma 4.3 by computer-checked case enumeration, and of the missing general case of Claim 4.2.2, are especially welcome.

Selected references

  • D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey, R. L. Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM J. Comput. 3(4):299–325, 1974. https://doi.org/10.1137/0203025
  • D. S. Johnson, Near-Optimal Bin Packing Algorithms, Ph.D. thesis, Massachusetts Institute of Technology, 1973 (reference [8] of the paper).
  • B. S. Baker, A new proof for the first-fit decreasing bin-packing algorithm, J. Algorithms 6, 1985.
  • G. Dósa, The tight bound of first fit decreasing bin-packing algorithm is FFD(I) ≤ 11/9 OPT(I) + 6/9, ESCAPE 2007, Lecture Notes in Computer Science 4614, 2007.
9 thms3 active usersReviewed
PreviousPage 2 of 8Next

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me