Deterministic construction of balanced label schedules #
The conditional-expectation construction in Lemma 4.5, printed p. 31 of [OAI26k],
fixes one whole variable or factor label at a time. The generic pass greedyLabelPassBy does
this for any rational score whose average over the candidates for a fresh label does not exceed
its current value (greedyLabelPassBy_spec). Lemma 4.5 uses the normalized score
(greedyLabelPass, choosing by bestVariableLabel and bestFactorLabel); Lemma D.3 of the
same paper uses the incidence potential alone (Cslib.PacketPacking). A slot that is already
assigned is retained, so repeated slots do not invalidate the fresh-choice premise. Every
incidence still reads the same label of its original variable and factor.
The canonical construction uses the executable enumerations FinEnum.toList and List.Pi.enum.
Its total schedules have joint normalized potential no greater than the initial finite average.
Factors with empty scopes receive the specified constant label. This is an executable finite
algorithm and its mathematical correctness proof; rational bit-cost and native-machine bounds
are separate obligations.
Main definitions #
Cslib.BalancedSchedules.greedyLabelStepBy,Cslib.BalancedSchedules.greedyLabelPassBy: one greedy step and a traversal for an arbitrary score.Cslib.BalancedSchedules.greedyLabelStep: fix one fresh variable or factor label.Cslib.BalancedSchedules.greedyLabelPass: traverse an explicit list of slots.Cslib.BalancedSchedules.greedySchedules: construct both complete schedule families.
Main results #
Cslib.BalancedSchedules.greedyLabelPassBy_spec: the method of conditional expectations: completion, preservation and score monotonicity for an averaging score.Cslib.BalancedSchedules.greedyLabelPass_eq_greedyLabelPassBy: the Lemma 4.5 pass is the generic pass for the normalized score.Cslib.BalancedSchedules.greedyLabelPass_spec: completion, preservation and score monotonicity.Cslib.BalancedSchedules.greedySchedules_candidates_length: the exactr ^ Qcandidate count.Cslib.BalancedSchedules.greedySchedules_slots_length: the exact number of slots.Cslib.BalancedSchedules.greedySchedules_score_le: the output beats the initial average.Cslib.BalancedSchedules.greedySchedules_empty_factor: empty-factor normalization.Cslib.BalancedSchedules.greedySchedules_balanced: both pointwise occupancy bounds.
References #
- [OAI26k], §4.4, Lemma 4.5, printed pp. 30–31; Appendix D.4.2, Lemma D.3, pp. 58–59.
Fix one fresh whole label using the first candidate that minimizes score after the update.
Already fixed labels are retained. Empty candidate lists leave a fresh slot unassigned.
Traverse slots in the supplied order with greedyLabelStepBy, retaining each selected whole
label for all later score evaluations. Repeated slots never overwrite an earlier selection.
Method of conditional expectations. If fixing a fresh whole label does not increase
score on average over the labels, the full pass never increases score, fills every visited
slot and preserves all initially assigned labels. Candidate coverage concerns whole labels;
duplicates are allowed.
Fix one fresh whole label using the first minimizing candidate. Already fixed labels are retained. Empty candidate lists leave a fresh slot unassigned.
Traverse slots in the supplied order, retaining each selected whole label for all later score evaluations. This accepts repeated slots without overwriting an earlier selection.
The Lemma 4.5 pass is the generic pass for the normalized score.
The full pass never increases the joint score, fills every visited slot and preserves all initially assigned labels. Candidate coverage concerns whole words; duplicates are allowed.
The traversal visits exactly one slot for each variable and factor.
Construct schedules by fixing all variables, then all factors, in their explicit finite
orders. Candidate whole labels use List.Pi.enum; no good-label witness is supplied. Normalize
empty factors to the constant g₀ schedule after the pass.
Every empty factor gets the specified constant schedule, independently of tie breaking.
The complete deterministic construction has joint normalized potential at most the initial finite-uniform average. All choices are whole schedules; repeated incidence endpoints remain correlated. Empty index types and zero normalization denominators retain their rational meaning.
Under the incidence degree bounds, the constructed schedules have normalized potential at most two, by the established finite-average incidence and group estimates.
The actual constructed schedules satisfy both occupancy bounds of Lemma 4.5 under its
size hypotheses. Empty factors have the prescribed constant labels by
greedySchedules_empty_factor. This certifies the result of the program, not its bit cost.