The inner-range allocation (water filling) #
Classes c ≠ 0 with integer offsets β c (the row weights of class c are i + β c / 2).
At a level k (weights < k/2), class c receives lrow k (β c) = ⌈(k - β c)/2⌉⁺ rows.
We take the largest feasible level kf ∈ [klo, ktop] (at most h - L0min rows used) and put the
remaining rows into the zero class. Then
- the allocation is valid for
inner_bound_cap(the zero-class condition), ∑ wcap ≥ Φ(kf) - B₀, withΦ(k) = h k/2 - ∑_c ψ(k, β c)concave ink,Φ(kf) ≥ Φ(k) - (k - klo) L0min/2for everyk ∈ [klo, ktop].
ψ(k, β) = ∑_{i < lrow} (k/2 - i - β/2).
Equations
- Zeta5Irrational.psiR k β = ∑ i ∈ Finset.range (Zeta5Irrational.lrow k β), (↑k - 2 * ↑i - ↑β) / 2
Instances For
Rows used at level k.
Equations
- Zeta5Irrational.rowsK β k = ∑ c ∈ Finset.univ.erase 0, Zeta5Irrational.lrow k (β c)
Instances For
Φ(k) = h k / 2 - ∑ ψ.
Equations
- Zeta5Irrational.PhiK β h k = ↑h * ↑k / 2 - ∑ c ∈ Finset.univ.erase 0, Zeta5Irrational.psiR k (β c)
Instances For
noncomputable def
Zeta5Irrational.kfSel
{m : ℕ}
(β : Fin (m + 1) → ℤ)
(h L0min : ℕ)
(klo ktop : ℤ)
:
The chosen level.
Equations
- Zeta5Irrational.kfSel β h L0min klo ktop = klo + ↑(Nat.findGreatest (fun (j : ℕ) => Zeta5Irrational.rowsK β (klo + ↑j) + L0min ≤ h) (ktop - klo).toNat)
Instances For
noncomputable def
Zeta5Irrational.allocK
{m : ℕ}
(β : Fin (m + 1) → ℤ)
(h : ℕ)
(kf : ℤ)
(c : Fin (m + 1))
:
The allocation.
Equations
- Zeta5Irrational.allocK β h kf c = if c = 0 then h - Zeta5Irrational.rowsK β kf else Zeta5Irrational.lrow kf (β c)