Soft-Heap Rank Parameters, Corruption Bound, and Item Potential #
Single-heap Word-RAM parameter and potential step toward #8624, after [Cha00],
Theorem 1.1 and Section 5.1, Lemmas 5.1–5.2 (NECI TR 99-097 preprint, pp. 2, 12–13), and
[PR02], Section 2.4, p. 19, Lemma 2.2. Supports insert, extractMin, and
collectCorrupted without meld or arbitrary-handle delete. The dismantling-free
binary-tree defill parameterization (targetSize r k = 2 ^ ((k - r + 1) / 2)), the
12 / 2 ^ r sizeCap recurrence, rankThresholdForEps ε for arbitrary 0 < ε : ℚ (extending
Chazelle Theorem 1.1's 0 < ε ≤ 1 / 2 and PR02 Lemma 2.2's 0 < ε < 1 / 2), and the +(r : ℚ)
baseline credit in itemPhi are this module's self-contained Word-RAM adaptation.
Main definitions #
Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.rankThresholdForEps: rank threshold sufficient to guarantee corruption fraction at mostε : ℚ.Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.shFuelBound: sufficient Word-RAMdefillloop fuel(50 * r + 100) * (maxItems + 1).Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.targetSize,sizeCap: target item-list lower bound and capacity cap at rankkunder thresholdr.Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.itemPhi: closed-form rational potential assigned to each item by thresholdrand rankk.
Main results #
Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.corrupt_sum_bound:2 ^ r * ∑ k ∈ Finset.Icc (r + 1) K, C k * sizeCap r k ≤ 12 * C 0.Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.rat_le_eps_mul_of_pow_mul_le,corrupt_sum_bound_eps: rational corruption bound at thresholdrankThresholdForEps ε.Cslib.DataStructure.PriorityQueue.WordRAM.SoftHeap.itemPhi_sub_succ: exact telescoping rank potential dropitemPhi r k - itemPhi r (k + 1) = 1 / targetSize r k.
References #
- B. Chazelle, The Soft Heap: An Approximate Priority Queue with Optimal Error Rate, Journal of the ACM 47(6), 2000, Theorem 1.1 and Section 5.1, Lemmas 5.1–5.2 (NECI TR 99-097 preprint, pp. 2, 12–13).
- S. Pettie and V. Ramachandran, An Optimal Minimum Spanning Tree Algorithm, Journal of the ACM 49(1), 2002, Section 2.4, p. 19, Lemma 2.2.
Rank threshold achieving error rate at most ε : ℚ (using 12 / 2 ^ r ≤ ε).
Sufficient Word-RAM loop fuel for soft-heap operations with threshold r and capacity
maxItems.
Lower-bound exponent check for rankThresholdForEps: 12 / ε ≤ 2 ^ rankThresholdForEps ε.
Minimum target item-list length targetSize r k of a non-leaf soft-heap node of rank k
under corruption threshold r.
Target size is always positive.
Target size equals 1 for all ranks at most r.
Recurrence for targetSize r (k + 1).
targetSize r k is even whenever r < k.
Every rank k satisfies k ≤ targetSize r k + r.
Maximum number of items stored at a single soft-heap node of rank k under threshold r.
Converts an integer corruption bound 2 ^ rankThresholdForEps ε * c ≤ 12 * n into
(c : ℚ) ≤ ε * (n : ℚ) for any 0 < ε.
Rational error-rate specialization: setting r = rankThresholdForEps ε for any 0 < ε yields
total capacity above rank r at most ε * C 0.
Closed-form amortized item rank potential itemPhi r k, including an (r : ℚ) credit baseline
that pays for root-list suffix-min repairs so shExtractMin stays O(1) independently of r.
Item potential is always at least the baseline credit (r : ℚ).
Item potential is always non-negative.
Exact telescoping drop itemPhi r k - itemPhi r (k + 1) = 1 / targetSize r k.