Set splitting #
SetSplitting is the set-splitting decision problem (Garey and Johnson SP4; equivalently hypergraph
2-colorability): given a declared ground list ground : List ℕ and a family
sets : List (List ℕ), does ground.toFinset admit a bipartition (A, B) such that every subset
s ∈ sets intersects both A and B?
Reusing Cslib.Logic.PL.CNF.setSplittingCNF, every valid instance compiles in polynomial time
with clause width bounded by the maximum set size k and declared variable range |U|
(SetSplittingInstance.toDeclaredCNF), preserving the exact number of ordered splitting
bipartitions SetSplittingInstance.count.
Main definitions #
Cslib.Complexity.SetSplittingInstance,Cslib.Complexity.encSetSplitting: instances and binary encoding.Cslib.Complexity.SetSplitting: decision problem (SetSplitting ∈ NP encSetSplitting).Cslib.Complexity.SetSplittingInstance.Valid,Cslib.Complexity.SetSplittingInstance.validBool,Cslib.Complexity.SetSplittingInstance.maxSetSizeBool: validity and set-size guards.Cslib.Complexity.SetSplittingInstance.count: exact number of ordered splitting bipartitions.Cslib.Complexity.SetSplittingInstance.toCNF,Cslib.Complexity.SetSplittingInstance.toDeclaredCNF: width-≤ kCNF compilations on|U|variables.
Main results #
Cslib.Complexity.SetSplitting.mem_NP:SetSplitting ∈ NP encSetSplitting.Cslib.Complexity.SetSplittingInstance.toCNFEquiv,Cslib.Complexity.SetSplittingInstance.modelCountOn_toCNF,Cslib.Complexity.SetSplittingInstance.modelCountOn_toDeclaredCNF: exact model-count preservation (= x.count) with clause width≤ k.Cslib.Complexity.SetSplittingInstance.computableInPolyTime_toCNF,Cslib.Complexity.SetSplittingInstance.computableInPolyTime_toDeclaredCNF: polynomial-time compilations.
References #
Binary encoding of a set-splitting instance as its framed element list followed by its framed family of subsets.
Equivalent formulation in terms of ordered splitting bipartitions (A, B) of
x.ground.toFinset.
Polynomial-time subset verifier for SetSplitting.
Checking a candidate splitting subset is polynomial-time.
SetSplitting.verifier verifies SetSplitting with linear certificate length.
SetSplitting belongs to NP.
Executable check that every subset element lies in x.ground.
Executable guard checking x.Valid together with uniform subset size ≤ k.
maxSetSizeBool k decides x.Valid ∧ ∀ s ∈ x.sets, s.length ≤ k.
Checking maxSetSizeBool k is polynomial-time for each fixed k.
Number of ordered splitting bipartitions (A, B) of x.ground.toFinset.
The duplicate-free ground list preserving first occurrences.
Set-splitting CNF formula on the original variable names ℕ.
Dense declared-variable CNF compilation on n = |ground.toFinset| variables.
Every clause of x.toCNF has length at most k when every set in x.sets has length at most
k.
Every clause of x.toDeclaredCNF.formula has length at most k when every set has length at
most k.
x.toCNF has exactly 2 * x.sets.length clauses.
Explicit assignment bijection between models of x.toCNF on x.ground.toFinset and
ordered splitting bipartitions of x.ground.toFinset.
Exact model count of x.toCNF on x.ground.toFinset equals x.count.
Under x.Valid, idxOf maps every occurring variable of x.toCNF into
Finset.range x.distinctGround.length.
Exact model count of x.toDeclaredCNF on Finset.range |U| equals x.count.
Compiling x to x.toCNF is polynomial-time.
Compiling x to x.toDeclaredCNF is polynomial-time.