Documentation

CslibFrontier.Computability.Complexity.Classes.Selective.Ko

P-selective sets have polynomial advice: Ko's theorem #

Every P-selective set is in P/poly [Ko83]; see also the chapter Advice of Hemaspaandra and Torenvliet. Given a selector f for A, say that y covers x when f picks x from x and y, in one of the two orders; then x ∈ A whenever y ∈ A. The relation is total, so on the members of A of encoded length n it is a tournament. There are at most 2 ^ n such members, so at most n + 1 of them dominate: every member of length n is covered by one of them (Finset.exists_dominating_subset_of_card_lt_two_pow). Hence an instance of length n is in A exactly when it is covered by one of them (Cslib.Complexity.IsSelector.exists_advice).

The advice for length n is that list of at most n + 1 instances, each of encoded length n; with the list encoding Turing.MultiTapeTM.encList it takes at most (n + 1) * (2 * n + 1) bits, so O(n ^ 2) bits, which is Ko's P/quadratic bound (Cslib.Complexity.exists_advice_polyTime_of_mem_PSel). With this advice, a polynomial-time machine decides A by running the selector against each advice instance. This is the library's P/poly advice convention (Cslib.Circuits.Boolean.PPoly.of_advice), so every P-selective set is in PPolyOn (Cslib.Complexity.PSel_subset_PPolyOn).

Main results #

References #

theorem Cslib.Complexity.IsSelector.exists_advice {α : Type u_1} {A : Set α} {f : α → α → α} (hf : IsSelector A f) (enc : α ↪ List Bool) :
∃ (adv : ℕ → List α), ∀ (n : ℕ), (adv n).length ≤ n + 1 ∧ (∀ y ∈ adv n, y ∈ A ∧ (enc y).length = n) ∧ ∀ (x : α), (enc x).length = n → (x ∈ A ↔ ∃ y ∈ adv n, f x y = x ∨ f y x = x)

Ko's advice for a selector. If f is a selector for A, then for each length n some list of at most n + 1 members of A, each of encoded length n, decides membership in A at length n: an instance x of length n is in A exactly when f picks x from x and some y in the list, in one of the two orders.

theorem Cslib.Complexity.exists_advice_polyTime_of_mem_PSel {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ PSel enc) :
∃ (D : List α × α → Bool), Turing.MultiTapeTM.ComputableInPolyTime D (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encList enc) enc) Turing.MultiTapeTM.encBool ∧ ∃ (adv : ℕ → List α), (∀ (n : ℕ), ((Turing.MultiTapeTM.encList enc) (adv n)).length ≤ (n + 1) * (2 * n + 1)) ∧ ∀ (a : α), a ∈ A ↔ D (adv (enc a).length, a) = true

P-selective sets are in P/quadratic. A P-selective set is decided by a polynomial-time function D of the advice and the instance, with advice adv n for the instances of encoded length n taking at most (n + 1) * (2 * n + 1) bits: at most n + 1 instances of length n in the list encoding.

Ko's theorem. Every P-selective set is in P/poly [Ko83].