L-reductions
Lax213208.LReduction · concepts/Lax213208/LReduction.lean · lax-213208
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
An L-reduction consists of polynomial-time instance and solution maps and positive constants . It maps valid instances and feasible solutions to valid instances and feasible solutions, and satisfies and .
Optima are required to be attained. The solution map receives both and ; its time is measured in their combined encoded size. Their word lists are paired by prefixing the length of the first list.
Concept map
Lean source view on GitHub
| 1 | import Lax213208.Approximation |
| 2 | import Lax213208.PolynomialComputation |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: L-reductions |
| 7 | type: definition |
| 8 | --- |
| 9 | An L-reduction consists of polynomial-time instance and solution maps and |
| 10 | positive constants . It maps valid instances and feasible solutions |
| 11 | to valid instances and feasible solutions, and satisfies |
| 12 | and |
| 13 | |
| 14 | . |
| 15 | |
| 16 | Optima are required to be attained. The solution map receives both |
| 17 | and ; its time is measured in their combined encoded size. Their word |
| 18 | lists are paired by prefixing the length of the first list. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax213208.LReduction |
| 22 | |
| 23 | open OptimizationProblem Approximation PolynomialComputation |
| 24 | |
| 25 | variable {SourceInstance SourceSolution TargetInstance TargetSolution : Type*} |
| 26 | |
| 27 | def solutionMapInput (source : Problem SourceInstance SourceSolution) |
| 28 | (target : Problem TargetInstance TargetSolution) |
| 29 | (xy : SourceInstance × TargetSolution) : List ℕ := |
| 30 | let first := inputWords source xy.1 |
| 31 | first.length :: (first ++ target.output xy.2) |
| 32 | |
| 33 | structure LReduction (source : Problem SourceInstance SourceSolution) |
| 34 | (target : Problem TargetInstance TargetSolution) |
| 35 | (sourceInputs : Set SourceInstance) (targetInputs : Set TargetInstance) where |
| 36 | instanceMap : SourceInstance → TargetInstance |
| 37 | solutionMap : SourceInstance → TargetSolution → SourceSolution |
| 38 | optimumFactor : ℝ |
| 39 | errorFactor : ℝ |
| 40 | optimumFactor_pos : 0 < optimumFactor |
| 41 | errorFactor_pos : 0 < errorFactor |
| 42 | instanceMap_polytime : |
| 43 | PolynomialTimeComputable (inputWords source) (inputWords target) instanceMap sourceInputs |
| 44 | solutionMap_polytime : |
| 45 | PolynomialTimeComputable (solutionMapInput source target) source.output |
| 46 | (fun xy => solutionMap xy.1 xy.2) |
| 47 | {xy | xy.1 ∈ sourceInputs ∧ target.feasible (instanceMap xy.1) xy.2} |
| 48 | maps_instances : ∀ x ∈ sourceInputs, instanceMap x ∈ targetInputs |
| 49 | maps_solutions : ∀ x ∈ sourceInputs, ∀ y, target.feasible (instanceMap x) y → |
| 50 | source.feasible x (solutionMap x y) |
| 51 | bounds : ∀ x ∈ sourceInputs, ∃ sourceOpt targetOpt : ℝ, |
| 52 | IsOptimalValue source x sourceOpt ∧ |
| 53 | IsOptimalValue target (instanceMap x) targetOpt ∧ |
| 54 | targetOpt ≤ optimumFactor * sourceOpt ∧ |
| 55 | ∀ y, target.feasible (instanceMap x) y → |
| 56 | |sourceOpt - source.value x (solutionMap x y)| ≤ |
| 57 | errorFactor * |targetOpt - target.value (instanceMap x) y| |
| 58 | |
| 59 | end Lax213208.LReduction |
| 60 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments