Skip to main content
Log in

On the Minimization of (Complete) Ordered Binary Decision Diagrams

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

Ordered binary decision diagrams (OBDDs) are a popular data structure for Boolean functions. Some applications work with a restricted variant called complete OBDDs which is strongly related to nonuniform deterministic finite automata. One of its complexity measures is the width which has been investigated in several areas in computer science like machine learning, property testing, and the design and analysis of implicit graph algorithms. For a given function the size and the width of a (complete) OBDD is very sensitive to the choice of the variable ordering but the computation of an optimal variable ordering for the OBDD size is known to be NP-hard. Since optimal variable orderings with respect to the OBDD size are not necessarily optimal for the complete model or the OBDD width and hardly anything about the relation between optimal variable orderings with respect to the size and the width is known, this relationship is investigated. Here, using a new reduction idea it is shown that the size minimization problem for complete OBDDs and the width minimization problem are NP-hard.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Bollig, B.: On the size of (generalized) OBDDs for threshold functions. Inf. Process. Lett. 109(10), 499–503 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  2. Bollig, B.: On the complexity of some ordering problems. In: Proc. of MFCS, LNCS 8635, pp. 118–129. Springer (2014)

  3. Bollig, B.: On the width of ordered binary decision diagrams. In: Proc. of COCOA, LNCS 8881, pp. 444–458. Springer (2014)

  4. Bollig, B., Range, N., Wegener, I.: Exact OBDD bounds for some fundamental functions. Theory Comput. Syst. 47(2), 593–609 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  5. Bollig, B., Wegener, I.: Improving the variable ordering of OBDDs is NP-complete. IEEE Trans. Comput. 45(9), 993–1002 (1996)

    Article  MATH  Google Scholar 

  6. Bollig, B., Wegener, I.: Asymptotically optimal bounds for OBDDs and the solution of some basic OBDD problems. J. Comput. Syst. Sci. 61(3), 558–579 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  7. Brody, J., Matulef, K., Wu, C.: Lower bounds for testing computability by small width OBDDs. In: TAMC, LNCS 6648, pp. 320–331. Springer (2011)

  8. Bryant, R.: Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput. 35(8), 677–691 (1986)

    Article  MATH  Google Scholar 

  9. Díaz, J., Petit, J., Serna, M.J.: A survey of graph layout problems. ACM Comput. Surv. 34(3), 313–356 (2002)

    Article  Google Scholar 

  10. Diestel, R.: Graph Theory, 4th Edition, Graduate texts in mathematics, vol. 173. Springer (2012)

  11. Ergün, F., Kumar, R., Rubinfeld, R.: On learning bounded-width branching programs. In: COLT, pp. 361–368 (1995)

  12. Fortune, F., Hopcroft, J., Schmidt, E.: The complexity of equivalence and containment for free single variable program schemes. In: Proc. of ICALP, LNCS 62, pp. 227–240. Springer (1978)

  13. Gavril, F.: Some NP-complete problems on graphs. In: 11th Conference on Information Science and Systems, pp. 91–95 (1977)

  14. Goldreich, O.: On testing computability by small width OBDDs. In: APPROX-RANDOM, pp. 574–587 (2010)

  15. Newman, I.: Testing membership in languages that have small width branching programs. SIAM J. Comput. 31(5), 1557–1570 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  16. Ochi, H., Ishiura, N., Yajima, S.: Breadth-first manipulation of SBDD of boolean functions for vector processing. In: DAC, pp. 413–416 (1991)

  17. Ochi, H., Yasuoka, K., Yajima, S.: Breadth-first manipulation of very large binary-decision diagrams. In: ICCAD, pp. 48–55 (1993)

  18. Ron, D., Tsur, G.: Testing computability by width-two OBDDs. Theor. Comput. Sci. 420, 64–79 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  19. Sawitzki, D.: The complexity of problems on implicitly represented inputs. In: Proc. of SOFSEM, LNCS 3831, pp. 471–482. Springer (2006)

  20. Sieling, D.: The nonapproximability of OBDD minimization. Inf. Comput. 172(2), 103–138 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  21. Sieling, D., Wegener, I.: NC-algorithms for operations on binary decision diagrams. Parallel Process. Lett. 3, 3–12 (1993)

    Article  MathSciNet  Google Scholar 

  22. Tani, S., Hamagushi, K., Yajima, S.: The complexity of the optimal variable ordering problems of a shared binary decision diagram. In: Proc. of ISAAC, LNCS 762, pp. 389–396. Springer (1993)

  23. Wegener, I.: The size of reduced OBDDs and optimal read-once branching programs for almost all boolean functions. IEEE Trans. Comput. 43(11), 1262–1269 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  24. Wegener, I.: Branching programs and binary decision diagrams: theory and applications. SIAM (2000)

  25. Woelfel, P.: Symbolic topological sorting with OBDDs. J. Discret. Algoritm. 4(1), 51–71 (2006)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

The author would like to thank the Deutsche Forschungsgemeinschaft (DFG) for funding the project Design and Analysis of Implicit OBDD-based Graph Algorithms (BO 2755/1).

Furthermore, we would like to thank Suzana Mitkovska for the technical realization of the figures in the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Beate Bollig.

Additional information

Preliminary versions of parts of this paper have been appeared in [2, 3]

The author is supported by DFG project BO 2755/1-2.

Appendices

Appendix A: Proof of Lemma 2

Let G be the quasi-reduced π-QOBDD representing the function F on the u-, v-, and w-variables, and let G be the quasi-reduced π -QOBDD for F.

Proposition 1 implies directly that only the size of a level between j 1+1 to i l+1 in the variable ordering π and π , respectively, could be different in G and G . Therefore, we compare the number of subfunctions represented by a node labeled by a v-variable at a position between j 1 + 1 and i l+1−1 in G and G , and additionally we compare the number of u l+1-nodes in G with the number of w 1-nodes in G . Our aim is to prove that any level p in G is at least as large as any level p in G for j 1 + 1 ≤ pi l+1. We start with descriptions of the subfunctions in G and G . In the following we assume that f 0 is the constant function 0.

Definition 9

An edge function f i can still be addressed for a subfunction represented on a level between j 1 + 1 and i l+1 iff

  • the number of u-variables set to 1, or u o n e for short, is k, ki,

  • the number of w-variables set to 1, or w o n e for short, is k , k ∈ {0, 1},

  • mlik and m−1 ≥ ik .

Now, a subfunction of F can be described by u o n e , w o n e , and the assignments to the v-variables that are essential for the edge functions that can still be addressed. If u o n e is k, 0 ≤ k < l or w o n e = 1, these edge functions are f k ,…,f k + ml . For k = l and w o n e = 0 the still addressable edge functions are f l ,…,f m−1. For an edge function that can still be addressed we only have to know whether one of its essential vertex variables has already been set to 1 or which of its essential vertex variables could still be set to 1. Let \(f_{i}^{\prime }\) denote the corresponding subfunction of f i . Then the considered subfunctions represented in G can be described by triples \(\left (u_{one}, w_{one}, \left [f_{u_{one}}^{\prime }, \ldots , f_{u_{one}+m-l}^{\prime }\right ]\right )\), u o n e l−1 or w o n e = 1, and by \(\left (l,0, \left [f_{l}^{\prime }, \ldots , f_{m-1}^{\prime }\right ]\right )\). In a similar way the subfunctions in G can be described by triples, where w o n e is always 0 since the first w-variable is tested not until position i l+1 in π .

The following two facts are not difficult to see.

Fact 1

Two non-constant subfunctions represented in G and obtained by replacing the same subset of variables by constants could not be equal if only the number of u-variables set to 1 but not the number of w-variables set to 1 are equal.

Fact 2

Two non-constant subfunctions represented in G obtained by replacing the same subset of variables by constants and for which the number of u-variables set to 1 are different can only be equal if they can be described by (u one ,w one ,[∗]) and \(\left (u^{\prime }_{one}, w^{\prime }_{one}, [\ast ] \right )\) , where \(u^{\prime }_{one}=u_{one}-1\) , w one =1, and \(w^{\prime }_{one}=0\).

The reason is simple that because of F s definition on all computation paths to the 1-sink the number of u-variables set to 1 has to be equal to the number of w-variables set to 1. Now, what is the difference between the investigated subfunctions represented in G and G ? Roughly speaking, in G there are new subfunctions where the number of u-variables set to 1 is l + 1. On the other hand, w o n e is in all cases 0, and the number of edge functions that could still be addressed is m−(l + 1)+1 = ml, which means 1 less than before.

Together with the two observations above, the following facts are sufficient.

  • The number of subfunctions represented in G described by (k, 1, [∗]) is at least as large as the number of subfunctions represented in G by (k, 0, [∗]) for k < l.

  • The number of subfunctions represented in G described by (l, 0, [∗]) is at least as large as the number of subfunctions represented in G by (l, 0, [∗]).

  • The number of subfunctions represented in G described by (l, 1, [∗]) is at least as large as the number of subfunctions represented in G by (l + 1, 0, [∗]).

Since the three classes of subfunctions are disjoint, we are done. Altogether, by proving that every level in G is at least as large as in G we have shown that π -OBDD w (F) is not larger than π-OBDD w (F) and π -QOBDD (F) is not larger than π-QOBDD (F). Therefore, we are done.

Appendix B: Proof of Lemma 3

Let G be the quasi-reduced π-QOBDD representing the function F on the u-, v-, and w-variables, and let G be the quasi-reduced π -QOBDD for F. First, we prove that the width of G is not larger than G. We start with a classification of the edge functions on a given level p with respect to a variable ordering.

Definition 10

We call an edge function, or by abuse of notation edge for short, fresh at a level p with respect to a variable ordering τ iff none of its essential vertex variables is at a position p where p < p in τ. The edge function is incomplete at a level p iff exactly one of its essential vertex variables is at a position p , p < p. The edge function is complete at a level p iff both its essential vertex variables are at positions p , p < p. Let \({e^{p}_{f}}(\tau )\) be the number of fresh edges, let \({e^{p}_{i}}(\tau )\) be the number of incomplete edges, and let \({e^{p}_{c}}(\tau )\) be the number of complete edges at a position p in the variable ordering τ.

In the following let be the position of the variable u m in π. Proposition 1 implies that only the number of nodes on a level , , in the variable ordering π and π , respectively, could be different in G and G . Let \(e_{i}^{\max }\) be the maximal number of incomplete edges at a level , , in π. Then the maximal width on a level , in G is \(m+ e_{i}^{\max } +1\). Therefore, our aim is to prove that there exists a level that contains at least \(m+ e_{i}^{\max } +1\) nodes in G.

We use the same notation as in the proof of Lemma 2. Subfunctions represented on level in G can be described as tuples \(\left (u_{one}, \left [f_{u_{one}}^{\prime }, f_{u_{one}+1}^{\prime }\right ]\right )\), where u o n e ∈{0,1,…,m−1} and \(f_{u_{one}}^{\prime }\) and \(f_{u_{one}+1}^{\prime }\) are subfunctions of \(f_{u_{one}}\) and \(f_{{u_{one}}+1}\), respectively. By definition of \(e_{i}^{\max }\) we know that there are at least \(e_{i}^{\max }\) edges that are not fresh at level . Therefore, there are at least \(e_{i}^{\max }\) different values for u o n e such that the edge function \(f_{u_{one}+1}\) is not fresh. If \(f_{u_{one}+1}\) is not fresh, there are at least two different non-constant subfunctions (u o n e ,[∗,∗]) on level in G. Together with the observation that two non-constant subfunctions obtained from F by replacing only u- and v-variables cannot be equal if the number of u-variables set to 1 are different, we can conclude that there are at least \(m+ e_{i}^{\max }u_{m}\)-nodes in G. Now, we make a case inspection.

  • If there are two edge functions f j and f j + 1, j ∈ {1,…,m−1}, where f j is not fresh and f j + 1 is fresh at level , there exists another subfunction (j,[∗,f j + 1]) not counted before which is represented at a node labeled by u m .

  • If there are two edge functions f j and f j + 1 one incomplete and the other one complete, both complete, or both incomplete with different first essential vertex variables (with respect to the variable ordering π), there are at least three subfunctions (j,[∗,∗]). Therefore there exists at least one additional u m -node not counted before.

  • Otherwise, there is only one vertex variable on a position . In this case there are already \(m+1+e_{i}^{\ell }(\pi )=m+1+e_{i}^{\max }\) different subfunctions represented on level + 1 in G and we are done.

Until now we have seen that the width of G is not larger than the width of G. In the rest of the proof we show that G is not larger than G. We say that a variable z has already been tested on a level p in a ρ-QOBDD if z is at a position p , p < p, in ρ. Our proof idea is to use the accounting method in the following way. First, we show that for the first v-variable there is at most one additional node in G for every u-variable tested after this v-variable in π. For all other v-variables v j there are at most two more v j -nodes in G than in G for every u-variable at a position after v j in π. On the other hand, for every u-variable u j at least two u j -nodes can be saved in G for every v-variable but the first one at a position before u j in π. For the first v-variable in π only one u j -node can be saved. Altogether, G cannot be larger than G. Now, we make the ideas more precise. We start with the following fact.

Fact 3

Two non-constant subfunctions obtained from F by replacing only u- and v-variables cannot be equal if the number of u-variables set to 1 are different.

Iff z is the variable at a position p in a variable ordering, we call the level p also z-level. Next, we look at the number of nodes in G labeled by a vertex variable v j at a position p in π where the number of u-variables at a position p in π is g j , p < p and g j < m. (Note that by Proposition 1 for g j = m the number of nodes labeled by such a variable cannot be different in G and G .) Remember \({e^{p}_{i}}(\tau )\) is the number of incomplete edges at position p in a variable ordering τ. Note that the number of incomplete edges is the same on the v j -levels in G and G since the suborderings of the v-variables are the same in π and π .

Claim 1

There are at most 2(m−g j ) more v j -nodes in G than in G. For the first v-variable \(v_{j_{1}}\) in the variable orderings π and π the difference can even be at most \((m-g_{j_{1}})\).

Proof

We start to estimate the number of v j -nodes in G . It is not difficult to see that for each fresh or complete edge on the v j -level only one node labeled by v j and for an incomplete edge on the v j -level two v j -nodes are necessary. One further v j -node represents the constant function 0. Next, we prove that the number of v j -nodes in G is at least \((g_{j}+1) + {e^{p}_{i}}(\pi )-(m-g_{j})\). Using the notation from the proof of Lemma 2 we can describe the considered subfunctions represented at a v j -node in G by tuples \(\left (u_{one}, \left [f_{u_{one}}^{\prime }, \ldots , f_{u_{one}+m-g_{j}}^{\prime }\right ]\right )\). If an edge function v v is incomplete and v is the variable already tested, there are two subfunctions of this edge function: the constant function 1 and the function v . Note that subfunctions of different incomplete edge functions on a level p may not be independent because their first essential vertex variable can be the same. Therefore, we have to be very careful not to count QOBDD nodes more than once. To give an example of subfunctions which are not independent we consider two edge functions v i v k and v i v , where v i has already been tested. There are only two possibilities: both subfunctions are 1 or one is v k and the other one is v . Therefore, we define an injective mapping from the incomplete edge functions f i , ig j , into the set {1,…,g j } in a straightforward way: f i is mapped to i. As a result we can count two v j -nodes for each incomplete edge in \(\{f_{1}, \ldots , f_{g_{j}}\}\). The reason is that there are at least two subfunctions (i,[∗]), 1 ≤ ig j , represented at a v j -node in G if f i is incomplete. At least \({e^{p}_{i}}(\pi )-(m-g_{j})\) edge functions in \(\{f_{1}, \ldots , f_{g_{j}}\}\) are incomplete. Altogether, using Fact 3 we have shown that there are at least \((g_{j}+1) + {e^{p}_{i}}(\pi )-(m-g_{j})v_{j}\)-nodes in G and the difference of the number of v j -nodes in G and G is at most \((m+{e^{p}_{i}}(\pi )+1)- ((g_{j}+1) + {e^{p}_{i}}(\pi )-(m-g_{j})) = 2(m-g_{j})\).

Since there cannot be incomplete edges if no vertex variable has yet been tested, the difference between the number of \(v_{j_{1}}\)-nodes in G and G is at most \(m-g_{j_{1}}\). □

In the rest of the proof we compare the number of nodes labeled by a u-variable in G and G . Let k j be the number of v-variables that are before the variable u j in π. To finish the proof it is sufficient to show that in G there are at least 2k j −1 nodes labeled by u j less than in G.

Claim 2

There are at least 2k j −1 less u j -nodes in G than in G, where k j is the number of v-variables that are before u j in π.

Proof

There are j u j -nodes in G . We have to prove that there are at least j + (2k j −1)u j -nodes in G. As before we describe subfunctions represented at a u j -node in G as tuples \(\left (u_{one}, \left [f_{u_{one}}^{\prime }, \ldots , f_{u_{one}+m-(j-1)}^{\prime }\right ]\right )\), where 0 ≤ u o n e j−1. If all vertex variables before u j in π are set to 1, the resulting subfunctions in the second part of the tuples can only be the constant subfunction 1 and fresh edge functions. We have j different u j -nodes for the j different values for u o n e and replacing all vertex variables before u j by 1. It remains to prove that there are 2k j −1 further u j -nodes in G. The problem is not to count subfunctions more than once. In the following an edge function f i belongs to the tuples (u o n e ,[∗]), or u o n e -tuples for short, iff u o n e iu o n e + m−(j−1). Inversely, we say that u o n e -tuples contain an edge function f i iff u o n e iu o n e + m−(j−1). By abuse of notation, we also say that an edge belongs to a tuple or a tuple contains an edge. Since by assumption each vertex is incident to at least two edges, we can define an injective mapping from the k j vertex variables that are before u j in π to edge functions for which the corresponding vertex variable is essential. Let \(VV=\{v_{i_{1}}, \ldots , v_{i_{k_{j}}}\}\) be the set of the vertex variables before u j in π and let \(f_{j_{\ell }}\) be the chosen edge function for \(v_{i_{\ell }}\), 1 ≤ k j . Our aim is to prove that for every chosen edge function (except possibly f m ) there are at least two further subfunctions. We consider two cases.

If j = 1, we consider for each chosen edge function \(f_{j_{\ell }}\) the following partial assignments:

  • all vertex variables in VV without the vertex variables which are essential for \(f_{j_{\ell }}\) are set to 1, the latter to 0,

  • all vertex variables in \(VV\setminus \{v_{i_{\ell }}\}\) are set to 0, \(v_{i_{\ell }}\) is set to 1.

It is not difficult to see that for each chosen edge the assignments lead to two different subfunctions. It remains to prove that we do not count any subfunction more than once for different chosen edge functions. Two vertex variables cannot be both essential for two different edge functions because multiple edges are not allowed. Moreover, each vertex has degree at least two and each edge function is chosen for at most one vertex variable in VV. Therefore, we can conclude that there are altogether at least 2k j −1 further nodes labeled by u j and we are done. (For k j > 1, there are even at least 2k j further u j -nodes.)

If j>1, each edge function f i , i < m, belongs to at least two different kind of tuples, f m belongs only to (j−1)-tuples. Now, we consider for each chosen edge function (except possibly f m ) two different kind of tuples which contain the investigated edge function. Let \(f_{j_{\ell }}\) belong to u o n e -tuples. We consider partial assignments to the variables where the variables u 1,…,u j−1 are set in such a way that the number of u-variables set to 1 is u o n e and all vertex variables in VV without the vertex variables which are essential for \(f_{j_{\ell }}\) are set to 1, the latter to 0. Similarly to the case that j is equal to 1, we can conclude that there are altogether at least 2k j −1 further nodes labeled by u j and we are done. □

Appendix C: Proof of Lemma 4

Let G be the quasi-reduced π-QOBDD representing the function F on the u-, v-, and w-variables, and let G be the quasi-reduced π -QOBDD for F. First, we prove that the width of G is not larger than G. The proof follows the line of the proof of Lemma 3 and we use the same notation for the description of subfunctions as in the proofs of Lemma 2 and Lemma 3. Let be the position of the variable w 1 in π. Proposition 1 implies directly that only the number of nodes on a level , > , in the variable ordering π and π , respectively, could be different in G and G . Let \(e_{i}^{\max }\) be the maximal number of incomplete edges at a level , > , in π. The maximal width on a level , > in G is \(m+ e_{i}^{\max } +1\). Therefore, our aim is to prove that level + 1 contains at least \(m+ e_{i}^{\max } +1\) nodes in G. If the number of u-variables set to 1 is 0, the corresponding subfunctions of F are the constant function 0. Hence, it is sufficient to prove that level + 1 in G contains at least \(m+ e_{i}^{\max }\) different non-constant subfunctions. Obviously, an edge function that is incomplete at a level , > , cannot be complete at a level , where . Thus there are at least \(e_{i}^{\max }\) edges at level + 1 that are not complete, therefore \(e_{i}^{\ell +1}(\pi )+e_{f}^{\ell +1}(\pi )\geq e_{i}^{max}\). In the following we make a case inspection depending whether the edge f m is still fresh or not at level + 1 in π.

  • If the edge function f m is fresh at level + 1 in G, there are at least \(e_{i}^{\ell +1}(\pi ) +e_{c}^{\ell +1}(\pi ) +1\) subfunctions (∗, [1]) on level + 1 in G. Furthermore, for the incomplete edge functions at level + 1 there are at least \(e_{i}^{\ell +1}(\pi ) +1\) subfunctions (∗, [v i ]), where v i is the second essential vertex variable of an incomplete edge function at level + 1 in π. Finally, there are \(2e_{f}^{\ell +1}(\pi )-1\) subfunctions (j,[f j ]), j < m, and (j−1,[f j ]), jm, on level + 1 in G, where f j is an arbitrary fresh edge function at level + 1. Therefore, altogether there are at least \(m+e_{i}^{\ell +1}(\pi )+e_{f}^{\ell +1}(\pi )+1> m+e_{i}^{\max }\) different non-constant subfunctions represented on level + 1 in G and we are done.

  • If the edge function f m is not fresh at level + 1 in G, there are at least \(e_{i}^{\ell +1}(\pi ) +e_{c}^{\ell +1}(\pi )\) subfunctions (∗, [1]) on level + 1. Moreover, there are altogether at least \(e_{i}^{\ell +1}(\pi )\) subfunctions (∗, [v i ]), where v i is the second essential vertex variable of an incomplete edge function at level + 1. Finally, there are \(2e_{f}^{\ell +1}(\pi )\) subfunctions (j,[f j ]) and (j−1,[f j ]), on level + 1 in G, where f j is an arbitrary fresh edge function at level + 1. Altogether, there are at least \(m+e_{i}^{\ell +1}(\pi )+e_{f}^{\ell +1}(\pi )\geq m+e_{i}^{\max }\) different non-constant subfunctions represented on level + 1 in G and we are done.

Altogether, we have seen that π -OBDD w (F) is not larger than π-OBDD w (F).

In the rest of the proof we show that G is not larger than G. We start with a description of the subfunctions of F where at least all u-variables have been replaced by constants. Remember that for any edge function that can still be addressed we only have to know whether at least one of its essential vertex variables has been set to 1 or which of its essential vertex variables could still be set to 1. Let \(f_{q}^{\prime }\) denote the corresponding subfunction of f q . If u o n e is the number of u-variables set to 1 and w o n e is the number of w-variables set to 1, the tuple \(\left (u_{one}-w_{one}, \left [f_{u_{one}}^{\prime }\right ]\right )\) describes a subfunction of F, where u o n e w o n e . We can identify the tuples with the corresponding subfunctions and vice versa. The first component of a tuple is called the distance value. Obviously, two non-constant subfunctions represented on the same level cannot be the same if the distance values are different. Furthermore, they cannot be the same if the corresponding subfunctions in the second components of the tuples are different. Therefore, two non-constant subfunctions described as \(\left (r, \left [f_{j_{1}}\right ]\right )\) and \(\left (r, \left [f_{j_{2}}\right ]\right )\), j 1j 2, cannot be equal because different edges are incident to different sets of vertices.

First, we remark that the number of w-nodes in G representing F is minimal with respect to all variable orderings with the u-variables in the beginning. Remember, is the first position of a w-variable in π. By Proposition 1 only the number of nodes labeled by a v-variable at a position p, where p > , can be different in G and G . Let v i be a variable at position p i in π, p i > , and let g i be the number of w-variables at a position less than p i in π. Next, we consider two cases for these v-variables.

Claim 3

If the number of incomplete and complete edges \(e_{i}^{p_{i}}(\pi )+e_{c}^{p_{i}}(\pi )\) at position p i in π is at most m−g i , then the number of v i -nodes in G is at most as large as in G.

Proof

Since the suborderings of the v-variables are not different in π and π , the number of incomplete edges is the same on the v j -levels in G and G . Let \(p_{i}^{\prime }\) be the position of v i in π . We can conclude that the number of v i -nodes in G is \(m+1 + e_{i}^{p_{i}^{\prime }}(\pi ^{\prime })= m+1 + e_{i}^{p_{i}}(\pi )\). In the following we classify the subfunctions represented at a v i -node in G in four classes.

  • i) There is one v i -node representing the constant function 0 in G, where all u-variables are set to 0.

  • ii) For each fresh edge f j at position p i there exists at least one v i -node in G representing a subfunction (∗, [f j ]).

  • iii) Since by assumption the number \(e_{i}^{p_{i}}(\pi )+e_{c}^{p_{i}}(\pi )\) of incomplete and complete edges at position p i is at most mg i , we know that there are at least \(e_{i}^{p_{i}}(\pi )+e_{c}^{p_{i}}(\pi )\) different subfunctions (∗, [1]).

  • iv) Let i k be the number of incomplete edges at position p i whose second essential vertex variable in the variable ordering is v k . Since i k is at most \(e_{i}^{p_{i}}(\pi )\) and therefore at most mg i , there exist at least i k nodes labeled by v i in G that represent a subfunction (∗, [v k ]). Moreover, non-constant subfunctions \(\left (\ast , \left [v_{k^{\prime }}\right ]\right )\) and \(\left (\ast , \left [v_{k^{\prime \prime }}\right ]\right )\) for different vertices \(v_{k^{\prime }}\) and \(v_{k^{\prime \prime }}\) cannot be the same.

Obviously, subfunctions from different classes cannot be the same. Therefore, we can conclude that the number of v i -nodes in G is at least \(1+ e_{f}^{p_{i}}(\pi ) + (e_{i}^{p_{i}}(\pi ) +e_{c}^{p_{i}}(\pi )) + e_{i}^{p_{i}}(\pi )= m+1 + e_{i}^{p_{i}}(\pi ) =m+1 + e_{i}^{p_{i}^{\prime }}(\pi ^{\prime })\). □

Now, let \(v_{i_{1}}\) be the first v-variable in π for which the number of incomplete and complete edges \(e_{i}^{p_{i_{1}}}(\pi )+e_{c}^{p_{i_{1}}}(\pi )\) at position \(p_{i_{1}}\) in π is larger than the number \(m-g_{i_{1}}\) of w-variables after \(v_{i_{1}}\) in π. Since the number of incomplete and complete edges and the number of already tested w-variables are increasing, we know that this requirement is also satisfied for all v-variables at a position larger than \(p_{i_{1}}\) in π. Let \(v_{i_{2}}, \ldots , v_{i_{k}}\) be these v-variables.

As we have already mentioned before the number of v j -nodes in G is \(m+1+e_{i}^{p_{j}^{\prime }}(\pi ^{\prime }) =m+1+e_{i}^{p_{j}}(\pi )\) since the subordering of the v-variables does not change from π to π . Now, we look at the v j -nodes in G. We may assume that g j , j ∈ {i 1,…,i k }, is larger than 2 because otherwise it can easily be shown that there are at least as many v j -nodes in G as in G . As before we classify the subfunctions represented at a v j -node in four classes.

  • i) There is one v j -node representing the constant function 0 in G.

  • ii) For each fresh edge f at position p j there exists at least one v j -node in G representing a subfunction (∗, [f ]).

  • iii) Since by assumption the number \(e_{i}^{p_{j}}(\pi )+e_{c}^{p_{j}}(\pi )\) of complete and incomplete edges at position p j is larger than mg j , there are at least mg j + 1v j -nodes representing different subfunctions (∗, [1]).

  • iii) Let \(n_{j^{\prime }}\) be the number of incomplete edges at position p j whose second essential vertex variable in the variable ordering π is \(v_{j^{\prime }}\). (We call these edges incomplete \(v_{j^{\prime }}\)-edges for short.) There exist at least \(\min (n_{j^{\prime }}, m-g_{j}+1)\) nodes labeled by v j in G that represent a subfunction \(\left (\ast , \left [v_{j^{\prime }}\right ]\right )\).

If for all incomplete \(v_{j^{\prime }}\)-edges, there exist at least \(n_{j^{\prime }}\) nodes labeled by v j representing a subfunction \(\left (\ast , \left [v_{j^{\prime }}\right ]\right )\) in G, the difference between the number of v j -nodes in G and G is at most g j −1. If not, the difference is at most (g j −1)+(g j −2). (Note, that we have used the fact that there cannot be more than m−1 incomplete \(v_{j^{\prime }}\)-edges.) Our aim is to show that there are at least as many additional w-nodes in G as additional v-nodes necessary in G . We are faced with two problems. We have to guarantee that we count only additional w-nodes. Moreover, we have to be very careful not to count the additional w-nodes more than once. In order to do so, we make use of an advanced accounting method.

We start with the solution to the first problem. We need m +1 nodes labeled by \(w_{1}, \ldots , w_{m-{\ell ^{\prime }}+1}\) that represent a subfunction ( ,[1]) in G , ∈ {1,…,m}. Furthermore, there are m−1w-nodes representing a subfunction (0,[1]) in G . In G there are m +1w-nodes that represent a subfunction \(\left (\ell ^{\prime }, \left [f_{\ell ^{\prime }}\right ]\right )\) or ( ,[1]) in G (depending on the position of the first essential vertex variable for the edge function \(f_{\ell ^{\prime }}\)). Moreover, there are m−1w-nodes that represent one of the subfunctions (0,[f 1]) or (0,[1]) (again depending on the position of the first essential vertex variable for f 1). In the following in order to compensate for the additional v-nodes necessary in G , we count none of these w-nodes.

Next, we attack the second problem. Since for each vertex there are at least two incident edges and the input graph for OLA is connected, we can define an injective mapping from the vertices \(v_{i_{1}}, \ldots , v_{i_{k}}\) to the set of edges incident to these vertices without considering the edge function f 1. To be more precise, a vertex is mapped to one of its incident edges. Let \(f_{c_{1}}, \ldots ,f_{c_{k}}\) be the set E of the chosen edges. A chosen edge \(f_{c_{j}}\) is fresh at position \(p_{i_{j}}\) if \(v_{i_{j}}\) is the first essential vertex variable for \(f_{i_{j}}\) in π. Otherwise, \(f_{c_{j}}\) is incomplete and \(v_{i_{j}}\) is the second essential vertex variable. Now, we prove that there are at least \(g_{i_{j}}-1\) further w-nodes in G. There exist one w r -node, 1 < rc j , representing one of the subfunctions \(\left (c_{j}-r+1, \left [f_{c_{j}}\right ]\right )\) and \(\left (c_{j}-r+1, \left [v_{i_{j}}\right ]\right )\) and \(g_{i_{j}}-c_{j}w\)-nodes representing \(\left (0, \left [f_{c_{j}}\right ]\right )\) or \(\left (0, \left [v_{i_{j}}\right ]\right )\). (Here, we assume that c j is not larger than \(g_{i_{j}}\) but the bounds can easily be adapted.) The following observation is crucial to guarantee that the w-nodes are not counted more than once. For different edge functions \(f_{c_{j^{\prime }}}\) and \(f_{c_{j^{\prime \prime }}}\) subfunctions \(\left (\ast , \left [f_{c_{j^{\prime }}}\right ]\right )\) and \(\left (\ast , \left [f_{c_{j^{\prime \prime }}}\right ]\right )\) are different. Moreover, nodes labeled by a w-variable that represent a subfunction \(\left (\ast , \left [v_{i_{j}}\right ]\right )\) are only counted for the vertex variable \(v_{i_{j}}\). Furthermore, we do not count again nodes representing subfunctions \(\left (c_{j}, \left [f_{c_{j}}\right ]\right )\). Therefore, we have \(g_{i_{j}}-1\) additional w-nodes for each vertex \(v_{i_{j}}\). Next, we are looking for \(g_{i_{j}}-2\) further w-nodes for each vertex \(v_{i_{j}}\). If c j m, then there exists one w r -node, 2 < rc j , representing one of the subfunctions \(\left (c_{j}-r+2, \left [f_{c_{j}}\right ]\right )\) and \(\left (c_{j}-r+2, \left [v_{i_{j}}\right ]\right )\) and \(g_{i_{j}}-c_{j}w\)-nodes representing \(\left (1, \left [f_{c_{j}}\right ]\right )\) or \(\left (1, \left [v_{i_{j}}\right ]\right )\). Altogether, we have shown that there are \(g_{i_{j}}-2\) further w-nodes for \(v_{i_{j}}\) if c j m. Finally, we investigate the special case that c j is equal to m. Here, the problem is that we cannot find \(g_{i_{j}}-2\) further w-nodes in a similar way as in the other cases. Hence, we use another idea in order to prove that there are at least as many nodes in G as in G . Until now we have already proved that there are \(m-(g_{i_{j}}-1)+1v_{i_{j}}\)-nodes representing subfunctions (∗, [1]) and the constant function 0 and \(g_{i_{j}}-1\) further w-nodes. It is sufficient to prove that there are at least \(e_{i}^{p_{i_{j}}}(\pi )\) further nodes. Our aim is to show that for each edge incomplete at level \(p_{i_{j}}\) there is a further node in G that has not been counted before. For this reason we classify the edges which are incomplete at position \(p_{i_{j}}\) into two classes, edges which are already incomplete at position and edges which are still fresh at position . (Remember that is the position of the first w-variable w 1 in π.) Until now we have only counted w 1-nodes representing subfunctions \((c_{j^{\prime }},[f_{c_{j^{\prime }}}])\) or \((c_{j^{\prime }},[1])\), 1 ≤ j k. Therefore, for each edge in the first class we have one further node labeled by w 1. Obviously, a fresh edge remains fresh until its first essential vertex variable is tested and for each edge fresh at position but incomplete at position \(p_{i_{j}}\) in π, its first essential vertex variable is at a position between and \(p_{i_{j}}\). For the vertex variables in \(\{v_{i_{1}}, \ldots , v_{i_{k}}\}\) we have not yet taken into account nodes that represent subfunctions (∗, [f q ]) for fresh edges f q up to now. As a result, if there is no v-variable besides \(\{v_{i_{1}}, \ldots , v_{i_{k}}\}\) at a position between and \(p_{i_{j}}\), we can conclude that for each edge in the second class, incomplete at the \(v_{i_{j}}\)-level but fresh at position , there is at least one further node labeled by a vertex variable and we are done. Otherwise, let v i be the first v-variable at a position larger in π. It is easy to see that edges fresh at position are also fresh at position p i . We know that \(e_{i}^{p_{i}}(\pi )+e_{c}^{p_{i}}(\pi )\) is at most mg i because \(v_{i}\not = v_{i_{1}}\) and we can conclude that g i is less than m. The reason is that for g i = m the number of fresh edges at position p i would be m which means that all w-variables would be before the vertex variables in π and the size of G would be too large anyway. Therefore, for all fresh edges f q at position p i except possibly f m there are at least two different subfunctions (∗, [f q ]) with different distance values represented at a v i -node. Furthermore, there is at least one further \(v_{i_{j}}\)-node representing a subfunction \((m-g_{i_{j}},[f_{m}])\) or \((m-g_{i_{j}},[v_{i_{j}}])\) depending whether \(v_{i_{j}}\) is the first or second essential vertex variable for f m . We have not counted such a \(v_{i_{j}}\)-node before because we have only counted \(v_{i_{j}}\)-nodes representing subfunctions that belong to class i) or i i i) up to now. Altogether, we have at least \(e_{i}^{p_{i_{j}}}(\pi )\) further nodes which we have not counted before and we are done.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bollig, B. On the Minimization of (Complete) Ordered Binary Decision Diagrams. Theory Comput Syst 59, 532–559 (2016). https://doi.org/10.1007/s00224-015-9657-x

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-015-9657-x

Keywords

Navigation