Upper and lower bounds on the OBDD-width of a special integer multiplication
Tong Qin
Abstract
We consider the Boolean function SMuln−1n(x,y), which computes the middle bit of the multiplication of two natural numbers represented as n-bit binary strings x and y, drawn from a restricted domain. We investigate the width of OBDDs computing SMuln−1n. We introduce a combinatorially defined function s∗(n) and show that the width of such OBDDs is Θ(2s∗(n)).
Keywords: OBDD, width, tight bounds, fooling set, path set
1 Introduction
A binary decision diagram (BDD) represents a Boolean function on Xn={x0,…,xn−1} as a directed acyclic graph with the following structure: It has one root node, some internal nodes and two sink nodes. Each internal node (including the root node) is labeled by a variable in Xn and has two outgoing edges labeled by 0 and 1 respectively. The two sink nodes have no outgoing edge and one is labeled by 0 and the other is labeled by 1. For a given input to Xn, that is, an assignment to variables in Xn, the computation path of BDD is a path from the root node to one of its sink nodes, leaving each node labeled by xi following the edge labeled by the value of xi; the label of the sink node is regarded as the output of the computation path. We say that such a BDD computes f on Xn if it outputs the value of f for any input to Xn. A variable ordering on Xn is a bijection π:Xn→{0,…,n−1}, leading the ordered list π−1(0),…,π−1(n−1). An ordered binary decision diagram (OBDD) is a special case of BDDs where any path on the graph passes the nodes in an order respecting the variable ordering π. That is, if an edge starts from a node labeled by xi to a node labeled by xj, then π(i)<π(j). Usually we assume that BDDs (including OBDDs) are reduced, by which we mean the following two rules have been applied when constructing BDDs:
• Merge any two identical subgraphs.
• Eliminate any node whose two children are identical.
Notice that due to this reduction process for any Boolean function f and for any variable ordering π, an OBDD that computes f under the ordering π is uniquely determined. We will refer this property as the uniqueness of OBDD. Let Bπ(f) denote the OBDD for computing f with ordering π. The size of Bπ(f) is the number of its nodes. Let B(f) denote the Bπ(f) of
f that has the minimum size among all variable orderings π. Below we use ∣Bπ(f)∣ and ∣B(f)∣ to denote the size of Bπ(f) and B(f) respectively.
In this paper, we discuss the size of OBDDs for integer multiplication. The first size lower bound was given by Bryant [Bryant(1986)]. He showed that for any variable ordering π, there exists an index k such that the size of Bπ for computing the kth bit of multiplication (a Boolean function denote by Mulkn) is at least 2n/8. In 1991, Bryant proved that Bπ(Muln−1n) requires at least 2n/8 nodes for any variable ordering π [Bryant(1991)]. The current best lower bound for Muln−1n, which is 2n/2/61, was showed by Woelfel in 2005 [Woelfel(2005)] by using a universal family of hash functions. He also gave a non-trivial upper bound of 7/3⋅24n/3 for ∣B(Muln−1n)∣. There is still a gap between the exponents of these upper and lower bounds, and we would like to close this gap to get lower and upper bounds with a “matching exponent”, that is, a function s(n)=Ω(n) such that 2s(n)≤∣B(Muln−1n)∣≤p(n)2s(n) holds for some polynomial p(n). It is clear, from the above lower and upper bound results, that a function s0(n):=log2∣B(Muln−1n)∣ is a matching exponent. What we want is a more concrete matching exponent function.
The purpose of this paper is to give a step towards such a concrete matching exponent. We introduce a function SMuln−1n that is a quite restricted version of Muln−1n, and we derive a combinatorially defined function s∗(n) as a matching exponent. To get sharp bounds, we investigate the width of B(SMuln−1n) and show that it is in fact Θ(2s∗(n)), from which we have 2⋅2s∗(n)−1≤∣B(SMuln−1n)∣≤n⋅2s∗(n), i.e., lower and upper bounds with s∗(n) as a matching exponent.
2 Preliminaries
We first prepare some notions and notation necessary for our technical discussion. Throughout this paper, we always use f and π to denote a Boolean function on n variables and a variable ordering on Xn unless otherwise stated. The range of a variable index i is {0,…,n−1}.
Consider the OBDD Bπ(f). For a node labeled by xi, we define its level as the order of xi under π, that is, π(xi). We say that a node is before (respectively, after) xi if its level is smaller (larger) than the level of xi. A node after xi may be a sink node.
Definition 2.1. For any variable index i, let Eπ(i) be the set of edges starting from a node before xi and ending at xi or a node after xi. The width of xi is the number of edges in Eπ(i). (We use Widthπ(i;f) to denote the width of xi in Bπ(f), and simplify it as Widthπ(i) when f is clear from the context.)
For any variable index i, a (input variable) partition w.r.t. i (and π) is a pair (L,R) where L (respectively, R) is the set of variables before xi (respectively, the set of remaining variables). Note that the first variable w.r.t. π in R is xi.
Definition 2.2. For a given partition (L,R), define a left (respectively, right) assignment l:L→{0,1} (resp., r:R→{0,1}) as an assignment of Boolean values to the inputs in L (resp., R). Let l⋅r denote the complete input assignment resulting from left assignment l and right assignment r.
We introduce two sets of left assignments that play a key role for investigating lower and upper bounds of Width π(i).
Definition 2.3. For any partition (L,R), a set of left assignments A(L,R) is a fooling set of f if it satisfies that for any two distinct l and l′ in A(L,R), there exists a right assignment r such that f(l′⋅r)=f(l⋅r).
Definition 2.4. For any partition (L,R), a set of left assignments P(L,R) is a path set if it satisfies that for any left assignment l, there exists a left assignment l′∈P(L,R) such that for any right assignment r we have f(l⋅r)=f(l′⋅r).
We have the following lemma that connects the above two sets with Width π(i).
Lemma 2.1. For any variable ordering π and any variable index i, consider the partition (L,R) w.r.t. i. Then we have
∣A(L,R)∣≤Widthπ(i)≤∣P(L,R)∣
Proof. First, we prove the lower bound, i.e., the left inequality. Consider two different left assignments l and l′ in A(L,R). Let e and e′ be the nodes of Bπ(f) that are reached from the root following the left assignments l and l′ respectively. Each of e and e′ is either a node labeled by the variable in R or a sink. Since A(L,R) is a fooling set of f, there is a right assignment r such that f(l⋅r)=f(l′⋅r). So the ends of the computation paths under l⋅r and l′⋅r are different. Therefore e=e′; two distinct left assignments in A(L,R) have to lead us to two different e and e′ so that the paths after e and e′ following the same r would lead us to different sinks. Thus, the mapping: A(L,R)⟼Eπ(i) is injective and we have Widthπ(i)≥∣A(L,R)∣.
For proving the upper bound, i.e., the right inequality, we use a similar idea. Let e and e′ be the same nodes defined above. Since for any left assignment l, we can find a l′∈P(L,R) such that for any right assignment r, f(l⋅r)=f(l′⋅r). So the computation paths from e and e′ following any right assignment are the same in Bπ(f); thus, e=e′ due to the uniqueness of OBDD, and hence, the mapping Eπ(i)⟼P(L,R) is injective. Therefore we have Widthπ(i)≤∣P(L,R)∣.
In this paper we focus on the width of OBDDs to derive sharp upper and lower bounds. What we want is to give a combinatorial definition of s∗(n) and constants c1,c2>0 that satisfies the following two bounds:
Note that these width bounds are polynomially related to size bounds.
Lemma 2.2. For any variable index i, we have
∣Bπ(f)∣≥2Widthπ(i)−1
On the other hand, we have
∣Bπ(f)∣≤i=0∑n−1Widthπ(i)
Proof. Consider any variable index i. From the definition of Widthπ(i), we can identify Widthπ(i) edges, i.e., the edges of Eπ(i), in Bπ(f). Consider subtree of Bπ(f) consisting of paths from the root to each edge of Eπ(i). Since each node of this subtree has at most two children and there are Widthπ(i) leaves, there must be at least 2Widthπ(i)−1 nodes in this subtree, which implies the lower bound of the lemma.
On the other hand, since in every level of Bπ(f), there are at most Widthπ(i) nodes, ∣Bπ(f)∣≤∑i=0n−1Widthπ(i).
As a corollary of this lemma, the following relation is immediate.
Corollary 2.3. Suppose that we have some function s∗(n) and constants c1,c2>0 satisfying the conditions (1) and (2). Then we have 2c12s(n)−1≤∣B(f)∣≤c2n2s(n).
3 Upper and lower bound analysis
First, we recall the definition of the Boolean function based on the standard integer multiplication that has been investigated in the literature. Below we use x=(x0,…,xn−1) and y=(y0,…,yn−1) to denote respectively a sequence of x-variables and y-variables.
Definition 3.1.
Muln−1n(x,y)=(Xn⋅Yn)n−1,
where Xn:=∑k=0n−1xk2k, Yn:=∑k=0n−1yk2k, and (Xn⋅Yn)n−1 denotes the value of the nth bit, i.e., the middle bit, of the result of the multiplication of Xn and Yn.
We define our target Boolean function that is restricted on some specific inputs.
Definition 3.2.
SMuln−1n(x,y)=Muln−1n(x,y),
if ∣{i∣yi=1}∣=2, and SMuln−1n(x,y)=0 otherwise.
Here let us fix an assignment to y-variables. For any a<b∈{0,…,n−1}, we consider the case where two variables yn−a−1 and yn−b−1 are assigned 1, and the other yi's are assigned 0. Let h=b−a. We use SMuln−1n(x;a,b) to denote SMuln−1n under this partial assignment. Then we have the following equation, which will be referred as equation (3). (See Figure 1 for the meaning of m in the equation.)
As stated in equation (3) and illustrated in Figure 1, a carry to the middle bit occurs only if xm=xm−h=1. Furthermore, for defining fooling sets and path sets, an important case (for a given partition (L,R) of x-variables) is where xm∈L and xm−h∈R, or xm∈R and xm−h∈L. With this motivation, we define the following set.
Definition 3.3. For any partition (L,R) of x-variables,
Here for the sake of our later discussion, we express the index of x-variables by k(j,p) and k(j+1,p); it is, however, nothing but i and i−h for some i∈H. Indeed, the following lemma guarantees that each index i uniquely determines a pair (j,p) such that k(j,p)=i holds.
Lemma 3.1. For any i∈{0,…,b}, there exists a unique pair (j,p) such that k(j,p)=i. (In the following, we use k−1(i) to denote this pair (j,p).)
Proof. We first claim that any i∈{0,…,b} can be expressed by k(j,p). The case i=b is easy; we have b=k(0,0). Assume then inductively that i=t can be expressed as t=k(jt,pt), and consider the case i=t−1. From the assumption, we have t−1=b−pt−jth−1. If pt>0, then by letting p′=pt−1 and j′=jt, we have k(j′,p′)=t−1. On the other hand, if pt=0, then by letting p′=h−1 and j′=jt−1 (since t=b and jt=0), we have k(j′,p′)=b−p′−j′h=b−h−1−(jt−1)h=t−1. This proves the first claim.
For proving the uniqueness, assume that there are two distinct pairs (j1,p1) and (j2,p2) such that k(j1,p1)=i=k(j2,p2). Then by definition of k(j,p), we have b−j1h−p1=b−j2h−p2, which implies that
j1h+p1=j2h+p2⟺j1−j2=hp2−p1
Since ∣p2−p1∣≤h−1 and j1−j2 is an integer, j1−j2=0. Then p1=p2 follows, and we have (j1,p1)=(j2,p2); that is, the uniqueness holds.
3.1 A lower bound
Let us fix an assignment to y-variables as above. That is, yn−a−1 and yn−b−1 are assigned 1, and the other yi's are assigned 0. Furthermore, we assume the situation where we can construct an OBDD by “knowing” this assignment to y-variables; more specifically, we define a fooling set for a function SMuln−1n(x;a,b) on x-variables. (Note that we are not restricting ourselves to specific orderings where y-variables come first for showing our lower bound. We simply show a width lower bound for SMuln−1n(x;a,b), and use the maximum of such lower bounds among all a<b as a width lower bound for SMuln−1n(x,y).)
Below we fix any variable ordering on x-variables. Note that a partition of x-variables is determined by a variable xi at which we want to discuss the width of OBDDs.
Definition 3.4. For any partition (L,R) of x-variables, A(L,R;a,b) is a set of left assignments l defined as follows with parameters ωp∈{0,1} for p∈Split(L,R;a,b):
l′(xi)={0,(j+wp)mod2,ifi>b,andifi≤b,
where (j,p)=k−1(i), the unique pair such that k(j,p)=i, and wp=ωp if p∈Split(L,R;a,b) and wp=0 otherwise.
From this definition, the following size estimate is immediate.
Claim 1.
∣A(L,R;a,b)∣=2∣Split(L,R;a,b)∣.
We show that the set A(L,R;a,b) is indeed a fooling set for SMuln−1n(x;a,b).
Lemma 3.2. A(L,R;a,b) is a fooling set for SMuln−1n(x;a,b).
Proof. Consider any two distinct left assignments l,l′∈A(L,R;a,b). What we need to show is that there is a right assignment r such that SMuln−1n(l⋅r;a,b)=SMuln−1n(l′⋅r;a,b), where by, e.g., SMuln−1n(l⋅r;a,b), we mean the value of SMuln−1n(x;a,b) under the assignment l⋅r to x.
Let ω denote a sequence of ωp's for all p∈Split(L,R;a,b) that are used for defining assignment l; respectively, let ω′ be a sequence ωp′'s that define l′. Since l=l′, there is at least one p∈Split(L,R;a,b) such that ωp=ωp′. Recall that for any p∈Split(L,R;a,b), we have either xk(j,p)∈L and xk(j+1,p)∈R, or xk(j,p)∈R and xk(j+1,p)∈L. Define m′ by
m′=max{i∣ωp=ωp′for(j,p)s.t.k(j,p)=i}
Define m0=m′ if xm′∈L and m0=m′−h otherwise (so that xm0∈L holds). Since l(xm0)=l′(xm0), we may assume that l(xm0)=0 and l′(xm0)=1 without lost of generality. Note that m0≤b. Consider two cases depending on the relation between m0 and b, we show the following claims, whose proofs will be given in Appendix A.
Claim 2. Consider the case where m′=b. Define r(xi)=0 for all xi∈R. Then the following properties holds:
(1) l⋅r(xa)⊕l⋅r(xb)=0,
(2) l′⋅r(xa)⊕l′⋅r(xb)=1,
(3) no i∈H:={h,…,b−1} exists such that l⋅r(xi)=l⋅r(xi−h)=1, and
(4) no i∈H exists such that l′⋅r(xi)=l′⋅r(xi−h)=1.
This means (i.e., from (3) and (4) of the claim) that no carry to the middle bit occurs in equation (3) for SMuln−1n(l⋅r;a,b) and SMuln−1n(l′⋅r;a,b); thus, we have SMuln−1n(l⋅r;a,b)=SMuln−1n(l′⋅r;a,b) from (1) and (2) of the claim.
Claim 3. Consider the case where m′<b. Define r by
r(xi)={0,(j+wp)mod2ifi>b,andifi≤b,
where (j,p) is the unique pair such that k(j,p)=i, and wp=ωp if p∈Split(L,R;a,b) and wp=0 if otherwise. Then the following properties holds:
(1) l⋅r(xa)⊕l⋅r(xb)=l′⋅r(xa)⊕l′⋅r(xb)=1,
(2) l⋅r(xi)=l⋅r(xi−h) for all i∈H,
(3) max{i∣l′⋅r(xi)=l′⋅r(xi−h),i∈H}=m′ and l′⋅r(xm′)=1.
From (3) of the claim, there is no carry to the middle bit occurs in SMuln−1n(l⋅r;a,b), while the carry do occurs in SMuln−1n(l⋅r;a,b) from (4) of the claim. Furthermore, from (1) and equation (3), we have SMuln−1n(l⋅r;a,b)=1 and SMuln−1n(l′⋅r;a,b)=0. Therefore for any case discussed above, there is a right assignment r such that SMuln−1n(l⋅r;a,b)=SMuln−1n(l′⋅r;a,b), proving the desired property.
Consider any variable ordering πx on x-variables, and for any x-variable xi, let (L,R) be a partition w.r.t. xi and πx. Then from Lemma 2.1, we have
Widthπx(i;SMuln−1n(x;a,b))≥∣A(L,R;a,b)∣.
Since SMuln−1n(x;a,b) is a special case of the original SMuln−1n(x,y), this width lower bound can be clearly used as a width lower bound of SMuln−1n at xi w.r.t. any variable ordering for SMuln−1n that is an extension of πx. Thus, for any variable ordering π for SMuln−1n and any x-variable index i, letting (L,R) be a partition of x-variables w.r.t. xi and π, we have
Widthπ(i;SMuln−1n)≥a,bmax∣A(L,R;a,b)∣
Now we define our target exponent function s∗(n) as follows.
s∗(n)=πxminL,Rmaxa,bmax∣Split(L,R;a,b)∣,(4)
where πx is taken from all x-variable ordering, (L,R) is taken from all partition of x-variables w.r.t. πx, and a<b∈{0,…,n−1}. Let πwopt denote a x-variable ordering achieving the minimum in the above. Unfortunately, we cannot give a combinatorial characterization to πwopt in this paper, and this is an important question left open.
Since ∣A(L,R;a,b)∣=2∣Split(L,R;a,b)∣, from the above discussion, we can conclude the following.
Theorem 3.3. For any variable ordering for SMuln−1n, there exists some index i of x-variables such that
Widthπ(i;SMuln−1n)≥2s∗(n).
3.2 An upper Bound
Our task is to show (2) for SMuln−1n. Here we can fix our variable ordering to a desired one. We consider a variable ordering such that the first n variables are y-variables (in any order) and the remaining x-variables are ordered following πwopt. But the following argument works for any x-variable ordering (assuming that all y-variables come first), and we explain our analysis by using any x-variable ordering π.
Below we use symbols as before. Let i denote any x-variable index and fixed, and let (L,R) be a x-variable partition w.r.t. xi and π. We assume for any a<b∈{0,…,n−1} fixed, yn−a−1 and yn−b−1 are assigned 1, and the other y-variables are assigned 0. Thus, here again we consider the problem of computing the function SMuln−1n(x;a,b). Also the set Split(L,R;a,b) is defined as Definition 3.3.
Definition 3.5. For any partition (L,R) of x variables, P(L,R;a,b) is the set of left assignments l′ defined as follows with parameters va,vb,v0∈{0,1} and ωp∈{0,1} for p∈Split(L,R;a,b).
where k(j,p) is a unique pair such that k(j,p)=i and wp=ωp if p∈Split(L,R;a,b) and wp=v0 otherwise.
We can also estimate the size of P(L,R;a,b) immediately.
Claim 4. ∣P(L,R;a,b)∣≤8⋅2∣Split(L,R;a,b)∣.
We show that the set P(L,R;a,b) is indeed a path set for SMuln−1n(x;a,b).
Lemma 3.4. P(L,R;a,b) is a path set for SMuln−1n(x;a,b).
Proof. We show that for any left assignment l, there exists a left assignment l′∈P(L,R;a,b) such that for any right assignment r, SMuln−1n(l⋅r;a,b)=SMuln−1n(l′⋅r;a,b). Let L=Idx(L) (respectively, R=Idx(R)) denote the set of the indices of variables in L (respectively, R).
For any left assignment l, we define the following sets and variables:
and v0 satisfy that l(mL)=(jL+v0)mod2 where k(jL,pL)=mL which implies that l⋅r(xmL)=l′⋅r(xmL) And let u=(u0,…,uh−1) satisfy that l(ip)=(j+up)mod2 where k(j,up)=ip. Let ωp=up for p∈Split(a,b). Now we finish choosing a l′ from P(L,R;a,b). If the value of l(xi) (respectively, r(xi)) can be expressed as l(xi)=(j+up)mod2 (respectively, r(xi)=(j+up)mod2) where i=k(j,p), we say that i has regular form about l(xi) ( r(xi), respectively) for convenience.
Because of the equation (5) and (6), for any right assignment r,l⋅r(xa)=l′⋅r(xa) and l⋅r(xb)=l′⋅r(xb).
For any right assignment r and p∈{0,…,h−1}, define
mp:=max{i∣i∈Gp∩H,l⋅r(xi)=l⋅r(xi−h)}
From the definitions above, we have m=maxpmp and m≥mL. The remaining proof is to show that l⋅r(xm)=l′⋅r(xm). Here we divide the proof into several cases.
Case 1: m∈L and m−h∈L.
Hence, m=mL. Since l(xmL)=(jL+v0)mod2=l′(xmL), we have l⋅r(xm)=l′⋅r(xm).
Case 2: m∈R.
It is easy to see that for any right assignment r,l⋅r(xm)=r(xm)=l′⋅r(xm).
Case 3: m∈L and m−h∈R.
Hence, there is a unique pair (j,p) such that m=k(j,p) and p∈Split(L,R;a,b) (m=mp∈L). It implies that Gp∩L=∅ and Gp∩R=∅. If all i∈Gp∩L with mLp≤i≤ip has regular form about l(xi). Then since mp≥mLp, l(xmp)=(jm+up)mod2 where mp=k(jm,p) if mp. So we have l(xmp)=l′(xmp) and l⋅r(xm)=l′⋅r(xm). Otherwise, there are some i∈Gp∩L with mLp≤i≤ip which does not have the regular form defined above. Then we can find a largest one cp from the counterexamples, that is, cp:=max{i∈Gp∩L∣l(xcp)=(jc+up+1)mod2, mLp≤i≤ip} where cp=k(jc,p). If cp+h∈L, then cp+h has regular form about l(xcp+h), that is, l(xcp+h)=(jc−1+up)mod2=l(xcp). Since cp+h>cp≥mLp, it implies a conflict to the definition of mLp. So cp+h must be in R. And we show that l⋅r(xmp)=l′⋅r(xmp).
Case 3.1: r(xcp+h)=l(xcp)
Then mp>cp+h>cp≥mLp. Thus, mp is in L having the regular form about l(xmp). It implies that l⋅r(xmp)=l′⋅r(xmp).
Case 3.2: r(xcp+h)=l(xcp)
Then r(xcp+h)=(jc+up)mod2. Assume that there are Δ−1 bits are in R continuously before and next to cp+h, that is, cp+h, cp+2h, …, cp+Δh∈R. If all these bits does not have the regular form about r (which means r(xcp+δh)=(jc−1+δ+up)mod2 for 1≤δ≤Δ), then r(xcp+Δh)=(jc−1+Δ+up)mod2=(jc+1+Δ+up)mod2=l(xcp+(Δ+1)h), since cp+(Δ+1)h has the regular form about l. So mp≥cp+(Δ+1)h>cp≥mLp. It implies that mp is in L having the regular form about l. Otherwise, there exists a largest cp+δ0h between cp+h and cp+Δh such that r(xcp+δ0h)=(jc−1+δ0+up)mod2. So r(xcp+δ0h)=(jc+δ0+up)mod2=r(xcp+(δ0+1)h). Hence mp>cp+δ0h>cp≥mLp. It implies that mp is in L having the regular form about l. Thus, for the second case, l⋅r(xmp)=l′⋅r(xmp).
Finally we finished the proof of l⋅r(xm)=l′⋅r(xm). And conclude the results for xa and xb, we proved that for any left assignment l, there is l′∈P(L,R;a,b) such that SMuln−1n(l⋅r;a,b)=SMuln−1n(l′⋅r;a,b) for any right assignment r. Therefore P(L,R;a,b) is a path set of SMuln−1n.
Notice that for the index of y-variables, since there are only two bits of y are 1, the width of yi is smaller than (kn)+1 which is much smaller than 2s∗(n) when n is large enough. So we can conclude the following.
Theorem 3.5. There is a variable ordering π=πwopt such that for any index i of variables
Widthπ(i;SMuln−1n)≤8n⋅2s∗(n)
where s∗(n) is the same with Theorem 3.3.
4 Analysis of s∗(n)
In [Bryant(1991)], Bryant defined a function Split′(h) to do the similar job as Split(L,R;a,b) and showed the following bound of size of the fooling set defined by Split′(h). The definition of Split′(h) and the proof of the following lemma can be found in [Bryant(1991)].
Lemma 4.1 (Lemma.3 in [Bryant(1991)]). For any variable ordering π and any partition (L,R) with ∣L∣=n/2, maxh∣Split′(h)∣≥n/8.
We say Split′(h) is similar with Split(L,R;a,b) because we can use Split′(h) to bound Split(L,R;a,b) by following lemma.
Lemma 4.2. For any variable ordering π and any partition (L,R)
a,bmax∣Split(L,R;a,b)∣≥hmax∣Split′(h)∣
Proof. When h≥0, let a=n/2, b=n−h, h′=b−a=n/2−h. For i∈{0,…,n/2−h−1}, let p=n/2−h−i. Thus, for ⟨xi+n/2,xi+h⟩∈Args(h), i+n/2=(n−h)−(n/2−h−i)=b−p, i+h=(n−h)−(n/2−h−i)−(n/2−h)=b−p−h′. From the definition of k(j,p), we have k(0,p)=i+n/2 and k(1,p)=i+h. Therefore when ⟨xi+n/2,xi+h⟩∈Split′(h), xk(0,p)=xi+n/2∈L and xk(1,p)=xi+h∈R, or xk(0,p)=xi+n/2∈R and xk(1,p)=xi+h∈L. So p∈Split(L,R;a,b) and we have ∣Split(L,R;a,b)∣≥∣Split′(h)∣.
When h<0, let a=n/2+h, b=n, h′=b−a=n/2. Then we can show that for ⟨xi+n/2−h,xi⟩∈Split′(h), we have xk(0,p)=xi+n/2−h∈L and xk(1,p)=xi∈R or
xk(0,p)=xi+n/2−h∈R and xk(1,p)=xi∈L for a similar reason. Then p∈Split(L,R;a,b) and we have ∣Split(L,R;a,b)∣≥∣Split′(h)∣.
Thus, for any −n/2<h<n/2, there is a pair of (a,b) such that ∣Split(L,R;a,b)∣≥∣Split′(h)∣. So the lemma is correct.
Then we have the following result.
Lemma 4.3.
8n≤s∗(n)≤2n
Proof. Since Lemma 4.1 and Lemma 4.2, maxL,Rmaxa,b∣Split(L,R;a,b)∣≥n/8 for any variable ordering. Thus, the left inequality holds.
On the other hand, from the definition of Split(L, R; a, b), ∣Split(L,R;a,b)∣≤h. If h>n/2, ∣L∣<n/2 or ∣R∣<n/2. Suppose that ∣L∣<n/2 without lost of generality. Even if the parameters p of all variables in L are in Split(L, R; a, b), the number is at most ∣L∣ which is smaller than n/2. Thus, h≤n/2 and ∣Split(L,R;a,b)∣≤n/2.
5 Conclusion
In this paper, we study the Boolean function SMuln−1n(x,y), which computes the middle bit of the multiplication of two natural numbers represented as n-bit binary strings x and y drawn from a restricted domain. We introduce a combinatorial function s∗(n) and demonstrate that both the upper and lower bounds on the OBDDs width for computing SMuln−1n can be characterized by s∗(n). This result provides an early example demonstrating that the upper and lower OBDD bounds for integer multiplication can be unified.
However, several limitations remain in our work. First, we established only asymptotic bounds on s∗(n) rather than an exact closed-form formulation, leaving its precise determination for future research. Furthermore, our unification is established only for a restricted class of x and y; extending these results to arbitrary n-bit binary strings presents a significantly more challenging problem.
References
[Bryant(1986)] Bryant, 1986. Graph-based algorithms for boolean function manipulation. IEEE Transactions on Computers C-35, 677–691. doi:10.1109/TC.1986.1676819.
[Bryant(1991)] Bryant, R.E., 1991. On the complexity of vlsi implementations and graph representations of boolean functions with application to integer multiplication. IEEE Transactions on Computers 40, 205–213. doi:10.1109/12.73590.
[Woelfel(2005)] Woelfel, P., 2005. Bounds on the obdd-size of integer multiplication via universal hashing. Journal of Computer and System Sciences 71, 520–534. URL: http://dx.doi.org/10.1016/j.jcss.2005.05.004, doi:10.1016/j.jcss.2005.05.004.
A Proof of Claim 2 and 3
In this appendix, we present the complete proofs of Claims 2 and 3.
Claim 2. Consider the case where m′=b. Define r(xi)=0 for all xi∈R. Then the following properties holds:
(1) l⋅r(xa)⊕l⋅r(xb)=0,
(2) l′⋅r(xa)⊕l′⋅r(xb)=1,
(3) no i∈H:={h,…,b−1} exists such that l⋅r(xi)=l⋅r(xi−h)=1, and
(4) no i∈H exists such that l′⋅r(xi)=l′⋅r(xi−h)=1.
Proof. Since m′=b, xa and xb must be in the different partition. If xb=xm′∈L, then m0=b and from the assumption we know that l(xb)=0 and l′(xb)=1 while xa∈R and r(xa)=0. Otherwise xb=xm′∈R, then m0=b−h=a and similarly we know that r(xb)=0 while xa∈L and l(xa)=0 and l′(xa)=1. Then we can obtain (1) and (2).
Assume that there is an i1 with h≤i1≤b−1 such that l⋅r(xi1)=l⋅r(xi1−h)=1, since r(xi)=0 for all xi∈R, both xi1 and xi1−h are in L. Since i1<b, l(xi1)=(j1+ωp1)mod2 and l(xi1−h)=(j2+ωp2)mod2. According to Lemma 3.1, we have p1=p2 and j1+1=j2. So l(xi1)=l(xi1−h) which is conflict with the assumption. So (3) is correct and (4) is correct for the similar reason.
Claim 3. Consider the case where m′<b. Define r by
r(xi)={0,(j+wp)mod2ifi>b,andifi≤b,
where (j,p) is the unique pair such that k(j,p)=i, and wp=ωp if p∈Split(L,R;a,b) and wp=0 if otherwise. Then the following properties holds:
(1) l⋅r(xa)⊕l⋅r(xb)=l′⋅r(xa)⊕l′⋅r(xb)=1,
(2) l⋅r(xi)=l⋅r(xi−h) for all i∈H,
(3) max{i∣l′⋅r(xi)=l′⋅r(xi−h),i∈H}=m′ and l′⋅r(xm′)=1.
Proof. xa and xb must be in the same partition because of the definition of m′ and m′<b. If xa and xb are in L, l(xa)=l(xb) which implies that l(xa)⊕l(xb)=1. If xa and xb are in R, since the expression of r is the same with l, we also have r(xa)⊕r(xb)=1. Therefore l⋅r(xa)⊕l⋅r(xb)=1. Similarly, we can say l′⋅r(xa)⊕l′⋅r(xb)=1. We finished the proof of (1).
Then we prove (2). Since the expression of l and r are the same, no matter which partition xi and xi−h are in, p1=p2 and j1+1=j2 where i=k(j1,p1) and i−h=k(j2,p2). So l⋅r(xi)=(j1+ωp1)mod2=(j2+ωp2)mod2=l⋅r(xi−h). It implies (2).
Last, we show (3) is correct. Because of the analysis above, r(xi)=r(xi−h) for all xi,xxi−h∈R with i≤b−1. Similarly, l′(xi)=l′(xi−h) for all xi,xi−h∈L with i≤b−1. Therefore the necessary condition of l′⋅r(xi)=l′⋅r(xi−h) is that xi and xi−h are in the different partition. We can assume that xi∈L and xi−h∈R without lost of generality. Then l′(xi)=(j1+ωp1)mod2 and r(xi−h)=(j2+ωp2)mod2. Similarly we have j1+1=j+2 and p1=p2. If l′(xi)=r(xi−h), then ωp1′=ωp1. Thus max{i∣l′⋅r(xi)=l′⋅r(xi−h),i∈H}=max{i∣i=k(j,p),ωp=ωp′}=m′. If xm′∈L, then m0=m′ and l′⋅r(xm′)=l′(xm0)=1. Otherwise m0=m′−h and l′⋅r(xm′)=r(xm′)=l′(xm′−h)=l′(xm0)=1.