Construction 1
Lax470956.Construction1 · concepts/Lax470956/Construction1.lean · lax-470956
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The scheduling instance built from a Multicoloured Clique instance. There is one edge selection machine for each of the 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 that refines the colour order, each vertex owning a window of length . A vertex contributes one job of processing time for its own colour, eligible only on the validation machine, and one unit job for each other colour , eligible also on the edge selection machine of . An edge with contributes one job on the edge selection machine of that colour pair, spanning from just after 's window to just before '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, , so that a schedule of the target weight is forced to select one edge per colour pair, and then forced to have those edges agree on one vertex per colour — which is the clique.
Concept map
Evidence
This concept declares 6 statements. Each proof establishes one of them relative to its assumptions.
1 correct proven
2 emit_encodes proven
3 machines_eq proven
4 reduce_correct proven
5 reduce_maps proven
6 reduce_param proven
Lean source view on GitHub
| 1 | import Lax470956.MulticolouredClique |
| 2 | import Lax470956.Scheduling |
| 3 | import Lax470956.InstanceEncoding |
| 4 | import Mathlib.Data.Nat.Choose.Basic |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Construction 1 |
| 9 | type: definition |
| 10 | --- |
| 11 | The scheduling instance built from a Multicoloured Clique instance. There is one |
| 12 | *edge selection machine* for each of the 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 | |
| 16 | Vertices are laid out along the time axis in an order that refines the colour |
| 17 | order, each vertex owning a window of length . A vertex contributes one job of |
| 18 | processing time for its own colour, eligible only on the validation machine, and |
| 19 | one unit job for each other colour , eligible also on the edge selection machine of |
| 20 | . An edge with |
| 21 | contributes one job on the edge selection machine of that colour |
| 22 | pair, spanning from just after 's window to just before 's. Each colour pair also |
| 23 | gets two *colour combination* jobs per vertex, which fill the rest of that machine's |
| 24 | timeline so that exactly one edge job can be selected on it. |
| 25 | |
| 26 | The weights are chosen in three tiers, , so that a schedule of the |
| 27 | target weight is forced to select one edge per colour pair, and then forced to have those |
| 28 | edges agree on one vertex per colour — which is the clique. |
| 29 | |
| 30 | # Formalization notes |
| 31 | |
| 32 | The construction is a total function on Multicoloured Clique instances, so the map it |
| 33 | induces is defined everywhere and the statements about it need no side condition. |
| 34 | |
| 35 | Jobs and machines are numbered rather than tagged, because an instance is something a |
| 36 | machine is handed and a word presents its jobs in an order. Machine is the |
| 37 | validation machine; the edge selection machine of the colour pair with |
| 38 | is machine , the position of in the enumeration of pairs by |
| 39 | larger element then smaller. That numbering is a bijection onto , so the |
| 40 | machine count is exactly the paper's. |
| 41 | |
| 42 | Jobs come in three blocks. Vertex job is the job of vertex for colour |
| 43 | . Then colour combination slots, slot belonging to the |
| 44 | ordered colour pair and the vertex . Then one slot per oriented edge. |
| 45 | |
| 46 | The combination block is indexed by *all* ordered colour pairs, not only the admissible |
| 47 | ones, because a closed-form index is what a machine can compute: recovering |
| 48 | from a slot is two divisions, whereas enumerating only the admissible pairs would require |
| 49 | a search. A slot whose pair is inadmissible — , or coloured neither nor |
| 50 | — carries an *inert* job: weight zero and no eligible machine at all, so no feasible |
| 51 | schedule can place it and no schedule's weight can mention it. Inert jobs therefore |
| 52 | change neither side of the correctness statement, and there are only of them. |
| 53 | |
| 54 | The edge block cannot be padded the same way. A slot for every pair of vertices would be |
| 55 | jobs, and the word the reduction reads has length ; a reduction |
| 56 | whose running time is linear in its input cannot write more than that, so a graph with |
| 57 | few edges would put the bound out of reach. The edges are therefore enumerated, and there |
| 58 | is exactly one slot per edge. |
| 59 | |
| 60 | Two details are done slightly differently from the paper. The paper gives the edge job of |
| 61 | , with , the processing |
| 62 | time ; here it is one unit shorter, |
| 63 | . With the paper's formula the edge job would |
| 64 | start one unit before the job ends and the two would conflict; with the |
| 65 | shorter one the five jobs that Lemma 1 places on an edge selection machine — the two colour |
| 66 | combination jobs, , the edge job and — occupy consecutive |
| 67 | intervals, which is what the paper's Figure 1 shows, and Lemma 1's schedule is feasible. |
| 68 | Colours are numbered rather than . With colours from the |
| 69 | colour combination job of the -first vertex for the pair has processing |
| 70 | time ; from every processing time is positive. Neither |
| 71 | change affects the theorem: the weights, the machines and the argument are the paper's. |
| 72 | |
| 73 | Processing times and deadlines are clamped, exactly as in Construction 2: the raw formulas |
| 74 | satisfy on every admissible slot, and the clamp is what discharges the two |
| 75 | standing conventions without a hypothesis on slots where they are not defined. On an |
| 76 | admissible slot the clamp is inactive. |
| 77 | |
| 78 | The order is not a parameter but a definition: vertices are ranked by colour, ties |
| 79 | broken by index. The paper takes any order refining the colour order and the argument uses |
| 80 | nothing else about it; fixing one keeps the construction a function of its input alone. |
| 81 | -/ |
| 82 | |
| 83 | namespace Lax470956.Construction1 |
| 84 | |
| 85 | open Lax470956.MulticolouredClique |
| 86 | |
| 87 | variable (G : MulticolouredClique.Instance) |
| 88 | |
| 89 | /-- The number of vertices. -/ |
| 90 | abbrev nVert : ℕ := G.vertices |
| 91 | |
| 92 | /-- The number of colours, the parameter. -/ |
| 93 | abbrev nCol : ℕ := G.colours |
| 94 | |
| 95 | /-- The paper's order `<π`, as the position it assigns: vertices ranked by colour, ties |
| 96 | broken by index, counting from one. -/ |
| 97 | noncomputable 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. -/ |
| 103 | abbrev K : ℕ := G.colours + 2 |
| 104 | |
| 105 | /-- `c₁ = n + 1`: the weight of a vertex job for a colour other than its own. -/ |
| 106 | def c1 : ℕ := G.vertices + 1 |
| 107 | |
| 108 | /-- `c₂ = (k-1)·n·c₁ + n + 1`: above the total weight of every vertex job together. -/ |
| 109 | def 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 |
| 112 | together. -/ |
| 113 | def 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 |
| 116 | the enumeration of pairs by larger element, then smaller, written with the binomial |
| 117 | coefficient it is. -/ |
| 118 | def pairIdx (a b : ℕ) : ℕ := b.choose 2 + a |
| 119 | |
| 120 | /-- The validation machine. -/ |
| 121 | abbrev validation : ℕ := G.colours.choose 2 |
| 122 | |
| 123 | /-- One machine per colour pair, plus the validation machine. -/ |
| 124 | def nMach : ℕ := G.colours.choose 2 + 1 |
| 125 | |
| 126 | /-- The vertex jobs: one per vertex and colour. -/ |
| 127 | abbrev nVJob : ℕ := G.vertices * G.colours |
| 128 | |
| 129 | /-- The colour combination slots: one per ordered colour pair and vertex. -/ |
| 130 | abbrev nCJob : ℕ := G.colours * G.colours * G.vertices |
| 131 | |
| 132 | open Classical in |
| 133 | /-- The oriented edges of the graph, smaller colour first, in lexicographic order. This |
| 134 | is the enumeration the edge jobs are indexed by. There is one slot per edge and not one |
| 135 | per pair of vertices, because the word the reduction is handed lists the edges and a |
| 136 | reduction running in time linear in it cannot afford a slot for every pair. -/ |
| 137 | noncomputable 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. -/ |
| 142 | noncomputable abbrev nEJob : ℕ := (edgeList G).length |
| 143 | |
| 144 | /-- The jobs of the construction. -/ |
| 145 | noncomputable def nJobs : ℕ := nVJob G + nCJob G + nEJob G |
| 146 | |
| 147 | variable {G} |
| 148 | |
| 149 | /-- The colour of vertex number `v`, as a number, and `0` when `v` is out of range. -/ |
| 150 | noncomputable 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. -/ |
| 154 | noncomputable def pos (v : ℕ) : ℕ := |
| 155 | if h : v < G.vertices then rank G ⟨v, h⟩ else 0 |
| 156 | |
| 157 | variable (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`. -/ |
| 163 | def vjVert (j : ℕ) : ℕ := j / G.colours |
| 164 | |
| 165 | /-- The colour of vertex job `j`. -/ |
| 166 | def vjCol (j : ℕ) : ℕ := j % G.colours |
| 167 | |
| 168 | /-- The smaller colour of colour combination slot `q`. -/ |
| 169 | def cjA (q : ℕ) : ℕ := q / G.vertices / G.colours |
| 170 | |
| 171 | /-- The larger colour of colour combination slot `q`. -/ |
| 172 | def cjB (q : ℕ) : ℕ := q / G.vertices % G.colours |
| 173 | |
| 174 | /-- The vertex of colour combination slot `q`. -/ |
| 175 | def cjZ (q : ℕ) : ℕ := q % G.vertices |
| 176 | |
| 177 | /-- The first endpoint of edge slot `q`. -/ |
| 178 | noncomputable def ejU (q : ℕ) : ℕ := (((edgeList G)[q]?).map fun p => (p.1 : ℕ)).getD 0 |
| 179 | |
| 180 | /-- The second endpoint of edge slot `q`. -/ |
| 181 | noncomputable 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 |
| 184 | one of the two colours. -/ |
| 185 | def CJobOk (q : ℕ) : Prop := |
| 186 | cjA G q < cjB G q ∧ cjB G q < G.colours ∧ cjZ 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 |
| 190 | the edge block does, so the block has no inert slots; the condition is here because the |
| 191 | accessors below are total functions on slot numbers. -/ |
| 192 | noncomputable 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 | |
| 198 | open Classical in |
| 199 | /-- The paper's processing time of job `j`, before clamping. -/ |
| 200 | noncomputable 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 | |
| 217 | open Classical in |
| 218 | /-- The paper's deadline of job `j`, before clamping. -/ |
| 219 | noncomputable 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. -/ |
| 238 | noncomputable 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. -/ |
| 241 | noncomputable def dueOf (j : ℕ) : ℕ := max 1 (rawDue G j) |
| 242 | |
| 243 | open Classical in |
| 244 | /-- The weight of job `j`. An inert slot has weight zero. -/ |
| 245 | noncomputable 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 | |
| 261 | open Classical in |
| 262 | /-- The machines eligible to run job `j`, as a list of machine numbers. An inert slot has |
| 263 | none, so no feasible schedule can place it. -/ |
| 264 | noncomputable 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 | |
| 279 | lemma procOf_pos (j : ℕ) : 0 < procOf G j := by |
| 280 | simp only [procOf]; omega |
| 281 | |
| 282 | lemma procOf_le_dueOf (j : ℕ) : procOf G j ≤ dueOf G j := by |
| 283 | simp only [procOf, dueOf]; omega |
| 284 | |
| 285 | open Classical in |
| 286 | /-- **Construction 1.** The scheduling instance built from the Multicoloured Clique |
| 287 | instance `G`. -/ |
| 288 | noncomputable 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.** -/ |
| 302 | def 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. -/ |
| 307 | noncomputable def offOf (j : ℕ) : ℕ := |
| 308 | ((List.range j).map fun i => (eligOf G i).length).sum |
| 309 | |
| 310 | /-- The processing-time block. -/ |
| 311 | noncomputable def procBlock : List ℕ := (List.range (nJobs G)).map (procOf G) |
| 312 | |
| 313 | /-- The deadline block. -/ |
| 314 | noncomputable def dueBlock : List ℕ := (List.range (nJobs G)).map (dueOf G) |
| 315 | |
| 316 | /-- The weight block. -/ |
| 317 | noncomputable def wtBlock : List ℕ := (List.range (nJobs G)).map (wtOf G) |
| 318 | |
| 319 | /-- The offset block, one entry per job and one more. -/ |
| 320 | noncomputable def offBlock : List ℕ := (List.range (nJobs G + 1)).map (offOf G) |
| 321 | |
| 322 | /-- The target block: the eligible machines of each job in turn. -/ |
| 323 | noncomputable def tgtBlock : List ℕ := (List.range (nJobs G)).flatMap (eligOf G) |
| 324 | |
| 325 | /-- **The word Construction 1 emits**: the instance, followed by the threshold. -/ |
| 326 | noncomputable 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.** -/ |
| 331 | axiom 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 |
| 335 | and one more, so its number of machines depends on the parameter alone. -/ |
| 336 | axiom 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 |
| 339 | constructed instance admits a feasible schedule of weight at least `W`. -/ |
| 340 | axiom 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 |
| 346 | on, and the threshold one. No schedule reaches the threshold, so the word is a |
| 347 | no-instance, as the source problem says of a word that is not a graph. -/ |
| 348 | def noWord : List ℕ := [1, 0, 1, 1, 1, 0, 0, 1] |
| 349 | |
| 350 | open Classical in |
| 351 | /-- **Construction 1 as a total map on words.** A word that does not encode a |
| 352 | Multicoloured Clique instance is sent to a fixed decision instance no schedule can |
| 353 | satisfy. A reduction is a function on all words, and the machine that computes it has to |
| 354 | decide which case it is in; making the diversion part of the map rather than a side |
| 355 | condition is what keeps the statements below free of hypotheses. |
| 356 | |
| 357 | The case split is on a proposition rather than on a decision procedure, and the instance |
| 358 | the word is read as is chosen rather than computed, so the map is `noncomputable` in |
| 359 | Lean. Nothing is lost on either count: a word determines its instance up to everything |
| 360 | the construction looks at, so the correctness statement below does not mention the choice; |
| 361 | what has to be computable is the machine program. -/ |
| 362 | noncomputable 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 |
| 366 | presents an instance together with a threshold. -/ |
| 367 | axiom 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 |
| 371 | exactly when the word it is sent to presents an instance meeting its threshold. |
| 372 | |
| 373 | No well-formedness hypothesis is needed: a word that encodes no graph satisfies neither |
| 374 | side, the left because there is no graph to have a clique and the right because the word |
| 375 | it is sent to has a job it cannot run. -/ |
| 376 | axiom 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 |
| 382 | machines of the image is , where — the parameter of the source — is |
| 383 | the last entry of the word. This is the inequality that makes the reduction a |
| 384 | parameterized one rather than merely a correct one. -/ |
| 385 | axiom reduce_param (x : List ℕ) : |
| 386 | Lax470956.InstanceEncoding.machineCount (reduce x) ≤ (x.getLast?.getD 0).choose 2 + 1 |
| 387 | |
| 388 | end Lax470956.Construction1 |
| 389 |
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 is the validation machine; the edge selection machine of the colour pair with is machine , the position of in the enumeration of pairs by larger element then smaller. That numbering is a bijection onto , so the machine count is exactly the paper's.
Jobs come in three blocks. Vertex job is the job of vertex for colour . Then colour combination slots, slot belonging to the ordered colour pair and the vertex . 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 from a slot is two divisions, whereas enumerating only the admissible pairs would require a search. A slot whose pair is inadmissible — , or coloured neither nor — 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 of them.
The edge block cannot be padded the same way. A slot for every pair of vertices would be jobs, and the word the reduction reads has length ; 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 , with , the processing time ; here it is one unit shorter, . With the paper's formula the edge job would start one unit before the job 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, , the edge job and — occupy consecutive intervals, which is what the paper's Figure 1 shows, and Lemma 1's schedule is feasible. Colours are numbered rather than . With colours from the colour combination job of the -first vertex for the pair has processing time ; from 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 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 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.
Used by
none
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments