Documentation

CslibFrontier.Foundations.BooleanAnalysis.GreedyFixing

Greedy fixing of coordinates by conditional expectations #

The method of conditional expectations on the cube ι → Bool. A state is a point x together with a set sel of coordinates that have been fixed; the conditional expectation of f given the fixed coordinates is projectionAverage f sel x, the average of f over the coordinates outside sel. Fixing a free coordinate to false and to true splits this average into two halves (Cslib.BitString.projectionAverage_fixCoord_false_add_true), so the larger of the two is at least the current average. Fixing the coordinates one at a time, each to the value of larger conditional expectation, therefore ends at a point where f is at least its mean (Cslib.BitString.expect_le_greedy_fixCoord) Alon and Spencer, Chapter 16 Williamson and Shmoys, Section 5.2.

This is the exact form of the method, the instance of Cslib.PessimisticEstimator.greedy in which the estimate is the conditional expectation itself (Cslib.PessimisticEstimator.greedy_spec_of_add_le). Clients for which the conditional expectation is expensive use a pessimistic estimator instead, as Johnson's algorithm does in CslibFrontier.Logics.Propositional.CNF.Johnson.

Main definitions #

Main results #

References #

def Cslib.BitString.fixCoord {ι : Type u_1} [DecidableEq ι] (i : ι) (b : Bool) (s : (ι → Bool) × (ι → Bool)) :
(ι → Bool) × (ι → Bool)

Fix coordinate i of the point s.1 to b and add i to the fixed coordinates s.2.

theorem Cslib.BitString.projectionAverage_fixCoord_false_add_true {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) {i : ι} (x sel : ι → Bool) (hi : sel i = false) :

Fixing a free coordinate i to false and to true splits the conditional expectation of f given the fixed coordinates sel into two halves.

theorem Cslib.BitString.expect_le_greedy_fixCoord {ι : Type u_1} [Fintype ι] [DecidableEq ι] (f : (ι → Bool) → ℝ) (coords : List ι) (hnd : coords.Nodup) (hcov : ∀ (i : ι), i ∈ coords) (x : ι → Bool) :
(Finset.univ.expect fun (y : ι → Bool) => f y) ≤ f (PessimisticEstimator.greedy fixCoord (fun (s : (ι → Bool) × (ι → Bool)) => -projectionAverage f s.2 s.1) coords (x, fun (x : ι) => false)).1

Greedy fixing by conditional expectations. Starting from any point with no fixed coordinates, fix the coordinates of a list without repetitions that covers every coordinate one at a time, each to the value of larger conditional expectation of f (minimizing its negation). The resulting point is one where f is at least its mean.