On the Relation Between Structured d-DNNFs and SDDs

Structured d-DNNFs and SDDs are restricted negation normal form circuits used in knowledge compilation as target languages into which propositional theories are compiled. Structuredness is imposed by so-called vtrees. By definition SDDs are restricted structured d-DNNFs. Beame and Liew (2015) as well as Bova and Szeider (2017) mentioned the question whether structured d-DNNFs are really more general than SDDs w.r.t. polynomial-size representations (w.r.t. the number of Boolean variables the represented functions are defined on.) The main result in the paper is the proof that a function can be represented by SDDs of polynomial size if the function and its complement have polynomial-size structured d-DNNFs that respect the same vtree.


Introduction
Knowledge compilation is an area of research with a long tradition in artificial intelligence (see, e.g., [11] and [16]). A key aspect of any compilation approach is the target language into which the propositional theory is compiled. Therefore, the study of representations for propositional theories has been a central subject. One aim is to decide whether representations can be transformed into equivalent ones of another representation language by only increasing the representation size polynomially (see, e.g., [1,2,6,7,14,15,17,20]). We follow this direction of research. structured d-DNNFs. Recently, it was proved that every Boolean function f for which f and its negated function f can be represented by polynomial-size unambiguous nondeterministic OBDDs with respect to the same variable ordering can also be represented by SDDs of polynomial size w.r.t. so-called linear vtrees that contain additionally auxiliary variables [4]. Here, we generalize this result and prove that given polynomial-size structured d-DNNFs w.r.t. the same vtree for f and its negated function f , the function f can also be represented by SDDs of polynomial size. It is not difficult to prove that there are vtrees T and Boolean functions f such that structured d-DNNFs for f and for f w.r.t. T are exponentially more succinct than SDDs representing f w.r.t. T (see also Section 3). Therefore, for our simulation we have to modify the given vtree and we add extra auxiliary variables.
Organization of the Paper The rest of the paper is organized as follows. In Section 2 we recall the main definitions concerning decomposable negation normal forms, we introduce certificates, and we investigate how structured d-DNNFs alter if some of the input variables are set to constants. For completeness we prove in Section 3 that structured d-DNNFs can be exponentially more succinct than SDDs for a given function w.r.t. a fixed vtree. Section 4 contains our main result. It is shown that every Boolean function f for which f and its negated function f can be represented by polynomial-size structured d-DNNFs w.r.t. the same vtree can also be represented by SDDs of polynomial size w.r.t. a vtree that contains extra auxiliary variables.

Preliminaries
In this section, we briefly recall the main notions concerning decomposable negation normal forms, we take a look at certificates which are minimal satisfiable subcircuits, and we investigate how some representations of Boolean functions alter if some of the input variables are replaced by Boolean constants.

Decomposable Negation Normal Forms
We assume familiarity with fundamental concepts on Boolean functions and circuits (otherwise see, e.g., [22] for more details). In the rest of the paper, we look at (restricted) NNFs as classes of Boolean circuits. A satisfying input for a Boolean function f is an assignment to the input variables whose function value is 1, in other words this assignment is mapped to 1 by f . A Boolean function f depends essentially on a variable x if the subfunctions of f obtained by replacing x by the Boolean constants are different.
Many known representations of propositional knowledge bases are restricted negation normal form circuits (NNFs) and correspond to specific properties on NNFs [15]. Decomposability and determinism are two of these fundamental properties.
Definition 1 (NNFs) A negation normal form circuit on a variable set X is a Boolean circuit over fan-in 2 conjunction gates and unbounded fan-in disjunction gates, labeled by ∧ and ∨, whose inputs are labeled by literals x and x for x ∈ X, and ⊥ and for the Boolean constants 0 and 1. The size of an NNF C, denoted by |C|, is the number of its gates. The NNF size of a Boolean function f is the size of a smallest negation normal form circuit representing f . The Boolean function f C : {0, 1} X → {0, 1} represented by C is defined in the usual way. An NNF is decomposable, or a DNNF for short, iff the children of each ∧-gate are reachable from disjoint sets of input variables. A set of Boolean functions {f 1 , . . . , f } on the same variable set is disjoint if each pair of functions f i , f j , i = j , is not simultaneously satisfiable. A DNNF is deterministic, or a d-DNNF for short, iff the functions computed at the children of each ∨-gate are disjoint.
The size of restricted NNFs for a Boolean function can be defined in a similar way as above. The fact that negations only appear at variables is not really a restriction and the NNF size is polynomially related to the circuit size of a Boolean function over the standard basis {∧, ∨, ¬}. Our assumption that each ∧-gate has only fan-in 2 is justified because it affects the NNF size only polynomially. In the following for an NNF C and a gate g in C the subcircuit rooted at g is denoted by C g .
Structured decomposability on the notion of vtrees was originally introduced by Pipatsrisawat and Darwiche [18]. Informally, the variables are considered in a certain way formalized as a tree structure on the variables.

Definition 2
A vtree for a finite, nonempty set of variables X is a full, rooted binary tree whose leaves are in one-to-one correspondence with the variables in X.
In the rest of the paper for a node u in a graph let vars(u) denote the set of variables for which a literal appears in the subgraph rooted at u.

Definition 3
Let T be a vtree for the finite, nonempty set of variables X and D be a (deterministic) DNNF. An ∧-gate u of D with children u l and u r respects a node v of T with children v l and v r iff vars(u l ) ⊆ vars(v l ) and vars(u r ) ⊆ vars(v r ). D respects the vtree T , if every ∧-gate u of D respects a node v in T . A (deterministic) DNNF that respects a given vtree T is called a (deterministic) DNNF T . Moreover, a structured (deterministic) DNNF is a (deterministic) DNNF T for an arbitrary vtree T .
In the following let T v be the subtree of a tree T rooted at a node v in T . If we choose for every ∧-gate u in a DNNF T the node v in T in such a way that u respects v and there exists no other node v in T such that u respects v and T v is a subtree of T v , the node v is unique and we call v the decomposition node of u and d-node(u) = v. Sentential decision diagrams introduced by Darwiche Definition 5 A sentential decision diagram C, or SDD for short, respecting a vtree T is defined inductively in the following way: -C consists of a single node labeled by a constant representing ⊥ or and T is an arbitrary vtree. -C consists of a single node labeled by a literal on a variable x and x is in the variable set of T . -The output gate of C is a disjunction whose inputs are wires from ∧-gates g 1 , . . . , g , where each g i has wires from p i and s i , v is an inner node in T with children v L and v R , C p 1 , . . . , C p are SDDs that respect the subtree of T rooted at v L , C s 1 , . . . , C s are SDDs that respect the subtree of T rooted at v R , and the functions represented by C p 1 , . . . , C p are a partition.
An SDD is an SDD respecting some vtree.
By definition SDDs are circuits with alternating ∨and ∧-gates. The property that the functions p 1 , . . . , p are disjoint is also called strong determinism and the partition property is a strengthening of strong determinism. The distinction between the left and right child of a node is crucial for SDDs but not for structured d-DNNFs. Xue, Choi, and Darwiche showed that switching the left and right child of a vtree node may lead to an exponential change in the size of the corresponding SDDs for a given function [24]. Obviously, as a result we can conclude that for a function f the size of a structured d-DNNF representing f can be exponentially more succinct than its SDD size for a fixed vtree. In the next section we show that strong determinism is really a strengthening of determinism w.r.t. polynomial-size representations even without switching left and right children in a vtree.
Some applications require their input circuits to be smooth, i.e., all children of an ∨-gate mention the same set of variables. The notion of smoothness was first introduced by Darwiche [13]. Recently, smoothness was also considered for structured decomposable circuits [21].

Definition 6
A circuit is smooth if for every pair of children u 1 and u 2 of an ∨-gate u, the set of variables vars(u 1 ) is equal to vars(u 2 ).
A smoothing algorithm transforms a given circuit to a smooth circuit that represents the same Boolean function. Since there exists a smoothing algorithm for structured d-DNNFs that maintains the same vtree running in polynomial time [21], we assume that the considered circuits are smooth in the rest of the paper. For smooth structured d-DNNFs the notion of decomposition nodes can easily be extended for ∨-gates. Let u be an ∨-gate with children u 1 , . . . , u k then the decomposition node of u is equal to the decomposition node of u 1 , . . . , u k . Furthermore, decomposition nodes of nodes labeled by a literal are the corresponding leaves in the considered vtree, respectively.

Certificates
Bova et al. showed how to apply results from communication complexity to prove lower bounds on the size of (deterministic) DNNFs [6]. The main idea is that for a function f this size is lower bounded by the size of a so-called balanced (disjoint) rectangle cover for f . For this result they considered certificates for satisfying assignments w.r.t. a given (deterministic) DNNF D. Informally, these certificates are minimal satisfiable subcircuits of D that contain the output gate of D.
Definition 7 [6] Let D be a DNNF for the set of variables X. A certificate of D is a DNNF C for X with the following properties: (ii) The roots (output gates) of C and D coincide. (iii) If C contains an ∧-gate u, C also contains each child node v of u and the edge (u, v). (iv) If C contains an ∨-gate u, C also contains exactly one of the child nodes v of u and the edge (u, v).
Since the fan-in of ∨-gates is restricted by 1 and because of the decomposability of D, a certificate can be seen as a rooted binary tree where each leaf is labeled by a different variable of X. Now, we define 1-certificates in order to represent sets of satisfying inputs of a given DNNF (for 1-certificates see also [3]).

Definition 8
A decision node is a node labeled by a Boolean variable which has two outgoing edges one labeled by 0 and the other one by 1. A sink is a node labeled by a Boolean constant. A 1-certificate is a certificate with the following modifications: each leaf labeled by a literal x is a restricted decision node labeled by x whose only outgoing edge labeled by 1 leads to the 1-sink and each leaf labeled by a literal x is a restricted decision node labeled by x whose only outgoing edge labeled by 0 leads to the 1-sink.
A 1-certificate represents all assignments to the input variables where the labels of outgoing edges of decision nodes are chosen as assignments for the corresponding variables. Since a 1-certificate does not have to contain a decision node for each input variable, the represented set of assignments to all variables can contain more than one element. Obviously, according to the definition of 1-certificates, each ∨and ∧-gate evaluates to 1 for an assignment of the represented set. Since the roots of a 1-certificate and a given DNNF coincide because of the second requirement in the definition of certificates, this set of assignments is also satisfying for the given DNNF. In the deterministic case, there is a one-to-one correspondence between 1certificates and subsets of satisfying assignments for the function represented by the given DNNF. We know the following fact [3].

Pruned Vtrees and Pruned Structured d -DNNFs
Beame and Liew showed how lower bounds on the SDD size for a Boolean function can be proved by deterministic two-way best-partition communication complexity [2]. For this reason they defined a small generalization of vtrees suitable for describing SDDs with respect to partial assignments.

Definition 9 [2]
A pruned vtree on a variable set X is a full, rooted binary tree whose leaves are either marked stub or by a variable in X and whose leaves marked by variables are in one-to-one correspondence with the variables in X.
Obviously, any vtree on a variable set X is by definition also a pruned vtree on X. For a vtree T on a variable set X and A ⊆ X the pruned vtree T A can be constructed as follows. For each vertex v in T , the subtree rooted at v is replaced by a stub iff vars(v) ⊆ A and vars(parent Next, we define pruned SDDs in a slightly modified form than Beame and Liew.

Definition 10
A pruned SDD C respecting a pruned vtree T is defined inductively in the following way: -C consists of a single node labeled by a constant representing ⊥ or and T is an arbitrary pruned vtree. -C consists of a single node labeled by a literal on a variable x and x is in the variable set of the pruned vtree T . -The output gate of C is a disjunction whose inputs are wires from ∧-gates g 1 , . . . , g , where each g i has wires from p i and s i , v is an inner node in the pruned vtree T with children v L and v R , C p 1 , . . . , C p are pruned SDDs that respect the subtree of T rooted at v L , C s 1 , . . . , C s are pruned SDDs that respect the subtree of T rooted at v R , and the functions represented by C p 1 , . . . , C p are mutually disjoint.
A pruned SDD is a pruned SDD respecting some pruned vtree.
Note that a pruned SDD w.r.t. a pruned vtree that is a stub represents always ⊥ or . Using pruned vtrees Beame and Liew investigated how SDDs simplify under partial assignments to the input variables. Let D be an SDD representing a Boolean function f w.r.t. the vtree T on the set of variables X. Furthermore, let A ⊆ X and p be an assignment to the variables in A. The pruned SDD D p is constructed in the fol-lowing way. For each leaf labeled by a literal , where or are in A, we replace by iff is fullfilled by p and by ⊥ otherwise. Any children of ∨-gates that compute ⊥ can be eliminated. If a gate computes a constant function under the assignment p, the outgoing edges of the gate can be replaced by the corresponding constant. All nodes that are not any longer connected to the root of D can be eliminated.
It is not difficult to see that D p is a subgraph of D. Moreover, D p is a pruned SDD that respects the pruned vtree T A and D p represents the subfunction of f obtained by replacing the variables in A by the assignment p [2]. Pruned smooth structured d-DNNFs can be obtained in a similar way as pruned SDDs. Definition 3 can easily be adapted with respect to pruned vtrees.
The following restricted partial assignments are crucial for our transformation from structured d-DNNFs into SDDs.
Let D be a (pruned) SDD respecting a (pruned) vtree T and let v be a node in T . SDD(D, v) denotes the set of all (pruned) SDDs in D for which the decomposition node of the root is v. For simplicity, we present the following proof which is different from the one presented by Beame and Liew [2].
Proof The proof can easily be done by contradiction. Let p be a shell restriction w.r.t. v and let f 1 and f 2 be two functions represented by two different SDDs in SDD(D p , v) that are not mutually disjoint. Since the roots of the SDDs in SDD(D p , v) have the same decomposition node, no SDD in SDD(D p , v) can be part of another SDD in SDD(D p , v). Let u i be the root of the SDD representing f i for i ∈ {1, 2}. Furthermore, let r be an assignment to the variables in vars(v) which is mapped by f 1 and f 2 to 1. Now, let p + r be the joint assignment to X obtained from p and r. It follows that there are two 1-certificates for p + r in the given SDD D, one that contains u 1 and another one that contains u 2 in contradiction to the determinism property (see also Fact 1).
Strong determinism is not necessary for Proposition 1 because determinism is sufficient for Fact 1. Therefore, we can generalize Proposition 1 for structured d-DNNFs. Since the output gate of a structured d-DNNF can also be a conjunction, we have to modify the notation.

Definition 12
Let D be a structured d-DNNF w.r.t. a vtree T . Furthermore, let v be an arbitrary node in T and let p be a shell restriction w.
Now, the following proposition can be proved in a similar way as Proposition 1.  -DNNF(D p , v) is mutually disjoint. Since f and f are mutually disjoint, we know that f A,p and f A,p are mutually disjoint. Therefore, we are done.

Proposition 2 Let
In this section, we show for completeness that strong determinism is a stronger requirement than determinism w.r.t. polynomial-size representations. where x = x 1 + · · · + x n is the number of variables set to 1 in the input x and the output is 0 if x 1 + · · · + x n = 0. W.l.o.g. let n be divisible by 10. It is well known that the OBDD size of HWB n is Ω(2 n/5 ) [10]. Now, let T be a vtree rooted at v on the variables x 1 , . . . , x n . The node v is the left child of v, and v r the right one. Furthermore, the subtree rooted at v has 6 10 n leaves and the one rooted at v r has 4 10 n leaves. Both subtrees are right-linear which means that for every inner node in the considered vtree the left child is a leaf. Let X be the set of x-variables on leaves in the subtree rooted at v and X r the remaining x-variables.
In the following we prove an exponential lower bound on the size of SDDs w.r.t. T for HWB n . From the definition of SDDs it is not difficult to see that it is sufficient to show an exponential lower bound on the number of subfunctions for HWB n obtained by replacing 6 10 n x-variables by constants. (For exponential lower bounds on the size of strongly deterministic structured d-DNNFs see also [19].) Counting subfunctions is well-known from lower bound methods for OBDDs. Therefore, similar lower bound proofs for the OBDD size of HWB n can be used. A slight improvement of Bryant's lower bound is presented in Theorem 4.10.2 in [23]. It is proven that the number of subfunctions obtained by replacing 6 10 n variables is at least 2 n 5 −1 . Next, we show that the structured d-DNNF size for HWB n w.r.t. T is polynomial. HWB n can be defined as 1≤i≤n E n i (X) ∧ x i , where E n i is the symmetric Boolean function on n variables computing 1 iff the number of ones in the input, that is the number of variables set to 1, is exactly i. Now, we decompose the functions (E n i (X)∧ x i ) in the following way. The functions f i,j are defined on the variables in X . If x i is in X , the function value of f i,j is 1 iff the number of variables in X set to 1 is j and x i is set to 1. Otherwise, it is sufficient that the number of variables in X set to 1 is j . Furthermore, the functions g i,j are defined on the variables in X r . If x i is in X r , the function value of g i,j is 1 iff the number of variables in X r set to 1 is i −j and x i is set to 1. Otherwise, it is sufficient that the number of variables in X r set to 1 is i − j . Let h i,j (X) = f i,j (X ) ∧ g i,j (X r ). Then, for i fixed (E n i (X) ∧ x i ) is the disjunction of all functions h i,j for i − 4 10 n ≤ j ≤ min{i, 6 10 n}. It is not difficult to see that each of the f -and g-functions can be represented by OBDDs of at most quadratic size w.r.t. every variable ordering because they are slight modifications of symmetric functions (see, e.g., [23]). Since OBDDs and SDDs w.r.t. right-linear vtrees are closely related (see [14] and Section 2.3 in [4]), we can conclude that they can also be represented by polynomial-size structured d-DNNFs w.r.t. the right-linear subtree rooted at v and v r , respectively. Obviously, HWB n is the disjunction of all h i,j . Neither the ffunctions nor the g-functions are mutually disjoint but two different functions h i,j and h i ,j for i = i or j = j are mutually disjoint.
Since the number of the f -and g-functions as well as the number of conjunctions f i,j ∧ g i,j is polynomially bounded in n and the representation size for each f -and g-function is polynomial, the d-DNNF size for HWB n w.r.t. T is also polynomially bounded.
The polynomial upper bound on the structured d-DNNF size for HWB n w.r.t. T can be shown in a similar way using the representation

Simulating Structured d-DNNFs by SDDs
In this section, we examine the relationship between stuctured d-DNNFs and SDDs. We present a method to represent efficiently a Boolean function f as an SDD provided that f and f can both be represented by small structured d-DNNFs w.r.t. the same vtree. In Section 3 we have seen that in general this is not possible without modifying the given vtree. In order to ensure the partition property of SDDs we add some auxiliary variables. Our simulation generalizes the procedure described by Bollig and Buttkus [4] how to transform two unambiguous nondeterministic OBDDs w.r.t. the same variable ordering for f and f into an SDD for f in polynomial time.

Main Ideas of the Simulation
Our simulation of structured d-DNNFs by SDDs can be divided into three phases. First, we transform the given structured d-DNNF into an equivalent one which is not only deterministic but strongly deterministic. For this reason we modify the given vtree into a vtree with auxiliary variables. In the second phase we transform the resulting structured d-DNNF again into an equivalent one to ensure the partition property. After the first and the second phase there can be edges between ∧-gates but SDDs are by definition circuits with alternating ∨and ∧-gates. Therefore, in the last phase we transform subcircuits rooted at an ∧-gate into equivalent subcircuits rooted at an ∨-gate.
For the first and second phase we adapt ideas from the transformation of unambiguous nondeterministic OBDDs into SDDs [4]. Let f and f be the Boolean functions represented by the structured d-DNNFs D and D w.r.t. a vtree T . Let D u denote the subgraph of D rooted at a node u and let f u be the Boolean function represented by D u . Now, let u be an arbitrary ∨-gate in D and let f u 1 , . . . , f u l be the functions represented at the child nodes of u. Then f u is equal to (f u 1 ∧ ) ∨ (f u 2 ∧ )∨· · ·∨(f u l ∧ ). Since f u 1 , . . . , f u l and formally have to be defined on disjoint sets of variables, the given vtree has to be modified and auxiliary variables are added. If every ∨-gate in a given structured d-DNNF is handeled in this way, the result is an equivalent structured d-DNNF w.r.t. a modified vtree that is strongly deterministic. (See Fig. 1

for a transformation of an ∨-gate.)
The functions f u 1 , . . . , f u l do not necessarily form a partition. Therefore, the idea in the second phase is to find further functions represented at inner nodes of D and D which together with f u 1 , . . . , f u l yield a partition. Let A be a subset of the set of variables the function f is defined on and let p be an assignment of the variables in A. Moreover, let f A,p denote the subfunction of f obtained by replacing the variables in the subset A by p. The crucial observation for the second phase is that f A,p and f A,p form a partition. Now, let v be the decomposition node of u in the vtree T and let the set A be equal to shell(v). Furthermore, let p be a shell restriction w.r.t. v for which there exists an assignment r to the remaining variables such that there is a 1certificate for the joint assignment p+r that contains the node u.  Fig. 1 Transformation of an ∨-gate to ensure strong determinism and since all the functions are mutually disjoint, they form a partition. (Here, we assume that none of these functions is equal to ⊥.) After the transformations in the first and second phase edges between ∧-gates are possible in the resulting structured d-DNNF. Since SDDs are by definition circuits with alternating ∨and ∧-gates, we modify some of the subcircuits rooted at ∧-gates into equivalent ones rooted at ∨-gates. Here, we have to make sure that the partition property is fullfilled. The procedure is similar to the one in the second phase. Let u be such an ∧-gate and u and u r its child nodes. Let v be the decomposition node of u in the given vtree. Now, let p be a shell restriction w.r.t. v for which there exists an assignment r to the remaining variables such that there is a 1-certificate for the joint assignment p + r that contains the node u . Let u 1 , . . . , u k be the set of all nodes in R + (D p , v) without u or child nodes of u and let w 1 , . . . , w m be the set of all nodes in R + (D p , v). Then we know that and f u , f u 1 , . . . , f u k , f w 1 , . . . , f w m form a partition. (See Fig. 2 for a transformation of a function represented at an ∧-gate. For simplicity there are no nodes u 1 , . . . , u k in the figure.) Note that for the third phase we do not have to alter the already modified vtree.

The Simulation
We start with a kind of normalization for vtrees. For our simulation later on it is not necessary that the vtrees for the given structured d-DNNFs representing f and f are the same but that they have the same normalized vtree. Let T be a given vtree. Since there is no difference between a left and right child of an inner node in a structured d-DNNF, we normalize the vtree in the sense that for each inner node v the number of  Fig. 3 for an example of such a vtree.) The modified vtree T for our simulation has the following structure. For each inner node v in T for which vars(v) contains more than two variables we add another node v .
If v is the left (right) child of the node parent(v), the parent of v in T , v is the left (right) child of parent(v) in T . Furthermore, v is the new parent of v and v is the left child of v in T . The right child of v is a leaf labeled by a new auxiliary variable. (See Fig. 4 for the modified vtree T w.r.t. the vtree T in Fig. 3, a node v in T and the nodes v and v in T .) In the following v denotes a node in T as well as in T . It will be clear from the context whether v is in T or T .
For technical reasons we assume that the given structured d-DNNFs are of the following form.

Definition 13
Let D be a structured d-DNNF. We call D simple if there exist no edges between ∨-gates, no ∨-gate is connected to a node labeled by ⊥ or , and nodes labeled by ⊥ are the only ones in D that represent the constant function ⊥.
The size of a structured d-DNNF and the size of an equivalent simple one are polynomially related. Moreover, it is easy to check whether a function represented by a d-DNNF is equal to the constant function ⊥ in polynomial time.
In the followig simulation we look at DNNFs as graphs and we start with a simple fact.   Such an SDD for a Boolean function can easily be constructed by evaluating each assignment to the variables.
Simulation 1 Let f be a Boolean function on n variables and f and f are represented by structured d-DNNFs D and D w.r.t. the same normalized vtree T on the set of variables X. Because of Fact 2 we assume that each function represented at a node whose decomposition node in T is in a subtree T 2 on two variables is already represented by an SDD w.r.t. T 2 . Now, we construct an SDD S representing f in the following way. First, we modify the vtree T to a vtree T on the variables in X and at most n − 2 auxiliary variables as mentioned above.
Let (V , E) and (V , E) be the sets of nodes and edges of the structured d-DNNFs We construct S respecting the modified vtree by mapping nodes and edges of D and D to nodes and edges of S in the following way.
1. For each node u in Y we add the node (u, ∅) to S.
If the decomposition node of u in T is in a subtree of T on two variables, (u, ∅) is the same gate type as u or is labeled by the same constant or literal as u. Moreover, if (u, u ) ∈ E or (u, u ) ∈ E, respectively, the edge ((u, ∅), (u , ∅)) is inserted. Otherwise, if the decomposition node of u in T is not in a subtree of T on two variables, (u, ∅) is an ∨-gate.

2.
For each ∨-gate u ∈ V whose decomposition node v in T is not in a subtree of T on two variables the following nodes and edges are added. Let p be an arbitrary shell restriction w.r.t. v such that u ∈ R(D p , v). For each node u ∈ R + (D p , v) ∪ R + (D p , v), we add an ∧-gate (u, u ) to S. Moreover, we add the nodes (u, ⊥) and (u, ) to S which are labeled by ⊥ and , respectively. Furthermore, the edges ((u, ∅), (u, u )) and ((u, u ), (u , ∅)) are added to S. In addition, if (u, u ) ∈ E, the edge ((u, u ), (u, )) is inserted, otherwise ((u, u ), (u, ⊥)).
In a similar way each ∨-gate in V is handled. 3. For each ∧-gate u ∈ V whose decomposition node v in T is not in a subtree of T on two variables the following nodes and edges are added. Let u and u r be the left and the right child of u, respectively. Moreover, let v be the decomposition node of u in T and let p be a shell restriction w.r.t. v such that u ∈ R(D p , v ). We add the ∧-gate (u, ∧) and a node (u, ⊥) labeled ⊥ and the edges ((u, ∅), (u, ∧)), ((u, ∧), (u , ∅)), ((u, ∧), (u r , ∅)). Furthermore, for each node u ∈ R + (D p , v ) ∪ R + (D p , v ) without u and any child node of u we add the ∧-gate (u, u ) and the edges ((u, ∅), (u, u )), ((u, u ), (u , ∅)), ((u, u ), (u, ⊥)).
In a similar way each ∧-gate in V is handled.
Let root(D) be the root of the structured d-DNNF D. The root of S is given by  (root(D), ∅). All nodes (u, ) and all nodes (u, ⊥) for u ∈ Y can be merged to a node labeled and ⊥, respectively. Finally, we remove all nodes and edges from the resulting SDD S which cannot be reached from (root(D), ∅).

Size, Correctness, and Equivalence
In the following we show that the simulation presented in Section 4.2 can be done in polynomial-size. Furthermore, we prove that the result of the simulation is an SDD for f , the Boolean function represented by one of the given structured d-DNNFs. Our proofs generalize the proofs presented by Bollig and Buttkus [4].
We get a relationship between the sizes of the given structured d-DNNFs and the constructed equivalent SDD by the following lemma which states that the increase in size is at most quadratic. Proof Since we assume in the paper that the given structured d-DNNFs are smooth, we know that the size of the vtree T is not larger than the sizes of D or D. The modified vtree T is at most twice the size of T . Therefore, the number of nodes in S is asymptotically dominated by the size of |Y × Z| which is O((|D| + |D|) 2 ). The number of edges is linear in the number of nodes in S. Therefore, we are done.

Lemma 1 Let
Each node u in V ∪ V is mapped to a node (u, ∅) of S in Simulation 1. In order to prove that S is a syntactically correct SDD that represents the same function as D, we prove that each subcircuit S (u,∅) represents the same function as D u or D u , respectively. For this reason we map each node u to a node in the modified vtree T which is the decomposition node of (u, ∅). Therefore, S (u,∅) respects the subtree of T rooted at this node.
Remember that for each node v in the given vtree T there is a node with the same name in T . Furthermore, if vars(v) is larger than two in T , the parent of v in T is denoted by v .

Definition 14
Let T be the modified vtree in Simulation 1 and u ∈ V ∪ V be a node of the given structured d-DNNFs. The function node maps nodes of D and D to nodes of T in the following way.
the node called v in T is d-node(u) in T and u is an ∧ -gate or vars(v) is at most two in T v , the node called v in T is d-node(u) in T , vars(v) is larger than two, and u is an ∨ -gate  (u,∅) represents the same Boolean function as D u for u ∈ V or D u for u ∈ V , respectively.
Proof idea We give a proof by induction on the depth l of the subgraph S (u,∅) of the SDD S in the Appendix which follows the lines of the proof of Lemma 3 in [4]. Here, the depth is the longest path to a leaf.
As a result from Lemma 2, we know that S is a syntactically correct SDD that represents the same function as the given structured d-DNNF D. Proof Using Simulation 1 we construct S for f w.r.t. the modified vtree T given the structured d-DNNFs D and D representing the functions f and f w.r.t. the same normalized vtree T . Using Corollary 1 we know that S is a syntactically correct SDD representing f . Moreover, from Lemma 1 we know that the size of S is at most quadratic w.r.t. the sizes of D and D.

Concluding Remarks
To the best of our knowledge the question whether the complexity class that consists of all Boolean functions representable by polynomial-size structured d-DNNFs is closed under negation is open. We have shown how negation w.r.t. the same normalized vtree is useful to construct SDDs. For the construction we extended the given normalized vtree to a vtree with further auxiliary variables. It is open whether a similar construction exists without any auxiliary variables.

Funding Information Open Access funding provided by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommonshorg/licenses/by/4.0/.

Appendix: Proof of Lemma 2
The following proof is similar to the proof of Lemma 3 presented by Bollig and Buttkus [4]. In the rest of the proof we sometimes denote S to be the Boolean function represented at the corresponding SDD S by ease of notation. It will be clear from the context whether the SDD or the represented function is meant. Furthermore, f u and f u denote the function represented by the subgraph of D or D, respectively, rooted at u.
Proof We prove the lemma by induction on the depth l of the subgraph S (u,∅) of S. Here, the depth is the length of a longest path to a leaf.

Base case (l ≤ 2)
Since the depth of the subgraph S (u,∅) is at most two and the given structured d-DNNFs are smooth, u has to be the root of an SDD w.r.t. a subtree of T on at most two variables in one of the given structured d-DNNFs. Therefore, because of the first phase in Simulation 1, we can conclude that (u, ∅) is the root of an SDD w.r.t. a subtree of T on at most two variables and S (u,∅) represents f u for u ∈ V or f u for u ∈ V . Moreover, node(u) is v in T if d-node(u) = v.

Induction hypothesis
Each subgraph S (u,∅) of S with depth of at most l is a syntactically correct SDD w.r.t. the subtree T node(u) . Moreover, it represents f u for u ∈ V or f u for u ∈ V .
Inductive step (l → l + 1) Let v be d-node(u) in T and let p be a shell restriction w.r.t. v such that u ∈ R(D p , v). The sets R + (D p , v) and R + (D p , v) contain only ∧-gates because of the definition of the sets, D and D being simple, and the fact that vars(v) contains at least three variables. Therefore, u is not in R + (D p , v) but the child nodes of u are in the set.
The node (u, ∅) is an ∨-gate which is connected to every ∧-gate (u, u ) for u ∈ R + (D p , v) ∪ R + (D p , v). These ∧-gates are connected to further nodes (u , ∅) and (u, ) for (u, u ) ∈ E or (u, ⊥) otherwise. Thus, S (u,∅) is inductively defined. Now, our aim is to show that S (u,∅) is a syntactically correct SDD respecting the subtree rooted at node(u) in T that represents f u . For this reason, we prove that the subgraphs rooted at (u , ∅) in S are syntactically correct SDDs w.r.t. the subtree T node(u ) which represent f u for u ∈ V or f u for u ∈ V . Moreover, we have to show that they represent Boolean functions which form a partition.
The subgraph S (u ,∅) has at most depth l −1 for each u ∈ R + (D p , v)∪R + (D p , v) because by assumption S (u,∅) is a subgraph of depth at most l + 1 and (u, ∅) is connected to each (u , ∅) by a path of length two. Thus, by the use of the inductive hypothesis S (u ,∅) is a syntactically correct SDD w.r.t. the subtree rooted at node(u ) in T . We know that d-node(u ) = d-node(u) = v since the given structured d-DNNFs are smooth. Moreover, S (u ,∅) represents the function f u for u ∈ V or f u for u ∈ V .
S (u,⊥) and S (u, ) are SDDs representing ⊥ and , respectively. Therefore, they respect the right subtree of T v , a leaf labeled by an auxiliary variable, where v is the parent of v in T . Therefore, S (u,∅) respects T v .
By induction hypothesis we know that S (u ,∅) = f u for each u ∈ R + (D p , v) and S (u ,∅) = f u for each u ∈ R + (D p , v). Using Proposition 3 and the fact that the given structured d-DNNFs are simple, we can conclude that all functions S (u ,∅) for u ∈ R + (D p , v) ∪ R + (D p , v) form a partition.
Finally, we get the equivalence of S (u,∅) and f u by applying the inductive hypothesis on S (u ,∅) for each u ∈ R + (D p , v) ∪ R + (D p , v). The node (u, ∅) was added to S because of the ∧-gate u ∈ V ∪ V . W.l.o.g. let u ∈ V . Furthermore, let u and u r be the left and right child of u. Let v be d-node(u) in T and v be the left child of v in T . Furthermore, let p be a shell restriction w.r.t. v for which there exists an assignment r to the remaining variables such that there is a 1-certificate in D for the joint assignment p + r to the x-variables that contains the node u . Moreover, let R ++ (D p , v ) contain all nodes from R + (D p , v ) without u or any child node of u .
S (u,⊥) represents the function ⊥ and is an SDD w.r.t. any vtree. The subgraphs S (u ,∅) , S (u r ,∅) , and S (u ,∅) have at most depth l − 1 because by assumption S (u,∅) is a subgraph of depth at most l + 1 and (u, ∅) is connected to the nodes by paths of length two. Thus, by the use of the inductive hypothesis S (u ,∅) , S (u r ,∅) , and S (u ,∅) are syntactically correct SDDs w.r.t. subtrees rooted at node(u ), node(u r ), and node(u ), respectively, in T . Moreover, node(u ) and node(u ) are in the left subtree of v and node(u r ) is in the right subtree of v. The subgraph S (u,∧) represents the conjunction of the functions represented at S (u ,∅) and S (u r ,∅) and S (u,u) represents the conjunction of S (u ,∅) and S (u,⊥) . Therefore, S (u,∧) and S (u ,∅) respect v in T and as a consequence also S (u,∅) respect v.
If u is an ∧-gate, u ∈ R + (D p , v ). Therefore, the set of gates u ∪ R ++ (D p , v ) is equal to R + (D p , v ). We know that R + (D p , v ) ∪ R + (D p , v ) form a partition because of Proposition 3 and D being simple. By the induction hypothesis the same holds for the functions represented by S (u ,∅) and S (u ,∅) for u in R ++ (D p , v ) ∪ R + (D p , v ). If u is an ∨-gate, the function represented at u is the disjunction of the functions represented at the child nodes of u . Because of Proposition 2 and D being simple we know that all functions represented at a node in {u } ∪ R ++ (D p , v ) are mutually disjoint. The disjunction of these functions is equal to f A,p where A = shell(v ). Now, because of Proposition 3 and D as well as D being simple we can conclude that all functions represented at a node {u } ∪ R ++ (D p , v ) ∪ R + (D p , v ) form a partition. By the induction hypothesis the same holds for the corresponding functions in S.
Finally, we get the equivalence of S (u,∅) and f u by applying the inductive hypothesis on S (u ,∅) and S (u r ,∅) . = f u ∧ f ur = f u