While this submission is a draft, it cannot be used by other submissions.

Per-Client Fairness Parameters Reduce to a Uniform One

Lax117284.Lemma15 · concepts/Lax117284/Lemma15.lean · lax-117284

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    Lemma 15. There is a polynomial-time reduction from 1∣kj,rep∣min⁡j∑iZi,j1 \mid k_j, \mathrm{rep} \mid \min_j \sum_i Z_{i,j} to 1∣rep∣min⁡j∑iZi,j1 \mid \mathrm{rep} \mid \min_j \sum_i Z_{i,j} which increases the treewidth of the overall conflict graph by at most 22.

    Let II have nn clients, mm days and fairness parameters k1,…,knk_1, \ldots, k_n with kj≤mk_j \le m. Append another mm days, add two clients c−c^- and c+c^+, and ask for the uniform parameter mm. The jobs of c−c^- and c+c^+ coincide on every day, so at most one of them runs on any day and, being asked for mm of the 2m2m days, each of them runs on exactly one day of every pair. Their common job occupies a stretch of time later than every due date of II, so it conflicts with no original job on the original days. On the additional days each original client jj has a job of its own, which is placed inside that stretch on kjk_j of them and after it on the others. A client of II can therefore be served on all but kjk_j of the additional days, and needs kjk_j of the original days to reach mm — which is its original requirement.

    The jobs the original clients receive on the additional days are pairwise disjoint, so the construction adds no edge between original clients: the overall conflict graph grows only by the two new vertices, and its treewidth by at most 22.

    Concept map
    10 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 5 statements. Each proof establishes one of them relative to its assumptions.

    1 correct proven

    In the paper

    • page 4 of this submission's paper

    Lean source view on GitHub

    1import Lax117284.ConflictGraph
    2import Lax117284.Corollary8
    3import Lax117284.Problems
    4
    5/-!
    6---
    7title: Per-Client Fairness Parameters Reduce to a Uniform One
    8type: lemma
    9---
    10**Lemma 15.** There is a polynomial-time reduction from
    111∣kj,rep∣min⁡j∑iZi,j1 \mid k_j, \mathrm{rep} \mid \min_j \sum_i Z_{i,j} to
    121∣rep∣min⁡j∑iZi,j1 \mid \mathrm{rep} \mid \min_j \sum_i Z_{i,j} which increases the treewidth of the
    13overall conflict graph by at most 22.
    14
    15Let II have nn clients, mm days and fairness parameters k1,…,knk_1, \ldots, k_n with
    16kj≤mk_j \le m. Append another mm days, add two clients c−c^- and c+c^+, and ask for the
    17uniform parameter mm. The jobs of c−c^- and c+c^+ coincide on every day, so at most one of
    18them runs on any day and, being asked for mm of the 2m2m days, each of them runs on
    19exactly one day of every pair. Their common job occupies a stretch of time later than every
    20due date of II, so it conflicts with no original job on the original days. On the
    21additional days each original client jj has a job of its own, which is placed inside that
    22stretch on kjk_j of them and after it on the others. A client of II can therefore be served
    23on all but kjk_j of the additional days, and needs kjk_j of the original days to reach mm —
    24which is its original requirement.
    25
    26The jobs the original clients receive on the additional days are pairwise disjoint, so the
    27construction adds no edge between original clients: the overall conflict graph grows only by
    28the two new vertices, and its treewidth by at most 22.
    29
    30# Formalization Notes
    31
    32The kjk_j days on which client jj is blocked are the first kjk_j of the additional days.
    33The source takes an arbitrary set of that size; taking the first ones makes the construction
    34a function of the instance and its parameters alone, which is what a reduction has to be.
    35
    36The two new clients are numbered nn and n+1n+1, and day m+im + i of the construction is the
    37additional copy of day ii. The private job of client jj ends at a time offset by j+1j+1
    38inside a stretch of length n+1n+1, so distinct clients receive disjoint jobs and every such
    39job lies inside the stretch the two new clients occupy.
    40
    41Correctness is stated for instances whose parameters do not exceed the number of days, which
    42is the only case that can be a yes-instance. The three statements separate what is
    43asserted: the combinatorial content of the construction, the treewidth of its output, and
    44the running time of the map on words. The lemma itself follows from them.
    45
    46An instance without clients is a yes-instance whatever its parameters, and its table is empty, so
    47its code does not reflect its number of days: the construction, which has four cells for every
    48day, would write exponentially many in the length of the code. The map therefore sends such an
    49instance to the instance without clients and without days with the parameter `0`, which is
    50again a yes-instance.
    51
    52The reduction is correct on all words, and the treewidth is not part of that statement: the
    53treewidth of the input instance is not something the map checks, and the construction
    54preserves the answer whatever it is. What the construction does to the treewidth is
    55`treewidth_le`; a reduction that starts from instances of treewidth at most `4`, such as the
    56one of Lemma 14, therefore lands among those of treewidth at most `6`.
    57-/
    58
    59namespace Lax117284.Lemma15
    60
    61open Lax117284.Scheduling Lax117284.Problems Lax434930.PolynomialTime
    62open Lax429075.Reductions
    63
    64/-- A time not before any due date of `I`. -/
    65def dmax (I : Instance) : ℕ := Finset.univ.sup fun i => Finset.univ.sup fun j => I.d i j
    66
    67/-- The length of the job the two new clients share: longer than the stretch of private
    68jobs, so that it contains all of them. -/
    69def span (I : Instance) : ℕ := I.clients + 1
    70
    71/-- **The instance of Lemma 15**: `2m` days, the `n` clients of `I` together with two new
    72ones, and the uniform fairness parameter `m`. -/
    73def inst (I : Instance) (k : Fin I.clients → ℕ) : Instance where
    74 clients := I.clients + 2
    75 days := 2 * I.days
    76 p i j :=
    77 if (j : ℕ) < I.clients then
    78 (if (i : ℕ) < I.days then I.pAt i j else 1)
    79 else span I
    80 d i j :=
    81 if hj : (j : ℕ) < I.clients then
    82 (if (i : ℕ) < I.days then I.dAt i j
    83 else if (i : ℕ) - I.days < k ⟨j, hj⟩ then dmax I + ((j : ℕ) + 1)
    84 else dmax I + span I + ((j : ℕ) + 1))
    85 else dmax I + span I
    86 p_pos i j := by
    87 have h0 := I.pAt_pos (i : ℕ) (j : ℕ)
    88 have hs : span I = I.clients + 1 := rfl
    89 split_ifs <;> omega
    90 p_le_d i j := by
    91 have h1 := I.pAt_le_dAt (i : ℕ) (j : ℕ)
    92 have hs : span I = I.clients + 1 := rfl
    93 split_ifs <;> omega
    94
    95/-- **The construction is correct**: the instance it produces admits a schedule serving
    96every client on `m` of its `2m` days exactly when the original instance admits one serving
    97every client `j` on `k j` of its `m` days. -/
    98axiom correct (I : Instance) (k : Fin I.clients → ℕ) (hk : ∀ j, k j ≤ I.days) :
    99 I.HasFairSchedule k ↔ (inst I k).HasKFairSchedule I.days
    100
    101/-- **The construction raises the treewidth of the overall conflict graph by at most
    102two.** -/
    103axiom treewidth_le (I : Instance) (k : Fin I.clients → ℕ) :
    104 ConflictGraph.treewidth (inst I k) ≤ ConflictGraph.treewidth I + 2
    105
    106open Classical in
    107/-- **The reduction**, as a map on words: a word encoding an instance with per-client
    108parameters not exceeding its number of days is sent to the encoding of the constructed
    109instance with the parameter `m`, an instance without clients to a fixed yes-instance, and
    110every other word to the rejected word. -/
    111noncomputable def reduce (w : Word) : Word :=
    112 if h : ∃ (I : Instance) (k : Fin I.clients → ℕ),
    113 encodePerClient I k = w ∧ ∀ j, k j ≤ I.days then
    114 if h.choose.clients = 0 then encodeUniform (Corollary8.noClients 0) 0
    115 else encodeUniform (inst h.choose h.choose_spec.choose) h.choose.days
    116 else rejected
    117
    118/-- **The reduction is correct.** -/
    119axiom reduce_correct (w : Word) :
    120 w ∈ PerClient (fun I k => ∀ j, k j ≤ I.days) ↔ reduce w ∈ Uniform any
    121
    122/-- **The reduction runs in polynomial time.** -/
    123axiom reduce_polyTime : Nonempty (Turing.TM2ComputableInPolyTime id id reduce)
    124
    125/-- **Lemma 15.** The per-client problem reduces in polynomial time to the uniform problem;
    126by `treewidth_le` the reduction raises the treewidth of the overall conflict graph by at
    127most two. -/
    128axiom perClient_manyOne_uniform :
    129 ManyOne (PerClient fun I k => ∀ j, k j ≤ I.days) (Uniform any)
    130
    131end Lax117284.Lemma15
    132
    Show ProofShow ProofShow ProofShow ProofShow Proof
    Formalization Notes

    The kjk_j days on which client jj is blocked are the first kjk_j of the additional days. The source takes an arbitrary set of that size; taking the first ones makes the construction a function of the instance and its parameters alone, which is what a reduction has to be.

    The two new clients are numbered nn and n+1n+1, and day m+im + i of the construction is the additional copy of day ii. The private job of client jj ends at a time offset by j+1j+1 inside a stretch of length n+1n+1, so distinct clients receive disjoint jobs and every such job lies inside the stretch the two new clients occupy.

    Correctness is stated for instances whose parameters do not exceed the number of days, which is the only case that can be a yes-instance. The three statements separate what is asserted: the combinatorial content of the construction, the treewidth of its output, and the running time of the map on words. The lemma itself follows from them.

    An instance without clients is a yes-instance whatever its parameters, and its table is empty, so its code does not reflect its number of days: the construction, which has four cells for every day, would write exponentially many in the length of the code. The map therefore sends such an instance to the instance without clients and without days with the parameter 00, which is again a yes-instance.

    The reduction is correct on all words, and the treewidth is not part of that statement: the treewidth of the input instance is not something the map checks, and the construction preserves the answer whatever it is. What the construction does to the treewidth is treewidthletreewidth_le; a reduction that starts from instances of treewidth at most 44, such as the one of Lemma 14, therefore lands among those of treewidth at most 66.

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…