NP-hardness of a scheduling problem, and on a class of instances
Lax470956.NPHardness · concepts/Lax470956/NPHardness.lean · lax-470956
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A scheduling problem is NP-hard if every language in NP has a polynomial-time many-one reduction to it, the reduction's output being an instance in the binary encoding.
It is NP-hard on a class of instances if such a reduction exists whose output always lies in . When is a slice on which some parameter is bounded by an absolute constant, this is para-NP-hardness for that parameter: it rules out an algorithm running in time for every function , unless — a stronger and unconditional-in- conclusion than W[1]-hardness, which rules out fixed-parameter tractability only under .
Concept map
Lean source view on GitHub
| 1 | import Lax470956.BinaryEncoding |
| 2 | import Lax434930.NondeterministicPolynomialTime |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: NP-hardness of a scheduling problem, and on a class of instances |
| 7 | type: definition |
| 8 | --- |
| 9 | A scheduling problem is *NP-hard* if every language in NP has a polynomial-time many-one |
| 10 | reduction to it, the reduction's output being an instance in the binary encoding. |
| 11 | |
| 12 | It is *NP-hard on a class* of instances if such a reduction exists whose |
| 13 | output always lies in . When is a slice on which some parameter |
| 14 | is bounded by an absolute constant, this is *para-NP-hardness* for that parameter: it |
| 15 | rules out an algorithm running in time for *every* function |
| 16 | , unless — a stronger and unconditional-in- conclusion |
| 17 | than W[1]-hardness, which rules out fixed-parameter tractability only under |
| 18 | . |
| 19 | |
| 20 | # Formalization notes |
| 21 | |
| 22 | Hardness is defined by quantifying over NP, not against a fixed complete problem. NP is |
| 23 | available — `Lax434930` defines it — so the definition a textbook gives can be written |
| 24 | down, and there is no reason to substitute a reference problem for it as the |
| 25 | parameterized definition of this submission has to. |
| 26 | |
| 27 | The reduction's target is an instance rather than a word, with the encoding applied by |
| 28 | the definition. This keeps a statement about a problem from also being a statement about |
| 29 | which words are well-formed, and it matches how graph problems are stated elsewhere in |
| 30 | the archive. |
| 31 | |
| 32 | "NP-hard on a class" is one definition covering both a plain hardness claim, where the |
| 33 | class is everything, and a para-NP-hardness claim, where it is a bounded slice. Stating |
| 34 | the slice as a predicate on instances rather than as a bound on a parameter function |
| 35 | keeps it readable — "every emitted instance has and unit weights" is |
| 36 | what the reduction actually guarantees, and what a reader checks it against. |
| 37 | -/ |
| 38 | |
| 39 | namespace Lax470956.NPHardness |
| 40 | |
| 41 | open Lax470956.Scheduling Lax470956.BinaryEncoding |
| 42 | open Lax434930.PolynomialTime Lax434930.NondeterministicPolynomialTime |
| 43 | |
| 44 | /-- A property of scheduling instances: a decision problem on them. -/ |
| 45 | abbrev Problem := Instance → Prop |
| 46 | |
| 47 | /-- `Q` is **NP-hard**: every language in NP reduces to it in polynomial time. -/ |
| 48 | def NPHard (Q : Problem) : Prop := |
| 49 | ∀ A : Language, A ∈ NP → |
| 50 | ∃ f : Word → Instance, |
| 51 | Nonempty (Turing.TM2ComputableInPolyTime id encodeInstance f) ∧ |
| 52 | ∀ x, x ∈ A ↔ Q (f x) |
| 53 | |
| 54 | /-- `Q` is **NP-hard on `C`**: every language in NP reduces to it in polynomial time by a |
| 55 | reduction all of whose outputs lie in `C`. -/ |
| 56 | def NPHardOn (Q : Problem) (C : Instance → Prop) : Prop := |
| 57 | ∀ A : Language, A ∈ NP → |
| 58 | ∃ f : Word → Instance, |
| 59 | Nonempty (Turing.TM2ComputableInPolyTime id encodeInstance f) ∧ |
| 60 | ∀ x, C (f x) ∧ (x ∈ A ↔ Q (f x)) |
| 61 | |
| 62 | end Lax470956.NPHardness |
| 63 |
Formalization notes
Hardness is defined by quantifying over NP, not against a fixed complete problem. NP is available — defines it — so the definition a textbook gives can be written down, and there is no reason to substitute a reference problem for it as the parameterized definition of this submission has to.
The reduction's target is an instance rather than a word, with the encoding applied by the definition. This keeps a statement about a problem from also being a statement about which words are well-formed, and it matches how graph problems are stated elsewhere in the archive.
"NP-hard on a class" is one definition covering both a plain hardness claim, where the class is everything, and a para-NP-hardness claim, where it is a bounded slice. Stating the slice as a predicate on instances rather than as a bound on a parameter function keeps it readable — "every emitted instance has and unit weights" is what the reduction actually guarantees, and what a reader checks it against.
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments