QSAT to Vertex-Cover-Member-Add construction
DefinitionVHC_VCMAcomplexitycomputational-social-choice
The graph built from a QSAT instance , with in DNF over and , used to show that Vertex-Cover-Member-Add is -hard. It adapts the construction in the proof of Theorem 3 of Fitzsimmons–Hemaspaandra–Hoover–Narváez to DNF terms of arbitrary width.
- For every variable and polarity there is a literal vertex , with an edge .
- There is a distinguished vertex .
- For every term of there is a clique on a vertex and one vertex per literal of . The vertex is adjacent to , and is adjacent to the literal vertex of the negation of the -th literal of .
- The addable vertices are for and , with an edge .
- The budget is and the target vertex is .
Vertices are natural numbers, distinguished by Nat.pair tags. inst ϕ is the instance of VHC.VCMemberAdd.
Definition code
import Definitions.Def_VHC_Elections
/-!
The instance of Vertex-Cover-Member-Add built from a QSAT₂ formula `∃x∀y ϕ(x, y)`, with `ϕ` in DNF
(after Fitzsimmons–Hemaspaandra–Hoover–Narváez, *Very Hard Electoral Control Problems*,
AAAI 2019, arXiv:1811.05438, Theorem 3, adapted to DNF terms of arbitrary width).
* For every variable `v` and polarity `b`, a literal vertex `litV v b`, with an edge
`litV v true – litV v false`.
* A distinguished vertex `hatV`.
* For every term `a` of `ϕ`, a clique on `dV a` and `cV a l` (one vertex per literal `l` of the
term); `dV a` is adjacent to `hatV`, and `cV a l` is adjacent to the literal vertex of the
*negation* of the `l`-th literal of the term.
* Addable vertices `primeV i b` (one per `∃`-variable `xᵢ` and polarity `b`), with an edge
`primeV i b – litV xᵢ b`.
* Budget `k = n`.
Vertices are natural numbers, distinguished by `Nat.pair` tags.
-/
namespace VHC.VCMA
open BudgetCoreExchange
/-- Codes of the variables of a DNF formula. -/
def varCode {n m : ℕ} : Fin n ⊕ Fin m → ℕ
| .inl i => Nat.pair 0 i
| .inr j => Nat.pair 1 j
def litV {n m : ℕ} (v : Fin n ⊕ Fin m) (b : Bool) : ℕ := Nat.pair 0 (Nat.pair (varCode v) b.toNat)
def hatV : ℕ := Nat.pair 1 0
def dV (a : ℕ) : ℕ := Nat.pair 2 a
def cV (a l : ℕ) : ℕ := Nat.pair 3 (Nat.pair a l)
def primeV (i : ℕ) (b : Bool) : ℕ := Nat.pair 4 (Nat.pair i b.toNat)
def vars (ϕ : DNF) : List (Fin ϕ.n ⊕ Fin ϕ.m) :=
(List.finRange ϕ.n).map Sum.inl ++ (List.finRange ϕ.m).map Sum.inr
def term (ϕ : DNF) (a : Fin ϕ.terms.length) : List (Lit ϕ.n ϕ.m) := ϕ.terms[a]
def gadgetV (ϕ : DNF) (a : Fin ϕ.terms.length) : List ℕ :=
dV a :: (List.range (term ϕ a).length).map (cV a)
def mainV (ϕ : DNF) : List ℕ :=
(vars ϕ).flatMap (fun v => [litV v true, litV v false]) ++ [hatV] ++
(List.finRange ϕ.terms.length).flatMap (gadgetV ϕ)
def primes (ϕ : DNF) : List ℕ :=
(List.finRange ϕ.n).flatMap (fun (i : Fin ϕ.n) => [primeV (i : ℕ) true, primeV (i : ℕ) false])
def gadgetE (ϕ : DNF) (a : Fin ϕ.terms.length) : List (ℕ × ℕ) :=
(dV a, hatV) ::
(List.finRange (term ϕ a).length).flatMap (fun (l : Fin (term ϕ a).length) =>
(cV a l, dV a) :: (cV a l, litV (term ϕ a)[l].1 (!(term ϕ a)[l].2)) ::
((List.finRange (term ϕ a).length).filter (fun (l' : Fin (term ϕ a).length) => l < l')).map
(fun (l' : Fin (term ϕ a).length) => (cV a l, cV a (l' : ℕ))))
def edges (ϕ : DNF) : List (ℕ × ℕ) :=
(vars ϕ).map (fun v => (litV v true, litV v false)) ++
(List.finRange ϕ.n).flatMap (fun (i : Fin ϕ.n) =>
[(primeV (i : ℕ) true, litV (Sum.inl i : Fin ϕ.n ⊕ Fin ϕ.m) true),
(primeV (i : ℕ) false, litV (Sum.inl i : Fin ϕ.n ⊕ Fin ϕ.m) false)]) ++
(List.finRange ϕ.terms.length).flatMap (gadgetE ϕ)
/-- The Vertex-Cover-Member-Add instance built from a DNF formula. -/
def inst (ϕ : DNF) : List ℕ × List ℕ × List (ℕ × ℕ) × ℕ × ℕ :=
(mainV ϕ, primes ϕ, edges ϕ, ϕ.n, hatV)
end VHC.VCMA
Source
Fitzsimmons, Hemaspaandra, Hoover, Narváez, Very Hard Electoral Control Problems, AAAI 2019, https://arxiv.org/abs/1811.05438, Section 3, Theorem 3 (Vertex-Cover-Member-Add is Σ2p-complete) and its proof