BundleMVL-2 NP checker, step 2: checking that all rationals are in lowest terms is polynomial-time
ProvedMultiPurchase.Hardness.canon_filter_polytimemulti-purchasenp-completenesspolynomial-time
With the notation of Definitions.Def_MultiPurchase_Hardness_Checker (checker inputs and the condition ), there is a function on checker inputs that is computable in polynomial time by a Cook Turing machine, maps the empty word to the empty word, and satisfies, for every with ,
where says that for each of the rationals encoded in one has and .
This is the second check of the BundleMVL-2 verifier: instance codes write every rational as its normalized numerator and denominator, so a word is a code only if every pair is in lowest terms. The check amounts to polynomially many gcd computations on binary numbers.
Preamble
import Mathlib import Definitions.Def_CookPvsNP_defs import Definitions.Def_ProjSchedTW_Complexity_Encoding import Definitions.Def_MultiPurchase_Hardness_Model import Definitions.Def_MultiPurchase_Hardness_Checker
Formal statement
namespace MultiPurchase.Hardness
open CookPvsNP ProjSchedTW.Complexity
open Classical in
theorem canon_filter_polytime :
∃ g : List (Option (BSym ⊕ Bool)) → List (Option (BSym ⊕ Bool)),
PolyTimeComputable g ∧ g [] = [] ∧
∀ c d, ShapeOK c d → g (chkWord c d) = if CanonOK c then chkWord c d else [] := by sorry
end MultiPurchase.Hardness
Source
Tulabandhula, Sinha, Karra & Patidar, Multi-Purchase Behavior: Modeling, Estimation and Optimization, arXiv:2006.08055v2, p. 17, Theorem 1 (membership half: the decision version of (5) is in NP), eq. (4); polynomial-time computability as in S. Cook, The P versus NP problem (Clay Mathematics Institute), §1 and Definition 3