Theorem 5

Lax496464.Theorem5 · concepts/Lax496464/Theorem5.lean · lax-496464

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

    Theorem

    The problem admits a fully polynomial-time approximation scheme whenever one of the number of machines, the width and the largest processing time is bounded.

    Rounding the weights as in (8) leaves a threshold of order n2en^2 e to search, where ee is the reciprocal of the accuracy, so each of the three exact programs — the table of Section 3, the endpoint sweep and the profile sweep — becomes an approximation scheme whose running time is that of the program with WW replaced by n2en^2 e.

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

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

    1 rescale_approx proven

    2 theorem5_byMachines proven

    In the paper

    • page 7 of this submission's paper

    Lean source view on GitHub

    1import Lax496464.Fptas
    2
    3/-!
    4---
    5title: Theorem 5
    6type: theorem
    7---
    8The problem admits a fully polynomial-time approximation scheme whenever one of the
    9number of machines, the width and the largest processing time is bounded.
    10
    11Rounding the weights as in (8) leaves a threshold of order n2en^2 e to search, where ee is
    12the reciprocal of the accuracy, so each of the three exact programs — the table of
    13Section 3, the endpoint sweep and the profile sweep — becomes an approximation scheme
    14whose running time is that of the program with WW replaced by n2en^2 e.
    15
    16# Formalization Notes
    17
    18Four statements. The first is the rounding argument itself, the chain of inequalities (8),
    19which is where the approximation guarantee comes from and which says nothing about any
    20machine. The other three are the schemes, one per program, differing only in the factor
    21each contributes: the
    22nmn^m of the second theorem, the 2ω2^\omega of the first half of the third, and the
    23mqmax⁡m^{q_{\max}} of its second half. In each the threshold is gone, replaced by the n2en^2 e
    24that the rounding leaves, which is what makes the scheme fully polynomial in 1/ϵ1/\epsilon.
    25
    26The guarantee is the one an approximation scheme gives, so the statements are about a
    27machine that halts within a bound having written *some* acceptable answer, rather than
    28about one computing a function.
    29
    30The rounding argument assumes what Section 7 assumes of its input: that there is a machine
    31to run a job on, and that every job can be preprocessed on its own, pj≤sjp_j \le s_j, jobs
    32failing which are discarded. Both are needed, and the chain is false without them — an
    33instance whose heaviest job cannot be scheduled has wmax⁡>OPTw_{\max} > \mathrm{OPT}, and the
    34chain, which ends by replacing wmax⁡w_{\max} by OPT\mathrm{OPT}, has nothing to end at.
    35
    36None of the three bounds is polynomial in the input alone: each carries the factor its
    37program carries, and what the theorem says is that the scheme is fully polynomial once
    38that factor is a constant. Stating the factor explicitly, rather than fixing the
    39parameter and hiding it in a constant, is what keeps the three statements comparable to
    40the theorems they come from.
    41
    42The domain of each scheme also asks that the total weight of the jobs fit a word with room
    43for the constant, `c · ∑ wⱼ ≤ 2^w`: the scheme writes a number that a feasible set reaches,
    44which can be as large as the total weight, and the entries of the word are bounded
    45individually by the fitting condition but their sum is not, so without this clause an
    46instance of many heavy jobs has answers that no machine of that word length can write. The
    47factor `c` is the same constant as in the running time: the machine's memory layout needs
    48every value it writes to stay below a fixed fraction of `2^w`. Positive processing times are asked for as in the exact
    49programs the schemes are built from: the paper's standing assumption for the recursions behind
    50them.
    51
    52What a scheme delivers is a number reached by a feasible set, not the exact weight of a set it
    53has in hand; see `Delivers`. That is what the rounding argument supports: the optimum for the
    54rounded weights gives a set whose true weight is within the guarantee, and the number written
    55is that weight less the rounding loss, which the set reaches.
    56-/
    57
    58namespace Lax496464.Theorem5
    59
    60open Lax496464.WordEncoding Lax496464.Problems Lax496464.ParameterizedComplexity
    61open Lax496464.Fptas Lax496464.FlowShop Lax496464.FlowShop.Instance
    62open Lax808846.Ram
    63
    64/-- **Chain (8).** If `e · k · n ≤ w_max` and `Zs` is optimal for the weights rounded by
    65`k`, then `Zs` is within a factor `1 − 1/e` of the true optimum. -/
    66axiom rescale_approx (I : Instance) {e k : ℕ} (he : 1 ≤ e) (hk : 1 ≤ k)
    67 (hm : 0 < I.machines) (hpre : ∀ j : I.Job, (I.p j : ℤ) ≤ s j)
    68 (hkn : e * k * I.jobs ≤ wmax I) (Zs : Finset I.Job) (hZs : Feasible I Zs)
    69 (hopt : ∀ Z : Finset I.Job, Feasible I Z →
    70 weight (rescale I k) Z ≤ weight (rescale I k) Zs) :
    71 (e - 1) * optimum I ≤ e * weight I Zs
    72
    73/-- **Theorem 5, from the table of Section 3.** An approximation scheme running within
    74`c · (n+1)² · (e+1) · (n+1)^m` instructions, plus the cost of sorting. -/
    75axiom theorem5_byMachines :
    76 ∃ (prog : Program) (c : ℕ), ∀ w : ℕ,
    77 ApproximatesInTime w prog
    78 {x | x ∈ ApproxInstances ∧ Fits c w x ∧
    79 c * ((List.range (jobCount x)).map (wt x)).sum ≤ 2 ^ w ∧
    80 (∀ j < jobCount x, 0 < procTime x j) ∧
    81 c * (jobCount x + 1) ^ 2 * (threshold x + 1) *
    82 (jobCount x + 1) ^ machineCount x ≤ 2 ^ w}
    83 (fun x => c * (jobCount x + 1) ^ 2 * (threshold x + 1) *
    84 (jobCount x + 1) ^ machineCount x + c * sortCost x)
    85
    86/-- **Theorem 5, from the endpoint sweep.** An approximation scheme running within
    87`c · (n+1)² · (e+1) · 2^ω · (n+1)` instructions, plus the cost of sorting. -/
    88axiom theorem5_byWidth :
    89 ∃ (prog : Program) (c : ℕ), ∀ w : ℕ,
    90 ApproximatesInTime w prog
    91 {x | x ∈ ApproxInstances ∧ Fits c w x ∧
    92 c * ((List.range (jobCount x)).map (wt x)).sum ≤ 2 ^ w ∧
    93 (∀ j < jobCount x, 0 < procTime x j) ∧
    94 c * (jobCount x + 1) ^ 2 * (threshold x + 1) * 2 ^ widthOf x *
    95 (jobCount x + 1) ≤ 2 ^ w}
    96 (fun x => c * (jobCount x + 1) ^ 2 * (threshold x + 1) * 2 ^ widthOf x *
    97 (jobCount x + 1) + c * sortCost x)
    98
    99/-- **Theorem 5, from the profile sweep.** An approximation scheme running within
    100`c · (n+1)² · (e+1) · (m+1)^q_max · (n+1)` instructions, plus the cost of sorting. -/
    101axiom theorem5_byQmax :
    102 ∃ (prog : Program) (c : ℕ), ∀ w : ℕ,
    103 ApproximatesInTime w prog
    104 {x | x ∈ ApproxInstances ∧ Fits c w x ∧
    105 c * ((List.range (jobCount x)).map (wt x)).sum ≤ 2 ^ w ∧
    106 (∀ j < jobCount x, 0 < procTime x j) ∧
    107 c * (jobCount x + 1) ^ 2 * (threshold x + 1) *
    108 (machineCount x + 1) ^ qmaxOf x * (jobCount x + 1) ≤ 2 ^ w}
    109 (fun x => c * (jobCount x + 1) ^ 2 * (threshold x + 1) *
    110 (machineCount x + 1) ^ qmaxOf x * (jobCount x + 1) + c * sortCost x)
    111
    112end Lax496464.Theorem5
    113
    Show ProofShow ProofShow ProofShow Proof
    Formalization Notes

    Four statements. The first is the rounding argument itself, the chain of inequalities (8), which is where the approximation guarantee comes from and which says nothing about any machine. The other three are the schemes, one per program, differing only in the factor each contributes: the nmn^m of the second theorem, the 2ω2^\omega of the first half of the third, and the mqmax⁡m^{q_{\max}} of its second half. In each the threshold is gone, replaced by the n2en^2 e that the rounding leaves, which is what makes the scheme fully polynomial in 1/ϵ1/\epsilon.

    The guarantee is the one an approximation scheme gives, so the statements are about a machine that halts within a bound having written some acceptable answer, rather than about one computing a function.

    The rounding argument assumes what Section 7 assumes of its input: that there is a machine to run a job on, and that every job can be preprocessed on its own, pj≤sjp_j \le s_j, jobs failing which are discarded. Both are needed, and the chain is false without them — an instance whose heaviest job cannot be scheduled has wmax⁡>OPTw_{\max} > \mathrm{OPT}, and the chain, which ends by replacing wmax⁡w_{\max} by OPT\mathrm{OPT}, has nothing to end at.

    None of the three bounds is polynomial in the input alone: each carries the factor its program carries, and what the theorem says is that the scheme is fully polynomial once that factor is a constant. Stating the factor explicitly, rather than fixing the parameter and hiding it in a constant, is what keeps the three statements comparable to the theorems they come from.

    The domain of each scheme also asks that the total weight of the jobs fit a word with room for the constant, c⋅∑wj≤2wc · ∑ wⱼ ≤ 2^w: the scheme writes a number that a feasible set reaches, which can be as large as the total weight, and the entries of the word are bounded individually by the fitting condition but their sum is not, so without this clause an instance of many heavy jobs has answers that no machine of that word length can write. The factor cc is the same constant as in the running time: the machine's memory layout needs every value it writes to stay below a fixed fraction of 2w2^w. Positive processing times are asked for as in the exact programs the schemes are built from: the paper's standing assumption for the recursions behind them.

    What a scheme delivers is a number reached by a feasible set, not the exact weight of a set it has in hand; see DeliversDelivers. That is what the rounding argument supports: the optimum for the rounded weights gives a set whose true weight is within the guarantee, and the number written is that weight less the rounding loss, which the set reaches.

    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

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

    Loading discussion…