Bounding 2-SAT solutions by the number of independent sets #
Every edge of a 2-SAT instance on a simple graph G = (V, E) forbids at least one of the four
Boolean value pairs (b_u, b_v) ∈ Bool × Bool across its endpoints. Aligning polarities one vertex
at a time (Finset.card_union_add_card_inter) shows that the number of satisfying truth
assignments never exceeds G.indepSetCount, the number of independent sets of G (realized when
every edge forbids (true, true)).
Main definitions #
SimpleGraph.indepSetCount: the numberi(G)of independent sets of a finite simple graph.
Main results #
SimpleGraph.ncard_le_indepSetCount_of_forall_adj: any set of Boolean assignments forbidding at least one pair of values on every edge ofGhas cardinality at mostG.indepSetCount.SimpleGraph.indepSetCount_bot: the edgeless graph onVhas2 ^ |V|independent sets.SimpleGraph.indepSetCount_star: a star withdleaves has2 ^ d + 1independent sets.SimpleGraph.indepSetCount_pathGraph: then-vertex pathP_nhasF_{n + 2}independent sets.
The number i(G) of independent sets of a finite simple graph G. The finite vertex type
ensures that Set.ncard counts independent sets rather than returning 0 on an infinite family
(such as ∅ and all singletons).
Every finite simple graph has at least one independent set (∅), so 0 < G.indepSetCount.
2-SAT solutions are at most i(G). If for every adjacent pair G.Adj u w in a finite
simple graph G, at least one pair of Boolean values (bu, bw) is forbidden across S, then
S.ncard ≤ G.indepSetCount.
Exact independent-set counts on basic families #
The edgeless graph on a finite vertex type V has 2 ^ |V| independent sets.
Independent sets of a star (K_{1, d}). If every edge of G meets v₀ and v₀ is
adjacent to every other vertex, then G.indepSetCount = 2 ^ (|V| - 1) + 1.
Independent sets of a path (i(P_n) = F_{n + 2}). The n-vertex path pathGraph n has
Nat.fib (n + 2) independent sets (1, 2, 3, 5, 8, ... for n = 0, 1, 2, 3, 4, ...).