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

Construction 1

Lax470956.Construction1 · concepts/Lax470956/Construction1.lean · lax-470956

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

    Definition

    The scheduling instance built from a Multicoloured Clique instance. There is one edge selection machine for each of the (k2)\binom{k}{2} pairs of colours and one validation machine, so the number of machines depends on the number of colours alone — so the reduction is a parameterized one.

    Vertices are laid out along the time axis in an order π\pi that refines the colour order, each vertex owning a window of length k+2k+2. A vertex vv contributes one job of processing time k+2k+2 for its own colour, eligible only on the validation machine, and one unit job for each other colour \ell, eligible also on the edge selection machine of {colour(v),}\{\mathrm{colour}(v), \ell\}. An edge {u,v}\{u,v\} with colour(u)<colour(v)\mathrm{colour}(u) < \mathrm{colour}(v) contributes one job on the edge selection machine of that colour pair, spanning from just after uu's window to just before vv's. Each colour pair also gets two colour combination jobs per vertex, which fill the rest of that machine's timeline so that exactly one edge job can be selected on it.

    The weights are chosen in three tiers, c1c2c3c_1 \ll c_2 \ll c_3, so that a schedule of the target weight is forced to select one edge per colour pair, and then forced to have those (k2)\binom{k}{2} edges agree on one vertex per colour — which is the clique.

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

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

    Lean source view on GitHub

    1import Lax470956.MulticolouredClique
    2import Lax470956.Scheduling
    3import Lax470956.InstanceEncoding
    4import Mathlib.Data.Nat.Choose.Basic
    5
    6/-!
    7---
    8title: Construction 1
    9type: definition
    10---
    11The scheduling instance built from a Multicoloured Clique instance. There is one
    12*edge selection machine* for each of the (k2)\binom{k}{2} pairs of colours and one
    13*validation machine*, so the number of machines depends on the number of colours alone
    14— so the reduction is a parameterized one.
    15
    16Vertices are laid out along the time axis in an order π\pi that refines the colour
    17order, each vertex owning a window of length k+2k+2. A vertex vv contributes one job of
    18processing time k+2k+2 for its own colour, eligible only on the validation machine, and
    19one unit job for each other colour \ell, eligible also on the edge selection machine of
    20{colour(v),}\{\mathrm{colour}(v), \ell\}. An edge {u,v}\{u,v\} with colour(u)<colour(v)\mathrm{colour}(u) < \mathrm{colour}(v)
    21 contributes one job on the edge selection machine of that colour
    22pair, spanning from just after uu's window to just before vv's. Each colour pair also
    23gets two *colour combination* jobs per vertex, which fill the rest of that machine's
    24timeline so that exactly one edge job can be selected on it.
    25
    26The weights are chosen in three tiers, c1c2c3c_1 \ll c_2 \ll c_3, so that a schedule of the
    27target weight is forced to select one edge per colour pair, and then forced to have those
    28(k2)\binom{k}{2} edges agree on one vertex per colour — which is the clique.
    29
    30# Formalization notes
    31
    32The construction is a total function on Multicoloured Clique instances, so the map it
    33induces is defined everywhere and the statements about it need no side condition.
    34
    35Jobs and machines are numbered rather than tagged, because an instance is something a
    36machine is handed and a word presents its jobs in an order. Machine (k2)\binom{k}{2} is the
    37validation machine; the edge selection machine of the colour pair {a,b}\{a, b\} with a<ba < b
    38is machine b(b1)/2+ab(b-1)/2 + a, the position of {a,b}\{a,b\} in the enumeration of pairs by
    39larger element then smaller. That numbering is a bijection onto (k2)\binom{k}{2}, so the
    40machine count is exactly the paper's.
    41
    42Jobs come in three blocks. Vertex job vk+vk + \ell is the job of vertex vv for colour
    43\ell. Then k2nk^2 n colour combination slots, slot nk+(ak+b)n+znk + (ak + b)n + z belonging to the
    44ordered colour pair (a,b)(a,b) and the vertex zz. Then one slot per oriented edge.
    45
    46The combination block is indexed by *all* ordered colour pairs, not only the admissible
    47ones, because a closed-form index is what a machine can compute: recovering (a,b,z)(a, b, z)
    48from a slot is two divisions, whereas enumerating only the admissible pairs would require
    49a search. A slot whose pair is inadmissible — aba \ge b, or zz coloured neither aa nor
    50bb — carries an *inert* job: weight zero and no eligible machine at all, so no feasible
    51schedule can place it and no schedule's weight can mention it. Inert jobs therefore
    52change neither side of the correctness statement, and there are only k2nk^2 n of them.
    53
    54The edge block cannot be padded the same way. A slot for every pair of vertices would be
    55n2n^2 jobs, and the word the reduction reads has length Θ(n+m)\Theta(n + m); a reduction
    56whose running time is linear in its input cannot write more than that, so a graph with
    57few edges would put the bound out of reach. The edges are therefore enumerated, and there
    58is exactly one slot per edge.
    59
    60Two details are done slightly differently from the paper. The paper gives the edge job of
    61{u,v}\{u, v\}, with colour(u)=<=colour(v)\mathrm{colour}(u) = \ell < \ell' = \mathrm{colour}(v), the processing
    62time (k+2)(π(v)π(u))+(k+2)(\pi(v) - \pi(u)) - \ell + \ell'; here it is one unit shorter,
    63(k+2)(π(v)π(u))+1(k+2)(\pi(v) - \pi(u)) - \ell + \ell' - 1. With the paper's formula the edge job would
    64start one unit before the job ju()j_u^{(\ell')} ends and the two would conflict; with the
    65shorter one the five jobs that Lemma 1 places on an edge selection machine — the two colour
    66combination jobs, ju()j_u^{(\ell')}, the edge job and jv()j_v^{(\ell)} — occupy consecutive
    67intervals, which is what the paper's Figure 1 shows, and Lemma 1's schedule is feasible.
    68Colours are numbered 0,,k10, \dots, k-1 rather than 1,,k1, \dots, k. With colours from 11 the
    69colour combination job of the π\pi-first vertex for the pair (1,k)(1, k) has processing
    70time (k+2)1k2=0(k+2) \cdot 1 - k - 2 = 0; from 00 every processing time is positive. Neither
    71change affects the theorem: the weights, the machines and the argument are the paper's.
    72
    73Processing times and deadlines are clamped, exactly as in Construction 2: the raw formulas
    74satisfy 0<pd0 < p \le d on every admissible slot, and the clamp is what discharges the two
    75standing conventions without a hypothesis on slots where they are not defined. On an
    76admissible slot the clamp is inactive.
    77
    78The order π\pi is not a parameter but a definition: vertices are ranked by colour, ties
    79broken by index. The paper takes any order refining the colour order and the argument uses
    80nothing else about it; fixing one keeps the construction a function of its input alone.
    81-/
    82
    83namespace Lax470956.Construction1
    84
    85open Lax470956.MulticolouredClique
    86
    87variable (G : MulticolouredClique.Instance)
    88
    89/-- The number of vertices. -/
    90abbrev nVert : ℕ := G.vertices
    91
    92/-- The number of colours, the parameter. -/
    93abbrev nCol : ℕ := G.colours
    94
    95/-- The paper's order `<π`, as the position it assigns: vertices ranked by colour, ties
    96broken by index, counting from one. -/
    97noncomputable def rank (v : Fin G.vertices) : ℕ :=
    98 1 + (Finset.univ.filter fun u : Fin G.vertices =>
    99 (G.colour u : ℕ) < (G.colour v : ℕ) ∨
    100 ((G.colour u : ℕ) = (G.colour v : ℕ) ∧ (u : ℕ) < (v : ℕ))).card
    101
    102/-- The window length `K = k + 2` each vertex occupies. -/
    103abbrev K : ℕ := G.colours + 2
    104
    105/-- `c₁ = n + 1`: the weight of a vertex job for a colour other than its own. -/
    106def c1 : ℕ := G.vertices + 1
    107
    108/-- `c₂ = (k-1)·n·c₁ + n + 1`: above the total weight of every vertex job together. -/
    109def c2 : ℕ := (G.colours - 1) * G.vertices * c1 G + G.vertices + 1
    110
    111/-- `c₃ = (kn + k²n)·n·c₂ + 1`: above the total weight of every colour combination job
    112together. -/
    113def c3 : ℕ := (G.colours * G.vertices + G.colours ^ 2 * G.vertices) * G.vertices * c2 G + 1
    114
    115/-- The machine of the colour pair `{a, b}` with `a < b`: its position `b(b-1)/2 + a` in
    116the enumeration of pairs by larger element, then smaller, written with the binomial
    117coefficient it is. -/
    118def pairIdx (a b : ℕ) : ℕ := b.choose 2 + a
    119
    120/-- The validation machine. -/
    121abbrev validation : ℕ := G.colours.choose 2
    122
    123/-- One machine per colour pair, plus the validation machine. -/
    124def nMach : ℕ := G.colours.choose 2 + 1
    125
    126/-- The vertex jobs: one per vertex and colour. -/
    127abbrev nVJob : ℕ := G.vertices * G.colours
    128
    129/-- The colour combination slots: one per ordered colour pair and vertex. -/
    130abbrev nCJob : ℕ := G.colours * G.colours * G.vertices
    131
    132open Classical in
    133/-- The oriented edges of the graph, smaller colour first, in lexicographic order. This
    134is the enumeration the edge jobs are indexed by. There is one slot per edge and not one
    135per pair of vertices, because the word the reduction is handed lists the edges and a
    136reduction running in time linear in it cannot afford a slot for every pair. -/
    137noncomputable def edgeList : List (Fin G.vertices × Fin G.vertices) :=
    138 ((List.finRange G.vertices) ×ˢ (List.finRange G.vertices)).filter
    139 fun p => decide ((G.colour p.1 : ℕ) < (G.colour p.2 : ℕ) ∧ G.graph.Adj p.1 p.2)
    140
    141/-- The edge slots: one per oriented edge. -/
    142noncomputable abbrev nEJob : ℕ := (edgeList G).length
    143
    144/-- The jobs of the construction. -/
    145noncomputable def nJobs : ℕ := nVJob G + nCJob G + nEJob G
    146
    147variable {G}
    148
    149/-- The colour of vertex number `v`, as a number, and `0` when `v` is out of range. -/
    150noncomputable def col (v : ℕ) : ℕ :=
    151 if h : v < G.vertices then (G.colour ⟨v, h⟩ : ℕ) else 0
    152
    153/-- The position of vertex number `v`, and `0` when `v` is out of range. -/
    154noncomputable def pos (v : ℕ) : ℕ :=
    155 if h : v < G.vertices then rank G ⟨v, h⟩ else 0
    156
    157variable (G)
    158
    159-- A job index below `n·k` is a vertex job; the next `k²n` are colour combination slots
    160-- and the rest, one per edge, are edge slots.
    161
    162/-- The vertex of vertex job `j`. -/
    163def vjVert (j : ℕ) : ℕ := j / G.colours
    164
    165/-- The colour of vertex job `j`. -/
    166def vjCol (j : ℕ) : ℕ := j % G.colours
    167
    168/-- The smaller colour of colour combination slot `q`. -/
    169def cjA (q : ℕ) : ℕ := q / G.vertices / G.colours
    170
    171/-- The larger colour of colour combination slot `q`. -/
    172def cjB (q : ℕ) : ℕ := q / G.vertices % G.colours
    173
    174/-- The vertex of colour combination slot `q`. -/
    175def cjZ (q : ℕ) : ℕ := q % G.vertices
    176
    177/-- The first endpoint of edge slot `q`. -/
    178noncomputable def ejU (q : ℕ) : ℕ := (((edgeList G)[q]?).map fun p => (p.1 : ℕ)).getD 0
    179
    180/-- The second endpoint of edge slot `q`. -/
    181noncomputable def ejV (q : ℕ) : ℕ := (((edgeList G)[q]?).map fun p => (p.2 : ℕ)).getD 0
    182
    183/-- A colour combination slot carries a job when its pair is ordered and its vertex has
    184one of the two colours. -/
    185def CJobOk (q : ℕ) : Prop :=
    186 cjA G q < cjB G q ∧ cjB G q < G.colourscjZ G q < G.vertices
    187 (col (G := G) (cjZ G q) = cjA G q ∨ col (G := G) (cjZ G q) = cjB G q)
    188
    189/-- An edge slot carries a job when it names one of the enumerated edges. Every slot of
    190the edge block does, so the block has no inert slots; the condition is here because the
    191accessors below are total functions on slot numbers. -/
    192noncomputable def EJobOk (q : ℕ) : Prop := q < (edgeList G).length
    193
    194-- The raw formulas below are the paper's, with the edge job one unit shorter and colours
    195-- from zero, as the notes above say. An inert slot is given a unit job with no eligible
    196-- machine; on every admissible slot the clamp is inactive.
    197
    198open Classical in
    199/-- The paper's processing time of job `j`, before clamping. -/
    200noncomputable def rawProc (j : ℕ) : ℕ :=
    201 if j < nVJob G then
    202 (if vjCol G j = col (G := G) (vjVert G j) then K G else 1)
    203 else if j < nVJob G + nCJob G then
    204 let q := j - nVJob G
    205 if CJobOk G q then
    206 (if col (G := G) (cjZ G q) = cjA G q
    207 then K G * pos (G := G) (cjZ G q) - cjB G q - 2
    208 else K G * (G.vertices - pos (G := G) (cjZ G q)) + cjA G q + 2)
    209 else 1
    210 else
    211 let q := j - nVJob G - nCJob G
    212 if EJobOk G q then
    213 K G * (pos (G := G) (ejV G q) - pos (G := G) (ejU G q))
    214 - col (G := G) (ejU G q) + col (G := G) (ejV G q) - 1
    215 else 1
    216
    217open Classical in
    218/-- The paper's deadline of job `j`, before clamping. -/
    219noncomputable def rawDue (j : ℕ) : ℕ :=
    220 if j < nVJob G then
    221 (if vjCol G j = col (G := G) (vjVert G j)
    222 then K G * pos (G := G) (vjVert G j) + 1
    223 else K G * pos (G := G) (vjVert G j) - vjCol G j)
    224 else if j < nVJob G + nCJob G then
    225 let q := j - nVJob G
    226 if CJobOk G q then
    227 (if col (G := G) (cjZ G q) = cjA G q
    228 then K G * pos (G := G) (cjZ G q) - cjB G q - 1
    229 else K G * G.vertices + 2)
    230 else 1
    231 else
    232 let q := j - nVJob G - nCJob G
    233 if EJobOk G q then
    234 K G * pos (G := G) (ejV G q) - col (G := G) (ejU G q) - 1
    235 else 1
    236
    237/-- The processing time of job `j`, clamped so that `0 < p ≤ d` holds outright. -/
    238noncomputable def procOf (j : ℕ) : ℕ := max 1 (min (rawProc G j) (rawDue G j))
    239
    240/-- The deadline of job `j`, clamped so that `0 < p ≤ d` holds outright. -/
    241noncomputable def dueOf (j : ℕ) : ℕ := max 1 (rawDue G j)
    242
    243open Classical in
    244/-- The weight of job `j`. An inert slot has weight zero. -/
    245noncomputable def wtOf (j : ℕ) : ℕ :=
    246 if j < nVJob G then
    247 (if vjCol G j = col (G := G) (vjVert G j) then 1 else c1 G)
    248 else if j < nVJob G + nCJob G then
    249 let q := j - nVJob G
    250 if CJobOk G q then
    251 (if col (G := G) (cjZ G q) = cjA G q
    252 then c2 G * pos (G := G) (cjZ G q)
    253 else c2 G * (G.vertices - pos (G := G) (cjZ G q)))
    254 else 0
    255 else
    256 let q := j - nVJob G - nCJob G
    257 if EJobOk G q then
    258 c2 G * (pos (G := G) (ejV G q) - pos (G := G) (ejU G q)) + c3 G
    259 else 0
    260
    261open Classical in
    262/-- The machines eligible to run job `j`, as a list of machine numbers. An inert slot has
    263none, so no feasible schedule can place it. -/
    264noncomputable def eligOf (j : ℕ) : List ℕ :=
    265 if j < nVJob G then
    266 (if vjCol G j = col (G := G) (vjVert G j) then [validation G]
    267 else [validation G,
    268 pairIdx (min (vjCol G j) (col (G := G) (vjVert G j)))
    269 (max (vjCol G j) (col (G := G) (vjVert G j)))])
    270 else if j < nVJob G + nCJob G then
    271 let q := j - nVJob G
    272 if CJobOk G q then [pairIdx (cjA G q) (cjB G q)] else []
    273 else
    274 let q := j - nVJob G - nCJob G
    275 if EJobOk G q then
    276 [pairIdx (col (G := G) (ejU G q)) (col (G := G) (ejV G q))]
    277 else []
    278
    279lemma procOf_pos (j : ℕ) : 0 < procOf G j := by
    280 simp only [procOf]; omega
    281
    282lemma procOf_le_dueOf (j : ℕ) : procOf G j ≤ dueOf G j := by
    283 simp only [procOf, dueOf]; omega
    284
    285open Classical in
    286/-- **Construction 1.** The scheduling instance built from the Multicoloured Clique
    287instance `G`. -/
    288noncomputable def inst : Scheduling.Instance where
    289 jobs := nJobs G
    290 machines := nMach G
    291 p j := procOf G j
    292 d j := dueOf G j
    293 w j := wtOf G j
    294 eligible j := Finset.univ.filter fun i : Fin (nMach G) => (i : ℕ) ∈ eligOf G j
    295 p_pos j := procOf_pos G j
    296 p_le_d j := procOf_le_dueOf G j
    297
    298@[simp] lemma inst_jobs : (inst G).jobs = nJobs G := rfl
    299@[simp] lemma inst_machines : (inst G).machines = nMach G := rfl
    300
    301/-- **The threshold `W` of Lemmas 1 and 2.** -/
    302def targetWeight : ℕ :=
    303 G.colours.choose 2 * c3 G + G.colours.choose 2 * (G.vertices * c2 G) +
    304 (G.colours - 1) * G.vertices * c1 G + G.colours
    305
    306/-- Where job `j`'s block of eligible machines begins. -/
    307noncomputable def offOf (j : ℕ) : ℕ :=
    308 ((List.range j).map fun i => (eligOf G i).length).sum
    309
    310/-- The processing-time block. -/
    311noncomputable def procBlock : List ℕ := (List.range (nJobs G)).map (procOf G)
    312
    313/-- The deadline block. -/
    314noncomputable def dueBlock : List ℕ := (List.range (nJobs G)).map (dueOf G)
    315
    316/-- The weight block. -/
    317noncomputable def wtBlock : List ℕ := (List.range (nJobs G)).map (wtOf G)
    318
    319/-- The offset block, one entry per job and one more. -/
    320noncomputable def offBlock : List ℕ := (List.range (nJobs G + 1)).map (offOf G)
    321
    322/-- The target block: the eligible machines of each job in turn. -/
    323noncomputable def tgtBlock : List ℕ := (List.range (nJobs G)).flatMap (eligOf G)
    324
    325/-- **The word Construction 1 emits**: the instance, followed by the threshold. -/
    326noncomputable def emit : List ℕ :=
    327 ([nJobs G, nMach G] ++ procBlock G ++ dueBlock G ++ wtBlock G ++ offBlock G ++ tgtBlock G)
    328 ++ [targetWeight G]
    329
    330/-- **The emitted word presents the constructed instance and its threshold.** -/
    331axiom emit_encodes (G : MulticolouredClique.Instance) :
    332 Lax470956.InstanceEncoding.EncodesDecisionInstance (emit G) (inst G) (targetWeight G)
    333
    334/-- **The machine count.** The constructed instance has one machine per pair of colours
    335and one more, so its number of machines depends on the parameter alone. -/
    336axiom machines_eq (G : MulticolouredClique.Instance) : (inst G).machines = G.colours.choose 2 + 1
    337
    338/-- **Construction 1 is correct.** The graph has a multicoloured clique exactly when the
    339constructed instance admits a feasible schedule of weight at least `W`. -/
    340axiom correct (G : MulticolouredClique.Instance) :
    341 G.HasMulticolouredClique ↔ (inst G).HasWeight (targetWeight G)
    342
    343-- The construction as a map on words.
    344
    345/-- The word a malformed input is sent to: one job of weight one, no machine to run it
    346on, and the threshold one. No schedule reaches the threshold, so the word is a
    347no-instance, as the source problem says of a word that is not a graph. -/
    348def noWord : List ℕ := [1, 0, 1, 1, 1, 0, 0, 1]
    349
    350open Classical in
    351/-- **Construction 1 as a total map on words.** A word that does not encode a
    352Multicoloured Clique instance is sent to a fixed decision instance no schedule can
    353satisfy. A reduction is a function on all words, and the machine that computes it has to
    354decide which case it is in; making the diversion part of the map rather than a side
    355condition is what keeps the statements below free of hypotheses.
    356
    357The case split is on a proposition rather than on a decision procedure, and the instance
    358the word is read as is chosen rather than computed, so the map is `noncomputable` in
    359Lean. Nothing is lost on either count: a word determines its instance up to everything
    360the construction looks at, so the correctness statement below does not mention the choice;
    361what has to be computable is the machine program. -/
    362noncomputable def reduce (x : List ℕ) : List ℕ :=
    363 if h : ∃ G, MulticolouredClique.EncodesInstance x G then emit h.choose else noWord
    364
    365/-- **The reduction lands in the domain of the scheduling problem.** Every word it emits
    366presents an instance together with a threshold. -/
    367axiom reduce_maps (x : List ℕ) :
    368 reduce x ∈ Lax470956.InstanceEncoding.DecisionInstances
    369
    370/-- **The reduction is correct.** A word encodes a graph with a multicoloured clique
    371exactly when the word it is sent to presents an instance meeting its threshold.
    372
    373No well-formedness hypothesis is needed: a word that encodes no graph satisfies neither
    374side, the left because there is no graph to have a clique and the right because the word
    375it is sent to has a job it cannot run. -/
    376axiom reduce_correct (x : List ℕ) :
    377 (∃ G, MulticolouredClique.EncodesInstance x G ∧ G.HasMulticolouredClique) ↔
    378 ∃ I W, Lax470956.InstanceEncoding.EncodesDecisionInstance (reduce x) I W ∧
    379 I.HasWeight W
    380
    381/-- **The reduction raises the parameter by a function of it alone.** The number of
    382machines of the image is (k2)+1\binom{k}{2}+1, where kk — the parameter of the source — is
    383the last entry of the word. This is the inequality that makes the reduction a
    384parameterized one rather than merely a correct one. -/
    385axiom reduce_param (x : List ℕ) :
    386 Lax470956.InstanceEncoding.machineCount (reduce x) ≤ (x.getLast?.getD 0).choose 2 + 1
    387
    388end Lax470956.Construction1
    389
    Show ProofShow ProofShow ProofShow ProofShow ProofShow Proof
    Formalization notes

    The construction is a total function on Multicoloured Clique instances, so the map it induces is defined everywhere and the statements about it need no side condition.

    Jobs and machines are numbered rather than tagged, because an instance is something a machine is handed and a word presents its jobs in an order. Machine (k2)\binom{k}{2} is the validation machine; the edge selection machine of the colour pair {a,b}\{a, b\} with a<ba < b is machine b(b1)/2+ab(b-1)/2 + a, the position of {a,b}\{a,b\} in the enumeration of pairs by larger element then smaller. That numbering is a bijection onto (k2)\binom{k}{2}, so the machine count is exactly the paper's.

    Jobs come in three blocks. Vertex job vk+vk + \ell is the job of vertex vv for colour \ell. Then k2nk^2 n colour combination slots, slot nk+(ak+b)n+znk + (ak + b)n + z belonging to the ordered colour pair (a,b)(a,b) and the vertex zz. Then one slot per oriented edge.

    The combination block is indexed by all ordered colour pairs, not only the admissible ones, because a closed-form index is what a machine can compute: recovering (a,b,z)(a, b, z) from a slot is two divisions, whereas enumerating only the admissible pairs would require a search. A slot whose pair is inadmissible — aba \ge b, or zz coloured neither aa nor bb — carries an inert job: weight zero and no eligible machine at all, so no feasible schedule can place it and no schedule's weight can mention it. Inert jobs therefore change neither side of the correctness statement, and there are only k2nk^2 n of them.

    The edge block cannot be padded the same way. A slot for every pair of vertices would be n2n^2 jobs, and the word the reduction reads has length Θ(n+m)\Theta(n + m); a reduction whose running time is linear in its input cannot write more than that, so a graph with few edges would put the bound out of reach. The edges are therefore enumerated, and there is exactly one slot per edge.

    Two details are done slightly differently from the paper. The paper gives the edge job of {u,v}\{u, v\}, with colour(u)=<=colour(v)\mathrm{colour}(u) = \ell < \ell' = \mathrm{colour}(v), the processing time (k+2)(π(v)π(u))+(k+2)(\pi(v) - \pi(u)) - \ell + \ell'; here it is one unit shorter, (k+2)(π(v)π(u))+1(k+2)(\pi(v) - \pi(u)) - \ell + \ell' - 1. With the paper's formula the edge job would start one unit before the job ju()j_u^{(\ell')} ends and the two would conflict; with the shorter one the five jobs that Lemma 1 places on an edge selection machine — the two colour combination jobs, ju()j_u^{(\ell')}, the edge job and jv()j_v^{(\ell)} — occupy consecutive intervals, which is what the paper's Figure 1 shows, and Lemma 1's schedule is feasible. Colours are numbered 0,,k10, \dots, k-1 rather than 1,,k1, \dots, k. With colours from 11 the colour combination job of the π\pi-first vertex for the pair (1,k)(1, k) has processing time (k+2)1k2=0(k+2) \cdot 1 - k - 2 = 0; from 00 every processing time is positive. Neither change affects the theorem: the weights, the machines and the argument are the paper's.

    Processing times and deadlines are clamped, exactly as in Construction 2: the raw formulas satisfy 0<pd0 < p \le d on every admissible slot, and the clamp is what discharges the two standing conventions without a hypothesis on slots where they are not defined. On an admissible slot the clamp is inactive.

    The order π\pi is not a parameter but a definition: vertices are ranked by colour, ties broken by index. The paper takes any order refining the colour order and the argument uses nothing else about it; fixing one keeps the construction a function of its input alone.

    Discussion

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

    Loading discussion…