Polynomial-time satisfiability for a special case of Positive\(\wedge\)Negative

Marcel Wild
Department of Mathematical Sciences, University of Stellenbosch
Private Bag X1, Matieland 7602, South Africa


ABSTRACT: A Boolean function in CNF format is of type Positive\(\wedge\)Negative if each clause \(C\) is either positive (i.e. all literals of \(C\) are positive) or negative (i.e. all literals of \(C\) are negative). As is well known, deciding the satisfiability of such CNFs is NP-complete. We say that a CNF is of type DisjointPositive if its clauses are positive and mutually disjoint. Dually define DisjointNegative. It is shown that the satisfiability of CNFs of type DisjointPositive\(\;\wedge\;\)DisjointNegative can be decided in quadratic time. Moreover, the modelset can be output in polynomial total time. This is relevant since it affects not only the modelsets of CNFs of type Positive\(\wedge\)Negative, but more generally of type Horn\(\wedge\)AntiHorn. As to the latter CNFs, they e.g. occur in connection with the fixpoints of a Monotone Boolean Network.

Key words: Boolean CNF, Positive\(\wedge\)Negative, Horn\(\wedge\)AntiHorn, 3-CNF, polynomial time solvable, set-ideals intersecting set-filters, minimal hitting sets of hypergraphs, Ramsey numbers, fixpoints of Boolean Networks, compressed enumeration of modelsets

1 Introduction↩︎

We assume a basic familiarity with Boolean functions. Thus recall that clauses \(C\) are Boolean formulas of particular simplicity, i.e. by definition \(C\) is a disjunction of literals such as \(x_1\vee x_2\vee x_3\vee\overline{x}_4\). The length of a clause is the number of literals appearing in it. Recall that a Conjunctive Normal Form (CNF) is a conjunction of clauses such as \[(1)\quad (x_1\vee x_2\vee x_3\vee\overline{x}_4)\wedge (\overline{x}_2\vee x_4\vee\overline{x}_5\vee x_6)\;:=\;C_1\wedge C_2\] Let \(f:\{0,1\}^m\to\{0,1\}\) be any1 Boolean function. Then a bitstring, i.e. member \(y\in\{0,1\}^m\), is a model of \(f\) if \(f(y)=1\). We write \(Mod(f)\) for the set of all models. As is well known, if \(f\) is rendered by a CNF, then it is NP-complete to decide whether \(f\) is satisfiable (i.e. whether \(Mod(f)\neq\emptyset\)).

Recall from the Abstract that a clause is positive (negative) if all its literals are positive (negative). Further, a clause \(C\) is a Horn-clause (briefly: \(C\) is Horn), if it has at most one positive literal. Likewise \(C\) is AntiHorn if it has at most one negative literal (such as \(C_1\) in (1)). Observe that \(C_2\) in (1) is neither Horn nor AntiHorn. Going one level up, a CNF is a Horn-CNF if all its clauses are Horn. Likewise a CNF is a AntiHorn-CNF if all its clauses are AntiHorn. As is well known, the satisfiability of either type can be decided in linear time. A Horn-CNF with only negative clauses is called a Negative-CNF. Dually, an AntiHorn-CNF with only positive clauses is called a Positive-CNF.

The CNF \(f\) is said to be (of type) Horn\(\wedge\)AntiHorn if it can be written as \(f=f_1\wedge f_2\) such that \(f_1\) is a Horn-CNF and \(f_2\) is a AntiHorn-CNF. As opposed to Horn and AntiHorn individually, deciding the satisfiability of Horn\(\wedge\)AntiHorn CNFs is NP-complete. In fact, already Positive\(\wedge\)Negative is NP-complete. Nevertheless, our core result (Theorem 1) states that deciding satisfiability in quadratic time is possible for some relevant special case of Positive\(\wedge\)Negative.

1.1 Here comes the Section break-up. Section 2 will survey itself at the beginning. In fact, since Section 2 may distract from the overall storyline, the reader is advised to skip Section 2 at a first reading and come back to it when its content is quoted in later Sections.

As to Section 3, by definition a DisjointPositive-CNF is a Positive-CNF whose clauses are mutually disjoint, i.e. distinct clauses have no common literal. We show that the modelsets of DisjointPositive-CNFs are neatly captured by so-called 012e-rows \(\rho\). (Here "2" is the familiar don’t-care symbol but the "e" symbol, due to the author, is less known.) In a dual fashion one defines DisjointNegative-CNFs and 012n-rows \(\sigma\). We state in Theorem 1 that the satisfiability of type DisjointPositive\(\wedge\)DisjointNegative CNF’s, i.e. the non-emptyness of \(\rho\cap\sigma\), can be decided in linear time (the proof being postponed to Section 9). While the principle of inclusion-exclusion (PIE) decides \(\rho\cap\sigma\stackrel{?}{=}\emptyset\) in more familiar ways (and gives the precise cardinality \(|\rho\cap\sigma|\) as a perk), unfortunately the PIE takes exponential time. Furthermore, the concrete members (=bitstrings) in \(\rho\cap\sigma\) remain utterly unknown.

Sections 4,5,6,7 all revolve around \(\rho\cap\sigma\stackrel{?}{=}\emptyset\) and hopefully increase the reader’s acceptance (or even appetite) for the technicalities of Section 9. Section 4 records well known facts about closure systems, set-ideals, set-filters, and various ways to capture them. Section 5 touches upon the notorious problem to enumerate the minimal hitting sets of a hypergraph in polynomial total time. Section 6 is about the classic Ramsey numbers \(R(k,\ell)\) and shows that \(n<R(k,\ell)\) is equivalent to the existence (respectively) of a suitable 012e-row \(\rho\), and a suitable 012n-row \(\sigma\) such that \(\rho\cap\sigma\neq\emptyset\). While testing \(\rho\cap\sigma\stackrel{?}{=}\emptyset\) is fast due to Theorem 1, the problem that remains in Section 6 is to reduce the large pools of \(\rho_i\)’s and \(\sigma_j\)’s in which \(\rho\) and \(\sigma\) are to be found. Hints are provided but much work remains to be done. Section 7 features a proper Horn\(\wedge\)AntiHorn scenario (not just Positive\(\wedge\)Negative as in Sections 5,6) that involves Monotone Boolean Networks, i.e. certain functions \(\Phi:\{0,1\}^m\to\{0,1\}^m\). Namely, we show that the fixpoints \(y\) of \(\Phi\) (i.e. \(\Phi(y)=y\)) are exactly the models of a readly calculated CNF \(g\) of type Horn\(\wedge\)AntiHorn. Hence the \(\rho,\sigma\)-mechanism is applicable to enumerate all fixpoints.

Section 8 sticks to Horn\(\wedge\)AntiHorn and shows that each CNF \(f\) (not necessarily related to Boolean networks) is equisatisfiable2 with a certain CNF \(g\) of type Horn\(\wedge\)AntiHorn. The modelset \(Mod(g)\subseteq\{0,1\}^{m+s}\) (which hence can be calculated with the \(\rho,\sigma\)-mechanism) yields the modelset of interest, i.e. \(Mod(f)\subseteq\{0,1\}^{m}\), as the projection of \(Mod(g)\) onto the first \(m\) variables. (The difference between \(m\) and \(m+s\) is small.) Interestingly, 3-CNFs show up in both Section 7 and 8 at various places.

As to Section 9, let \(\rho\) be any \(012e\)-row and \(\sigma\) any \(012n\)-row of the same length \(m\). We provide the pending proof of Theorem 1, i.e. we show that \(\rho\cap\sigma\stackrel{?}{=}\emptyset\) can be decided in time \(O(m^2)\). This is the crucial ingredient for Theorem 5 which establishes that in fact all bitstrings in \(\rho\cap\sigma\) can be listed in output3 polynomial time.

Without further mention, all sets in this article are assumed to be finite.

2 Making 012-rows disjoint↩︎

As previously mentioned, Section 2 can be skipped at a first reading; more precisely the skipping concerns the more technical4 Subsections 2.1 and 2.2.

First off, we will often identify bitstrings \(y\in\{0,1\}^m\) with their supports \(\{i: y_i=1\}\), i.e. with subsets of \(\{1,2,..,m\}\). By definition a 012-row such as \(r:=(0,2,1,0,2)\) represents the set of bitstrings (subsets) \[\Big\{(0,{\boldsymbol{0}},1,0,{\boldsymbol{0}}),(0,{\boldsymbol{0}},1,0,{\boldsymbol{1}}),(0,{\boldsymbol{1}},1,0,{\boldsymbol{0}}),(0,{\boldsymbol{1}},1,0,{\boldsymbol{1}})\Big\}=\Big\{\{3\},\{3,5\},\{2,3\},\{2,3,5\}\Big\}.\] Thus "2" is the familiar5 don’t-care symbol that can freely be replaced by a 0-bit or a 1-bit. We put \(zeros(r):=\{1,4\},\;ones(r):=\{3\},\;twos (r):=\{2,5\}\), and likewise for arbitrary 012-rows \(r'\). From the above it is evident that \(|r'|=2^\alpha\), where \(\alpha:=|twos(r')|\). It is also clear that the intersection of same length 012-rows is either empty (due to 0-1 clashes as in \((0,1,2)\cap(2,0,2)=\emptyset\)), or can otherwise again be written as 012-row: \((2,0,1,1,2,2)\cap(0,2,2,1,2,0)=(0,0,1,1,2,0)\).

As to unions of 012-rows, how large is \[r_1\cup r_2\cup r_3:=(2,2,2,2,0,1,0)\cup(0,0,2,2,2,1,2)\cup(2,2,0,0,0,2,0)\;?\] Inclusion-exclusion yields the cardinality \[\quad|r_1\cup r_2\cup r_3|=|r_1|+|r_2|+|r_3|-|r_1\cap r_2|-|r_1\cap r_3|-|r_2\cap r_3|+|r_1\cap r_2\cap r_3|\] \[=\;16+16+8-4-4-1+1\;=\;32\] right away, but of course the workload rises exponentially with the number of 012-rows involved.

2.1 If one could readily replace a union of \(t\) many 012-rows by a disjoint union of "slightly" more (say \(p\) many) 012-rows, this would beat inclusion-exclusion since then \(p\) instead of \(2^t-1\) numbers need to be added. Furthermore in many scenarios not just their number, but the bitstrings themselves are important. Listing them without6 overlaps (i.e. \(\rho'_1\uplus\cdots\uplus\rho'_p\)) is certainly more helpful than the original offering (i.e \(r_1\cup\cdots\cup r_t\)).

\({r_1}:=\) 2 2 2 2 0 1 0
\({r_2}:=\) 0 0 2 2 2 1 2
\({\rho_1}:=\) 1 2 2 2 0 1 0
\({\rho_2}:=\) 0 1 2 2 0 1 0
\({r_3}:=\) 2 2 0 0 0 2 0
\({\rho_3}:=\) 1 2 1 2 0 1 0
\({\rho_4}:=\) 1 2 0 1 0 1 0
\({\rho_5}:=\) 0 1 1 2 0 1 0
\({\rho_6}:=\) 0 1 0 1 0 1 0
\({\rho_7}:=\) 0 0 1 2 2 1 2
\({\rho_8}:=\) 0 0 0 1 2 1 2
\({\rho_9}:=\) 0 0 0 0 1 1 2
\(\rho_{10}:=\) 0 0 0 0 0 1 1

Table 1: Making the union \(r_1\cup r_2\cup r_3\) disjoint

Evidently \(r_1\cup r_2 =(r_1\setminus r_2)\uplus r_2\). It remains to represent \(Y:=r_1\setminus r_2\) as disjoint union of 012-rows. If (as here) neither the trivial case \(Y=r_1\) nor \(Y=\emptyset\) occurs, then (i) 0-1 clashes are absent and (ii) there are bitstrings \(y\in Y\). One option for \(y\in r_1\) to "detach" itself from the "crowd" in \(r_2\) is to have 1-bits at places where all bitstrings in \(r_2\) must have 0-bits (i.e. \(y_i=1\) for some \(i\in zeros(r_2)\)). Clearly \(\rho_1\uplus\rho_2\) is the set of \(y\in r_1\) that exploit this option. A moment’s thought confirms that, 0-1 clashes being absent, mentioned option is the only7 option to detach yourself from the crowd. In other words, \(r_1\setminus r_2=\rho_1\uplus\rho_2\), and so \(r_1\cup r_2=\rho_1\uplus\rho_2\uplus r_2\). Therefore \[[r_1\cup r_2]\cup r_3=[(\rho_1\setminus r_3)\uplus (\rho_2\setminus r_3)\uplus (r_2\setminus r_3)]\uplus r_3.\] Using detachment to expand each of \(\rho_1\!\setminus\! r_3,\;\rho_2\!\setminus\! r_3,\;r_2\!\setminus\! r_3\) into 012-rows, yields (see Table 1 and Subsection 2.2) \[r_1\cup r_2\cup r_3=(\rho_3\uplus\rho_4)\uplus(\rho_5\uplus\rho_6)\uplus (\rho_7\uplus\rho_8\uplus \rho_9\uplus\rho_{10})\uplus r_3.\] One checks that the cardinalities of \(\rho_3,...,\rho_{10},r_3\) sum up to 32, in accordance with inclusion-exclusion.

2.2 A few comments are in order concerning the more subtle expansion of \(r_2\setminus r_3\). In its core detachment boils down to find the set \(Y\) of all \(y\in (2,2,...,2)\) (\(n\) components) that detach themselves from \((0,0,...,0)\). Of course \(Y=(1,0,...,0)\cup (0,1,...,0)\cup\cdots\cup(0,0,...,1)\). This union can be made disjoint by using an Abraham8 1-Flag of dimension \(n\times n\). Figure 1 pictures a \(4\times 4\) Abraham 1-Flag. One checks that its four 012-rows are disjoint and their union is \((2,2,2,2)\setminus\{(0,0,0,0)\}\). The cardinalities behave accordingly: \(8+4+2+1=2^4-1\). It is clear how the \(4\times 4\) pattern extends to the \(n\times n\) pattern, and accordingly \(2^{n-1}+2^{n-2}+\cdots+2+1=2^n-1\). Abraham 1-Flags, and dually Abraham 0-Flags (also Figure 1), will accompany us throughout this article.

3 Definition and basic properties of 012e-rows and 012n-rows↩︎

Recall from the Introduction that DisjointPositive-CNFs are Positive-CNFs with disjoint clauses. Let us add any number of length 1 negative clauses. The result we
call9 DisjointPossitive, an example being \(f_0\) in (2). Put another way, dropping the boldface entries in (2) brings us from DisjointPossitive to DisjointPositive:

\[(2)\quad f_0={\boldsymbol{\overline{x}}_1\wedge\overline{x}_2}\wedge x_3\wedge x_4\wedge (x_6\vee x_7\vee x_8)\wedge (x_9\vee x_{12})\wedge(x_{10}\vee x_{11})\wedge (x_{13}\vee x_{14}\vee x_{15})\]

3.1 With the DisjointPossitive-CNF in (2) we associate the 012e-row \(\rho_0\) shown in \((2')\). Specifically, the negative length 1 clauses \(\overline{x}_1,\overline{x}_2\) are represented by the 0’s in positions 1 and 2 of \(\rho_0\). The positive length 1 clauses \(x_3,x_4\) are represented by the 1’s in positions 3 and 4 of \(\rho_0\). \[(2')\quad \rho_0:=(0,0,1,1,2,e_1,e_1,e_1,e_3,e_2,e_2,e_3,e_4,e_4,e_4)\] Each clause of length \(\ge 2\) gets its own e-wildcard \((e_i,e_i,..,e_i)\), distinct clauses being distinguished by subscripts. For instance \(x_9\vee x_{12}\) is represented by the entries \(e_3,e_3\) located at the positions 9 and 12. The don’t-care "2" at position 5 signifies that neither \(x_5\) nor \(\overline{x}_5\) occur in \(f_0\). The following acronyms are now self-explanatory: \[ones(\rho_0)=\{3,4\},\;zeros(\rho_0)=\{1,2\},\;twos(\rho_0)=\{5\},\;pos(e_3,e_3)=\{9,12\}\]

By definition, an arbitrary 012e-row of length \(m\) (e.g. \(m=15\) for \(\rho_0\)) represents the following set \(S(\rho)\subseteq\{0,1\}^m\) of bitstrings. It holds that \(y\in\{0,1\}^{m}\) belongs to \(S(\rho)\) iff these conditions hold:

  • \(zeros(\rho)\subseteq zeros(y)\)

  • \(ones(\rho)\subseteq ones(y)\)

  • \(ones(y)\cap pos(e_i,...,e_i)\neq\emptyset\) or all e-wildcards \((e_i,..,e_i)\) of \(\rho\).

It follows that 012e-rows are ideally10 suited to represent the modelsets of DisjointPossitive-CNFs, e.g. \(Mod(f_0)=S(\rho_0)\). As to "represent", we will henceforth be more sloppy and simply write \(Mod(f_0)=\rho_0\). Strictly speaking, this confounds a "string of symbols" with a "set of bitstrings", yet from the context it will always be clear which of the two is meant.

3.2 Dually one defines DisjointNeggative-CNFs, an example being \(g_0\) in (3). \[(3)\quad g_0=(\overline{x}_2\vee\overline{x}_7)\wedge(\overline{x}_{3}\vee \overline{x}_{13}\vee\overline{x}_{14})\wedge(\overline{x}_4\vee\overline{x}_5\vee\overline{x}_9\vee\overline{x}_{11}\vee\overline{x}_{15})\wedge(\overline{x}_6\vee\overline{x}_8)\wedge \overline{x}_{10}\wedge {\boldsymbol{x}_{12}}\;\]

Dropping the boldface entry in (3) brings us from DisjointNeggative to DisjointNegative. In dual fashion the DisjointNeggative-CNF \(g_0\) in (3) triggers this 012n-row which uses n-wildcards such as \((n_4,n_4,n_4)\): \[(3')\quad \sigma_0:=(2,n_1,n_4,n_3,n_3,n_2,n_1,n_2,n_3,0,n_3,1,n_4,n_4,n_3)\] It e.g. holds that \(pos(n_3,..,n_3)=\{4,5,9,11,15\}\). Dual to the above, a 012n-row \(\sigma\) of length \(m\) represents the following set \(S'(\rho)\subseteq\{0,1\}^m\) of bitstrings. It holds that \(y\in\{0,1\}^{m}\) belongs to \(S'(\sigma)\) iff these conditions hold (notice how (iii’) differs from (iii)):

  • \(zeros(\sigma)\subseteq zeros(y)\)

  • \(ones(\sigma)\subseteq ones(y)\)

  • \(zeros(y)\cap pos(n_i,...,n_i)\neq\emptyset\) or all n-wildcards \((n_i,..,n_i)\) of \(\sigma\).

Analogous to 3.1 we often identify \(S'(\sigma)\) and \(\sigma\); thus it e.g. holds (check) that \(Mod(g_0)=\sigma_0\).

3.3 The most obvious reason for a 012e-row \(\rho\) to have no bitstring in common with a same length 012n-row \(\sigma\) are 0-1 clashes, which we met already in Section 2. Formally this happens iff either \(ones(\rho)\cap zeros(\sigma)=\emptyset\) or \(ones(\sigma)\cap zeros(\rho)=\emptyset\). Apart from 0-1 clashes either of the following trivial reasons is sufficient for \(\rho\cap\sigma=\emptyset\):

  • There is an e-wildcard \((e,..,e)\) of \(\rho\) with \(pos(e,..,e)\subseteq zeros(\sigma)\)

  • There is a n-wildcard \((n,..,n)\) of \(\sigma\) with \(pos(n,..,n)\subseteq ones(\rho)\)

Yet the emptyness of \(\rho\cap\sigma\) can have non-trivial reasons. For instance

\(\rho\cap\sigma\;:=\;(1,1,e,e)\cap (n,n',n,n')=\Big( (1,1,e,e)\cap (1,1,2,2)\Big)\cap (n,n',n,n')\\ = (1,1,e,e)\cap \Big( (1,1,2,2)\cap (n,n',n,n')\Big)=(1,1,e,e)\cap (1,1,0,0)=\emptyset.\)

3.4 For general \(\rho\cap\sigma\) the trick above (associativity of set intersection) won’t get us far. Instead we will reduce \(\rho:=\rho_0\) to \(\rho_0\supseteq \rho_1 \supseteq\cdots\supseteq\rho_t\) and \(\sigma:=\sigma_0\) to \(\sigma_0\supseteq \sigma_1 \supseteq\cdots\supseteq\sigma_t\) such that \(\rho_i\cap\sigma_i=\rho_0\cap\sigma_0\) for all \(0\le i\le t\). Exactly one of two things will occur. Case A: \(\rho_i\cap\sigma_i=\emptyset\) for some index \(i\), due to trivial reasons. Then we stop, knowing that \(\rho_0\cap\sigma_0=\emptyset\). Case B: No trivial reasons occur. Then our reduction process stabilizes with \(\rho_t\) and \(\sigma_t\).

To explain what exactly is meant by "reduce" and "stabilize", consider \(\rho_0\) and \(\sigma_0\) in Table 2 (they coincide with the rows in \((2')\) and \((3')\)):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
\(\rho_0=\) 0 0 1 1 2 \(e_1\) \(e_1\) \(e_1\) \(e_3\) \(e_2\) \(e_2\) \(e_3\) \(e_4\) \(e_4\) \(e_4\)
\(\sigma_0=\) 2 \(n_1\) \(n_4\) \(n_3\) \(n_3\) \(n_2\) \(n_1\) \(n_2\) \(n_3\) 0 \(n_3\) 1 \(n_4\) \(n_4\) \(n_3\)
\(\rho_1=\) 0 0 1 1 2 \(e_1\) \(e_1\) \(e_1\) \(e_3\) \(e_2\) \(e_2\) \(e_3\) \(e_4\) \(e_4\) \(e_4\)
\(\sigma_1=\) 0 0 1 1 \(n_3\) \(n_2\) \(\rightarrow 2\) \(n_2\) \(n_3\) 0 \(n_3\) 1 \(n_4\) \(n_4\) \(n_3\)
\(\rho_2=\) 0 0 1 1 2 \(e_1\) \(e_1\) \(e_1\) \(\rightarrow 2\) 0 \(\rightarrow 1\) 1 \(e_4\) \(e_4\) \(e_4\)
\(\sigma_2=\) 0 0 1 1 \(n_3\) \(n_2\) 2 \(n_2\) \(n_3\) 0 \(n_3\) 1 \(n_4\) \(n_4\) \(n_3\)
\(\rho_3=\) 0 0 1 1 2 \(e_1\) \(e_1\) \(e_1\) 2 0 1 1 \(e_4\) \(e_4\) \(e_4\)
\(\sigma_3=\) 0 0 1 1 \(n_3\) \(n_2\) 2 \(n_2\) \(n_3\) 0 1 1 \(n_4\) \(n_4\) \(n_3\)

Table 2: Reducing type \((012e,012n)\) intersections to type \((2e,2n)\) intersections

We obtain \(\sigma_1\) by enforcing11 the 0’s and 1’s of \(\rho_1:=\rho_0\) upon \(\sigma_0\). Although \(\sigma_1\subset \sigma_0\) (proper inclusion), the reader should convince himself that \(\rho_1\cap\sigma_1=\rho_0\cap\sigma_0\). Likewise we obtain \(\rho_2\) by enforcing the 0’s and 1’s of \(\sigma_1\;(=:\sigma_2)\) upon \(\rho_1\). Again \(\rho_2\subset\rho_1\) yet \(\rho_2\cap\sigma_2=\rho_1\cap\sigma_1\). After one more step we get \(\rho_3\subseteq\rho_2\) and \(\sigma_3\subseteq\sigma_2\) (in fact \(\rho_3:=\rho_2\) and \(\sigma_3\subset\sigma_2\)) such that \(\rho_3\cap\sigma_3=\rho_2\cap\sigma_2=\cdots=\rho_0\cap\sigma_0\). The reduction process stops because now \(ones(\rho_3)=ones(\sigma_3)\) and \(zeros(\rho_3)=zeros(\sigma_3)\). Putting \(\overline{\rho_3}=(2,e_1,e_1,e_1,2,e_4,e_4,e_4)\) and \(\overline{\sigma_3}=(n_3,n_2,2,n_2,n_3,n_4,n_4,n_3)\) (both indexed by \(5,6,7,8,9,13,14,15\)), it is clear that \(\rho_0\cap\sigma_0=\emptyset\) iff \(\overline{\rho}_3\cap\overline{\sigma}_3=\emptyset\). This is progress because we managed to get rid of the 0-bits and 1-bits. Specifically, if we find a bitstring \(y'\in\overline{\rho}_3\cap\overline{\sigma}_3\) and inject three 0’s and four 1’s at the right places, we get a bitstring \(y\in\rho_0\cap\sigma_0\).

3.5 Generally let \(\rho_0\) and \(\sigma_0\) be length \(m\) rows of type 012e and 012n respectively. As illustrated in Table 2, triggered by \((\rho_0,\sigma_0)\) one calculates \((\rho_1,\sigma_1),(\rho_2,\sigma_2)\), and so forth until one either finds that \(\rho_i\cap\sigma_i=\emptyset\) due to trival reasons, or else the sketched 0,1,2-propagation stops at \((\rho_t,\sigma_t)\). In order to access the cost \(O(..)\) of these manipulations we must specify further the data structure underlying \(\rho_0,\sigma_0\) (and their successors). Looking at \(\rho_0\) (dually for \(\sigma_0\)), it suffices to update12 the parameters \(ones,zeros,pos(e_1),pos(e_2)\), etc.

Suppose that 0,1,2-propagation puts 1 on some \(e_2\) symbol at position \(j\). This merely triggers \(ones:=ones\cup\{j\}\) (programmer’s talk) and \(pos(e_2):=\emptyset\), and so has constant complexity \(O(1)\). Slightly more cumbersome, suppose that 0,1,2-propagation puts 0 on some \(e_7\) symbol at position \(k\). This forces \(zeros:=zeros\cup\{k\}\) and leads to two subcases. If \(|pos(e_7)|\ge 3\), then \(pos(e_7):=pos(e_7)\setminus\{k\}\). If \(pos(e_7)=\{k,\ell\}\) has only two elements, then \(ones:=ones\cup\{\ell\}\) and \(pos(e_7):=\emptyset\). The first subcase is more expensive and costs13 \(O(|pos(e_7)|)=O(m)\). At most \(m\) many e-components get changed on the journey from \(\rho_0\) to \(\rho_t\). Likewise for \(\sigma_0\). Hence the cost incurred so far is \(O(m^2)\).

However this is not all. Testing repeatedly for 0-1 clashes, i.e. testing \(ones\cap zeros'\stackrel{?}{=}\emptyset\) and \(ones'\cap zeros\stackrel{?}{=}\emptyset\), costs \(O(m)\). Since "repeatedly" can only be bound by "\(\le m\)", this accumulates to \(O(m^2)\). Fortunately \(O(m^2)\) also covers the other trivial reasons (see 3.3) for \(\rho_i\cap\sigma_i=\emptyset\), as well as the above "cost incurred so far". It follows that the overall cost of our reduction to 2e- and 2n-level is \(O(m^2)\).

3.6 We see that deciding the satisfaction of DisjointPositive$ $DisjointNegative boils down to deciding the emptiness of \(\rho\cap\sigma\), where \(\rho\) is a 2e-row and \(\sigma\) a 2n-row of the same length. Surprisingly, it turns out that always \(\rho\cap\sigma\neq\emptyset\), and so:

Theorem 1: Let \(f:\{0,1\}^m\to\{0,1\}\) be a Boolean function which is in CNF format and of type DisjointPossitive$ $DisjointNeggative. Then the satisfiability of \(f\) can be tested in \(O(m^2)\) time.

The argument that always \(\rho\cap\sigma\neq\emptyset\) is quite subtle and is postponed to Section 9. In the remainder of Section 3 we continue with elementary observations about \(2e\)-rows and \(2n\)-rows.

3.7 Let \(\rho\) and \(\sigma\) be 2e- and 2n-rows respectively (always of the same length). We just mentioned that always \(|\rho\cap\sigma|>0\). But what is the precise value of \(|\rho\cap\sigma|\)? The principle of inclusion-exclusion (PIE) will give the answer. Thus consider \(\rho\) and \(\sigma\) in Table 3.

1 2 3 4 5 6 7 8 9 cardinality
\({\sigma}:=\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_2\) \(n_3\) \(n_3\) \(n_3\) \(2\) \(2\cdot 3\cdot 7^2=294\)
\({\sigma(\stackrel{\rightarrow}{e_1})}:=\) 2 0 2 0 0 \(n_3\) \(n_3\) \(n_3\) \(2\) \(2^3\cdot 7=56\)
\({\sigma(\stackrel{\rightarrow}{e_2})}:=\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_2\) 2 0 0 0 \(2\cdot 3\cdot 7=42\)
\({\sigma(\stackrel{\rightarrow}{e_1},\stackrel{\rightarrow}{e_2})}:=\) 2 0 2 0 0 2 0 0 0 \(2^3=8\)
\({\rho}:=\) 2 \(e_1\) 2 \(e_1\) \(e_1\) 2 \(e_2\) \(e_2\) \(e_2\) \(2^3\cdot 7^2=392\)
\({\rho(\stackrel{\rightarrow}{n_1})}:=\) 1 1 2 2 2 2 \(e_2\) \(e_2\) \(e_2\) \(2^4\cdot 7=112\)
\({\rho(\stackrel{\rightarrow}{n_2})}:=\) 2 2 1 1 1 2 \(e_2\) \(e_2\) \(e_2\) \(2^3\cdot 7=56\)
\({\rho(\stackrel{\rightarrow}{n_3})}:=\) 2 \(e_1\) 2 \(e_1\) \(e_1\) 1 1 1 2 \(2^3\cdot 7=56\)
\({\rho(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_2})}:=\) 1 1 1 1 1 2 \(e_2\) \(e_2\) \(e_2\) \(14\)
\({\rho(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_3})}:=\) 1 1 2 2 2 1 1 1 2 \(16\)
\({\rho(\stackrel{\rightarrow}{n_2},\stackrel{\rightarrow}{n_3})}:=\) 2 2 1 1 1 1 1 1 2 \(8\)
\({\rho(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_2},\stackrel{\rightarrow}{n_3})}:=\) 1 1 1 1 1 1 1 1 2 \(2\)

Table 3: Calculating \(|\rho\cap\sigma|\) with the principle of inclusion-exclusion

By definition \(\sigma(\stackrel{\rightarrow}{e_1})\) is the set of all bitstrings \(y\in\sigma\) that violate the wildcard \(\stackrel{\rightarrow}{e_1}:=(e_1,e_1,e_1)\) of \(\rho\) in the sense that \(pos(\stackrel{\rightarrow}{e_1})\subseteq zeros(y)\). Likewise \(\sigma(\stackrel{\rightarrow}{e_2})\) is defined, and \(\sigma(\stackrel{\rightarrow}{e_1},\stackrel{\rightarrow}{e_2})\) is the set of \(y\)’s that violate both wildcards. Table 3 displays these three sets as 012n-rows. Using the principle of inclusion-exclusion one concludes \[\big|\rho\cap\sigma\big|=\big|\sigma\big|-\big|\sigma(\stackrel{\rightarrow}{e_1})\big| \;-\;\big|\sigma(\stackrel{\rightarrow}{e_2})\big|\;+\; \big|\sigma(\stackrel{\rightarrow}{e_1},\stackrel{\rightarrow}{e_2})\big| =294-56-42+8=204.\]

Dualizing matters in obvious ways one arrives at the same result: \[|\rho\cap\sigma|=|\rho|-\big|\rho(\stackrel{\rightarrow}{n_1})\big| -\big|\rho(\stackrel{\rightarrow}{n_2})\big| -\big|\rho(\stackrel{\rightarrow}{n_3})\big| \;+\;\big|\rho(\stackrel{\rightarrow}{n_1},\stackrel{\longrightarrow}{n_2})\big|\; \;+\;\big|\rho(\stackrel{\rightarrow}{n_1},\stackrel{\longrightarrow}{n_3})\big|\; \;+\;\big|\rho(\stackrel{\rightarrow}{n_2},\stackrel{\longrightarrow}{n_3})\big|\;-\; \big|\rho(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_2}, \stackrel{\rightarrow}{n_3})\big|\] \[=392-112-56-56+14+16+8-2=204\]

The PIE is easier to grasp than the proof-details of Theorem 1 in Section 9, and also calculating \(|\rho\cap\sigma|\) beats anwering \(\rho\cap\sigma\stackrel{?}{=}\emptyset\). Trouble is, PIE takes exponential time \(O(m2^m)\), as opposed to \(O(m^2)\). Here \(m\) is the number of wildcards in the row which has the fewer wildcards. (In practice time becomes an issue only for \(m\) somewhere \(>20\), depending on your hardware.)

3.8 Continuing with the example in 3.7, recall that \(|\rho\cap\sigma|=204\). But suppose we need to list these 204 bitstrings explicitely. Here comes how to do it. Decompose \(\sigma=\sigma_1\uplus\cdots\uplus\sigma_{18}\) into a disjoint union of 012-rows \(\sigma_i\). Then by distributivity \(\rho\cap\sigma= (\rho\cap\sigma_1)\uplus\cdots\uplus (\rho\cap\sigma_{18})\), and each \(\rho\cap\sigma_i\) is readily expressed as 012e-row:

1 2 3 4 5 6 7 8 9
\({\sigma}:=\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_2\) \(n_3\) \(n_3\) \(n_3\) \(2\)
\({\rho}:=\) 2 \(e_1\) 2 \(e_1\) \(e_1\) 2 \(e_2\) \(e_2\) \(e_2\)
\(|\tau_i|\)
\({\sigma_1}:=\) 0 2 0 2 2 0 2 2 2 \(\tau_1:=\) \(0\;e_1\;0\;e_1\;e_1\;0\;e_2\;e_2\;e_2\) 49
\({\sigma_2}:=\) 0 2 0 2 2 1 0 2 2 \(\tau_2:=\) \(0\;e_1\;0\;e_1\;e_1\;1\;0\;e_2\;e_2\) 21
\({\sigma_3}:=\) 0 2 0 2 2 1 1 0 2 \(\tau_3:=\) \(0\;e_1\;0\;\;e_1\;e_1\;1\;1\;\;0\;\;2\) 14
\({\sigma_4}:=\) 0 2 1 0 2 0 2 2 2 \(\tau_4:=\) \(0\;e_1\;1\;0\;e_1\;0\;e_2\;e_2\;e_2\) 21
\({\sigma_5}:=\) 0 2 1 0 2 1 0 2 2 \(\tau_5:=\) \(0\;e_1\;1\;0\;e_1\;1\;0\;e_2\;e_2\) 9
\({\sigma_6}:=\) 0 2 1 0 2 1 1 0 2 \(\tau_6:=\) \(0\;e_1\;1\;0\;e_1\; 1\;1\;\;0\;2\) 6
\({\sigma_7}:=\) 0 2 1 1 0 0 2 2 2 \(\tau_7:=\) \(0\; 2\; 1\;1\;0\;\;0\;\;e_2\;e_2\;e_2\) 14
\({\sigma_8}:=\) 0 2 1 1 0 1 0 2 2 \(\tau_8:=\) \(0\;2\;1\;1\;0\;1\;\;0\;e_2\;e_2\) 6
\({\sigma_9}:=\) 0 2 1 1 0 1 1 0 2 \(\tau_9:=\) \(0\;\;2\;1\;1\;\;0\;1\;1\;0\;2\) 4
\({\sigma_{10}}:=\) 1 0 0 2 2 0 2 2 2 \(\tau_{10}:=\) \(1\;0\;0\;e_1\;e_1\;0\;e_2\;e_2\;e_2\) 21
\({\sigma_{11}}:=\) 1 0 0 2 2 1 0 2 2 \(\tau_{11}:=\) \(1\;0\;0\;e_1\;e_1\;1\;0\;e_2\;e_2\) 9
\({\sigma_{12}}:=\) 1 0 0 2 2 1 1 0 2 \(\tau_{12}:=\) \(1\;0\;0\;e_1\;e_1\;1\;1\;0\;2\) 6
\({\sigma_{13}}:=\) 1 0 1 0 2 0 2 2 2 \(\tau_{13}:=\) \(1\;0\;1\;0\;1\;0\;e_2\;e_2\;e_2\) 7
\({\sigma_{14}}:=\) 1 0 1 0 2 1 0 2 2 \(\tau_{14}:=\) \(1\;0\;1\;0\;1\;1\;0\;e_2\;e_2\) 3
\({\sigma_{15}}:=\) 1 0 1 0 2 1 1 0 2 \(\tau_{15}:=\) \(1\;0\;1\;0\;1\;1\; 1 \;\;0\;2\) 2
\({\sigma_{16}}:=\) 1 0 1 1 0 0 2 2 2 \(\tau_{16}:=\) \(1\;0\;1\;1\;0\;0\;e_2\;e_2\;e_2\) 7
\({\sigma_{17}}:=\) 1 0 1 1 0 1 0 2 2 \(\tau_{17}:=\) \(1\;0\;1\;1\;0\;1\;0\;e_2\;e_2\) 3
\({\sigma_{18}}:=\) 1 0 1 1 0 1 1 0 2 \(\tau_{18}:=\) \(1\;\;0\;1\;1\;\;0\;1\;1\;0\;2\) 2

Table 4: Writing \(\rho\cap\sigma\) as disjoint union of eighteen 012e-rows

3.8.1 Let us first check that Table 4 achieves what it claims. By inspection all \(\sigma_i\)’s are contained in \(\sigma\) and their cardinalities sum up to \(64+32+\cdots+4+2=294\), which coincides with the cardinality \(3\cdot 7\cdot 7\cdot 2\) of \(\sigma\). Therefore \(\sigma\) must be the disjoint union of the \(\sigma_i\)’s: \[(4)\quad \sigma=\sigma_1\uplus\cdots\uplus\sigma_{18}\] For each 012e-row \(\tau_i\), as defined on the right of \(\sigma_i\) in Table 4, one readily verifies that \[(5)\quad \tau_i\subseteq\rho\cap\sigma_i\;\;for\;all\;\;1\le i\le 18.\] For instance \(\tau_4=(0,e_1,1,0,e_1,0,e_2,e_2,e_2)\) is evidently contained in \(\rho\), and also \(\tau_4\subseteq\sigma_4\) because \(zeros(\tau_4)\) cuts all \(n\)-wildcards of \(\sigma\). The cardinalities of the rows \(\tau_i\) sum up to \(49+21+\cdots+3+2=204\), which by 3.7 equals \(|\rho\cap\sigma|\). To summarize, \[204=|\tau_1|+\cdots+|\tau_{18}|\stackrel{(5)}{\le}|\rho\cap\sigma_1|+\cdots+|\rho\cap\sigma_{18}| =|\rho\cap(\sigma_1\uplus\cdots\uplus\sigma_{18})|\stackrel{(4)}{=}|\rho\cap\sigma|=204.\] Therefore \(\rho\cap\sigma_i=\tau_i\) and \(\rho\cap\sigma=\tau_1\uplus\cdots\uplus\tau_{18}\).

3.8.2 So far, so good. But all of this begs two questions. First, how does one generally find 012-rows \(\sigma_1,...,\sigma_k\) with \(\sigma_1\uplus\cdots\uplus\sigma_k=\sigma\)? Second, having found these 012-rows, it can happen (different from above) that some intersections \(\rho\cap\sigma_i\) are empty. If our algorithm aspires to run in output polynomial time, then generating \(\sigma_i\)’s that yield empty intersections must be prevented. Both problems (the second one being tougher) will be settled in Section 9.

4 Closure systems, set-filters and set-ideals↩︎

It is well known that a CNF of type Positive\(\wedge\)Negative is satisfiable iff a certain set-filter \({\cal F}\) intersects a certain set-ideal \({\cal J}\). We set out to compute \({\cal J}\cap{\cal F}\) by manipulating 012e- and 012n-rows. Much of Section 4 is either well known or has appeared in the author’s previous works. All of this caters for Sections 5,6,7.

4.1 For any set \(W\) a set system \(CS\subseteq{\cal P}(W)\) is called a closure system if \(W\in CS\) and if \(X\cap Y\in CS\) for all \(X,Y\in CS\). Here comes one way to capture closure systems. An implication on a set \(W\) is an ordered pair \((A,B)\in{\cal P}(W)\times{\cal P}(W)\). We henceforth write \(A\rightarrow B\) instead of \((A,B)\), and call \(A\) the premise, and \(B\) the conclusion of the implication. A set \(X\subseteq W\) is said to satisfy \(A\rightarrow B\) if either \(A\not\subseteq X\) or \(B\subseteq X\). In the first case the satisfaction occurs premise-wise, in the second case conclusion-wise. (Both can happen simultaneously.) Let \(\Sigma\) be a family of implications on \(W\). One says that \(X\subseteq W\) is \(\Sigma\)-closed if \(X\) satisfies all implications in \(\Sigma\). As is well known, the family \(CS(\Sigma)\) of all \(\Sigma\)-closed sets is a closure system.

A set system \({\cal J}\subseteq{\cal P}(W)\) is a set-ideal if for all \(Z\in{\cal J}\) it follows from \(Y\subseteq Z\) that \(Y\in{\cal J}\). Here comes one way how set-ideals arise. Let \(\mathbb{H}\subseteq{\cal P}(W)\) be any set system (often called hypergraph). Then a set \(X\subseteq W\) is a noncover (w.r.t. \(\mathbb{H}\)) if \(X\not\supseteq H\) for all \(H\in\mathbb{H}\). Clearly the family \(NC(\mathbb{H})\) of all noncovers is a set-ideal.

Dually, a set system \({\cal F}\subseteq{\cal P}(W)\) is a set-filter if for all \(Z\in{\cal F}\) it follows from \(Z\subseteq Y\) that \(Y\in{\cal F}\). One source of set-filters is this. For any hypergraph \(\mathbb{H}\subseteq{\cal P}(W)\) one calls \(Y\subseteq W\) a hitting set (or: transversal) of \(\mathbb{H}\) if \(Y\cap H\neq\emptyset\) for all \(H\in\mathbb{H}\). Clearly the family \(HS(\mathbb{H})\) of all hitting sets is a set-filter.

We next survey algorithms to calculate closure systems (4.2), set-ideals (4.3), and set-filters (4.4).

4.2 Consider \(W:=\{1,2,...,5\}\) and the family of implications
\(\Sigma:=\big\{\;\{1,2,3\}\rightarrow\{5\},\;\{4,5\}\rightarrow\{1\},\;\{3,4\}\rightarrow\{2\}\;\big\}\). Upon identifying subsets with bitstrings it holds that \(CS(\Sigma)=Mod(f_1)\), where \[(6)\quad f_1:=(\overline{x}_1\vee\overline{x}_2\vee\overline{x}_3\vee x_5)\wedge (\overline{x}_4\vee\overline{x}_5\vee x_1)\wedge (\overline{x}_3\vee\overline{x}_4\vee x_2)\] is14 a Horn-CNF. Here comes a sketch of how the implication n-algorithm in [W2] "imposes" the implications in \(\Sigma\) one by one (in the given order). For starters, the 2n-row \(s_0\) in Table 5 contains exactly those \(X\in{\cal P}(W)\) which premise-wise satisfy \(\{1,2,3\}\rightarrow\{5\}\). The sets \(X\in{\cal P}(W)\) that conclusion-wise, but not premise-wise, satisfy \(\{1,2,3\}\rightarrow\{5\}\), are the members of \(s_1\). Incidentally \(s_1\) happens to be final, in the sense that all \(X\in s_1\) are \(\Sigma\)-closed; indeed, \(X\) satisfies \(\{4,5\}\rightarrow\{1\}\) and \(\{3,4\}\rightarrow\{2\}\) conclusion-wise since \(1,2\in X\). Hence \(s_1\) is removed and stored in a safe place. As to \(s_0\), e.g. \(\{2,3,4,5\}\in s_0\) does not satisfy \(\{4,5\}\rightarrow\{1\}\), and so this implication is pending to be imposed upon \(s_0\).

To do so, clearly \(s_{00}\) is the set of all \(X\in s_0\) that premise-wise satisfy \(\{4,5\}\rightarrow\{1\}\), and \(s_{01}\) is the set of all \(X\in s_0\setminus s_{00}\) that conclusion-wise satisfy \(\{4,5\}\rightarrow\{1\}\). In both these rows the pending implication is \(\{3,4\}\rightarrow\{2\}\). Turning to \(s_{00}\) first15, we leave it to the reader to verify that \(s_{000}\uplus s_{000}'\) is the family of those \(X\in s_{00}\) that premise-wise satisfy \(\{3,4\}\rightarrow\{2\}\) (take note of the bold Abraham 0-Flag as defined in Section 2). And \(s_{001}\) collects the sets \(X\in s_{00}\) that satisfy \(\{3,4\}\rightarrow\{2\}\) conclusion-wise. Upon storing the three final rows the only row in our LIFO stack is \(s_{01}\). There is no \(X\in s_{01}\) that satisfies \(\{3,4\}\rightarrow\{2\}\) conclusion-wise (why?), and so \(s_{01}\) gives rise to the final row \(s_{010}\). Removing it, the LIFO stack becomes empty, and the algorithm stops. We found that \(|CS(\Sigma)|=|s_0|+\cdots+|s_{010}|=2+12+6+1+2=23\).

The implication \(n\)-algorithm works in polynomial total time, i.e. \(O(Rh^2w^2)\) where \(w:=|W|,\;h:=|\mathbb{H}|,\) and \(R\) is the number of output 012n-rows. Essential in the proof is the concept of feasibility. Specifically, e.g. in Table 5 the rows \(s_{00}\) and \(s_{01}\) are the candidate sons of row \(s_0\). Generally a candidate row is feasible if it contains at least one model (in our case: at least one \(\Sigma\)-closed set). Infeasible rows must be cancelled because otherwise an output polynomial running time of the overall algorithm can hardly be established. It hence is crucial to have polynomial time feasibility test; see [W2] for more details.

1 2 3 4 5
\({s_0}:=\) \(n\) \(n\) \(n\) \(2\) \(2\) pending \(\{4,5\}\rightarrow\{1\}\)
\({s_1}:=\) \(1\) \(1\) \(1\) \(2\) \(1\) final
\({s_0}:=\) \(n\) \(n\) \(n\) \(2\) \(2\) pending \(\{4,5\}\rightarrow\{1\}\)
\(s_{00}:=\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) pending \(\{3,4\}\rightarrow\{2\}\)
\(s_{01}:=\) \(1\) \(n_1\) \(n_1\) \(1\) \(1\) pending \(\{3,4\}\rightarrow\{2\}\)
\(s_{00{\boldsymbol{0}}}:=\) \(2\) \(2\) 0 \(\boldsymbol{n}_2\) \(n_2\) final
\(s'_{00{\boldsymbol{0}}}:=\) \(n_1\) \(n_1\) 1 0 \(2\) final
\(s_{00{\boldsymbol{1}}}:=\) \(0\) \(1\) \(1\) \(1\) \(0\) final
\(s_{01}:=\) \(1\) \(n_1\) \(n_1\) \(1\) \(1\) pending \(\{3,4\}\rightarrow\{2\}\)
\(s_{01}:=\) \(1\) \(n_1\) \(n_1\) \(1\) \(1\) pending \(\{3,4\}\rightarrow\{2\}\)
\(s_{010}:=\) \(1\) \(2\) \(0\) \(1\) \(1\) final

Table 5: Writing \(Mod(f_1)\) as disjoint union of five 012n-rows.

4.3 If we drop the positive literals in \((6)\) we get the Negative-CNF \[(7)\quad f_2:=(\overline{x}_1\vee\overline{x}_2\vee\overline{x}_3)\wedge (\overline{x}_4\vee\overline{x}_5)\wedge (\overline{x}_3\vee\overline{x}_4).\] The models of \(f_2\) clearly match the noncovers of the hypergraph \(\mathbb{H}(f_2):=\{\{1,2,3\},\{4,5\},\{3,4\}\}\). In other words, \(Mod(f_2)\) coincides with \({\cal J}(f_2):=NC(\mathbb{H}(f_2))\). The noncover n-algorithm (briefly: n-algorithm), which is an obvious simplification of the implication \(n\)-algorithm, represents \({\cal J}(f_2)\) as a disjoint union of 012n-rows (Table 6). In particular \(|{\cal J}(f_2)|=12+6=18\).

1 2 3 4 5
\(\sigma:=\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) pending \(\{3,4\}\)
\(\sigma_0:=\) \(2\) \(2\) 0 \(\boldsymbol{n}_2\) \(n_2\) final
\(\sigma_1:=\) \(n_1\) \(n_1\) 1 \(\boldsymbol{0}\) \(2\) final

Table 6: The \(n\)-algorithm writes the set-ideal \({\cal J}(f_2)=Mod(f_2)\) as \(\sigma_0\uplus\sigma_1\).

4.4 Upon switching all literals from negative to positive, \((7)\) becomes \[(8)\quad g_2:=({x}_1\vee{x}_2\vee{x}_3)\wedge ({x}_4\vee{x}_5)\wedge ({x}_3\vee{x}_4)\] The models of \(g_2\) are now the hitting sets of the hypergraph \(\mathbb{H}(g_2):=\{\{1,2,3\},\{4,5\},\{3,4\}\}\) (which happens to be \(\mathbb{H}(f_2)\)). Thus \(Mod(g_2)\) coincides with \({\cal F}(g_2):=HS(\mathbb{H}(g_2))\). The transversal16 e-algorithm (briefly: e-algorithm) is a mirror image of the noncover n-algorithm:

1 2 3 4 5
\(\rho:=\) \(e_1\) \(e_1\) \(e_1\) \(e_2\) \(e_2\) pending \(\{3,4\}\)
\(\rho_0:=\) \(2\) \(2\) 1 \(\boldsymbol{e}_2\) \(e_2\) final
\(\rho_1:=\) \(e_1\) \(e_1\) 0 \(\boldsymbol{1}\) \(2\) final

Table 7: The \(e\)-algorithm writes the set-filter \({\cal F}(g_2)=Mod(g_2)\) as \(\rho_0\uplus\rho_1\).

Is it a coincidence that \(|{\cal F}(g_2)|=18=|{\cal J}(f_2)|\)? No, because for any hypergraph \(\mathbb{H}\subseteq{\cal P}(W)\) it holds (putting \(Y^c:=W\setminus Y\)) that \[(9)\quad HS(\mathbb{H})=\{Y^c:\;Y\in NC(\mathbb{H})\}\quad and\quad NC(\mathbb{H})=\{X^c:\;X\in HS(\mathbb{H})\}\]

In the remainder of Section 4 we are mostly concerned with moving from the individual set-systems \({\cal J}, {\cal F}\) towards \({\cal J}\cap {\cal F}\).

4.5 Let \(f:\{0,1\}^m\to\{0,1\}\) be any Boolean function defined by a Negative-CNF and let \({\cal J}(f)\subseteq{\cal P}(\{1,..,m\})\) be the coupled set-ideal. Likewise let \(g:\{0,1\}^m\to\{0,1\}\) be any Boolean function defined by a Positive-CNF and let \({\cal F}(g)\subseteq{\cal P}\) be the coupled set-filter. Hence \(f\wedge g\) is of type Negative$ \(`Positive` and it holds that\)Mod(fg)={J}(f)(g)$. Upon expressing the set-filter \({\cal F}(g)\) as disjoint union of 012e-rows \(\rho_i\), and the set-ideal \({\cal J}(f)\) as disjoint union of 012n-rows \(\sigma_j\) (as glimpsed in 4.3 and 4.4), it holds that \[(10)\quad {\cal J}(f)\cap{\cal F}(g)\neq \emptyset\;\Leftrightarrow\;(\exists i)(\exists j)\;\rho_i\cap\sigma_j\neq\emptyset\] Several problems arise. Problem 1, how fast can the emptiness of one set \(\rho_i\cap\sigma_j\) be decided? Problem 2, how many intersections \(\rho_i\cap\sigma_j\) need to be evaluated? Problem 3, what if \({\cal J}(f)\cap{\cal F}(g)\neq \emptyset\) has been settled but all members of \({\cal J}(f)\cap{\cal F}(g)\) need to be known? Problem 4, how to handle set-ideals \(\cal J\) and set-filters \({\cal F}\) which are not initially given in the form \({\cal J}= {\cal J}(f)\) and \({\cal F}= {\cal F}(g)\)?

4.6 Let us convey, to some extent, the solutions of these problems. Problem 1 is fully settled by Theorem 1. As to Problem 2 (the most vexing one), there can indeed be plenty (\(=:N\)) intersections \(\rho_i\cap\sigma_j\) to be evaluated. A case in point is Section 6 where hopefully symmetry exploitation will eventually shrink \(N\). As to Problem 3, in Section 9 we show how to expand nonempty sets \(\rho_i\cap\sigma_j\) fast into disjoint unions of 012e-rows. Consequently also \({\cal J}(f)\cap{\cal F}(g)\) can be expanded in this way. Concerning Problem 4, more comments follow in 4.6.1 to 4.6.4.

4.6.1 If the set-ideal \({\cal J}\subseteq{\cal P}(W)\) is not given as \({\cal J}= {\cal J}(f)\) for some Negative-CNF \(f\), then \({\cal J}\) is likely given (we omit other possibilities) by its inclusion-maximal members (called facets) \(F_1,...,F_t\in {\cal J}\). They uniquely determine \({\cal J}\) in that \({\cal J}={\cal P}(F_1)\cup{\cal P}(F_2)\cup\cdots\cup{\cal P}(F_t)\). Let us address the inconvenience that this union is never17 disjoint. If say \(W:=\{1,...,m\}\), let \(r_i\) be the 02-row of length \(m\) defined by \(twos(r_i):=F_i, \;zeros(r_i):=W\setminus F_i\). It then holds that \({\cal J}=r_1\cup\cdots\cup r_t\). Upon applying the "detachment method" of Section 2 one obtains \({\cal J}=\rho'_1\uplus\cdots\uplus \rho'_p\) for certain 012-rows \(\rho'_i\). (As shown in 4.6.3, an extra effort yields 012e-rows \(\rho_i'\).)

4.6.2 Dually, if the set-filter \({\cal F}\subseteq{\cal P}(W)\) is not given as \({\cal F}= {\cal F}(g)\) for some Positive-CNF \(g\), then \({\cal F}\) is likely given by its inclusion-minimal members (called generators) \(G_1,...,G_s\in {\cal F}\). They uniquely determine \({\cal F}\) in that \({\cal F}=G_1\!\uparrow\cup G_2\!\uparrow\cup \cdots\cup G_s\!\uparrow\). (For any \(G\subseteq W\) put \(G\!\uparrow\;:=\{X\in{\cal P}(W):\;X\supseteq G\}\) .) Let us fix again the fact that this union is never disjoint. If again \(W=\{1,...,m\}\), let \(r_i'\) be the 12-row of length \(m\) defined by \(ones(r_i'):=G_i,\;twos(r_i'):=W\setminus G_i\). It then holds that \({\cal F}=r_1'\cup\cdots\cup r_s'\). Upon applying Section 2 one obtains \({\cal F}=\sigma_1'\uplus\cdots\sigma_q'\) for certain 012-rows \(\sigma_i'\). (As shown in 4.6.3, an extra effort yields 012n-rows \(\rho_i'\).)

4.6.3 First off, this somewhat technical Subsection can be skipped without loosing the story line. For the sake of simplicity the example in Section 2 was taylored to the effect that only one kind of "detachment" occured (which triggered Abraham 1-Flags). Let us step that up to Abraham 0-Flags and Abraham 01-Flags! Consider thus the 012-rows \(r_1,\;r_2\) in Table 8. An argument dual to the one in Section 2 (switching 0’s and 1’s) shows that \(r_1\setminus r_2=r_3\uplus r_4\uplus r_5\), and all is based on some (boldface) \(3\times 3\) Abraham 0-Flag. Next, \(\overline{r_2}\) arises from \(r_2\) by turning two 2’s to 0’s. Looking at \(r_1\setminus\overline{r_2}\), now somehow both kinds of Abraham Flags seem to be required. This is true; specifically a \(s\times s\) Abraham 0-Flag \(A_0\) and a \(t\times t\) Abraham 1-Flag \(A_1\) are compiled to some \((s+t)\times (s+t)\) Abraham 01-Flag. The case \(s=3,\;t=2\) is illustrated in Table 8, i.e. \(r_1\setminus\overline{r_2}=r_6\uplus\cdots\uplus r_{10}\).

\({r_1}:=\) 2 2 2 2 2 0 1 1
\({r_2}:=\) 1 1 1 2 2 2 1 2
\(\overline{r_2}:=\) 1 1 1 0 0 2 1 2
\({r_3}:=\) 0 2 2 2 2 0 1 1
\({r_4}:=\) 1 0 2 2 2 0 1 1
\({r_5}:=\) 1 1 0 2 2 0 1 1
\({r_6}:=\) 0 2 2 2 2 0 1 1
\({r_7}:=\) 1 0 2 2 2 0 1 1
\({r_8}:=\) 1 1 0 2 2 0 1 1
\({r_9}:=\) 1 1 1 1 2 0 1 1
\({r_{10}}:=\) 1 1 1 0 1 0 1 1
\({r_{11}}:=\) n n n 2 2 0 1 1
\({r_{12}}:=\) 1 1 1 e e 0 1 1

Table 8: Introducing Abraham 01-Flags

If one embraces n-wildcards and e-wildcards, then each \((s+t)\times (s+t)\) Abraham 01-Flag can be replaced by some Abraham \(ne\)-Flag with just two rows, as shown in Table 8. Check that indeed \(|r_6\uplus\cdots \uplus r_{10}|=31=|r_{11}\uplus r_{12}|\). This may look like a brilliant shortcut. The flipside is that upon iteration detachment has to be achieved w.r.t. 012ne-rows, and this gets convoluted. Suffice it to say that the task is somewhat easier if the initial 012-rows are all 02-rows (= the facets \(F_i\)), or are all 12-rows (=the generators \(G_i\)). In these cases the output (disjoint) rows are all of type 012e, respectively type 012n. The former case has been dealt with in detail in [W3].

4.6.4 If \(\cal J\) is given by its facets \(F_1,...,F_t\), and \(\cal F\) is given by its generators \(G_1,...,G_s\), and the question is merely \({\cal J}\cap{\cal F}\stackrel{?}{=}\emptyset\), then this can be settled at once (notice the relation to (10)): \[(10')\quad {\cal J}\cap{\cal F}\neq \emptyset\;\Leftrightarrow\;(\exists i)(\exists j)\;F_j\subseteq G_i.\] Accordingly the next concept fits in well. A set-family (possibly empty) \(Co\subseteq{\cal P}(W)\) is called convex if for all \(X,Y\in Co\) and all \(Z\subseteq W\) it follows from \(X\subseteq Z\subseteq Y\) that \(Z\in Co\). For instance, if \(\cal J\) is a set-ideal and \(\cal F\) a set-filter, then \({\cal J}\cap{\cal F}\) is convex. Conversely, every convex set-family \(Co\subseteq{\cal P}(W)\) can be written as \(Co={\cal J}\cap{\cal F}\). Indeed, the minimal members of \(Co\) yield the generators of \(\cal F\), and the maximal members of \(Co\) yield the facets of \(\cal J\).

5 Compressing the family of all minimal hitting sets of a hypergraph↩︎

Recall from Section 4, if a set-filter18 \({\cal F}\subseteq{\cal P}(W)\) is given by its generators, then it can be represented by 012n-rows. And if \({\cal F}\) is given by a positive CNF \(g\), it can be represented by 012e-rows. Recall that \(Mod(g)=HS(\mathbb{H})\), where \(\mathbb{H}\) is the hypergraph whose hyperedges match the clauses of \(g\). Consider now this related problem:

Find the generators of \(\cal F\) when it is given as \({\cal F}:=HS(\mathbb{H})\). In other words, find the family \(MHS(\mathbb{H})\) of all minimal hitting sets!

It is a notorious open question whether \(MHS(\mathbb{H})\) can be enumerated in polynomial total time; we recommend the survey [GV]. In 5.1 we show how to find the better behaved subfamily of all minimum (cardinality) hitting sets, and in 5.2 glimpse at the general case.

5.1 For any set system \(\cal S\) we write \(Mmal({\cal S})\) for the subfamily of all minimal members of \(\cal S\), and \(Mmum({\cal S})\subseteq Mmal({\cal S})\) for the family of all minimum members. Consider the hypergraph \(\mathbb{H}_0:=\{\{1,2,4,5\},\{1,3,6\},\{2,7\}\}\subseteq{\cal P}(\{1,...,7\})\). Applying the \(e\)-algorithm of 4.4 yields \(HS(\mathbb{H}_0)=\rho_1\uplus\rho_2\uplus\rho_3\), where

1 2 3 4 5 6 7
\({\rho_1}:=\) \(0\) \(1\) \(e\) \(2\) \(2\) \(e\) \(2\) \(\ni 23, 26\)
\({\rho_2}:=\) \(0\) \(0\) \(e'\) \(e\) \(e\) \(e'\) \(1\) \(\ni 734, 735, 764, 765\)
\({\rho_3}:=\) \(1\) \(e\) \(2\) \(2\) \(2\) \(2\) \(e\) \(\ni 12, 17\)
\({\sigma_1}:=\) \(0\) \(0\) \(n'\) \(n\) \(n\) \(n'\) \(2\)
\({\sigma_2}:=\) \(0\) \(1\) \(n\) \(0\) \(0\) \(n\) \(0\)
\({\sigma_3}:=\) \(1\) \(n\) \(0\) \(0\) \(0\) \(0\) \(n\)

Table 9: \(HS(\mathbb{H}_0)=\rho_1\uplus\rho_2\uplus\rho_3\) and \(MC(\mathbb{H}_0)=\sigma_1\uplus\sigma_2\uplus\sigma_3\)

For any 012e-row \(\rho\), viewed as set system, let us calculate \(Mmal(\rho)\) and \(Mmum(\rho)\). To begin with, \(X\in\rho\) belongs to \(Mmal(\rho)\) iff \(X\) is the union of \(ones(\rho)\) with some transversal of \(\{pos(e_1),pos(e_2),..\}\). Consider say \(\rho=\rho_2\). The transversals of \(\{pos(e'), pos(e)\}=\{\{3,6\},\{4,5\}\}\) are (using shorthand notation) \(34,35,64,65\). In view of \(ones(\rho_2)=\{7\}\) one gets \(Mmal(\rho_2)=\{734,735,764,765\}\). Likewise \(Mmal(\rho_1)=\{26,23\}\) and \(Mmal(\rho_3)=\{12,17\}\). It is now clear that for each 012e-row \(\rho\) (not just in Table 9) it holds that \[Mmum(\rho)=Mmal(\rho)\]

5.1.1 Recall that generally only \(Mmum({\cal S})\subseteq Mmal({\cal S})\). Let us have a closer look at the scenario \({\cal S}:=HS(\mathbb{H})\). For any hypergraph \(\mathbb{H}\) we put \(\mu(\mathbb{H}):=min\{|X|:\;X\in HS(\mathbb{H})\}\). Thus \(\mu(\mathbb{H})\) is the common cardinality of all \(X\) in \(MCHS(\mathbb{H}):=Mmum(HS(\mathbb{H}))\). Here MCHS stands for "minimum cardinality hitting sets". Suppose that \[(11)\quad HS(\mathbb{H})=\rho_1\uplus\rho_2\uplus\cdots\uplus\rho_t\;for\;disjoint\;012e\!-\!rows\;\rho_i\] Take any \(X\in MCHS(\mathbb{H})\). A fortiori \(X\in Mmum(\rho_j)\), where \(\rho_k\) is the unique row that contains \(X\). It follows that \(\mu(\rho_k)=\mu(\mathbb{H})\) and that \(Mmum(\rho_k)\subseteq MCHS(\mathbb{H})\). Therefore:

  • \(MCHS(\mathbb{H})\) is the disjoint union of those \(Mmum(\rho_k)\) where \(\rho_k\) in (11) happens
    to satisfy \(\mu(\rho_k)=\mu(\mathbb{H}).\)

But how to calculate \(\mu(\mathbb{H})\) in the first place? For some19 hypergraphs \(\mathbb{H}\) one may know \(\mu(\mathbb{H})\) in advance. Otherwise \(\mu(\mathbb{H})\) is easily obtained, provided the representation (11) has been achieved, namely \(\mu(\mathbb{H})=min\{\mu(\rho_1),\mu(\rho_2),...,\mu(\rho_t\}\). Thus, having computed \(\rho_1,\rho_2,\rho_3\) in Table 9, one reads off that \(\mu(\mathbb{H}_0)=min\{\mu(\rho_1),\mu(\rho_2),\mu(\rho_3)\}=2\), and so (12) implies that \[MCHS(\mathbb{H}_0)=Mmum(\rho_1)\uplus Mmum(\rho_3)=\{23,26\}\uplus\{12,17\}\]

5.1.2 The g-wildcard \((g,g,..,g)\) was useful in previous articles, and will be so in the present article (here and in Section 9). Loosely speaking it signifies "exactly one 1-bit in this area". For20 instance \((g,g,g):=\{(1,0,0),(0,1,0),(0,0,1)\}\). We define 012g-rows akin to 012e-rows and 012n-rows. This e.g. yields the compact representation \[MCHS({\mathbb{H}_0})=(0,1,g,2,2,g,2)\uplus (1,g,2,2,2,2,g).\]

5.2 We now turn from \(MCHS(\mathbb{H})\) to the more cumbersome family \(MHS(\mathbb{H})\). Each \(Y\in MHS(\mathbb{H})\) a fortiori belongs to \(Mmal(\rho_k)\) where \(\rho_k\) is the unique 012e-row in (11) that contains \(Y\). Consequently \[(13)\quad MHS(\mathbb{H})\subseteq Mmal(\rho_1)\uplus\cdots\uplus Mmal(\rho_t)\] Incidently (by inspection) \(\subseteq\) becomes \(=\) for \(\mathbb{H}:=\mathbb{H}_0\). To spell it out: \[(14)\quad MHS(\mathbb{H}_0)=\{23,26\}\uplus\{734,735,764,765\}\uplus\{12,17\}\]

In general the inclusion \(\subseteq\) in (13) is proper. In fact, some rows \(\rho_j\) may be "bad" [W4,p.10] in the sense that \(Mmal(\rho_j)\cap MHS(\mathbb{H})=\emptyset\). One way (among several others in [W4]) to sieve \(MHS(\mathbb{H})\) from a type (13) representation of \(HS(\mathbb{H})\) proceeds as follows. By definition \(X\in {\cal P}(W)\) belongs to \(MC(\mathbb{H})\) iff each \(a\in X\) has at least one private hyperedge \(H\in \mathbb{H}\) in the sense that \(X\cap H=\{a\}\) (as opposed to merely \(\supseteq\)). The acronym MC refers to some kind of "minimal condition" in [MU]. See [W4, Thm.2] for a fresh proof of the fact (established in [MU] with other terminology) that \[(15)\quad MHS(\mathbb{H})=HS(\mathbb{H})\cap MC(\mathbb{H})\]

Since obviously \(MC(\mathbb{H})\) is a set-ideal, it follows from (15) that \(MSH(\mathbb{H})\) is a set-system of type \({\cal J}(f)\cap{\cal F}(g)\), i.e. the modelset of some Negative\(\wedge\)Positive type CNF \(f\wedge g\). It is shown in [W4] how \(MC(\mathbb{H})\) can be represented as a disjoint union of 012n-rows (finding \(f\) is subtle). For instance \(MC(\mathbb{H}_0)=\sigma_1\uplus\sigma_2\uplus\sigma_3\), where the latter rows are defined in Table 9. In tandem with (11) and (15) follows that \(MHS({\mathbb{H}_0})\) is the disjoint union of all nine sets \(\rho_i\cap \sigma_j\). One verifies ad hoc that \[\rho_1\cap\sigma_2=\{\{2,3\},\{2,6\}\},\;\rho_3\cap\sigma_3=\{\{1,2\},\{1,7\}\},\;\rho_2\cap\sigma_1=\{\{3,4,7\},\{3,5,7\},\{4,6,7\},\{5,6,7\}\},\] and that otherwise \(\rho_i\cap\sigma_j=\emptyset\). This matches (14).

6 About Ramsey numbers↩︎

Also this Section is about Negative\(\wedge\)Positive. Thus let us lay out how 012e- and 012n-rows relate to Ramsey numbers. Recall that for any fixed integers \(k,\ell\ge 1\) there is an integer (the Ramsey number) \(R(k,\ell)\) with these properties:

  • If \(G=(V,E)\) is any graph with \(|V|\ge R(k,\ell)\) then \(G\) has a \(k\)-clique or an \(\ell\)-anticlique (or both).

  • \(R(k,l)\) is the smallest integer with the stated property. Therefore: For each \(m<R(k,\ell)\) there are counterexamples \(G_0=(V_0,E_0)\), i.e. \(|V_0|=m\) and \(G_0\) neither has \(k\)-cliques nor \(\ell\)-anticliques.

In order to connect the matter to set-ideals and set-filters we put \(V_m:=\{1,2,..,m\}\) and focus on the \({m}\choose{2}\)-element set \(E_m\) of all edges of the complete graph \(K_m:=(V_m,E_m)\). Each \(X\in {\cal P}(E_m)\) yields the spanning21 subgraph \((V_m,X)\) of \(K_m\), and each spanning subgraph arises this way. Thinking about \(V_m\) in the back of our minds we henceforth identify \({\cal P}(E_m)\) with the family of all spanning subgraphs of \(K_m\).

6.1 Let \({\cal J}(k,m)\subseteq{\cal P}(E_m)\) be the set of those spanning subgraphs that have no, i.e. avoid all, \(k\)-element cliques of \(K_m\). Evidently \({\cal J}(k,m)\) is a set-ideal in \({\cal P}(E_m)\). Dually let \({\cal F}(\ell,m)\subseteq{\cal P}(E_m)\) be the set of those spanning subgraphs of \(K_m\) that avoid all \(\ell\)-element anticliques. Evidently \({\cal F}(\ell,m)\) is a set-filter in \({\cal P}(E_m)\). Take a moment to convince yourself: \[(16)\quad m\ge R(k,\ell)\;\Leftrightarrow\; {\cal J}(k,m)\cap {\cal F}(\ell,m)=\emptyset.\] Property (16) shows that calculating Ramsey numbers can in principle be reduced to (repeatedly) deciding whether certain set-ideals intersect certain set-filters. In the remainder of Section 6 we ponder how to bring "in principle" closer to "in practice".

6.2 In order to add 012n-rows and 012e-rows to the picture, recall from 4.3 and 4.4 that applying the \(n\)-algorithm to any hypergraph \(\mathbb{H}\) represents \(NC(\mathbb{H})\) as disjoint union of 012n-rows, and applying the e-algorithm to any hypergraph \(\mathbb{H}'\) represents \(HS(\mathbb{H}')\) as disjoint union of 012e-rows. Let \(\mathbb{H}_{k,m}\) be the hypergraph of all \(k\)-cliques of \(K_m\). (For instance, \(\{47,49,79\}\in \mathbb{H}_{3,m}\) for all \(m\ge 9\).) Therefore \({\cal J}(k,m)=NC(\mathbb{H}_{k,m})\) can be displayed via 012n-rows \(\sigma_j\).

What about \({\cal F}(\ell,m)\)? First observe the following: Some spanning subgraph \((V_m,X)\) has some fixed \(\ell\)-anticlique \(\{a,b,c,..\}\subseteq V_m\) (thus no edges among any of the vertices \(a,b,c,..\)) iff the spanning subgraph \((V_m,X^c)\) has the corresponding \(\ell\)-clique (thus \(\{ab,ac,bc,..\}\subseteq X^c\)). Consequently:

  • \(=\{Y^c\in{\cal P}(E_m):\;Y^c\; avoids\; all\;\ell\!-\!anticliques\; of\;K_m\}\)

  • \(=\{Y^c\in{\cal P}(E_m):\;Y\; avoids\; all\;\ell\!-\!cliques\;of\;K_m\}\)

  • \(=\Big\{Y^c\in{\cal P}(E_m):\;Y\in NC({\mathbb{H}}_{\ell,m})\}\stackrel{(9)}{=} HS({\mathbb{H}}_{\ell,m})\)

Suppose \({\cal F}(\ell,m)=HS({\mathbb{H}}_{\ell,m})\) is displayed via disjoint 012e-rows \(\rho_i\) It therefore follows from (16) that \[(17)\quad m<R(k,\ell)\;\Leftrightarrow\;(\exists i)(\exists j)\;\rho_i\cap\sigma_j\neq\emptyset\]

6.3 To fix ideas, it takes 29 (012e)-rows \(\rho_i\) to represent \({\cal F}(3,5)\) and (by symmetry) also 29 012n-rows \(\sigma_j\) to represent \({\cal J}(3,5)\). Hence a hefty \(29^2=841\) pairs \((\rho_i,\sigma_j)\) arise in (17). The good news is this. Suppose we strive to show that \(5<R(3,3)\). Then, by (17), finding just one pair \((\rho_i,\sigma_j)\) with \(\rho_i\cap\sigma_j\neq\emptyset\) achieves our goal. Upon trail and error one may find \(\sigma=\sigma_j\) and \(\rho=\rho_i\) in Table 10.

12 13 14 15 23 24 25 34 35 45
\({\sigma}:=\) 1 1 0 0 0 \(n'\) \(n'\) \(n\) \(n\) 1
\({\rho}:=\) 1 1 0 0 0 \(e\) \(e'\) \(e\) \(e'\) 1

Table 10: Fact (17) in the context of \(m=5\) and \(\ell=k=3\)

As we know from 3.4, it follows from \(ones(\rho)=ones(\sigma)\) and \(zeros(\rho)=zeros(\sigma)\) that \(\rho\cap\sigma\neq\emptyset\). A concrete member of \(\rho\cap\sigma\) is \(\{13,34,45,25,21\}\), i.e. the pentagon \(1-3-4-5-2-1\) which indeed avoids all 3-cliques and all 3-anticliques (make a sketch).

6.4 Here we try to repeat for \(K_6\) the success we had with \(K_5\) in 6.3. For \(m\ge 6\) "trial and error" won’t work for \(K_m\). Instead we start with the 012e-row \(\tilde{\rho}\subseteq{\cal F}(3,6)\) (check the inclusion), and try to construct some 012n-row \(\tilde{\sigma}\) that avoids both the \({{6}\choose{3}}=20\) size 3 anticliques, as well as all trivial reasons for \(\tilde{\rho}\cap\tilde{\sigma}=\emptyset\). By Theorem 1 this guarantees \(\tilde{\rho}\cap\tilde{\sigma}\neq\emptyset\).

12 13 14 15 16 23 24 25 26 34 35 36 45 46 56
\({\tilde{\rho}}:=\) 1 \(e_1\) 1 \(e_4\) 0 \(e_2\) 0 \(e_3\) 1 \(e_2\) 1 \(e_1\) \(e_3\) 1 \(e_4\)
\(s:=\) 1 1 0 0 1 1 1
\(s_1:=\) 1 \(n_1\) 1 \(n_2\) 0 \(n_1\) 0 \(n_2\) 1 1 1
\(s_2:=\) 1 \(n_1\) 1 \(n_2\) 0 \(n_1\) 0 \(n_2\) 1 0 1 1
\(s_3:=\) 1 \(\Rightarrow 0\) 1 \(n\) 0 \(\boldsymbol{1}\) 0 \(n\) 1 0 1 \(\Rightarrow 1\) 1

Table 11: Fact (17) in the context of \(m=6\) and \(\ell=k=3\)

We start with a row \(s\) that simply copies the 0’s and 1’s of \(\tilde{\rho}\). Due to its 0-bits \(s\) avoids the 3-cliques 126,136,146,156,124,234,245,246. The avoidance of 123 and 125 is achieved by \(s_1\). Upon22 placing 0 on position 34 one obtains a 012n-row \(s_2\) which avoids 134,345,346 all at once. This nudges us to trim \(s_2\) to \(s_3\) as follows. First, \(23\in ones(s_3)\) makes sure that \(pos(e_2,e_2)\) gets not swallowed by \(zeros(s_3)\), nor by \(zeros(s_i)\) for any potential successors \(s_i\) of \(s_3\). This has a ripple effect: \[23\in ones(s_3)\stackrel{n_1}{\Rightarrow}13\in zeros(s_3)\stackrel{e_1}{\Rightarrow} 36\in ones(s_3)\] Unfortunately all these efforts were in vain: \(s_3\) cannot extend to any 012n-row \(\tilde{\sigma}\) that avoids all 3-cliques because \(\{23,26,36\}\subseteq ones(s_3)\).

Each reader modestly familiar with Ramsey numbers could have predicted this: In whatever sophisticated way one chooses the starter row \(\tilde{\rho}\) and tries to adapt \(\tilde{\sigma}\) to it, one will never achieve \(\tilde{\rho}\cap \tilde{\sigma}\neq\emptyset\) because of (17) and the well-known fact that \(R(3,3)=6\).

6.5 What about using (10’) for proving \({\cal J}(3,6)\cap{\cal F}(3,6)=\emptyset\)? As seen above, the generators of \({\cal F}(3,6)\) are the minimal hitting sets \(G_1,...,G_s\) of the hypergraph \({\mathbb{H}}_{3,6}\). Dually the facets \(F_1,...,F_t\) of \({\cal J}(3,6)\) are the maximal noncovers of the hypergraph \({\mathbb{H}}_{3,6}\). It turns out that \(s=t=211\) and hence the naive application of (10’) demands to ckeck \(211^2\) pairs \(G_i,F_j\).

Fortunately one can do better. Namely, there are just four isomorphy classes of facets \(F_j\), w.l.o.g. we can assume they are \([F_1],[F_2],[F_3],[F_4]\). Their respective cardinalities are 10,15,6,180 (which sum up to 211). Likewise the generators \(G_i\) come in four isomorphy classes \([G_1],[G_2],[G_3],[G_4]\); see Figure 2. As opposed to checking \(211^2\) pairs, the task has simplified significantly: Check that none of the four (unlabeled) graphs \([G_i]\) extends to any of the four graphs \([F_j]\) ("extends" refers to the respective edge-sets). This is immediate because (by construction) each \([G_i]\) lacks 3-anticliques, while (by23 coincidence) all \(F_j\) have 3-anticliques. Of course one cannot go from "without 3-anticliques" towards "with 3-anticliques" by adding edges.

Among the three real-life (or: real-mathematics) applications presented in Sections 5,6,7, it is Section 6 that needs the most extra input. Specifically, expertise concerning symmetry exploitation and/or random sampling will be required to refine the sketched ideas.

7 Fixpoints of Monotone Boolean Networks↩︎

A digraph \(D\) with (finite) vertex set \(S\) is called functional if each vertex has out-degree 1. Put \(\Phi(a):=b\) if there is an arc from vertex \(a\) to vertex \(b\). This yields a well-defined selfmap \(\Phi:S\to S\). Conversely each selfmap derives from a unique functional digraph \(D\). As is well known, each connected component of \(D\) (viewed as undirected graph) consists of a directed cycle which possibly24 has directed trees "planted" upon it. The 1-cycles (i.e. loops) match the fixpoints \(a=\Phi(a)\) of our selfmap. Some of the most applicable selfmaps have the form \(\Phi:\{0,1\}^n\to\{0,1\}^n\) and are called Boolean networks. They were introduced 1969 by Stuart Kauffman who propagated them as a simple model for gene regulatory networks. Today Google Scholar finds 1.2 million results for the key words "Boolean network". Some of the established jargon in this field: attractor := directed cycle, singleton attractor := fixpoint, attractor basin := connected component, Garden of Eden := vertex without predecessors, i.e. of indegree 0.

One major theme is the identification of singleton attractors. While it is NP-complete to decide the existence of fixpoints, plenty quite different methods (surveyed in [MA]) have been propagated to detect them. Finding a Boolean formula whose models are exactly the fixpoints of \(\Phi\) is just one of these methods, but it is the one we expand upon in Subsections 7.2 to 7.4. (Subsection 7.1 concerns preliminaries that we could have stated in Section 4 already.)

7.1 Recall (Table 5) that the modelset of a pure Horn-CNF (i.e. \(CS(\Sigma)\) for some implication family \(\Sigma\)) can be rendered as disjoint union of \(012n\)-rows \(\sigma_j\). The same holds when "pure Horn-CNF" is generalized to "Horn-CNF"; in [W2] this generalization (which essentially blends the implication \(n\)-algorithm with the noncover \(n\)-algorithm) is called the Horn \(n\)-algorithm. Dually the AntiHorn \(e\)-algorithm renders the modelset of each AntiHorn-CNF as disjoint union of \(012e\)-rows \(\rho_i\). It follows that the modelset of each CNF of type Horn\(\wedge\)AntiHorn can be calculated with the \(\rho,\sigma\)-mechanism, i.e. by repeated enumeration of set-families \(\rho_i\cap\sigma_j\).(This will be illustrated in detail in Table 12.) Theorem 2 below concerns proper Horn\(\wedge\)AntiHorn, thus not the subtype Positive\(\wedge\)Negative which was prominent in Sections 5 and 6.

7.2 Formally a Boolean network is a map \(\Phi:\{0,1\}^m\to\{0,1\}^m,\;x\mapsto(\Phi_1(x),...,\Phi_m(x))\), such that each component function \(\Phi_i:\{0,1\}^m\to\{0,1\}\) is a Boolean function. Observe that \(y\in\{0,1\}^m\) is a fixpoint (i.e. \(\Phi(y)=y\)) iff \(y_i=\Phi_i(y)\) for all \(1\le i\le m\). Let us construct some CNF \(f\) such that \(Mod(f)\) coincides with the set of all fixpoints of \(\Phi\).

To fix ideas, we focus on \(i:=3\) and suppose \(\Phi_3(x):=x_1\wedge(x_2\vee x_4)\wedge(x_4\vee x_5)\). Coupled to \(\Phi_3\) consider this CNF of type Horn\(\wedge\)AntiHorn: \[f_3:=\Big[(\overline{y_3}\vee x_1)\wedge(\overline{y_3}\vee x_2\vee x_4)\wedge(\overline{y_3}\vee x_4\vee x_5)\Big]\; \wedge\;\Big[(y_3\vee\overline{x_1}\vee\overline{x}_4)\wedge (y_3\vee\overline{x_1}\vee\overline{x}_2\vee\overline{x}_5)\Big]\] We claim that for all \(y:=(x_1,x_2,x_4,x_5,y_3)\in\{0,1\}^5\) it holds that \[(18)\quad y_3=\Phi_3(x)\;\Leftrightarrow\;y\in Mod(f_3)\] Proof of (18). As to "\(\Rightarrow\)", suppose first that \(y_3=0\). Then the first three clauses of \(f_3\) are satisfied because \(\overline{y}_3=1\). The other two clauses of \(f_3\) are satisfied because by assumption \(0=\Phi_3(x)= x_1\wedge(x_2\vee x_4)\wedge(x_4\vee x_5)\), and so \(x_1=0\) or \(x_2=x_4=0\) or \(x_4=x_5=0\). Suppose now that \(y_3=1\). Then the last two clauses of \(f_3\) are satisfied. By assumption \(1=\Phi_3(x)=x_1\wedge(x_2\vee x_4)\wedge(x_4\vee x_5)\), and so \(x_1=1\) and (\(x_2=1\) or \(x_4=1\)) and (\(x_4=1\) or \(x_5=1\)). This guarantees that the first three clauses of \(f_3\) are satisfied as well.

As to "\(\Leftarrow\)" in (18), we assume that \(y\in Mod(f_3)\) and make again a case distinction. Case 1: \(y_3=0\). Since \(f_3(y)=1\) by assumption, it holds in particular that \(g:=(\overline{x}_1\vee\overline{x}_4)\wedge (\overline{x}_1\vee\overline{x}_2\vee\overline{x}_5)=1\). An easy calculation (more background later) shows that \(g=\overline{x}_1\vee (\overline{x}_2\wedge\overline{x}_4)\vee (\overline{x}_4\wedge\overline{x}_5)\). Therefore either \(\overline{x}_1=1\) or \(\overline{x}_4=\overline{x}_2=1\) or \(\overline{x}_4=\overline{x}_5=1\). It is evident that \(\overline{x}_1=1\Rightarrow x_1=0\Rightarrow\Phi_3(x)=0\;(=y_3)\), that \(\overline{x}_2=\overline{x}_4=1\Rightarrow x_2=x_4=0\Rightarrow\Phi_3(x)=0\), and that \(\overline{x}_4=\overline{x}_5=1\Rightarrow x_4=x_5=0\Rightarrow\Phi_3(x)=0\). Case 2: \(y_3=1\). From \(f_3(y)=1\) follows in particular that \(g':=x_1\wedge(x_2\vee x_4)\wedge(x_4\vee x_5)=1\) One checks that \(g'=(x_1\wedge x_4)\vee(x_1\wedge x_2\wedge x_5)\). Therefore \(x_1=x_4=1\) or \(x_1=x_2=x_5=1\). Clearly \(x_1=x_4=1\Rightarrow\Phi_3(x)=1\;(=y_3)\), and likewise \(x_1=x_2=x_5=1\Rightarrow\Phi_3(x)=1\). This proves (18).

7.3 In this Subsection we focus on monotone25 Boolean networks in the sense that all component functions must be positive Boolean functions.

Theorem 2: For each monotone Boolean network \(\Phi\) there exists a CNF \(f\) of type Horn\(\wedge\)AntiHorn such that the fixpoints of \(\Phi\) are exactly the models of \(f\). Furthermore \(f\) has the same variables but more clauses than \(\Phi\).

Proof. A moment’s thought shows that the positivity of \(\Phi_3\) above was crucial26 for \(f_3\) being of type Horn\(\wedge\)AntiHorn. Generally for all \(1\le i\le m\) one can set up a CNF \(f_i\) of type Horn\(\wedge\)AntiHorn such that the analogon of (18) holds. Therefore, if we define \(f:=f_1\wedge f_2\wedge...\wedge f_m\), then \(f\) stays of type Horn\(\wedge\)AntiHorn and is such that for all \(y\in\{0,1\}^m\) it holds that \(y=\Phi(y)\;\Leftrightarrow\;y\in Mod(f).\) \(\square\)

The part of Theorem 2 stating that "\(f\) has more clauses than \(\Phi\)" can potentially be refined. Namely, observe that while the first part \(\big[....\big]\) in the definition of \(f_3\) clearly mimicks \(\Phi_3(x)\), the second part \(\big[....\big]\) seems enigmatic, but let us see how it comes about. It is the CNF triggered by some DNF (i.e. \(\overline{x}_1\vee (\overline{x}_2\wedge\overline{x}_4)\vee (\overline{x}_4\wedge\overline{x}_5)\)) which matches \(\Phi_3(x)\) in obvious ways. If we had an upper bound for the lengths of all these triggered CNF’s (\(1\le i\le m\)), then "\(f\) has more clauses than \(\Phi\)" could be made concrete.

7.4 According to [MA] the indegree \(K\) of a (not necessarily monotone) Boolean network \(\Phi\) is the maximum number of (essential) variables that a component function can have. Thus if \(K=2\) and all component functions are in CNF format, then each component function is of type \(x_i=\ell_j\) or \(x_i=\ell_j\vee \ell_k\; (possibly\;i\in\{j,k\})\). Here \(\ell_j\) is a literal, i.e either \(x_j\) or \(\overline{x}_j\), and likewise for \(\ell_k\). Leaving the easier case \(x_i=\ell_j\) aside, we claim that \[(19)\quad x_i=\ell_j\vee\ell_k\; \Leftrightarrow\;(\overline{x}_i\vee \ell_j\vee\ell_k)\wedge(x_i\vee\overline{\ell}_j)\wedge (x_i\vee\overline{\ell}_k)=1\] The proof is similar to (parts of) the proof of (18). The crucial fact is that the right hand side in (19) is a 3-CNF, i.e. a CNF all of whose clauses have length at most 3. As is pointed out in [MA], it follows that for each Boolean network \(\Phi:\{0,1\}^m\to\{0,1\}^m\) of indegree 2 there is a 3-CNF \(f\) with at most \(3m\) clauses such that the fixpoints of \(\Phi\) are the models of \(f\). In particular, the existence of a \(\Phi\)-fixpoint can be decided in time \(O(1.3303^m)\) due to a result of [MTY] about 3-CNFs. Unfortunately this pleasant state of affairs does not carry over to Boolean networks with indegree \(K>2\) since they trigger (according to [MA]) a CNF \(f\) with \(2^{K+1}m\) clauses and furthermore instead of \(3-SAT\) one has to solve \((K+1)-SAT\).

8 The benefit of turning arbitrary CNF’s to type Horn\(\wedge\)AntiHorn↩︎

We stick to Horn\(\wedge\)AntiHorn, but in a vein unrelated to Boolean networks. To begin with, each CNF \(f'\) can be transformed to some equisatisfiable 3-CNF \(g'\) (i.e. \(f'\) is satisfiable iff \(g'\) is). Therefore 3-CNF’s are called universal27. Unfortunately, because transforming CNF’s to 3-CNF’s inflates the size of the latter, this manipulation is "only" of theoretic interest (but very much so, see 8.1). In Theorem 3 of 8.2 we prove a less inflationary transformation from an arbitrary CNF \(f'\) to some Horn\(\wedge\)AntiHorn \(g'\). Once \(Mod(g')\) has been calculated (e.g. with the \(\rho,\sigma\)-mechanism, as illustrated in 8.3), the modelset of interest, i.e. \(Mod(f')\), can be retrieved from \(Mod(g')\) in natural ways (as illustrated in 8.4).

8.1 As mentioned, with each CNF \(f\) one can associate a 3-CNF \(f'\) that is equisatisfiable. In brief [GJ,p.48], each clause of \(f\) of length \(k>3\) triggers \(k-2\) many new 3-clauses of \(f'\) (which together feature \(k-3\) new variables, i.e. not occuring in \(f\)). Thus \(f'\) has many more variables and clauses than \(f\). The sketched transformation shows that the NP-completeness of satisfiability (of arbitrary CNFs) carries over to the NP-completeness of 3-satisfiability. Why is this important? Because 3-CNFs are crisper than general CNFs, they are better suited to establish further NP-completeness results. One example is deciding the presence of fixpoints in Boolean networks (Section 7). As another example, in [GJ,p53] it is shown how each instance of 3-satisfiability can be reduced to an instance of "vertex cover", proving that "vertex cover" is NP-complete. In turn "vertex cover" can then be used to show the NP-completeness of many other combinatorial problems. While 3-CNFs are essential theoretic tools (also in 7.3), the author is not aware28 of real world applications that systematically (not just incidentally) lead to 3-CNFs.

8.2 Let us embark on the less inflationary reduction of general CNFs \(f\) to type Horn\(\wedge\)AntiHorn CNFs. It is modelled on an idea which is sketched (yet not formally verified) in [G] and which reduces arbitrary CNFs \(f\) to type Positive\(\wedge\)Negative. In [G] each clause \(C\) of \(f\) that fails to be positive or negative triggers (i) a new variable, and (ii) replaces \(C\) by two suitable clauses \(C',C''\). Our approach does the same, yet only for the fewer clauses \(C\) of \(f\) that fail to be Horn or AntiHorn.

8.2.1 Let us carry out the details on a sufficiently rich toy example. Thus consider \[(20)\;F=F_0\wedge F_1\wedge F_2:=\Big[(x_1\vee x_2\vee x_3\vee\overline{x}_4)\wedge (\overline{x}_1\vee \overline{x}_3\vee x_5\vee\overline{x}_6)\Big]\wedge \Big[\overline{x}_2\vee x_4\vee\overline{x}_5\vee x_6\Big]\wedge \Big[x_1\vee \overline{x}_2\vee \overline{x}_4\vee x_5\vee\overline{x}_6\Big]\] Generally \(F_0\) comprises the clauses that are either Horn or AntiHorn, and \(F_1,...,F_s\) are the clauses which are neither (here \(s=2\)). This triggers a certain Horn\(\wedge\)AntiHorn CNF \(G=G_0\wedge G_1\wedge...\wedge G_s\) as follows. First, \(G_0:=F_0\) is the part of \(F\) which is already Horn\(\wedge\)AntiHorn. Furthermore each ‘bad’ clause \(F_i\;(i\ge 1)\) triggers one new variable, say \(x_k\), and two clauses \(G_i^0\) and \(G_i^1\). Namely, the literals of \(G_i^0\) are \(\overline{x}_k\) together with the positive literals in \(F_i\), and the literals of \(G_i^1\) are \(x_k\) together with the negative literals in \(F_i\). The above-mentioned parts \(G_i\) are defined as \(G_i:=G_i^0\wedge G_i^1\;(1\le i\le s)\). For \(F\) in (20) we therefore get \(G\) in (21): \[(21)\quad G=G_0\wedge G_1\wedge G_2:=\Big[(x_1\vee x_2\vee x_3\vee\overline{x}_4)\wedge (\overline{x}_1\vee \overline{x}_3\vee x_5\vee\overline{x}_6)\Big]\] \[\wedge\;\Big[(x_4\vee x_6\vee\overline{x}_7)\wedge (\overline{x}_2\vee\overline{x}_5\vee x_7)\Big]\wedge \Big[(x_1\vee x_5\vee \overline{x}_8)\wedge (\overline{x}_2\vee \overline{x}_4\vee \overline{x}_6\vee x_8)\Big]\]

Theorem 3: Let \(F':\{0,1\}^m\to\{0,1\}\) be any Boolean function in CNF-format, and let \(s\) be the number of clauses which are neither Horn nor AntiHorn. Let \(G':\{0,1\}^{m+s}\to\{0,1\}\) be the Boolean function whose CNF is obtained from the CNF of \(F'\) in a fashion that is analogous to the way (21) is derived from (20). (In particular the two CNFs have the same number of clauses.) It then holds that \(Mod(F')\) equals
\(U:=\big\{(y_1,..,y_m)\in\{0,1\}^m:\;(\exists y_{m+1},..,y_{m+s}\in\{0,1\})\;(y_1,..,y_m,y_{m+1},..,y_{m+s})\in Mod(G')\big\}\).

In brief, Theorem 3 says: The auxiliary function \(G'\) has \(m+s\) variables and \(Mod(F')\) is the projection of \(Mod(G')\) onto the first \(m\) variables. In particular \(Mod(F')\) is empty iff \(Mod(G')\) is empty.

Proof. For purposes of exposition we take \(m:=6, s=2\) and \(F':=F,\;G':=G\) from (20),(21) above. In order to prove the inclusion \(\subseteq\) in the claim \(Mod(F)=U\) take any \((y_1,..,y_6)\in Mod(F)\). From \(\overline{y}_2\vee y_4\vee \overline{y}_5\vee y_6=1\) follows that \(y_4\vee y_6=1\) or \(\overline{y}_2\vee \overline{y}_5=1\) (or both). Hence either \((y_4\vee y_6\vee\overline{1})\wedge (\overline{y}_2\vee\overline{y}_5\vee {\boldsymbol{1}})=1\) or \((y_4\vee y_6\vee\overline{0})\wedge (\overline{y}_2\vee\overline{y}_5\vee {\boldsymbol{0}})=1\). If the former takes place then \((y_1,..,y_6,y_7):=(y_1,..,y_6,{\boldsymbol{1}})\in Mod(G_1)\). If the latter takes place then \((y_1,..,y_6,y_7):=(y_1,..,y_6,{\boldsymbol{0}})\in Mod(G_1)\). Since \((y_1,..,y_6)\in Mod(F)\subseteq Mod(G_0)\) by assumption, this implies that \[(22)\quad (y_1,..,y_6,y_7):=(y_1,..,y_6,0)\in Mod(G_0\wedge G_1)\;or\;(y_1,..,y_6,y_7):=(y_1,..,y_6,1)\in Mod(G_0\wedge G_1)\] Likewise it follows from \(y_1\vee\overline{y}_2\vee\overline{y}_4\vee y_5\vee\overline{y}_6=1\) that either \((y_1,..,y_6,y_8):=(y_1,..,y_6,0)\in Mod(G_0\wedge G_2)\) or \((y_1,..,y_6,y_8):=(y_1,..,y_6,1)\in Mod(G_0\wedge G_2)\). In view of (22) we conclude that at least one of the bitsrings \((y_1,..,y_6,0,0),(y_1,..,y_6,0,1),(y_1,..,y_6,1,0),(y_1,..,y_6,1,1)\) belongs to \(Mod(G_0\wedge G_1\wedge G_2)=Mod(G)\). This amounts to say that \((y_1,...,y_6)\) belongs to \(U\).

In order to prove the inclusion \(\supseteq\) in the claim \(Mod(F)=U\), take \((y_1,..,y_6)\in U\). By definition of \(U\) there are \(y_7,y_8\in\{0,1\}\) with \((y_1,..,y_6,y_7,y_8)\in Mod(G)\). (Then necessarily \((y_1,..,y_6,y_7)\in Mod(G_0\wedge G_1)\) and \((y_1,..,y_6)\in Mod(G_0)\).) We need to show that \((y_1,..,y_6)\in Mod(F)\). So far we only know that \((y_1,..,y_6)\in Mod(F_0)\) (because \(F_0=G_0\)). To fix ideas assume that \((y_1,..,y_6,y_7,y_8)=(y_1,..,y_6,0,1)\) (the cases with 01 replaced by 00,10,11 respectively are analogous). From \((y_1,..,y_6,y_7)\in Mod(G_1)\) follows \((y_4\vee y_6\vee\overline{0})\wedge (\overline{y}_2\vee\overline{y}_5\vee 0)=1\), hence \(\overline{y}_2\vee\overline{y}_5=1\), hence \(\overline{y}_2\vee y_4\vee\overline{y}_5\vee y_6=1\), hence \((y_1,..,y_6)\in Mod(F_1)\). Similarly from \((y_1,..,y_6,y_7,y_8)\in Mod(G_2)\) follows that \((y_1\vee y_5\vee\overline{1})\wedge (\overline{y}_2\vee \overline{y}_4\vee \overline{y}_6\vee 1)=1\), hence \(y_1\vee y_5=1\), hence \(y_1\vee \overline{y}_2\vee \overline{y}_4\vee y_5\vee \overline{y}_6=1\), hence \((y_1,..,y_6)\in Mod(F_2)\). Since the latter bitstring also lies in \(Mod(F_0)\) and \(Mod(F_1)\), one concludes \((y_1,..,y_6)\in Mod(F)\). \(\square\)

8.3 Here we carry out the \(\rho,\sigma\)-mechanism introduced in 7.1 by explicitely representing \(Mod(G)\) as disjoint union of parts \(\rho_i\cap\sigma_j\), where the 012e-rows \(\rho_i\) derive from the AntiHorn part of \(G\), i.e. from \[(23)\quad (x_1\vee x_2\vee x_3\vee\overline{x}_4) \wedge\;(x_4\vee x_6\vee\overline{x}_7)\wedge (x_1\vee x_5\vee \overline{x}_8),\] and the 012n-rows \(\sigma_j\) from the Horn part of \(G\), i.e. from \[(24)\quad (\overline{x}_1\vee \overline{x}_3\vee x_5\vee\overline{x}_6) \wedge (\overline{x}_2\vee\overline{x}_5\vee x_7)\wedge (\overline{x}_2\vee \overline{x}_4\vee \overline{x}_6\vee x_8).\]

8.3.1 Specifically, like Table 5 also Table 12 relies on a LIFO stack. Its first two members are the top row \((e,e,e,1,2,2,2,2)\) and the bottom row \((2,2,2,0,2,2,2,2)\) (blanks amount to don’t-care 2’s). By construction all bitstrings in the top row are models of the first clause in (23) and, incidentally, of the second clause. Therefore the 3rd clause is pending (to be imposed). In the bottom row the 2nd clause of (23) is pending. After a few more steps one obtains the 012e-rows \(\rho_1\) to \(\rho_7\) whose disjoint union is the modelset of formula (23). Likewise the implication \(n\)-algorithm calculates the 012n-rows \(\sigma_1,...,\sigma_6\) whose disjoint union is the modelset of the Horn formula (24).

8.3.2 Section 9 will be devoted to the systematic computation of intersections of 012e-rows with 012n-rows. But in our toy example the 42 intersections \(\rho_i\cap\sigma_j\) can be determined ad hoc; in particular 21 of them happen to be empty because of 0-1 clashes. How to get, say, \(\rho_5 \cap\sigma_1\) ad hoc? Because of \(5\in zeros(\sigma_1)\) the second \(e\) in \(\rho_5\) is turned to \(0\), which forces the first \(e\) to \(1\). It follows that \(\rho_5 \cap\sigma_1=({\boldsymbol{1}},2,2,0,{\boldsymbol{0}},1,2,1)\cap\sigma_1=:\rho_5' \cap\sigma_1\). Since \(ones(\rho_5')\) covers the first and third \(n\) in \(\sigma_1\), the middle \(n\) turns to \(0\) and one concludes that \(\rho_5 \cap\sigma_1=(1,2,{\boldsymbol{0}},0,0,1,2,1)\).

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
\(e\) \(e\) \(e\) 1 pend. 3
0 pend. 2
\(\rho_1=\) 1 1 final \(\rho_1\cap\sigma_1=\) 1 \(n\) 1 0 \(n\) 1
\(\rho_2=\) 0 \(e\) \(e\) 1 1 final \(\rho_1\cap\sigma_2=\) 1 1 0 0 0
\(\rho_3=\) 0 \(e\) \(e\) 1 0 0 final \(\rho_1\cap\sigma_3=\) 1 0 0 1 0 1 0
0 pend. 2 \(\rho_1\cap\sigma_4=\) 1 0 1 1
0 1 pend. 3 \(\rho_1\cap\sigma_5=\) 1 1 1 1 0 1 0
0 0 0 pend. 3 \(\rho_1\cap\sigma_6=\) 1 1 1 1 1 1
\(\rho_4=\) 0 1 0 final \(\rho_2\cap\sigma_4=\) 0 0 1 1 1
\(\rho_5=\) \(e\) 0 \(e\) 1 1 final \(\rho_2\cap\sigma_5=\) 0 1 1 1 0 1 0
0 0 0 pend. 3 \(\rho_2\cap\sigma_6=\) 0 1 1 1 1 1
\(\rho_6=\) 0 0 0 0 final \(\rho_3\cap\sigma_2=\) 0 \(e\) \(e\) 1 0 0 0
\(\rho_7=\) \(e\) 0 \(e\) 0 0 1 final \(\rho_3\cap\sigma_3=\) 0 0 1 1 0 1 0
\(\rho_4\cap\sigma_3=\) \(n\) \(n\) 0 0 1 0
\(n\) \(n\) 0 \(n\) pend. 3 \(\rho_4\cap\sigma_4=\) 0 0 1 1 0
1 pend. 2 \(\rho_4\cap\sigma_5=\) 1 0 1 1 1 0
\(\sigma_1=\) \(n\) \(n\) 0 \(n\) 1 final \(\rho_5\cap\sigma_1=\) 1 0 0 0 1 1
\(\sigma_2=\) 0 0 0 final \(\rho_5\cap\sigma_4=\) 0 0 1 1 1
\(\sigma_3=\) \(n_1\) \(n_2\) \(n_1\) \(n_2\) 0 1 0 final \(\rho_5\cap\sigma_6=\) 1 0 1 1 1 1
1 pend. 2 \(\rho_6\cap\sigma_2=\) 0 0 0 0 0
\(\sigma_4=\) 0 1 final \(\rho_6\cap\sigma_4=\) 0 0 1 0 0 0
\(\sigma_5=\) 1 \(n\) 1 \(n\) 1 0 final \(\rho_7\cap\sigma_1=\) 1 0 0 0 0 1
\(\sigma_6=\) 1 1 1 1 final \(\rho_7\cap\sigma_4=\) 0 0 1 0 0 1

Table 12: Calculating all models of Horn\(\wedge\)AntiHorn formulas

8.4 According to Theorem 3 the modelset of \(F\) in (20) is the union of the rows \(\theta_1,...,\theta_{21}\) obtained by cutting the last \(s=2\) components of the 21 rows \(\rho_i\cap\sigma_j\) listed in Table 12. A slight drawback is the fact that this union needs not be disjoint. For instance \(\theta_3\subseteq\theta_1\). In the general case the last \(s\) components of \(\rho_i\cap\sigma_j\) may either feature \(e\) symbols or29 \(n\)-symbols. Let thus \(\stackrel{\rightarrow}{e}\) have length \(k\) and let \(k_0\in \{1,2,..,k\}\) be the number of \(e\)-symbols among the last \(s\) components of \(\rho_i\cap\sigma_j\). A moment’s reflection shows that upon cutting these \(s\) components the \(k-k_0\) surviving \(e\)’s of \(\stackrel{\rightarrow}{e}\) simply turn to \(2\)’s. (Likewise for cut wildcards \(\stackrel{\rightarrow}{n}\).) What about the fact that the cut rows, call them \(\theta_i\), may not be disjoint? This may not be disturbing30. If however disjointness is desired, then first replace each 012e-row \(\theta_i\) by a disjoint union of 012-rows (as shown in 9.7.1). Of course a 012-row originating from \(\theta_i\) need not be disjoint from a 012-row originating from \(\theta_j\). In order to achieve overall disjointness proceed as in Section 2.

9 The missing proof↩︎

The purpose of 9.1 and 9.2 is to convince the reader that a simple method to find a bitstring in a set of type \((2e-row)\cap (2n-row)\) probably does not exist. This justifies the techniques in 9.3 and 9.4 that ultimately establish the pending proof of Theorem 1 which was stated in Subsection 3.6. Based on Theorem 1 we show (in Theorem 5 of 9.5) that all bitstrings in a set of type \((2e-row)\cap (2n-row)\) can be enumerated in output-polynomial time. Subsection 9.6 is dedicated to the variant \((2g-row)\cap (2n-row)\), and in 9.7 we give an alternative proof of Theorem 5 which is based on the two questions left open in 3.8.

9.1 Refering to Table 13, we step-wise build a bitstring \(y=(y_1,...,y_{24})\in\tau_0\cap\sigma_0\), starting by setting any component \(y_i\) to 1. For instance, let the seed be \(y_1:=1\). Because \(y_1\) happens to lie in \(\stackrel{\rightarrow}{e_1}\), this \(e\)-wildcard with \(pos(\stackrel{\rightarrow}{e_1})=\{1,2,3,4\}\) is now calmed (Step 1) in the sense that we can set \(y_2,y_3,y_4\) freely (indicated by smileys). Putting \(y_2=y_3=y_4:=0\) is a good choice because in turn it calms \(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_7},\stackrel{\rightarrow}{n_9}\) (Step 2). Thus each future bitstring of type \(y=(1,0,0,0,...)\) will satisfy these three \(n\)-wildcards of \(\sigma_0\). Furthermore, e.g. the fact that \(\sigma_0[5]=\sigma_0[10]=n_9\) make 5 and 10 inviting positions in the sense that \(y_5,y_{10}\) can be chosen risk-free as 0 or 1 in the future. Several other inviting positions are indicated by smileys as well (Step 2). At this stage five pending \(e\)-wildcards \(\stackrel{\rightarrow}{e}\) carry smileys. It makes sense to set exactly one smiley per wildcard \(\stackrel{\rightarrow}{e}\) to \(1\) and the other components to \(0\). This simultaneously calms \(\stackrel{\rightarrow}{e}\) and the 0’s may create new inviting positions; in fact two new ones are created (Step 3). In the same way as Step 2 triggered Step 3, now Step 3 triggers Step 4, and Step 4 triggers Step 5. At this stage no more inviting positions are on offer, and so the procedure halts. We pinned down all \(m=24\) positions, i.e. found a bitstring \(y\in \tau_0\cap\sigma_0\) (spelled out in Table 13). However, observe that planting the seed \(y_1:=1\) (or in fact any seed \(y_j:=1\)) was a risky operation, because it is not guaranteed that the wildcard \(\stackrel{\rightarrow}{n_2}\) will ever be calmed; we were just lucky that \(\stackrel{\rightarrow}{n_2}\) incidentally got calmed in Step 4.

\(1\;\;2\;\;3\;\;4\) \(5\;\;6\;\;7\;\;8\) \(9\;10\;11\) \(12\;13\) \(14\;15\) \(16\;17\) \(18\;19\) \(20\;21\) \(22\;23\;24\)
\({\tau_0}:=\) \(e_1\;e_1\;e_1\;e_1\) \(e_2\;e_2\;e_2\;e_2\) \(e_3\;e_3\;e_3\) \(e_4\;e_4\) \(e_5\;e_5\) \(e_6\;e_6\) \(e_7\;e_7\) \(e_8\;e_8\) \(e_9\;e_9\;e_9\)
\({\sigma_0}:=\) \(n_2\;n_9\;n_7\;n_1\) \(n_9\;n_8\;n_5\;n_1\) \(n_7\;n_9\;n_6\) \(n_7\;n_6\) \(n_5\;n_1\) \(n_7\;n_3\) \(n_4\;n_2\) \(n_3\;n_4\) \(n_2\;n_4\;n_8\)
Step 1 \(1\;\boldsymbol{\stackrel{.\ .}}{\smile}\;\boldsymbol{\stackrel{.\ .}}{\smile}\;\boldsymbol{\stackrel{.\ .}}{\smile}\)
Step 2 \(1\;\;0\;\;0\;\;0\) \(\boldsymbol{\stackrel{.\ .}}{\smile} \boldsymbol{\stackrel{.\ .}}{\smile}\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\boldsymbol{\stackrel{.\ .}}{\smile}\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\) $ $ \(\boldsymbol{\stackrel{.\ .}}{\smile}\)
Step 3 \(0\;\;0\;0\;\;1\) \(0\;1\;\;0\) \(1\;\;0\) \(0\;\;1\) \(1\;\;0\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\)
Step 4 \(\boldsymbol{\stackrel{.\ .}}{\smile}\boldsymbol{\stackrel{.\ .}}{\smile}\) \(1\;0\) \(0\;\;0\;\;1\)
Step 5 \(1\;0\)
\(y:=\) \(1\;\;0\;\;0\;\;0\) \(1\;\;0\;\;0\;\;0\) \(0\;\;1\;\;0\) \(1\;\;0\) \(0\;\;1\) \(1\;\;0\) \(1\;\;0\) \(1\;\;0\) \(0\;\;0\;\;1\)
\({\tau_0}:=\) \(e_1\;e_1\;e_1\;e_1\) \(e_2\;e_2\;e_2\;e_2\) \(e_3\;e_3\;e_3\) \(e_4\;e_4\) \(e_5\;e_5\) \(e_6\;e_6\) \(e_7\;e_7\) \(e_8\;e_8\) \(e_9\;e_9\;e_9\)
\({\sigma_1}:=\) \(n_2\;n_{9}\;n_7\;n_1\) \(n_9\;n_{1}\;n_5\;n_1\) \(n_7\;n_9\;n_{6}\) \(n_7\;n_6\) \(n_{5}\;n_1\) \(n_3\;n_8\) \(n_{4}\;n_{2}\) \(n_3\;n_4\) \(n_8\;n_8\;n_8\)
\(1\;\boldsymbol{\stackrel{.\ .}}{\smile}\;\boldsymbol{\stackrel{.\ .}}{\smile}\;\boldsymbol{\stackrel{.\ .}}{\smile}\)
\(1\;\;0\;\;0\;\;0\) \(\; \boldsymbol{\stackrel{.\ .}}{\smile}\boldsymbol{\stackrel{.\ .}}{\smile} \boldsymbol{\stackrel{.\ .}}{\smile}\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\boldsymbol{\stackrel{.\ .}}{\smile}\) \(\boldsymbol{\stackrel{.\ .}}{\smile}\) $ $
\(0\;\; 0\;\;0\;\;1\) \(0\;\;1\;\;0\) \(1\;\;0\) \(0\;\;1\)
\(0_5\;1_6\) \(1_2\;0_1\) \(1_4\;0_3\) \(0_7\;0_7\;1_8\)

Table 13: Attempts to find one bitstring in a set of type \((e-row)\cap(n-row)\)

9.2 Let us investigate a slight variation \(\sigma_1\) of \(\sigma_0\) (still in Table 13) where \(\stackrel{\rightarrow}{n_2}\) will not get calmed automatically. How to construct a bitstring \(y'\in\tau_0\cap\sigma_1\) nevertheless? Our first step is identical to Step 1 of 9.1, while our second step is almost identical (up to the last smiley) to Step 2 of 9.1. However now there are no longer inviting positions on offer. In particular the wildcard \(\stackrel{\rightarrow}{n_2}\) is not yet calmed. We therefore put out the "n-fire" of position 19 by setting \(y'_{19}:=0\;(=0_1)\). Because \(\stackrel{\rightarrow}{e_7}\) has length 2, this unfortunately triggers an "e-fire" on position 18. Putting it out by setting \(y'_{18}:=1_2\) triggers a new n-fire, and so it goes on with \(0_3,1_4,0_5,1_6\). Fortunately in the end \(y'_{22}=y'_{23}:=0_7,\;y'_{24}:=1_8\) completes the definition of a bitstring \(y'\) in \(\tau_0\cap\sigma_1\). Once more we were lucky, yet an idea how to handle the general case does not emerge. To just mention one issue, how to handle potential \(2\)’s in the original \(2e\)- or \(2n\)-row? In Subsections 9.3 and 9.4 we tackle matters differently.

9.3 It is natural to couple a bipartite graph \(B=B(\rho,\sigma)\) to any given \(2e\)-row \(\rho\) and same length \(2n\)-row \(\sigma\). Its two shores are made up, respectively by the wildcards \(\stackrel{\rightarrow}{e}\) of \(\rho\) and the wildcards \(\stackrel{\rightarrow}{n}\) of \(\sigma\). By definition vertices \(\stackrel{\rightarrow}{e}\) and \(\stackrel{\rightarrow}{n}\) of \(B\) are adjacent iff \(pos(\stackrel{\rightarrow}{e})\cap pos(\stackrel{\rightarrow}{n})\neq\emptyset\). Do matters simplify by looking at the connected components of \(B\)? In 9.1 the whole graph \(B\) was connected and could indeed be traced in one go (by repeatedly accepting inviting positions). In 9.2 the graph \(B\) was also connected but could not be traced that easily.

Here in 9.3 we show that for special types of \(\rho\) and \(\sigma\) the behaviour of \(B\) is more predictible. Namely \(\rho\) and \(\sigma\) must both be lean in the sense that all their wildcards have length 2. For instance \(\rho',\sigma'\) in Table 14 are lean.

1 2 3 4 5 6 7 8 9 10 11 12 13
\(\rho'=\) 2 \(e_2\) \(e_1\) 2 \(e_4\) 2 \(e_3\) \(e_2\) \(e_4\) \(e_3\) 2 \(e_1\) 2
\(\sigma'=\) \(n_5\) \(n_4\) \(n_2\) \(n_3\) \(n_2\) \(n_3\) \(n_6\) \(n_4\) \(n_1\) \(n_5\) 2 \(n_1\) \(n_6\)

Table 14: Intersecting a lean 2e-row with a lean 2n-row

As is true for any two lean rows, each vertex of \(B':=B(\rho',\sigma')\) has degree \(\le 2\). This implies that each connected component is either an isolated vertex, a path, or a cycle. Our \(B'\), shown in Fig. 3, has four connected components. The wildcard \(\stackrel{\longrightarrow}{n_3}:=(n_3,n_3)\) constitutes an isolated component of \(B'\) because \(pos(\stackrel{\longrightarrow}{n_3})=\{4,6\}\subseteq twos(\rho')\). If, say31, we define \((y_4,y_6):=(0,0)\), then the bitstring \((y_4,y_6)\) "satisfies" the connected component \(\big\{\stackrel{\longrightarrow}{n_3}\big\}\) (i.e. the corresponding formula \(\overline{x_4}\vee\overline{x_6}\)).

As to the connected component \(\big\{\stackrel{\longrightarrow}{n_4},\stackrel{\longrightarrow}{e_2}\big\}\), it holds that \(pos(\stackrel{\longrightarrow}{n_4})=pos(\stackrel{\longrightarrow}{e_2})=\{2,8\}\). If we therefore put \((y_2,y_8):=(1,0)\) (or: (0,1)), then \((y_2,y_8)\) satisfies this connected component (which classifies as path, albeit one consisting of a single edge).

As to the connected component \(\big\{\stackrel{\longrightarrow}{n_5},\stackrel{\longrightarrow}{e_3} ,\stackrel{\longrightarrow}{n_6}\big\}\), it is a path as well. One checks that \[pos(\stackrel{\longrightarrow}{n_5})=\{1,10\},\;pos(\stackrel{\longrightarrow}{e_3})=\{10,7\},\;pos(\stackrel{\longrightarrow}{n_6})=\{7,13\}.\] Furthermore32 \(\{1,13\}\subseteq twos(\rho')\). It follows that \((y_1,y_{10},y_7,y_{13}):=(0,1,0,1)\) (or: (1,0,1,0)) satisfies the connected component \(\big\{\stackrel{\longrightarrow}{n_5},\stackrel{\longrightarrow}{e_3} ,\stackrel{\longrightarrow}{n_6}\big\}\).

The fourth connected component \(\big\{\stackrel{\longrightarrow}{e_1},\stackrel{\longrightarrow}{n_2} ,\stackrel{\longrightarrow}{e_4},,\stackrel{\longrightarrow}{n_1}\big\}\) is a 4-cycle which is satisfied by the bitstring \((y_3,y_5,y_9,y_{12}):=(1,0,1,0)\;(or: (0,1,0,1))\). In a bipartite graph all cycles are even. Hence \((1,0,1,0)\) generalizes to \((1,0,1,0,...,1,0)\), and \((0,1,0,1)\) generalizes to \((0,1,0,1,...,0,1)\).

By merging the four constructed bitstrings one obtains a bitstring \((y_1,y_2,..,y_{13})\) that satisfies the whole of \(B'\), i.e. lies in \(\rho'\cap\sigma'\).

9.4 The pleasant state of affairs for lean rows suggests to somehow reduce the general case to the scenario in 9.3. This eventually led to the inductive scheme in Lemma 4 below. First some definitions are in order. Let \(\rho\) be a \(2e\)-row indexed by \(1,2,...,m\). Then \((Nu,Ei)\) is a 01-injection of \(\rho\) if \(Nu\uplus Ei\subseteq\{1,...,m\}\) is such that \(|pos(\stackrel{\rightarrow}{e})\setminus Nu|\ge 2\) for all wildcards \(\stackrel{\rightarrow}{e}\) of \(\rho\). Consider \(\rho\) in Table 15 (and ignore \(\sigma\) for the time being):

1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 3 4 7
\(\rho:=\) \(e_1\) \(e_1\) \(e_1\) \(e_2\) 2 \(e_2\) \(e_2\) \(\;\Rightarrow\;\) \(e_1\) \(\boldsymbol{0}\) \(e_1\) \(e_2\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(e_2\) \(\;\Rightarrow\;\rho':=\) \(e_1\) \(e_1\) \(e_2\) \(e_2\)
\(\sigma:=\) \(n_3\) \(n_3\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(\;\Rightarrow\;\) 2 \(\boldsymbol{0}\) \(n_1\) \(n_1\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) 2 \(\;\Rightarrow\;\sigma':=\) 2 \(n_1\) \(n_1\) 2

Table 15: Applying 01-injections

Thus \((\{2,6\},\{5\})\) is a 01-injection of \(\rho\) since \(pos(\stackrel{\rightarrow}{e_1})\setminus \{2,6\}=\{1,3\}\) and \(pos(\stackrel{\rightarrow}{e_2})\setminus \{2,6\}=\{4,7\}\), yet \((\{2,3\},\emptyset)\) is not since \(pos(\stackrel{\rightarrow}{e_1})\setminus \{2,3\}=\{1\}\). By applying \((Nu,Ei):=(\{2,6\},\{5\})\) to \(\rho\) we get the \(2e\)-row \(\rho'\) in Table 15. Formally, let \(\tau\) be the 012-row defined by \(zeros(\tau):=Nu, ones(\tau):=Ei\), and \(twos(\tau):=(Nu\uplus Ei)^c=\{1,3,4,7\}\). Hence \(\rho\cap\tau\) is the top middle row in Table 15, and \(\rho'\) is obtained by picking those components of \(\rho\cap\tau\) that have indices in \((Nu\uplus Ei)^c\). Generally the application of 01-injections to \(2e\)-rows yields again \(2e\)-rows. (In contrast, applying the faulty \((\{2,3\},\emptyset)\) to \(\rho\) yields \(\tau=(2,0,0,2,2,2,2)\), hence \(\rho\cap\tau=(1,0,0,e_2,2,e_2,e_2)\), hence \(\rho'=({\boldsymbol{1}},e_2,2,e_2,e_2)\), which is not a 2e-row.)

Dually, let \(\sigma\) be a \(2n\)-row indexed by \(\{1,2,...,m\}\). Then \((Nu,Ei)\) is a 01-injection of \(\sigma\) if \(Nu\uplus Ei\subseteq\{1,...,m\}\) is such that \(|pos(\stackrel{\rightarrow}{n})\setminus Ei|\ge 2\) for all wildcards \(\stackrel{\rightarrow}{n}\) of \(\sigma\). Similarly to before one defines "applying" and argues that applying 01-injections to \(2n\)-rows \(\sigma\) results in \(2n\)-rows \(\sigma'\) of usually33 shorter length.

The problem we face is that for given (2e,2n)-pairs \((\rho,\sigma)\) we seek 01-injections that simultaneously apply to both \(\rho\) and \(\sigma\). For instance \((\{2,6\},\{5\})\) is such a simultaneous (sim.) 01-injection for the \((2e,2n)\)-pair \((\rho,\sigma)\) in Table 15. Upon application one gets \((\rho',\sigma')\) in Table 15.

Lemma 4: For each \((2e,2n)\)-pair \((\rho,\sigma)\) there is a sim. 01-injection \((Nu^*,Ei^*)\) with the following property. Upon applying \((Nu^*,Ei^*)\) to \((\rho,\sigma)\) the resulting \((2e,2n)\)-pair \((\rho^*,\sigma^*)\) is lean, i.e. all wildcards occuring in \(\rho^*\) and \(\sigma^*\) have length 2.

Proof. We induct on the common length \(m\) of \(\rho\) and \(\sigma\). The claim being true for \(m\le 2\), we henceforth assume that \(m\ge 3\) and embark on a 3-fold case distinction. In all cases \((\rho,\sigma)\) will be reduced to a shorter pair \((\rho',\sigma')\) by virtue of some sim. 01-injection \((Nu,Ei)\), which is elementary in the sense that \(|Nu|,|Ei|\le 1\). By induction some sim. 01-injection \((Nu',Ei')\) carries \((\rho',\sigma')\) to the claimed type \((\rho^*,\sigma^*)\). Evidently \((Nu^*,Ei^*):=(Nu\cup Nu',Ei\cup Ei')\) then carries \((\rho,\sigma)\) to \((\rho^*,\sigma^*)\).

Case 1: Either \(twos(\rho)\neq\emptyset\) or \(twos(\sigma)\neq\emptyset\). Subcase A: There is \(i\in twos(\rho)\cap twos(\sigma)\). Then applying say34 \((Nu,Ei):=(\{i\},\emptyset)\) to \((\rho,\sigma)\) yields a \((2e,2n)\)-pair \((\rho',\sigma')\) whose sole difference to \((\rho,\sigma)\) is one lost (common) 2-symbol at position \(i\). Subcase B: \(twos(\rho)\cap twos(\sigma)=\emptyset\;and\;twos(\rho)\neq\emptyset\). Then pick any \(i\in twos(\rho)\) and put \((Nu,Ei):=(\{i\},\emptyset)\). Applying \((Nu,Ei)\) to \((\rho,\sigma)\) yields a \((2e,2n)\)-pair \((\rho',\sigma')\) with these properties: \(\rho'\) results from \(\rho\) by dropping a dont-care 2 on position \(i\), and \(\sigma'\) results from \(\sigma\) by dropping the symbol \(n\) on position \(i\) of a wildcard \(\stackrel{\rightarrow}{n}\) and by turning all other components of \(\stackrel{\rightarrow}{n}\) to "2". Subcase C: \(twos(\rho)\cap twos(\sigma)=\emptyset\;and\;twos(\sigma)\neq\emptyset\). Then take \((Nu,Ei):=(\emptyset,\{i\})\) and proceed dually to Subcase B. (The Subcases B and C are not mutually exclusive. After repeated application of Subcases A,B,C one obtains two rows (call them again \(\rho,\sigma\)) with \(twos(\rho)=twos(\sigma)=\emptyset\).)

Case 2: \(twos(\rho)=twos(\sigma)=\emptyset\) and there is a wildcard \(\stackrel{\rightarrow}{e}\) of \(\rho\) with \(|pos(\stackrel{\rightarrow}{e})|=k\ge 3\). Fix \(i\in pos(\stackrel{\rightarrow}{e})\) and put again \((Nu,Ei):=(\{i\},\emptyset)\). Now the effect of applying \((Nu,Ei)\) to \(\rho\) is different: the \(e\)-symbol on position \(i\) gets killed and \(\stackrel{\rightarrow}{e}\) gives way to a wildcard of length \(k-1\ge 2\). The effect of applying \((Nu,Ei)\) to \(\sigma\) is obvious if \(i\in twos(\sigma)\), and otherwise the effect is the same as in Case 1.

Case 3: \(twos(\rho)=twos(\sigma)=\emptyset\) and all wildcards of \(\rho\) have length 2, and there is a wildcard \(\stackrel{\rightarrow}{n}\) of \(\sigma\) with \(|pos(\stackrel{\rightarrow}{n})|=k\ge 3\). This case is much dual to Case 2 and is left to the reader.

If none of these cases apply, then \(\rho\) and \(\sigma\) are already lean. \(\square\)

9.4.1 We are now in a position to tie together various loose ends and to prove Theorem 1 from Subsection 3.6.

Theorem 1: Let \(f:\{0,1\}^m\to\{0,1\}\) be a Boolean function which is in CNF format and of type DisjointPossitive$ $DisjointNeggative. Then the satisfiability of \(f\) can be tested in \(O(m^2)\) time.

Proof. As shown in 3.6, upon investing \(O(m^2)\) time one can achieve the following. Either prove that \(f\) is insatisfiable (because of trivial reasons, as defined in 3.3), or obtain a 2e-row \(\overline{\rho_t}\) and a 2n-row \(\overline{\sigma_t}\) with these properties. They have the same length (\(\overline{m}\le m\)) and it holds that \(\overline{\rho_t}\cap \overline{\sigma_t}\neq\emptyset\) iff \(f\) is satisfiable. In the remainder we prove that \(\overline{\rho_t}\cap \overline{\sigma_t}\neq\emptyset\) always happens. Thus we will pinpoint some bitstring \(y\in\overline{\rho_t}\cap \overline{\sigma_t}\).

To begin with, we can assume that both \(\overline{\rho_t}\) and \(\overline{\sigma_t}\) are indexed by \(1,2,...,\overline{m}\). According to Lemma 4 there is some simultaneous 01-injection \((Nu^*,Ei^*)\) which, applied to \((\overline{\rho_t},\overline{\sigma_t})\), yields a lean \((2e,2n)\)-pair \((\rho',\sigma')\). The common index set of \(\rho'\) and \(\sigma'\) is \(\{1,2,...,\overline{m}\}\setminus (Nu\uplus Ei)\). According to Subsection 9.3 there is a bitstring \(y'\in \rho'\cap\sigma'\). Define a length \(\overline{m}\) bitstring \(y\) as follows. For each \(i\in\{1,...,\overline{m}\}\) put \(y_i:=0\) if \(i\in Nu\), put \(y_i:=1\) if \(i\in Ei\), and put \(y_i:=y'_i\) otherwise. It is clear that \(y\in\overline{\rho_t}\cap \overline{\sigma_t}\). \(\square\)

9.5 Here we show how Theorem 1 can be used to find, in output-polynomial time all bitstrings in the intersection of a 2e-row \(\rho\) with a same length 2n-row \(\sigma\). To fix ideas, consider the e-row \(\rho\) in Table 16 and the n-row \(\sigma\) below. (Don’t-care 2’s will come up later, automatically).

1 2 3 4 5 6 7 8 9 10
\({\rho}:=\) \(e_1\) \(e_2\) \(e_4\) \(e_1\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(e_2\) pending \(n_1\)
\(\sigma:=\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_3\) \(n_3\) \(n_3\) \(n_4\) \(n_4\)
\({\rho_1}:=\) \(\boldsymbol{0}_1\) \(\boldsymbol{e}_2\) \(\boldsymbol{e}_4\) \(1_2\) \(0_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(e_2\) p. \(n_3\)
\({\rho_2}:=\) \(\boldsymbol{1}\) \(\boldsymbol{0}_1\) \(\boldsymbol{e}_4\) \(2\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(0_3\) \(1_2\) p. \(n_2\)
\({\rho_3}:=\) \(\boldsymbol{1}\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(2\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(2\) p. \(n_2\)
\({\rho_{1,1}}:=\) \(0\) \(e_2\) \(e_4\) \(1\) \(0\) \(\boldsymbol{0}\) \(\boldsymbol{1}\) \(\boldsymbol{e}_4\) \(e_4\) \(e_2\) p. \(n_4\;\Rightarrow\;2\;f.r.\;of\;card=9+4\)
\({\rho_{1,2}}:=\) \(0\) \(e_2\) \(e_4\) \(1\) \(0\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(\boldsymbol{e}_4\) \(e_4\) \(e_2\) p. \(n_4\;\Rightarrow\;2\;f.r.\;of\;card=9+4\)
\({\rho_{1,3}}:=\) \(0\) \(e_2\) \(e_4\) \(1\) \(0\) \(\boldsymbol{1}\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(e_4\) \(e_2\) p. \(n_4\;\Rightarrow\;2\;f.r.\;of\;card=3+2\)
\({\rho_2}:=\) \(1\) \(0\) \(e_4\) \(2\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(0\) \(1\) p. \(n_2\)
\({\rho_3}:=\) \(1\) \(1\) \(0\) \(2\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(2\) p. \(n_2\)
\({\rho_{2,1}}:=\) \(1\) \(0\) \(e_4\) \(\boldsymbol{0}\) \(\boldsymbol{e}_3\) \(e_3\) \(e_3\) \(e_4\) \(0\) \(1\) p. \(n_3\)
\({\rho_{2,2}}:=\) \(1\) \(0\) \(e_4\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(e_3\) \(e_3\) \(e_4\) \(0\) \(1\) p. \(n_3\Rightarrow\;3\;f.r.\;of\;card= 3+3+1\)
\({\rho_3}:=\) \(1\) \(1\) \(0\) \(2\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(2\) p. \(n_2\Rightarrow\;10\;f.r.\;of\;card=...=31\)
\({\rho_{2,1,1}}:=\) \(1\) \(0\) \(e_4\) \(0\) \(e_3\) \(\boldsymbol{0}\) \(\boldsymbol{e}_3\) \(\boldsymbol{e}_4\) \(0\) \(1\) final,card=9
\({\rho_{2,1,2}}:=\) \(1\) \(0\) \(e_4\) \(0\) \(2\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(\boldsymbol{e}_4\) \(0\) \(1\) final,card=6
\({\rho_{2,1,3}}:=\) \(1\) \(0\) \(1\) \(0\) \(2\) \(\boldsymbol{1}\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(0\) \(1\) final,card=2

Table 16: Calculating all* bitstrings in sets of type \((2e-row)\cap(2n-row)\)*

Recall from 2.2 that the following is an instance of the general behaviour of Abraham 0-Flags: \[(25)\quad (n_1,n_1,n_1)=(0,2,2)\uplus(1,0,2)\uplus(1,1,0)\] Accordingly, with \((n_1,n_1,n_1)\) coming from \(\sigma\), we conclude \[\rho\cap({\boldsymbol{n}_1,n_1,n_1},2,2,2,2,2)=\big(\rho\cap({\boldsymbol{0},2,2},2,2,2,2,2,2,2)\big) \;\uplus\; \big(\rho\cap({\boldsymbol{1},0,2},2,2,2,2,2,2,2)\big)\] \[\uplus \big(\rho\cap({\boldsymbol{1},1,0},2,2,2,2,2,2,2)\big)=:\;\rho_1\uplus\rho_2\uplus\rho_3,\]

where \(\rho_1,\rho_2,\rho_3\) are defined in Table 16. As in 4.2 we call them the canddate sons of \(\rho\). The components \(0_1,1_2,0_3\) of \(\rho_1\) indicate 0,1-propagation (as on the bottom of Table 13). Likewise for \(\rho_2.\) Using the terminology of 9.1, all bitstrings in \(\rho_1\uplus\rho_2\uplus\rho_3\) calm \(\stackrel{\rightarrow}{n_1}\). Incidently \(\rho_1\) also calms \(\stackrel{\rightarrow}{n_2}\), and so \(\stackrel{\rightarrow}{n_3}\) is pending. For \(\rho_2,\rho_3\) the imposition of \(\stackrel{\rightarrow}{n_2}\) is pending.

9.5.1 Before continuing in 9.5.2 we need to pause and ask: Concerning general starter rows \(\rho\) and \(\sigma\) (of type 2e and 2n), is it true that while imposing \(n\)-wildcards all arising 012e-rows \(\overline{\rho}\) stay35 feasible? Not necessarily, but infeasible rows can be detected fast and eliminated. Namely, consider \(\overline{\rho}:=\rho_1\) in Table 16. From \(\rho\cap\sigma\neq\emptyset\) (Thm.1) does not follow that \(\overline{\rho}\cap\sigma\neq\emptyset\) (since \(\overline{\rho}\subseteq\rho\)). In order to decide \(\overline{\rho}\cap\sigma\stackrel{?}{=}\emptyset\), upon applying 0,1-propagation (if necessary) one either finds in \(O(m^2)\) time that \(\overline{\rho}\cap\sigma{=}\emptyset\) by trivial reasons, or that \(\overline{\rho}\cap\sigma\neq\emptyset\) by Theorem 1. In the former case \(\overline{\rho}\) is infeasible and gets deleted. In the latter case \(\overline{\rho}\) is feasible, and at least one of its candidate sons will remain feasible (since the union of all its candidate sons contains \(\overline{\rho}\cap\sigma\)).

9.5.2 We now resume (without feasibility tests, for brevity) the imposition of the pending \(n\)-wildcards in Table 16. Recall that always the top row of the LIFO stack, here \(\rho_1\), comes first. Upon using again an Abraham 0-flag it follows that now \(\stackrel{\rightarrow}{n_4}\) is pending in all of \(\rho_{1,1},\rho_{1,2},\rho_{1,3}\). In order to impose \(\stackrel{\rightarrow}{n_4}\) upon \(\rho_{1,1}\) one has to set (Abraham \(2\times 2\) flag) its last two components to \((e_4,e_2):=(0,e_2)\), respectively \((e_4,e_2):=(1,0)\). (The latter choice forces the first \(e_2\) to become \(1\)). We see that \(\rho_{1,1}\) gives way to two final rows of cardinalities \(3\cdot3\) and \(2\cdot 2\). Similarly \(\rho_{1,2}\) gives way to two final rows whose cardinalities sum up as \(9+4\). For \(\rho_{1,3}\) we get \(3+2\). Upon removing the six final rows from the LIFO stack, its rows are now \(\rho_2\) and \(\rho_3\). The top row \(\rho_2\) gives way to \(\rho_{2,1}\) and \(\rho_{2,2}\) which both have \(\stackrel{\rightarrow}{n_3}\) pending. While we detail how \(\rho_{2,1}\) gives way to 3 final rows, handling \(\rho_{2,2}\) is left to the reader. Ditto for \(\rho_3\). To summarize, \(\rho\cap\sigma\) contains 86 bitstrings which get packaged into 22 disjoint 012e-rows.

Theorem 5: Let \(f:\{0,1\}^m\to\{0,1\}\) be a Boolean function which is in CNF format and of type DisjointPossitive$ $DisjointNeggative. Then \(Mod(f)\) can be represented as disjoint union of \(R\) many 012e-rows in time \(O(Rm^3)\).

Proof. The algorithm outlined in Table 16 involves a so called row-splitting mechanism; this rather abstract concept is fully defined in Section 8 of [W1]. If some Boolean function \(\varphi\) admits such a row-splitting mechanism, then [W1, Thm.1] one can represent \(Mod(\varphi)\) as disjoint union of \(R\) multivalued rows in time \(O(Rh(d+s))\). Translated to our scenario the parameter \(h\) is the number of \(n\)-wildcards in the \(2n\)-row \(\sigma\) derived from DisjointNeggative. (Recall from 3.5 that calculating \(\sigma\) costs \(O(m^2)\).) Further \(s\) is the time it takes to compute the candidate sons of a fixed LIFO top row and to discard the infeasible ones among them. As seen in 9.5.1 here \(s\) is \(O(m^2)\). Finally \(d\) is the time it takes to compute which \(n\)-wildcard is pending in a candidate son. It is easy to see that also \(d=O(m^2)\). It hence follows that \(O(Rh(d+s))=O(Rm(m^2+m^2)=O(Rm^3)\). \(\square\)

In the proof above the \(n\)-wildcards of \(\sigma\) were imposed one after the other upon the 2e- row \(\rho\). Dually one could impose the \(e\)-wildcards upon the 2n-row \(\sigma\). In practise one would impose the type of wildcard of which there are fewer36.

Because presumably not all readers know [W1,Thm.1], and by other reasons (e.g. verifying the claim about 86), we offer an alternative proof of Theorem 5 in 9.7. Specifically, it will settle the two questions left open in 3.8.2.

9.6 Sections 4 to 7 showed various applications of enumerating all bitstrings in sets \(\rho\cap\sigma\) of type \((2e-row)\cap(2n-row)\). Recall from 5.1.2 the concept of a \(g\)-wildcard. Let now \(\theta\cap\sigma\) be of type \(({\boldsymbol{2}g}-row)\cap(2n-row)\). This variant has the same complexity as Theorem 5 and has several applications as well (work in progress). In the present article the alternative proof of Theorem 5 in 9.7 relies on the specific \(({2g}-row)\cap(2n-row)\) type calculation carried out in 9.6.3.

9.6.1 In order to show that \(\theta\cap\sigma\neq\emptyset\) in the first place, let \(\rho\) be the 2e-row obtained from \(\theta\) by replacing each \(g\)-wildcard by a \(e\)-wildcard of the same length. By Theorem 1 there is a bitstring \(y\in\rho\cap\sigma\). By replacing suitable (yet not uniquely determined) 1’s of \(y\) with 0’s one obtains a bitstring \(y'\) such that \(|ones(y')\cap pos(\stackrel{\rightarrow}{e})|=1\) for all wildcards \(\stackrel{\rightarrow}{e}\) of \(\rho\). Hence \(y'\in \theta\), and \(y'\in \sigma\) since \(zeros(y')\supseteq zeros(y)\).

9.6.2 To fix ideas, let \(\sigma\) be as in Table 16 and let \(\theta\) be the \(g\)-row obtained from the \(e\)-row \(\rho\) in Table 16 by replacing each \(e\)-wildcard with a same length \(g\)-wildcard. Both rows are rendered again in Table 17. We now show that enumerating \(\theta\cap\sigma\) works considerably faster than enumerating \(\rho\cap\sigma\). For starters, observe that on positions 6 and 7 we have \((g_3,g_3)\) and \((n_3,n_3)\). Each instantiation of the whole wildcard \((g_3,g_3,g_3)\) features two 0’s and one 1. Since necessarily there is a 0 among its last two components, each bitstring \(y\in\theta\) satisfies \(\stackrel{\rightarrow}{n_3}\). It thus remains to impose \(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_2},\stackrel{\rightarrow}{n_4}\) upon \(\theta\).

1 2 3 4 5 6 7 8 9 10
\({\theta}:=\) \(g_1\) \(g_2\) \(g_4\) \(g_1\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\) \(g_2\)
\(\sigma:=\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_3\) \(n_3\) \(n_3\) \(n_4\) \(n_4\)
\({\theta_1}:=\) \(\boldsymbol{0}_1\) \(\boldsymbol{g}_2\) \(\boldsymbol{g}_4\) \(1_2\) \(0_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\) \(g_2\) \(pending\;n_4\)
\({\theta_2}:=\) \(\boldsymbol{1}\) \(\boldsymbol{0}_1\) \(\boldsymbol{g}_4\) \(0\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(0_3\) \(1_2\) final
\({\theta_3}:=\) \(\boldsymbol{1}\) \(\boldsymbol{1}_1\) \(\boldsymbol{0}\) \(0\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\) \(0_2\) final
\({\theta_{1,1}}:=\) \(0\) \(g_2\) \(g_4\) \(1\) \(0\) \(g_3\) \(g_3\) \(g_4\) \(\boldsymbol{0}\) \(\boldsymbol{g}_2\) final
\({\theta_{1,2}}:=\) \(0\) \(1\) \(0\) \(1\) \(0\) \(g_3\) \(g_3\) \(0\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) final
\({\tau}:=\) \(g_1\) \(g_1\) \(g_1\) \(g_2\) \(g_2\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\)
\(\sigma_{aux}:=\) \(n\) \(n'\) \(n''\) \(n\) \(2\) \(2\) \(2\) \(n''\) \(n''\) \(n'\)
\({\tau_1}:=\) \(\boldsymbol{0}\) \(g_1\) \(g_1\) \(\boldsymbol{g}_2\) \(g_2\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\) pending \(n'\)
\({\tau_2}:=\) \(\boldsymbol{1}\) \(0\) \(0\) \(\boldsymbol{0}\) \(1\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(g_4\) final, card=6
\({\tau_{1,1}}:=\) \(0\) \(\boldsymbol{0}\) \(1\) \(g_2\) \(g_2\) \(g_3\) \(g_3\) \(g_3\) \(g_4\) \(\boldsymbol{g}_4\) pending \(n''\)
\({\tau_{1,2}}:=\) \(0\) \(\boldsymbol{1}\) \(0\) \(g_2\) \(g_2\) \(g_3\) \(g_3\) \(g_3\) \(1\) \(\boldsymbol{0}\) final, card=6
\(\tau_{1,1,1}:=\) \(0\) \(0\) \(1\) \(g_2\) \(g_2\) \(g_3\) \(g_3\) \(\boldsymbol{0}\) \(\boldsymbol{g}_4\) \(g_4\) final, card=8
\(\tau_{1,1,2}:=\) \(0\) \(0\) \(1\) \(g_2\) \(g_2\) \(0\) \(0\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) \(1\) final, card=2

Table 17: Calculating all* bitstrings in sets of type \((2g-row)\cap(2n-row)\)*

Upon raising a \(3\times 3\) Abraham 0-Flag the row \(\theta\) gives way to \(\theta_1,\theta_2,\theta_3\), all of which by construction calm \(\stackrel{\rightarrow}{n_1}\). All three also happen to calm \(\stackrel{\rightarrow}{n_2}\). Furthermore \(\theta_2,\theta_3\) happen to calm \(\stackrel{\rightarrow}{n_4}\), and hence are final. Therefore it remains to impose \(\stackrel{\rightarrow}{n_4}\) upon \(\theta_1\). This results in the final rows \(\theta_{1,1},\theta_{1,2}\).

9.6.3 We spell out a second example of this kind because it will be crucial in the alternative proof of Theorem 5. Thus consider \(\tau\) and \(\sigma_{aux}\) on the bottom of Table 17. Using the order of imposition \(n,n',n''\) yields \(\tau\cap\sigma_{aux}=\tau_2\uplus\tau_{1,2}\uplus\tau_{1,1,1}\uplus\tau_{1,1,2}\). In particular \(|\tau\cap\sigma_{aux}|=22\). (The mere cardinality is predictable via inclusion-exclusion, i.e. \(36-6-6-2+0+0+0-0=22\). However, as usual inclusion-exclusion does not tell us how to list the counted objects, let alone listing them in compressed manner.)

9.7 Let \((\rho,\sigma)\) be a \((2e,2n)\)-pair. In 9.5 we enumerated \(\rho\cap\sigma\) by imposing the \(n\)-wildcards of \(\sigma\) one-by-one upon \(\rho\). Here we carry out the alternative approach that we glimpsed in 3.8. Namely, for the same \(\sigma\) (repeated in Table 18) we write \(\sigma=\sigma_{1,4,6,9}\uplus\sigma_{1,4,6,10}\uplus\cdots\uplus\sigma_{3,5,8,10}\) with 36 natural 012-rows \(\sigma_{i,j,k,\ell}\) (details in 9.7.1). It then follows from distributivity that \[(26)\quad\rho\cap\sigma=(\rho\cap\sigma_{1,4,6,9})\uplus (\rho\cap\sigma_{1,4,6,10})\uplus\cdots\uplus (\rho\cap\sigma_{3,5,8,10})\] Each set of bitstrings \(\rho\cap\sigma_{i,j,k,\ell}\) is either empty (by trivial reasons) or can be expressed as 012e-row (as in Table 4). Trouble is (9.7.2), in order to achieve output-polynomial time we must not stumble upon quadruples \((i,j,k,\ell)\) which are bad in that \(\rho\cap\sigma_{i,j,k,\ell}\) is empty.

9.7.1 With the wildcards \(\stackrel{\rightarrow}{n_1},\stackrel{\rightarrow}{n_2},\stackrel{\rightarrow}{n_3},\stackrel{\rightarrow}{n_4}\) of \(\sigma\) we associate certain Abraham 0-Flags (Figure 4) whose rows are labeled by the (subscripted) letters \(\alpha,\beta,\gamma,\delta\). Specifically:

  • \((n_1,n_1,n_1)=(0,2,2)\uplus(1,0,2)\uplus(1,1,0)\;=:\;\alpha_1\uplus\alpha_2\uplus\alpha_3\)

  • \((n_2,n_2)=(0,2)\uplus(1,0)\;=:\;\beta_4\uplus\beta_5\)

  • \((n_3,n_3,n_3)=(0,2,2)\uplus(1,0,2)\uplus(1,1,0)\;=:\;\gamma_6\uplus\gamma_7\uplus\gamma_8\)

  • \((n_4,n_4)=(0,2)\uplus(1,0)\;=:\;\delta_9\uplus\delta_{10}\)

A hitting set \(X\) w.r.t. a hypergraph \(\mathbb{H}\) is called exact if \(|H\cap X|=1\) for all \(H\in \mathbb{H}\). Hence the exact hitting sets (EHSes) \(\{i,j,k,\ell\}\) of the hypergraph \(\mathbb{H}(\sigma):=\{\{1,2,3\},\{4,5\},\{6,7,8\},\{9,10\}\}\) bijectively37 match the \(3\cdot 2\cdot 3\cdot2=36\) quadruples \((i,j,k,\ell)\in \{1,2,3\}\times\{4,5\}\times\{6,7,8\}\times\{9,10\}\). The benefit of switching from quadruples to EHSes is that the latter can be modelled as the members of this g-row: \[(28)\quad \tau:=(g_1,g_1,g_1,\;g_2,g_2,\;g_3,g_3,g_3,\;g_4,g_4)\] If henceforth we speak of quadruples, think of them as members of \(\tau\). Each quadruple \((i,j,k,\ell)\) yields a 012-row \(\sigma_{i,j,k,\ell}\) contained in \(\sigma\). For instance \((1,5,6,9)\) yields
\(\sigma_{1,5,6,9}:=(0,2,2,\;1,0,\;0,2,2,\;0,2)\), which arises by concatenating the 012-rows \(\alpha_1,\beta_5,\gamma_6,\delta_{9}\). It is clear that distinct 012-rows of this type are disjoint and that their union equals \(\sigma\).

The row \(\sigma_{3,4,8,9}=(1,1,{\boldsymbol{0}},\;0,2,\;1,1,{\boldsymbol{0}},\;,{\boldsymbol{0}},2)\) has (among other such rows) the property that \(\rho\cap\sigma_{3,4,8,9}=\emptyset\) since \(pos(\stackrel{\rightarrow}{e_4})=\{3,8,9\}\subseteq zeros(\sigma_{3,4,8,9})\). In order to discard bad quadruples like \(\{3,4,8,9\}\) in advance, first observe that for any38 012-row \(\sigma^*\) of length 10 an empty intersection \(\rho\cap\sigma^*\) is only possible if \(zeros(\sigma^*)\) contains at least one of \(pos(e_1),pos(e_2),pos(e_3),pos(e_4)\). That’s because by (the proof of) Theorem 1 empty intersections are caused by trivial reasons and because 0-1 clashes are ruled out in the present scenario (\(\rho\) being a \(2e\)-row). Interestingly, each 012-row \(\sigma_{i,j,k,\ell}\) satisfies \(pos(e_3)\not\subseteq zeros(\sigma_{i,j,k,\ell})\). Indeed, \(pos(e_3)=\{5,6,7\}\subseteq zeros(\sigma_{i,j,k,\ell})\) implies that \(\sigma_{i,j,k,\ell}\) contains the pieces \(\beta_5,\gamma_6,\gamma_7\) (since all 0’s in the Abraham 0-Flags of Fig.4 occur in the diagonals). This contradicts the fact that \(\{6,7\}\not\subseteq\{i,j,k,\ell\}\) (recall that \(\{i,j,k,\ell\}\) is an exact hitting set of \(\mathbb{H}(\sigma)\)).

9.7.2 More systematically, which quadruples \(\{i,j,k,\ell\}\in\tau\) yield bad rows \(\sigma_{i,j,k,\ell}\)? For instance all rows \(\sigma_{1,4,k,\ell}\) are bad because they contain the pieces \(\alpha_1,\beta_4\), and so \(pos(e_1)=\{1,4\}\subseteq zeros(\sigma_{1,4,k,\ell})\) implies \(\rho\cap\sigma_{1,4,k,\ell}=\emptyset\). Likewise quadruples of type \(\{2,j,k,10\}\) and \(\{3,j,8,9\}\) are bad; and there are no other types of bad quadruples. In other words, \(\{i,j,k,\ell\}\in\tau\) is non-bad iff it is a noncover of the hypergraph \(\{\{1,4\},\{2,10\},\{3,8,9\}\}\). We therefore seek the members of \(\tau\cap\sigma_{aux}\). Here \(\tau\) is from (28) and \(\sigma_{aux}:=(n,n',n'',n,2,2,2,n'',n'',n')\) is the auxiliary row coupled to \(\sigma\).

1 2 3 4 5 6 7 8 9 10
\({\rho}:=\) \(e_1\) \(e_2\) \(e_4\) \(e_1\) \(e_3\) \(e_3\) \(e_3\) \(e_4\) \(e_4\) \(e_2\)
\({\sigma}:=\) \(n_1\) \(n_1\) \(n_1\) \(n_2\) \(n_2\) \(n_3\) \(n_3\) \(n_3\) \(n_4\) \(n_4\)
\(\sigma_{1,5,6,9}:=\) \(0\) \(2\) \(2\) \(1\) \(0\) \(0\) \(2\) \(2\) \(\boldsymbol{0}\) \(\boldsymbol{2}\) where \(\{1,5,6,9\}\in\tau_2\)
1. \(\rho\cap\sigma_{1,5,6,9}=\) \(0\) \(e_2\) \(e_4\) \(1\) \(0\) \(0\) \(1\) \(e_4\) \(0\) \(e_2\) cardinality=9
\(\sigma_{1,5,6,10}:=\) \(0\) \(2\) \(2\) \(1\) \(0\) \(0\) \(2\) \(2\) \(\boldsymbol{1}\) \(\boldsymbol{0}\) where \(\{1,5,6,10\}\in\tau_2\)
2. \(\rho\cap\sigma_{1,5,6,10}=\) \(0\) \(1\) \(2\) \(1\) \(0\) \(0\) \(1\) \(2\) \(1\) \(0\) cardinality=4
\(\sigma_{2,4,6,9}:=\) \(1\) \(0\) \(2\) \(0\) \(2\) \(0\) \(2\) \(2\) \(0\) \(2\) where \(\{2,4,6,9\}\in\tau_{1,2}\)
3. \(\rho\cap\sigma_{2,4,6,9}=\) \(1\) \(0\) \(e_4\) \(0\) \(e_3\) \(0\) \(e_3\) \(e_4\) \(0\) \(1\) cardinality=9
\(\sigma_{3,4,7,9}:=\) \(1\) \(1\) \(0\) \(0\) \(2\) \(1\) \(0\) \(2\) \(0\) \(2\) where \(\{3,4,7,9\}\in\tau_{1,1,1}\)
4. \(\rho\cap\sigma_{3,4,7,9}=\) \(1\) \(1\) \(0\) \(0\) \(2\) \(1\) \(0\) \(1\) \(0\) \(2\) cardinality=4
\(\sigma_{3,4,8,10}:=\) \(1\) \(1\) \(0\) \(0\) \(2\) \(1\) \(1\) \(0\) \(1\) \(0\) where \(\{3,4,8,10\}\in\tau_{1,1,2}\)
5. \(\rho\cap\sigma_{3,4,8,10}:=\) \(1\) \(1\) \(0\) \(0\) \(2\) \(1\) \(1\) \(0\) \(1\) \(0\) cardinality=2

Table 18: Five among 22 non-bad 012e-rows constituting \(\rho\cap\sigma\)

The rows \(\tau\) and \(\sigma_{aux}\) conveniently happen to coincide with the same name rows in Table 17, where it was shown that \(\tau\cap\sigma_{aux}=\tau_2\uplus\tau_{1,2}\uplus\tau_{1,1,1}\uplus\tau_{1,1,2}\). The latter were 01g-rows of cardinalities 6,6,8,2. In the present context the 22 good quadruples \(\{i,j,k,\ell\}\in\tau\cap\sigma_{aux}\) yield exactly the 22 non-bad 012e-rows \(\sigma_{i,j,k,\ell}\). Table 18 displays five39 random rows \(\sigma_{i,j,k,\ell}\subseteq\rho\cap\sigma\). For instance, the fact that \((1,5,6,9)\) differs from \((1,5,6,10)\) only in the last component, is reflected by \(\sigma_{1,5,6,9}\) and \(\sigma_{1,5,6,10}\) only differing in the last two components. (Nevertheless \(\rho\cap\sigma_{1,5,6,9}\) and \(\rho\cap \sigma_{1,5,6,10}\) differ in five components.)

10 References↩︎

  • E. Mark Gold, Complexity of Automaton Identification from Given Data, Information and Control 37 (1978) 302-320.

  • M.R. Garey, D.S. Johnson, Computers and intractability: A guide to the theory of NP-completeness, Freemann and Company, 1979.

  • A. Gainer-Dewar, P. Vera-Licona, The minimal hitting set generation problem: algorithms and computation, SIAM J. Discrete Math. 31 (2017) 63-100.

  • T. Mori, T. Akutsu, Attractor detection and enumeration algorithms for Boolean networks, Computational and Structural Biotechnology Journal 20 (2022) 2512-2520.

  • K. Makino, S.Tamaki, M.Yamamoto, Derandomizing the HSSW algorithm for 3-SAT. Algorithmica 2013;67(2):112–24.

  • K.Murakami, T. Uno, Efficient algorithms for dualizing large-scale hypergraphs, Disc. Appl. Math. 170 (2014) 83-94.

  • M.Wild, Compression with wildcards: From CNFs to orthogonal DNFs by imposing the clauses one-by-one, The Computer Journal, Vol. 65 (2022) p.1073-1087.

  • M.Wild, The joy of implications, aka pure Horn formulas: Mainly a survey, Theoretical Computer Science 658 (2017) 264-292.

  • M.Wild, Compression with wildcards: Abstract simplicial complexes, Quaestiones Mathematicae 46 (2023) 1151-1173.

  • M.Wild, Compression with wildcards: All exact or all minimal hitting sets, Open Mathematics 2023; 21:20220596.


  1. There are various ways to define Boolean functions. For us \(f\) will mostly be defined by a CNF.↩︎

  2. Generally two Boolean functions \(f,g\) are equisatisfiable when \(f\) is satisfiable iff \(g\) is satisfiable. (This implies nothing about their actual satisfiability)↩︎

  3. We sometimes use the synonym "polynomial total time".↩︎

  4. Although quite technical, Section 2 only deals with plain 0-bits, 1-bits, and don’t-care symbols. This contrasts with later Sections that use "baroque" (yet highly efficient) symbols to capture sets of bitstrings. Apart from catering for Sections 4 and 7, Section 2 is actually of broader interest.↩︎

  5. Many texts use "\(\ast\)" instead of "2".↩︎

  6. We henceforth use \(\uplus\) to indicate disjoint union.↩︎

  7. In the more general scenario of 4.6.3 there will be a second option.↩︎

  8. They were introduced, in honor of J.A. Abraham, in [W1,p.1078].↩︎

  9. The possible impression that this little extra generality is unwarranted will soon be corrected. Of course, in general the indices of the negative literals (here 1,2) are arbitrary.↩︎

  10. Notice that a DisjointPossitive-CNF like \((x_1\vee x_2\vee x_3)\wedge (x_4\vee x_5)\wedge \overline{x}_2\wedge\overline{x}_6\) is equivalent to the smoother DisjointPossitive-CNF \((x_1\vee x_3)\wedge (x_4\vee x_5)\wedge\overline{x}_6\). It is hence no extra restriction (but is convenient) if we henceforth assume that this kind of smoothing has been carried out already.↩︎

  11. Generally newly enforced components \(\boldsymbol{0},1\) are rendered boldface. They trigger further adaptions: \((n_1,n_1)\) in \(\sigma_0\) becomes \((0,2)\) in \(\sigma_1\), and \((n_3,n_3,n_3,n_3)\) becomes \((1,n_3,n_3,n_3)\), and \((n_4,n_4,n_4)\) becomes \((1,n_4,n_4)\). The repercussions of forced 0’s and 1’s are rendered as \(\rightarrow 2\) or \(\rightarrow 1\) or \(\rightarrow 0\). The latter incidentally does not occur in the present example. Why?↩︎

  12. For instance, \(ones\) starts off as \(ones(\rho_0)\), then becomes \(ones(\rho_1)\), and so forth. Note that a parameter \(twos\) is superfluous; at any moment it is implicitely given as the complement of \(ones\uplus zeros\uplus pos(e_1)\uplus\cdots\). For \(\sigma_0\) everything works dually, using \(ones',zeros',pos(n_1), etc.\)↩︎

  13. Using clever data structures (tree-based or hash-based sets) one could push \(O(|pos(e_7)|)\) to \(O(log|pos(e_7)|)\) or even further. But this is pointless in view of some \(O(m^2)\) cost around the corner.↩︎

  14. It has the extra property that all Horn-clauses are pure, i.e. contain a positive literal.↩︎

  15. In fact, what we employ is a Last-In-First-Out (LIFO) stack. This is a fundamental data structure in computer science which is taylored for depth first search.↩︎

  16. We keep the terminology of previous publications; recall that "transversal" is just another name for "hitting set".↩︎

  17. Because \(\emptyset\in{\cal P}(F_i)\) for all \(1\le i\le t\).↩︎

  18. Set-ideals behave dually to the forthcoming.↩︎

  19. For instance, if \(\mathbb{H}\) is the family of all connected edge sets of a connected graph on \(n\) vertices, then \(\mu(\mathbb{H})=n-1\).↩︎

  20. Of course \((g,g,g)\subseteq(e,e,e))\).↩︎

  21. Recall that a subgraph \(H\) of a graph \(G\) is spanning if \(H\) has the same vertex-set as \(G\).↩︎

  22. This is not how the standard \(n\)-algorithm (glimpsed in 4.3) proceeds. However, whatever creative way might procure the desired type of \(\tilde{\sigma}\) is allowed.↩︎

  23. Generally a facet of \({\cal F}_{\ell,n}\) has no \(\ell\)-clique, but it may or may not have \(k\)-anticliques (for various \(k\)).↩︎

  24. Planted trees never occur iff \(\Phi\) is bijective; this is the familiar cycle representation of permutations.↩︎

  25. These arise frequently in biology.↩︎

  26. Actually, by duality one could replace "positive" by "negative". This also shows that in the statement of Theorem 2 one can interpret "monotone" in the broader sense that each component function must either be positive or negative.↩︎

  27. Since each 3-CNF is evidently of type Horn\(\wedge\)AntiHorn, also Horn\(\wedge\)AntiHorn is universal.↩︎

  28. Information to the contrary is welcome. On the other hand, as is well known, 2-CNFs have plenty real world applications.↩︎

  29. But not both, as will be explained in Section 9.↩︎

  30. Even the non-disjoint format suffices for random sampling, and the sum of all cardinalities \(|\theta_i|\) is an upper bound for \(|Mod(F)|\).↩︎

  31. Instead of (0,0), also (0,1) or (1,0) work, but not (1,1).↩︎

  32. Generally for each connected component which is a path \(P\) of length \(m\ge 2\) the following holds. Let \(\alpha,\beta\) the two unique positions covered by \(P\) which satisfy \(\alpha,\beta\in twos(\rho)\cup twos(\sigma)\). If \(m\) is even then either \(\alpha,\beta\in twos(\rho)\) or \(\alpha,\beta\in twos(\sigma)\). If \(m\) is odd, then either (\(\alpha\in twos(\rho),\beta\in twos(\sigma)\)) or (\(\beta\in twos(\rho),\alpha\in twos(\sigma)\)).↩︎

  33. Of course, applying 01-injections of type \((Nu,\emptyset)\) to \(\sigma\) yields \(\sigma'=\sigma\). Dually, applying \((\emptyset, Ei)\) to 2e-rows has no effect.↩︎

  34. Applying \((\emptyset,\{i\})\) has the same effect.↩︎

  35. In accordance with the definition of Sec. 4.2 here "feasible" means that \(\overline{\rho}\cap\sigma\neq\emptyset\).↩︎

  36. This is akin to Table 12 where some of the set-systems \(\rho_i\cap\sigma_j\) could more easily be rewritten (ad hoc) as 012e-rows, and others as 012n-rows.↩︎

  37. What about the fact that \(\{2,5,7,9\}=\{9,2,7,5\}\), but \((2,5,7,9)\neq(9,2,7,5)\)? This does not affect bijectivity since \((9,2,7,5)\not\in\{1,2,3\}\times\{4,5\}\times\{6,7,8\}\times\{9,10\}\).↩︎

  38. Here it is irrelevant whether or not \(\sigma^*\) is contained in \(\sigma\).↩︎

  39. The entusiastic reader will hasten to calculate all 22 of them and to confirm that their cardinalities add up to 86 (which coincides with the value obtained in 9.5).↩︎