text:
# New Results on Monotone Dualization and Generating Hypergraph TransversalsA shorter version of this paper appears in: Proceedings of the 34th ACM Symposium on Theory of Computing (STOC-02), May 19-21, 2002, Montreal, Quebec, Canada.

## 1 Introduction

Recall that the prime CNF of a monotone Boolean function $`f`$ is the unique formula $`\phi =_{cS}c`$ in conjunctive normal form where $`S`$ is the set of all prime implicates of $`f`$, i.e., minimal clauses $`c`$ which are logical consequences of $`f`$. In this paper, we consider the following problem:

Problem Dualization     Input: The prime CNF $`\phi `$ of a monotone Boolean function $`f=f(x_1,\mathrm{},x_m)`$.  Output: The prime CNF $`\psi `$ of its dual $`f^d=\overline{f}(\overline{x}_1,\mathrm{},\overline{x}_m)`$.

It is well known that Dualization is equivalent to the Transversal Computation problem, which requests to compute the set of all minimal transversals (i.e., minimal hitting sets) of a given hypergraph $``$, in other words, the transversal hypergraph $`\mathrm{𝑇𝑟}()`$ of $``$. Actually, these problems can be viewed as the same problem, if the clauses in a monotone CNF $`\phi `$ are identified with the sets of variables they contain. Dualization is a search problem; the associated decision problem Dual is to decide whether two given monotone prime CNFs $`\phi `$ and $`\psi `$ represent a pair $`(f,g)`$ of dual Boolean functions. Analogously, the decision problem Trans-Hyp associated with Transversal Computation is deciding, given hypergraphs $``$ and $`𝒢`$, whether $`𝒢=\mathrm{𝑇𝑟}()`$.

Dualization and several problems which are like transversal computation known to be computationally equivalent to problem Dualization (see ) are of interest in various areas such as database theory (e.g. ), machine learning and data mining (e.g., ), game theory (e.g. ), artificial intelligence (e.g., ), mathematical programming (e.g., ), and distributed systems (e.g., ) to mention a few.

While the output CNF $`\psi `$ can be exponential in the size of $`\phi `$, it is currently not known whether $`\psi `$ can be computed in output-polynomial (or polynomial total) time, i.e., in time polynomial in the combined size of $`\phi `$ and $`\psi `$. Any such algorithm for Dualization (or for Transversal Computation) would significantly advance the state of the art of several problems in the above application areas. Similarly, the complexity of Dual (equivalently, Trans-Hyp) is open since more than 20 years now (cf. ).

Note that Dualization is solvable in polynomial total time on a class $`𝒞`$ of hypergraphs iff Dual is in PTIME for all pairs $`(,𝒢)`$, where $`𝒞`$ . Dual is known to be in co-NP and the best currently known upper time-bound is quasi-polynomial time . Determining the complexities of Dualization and Dual, and of equivalent problems such as the transversal problems, is a prominent open problem. This is witnessed by the fact that these problems are cited in a rapidly growing body of literature and have been referenced in various survey papers and complexity theory retrospectives, e.g. .

Given the importance of monotone dualization and equivalent problems for many application areas, and given the long standing failure to settle the complexity of these problems, emphasis was put on finding tractable cases of Dual and corresponding polynomial total-time cases of Dualization. In fact, several relevant tractable classes were found by various authors; see e.g.  and references therein. Moreover, classes of formulas were identified on which Dualization is not just polynomial total-time, but where the conjuncts of the dual formula can be enumerated with incremental polynomial delay, i.e., with delay polynomial in the size of the input plus the size of all conjuncts so far computed, or even with polynomial delay, i.e., with delay polynomial in the input size only. On the other hand, there are also results which show that certain well-known algorithms for Dualization are not polynomial-total time. For example,  pointed out that a well-known sequential algorithm, in which the clauses $`c_i`$ of a CNF $`\phi =c_1\mathrm{}c_m`$ are processed in order $`i=1,\mathrm{},m`$, is not polynomial-total time in general. Most recently,  showed that this holds even if an optimal ordering of the clauses is assumed (i.e., they may be arbitrarily arranged for free).

Main Goal. The main goal of this paper is to present important new polynomial total time cases of Dualization and, correspondingly, PTIME solvable subclasses of Dual which significantly improve previously considered classes. Towards this aim, we first present a new algorithm Dualize and prove its correctness. Dualize can be regarded as a generalization of a related algorithm proposed by Johnson, Yannakakis, and Papadimitriou . As other dualization algorithms, Dualize reduces the original problem by self-reduction to smaller instances. However, the subdivision into subproblems proceeds according to a particular order which is induced by an arbitrary fixed ordering of the variables. This, in turn, allows us to derive some bounds on intermediate computation steps which imply that Dualize, when applied to a variety of input classes, outputs the conjuncts of $`\psi `$ with polynomial delay or incremental polynomial delay. In particular, we show positive results for the following input classes:

* Degenerate CNFs. We generalize the notion of $`k`$-degenerate graphs  to hypergraphs and define $`k`$-degenerate monotone CNFs resp. hypergraphs. We prove that for any constant $`k`$, Dualize works with polynomial delay on $`k`$-degenerate CNFs. Moreover, it works in output-polynomial time on $`O(\mathrm{log}n)`$-degenerate CNFs.
* Read-$`k`$ CNFs. A CNF is read-$`k`$, if each variable appears at most $`k`$ times in it. We show that for read-$`k`$ CNFs, problem Dualization is solvable with polynomial delay, if $`k`$ is constant, and in total polynomial time, if $`k=O(\mathrm{log}(\phi )`$. Our result for constant $`k`$ significantly improves upon the previous best known algorithm , which has a higher complexity bound, is not polynomial delay, and outputs the clauses of $`\psi `$ in no specific order. The result for $`k=O(\mathrm{log}\phi )`$ is a non-trivial generalization of the result in , which was posed as an open problem .
* Acyclic CNFs. There are several notions of hypergraph resp. monotone CNF acyclicity , where the most general and well-known is $`\alpha `$-acyclicity. As shown in , Dualization is polynomial total time for $`\beta `$-acyclic CNFs; $`\beta `$-acyclicity is the hereditary version of $`\alpha `$-acyclicity and far less general. A similar result for $`\alpha `$-acyclic prime CNFs was left open. (For non-prime $`\alpha `$-acyclic CNFs, this is trivially as hard as the general case.) In this paper, we give a positive answer and show that for $`\alpha `$-acyclic (prime) $`\phi `$, Dualization is solvable with polynomial delay.
* Formulas of Bounded Treewidth. The treewidth  of a graph expresses its degree of cyclicity. Treewidth is an extremely general notion, and bounded treewidth generalizes almost all other notions of near-acyclicity. Following , we define the treewidth of a hypergraph resp. monotone CNF $`\phi `$ as the treewidth of its associated (bipartite) variable-clause incidence graph. We show that Dualization is solvable with polynomial delay (exponential in $`k`$) if the treewidth of $`\phi `$ is bounded by a constant $`k`$, and in polynomial total time if the treewidth is $`O(\mathrm{log}\mathrm{log}\phi )`$.
* Recursive Applications of Dualize and $`k`$-CNFs. We show that if Dualize is applied recursively and the recursion depth is bounded by a constant, then Dualization is solved in polynomial total time. We apply this to provide a simpler proof of the known result  that monotone $`k`$-CNFs (where each conjunct contains at most $`k`$ variables) can be dualized in output-polynomial time.

After deriving the above results, we turn our attention (in Section 5) to the fundamental computational nature of problems Dual and Trans-Hyp in terms of complexity theory.

Limited nondeterminism. In a landmark paper, Fredman and Khachiyan  proved that problem Dual can be solved in quasi-polynomial time. More precisely, they first gave an algorithm A solving the problem in $`n^{O(\mathrm{log}^2n)}`$ time, and then a more complicated algorithm B whose runtime is bounded by $`n^{4\chi (n)+O(1)}`$ where $`\chi (n)`$ is defined by $`\chi (n)^{\chi (n)}=n`$. As noted in , $`\chi (n)\mathrm{log}n/\mathrm{log}\mathrm{log}n=o(\mathrm{log}n)`$; therefore, duality checking is feasible in $`n^{o(\mathrm{log}n)}`$ time. This is the best upper bound for problem Dual so far, and shows that the problem is most likely not NP-complete.

A natural question is whether Dual lies in some lower complexity class based on other resources than just runtime. In the present paper, we advance the complexity status of this problem by showing that its complement is feasible with limited nondeterminism, i.e, by a nondeterministic polynomial-time algorithm that makes only a poly-logarithmic number of guesses. For a survey on complexity classes with limited nondeterminism, and for several references see . We first show by using a simple but effective technique, which succinctly describes computation paths, that testing non-duality is feasible in polynomial time with $`O(\mathrm{log}^3n)`$ nondeterministic steps. We then observe that this approach can be improved to obtain a bound of $`O(\chi (n)\mathrm{log}n)`$ nondeterministic steps. This result is surprising, because most researchers dealing with the complexity of Dual and Trans-Hyp believed so far that these problems are completely unrelated to limited nondeterminism.

We believe that the results presented in this paper are significant, and we are confident that they will be prove useful in various contexts. First, we hope that the various polynomial/output-polynomial cases of the problems which we identify will lead to better and more general methods in various application areas (as we show, e.g. in learning and data mining ), and that based on the algorithm Dualize or some future modifications, further relevant tractable classes will be identified. Second, we hope that our discovery on limited nondeterminism provides a new momentum to complexity research on Dual and Trans-Hyp, and will push it towards settling these longstanding open problems.

The rest of this paper is structured as follows. The next section provides some preliminaries and introduces notation. In Section 3, we present our algorithm Dualize for dualizing a given monotone prime CNF. After that, we exploit this algorithm in Section 4 to derive a number of polynomial instance classes of the problems Dualization and Dual. In Section 5 we then show that Dual can be solved with limited nondeterminism.

## 2 Preliminaries and Notation

A Boolean function (in short, function) is a mapping $`f:\{0,1\}^n\{0,1\}`$, where $`v\{0,1\}^n`$ is called a Boolean vector (in short, vector). As usual, we write $`gf`$ if $`f`$ and $`g`$ satisfy $`g(v)f(v)`$ for all $`v\{0,1\}^n`$, and $`g<f`$ if $`gf`$ and $`gf`$. A function $`f`$ is monotone (or positive), if $`vw`$ (i.e., $`v_iw_i`$ for all $`i`$) implies $`f(v)f(w)`$ for all $`v,w\{0,1\}^n`$. Boolean variables $`x_1,x_2,\mathrm{},x_n`$ and their complements $`\overline{x}_1,\overline{x}_2,\mathrm{},\overline{x}_n`$ are called literals. A clause (resp., term) is a disjunction (resp., conjunction) of literals containing at most one of $`x_i`$ and $`\overline{x}_i`$ for each variable. A clause $`c`$ (resp., term $`t`$) is an implicate (resp., implicant) of a function $`f`$, if $`fc`$ (resp., $`tf`$); moreover, it is prime, if there is no implicate $`c^{}<c`$ (resp., no implicant $`t^{}>t`$) of $`f`$, and monotone, if it consists of positive literals only. We denote by $`PI(f)`$ the set of all prime implicants of $`f`$.

A conjunctive normal form (CNF) (resp., disjunctive normal form, DNF) is a conjunction of clauses (resp., disjunction of terms); it is prime (resp. monotone), if all its members are prime (resp. monotone). For any CNF (resp., DNF) $`\rho `$, we denote by $`|\rho |`$ the number of clauses (resp., terms) in it. Furthermore, for any formula $`\phi `$, we denote by $`V(\phi )`$ the set of variables that occur in $`\phi `$, and by $`\phi `$ its length, i.e., the number of literals in it. We occasionally view CNFs $`\phi `$ also as sets of clauses, and clauses as sets of literals, and use respective notation (e.g., $`c\phi `$, $`\overline{x}_1c`$ etc).

As well-known, a function $`f`$ is monotone iff it has a monotone CNF. Furthermore, all prime implicants and prime implicates of a monotone $`f`$ are monotone, and it has a unique prime CNF, given by the conjunction of all its prime implicates. For example, the monotone $`f`$ such that $`f(v)=1`$ iff $`v\{(1100),(1110),(1101),(0111),(1111)\}`$ has the unique prime CNF $`\phi =x_2(x_1x_3)(x_1x_4)`$.

Recall that the dual of a function $`f`$, denoted $`f^d`$, is defined by $`f^d(x)=\overline{f}(\overline{x})`$, where $`\overline{f}`$ and $`\overline{x}`$ is the complement of $`f`$ and $`x`$, respectively. By definition, we have $`(f^d)^d=f`$. From De Morgan’s law, we obtain a formula for $`f^d`$ from any one of $`f`$ by exchanging $``$ and $``$ as well as the constants $`0`$ and $`1`$. For example, if $`f`$ is given by $`\phi =x_1x_2\overline{x}_1(\overline{x}_3x_4)`$, then $`f^d`$ is represented by $`\psi =(x_1x_2)(\overline{x}_1\overline{x}_3x_4)`$. For a monotone function $`f`$, let $`\psi =_{cC}(_{x_ic}x_i)`$ be the prime CNF of $`f^d`$. Then by De Morgan’s law, $`f`$ has the (unique) prime DNF $`\rho =_{cC}(_{x_ic}x_i)`$; in the previous example, $`\rho =x_1x_2x_2x_3x_4`$. Thus, we will regard Dualization also as the problem of computing the prime DNF of $`f`$ from the prime CNF of $`f`$.

## 3 Ordered Transversal Generation

In what follows, let $`f`$ be a monotone function and

$`\phi `$ $`=`$ $`{\displaystyle \underset{i=1}{\overset{m}{}}}c_i`$ (1)
its prime CNF, where we assume without loss of generality that all variables $`x_j`$ ($`j=1,2,\mathrm{}n`$) appear in $`\phi `$. Let $`\phi _i`$ ($`i=0,1,\mathrm{},n`$) be the CNF obtained from $`\phi `$ by fixing variables $`x_j=1`$ for all $`j`$ with $`ji+1`$. By definition, we have $`\phi _0=1`$ (truth) and $`\phi _n=\phi `$. For example, consider $`\phi =(x_1x_2)(x_1x_3)(x_2x_3x_4)(x_1x_4)`$. Then we have $`\phi _0=\phi _1=1`$, $`\phi _2=(x_1x_2)`$, $`\phi _3=(x_1x_2)(x_1x_3)`$, and $`\phi _4=\phi `$. Similarly, for the prime DNF

$`\psi `$ $`=`$ $`_{t\mathrm{𝑃𝐼}(f)}t`$ (2)
of $`f`$, we denote by $`\psi _i`$ the DNF obtained from $`\psi `$ by fixing variables $`x_j=1`$ for all $`j`$ with $`ji+1`$. Clearly, we have $`\phi _i\psi _i`$, i.e., $`\phi _i`$ and $`\psi _i`$ represent the same function denoted by $`f_i`$.

###### Proposition 3.1

Let $`\phi `$ and $`\psi `$ be any CNF and DNF for $`f`$, respectively. Then, for all $`i0`$,

* $`\phi _i\phi `$ and $`|\phi _i||\phi |`$, and
* $`\psi _i\psi `$ and $`|\psi _i||\psi |`$.

Denote by $`\mathrm{\Delta }^i`$ ($`i=1,2,\mathrm{},n`$) the CNF consisting of all the clauses in $`\phi _i`$ but not in $`\phi _{i1}`$. For the above example, we have $`\mathrm{\Delta }^1=1`$, $`\mathrm{\Delta }^2=(x_1x_2)`$, $`\mathrm{\Delta }^3=(x_1x_3)`$, and $`\mathrm{\Delta }^4=(x_2x_3x_4)(x_1x_4)`$. Note that $`\phi _i=\phi _{i1}\mathrm{\Delta }^i`$; hence, for all $`i=1,2,\mathrm{},n`$ we have

$`\psi _i`$ $``$ $`\psi _{i1}\mathrm{\Delta }^i{\displaystyle \underset{t\mathrm{𝑃𝐼}(f_{i1})}{}}(t\mathrm{\Delta }^i).`$ (3)
Let $`\mathrm{\Delta }^i[t]`$, for $`i=1,\mathrm{},n`$ denote the CNF consisting of all the clauses $`c`$ such that $`c`$ contains no literal in $`t_{i1}`$ and $`cx_i`$ appears in $`\mathrm{\Delta }^i`$. For example, if $`t=x_2x_3x_4`$ and $`\mathrm{\Delta }^4=(x_2x_3x_4)(x_1x_4)`$, then $`\mathrm{\Delta }^4[t]=x_1`$. It follows from (3) that for all $`i=1,2,\mathrm{},n`$

$`\psi _i`$ $``$ $`{\displaystyle \underset{t\mathrm{𝑃𝐼}(f_{i1})}{}}\left((t\mathrm{\Delta }^i[t])(tx_i)\right).`$ (4)
###### Lemma 3.2

For every term $`t\mathrm{𝑃𝐼}(f_{i1})`$, let $`g_{i,t}`$ be the function represented by $`\mathrm{\Delta }^i[t]`$. Then $`|\mathrm{𝑃𝐼}(g_{i,t})||\psi _i||\psi |`$.

###### Proof.

Let $`V=\{x_1,x_2,\mathrm{},x_n\}`$ and let $`s\mathrm{𝑃𝐼}(g_{i,t})`$. Then by (4), $`ts`$ is an implicant of $`\psi _i`$. Hence, some $`t^s\mathrm{𝑃𝐼}(f_i)`$ exists such that $`t^sts`$. Note that $`V(t)V(\mathrm{\Delta }^i[t])=\mathrm{}`$, $`t`$ and $`\mathrm{\Delta }^i[t]`$ have no variable in common, and hence we have $`V(s)V(t^s)(V(s)V(t))`$, since otherwise there exists a clause $`c`$ in $`\mathrm{\Delta }^i[t]`$ such that $`V(c)V(t^s)=\mathrm{}`$, a contradiction. Thus $`V(t^s)V(\mathrm{\Delta }^i[t])=V(s)`$. For any $`s^{}\mathrm{𝑃𝐼}(g_{i,t})`$ such that $`ss^{}`$, let $`t^s,t^s^{}\mathrm{𝑃𝐼}(f_i)`$ such that $`t^sts`$ and $`t^s^{}ts^{}`$, respectively. By the above discussion, we have $`t^st^s^{}`$. This completes the proof. ∎

We now describe our algorithm Dualize for generating $`\mathrm{𝑃𝐼}(f)`$. It is inspired by a similar graph algorithm of Johnson, Yannakakis, and Papadimitriou , and can be regarded as a generalization.

> Algorithm Dualize
>
> | Input: | The prime CNF $`\phi `$ of a monotone function $`f`$. |
> | --- | --- |
> | Output: | The prime DNF $`\psi `$ of $`f`$, i.e. all prime implicants of $`f`$. |
>
> Compute the smallest prime implicant $`t_{min}`$ of $`f`$ and set $`Q:=\left\{t_{min}\right\}`$;
>
> while $`Q\mathrm{}`$ do begin
>
> Remove the smallest $`t`$ from $`Q`$ and output $`t`$;
>
> for each $`i`$ with $`x_iV\left(t\right)`$ and $`\mathrm{\Delta }^i\left[t\right]1`$ do begin
>
> Compute the prime DNF $`\rho _{(t,i)}`$ of the function represented by $`\mathrm{\Delta }^i\left[t\right]`$;
>
> for each term $`t^{}`$ in $`\rho _{(t,i)}`$ do begin
>
> if $`t_{i1}t^{}`$ is a prime implicant of $`f_i`$ then begin
>
> Compute the smallest prime implicant $`t^{}`$ of $`f`$ such that $`t_i^{}=t_{i1}t^{}`$;
>
> $`Q:=Q\left\{t^{}\right\}`$
>
> end$`\{`$if$`\}`$ end$`\{`$for$`\}`$ end$`\{`$for$`\}`$
>
> end$`\{`$while$`\}`$

Here, we say that term $`s`$ is smaller than term $`t`$ if $`_{x_jV(s)}2^{nj}<_{x_jV(t)}2^{nj}`$; i.e., as vector, $`s`$ is lexicographically smaller than $`t`$.

###### Theorem 3.3

Algorithm Dualize correctly outputs all $`t\mathrm{𝑃𝐼}(f)`$ in increasing order.

###### Proof.

(Sketch) First note that the term $`t^{}`$ inserted in $`Q`$ when $`t`$ is output is larger than $`t`$. Indeed, $`t^{}`$ ($`1`$) and $`t_{i1}`$ are disjoint and $`V(t^{})\{x_1,`$$`\mathrm{},x_{i1}\}`$. Hence, every term in $`Q`$ is larger than all terms already output, and the output sequence is increasing. We show by induction that, if $`t`$ is the smallest prime implicant of $`f`$ that was not output yet, then $`t`$ is already in $`Q`$. This clearly proves the result.

Clearly, the above statement is true if $`t=t_{min}`$. Assume now that $`tt_{min}`$ is the smallest among the prime implicants not output yet. Let $`i`$ be the largest index such that $`t_i`$ is not a prime implicant of $`f_i`$. This $`i`$ is well-defined, since otherwise $`t=t_{min}`$ must hold, a contradiction. Now we have (1) $`i<n`$ and (2) $`i+1V(t)`$, where (1) holds because $`t_n(=t)`$ is a prime implicant of $`f_n(=f)`$ and (2) follows from the maximality of $`i`$. Let $`s\mathrm{𝑃𝐼}(f_i)`$ such that $`V(s)V(t_i)`$, and let $`K=V(t_i)V(s)`$. Then $`K\mathrm{}`$ holds, and since $`x_{i+1}V(t)`$, the term $`t^{}=_{x_jK}x_j`$ is a prime implicant of $`\mathrm{\Delta }^{i+1}[s]`$. There exists $`s^{}\mathrm{𝑃𝐼}(f)`$ such that $`s_i^{}=s`$ and $`x_{i+1}V(s^{})`$, since $`sx_{i+1}\mathrm{𝑃𝐼}(f_{i+1})`$. Note that $`\mathrm{\Delta }^{i+1}[s]0`$. Moreover, since $`s^{}`$ is smaller than $`t`$, by induction $`s^{}`$ has already been output. Therefore, $`t^{}=_{x_jK}x_j`$ has been considered in the inner for-loop of the algorithm. Since $`s_i^{}t^{}(=t_i=t_{i+1})`$ is a prime implicant of $`f_{i+1}`$, the algorithm has added the smallest prime implicant $`t^{}`$ of $`f`$ such that $`t_{i+1}^{}=t_{i+1}`$. We finally claim that $`t^{}=t`$. Otherwise, let $`k`$ be the first index in which $`t^{}`$ and $`t`$ differ. Then $`k>i+1`$, $`x_kV(t)`$ and $`x_kV(t^{})`$. However, this implies $`t_k\mathrm{𝑃𝐼}(f_k)`$, contradicting the maximality of $`i`$. ∎

###### Remark 3.1

(1) The decomposition rule (4) was already used in .

(2) In step 1, we could generate any prime implicant $`t`$ of $`f`$, and choose then a lexicographic term ordering inherited from a dynamically generated variable ordering. In step 2, it is sufficient that any monotone DNF $`\tau _{(t,i)}`$ of the function represented by $`\mathrm{\Delta }^i[t]`$ is computed, rather than its prime DNF $`\rho _{(t,i)}`$. This might make the algorithm faster.

Let us consider the time complexity of algorithm Dualize. We store $`Q`$ as a binary tree, where each leaf represents a term $`t`$ and the left (resp., right) son of a node at depth $`j10`$, where the root has depth 0, encodes $`x_jV(t)`$ (resp., $`x_jV(t)`$). In Step 1, we can compute $`t_{min}`$ in $`O(\phi )`$ time and initialize $`Q`$ in $`O(n)`$ time.

As for Step 2, let $`T_{(t,i)}`$ be the time required to compute the prime DNF $`\rho _{(t,i)}`$ from $`\mathrm{\Delta }^i[t]`$. By analyzing its substeps, we can see that each iteration of Step 2 requires $`_{x_iV(t)}(T_{(t,i)}+|\rho _{(t,i)}|O(\phi ))`$ time.

Indeed, we can update $`Q`$ (i.e., remove the smallest term and add $`t^{}`$) in $`O(n)`$ time. For each $`t`$ and $`i`$, we can construct $`\mathrm{\Delta }^i[t]`$ in $`O(\phi )`$ time. Moreover, we can check whether $`t_{i1}t^{}`$ is a prime implicant of $`f_i`$ and if so, we can compute the smallest prime implicant $`t^{}`$ of $`f`$ such that $`t_i^{}=t_{i1}t^{}`$ in $`O(\phi )`$ time; note that $`t^{}`$ is the smallest prime implicant of the function obtained from $`f`$ by fixing $`x_j=1`$ if $`x_jV(t_it^{})`$ and $`0`$ if $`x_jV(t_it^{})`$ for $`ji`$.

Hence, we have the following result.

###### Theorem 3.4

The output delay of Algorithm Dualize is bounded by

$$\underset{t\mathrm{𝑃𝐼}(f)}{\mathrm{max}}\left(\underset{x_iV(t)}{}(T_{(t,i)}+|\rho _{(t,i)}|O(\phi ))\right)$$
(5)
time, and Dualize needs in total time

$$\underset{t\mathrm{𝑃𝐼}(f)}{}\underset{x_iV(t)}{}(T_{(t,i)}+|\rho _{(t,i)}|O(\phi )).$$
(6)
If the $`T_{(t,i)}`$ are bounded by a polynomial in the input length, then Dualize becomes a polynomial delay algorithm, since $`|\rho _{(t,i)}|T_{(t,i)}`$ holds for all $`t\mathrm{𝑃𝐼}(f)`$ and $`x_iV(t)`$. On the other hand, if they are bounded by a polynomial in the combined input and output length, then Dualize is a polynomial total time algorithm, where $`|\rho _{(t,i)}||\psi |`$ holds from Lemma 3.2. Using results from , we can construct from Dualize an incremental polynomial time algorithm for Dualization, which however might not output $`\mathrm{𝑃𝐼}(f)`$ in increasing order. Summarizing, we have the following corollary.

###### Corollary 3.5

Let $`T=\mathrm{max}\{T_{(t,i)}t\mathrm{𝑃𝐼}(f),x_iV(t)\}`$. Then, if $`T`$ is bounded by a

* polynomial in $`n`$ and $`\phi `$, then Dualize is an $`O(n\phi T)`$ polynomial delay algorithm;
* polynomial in $`n`$, $`\phi `$, and $`\psi `$, then Dualize is an $`O(n|\psi |(T+|\psi |\phi ))`$ polynomial total-time algorithm; moreover, Dualization is solvable in incremental polynomial time.

In the next section, we identify sufficient conditions for the boundedness of $`T`$ and fruitfully apply them to solve open problems and improve previous results.

## 4 Polynomial Classes

### 4.1 Degenerate CNFs

We first consider the case of small $`\mathrm{\Delta }^i[t]`$. Generalizing a notion for graphs (i.e., monotone $`2`$-CNFs) , we call a monotone CNF $`\phi `$ $`k`$-degenerate, if there exists a variable ordering $`x_1,\mathrm{},x_n`$ in which $`|\mathrm{\Delta }^i|k`$ for all $`i=1,2,\mathrm{},n`$. We call a variable ordering $`x_1,\mathrm{},x_n`$ smallest last as in , if $`x_i`$ is chosen in the order $`i=n,n1,\mathrm{},1`$ such that $`|\mathrm{\Delta }^i|`$ is smallest for all variables that were not chosen. Clearly, a smallest last ordering gives the least $`k`$ such that $`\phi `$ is $`k`$-degenerate. Therefore, we can check for every integer $`k1`$ whether $`\phi `$ is $`k`$-degenerate in $`O(\phi )`$ time. If this holds, then we have $`|\rho _{(t,i)}|n^k`$ and $`T_{(t,i)}=O(kn^{k+1})`$ for every $`t\mathrm{𝑃𝐼}(f)`$ and $`iV(t)`$ (for $`T_{(t,i)}`$, apply the distributive law to $`\mathrm{\Delta }^i[t]`$ and remove terms $`t`$ where some $`x_jV(t)`$ has no $`c\mathrm{\Delta }^i[t]`$ such that $`V(t)V(c)=\{x_j\}`$). Thus Theorem 3.4 implies the following.

###### Theorem 4.1

For $`k`$-degenerate CNFs $`\phi `$, Dualization is solvable with $`O(\phi n^{k+1})`$ polynomial delay if $`k1`$ is constant.

Applying the result of  that log-clause CNF is dualizable in incremental polynomial time, we obtain a polynomiality result also for non-constant degeneracy:

###### Theorem 4.2

For $`O(\mathrm{log}\phi )`$-degenerate CNFs $`\phi `$, problem Dualization is solvable in polynomial total time.

In the following, we discuss several natural subclasses of degenerate CNFs.

#### 4.1.1 Read-bounded CNFs

A monotone CNF $`\phi `$ is called read-$`k`$, if each variable appears in $`\phi `$ at most $`k`$ times. Clearly, read-$`k`$ CNFs are $`k`$-degenerate, and in fact $`\phi `$ is read-$`k`$ iff it is $`k`$-degenerate under every variable ordering. By applying Theorems 4.1 and 4.2, we obtain the following result.

###### Corollary 4.3

For read-$`k`$ CNFs $`\phi `$, problem Dualization is solvable

* with $`O(\phi n^{k+1})`$ polynomial delay, if $`k`$ is constant;
* in polynomial total time, if $`k=O(\mathrm{log}(\phi ))`$.

Note that Corollary 4.3 (i) trivially implies that Dualization is solvable in $`O(|\psi |n^{k+2})`$ time for constant $`k`$, since $`\phi kn`$. This improves upon the previous best known algorithm , which is only $`O(|\psi |n^{k+3})`$ time, not polynomial delay, and outputs $`\mathrm{𝑃𝐼}(f)`$ in no specific order. Corollary 4.3 (ii) is a non-trivial generalization of the result in , which was posed as an open problem .

#### 4.1.2 Acyclic CNFs

Like in graphs, acyclicity is appealing in hypergraphs resp. monotone CNFs from a theoretical as well as a practical point of view. However, there are many notions of acyclicity for hypergraphs (cf. ), since different generalizations from graphs are possible. We refer to $`\alpha `$-, $`\beta `$-,$`\gamma `$-, and Berge-acyclicity as stated in , for which the following proper inclusion hierarchy is known:

Berge-acyclic $``$ $`\gamma `$-acyclic $``$ $`\beta `$-acyclic $``$ $`\alpha `$-acyclic.

The notion of $`\alpha `$-acyclicity came up in relational database theory. A monotone CNF $`\phi `$ is $`\alpha `$-acyclic iff $`\phi =1`$ or reducible by the GYO-reduction , i.e., repeated application of one of the two rules:

(1) If variable $`x_i`$ occurs in only one clause $`c`$, remove $`x_i`$ from $`c`$.

(2) If distinct clauses $`c`$ and $`c^{}`$ satisfy $`V(c)V(c^{})`$, remove $`c`$ from $`\phi `$.

to $`0`$ (i.e., the empty clause). Note that $`\alpha `$-acyclicity of a monotone CNF $`\phi `$ can be checked, and a suitable GYO-reduction output, in $`O(\phi )`$ time . A monotone CNF $`\phi `$ is $`\beta `$-acyclic iff every CNF consisting of clauses in $`\phi `$ is $`\alpha `$-acyclic. As shown in , the prime implicants of a monotone $`f`$ represented by a $`\beta `$-acyclic CNF $`\phi `$ can be enumerated (and thus Dualization solved) in $`p(\phi )|\psi |`$ time, where $`p`$ is a polynomial in $`\phi `$. However, the time complexity of Dualization for the more general $`\alpha `$-acyclic prime CNFs was left as an open problem. We now show that it is solvable with polynomial delay, by showing that $`\alpha `$-acyclic CNFs are $`1`$-degenerate.

Let $`\phi 1`$ be a prime CNF. Let $`a=a_1,a_2,\mathrm{},a_q`$ be a GYO-reduction for $`\phi `$, where $`a_{\mathrm{}}=x_i`$ if the $`\mathrm{}`$-th operation removes $`x_i`$ from $`c`$, and $`a_{\mathrm{}}=c`$ if it removes $`c`$ from $`\phi `$. Consider the unique variable ordering $`b_1,b_2,\mathrm{},b_n`$ such $`b_i`$ occurs after $`b_j`$ in $`a`$, for all $`i<j`$. For example, let $`\phi =c_1c_2c_3c_4`$, where $`c_1=(x_1x_2x_3)`$, $`c_2=(x_1x_3x_5)`$, $`c_3=(x_1x_5x_6)`$ and $`c_4=(x_3x_4x_5)`$. Then $`\phi `$ is $`\alpha `$-acyclic, since it has the GYO-reduction

$$a_1=x_2,a_2=c_1,a_3=x_4,a_4=x_6,a_5=c_4,a_6=c_3,a_7=x_1,a_8=x_3,a_9=x_5.$$

From this sequence, we obtain the variable ordering

$$b_1=x_5,b_2=x_3,b_3=x_1,b_4=x_6,b_5=x_4,b_6=x_2.$$

As easily checked, this ordering shows that $`\phi `$ is $`1`$-degenerate. Under this ordering, we have $`\mathrm{\Delta }^1=\mathrm{\Delta }^2=1`$, $`\mathrm{\Delta }^3=(x_1x_3x_5)`$, $`\mathrm{\Delta }^4=(x_1x_5x_6)`$, $`\mathrm{\Delta }^5=(x_3x_4x_5)`$, and $`\mathrm{\Delta }^6=(x_1x_2x_3)`$. This is not accidental.

###### Lemma 4.4

Every $`\alpha `$-acyclic prime CNF is $`1`$-degenerate.

Note that the converse is not true, i.e., there exists a $`1`$-degenerate CNF that is not $`\alpha `$-acyclic. For example, $`\phi =(x_1x_2x_3)(x_1x_2x_4)(x_2x_3x_4x_5)`$ is such a CNF. Lemma 4.4 and Theorem 4.1 imply the following result.

###### Corollary 4.5

For $`\alpha `$-acyclic CNFs $`\phi `$, problem Dualization is solvable with $`O(\phi n^2)`$ delay.

Observe that for a prime $`\alpha `$-acyclic $`\phi `$, we have $`|\phi |n`$. Thus, if we slightly modify algorithm Dualize to check $`\mathrm{\Delta }^i=1`$ in advance (which can be done in linear time in a preprocessing phase) such that such $`\mathrm{\Delta }^i`$ need not be considered in step 2, then the resulting algorithm has $`O(n|\phi |\phi )`$ delay. Observe that the algorithm in  solves, minorly adapted for enumerative output, Dualization for $`\beta `$-acyclic CNFs with $`O(n|\phi |\phi )`$ delay. Thus, the above modification of Dualize is of the same order.

#### 4.1.3 CNFs with bounded treewidth

A tree decomposition (of type I) of a monotone CNF $`\phi `$ is a tree $`T=(W,E)`$ where each node $`wW`$ is labeled with a set $`X(w)V(\phi )`$ under the following conditions:

1. $`_{wW}X(w)=V(\phi )`$;
2. for every clause $`c`$ in $`\phi `$, there exists some $`wW`$ such that $`V(c)X(w)`$; and
3. for any variable $`x_iV`$, the set of nodes $`\{wWx_iX(w)\}`$ induces a (connected) subtree of $`T`$.

The width of $`T`$ is $`\mathrm{max}_{wW}|X(w)|1`$, and the treewidth of $`\phi `$, denoted by $`\mathrm{𝑇𝑤}_1(\phi )`$, is the minimum width over all its tree decompositions.

Note that the usual definition of treewidth for a graph  results in the case where $`\phi `$ is a 2-CNF. Similarly to acyclicity, there are several notions of treewidth for hypergraphs resp. monotone CNFs. For example, tree decomposition of type II of CNF $`\phi =_{cC}c`$ is defined as type-I tree decomposition of its incident $`2`$-CNF (i.e., graph) $`G(\phi )`$ . That is, for each clause $`c\phi `$, we introduce a new variable $`y_c`$ and construct $`G(\phi )=_{x_ic\phi }(x_iy_c)`$ (here, $`x_ic`$ denotes that $`x_i`$ appears in $`c`$). Let $`\mathrm{𝑇𝑤}_2(\phi )`$ denote the type-II treewidth of $`\phi `$.

###### Proposition 4.6

For every monotone CNF $`\phi `$, it holds that $`\mathrm{𝑇𝑤}_2(\phi )\mathrm{𝑇𝑤}_1(\phi )+2^{\mathrm{𝑇𝑤}_1(\phi )+1}`$.

###### Proof.

Let $`T=(W,E)`$, $`X:W2^V`$ be any tree decomposition of $`\phi `$ having width $`\mathrm{𝑇𝑤}_1(\phi )`$. Introduce for all $`c\phi `$ new variables $`y_c`$, and add $`y_c`$ to every $`X(w)`$ such that $`V(c)X(w)`$. Clearly, the result is a type-I tree decomposition of $`G(\phi )`$, and thus a type-II tree decomposition of $`\phi `$. Since at most $`2^{|X(w)|}`$ many $`y_c`$ are added to $`X(w)`$ and $`|X(w)|1\mathrm{𝑇𝑤}_1(\phi )`$ for every $`wW`$, the result follows. ∎

This means that if $`\mathrm{𝑇𝑤}_1(\phi )`$ is bounded by some constant, then so is $`\mathrm{𝑇𝑤}_2(\phi )`$. Moreover, $`\mathrm{𝑇𝑤}_1(\phi )=k`$ implies that $`\phi `$ is a $`k`$-CNF; we discuss $`k`$-CNFs in Section 4.2 and only consider $`\mathrm{𝑇𝑤}_2(\phi )`$ here. The following proposition states some relationships between type-II treewidth and other restrictions of CNFs from above.

###### Proposition 4.7

The following properties hold for type-II treewidth.

1. There is a family of monotone prime CNFs $`\phi `$ such that $`\mathrm{𝑇𝑤}_2(\phi )`$ is bounded by a constant, but $`\phi `$ is not $`k`$-CNF for any constant $`k`$.
2. There is a family of monotone prime CNFs $`\phi `$ such that $`\mathrm{𝑇𝑤}_2(\phi )`$ is bounded by a constant, but $`\phi `$ does not have bounded read.
3. There is a family of $`\alpha `$-acyclic prime CNFs $`\phi `$ such that $`\mathrm{𝑇𝑤}_2(\phi )`$ is not bounded by any constant. (This is a contrast to the graph case that a graph is acyclic if and only if its treewidth is $`1`$.)

###### Proof.

(i): For example, $`\phi =(_{x_iV}x_i)`$ has $`\mathrm{𝑇𝑤}_2(\phi )=1`$, since it has a tree decomposition $`T=(W,E)`$ with $`X:W2^V`$ defined by $`W=\{1,2,\mathrm{},n\}`$, $`E=\{(w,w+1),w=1,2,\mathrm{},n1\}`$, and $`X(w)=\{x_w,y_c\}`$, $`wW`$, where $`c=(_{x_iV}x_i)`$. However, it is not an $`(n1)`$-CNF (but an $`n`$-CNF). On the other hand, by Lemma 4.8, we can see that there is a family of monotone prime CNFs $`\phi `$ such that $`\mathrm{𝑇𝑤}_2(\phi )`$ is not bounded by any constant, but $`\phi `$ is $`k`$-CNF for some constant $`k`$.

(ii): For example, let $`\phi `$ be a CNF containing $`n1`$ clauses $`c_i=(x_1x_i)`$, $`i=2,3,\mathrm{},n`$. Then $`\phi `$ has $`\mathrm{𝑇𝑤}_2(\phi )=1`$, since it has a tree decomposition $`T=(W,E)`$ with $`X:W2^V`$ defined by $`W=\{(c_i,x_1),(c_i,x_i),i=2,3,\mathrm{},n\}`$, $`E=\{((c_i,x_1),(c_{i+1},x_1)),i=2,3,\mathrm{},n1\}\{((c_i,x_1),(c_i,x_i)),i=2,3,\mathrm{},n`$, and $`X((c_i,x_k))=\{y_{c_i},x_k\}`$, $`(c_i,x_k)W`$. However, it is not read-($`n2)`$ (but read-$`(n1)`$).

(iii): For example, let $`\phi `$ be a CNF on $`V=\{x_1,x_2,\mathrm{},x_{2n}\}`$ containing $`n`$ clauses $`c_i=(x_i_{jn+1}x_j)`$, for $`i=1,\mathrm{},n`$. Then $`\phi `$ is $`\alpha `$-acyclic. We claim that $`\mathrm{𝑇𝑤}_2(\phi )n1`$. Let us assume that there exists a tree $`T=(W,E)`$ with $`X:E2^V`$ that shows $`\mathrm{𝑇𝑤}_2(\phi )n2`$, where $`T`$ is regarded as a rooted tree. Let $`T_i=(W_i,E_i)`$ be the subtree of $`T`$ induced by $`W_i=\{wWy_{c_i}X(w)\}`$, and let $`r_i`$ be its root. Consider the case in which $`W_i`$ and $`W_j`$ are disjoint for some $`i`$ and $`j`$. Suppose that $`r_j`$ is an ancestor of $`r_i`$. Since $`|X(r_i)|\mathrm{𝑇𝑤}_2(\phi )+1n1`$, there exists a node $`x_{n+k}V`$ such that $`1kn`$ and $`x_{n+k}X(r_i)`$. However, since the incident graph of $`\phi `$ contains two edges $`(x_{n+k},y_{c_i})`$ and $`(x_{n+k},y_{c_j})`$, we have $`x_{n+k}_{wW_i\{r_i\}}X(w)`$ and $`x_{n+k}_{wW_j}X(w)`$. This is a contradiction to the condition that $`\{wWx_{n+k}X(w)\}`$ is connected. Similarly, we can prove our claim when $`T_i`$ and $`T_j`$ are disjoint, but $`r_j`$ is not an ancestor of $`r_i`$.

We thus consider the case in which $`W_iW_j\mathrm{}`$ holds for any $`i`$ and $`j`$. Since $`T_i`$’s are trees, the family of $`W_i`$, $`i=1,2,\mathrm{},n`$, satisfies the well-known Helly property, i.e., there exists a node $`w`$ in $`_{i=1}^nW_i`$. $`X(w)`$ must contain all $`y_{c_i}`$’s. This implies $`|X(w)|n`$, a contradiction. ∎

As we show now, bounded-treewidth implies bounded degeneracy.

###### Lemma 4.8

Let $`\phi `$ be any monotone CNF with $`\mathrm{𝑇𝑤}_2(\phi )=k`$. Then $`\phi `$ is $`2^k`$-degenerate.

###### Proof.

Let $`T=(W,E)`$ with $`X:W2^V`$ show $`\mathrm{𝑇𝑤}_2(\phi )=k`$. From this, we reversely construct a variable ordering $`a=a_1,\mathrm{},a_n`$ on $`V=V(\phi )`$ such that $`|\mathrm{\Delta }^i|2^k`$ for all $`i`$.

Set $`i:=n`$. Choose any leaf $`w^{}`$ of $`T`$, and let $`p(w^{})`$ be a node in $`W`$ adjacent to $`w^{}`$. If $`X(w^{})X(p(w^{}))\{y_cc\phi \}`$, then remove $`w^{}`$ from $`T`$. On the other hand, if $`(X(w^{})X(p(w^{})))V=\{x_{j_1},\mathrm{},x_j_{\mathrm{}}\}`$ where $`\mathrm{}1`$ (in this case, only $`X(w^{})`$ contains $`x_{j_1}`$, …, $`x_j_{\mathrm{}}`$), then define $`a_{i+1h}=x_{j_h}`$ for $`h=1,\mathrm{},\mathrm{}`$ and update $`i:=n\mathrm{}`$, $`X(w^{}):=X(w^{})\{x_{j_1},\mathrm{},x_j_{\mathrm{}}\}`$, and $`X(w):=X(w)\{y_cc\phi ,V(c)\{x_{j_1},\mathrm{},x_j_{\mathrm{}}\}\mathrm{}\}`$ for every $`wW`$. Let $`a`$ be completed by repeating this process.

We claim that $`a`$ shows that $`|\mathrm{\Delta }^i|2^k`$ for all $`i=1,\mathrm{},n`$. To see this, let $`w^{}`$ be chosen during this process, and assume that $`a_iX(w^{})X(p(w^{}))`$. Then, by induction on the (reverse) construction of $`a`$, we obtain that for each clause $`c\mathrm{\Delta }^i`$ we must have either (a) $`y_cX(w^{})`$ or (b) $`V(c)X(w^{})`$. The latter case may arise if in previous steps of the process some descendant $`d(w^{})`$ of $`w^{}`$ was removed which contains $`y_c`$ such that $`y_c`$ does not occur in $`w^{}`$; however, in this case $`V(c)X(w)`$ must be true on every node on the path from $`d(w^{})`$ to $`w^{}`$.

Now let $`q=|X(w^{})V|`$. Since $`|X(w^{})\{a_i\}|k`$, we have

$$|\mathrm{\Delta }^i|q+2^{kq}\mathrm{\hspace{0.33em}2}^k.$$

This proves the claim. ∎

###### Corollary 4.9

For CNFs $`\phi `$ with $`\mathrm{𝑇𝑤}_2(\phi )k`$, Dualization is solvable (i) with $`O(\phi n^{2^k+1})`$ polynomial delay, if $`k`$ is constant; and (ii) in polynomial total time, if $`k=O(\mathrm{log}\mathrm{log}\phi )`$.

### 4.2 Recursive application of algorithm Dualize

Algorithm Dualize computes in step 2 the prime DNF $`\rho _{(t,i)}`$ of the function represented by $`\mathrm{\Delta }^i[t]`$. Since $`\mathrm{\Delta }[t]`$ is the prime CNF of some monotone function, we can recursively apply Dualize to $`\mathrm{\Delta }^i[t]`$ for computing $`\rho _{(t,i)}`$. Let us call this variant R-Dualize. Then we have the following result.

###### Theorem 4.10

If its recursion depth is $`d`$, R-Dualize solves Dualization in $`O(n^{d1}|\psi |^{d1}\phi )`$ time.

###### Proof.

If $`d=1`$, then $`\mathrm{\Delta }^i[t_{min}]=1`$ holds for $`t_{min}`$ and every $`i1`$. This means that $`\mathrm{𝑃𝐼}(f)=\{t_{min}\}`$ and $`\phi `$ is a $`1`$-CNF (i.e., each clause in $`\phi `$ contains exactly one variable). Thus in this case, R-Dualize needs $`O(n)`$ time. Recall that algorithm Dualize needs, by (6), time $`_{t\mathrm{𝑃𝐼}(f)}_{x_iV(t)}(T_{(t,i)}+|\rho _{(t,i)}|O(\phi ))`$. If $`d=2`$, then $`T_{(t,i)}=O(n)`$ and $`|\rho _{(t,i)}|1`$. Therefore, R-Dualize needs time $`O(n|\psi |\phi )`$. For $`d3`$, Corollary 3.5.(ii) implies that R-Dualize needs $`O(n^{d1}|\psi |^{d1}\phi )`$ time. ∎

Recall that a CNF $`\phi `$ is called $`k`$-CNF if each clause in $`\phi `$ has at most $`k`$ literals. Clearly, if we apply algorithm R-Dualize to a monotone $`k`$-CNF $`\phi `$, the recursion depth of R-Dualize is at most $`k`$. Thus we obtain the following result; it re-establishes, with different means, the main positive result of .

###### Corollary 4.11

R-Dualize solves Dualization in $`O(n^{k1}|\psi |^{k1}\phi )`$ time, i.e., in polynomial total time for monotone $`k`$-CNFs $`\phi `$ where $`k`$ is constant.

## 5 Limited Nondeterminism

In the previous section, we have discussed polynomial cases of monotone dualization. In this section, we now turn to the issue of the precise complexity of this problem. For this purpose, we consider the decision problem Dual, i.e., decide whether given monotone prime CNFs $`\phi `$ and $`\psi `$ represent dual Boolean functions, instead of the search problem Dualization.

It appears that problem Dual can be solved with limited nondeterminism, i.e., with poly-log many guessed bits by a polynomial-time non-deterministic Turing machine. This result might bring new insight towards settling the complexity of the problem.

We adopt Kintala and Fischer’s terminology  and write $`g(n)\text{-}\mathrm{P}`$ for the class of sets accepted by a nondeterministic Turing machine in polynomial time making at most $`g(n)`$ nondeterministic steps on every input of length $`n`$. For every integer $`k1`$, define $`\beta _k\mathrm{P}=_c(c\mathrm{log}^kn)\text{-}\mathrm{P}`$. The $`\beta `$P Hierarchy consists of the classes

$$\mathrm{P}=\beta _1\mathrm{P}\beta _2\mathrm{P}\mathrm{}\underset{k}{}\beta _k\mathrm{P}=\beta \mathrm{P}$$

and lies between P and NP. The $`\beta _k\mathrm{P}`$ classes appear to be rather robust; they are closed under polynomial time and logspace many-one reductions and have complete problems (cf. ). The complement class of $`\beta _k\mathrm{P}`$ is denoted by $`\mathrm{co}\text{-}\beta _k\mathrm{P}`$.

We start in Section 5.1 by recalling algorithm A of , reformulated for CNFs and by analyzing A’s behavior. The proof that A can be converted to an algorithm that uses $`\mathrm{log}^3n`$ nondeterministic bit guesses, and that Dual is thus in $`\mathrm{co}\text{-}\beta _3\mathrm{P}`$, is rather easy and should give the reader an intuition of how our new method of analysis works. In Section 5.2, we use basically the same technique for analyzing the more involved algorithm B of . Using a modification of this algorithm, we show that Dual is in $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$. We also prove the stronger result that the complement of Dual can be solved in polynomial time with only $`O(\chi (n)\mathrm{log}(n))`$ nondeterministic steps (=bit guesses). Finally, Section 5.3 shows that membership in $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$ can alternatively be obtained by combining the results of  with a theorem of Beigel and Fu .

### 5.1 Analysis of Algorithm A of Fredman and Khachiyan

The first algorithm in  for recognizing dual monotone pairs is as follows.

|  | Algorithm A (reformulated for CNFs<sup>1</sup><sup>1</sup>1In , duality is tested for DNFs while our problem Dual speaks about CNFs; this is insignificant, since DNFs are trivially translated to CNFs for this task and vice versa (cf. Section 2). ). |
| --- | --- |
|  |  | Input: Monotone CNFs $`\phi `$, $`\psi `$ representing monotone $`f`$, $`g`$ s.t. $`V(c)V(c^{})\mathrm{}`$, for all $`c\phi `$, $`c^{}\psi `$. |
|  |  | Output: yes if $`f=g^d`$, otherwise a vector $`w`$ of form $`w=(w_1,\mathrm{},w_m)`$ such that $`f(w)g^d(w)`$. |
| Step 1: |
|  | Delete all redundant (i.e., non-minimal) clauses from $`\phi `$ and $`\psi `$. |
| Step 2: |
|  | Check that | (1) $`V(\varphi )=V(\psi )`$, (2) $`\mathrm{max}_{c\phi }|c||\psi |`$, (3) $`\mathrm{max}_{c^{}\psi }|c^{}||\phi |`$, and |
|  |  | (4) $`\mathrm{\Sigma }_{c\phi }\mathrm{\hspace{0.17em}2}^{|c|}+\mathrm{\Sigma }_{c^{}\psi }\mathrm{\hspace{0.17em}2}^{|c^{}|}`$ $`1`$. |
|  | If any of conditions (1)-(4) fails, $`fg^d`$ and a witness $`w`$ is found in polynomial time (cf. ). |
| Step 3: |
|  | If $`|\phi ||\psi |1`$, test duality in $`O(1)`$ time. |
| Step 4: |
|  | If $`|\phi ||\psi |2`$, find some $`x_i`$ occurring in $`\phi `$ or $`\psi `$ (w.l.o.g. in $`\phi `$) with frequency $`1/\mathrm{log}(|\phi |+|\psi |)`$. |
|  | Let |  |
|  |  | $`\phi _0`$ = | $`\{c\{x_i\}x_ic,c\phi \},`$ | $`\phi _1`$ = $`\{cx_ic,c\phi \},`$ |
|  |  | $`\psi _0`$ = | $`\{c^{}\{x_i\}x_ic^{},c^{}\psi \}`$, | $`\psi _1`$ = $`\{c^{}x_ic^{},c^{}\psi \}`$. |
|  | Call algorithm A on the two pairs of forms: |
| (A.1) $`(\phi _1,\psi _0\psi _1)`$ and (A.2) $`(\psi _1,\phi _0\phi _1)`$ <br> |
|  | If both calls return yes, then return yes (as $`f=g^d`$), otherwise we obtain $`w`$ such that |
|  | $`f(w)g^d(w)`$ in polynomial time (cf. ). |

We observe that, as noted in , the binary length of any standard encoding of the input $`\phi ,\psi `$ to algorithm A is polynomially related to $`|\phi |+|\psi |`$, if step 3 is reached. Thus, for our purpose, we consider $`|\phi |+|\psi |`$ to be the input size.

Let $`\phi ^{}`$, $`\psi ^{}`$ be the original input for A. For any pair $`(\phi ,\psi )`$ of CNFs, define its volume by $`v=|\phi ||\psi |`$, and let $`ϵ=1/\mathrm{log}n`$, where $`n=|\phi ^{}|+|\psi ^{}|`$. As shown in , step 4 of algorithm A divides the current (sub)problem of volume $`v=|\phi ||\psi |`$ by self-reduction into subproblems (A.1) and (A.2) of respective volumes (assuming that $`x_i`$ frequently occurs in $`\phi `$):

$`|\phi _1||\psi _0\psi _1|`$ $``$ $`(1ϵ)v`$ (7)
$`|\phi _0\phi _1||\psi _1||\phi |(|\psi |1)`$ $``$ $`v1`$ (8)
Let $`T=T(\phi ,\psi )`$ be the recursion tree generated by A on input $`(\phi ,\psi )`$. In $`T`$, each node $`u`$ is labeled with the respective monotone pair, denoted by $`I(u)`$; thus, if $`r`$ is the root of $`T`$, then $`I(r)=(\phi ,\psi )`$. The volume $`v(u)`$ of node $`u`$ is defined as the volume of its label $`I(u)`$.

Any node $`u`$ is a leaf of $`T`$, if algorithm A stops on input $`I(u)=(\phi ,\psi )`$ during steps 1-3; otherwise, $`u`$ has a left child $`u_l`$ and a right child $`u_r`$ corresponding to (A.1) and (A.2), i.e., labeled $`(\phi _1,\psi _0\psi _1)`$ and $`(\psi _1,\phi _0\phi _1)`$ respectively. That is, $`u_l`$ is the “high frequency move” by the splitting variable.

We observe that every node $`u`$ in $`T`$ is determined by a unique path from the root to $`u`$ in $`T`$ and thus by a unique sequence $`seq(u)`$ of right and left moves starting from the root of $`T`$ and ending at $`u`$. The following key lemma bounds the number of moves of each type for certain inputs.

###### Lemma 5.1

Suppose $`|\phi ^{}|+|\psi ^{}||\phi ^{}||\psi ^{}|`$. Then for any node $`a`$ in $`T`$, $`seq(a)`$ contains at most $`v^{}`$ right moves and at most $`\mathrm{log}^2v^{}`$ left moves, where $`v^{}=|\phi ^{}||\psi ^{}|`$.

###### Proof.

By $`(\text{7})`$ and $`(\text{8})`$, each move decreases the volume of a node label. Thus, the length of $`seq(u)`$, and in particular the number of right moves, is bounded by $`v^{}`$. To obtain the better bound for the left moves, we will use the following well-known inequality:

$`(11/y)^y`$ $``$ $`1/e,\text{for }y1.`$ (9)
In fact, the sequence $`(11/y_i)^{y_i}`$, for any $`1y_1<y_2<\mathrm{}`$ monotonically converges to $`1/e`$ from below. By (7), the volume $`v(u)`$ of any node $`u`$ such that $`seq(u)`$ contains $`\mathrm{log}^2v^{}`$ left moves is bounded as follows:

$$v(u)v^{}(1ϵ)^{\mathrm{log}^2v^{}}=v^{}(11/\mathrm{log}n)^{\mathrm{log}^2v^{}}.$$

Since $`n=|\phi ^{}|+|\psi ^{}||\phi ^{}||\psi ^{}|=v^{}`$, and because of (9) it follows that:

$`v(u)`$ $``$ $`v^{}\left((11/\mathrm{log}v^{})^{\mathrm{log}v^{}}\right)^{\mathrm{log}v^{}}`$
$``$ $`v^{}(1/e)^{\mathrm{log}v^{}}=v^{}/(e^{\mathrm{log}v^{}})<v^{}/(2^{\mathrm{log}v^{}})=\mathrm{\hspace{0.33em}1}.`$
Thus, $`u`$ must be a leaf in $`T`$. Hence for every $`u`$ in $`T`$, $`seq(u)`$ contains at most $`\mathrm{log}^2v^{}`$ left moves. ∎

###### Theorem 5.2

Problem Dual is in $`\mathrm{co}\text{-}\beta _3\mathrm{P}`$.

###### Proof.

Instances such that either $`cc^{}=\mathrm{}`$ for some $`c\phi ^{}`$ and $`c^{}\psi ^{}`$, the sequence $`seq(u)`$ is empty, or $`|\phi ^{}|+|\psi ^{}|>|\phi ^{}||\psi ^{}|`$ are easily recognized and solved in deterministic polynomial time. In the remaining cases, if $`fg^d`$, then there exists a leaf $`u`$ in $`T`$ labeled by a non-dual pair $`(\phi ^{},\psi ^{})`$. If $`seq(u)`$ is known, we can compute, by simulating $`A`$ on the branch described by $`seq(u)`$, the entire path $`u_0,u_1,\mathrm{},u_l=u`$ from the root $`u_0`$ to $`u`$ with all labels $`I(u_0)=(\phi ^{},\psi ^{})`$, $`I(u_1)`$, …, $`I(u_l)`$ and check that $`I(u_l)`$ is non-dual in steps 2 and 3 of A in polynomial time. Since the binary length of any standard encoding of $`(\phi ^{},\psi ^{})`$ is polynomially related to $`n=|\phi ^{}|+|\psi ^{}|`$ if $`seq(u)`$ is nonempty, to prove the result it is sufficient to show that $`seq(u)`$ can be constructed in polynomial time from $`O(\mathrm{log}^3v^{})`$ suitably guessed bits. To see this, let us represent every $`seq(u)`$ as a sequence $`seq^{}(u)=[\mathrm{}_0,\mathrm{}_1,\mathrm{}_2\mathrm{},\mathrm{}_k]`$, where $`\mathrm{}_0`$ is the number of leading right moves and $`\mathrm{}_i`$ is the number of consecutive right moves after the $`i`$-th left move in $`seq(u)`$, for $`i=1,\mathrm{},k`$. For example, if $`seq(u)=[𝚛,𝚛,𝚕,𝚛,𝚛,𝚛,𝚕]`$, then $`seq^{}(u)=[2,3,0]`$. By Lemma 5.1, $`seq^{}(u)`$ has length at most $`\mathrm{log}^2v^{}+1`$. Thus, $`seq^{}(u)`$ occupies in binary only $`O(\mathrm{log}^3v)`$ bits; moreover, $`seq(u)`$ is trivially computed from $`seq^{}(u)`$ in polynomial time. ∎

### 5.2 Analysis of Algorithm B of Fredman and Khachiyan

The aim of the above proof was to exhibit a new method of algorithm analysis that allows us to show with very simple means that duality can be polynomially checked with limited nondeterminism. By applying the same method of analysis to the slightly more involved algorithm B of  (which runs in $`n^{4\chi (n)+O(1)}`$ time, and thus in $`n^{o(\mathrm{log}n)}`$ time), we can sharpen the above result by proving that deciding whether monotone CNFs $`\phi `$ and $`\psi `$ are non-dual is feasible in polynomial time with $`O(\chi (n)\mathrm{log}n)`$ nondeterministic steps; consequently, the problem Dual is in $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$.

Like algorithm A, also algorithm B uses a recursive self-reduction method that decomposes its input, a pair $`(\phi ,\psi )`$ of monotone CNFs, into smaller inputs instances for recursive calls. Analogously, the algorithm is thus best described via its recursion tree $`T`$, whose root represents the input instance $`(\phi ^{}`$, $`\psi ^{})`$ (of size $`n`$), whose intermediate nodes represent smaller instances, and whose leaves represent those instances that can be solved in polynomial time. Like for algorithm A, the nodes $`u`$ in $`T`$ are labeled with the respective instances $`I(u)=(\phi ,\psi )`$ of monotone pairs. Whenever there is a branching from a node $`u`$ to children, then $`I(u)`$ is a pair of dual monotone CNFs iff $`I(u^{})`$ for each child $`u^{}`$ of $`u`$ in $`T`$ is a pair of dual monotone CNFs. Therefore, the original input $`(\phi ^{}`$, $`\psi ^{})`$ is a dual monotone pair iff all leaves of $`T`$ are labeled with dual monotone pairs.

Rather than describing algorithm B in full detail, we confine here to recall those features which are relevant for our analysis. In particular, we will describe some essential features of its recursion tree $`T`$.

For each variable $`x_i`$ occurring in $`\phi `$, the frequency $`ϵ_i^\phi `$ of $`x_i`$ w.r.t. $`\phi `$ is defined as $`ϵ_i^\phi =\frac{|\{c\phi :x_ic\}|}{|\phi |}`$, i.e., as the number of clauses of $`\phi `$ containing $`x_i`$ divided by the total number of clauses in $`\phi `$. Moreover, for each $`v1`$, let $`\chi (v)`$ be defined by $`\chi (v)^{\chi (v)}=v`$.

Let $`v^{}=|\phi ^{}||\psi ^{}|`$ denote the volume of the input (=root) instance $`(\phi ^{},\psi ^{})`$. For the rest of this section, we assume that $`|\phi ^{}|+|\psi ^{}||\phi ^{}||\psi ^{}|`$. In fact, in any instance which violates this inequality, either $`\phi ^{}`$ or $`\psi ^{}`$ has at most one clause; in this case, Dual is trivially solvable in polynomial time.

Algorithm B first constructs the root $`r`$ of $`T`$ and then recursively expands the nodes of $`T`$. For each node $`u`$ with label $`I(u)=(\phi ,\psi )`$, algorithm B does the following.

The algorithm first performs a polynomial time computation, which we shall refer to as LCheck$`(\phi ,\psi )`$ here, as follows. LCheck$`(\phi ,\psi )`$ first eliminates all redundant (i.e., non-minimal) clauses from $`\phi `$ and $`\psi `$ and then tests whether some of the following conditions is violated:

1. $`V(\phi )=V(\psi )`$;
2. $`\mathrm{max}_{c\phi }|c||\psi |`$ and $`\mathrm{max}_{c\psi }|c||\phi |`$;
3. $`\mathrm{min}(|\phi |,|\psi |)>2`$.

If LCheck$`(\phi ,\psi )=\mathrm{𝑡𝑟𝑢𝑒}`$, then $`u`$ is a leaf of $`T`$ (i.e., not further expanded); whether $`I(\phi ,\psi )`$ is a dual monotone pair is then decided by some procedure Test$`(\phi ,\psi )`$ in polynomial time. In case Test$`(\phi ,\psi )`$ returns $`\mathrm{𝑓𝑎𝑙𝑠𝑒}`$, the original input $`(\phi ^{}`$, $`\psi ^{})`$ is not a dual monotone pair, and algorithm B returns $`\mathrm{𝑓𝑎𝑙𝑠𝑒}`$. Moreover, in this case a counterexample $`w`$ to the duality of $`\phi ^{}`$ and $`\psi ^{}`$ is computable in polynomial time from the path leading from the root $`r`$ of $`T`$ to $`u`$.

If LCheck$`(\phi ,\psi )`$ returns $`\mathrm{𝑓𝑎𝑙𝑠𝑒}`$, algorithm B chooses in polynomial time some appropriate variable $`x_i`$ such that $`ϵ_i^\phi >0`$ and $`ϵ_i^\psi >0`$, and creates two or more children of $`u`$ by deterministically choosing one of three alternative decomposition rules (i), (ii), and (iii). Each rule decomposes $`I(u)=(\phi ,\psi )`$ into smaller instances, whose respective volumes are summarized as follows. Let, as for algorithm A, $`\phi _0=\{c\{x_i\}x_ic,c\phi \},`$ $`\phi _1=\{cx_ic,c\phi \},`$ $`\psi _0=\{c^{}\{x_i\}x_ic^{},c^{}\psi \}`$, and $`\psi _1=\{c^{}x_ic^{},c^{}\psi \}`$. Furthermore, define $`ϵ(v)=1/\chi (v)`$, for any $`v>0`$.

Rule (i) If $`ϵ_i^\phi ϵ(v(u))`$, then $`I(u)`$ is decomposed into:

one instance $`(\phi _1,\psi _0\psi _1)`$ of volume $`(1ϵ_i^\phi )v(u)`$;

$`|\psi _0|`$ instances $`I_1,\mathrm{},I_{|\psi _0|}`$ of volume $`ϵ_i^\phi v(u)`$ each. Each such instance $`I_j`$ corresponds to one clause of $`\psi _0`$ and can thus be identified as the $`j`$-th clause of $`\psi _0`$ with an index $`j|\psi _0|<n`$ (recall that $`n`$ denotes the size of the original input).

Rule (ii) If $`ϵ_i^\phi >ϵ(v(u))ϵ_i^\psi `$, then $`I(u)`$ is decomposed into:

one instance $`(\psi _1,\phi _0\phi _1)`$ of volume $`(1ϵ_i^\psi )v(u)`$;

$`|\phi _0|`$ instances $`I_1,\mathrm{},I_{|\phi _0|}`$ of volume $`ϵ_i^\psi v(u)`$ each. Each such instance $`I_j`$ corresponds to one clause of $`\phi _0`$ and can be identified by an index $`j|\phi _0|<v^{}`$.

Rule (iii) If both $`ϵ_i^\phi >ϵ(v(u))`$ and $`ϵ_i^\psi >ϵ(v(u))`$, then $`I`$ is decomposed into:

one instance of volume $`(1ϵ_i^\phi )v(u)`$, and

one instance of volume $`(1ϵ_i^\psi )v(u)`$.

Algorithm B returns true iff Test$`(I(u))`$ returns true for each leaf $`u`$ of the recursion tree. This concludes the description of algorithm B.

For each node $`u`$ and child $`u^{}`$ of $`u`$ in $`T`$, we label the arc $`(u,u^{})`$ with the precise type of rule that was used to generate $`u^{}`$ from $`u`$. The possible labels are thus (i.a), (i.b), (ii.a), (ii.b), (iii.c<sub>0</sub>), and (iii.c<sub>1</sub>). We call (i.a) and (ii.a) a-labels, (i.b) and (ii.b) b-labels, and (iii.c<sub>0</sub>) and (iii.c<sub>1</sub>) c-labels. Any arc with a $`b`$-label is in addition labeled with the index $`j`$ of the respective instance $`I_j`$ in the decomposition, which we refer to as the $`j`$-label of the arc.

###### Definition 5.1

For any node $`u`$ of the tree $`T`$, let $`seq(u)`$ denote the sequence of all edge-labels on the path from the root $`r`$ of $`T`$ to $`u`$.

Clearly, if $`seq(u)`$ is known, then the entire path from $`r`$ to $`u`$ including all node-labels (in particular, the one of $`u`$) can be computed in polynomial time. Indeed, the depth of the tree is at most $`v^{}`$, and adding a child to a node of $`T`$ according to algorithm B is feasible in polynomial time.

The following lemma bounds the number of various labels which may occur in $`seq(u)`$.

###### Lemma 5.3

For each node $`u`$ in $`T`$, $`seq(u)`$ contains at most (i) $`v^{}`$ many $`a`$-labels, (ii) $`\mathrm{log}v^{}`$ many $`b`$-labels, and (iii) $`\mathrm{log}^2v^{}`$ many $`c`$-labels.

###### Proof.

(i) Let us consider rule (i.a) first. Given that $`ϵ_i^\phi >0`$, $`x_i`$ effectively occurs in some clause of $`\phi `$. Thus $`|\phi _1|<|\phi |`$. Moreover, by definition of $`\psi _0`$ and $`\psi _1`$, $`|\psi _0\psi _1||\psi |`$. Thus we have $`|\phi _1||\psi _0\psi _1|<|\phi ||\psi |`$. It follows that whenever rule (i.a) is applied, the volume decreases (at least by 1). The same holds for rule (ii.a) by a symmetric argument. Since no rule ever increases the volume, there are at most $`v^{}`$ applications of an $`a`$-rule.

(ii) Assume that rule (i.b) is applied to generate a child $`t^{}`$ of node $`t`$. By condition 3 of LCheck, $`v(t)>4`$. Therefore, $`\chi (v(t))>2`$ and thus $`ϵ_i^\phi ϵ(v(t))<1/2`$. It follows that $`v(t^{})<v(t)/2`$. The same holds if $`t^{}`$ results from $`t`$ via rule $`(\mathrm{𝐢𝐢}.𝐛)`$. Because no rule ever increases the volume, any node generated after (among others) $`\mathrm{log}v^{}`$ applications of a $`b`$-rule has volume $``$ 1 and is thus a leaf in $`T`$.

(iii) If a $`c`$-rule is applied to generate a child $`t^{}`$ of a node $`t`$, and since $`ϵ(v(t))>ϵ(v^{})>1/\mathrm{log}v^{}`$, the volume of $`v(t)`$ decreases at least by factor $`(11/\mathrm{log}v^{})`$. Thus, the volume of any node $`u`$ which results from $`t`$ after $`\mathrm{log}v^{}`$ applications of a $`c`$-rule satisfies $`v(u)v(t)(11/\mathrm{log}v^{})^{\mathrm{log}v^{}}v(t)/e`$ by (9); i.e., the volume has decreased more than half. Thus, any node $`u`$ resulting from the root of $`T`$ after $`\mathrm{log}^2v^{}`$ applications of a $`c`$-rule satisfies $`v(u)v^{}\left(\frac{1}{2}\right)^{\mathrm{log}v^{}}=1`$; that is, $`u`$ is a leaf in $`T`$. ∎∎

###### Theorem 5.4

Deciding whether monotone CNFs $`\phi `$ and $`\psi `$ are non-dual is feasible in polynomial time with $`O(\mathrm{log}^2n)`$ nondeterministic steps, where $`n=|\phi |+|\psi |`$.

###### Proof.

As in the proof of Theorem 5.2, we use a compact representation $`seq^{}(u)`$ of $`seq(u)`$. However, here the definition of $`seq^{}`$ is somewhat more involved:

* $`seq^{}(u)`$ contains all $`b`$-labels of $`seq(u)`$, which are the anchor elements of $`seq^{}(u)`$. Every $`b`$-label is immediately followed by its associated $`j`$-label, i.e., the label specifying which of the (many) $`b`$-children is chosen. We call a $`b`$-label and its associated $`j`$-label a $`bj`$-block.
* At the beginning of $`seq^{}(u)`$, as well as after each $`bj`$-block, there is an $`ac`$-block. The first $`ac`$-block in $`seq^{}(u)`$ represents the sequence of all $`a`$\- and $`c`$-labels in $`seq(u)`$ preceding the first $`b`$-label in $`seq(u)`$, and the $`i`$-th $`ac`$-block in $`seq^{}(u)`$, $`i>1`$, represents the sequence of the $`a`$ and $`c`$ labels (uninterrupted by any other label) following the $`(i1)`$-st $`bj`$-block in $`seq(u)`$.

Each $`ac`$-block consists of an $`\alpha `$-block followed by a $`\gamma `$-block, where

+ the $`\alpha `$-block contains, in binary, the number of $`a`$-labels in the $`ac`$-block, and
    + the $`\gamma `$-block contains all $`c`$-labels (single bits) in the $`ac`$-block, in the order as they appear.

For example, if $`s`$ = “$`(i.a),(ii.a),c_0,(ii.a),c_1,c_0,(i.a)`$” is a maximal $`ac`$-subsequence in $`seq(u)`$, then its corresponding $`ac`$-block in $`seq^{}(u)`$ is “$`10,c_0,c_1,c_0`$”, where 10 (= 4) is the $`\alpha `$-block (stating that there are four $`a`$-labels) and “$`c_0,c_1,c_0`$” is the $`\gamma `$-block enumerating the $`c`$-labels in $`s`$ in their correct order.

The following facts are now the key to the result.

Given $`\varphi ^{}`$,$`\psi ^{}`$ and a string $`s`$, it is possible to compute in polynomial time the path $`r=u_0,u_1,\mathrm{},`$ $`u_l=u`$ from the root $`r`$ of $`T`$ to the unique node $`u`$ in $`T`$ such that $`s=seq^{}(u)`$ and all labels $`I(u_i)`$, or to tell that no such node $`u`$ exists (i.e., $`sseq^{}(u)`$ for every node $`u`$ in $`T`$).

This can be done by a simple procedure, which incrementally constructs $`u_0`$, $`u_1`$, etc as follows.

Create the root node $`r=u_0`$, and set $`I(u_0)=(\varphi ^{},\psi ^{})`$ and $`t:=0`$. Generate the next node $`u_{t+1}`$ and label it, while processing the main blocks ($`ac`$-blocks and $`bj`$-blocks) in $`s`$ in order, as follows:

Suppose the $`\alpha `$-block of the current $`ac`$-block has value $`n_\alpha `$, and the $`\gamma `$-block contains labels $`\gamma _1,\mathrm{},\gamma _k`$. Set up counters $`p:=0`$ and $`q:=0`$, and while $`p<n_\alpha `$ or $`q<k`$, do the following.

If LCheck$`(I(u_t))=\mathrm{𝑡𝑟𝑢𝑒}`$, then flag an error and halt, as $`sseq^{}(u)`$ for every node $`u`$ in $`T`$. Otherwise, determine the rule type $`\tau \{(𝐢),(\mathrm{𝐢𝐢}),(\mathrm{𝐢𝐢𝐢})\}`$ used by algorithm B to (deterministically) decompose $`I(u_t)`$.

* If $`\tau \{(𝐢),(\mathrm{𝐢𝐢})\}`$ and $`p<n_\alpha `$, then assign $`I(u_{t+1})`$ the $`a`$-child of $`I(u_t)`$ according to algorithm B, and increment $`p`$ and $`t`$ by 1.
* If $`\tau =(\mathrm{𝐢𝐢𝐢})`$ and $`q<k`$, then increment $`q`$ by 1, assign $`I(u_{t+1})`$ the $`\gamma _q`$-child of $`I(u_t)`$ according to algorithm B, and increment $`t`$ by 1.
* In all other cases (i.e., either $`\tau \{(𝐢),(\mathrm{𝐢𝐢})\}`$ and $`pn_\alpha `$, or $`\tau =(\mathrm{𝐢𝐢𝐢})`$ and $`qk`$), flag an error and halt, since $`sseq^{}(u)`$ for every node $`u`$ in $`T`$.

Determine the rule type $`\tau \{(𝐢),(\mathrm{𝐢𝐢}),(\mathrm{𝐢𝐢𝐢})\}`$ used by algorithm B to (deterministically) decompose $`I(u_t)`$. If $`\tau =(\mathrm{𝐢𝐢𝐢})`$, then flag an error and halt, since $`sseq^{}(u)`$ for every node $`u`$ in $`T`$. Otherwise, assign $`I(u_{t+1})`$ the $`j^{}`$-th $`(`$$`\tau .`$$`𝐛)`$-child of $`I(u_t)`$ according to rule $`(`$$`\tau `$$`.𝐛)`$ of algorithm B, where $`j^{}`$ is the $`j`$-label of the current $`bj`$-block.

Clearly, this procedure outputs in polynomial time the desired labeled path from $`r`$ to $`u`$, or flags an error if $`sseq^{}(u)`$ for every node $`u`$ in $`T`$.

Let us now bound the size of $`seq^{}(u)`$ in terms of the original input size $`v^{}`$.

For any $`u`$ in $`T`$, the size of $`seq^{}(u)`$ is $`O(\mathrm{log}^2v^{})`$.

By Lemma 5.3 (ii), there are $`<\mathrm{log}v^{}`$ $`bj`$-blocks. As already noted, each $`bj`$-block has size $`O(\mathrm{log}v^{})`$; thus, the total size of all $`bj`$-blocks is $`O(\mathrm{log}^2v^{})`$. Next, there are at most $`\mathrm{log}v^{}`$ many $`ac`$-blocks and thus $`\alpha `$-blocks. Each $`\alpha `$-block encodes a number of $`<v^{}`$ $`a`$-rule applications (see Lemma 5.3.(i)), and thus uses at most $`\mathrm{log}v^{}`$ bits. The total size of all $`\alpha `$-blocks is thus at most $`\mathrm{log}^2v^{}`$. Finally, by Lemma 5.3 (iii), the total size of all $`\gamma `$-blocks is at most $`\mathrm{log}^2v^{}`$. Overall, this means that $`seq^{}(u)`$ has size $`O(\mathrm{log}^2v^{})`$.

To prove that algorithm B rejects input $`(\phi ^{},\psi ^{})`$, it is thus sufficient to guess $`seq^{}(u)`$ for some leaf $`u`$ in $`T`$, to compute in polynomial time the corresponding path $`r=u_0,u_1,\mathrm{},u_l=u`$, and to verify that LCheck$`(I(u))=\mathrm{𝑡𝑟𝑢𝑒}`$ but Test$`(I(u))=\mathrm{𝑓𝑎𝑙𝑠𝑒}`$. Therefore, non-duality of $`\varphi ^{}`$ and $`\psi ^{}`$ can be decided in polynomial time with $`O(\mathrm{log}^2v^{})`$ bit guesses. Given that $`v^{}n^2`$, the number of guesses is $`O(\mathrm{log}^2n^2)=O(\mathrm{log}^2n)`$. ∎∎

The following result is an immediate consequence of this theorem.

###### Corollary 5.5

Problem Dual is in $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$ and solvable in deterministic $`n^{O(\mathrm{log}n)}`$ time, where $`n=|\phi |+|\psi |`$.

(Note that Yes-instances of Dual must have size polynomial in $`n`$, since dual monotone pairs $`(\phi ,\psi )`$ must satisfy conditions (2) and (3) in step 2 of algorithm A.) We remark that the proof of Lemma 5.3 and Theorem 5.4 did no stress the fact that $`ϵ(v)=1/\chi (v)`$; the proofs go through for $`ϵ(v)=1/\mathrm{log}v`$ as well. Thus, the use of the $`\chi `$-function is not essential for deriving Theorem 5.4.

However, a tighter analysis of the size of $`seq^{}(u)`$ stressing $`\chi (v)`$ yields a better bound for the number of nondeterministic steps. In fact, we show in the next result that $`O(\chi (n)\mathrm{log}n)`$ bit guesses are sufficient. Note that $`\chi (n)=o(\mathrm{log}n)`$, thus the result is an effective improvement. Moreover, it also shows that Dual is most likely not complete for $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$.

###### Theorem 5.6

Deciding whether monotone CNFs $`\phi `$ and $`\psi `$ are non-dual is feasible in polynomial time with $`O(\chi (n)\mathrm{log}n)`$ nondeterministic steps, where $`n=|\phi |+|\psi |`$.

###### Proof.

In the proof of Theorem 5.4, our estimates of the components of $`seq^{}(u)`$ were rather crude. With more effort, we establish the following.

For any $`u`$ in $`T`$, the size of $`seq^{}(u)`$ is $`O(\chi (v^{})\mathrm{log}(v^{}))`$.

Assume node $`u^{}`$ in $`T`$ is a child of $`u`$ generated via a $`b`$-rule. The $`j`$-label of the arc $`(u,u^{})`$ serves to identify one clause of $`I(u)`$. Clearly, there are no more than $`v(u)`$ such clauses. Thus $`\mathrm{log}v(u)`$ bits suffice to represent any $`j`$-label.

Observe that if $`u`$ is a node of $`T`$, then any path $`\pi `$ from $`u`$ to a node $`w`$ in $`T`$ contains at most $`v(u)`$ nodes, since the volume always decreases by at least 1 in each decomposition step. Thus, the number of $`a`$-labeled arcs in $`\pi `$ is bounded by $`v(u)`$ and not just by $`v^{}`$ ($`=v(r)`$).

For each node $`u`$ and descendant $`w`$ of $`u`$ in $`T`$, let

$$f(u,w)=\underset{u^{}B(u,w)}{}\mathrm{log}v(u^{}),$$

where $`B(u,w)`$ is the set of all nodes $`t`$ on the path from $`u`$ to $`w`$ such that the arc from $`t`$ to its successor on the path is $`b`$-labeled.

By what we have observed, the total size of all encodings of $`j`$-labels in $`seq^{}(u)`$ is at most $`f(v^{},u)`$ and the size of all $`\alpha `$-blocks in $`seq^{}(u)`$ is at most $`\mathrm{log}(v^{})+f(v^{},u)`$, were the first term takes care of the first $`\alpha `$-block and the second of all other $`\alpha `$-blocks. Therefore, the total size of all $`\alpha `$-blocks and all $`bj`$-blocks in $`seq^{}(u)`$ is $`O(f(v^{},u)+\mathrm{log}(v^{}))`$.

We now show that for each node $`u`$ and descendant $`w`$ of $`u`$ in $`T`$, it holds that

$$f(u,w)\mathrm{log}(v(u))\chi (v(u)).$$

The proof is by induction on the number $`|B(u,w)|`$ of $`b`$-labeled arcs on the path $`\pi `$ from $`u`$ to $`w`$. If $`|B(u,w)|=0`$, then obviously $`f(u,w)=0v(u)`$.

Assume the claim holds for $`|B(u^{},w)|i`$ and consider $`|B(u,w)|=i+1`$. Let $`t`$ be the first node on $`\pi `$ contained in $`B(u,w)`$, and let $`t^{}`$ be its child on $`\pi `$. Clearly, $`f(u,w)=f(t,w)`$, and thus we obtain:

|  | $`f(u,w)`$ | = | $`\mathrm{log}(v(t))+f(t^{},w)`$ |
| --- | --- | --- | --- |
| $``$ | $`\mathrm{log}(v(t))+\mathrm{log}(v(t^{}))\chi (v(t^{}))`$ | (induction hypothesis) |
| $``$ | $`\mathrm{log}(v(t))+(\mathrm{log}(v(t))\mathrm{log}(\chi (v(t))))\chi (v(t))`$ | (as $`v(t^{})\frac{v(t)}{\chi (v(t))}`$$`\chi (v(t^{}))\chi (v(t))`$) |
| = | $`\mathrm{log}(v(t))\chi (v(t))`$ | (as $`\mathrm{log}(\chi (y))\chi (y)=\mathrm{log}y`$, for all $`y`$). |

Thus, $`f(u,w)\mathrm{log}(v(u))\chi (v(u))`$. This concludes the induction and proves the claim.

Finally, we show that the total size of all $`\gamma `$ blocks in $`seq^{}(u)`$, i.e., the number of all $`c`$-labels in $`seq(u)`$, is bounded by $`\chi (v^{})\mathrm{log}(v^{})<\mathrm{log}^2v^{}`$. Indeed, assume a $`c`$-rule is applied to generate a child $`t^{}`$ of any node $`t`$, and let $`v=v(t)`$, $`v^{}=v(t^{})`$. Since $`ϵ_i^\phi >ϵ(v)`$ and $`ϵ_i^\psi >ϵ(v)`$, we have $`v^{}<(1ϵ(v))v`$. Since $`\chi (v^{})>\chi (v)`$, we have $`ϵ(v)=1/\chi (v)>1/\chi (v^{})`$ and thus

$$v^{}<\left(1\frac{1}{\chi (v^{})}\right)v.$$

Hence, any node in $`T`$ resulting after $`\chi (v^{})\mathrm{log}(v^{})`$ applications of a $`c`$-rule has volume at most

$$v^{}\left(1\frac{1}{\chi (v^{})}\right)^{\chi (v^{})\mathrm{log}v^{}}=v^{}\left[\left(1\frac{1}{\chi (v^{})}\right)^{\chi (v^{})}\right]^{\mathrm{log}v^{}}v^{}\left(\frac{1}{e}\right)^{\mathrm{log}v^{}}\mathrm{\hspace{0.33em}1}$$

(cf. also (9)). Consequently, along each branch in $`T`$ there must be no more than $`\chi (v^{})\mathrm{log}v^{}`$ applications of a $`c`$-rule. In summary, the total sizes of all $`\alpha `$-blocks, all $`\gamma `$-blocks, and all encodings of $`j`$-labels in $`seq^{}(u)`$ are all bounded by $`\chi (v^{})\mathrm{log}v^{}`$. This proves Fact C.

As a consequence, non-duality of a monotone pair $`(\phi ^{},\psi ^{})`$ can be recognized in polynomial time with $`O(\chi (v^{})\mathrm{log}v^{})`$ many bit guesses. As already observed on the last lines of , we have $`\chi (v^{})<2\chi (n)`$. Furthermore, $`v^{}n^2`$, thus $`\mathrm{log}v^{}2\mathrm{log}n`$. Hence, non-duality $`(\phi ^{},\psi ^{})`$ can be recognized in polynomial time with $`O(\chi (n)\mathrm{log}(n))`$ bit guesses. ∎∎

###### Corollary 5.7

Problem Dual is solvable in deterministic $`n^{O(\chi (n))}`$ time, where $`n=|\phi |+|\psi |`$.

###### Remark 5.1

Note that the sequence $`seq(u)`$ describing a path from the root of $`T`$ to a “failure leaf” with label $`I(u)=(\phi ^{},\psi ^{})`$ describes a choice of values for all variables in $`V(\phi \psi )V(\phi ^{}\psi ^{})`$. By completing it with values for $`V(\phi ^{}\psi ^{})`$ that show non-duality of $`(\phi ^{},\psi ^{})`$, which is possible in polynomial time, we obtain in polynomial time from $`seq(u)`$ a vector $`w`$ such that $`f(w)g^d(w)`$. It also follows from the proof of Theorem 5.6 that a witness $`w`$ for $`fg^d`$ (if one exists) can be found in polynomial time with $`O(\chi (n)\mathrm{log}n)`$ nondeterministic steps.

### 5.3 Application of Beigel and Fu’s results

While our independently developed methods substantially differ from those in , membership of problem Dual in $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$ may also be obtained by exploiting Beigel and Fu’s Theorem 8 in  (or, equivalently, Theorem 11 in ). They show how to convert certain recursive algorithms that use disjunctive self-reductions, have runtime bounded by $`f(n)`$, and fulfill certain additional conditions, into polynomial algorithms using $`\mathrm{log}(f(n))`$ nondeterministic steps (cf. \[2, Section 5\]).

Let us first introduce the main relevant definitions of . Let $`y`$ denote the size of a problem instance $`y`$.

###### Definition 5.2 ()

A partial order $``$ (on problem instances) is polynomially well-founded, if there exists a polynomial-bounded function $`p`$ such that

* $`y_m\mathrm{}y_1mp(y_1)`$ and
* $`y_m\mathrm{}y_1y_mp(y_1)`$.

For technical simplicity,  considers only languages (of problem instances) containing the empty string, $`\mathrm{\Lambda }`$.

###### Definition 5.3 ()

A disjunctive self-reduction (for short, d-self-reduction) for a language $`L`$ is a pair $`h,`$ of a polynomial-time computable function $`h(x)=\{x_1,\mathrm{},x_m\}`$ and a polynomially well-founded partial order $``$ on problem instances such that

* $`\mathrm{\Lambda }`$ is the only minimal element under $``$;
* for all $`x\mathrm{\Lambda }`$, $`xLh(x)L\mathrm{}`$;
* for all $`x`$, $`x_ih(x)x_ix`$.

###### Definition 5.4 ()

Let $`h,`$ be a d-self-reduction and let $`x`$ be a problem instance.

* $`T_{h,}(x)`$ is the unordered rooted tree that satisfies the following rules: (1) the root is $`x`$; (2) for each $`y`$, the set of children of $`y`$ is $`h(y)`$.
* $`|T_{h,}(x)|`$ is the number of leaves in $`T_{h,}(x)`$.

###### Definition 5.5 )

Let $`T`$ be a polynomial-time computable function. A language $`L`$ is in $`\mathrm{REC}(T(x))`$, if there is a d-self-reduction $`h,`$ for $`L`$ such that for all $`x`$

1. $`|T_{h,}(x)|T(x)`$, and
2. $`T(x)_{x_ih(x)}T(x_i)`$.

Let $`T(x)\text{-}\mathrm{P}`$ denote the set of all (languages of) problems whose Yes-instances $`x`$ are recognizable in polynomial time with $`T(x)`$ nondeterministic bit guesses.

###### Theorem 5.8 )

$`\mathrm{REC}(T(x))\mathrm{log}T(x)\text{-}\mathrm{P}`$

We now show that Theorem 5.8, together with Fredman’s and Khachiyan’s proof of the deterministic complexity of algorithm B, can be used to prove that problem Dual is in co-$`\beta _2\mathrm{P}`$.

Let $`L`$ denote the set of all non-dual monotone pairs $`(\phi ,\psi )`$ plus $`\mathrm{\Lambda }`$. Let us identify each monotone pair $`(\phi ,\psi )`$ which satisfies LCheck$`(\phi ,\psi )`$ but does not satisfy Test$`(\phi ,\psi )`$ with the “bottom element” $`\mathrm{\Lambda }`$. Thus, if a node in the recursion tree $`T`$ has a child labeled with such a pair, then the label is simply replaced by $`\mathrm{\Lambda }`$.

Let us define the order $``$ on monotone pairs plus $`\mathrm{\Lambda }`$ as follows: $`JI`$, if $`IJ`$ and either $`J=\mathrm{\Lambda }`$ or $`J`$ labels a node of the recursion tree generated by algorithm B on input $`I`$. It is easy to see that both conditions of Definition 5.2 apply; therefore, $``$ is polynomially well-founded. In fact, we may define the polynomial $`p`$ by the identity function; since the sizes of the instances in the recursion tree strictly decrease on each path in $`T`$, the two conditions hold.

Define $`h`$ as the function which associates with each monotone pair $`I=(\phi ,\psi )`$ those instances that label all children of the root by algorithm $`B`$ on input $`I`$. Clearly $`h`$ satisfies all three conditions of Definition 5.3, and hence $`h,`$ is a $`d`$-self-reduction for $`L`$.

Let $`T`$ be the function which to each instance $`I`$ associates $`v(I)^{\mathrm{log}v(I)}`$ (recall that $`v(I)`$ denotes the volume of $`I`$). It is now sufficient to check that conditions 1 and 2 of Definition 5.5 are satisfied, and to ensure that Theorem 5.8 can be applied.

That item 1 of Definition 5.5 is satisfied follows immediately from Lemma 5 in , which states that the maximum number of recursive calls of algorithm B on any input $`I`$ of volume $`v`$ is bounded by $`v^{\chi (v)}`$ $`(v^{\mathrm{log}v})`$. Retain, however, that the proof of this lemma is noticeably more involved than our proof of the membership of Dual in co-$`\beta _2\mathrm{P}`$.

To verify item 2 of Definition 5.5, it is sufficient to prove that for a volume $`v>4`$ of any input instance to algorithm $`B`$, it holds that

$`v^{\mathrm{log}v}`$ $``$ $`(v1)^{\mathrm{log}(v1)}+{\displaystyle \frac{v}{3}}\left({\displaystyle \frac{v}{2}}\right)^{\mathrm{log}\frac{v}{2}},\text{ and}`$ (10)
$`v^{\mathrm{log}v}`$ $``$ $`2(\alpha v)^{\mathrm{log}(\alpha v)},\text{ where }\alpha =11/\mathrm{log}v;`$ (11)
here, (10) arises from the rules $`(𝐢)`$, $`(\mathrm{𝐢𝐢})`$ and (11) from rule $`(\mathrm{𝐢𝐢𝐢})`$. As for (10), the child of $`u`$ from $`(𝐢.𝐚)`$ resp. $`(\mathrm{𝐢𝐢}.𝐚)`$ has volume at most $`v1`$, and there are at most $`v/3`$ many children from$`(𝐢.𝐛)`$ resp. $`(\mathrm{𝐢𝐢}.𝐛)`$, since $`\mathrm{min}(|\phi |,|\psi |)>2`$ (recall that $`v=|\phi ||\psi |`$); furthermore, each such child has volume $`ϵ(v)v\frac{1}{2}v`$. In case of (11), the volume of each child of $`u`$ is bounded by $`(1ϵ(v))v(11/\mathrm{log}v)v`$; note also that $`v^{\mathrm{log}v}`$ monotonically increases for $`v>4`$. To see (10), we have

|  |  | $`(v1)^{\mathrm{log}(v1)}+\frac{v}{3}\left(\frac{v}{2}\right)^{\mathrm{log}\frac{v}{2}}`$ | $``$ | $`(v1)^{\mathrm{log}v}+\frac{v}{3}\frac{v^{\mathrm{log}v1}}{2^{\mathrm{log}v1}}`$ |
| --- | --- | --- | --- | --- |
| = | $`v^{\mathrm{log}v}(1\frac{1}{v})^{\mathrm{log}v}+\frac{2v^{\mathrm{log}v}}{3v}`$ |
| $``$ | $`v^{\mathrm{log}v}(1\frac{1}{v}+\frac{2}{3v})`$ |
| = | $`v^{\mathrm{log}v}(1\frac{1}{3v})`$ |
| $`<`$ | $`v^{\mathrm{log}v}`$; |

to show (11), note that

|  |  | $`2(\alpha v)^{\mathrm{log}(\alpha v)}`$ | = | $`2\alpha ^{\mathrm{log}v+\mathrm{log}\alpha }v^{\mathrm{log}v+\mathrm{log}\alpha }`$ |
| --- | --- | --- | --- | --- |
| $``$ | $`2(\frac{1}{e}\alpha ^{\mathrm{log}\alpha })v^{\mathrm{log}v+\mathrm{log}\alpha }`$ | ($`\alpha ^{\mathrm{log}v}1/e`$, by (9)) |
| = | $`\frac{2}{e}(\alpha v)^{\mathrm{log}\alpha }v^{\mathrm{log}v}`$ |
| $``$ | $`\frac{2}{e}v^{\mathrm{log}v}`$ | $`(\alpha v)^{\mathrm{log}\alpha }1`$, i.e., $`\mathrm{log}\alpha (\mathrm{log}\alpha +\mathrm{log}v)0`$, |
|  |  | since $`1<\mathrm{log}\alpha 0`$ and $`\mathrm{log}v>2`$ |
| $`<`$ | $`v^{\mathrm{log}v}`$. |

We can thus apply Theorem 5.8 and conclude that the complement of Dual is in $`\mathrm{log}T(x)\text{-}\mathrm{P}`$, and thus also in $`\beta _2\mathrm{P}`$.

The advantage of Beigel and Fu’s method is its very abstract formulation. The method has two disadvantages, however, that are related to the two items of Definition 5.5.

The first item requires that $`T(x)`$ is at least the number of leaves in the tree for $`x`$. In order to show this, one must basically prove a deterministic time bound for the considered algorithm (or at least a bound of the number of recursive calls for each instance, which is often tantamount to a time-bound). The method does not suggest how to do this, but presupposes that such a bound exists (in the present case, this was done by Fredman and Khachiyan in a nontrivial proof). The second item requires to prove that the $`T`$-value of any node $`x`$ in the recursion tree is at least the sum of the $`T`$-values of its children. This may be hard to show in many cases, and does not necessarily hold for every upper bound $`T`$.

Our method instead does not require an a priori time bound, but directly constructs a nondeterministic algorithm from the original deterministic algorithm, which lends itself to a simple analysis that directly leads to the desired nondeterministic time bound. The deterministic time bound follows as an immediate corollary. It turns out (as exemplified by the very simple proof of Theorem 5.4) that the analysis involved in our method can be simpler than an analysis according to previous techniques.

## 6 Conclusion

We have presented several new cases of the monotone dualization problem which are solvable in output-polynomial time. These cases generalize some previously known output-polynomial cases. Furthermore, we have shown by rather simple means that non-dual monotone pairs $`(\phi ,\psi )`$ can be recognized, using a nondeterministic variant of Fredman and Khachiyan’s algorithm B , in polynomial time with $`O(\mathrm{log}^2n)`$ many bit guesses, which places problem Dual in the class $`\mathrm{co}\text{-}\beta _2\mathrm{P}`$. In fact, a refined analysis revealed that this is feasible in polynomial time with $`O(\chi (n)\mathrm{log}n)`$ many bit guesses.

While our results document progress on Dual and Dualization and reveal novel properties of these problems, the question whether dualization of monotone pairs $`(\phi ,\psi )`$ is feasible in polynomial time remains open. It would be interesting to see whether the amount of guessed bits can be further significally decreased, e.g., to $`O(\mathrm{log}\mathrm{log}v\mathrm{log}v)`$ many bits.

### Acknowledgments

Georg Gottlob thanks José Balcázar for inviting him to an interesting workshop in Bellaterra, Barcelona, Spain, and to Leonard Pitt for giving an elucidating lecture on the dualization problem there. This work was supported in part by the Austrian Science Fund (FWF) project Z29-INF, by TU Wien through a scientific collaboration grant, and by the Scientific Grant in Aid of the Ministry of Education, Science, Sports and Culture of Japan.