Algorithm inputs
Lax213208.AlgorithmInput · concepts/Lax213208/AlgorithmInput.lean · lax-213208
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
An ordinary algorithm receives the instance's structural arena. A scheme receives the arena of , where the positive integer specifies accuracy . Only the integer is machine input.
Concept map
Lean source view on GitHub
| 1 | import Lax213208.OptimizationProblem |
| 2 | import Lax560851.StructuralCombinators |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Algorithm inputs |
| 7 | type: definition |
| 8 | --- |
| 9 | An ordinary algorithm receives the instance's structural arena. |
| 10 | A scheme receives the arena of , where the positive integer |
| 11 | specifies accuracy . Only the integer is machine input. |
| 12 | -/ |
| 13 | |
| 14 | namespace Lax213208.AlgorithmInput |
| 15 | |
| 16 | open OptimizationProblem |
| 17 | open Lax560851.WordArena Lax560851.StructuralCombinators |
| 18 | |
| 19 | variable {Instance Solution : Type*} |
| 20 | |
| 21 | def inputTape (problem : Problem Instance Solution) |
| 22 | (precision : Option ℕ) (x : Instance) : List ℕ := |
| 23 | match precision with |
| 24 | | none => inputWords problem x |
| 25 | | some k => (encode (prod nat problem.input) (k, x)).toInput |
| 26 | |
| 27 | end Lax213208.AlgorithmInput |
| 28 |
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments