! "$#%& ')(* +-,.&/,0 1324
5 ,6"7,.8 :9;,0 :9<24' $& (*= ,.8
>=4':>=? @ 8>24& (*=
A$B)B*C
D 2 D 8 EF!G
H"$#%&/(I&J8K@ " L M D N
$ ,.8O9
! "
#$$$
"!#$&%' ()*'+,--/.1023.%'4*25.)6789-/.14:/;9.12.'<
= !> .13().@?7A,#$B ()!2#C @DE("%'FHGI.1#J.1()%FK.-L()NMO22)()%F.1(P 2RQTS&!-2.1UFVW; !YXZ<\[7V
]1^^ _ `ba
S&.-c d.W) >W()A/*e%'BF3.1(P f.#$ >/; .12.g.-
=
!> .13().d3%F(P9("h()Jg.1.
*i-()%'3FE#J.1#J.1()%FFV,EF,(P !A,#$B ().j()f()F3()h76d2".%'E()fklANQmGn.1b%3porqr<3os7V
osss `bVUS&!-.1BWQTMg3("B]1^t<\]X7V]1^^or`.2-N()u6ARQm; .7!.1Au],ov<\]t:VB]1^^ X `ba
w:I?7A,#$B ()!2#x.&0BFWy ()9)Ad> .()zF-{0AclDEF2.1#$*|EBF3.1(P &}.13%3V
~ ag JE(PF3()AY*ES!2-.1BFV07AuDEF2.1#$$*j #$2!Fd?,%F()%'u.- *3#J.1()
FAVwS&!-.1Bug2(PF3(P\A*%32 P>A.-h%' #d()%FFVw.-0A #W0().13()%F{.-
DE("%'FGI.1#J.1("%F}O.13%3$E !j*,hMaZ}{A7(9 2(P!*2GI.1#J.1()%F*, = !> .13(".
Mg%F.-#Au*?,%F(P%'Fa
\.l0BFp2.1(".)PAI3!B-K0AR = !> .13().pE.1(P .5?,%F()%'d!2-Q|wkjMl`E.-p07A
= !> .13().uME%F.-#Au*?%F(P%'Fa
f> .(PzFF3O()3pI2.6Y.)f%' 3(P02!bj*!02#J(P()>u2.1BF3W.-H.)(P%' <
P.1> !FV>b.-!.1W!2-9O.-NB b&*(PO.("%'j.-N3!BFa
4fZ1 ¡P¢Zb3£c¤¡)£3¥Y¥m1 ¦1§)§O¥mUc¨vt U¥T3¡©ª¥Zb£W«mZ£rª2©¬J¡¥¥m¡) feFb3£1 B®p1§)§O¥mUv¡PJ¨vt§"¯
§'Zª9v£'° v®Uª ,¥w£¥ª,®,v ¥m£g1 B®f£t £bZb£«TZW¥mUv¡Pg1££¡"£¥v B¨vw1 B®f£ZªZr¥±
; !W]1^^ _
Mg-2.3.6UVUEA,!).²/akj.1 .f.-uME-2.}O%F6,(
*|E> .()z()>d #J#J()F
³³³µ´´´
¶¸·º¹»K¼½
:¾À¿/ÁÃÂ@ÄnÅÆLÇnÈ ÉmÊËÌÍÏÎKÐÑIÒÓÔQ'ÕÖK×ØÚÙ
¼
]1^^ _1Û[ÜX¿RÝK[¿JÞ
Ñnßàáâ@ãLäºÎNåçædè@äºéKêRë
¿ ¶
ÎìíÄîíïÝÃÑ
¼
ÊÃËÃÌçÍðÑñÀò
¹LóÃôöõö÷øxùÃúüû
ÑýÃÛÿþ
÷
þ
¼
Ñx ï Ýöþ
÷
ÑxÂðÄÅ Æ ÇÈ
»
Q osss1ÛXÜorq4¿Ýos¿d`
¼
ÕçÖ×çØ
ÙjQm]1^^oFÛ¸:,Ü]1^¿KÝR]X¿d`
¼ Ð é
Qm]1^^ X1ÛLo1Ü ],oe¿KÝK]1:h¿d`
¹
è@äºéRêRë
½
:¾xÑü ĸÅxÆ Ç¸È
»¼
ÕüÖ×üØ ÙnÑ ~ a Ù! #"@Â$&% Í ' ~ ag Ng2(PF3(P\A*
S!2-.1B3ÞÀÑ&(×*)IÝÂ,+Ä-/.Nï10ÃÝ2Í3
¼
ÕÖ×LØ Ù54636768#%Í 'S&!-.1Bg2(<
F3(P\AY*O%3 )>A.-h%' #J("%F3ÞxÑ9 Ä6:$Ý;<3@Í .>=6?@A@ÍB3
¼
C!D¸ìðÄî
ïRÝ!3üÍCEFGIH¸Ý ' = !> .1b().ME%F.-#A¸*j?%F(P%'3Þ ÑIMWaJ)YÝKÌ Í ø ùML
'MWa}{A7(
(P!*GI.1#J.1()%F3ÞÃÑONPQ R
A ÎdÊËÌLÍ Ñ
øùCS-T
ÝUþVXWZY
¹
N[I\
è@äºéKêRë
ÂüÄRÅ@Æ ÇpÈ
» ì ÄYîðïnÝ-3ºÍ]EFG,HYÝÑ<3ºÍ
øù6^B_
' = !> .13().{g.1() .5?,%F(P2%'
!- É|wkjMlÔ¸Þ þ#&V-O`ñMaLþ<bXc,\Nè äºéKêRë
dfeOghiBje&klBmnIoqpMrtsvu-wxzy|{}B~yX6l-u!l&wxzyzBl&
!6<MeXyq#eqovCfzs!
]1^^ _1Û[Ü
Nz[6XüÑ
Ä¡¢.£EºÄ]¤
ÝÂB$
¼¦¥§ ©¢ª¨ «
.²C.5¬®
¯±°²¼
)v2#³¢.£EºÄf¤
ÝÂB$
Contents
Tighter Bounds on the OBDD size of Integer Multiplication 9
Kazuyuki Amano, Akira Maruoka
Congestion Minimization Confluent Flow Problem: Experimental Evaluation of Algorithms 16 Koichi Nihei, Takao Asano
An Algorithm For Source Location In Directed Graphs 25
Mih´aly B´ar´asz, Johanna Becker, Andr ´as Frank
Stable matching with incremental algorithms—The last one gets his best stable partner 34 P´eter Bir´o
Cryptomorphisms of Closure Systems Axiomatization and Structures 41
Florent Domenach
Planar k-sets under insertion 44
Wael El Oraiby, Dominique Schmitt
The distribution of the angles on the plane 50
Zolt´an F ¨uredi
Source location with rigidity and tree packing requirements 51
Zsolt Fekete
Linear approximation algorithms and space lower bounds for the SimRank similarity function on massive graphs 55 D´aniel Fogaras, Bal ´azs R´acz
Submodularity and Polyhedra 64
Satoru Fujishige
Degree Conditions and Disjoint Cycles in Graphs 65
Shinya Fujita
Edge packing problem with edge capacity constraints 69
Takuro Fukunaga, Hiroshi Nagamochi
Haj´os Calculus on Planar Graphs 76
Yoichi Hanatani, Takashi Horiyama, Kazuo Iwama
Online Allocation with Risk Information 84
Shigeaki Harada, Eiji Takimoto
Compactness of Classifiers by Iterative Compositions of Features 92
Kazuya Haraguchi, Hiroshi Nagamochi, Toshihide Ibaraki
Greedy Fans: A geometric approach to dual greedy algorithms 99
Hiroshi Hirai
Road to “Problem Solving Engines” 106
Toshihide Ibaraki
Bisecting a Four-Connected Graph with Three Resource Sets 107
Toshimasa Ishii, Kengo Iwata, Hiroshi Nagamochi
Algorithm for Partitioning Graphs of Bounded Tree-Width of Supply and Demand 114 Takehiro Ito, Xiao Zhou, Takao Nishizeki
New classes of facets of cut polytope and tightness of Imm22Bell inequalities 122 David Avis, Tsuyoshi Ito
Linking Systems and Matroid Pencils 129
Satoru Iwata
On Resource Constrained Optimization Problems 136
Alp´ar J ¨uttner
Uniquely Localizable Networks with Few Anchors 144
Zsolt Fekete, Tibor Jord ´an
On the Rank Function of the 3-Dimensional Rigidity Matroid 149
Bill Jackson, Tibor Jord´an
Sign-Solvable Linear Programs 154
Naonori Kakimura, Satoru Iwata
Improved YBLM for Sperner families 161
Jerrold R. Griggs, Gyula O.H. Katona
Algorithmic aspects of Hadwiger’s Conjecture 165
Ken-ichi Kawarabayashi
Orientations with parity and capacity constraints 171
Tam´as Kir´aly, Gyula Pap
On well-balanced orientations 175
Satoru Iwata, Tam ´as Kir´aly, Zolt´an Kir´aly, Zolt´an Szigeti
Enumerating Labeled Chordal Graphs on Complete Graph 183
Masashi Kiyomi, Takeaki Uno
A Generic framework for plagiarism detection in programs 189
Gergely Luk´acsy, P´eter Szeredi
Rigid graphs from edge-pairs 199
M´arton Makai
Fast Algorithms for Computing Jones Polynomials of Certain Links 209
Masahiko Murakami, Masao Hara, Makoto Yamamoto, Seiichi Tani
M-Convex Functions on Jump Systems: Generalization of Minsquare Factor Problem 217 Kazuo Murota
A Deterministic Algorithm for Finding All Minimum k-Way Cuts 224
Yoko Kamidoi, Noriyoshi Yoshida, Hiroshi Nagamochi
A Strongly Polynomial Algorithm for Search in Submodular Polyhedra 234
Kiyohito Nagano
Comparing the strengths of the non-realizability certificates for oriented matroids 243 Hiroki Nakayama, Sonoko Moriyama, Komei Fukuda, Yoshio Okamoto
An O(n3)Time Algorithm for Obtaining the Minimum Vertex Ranking Spanning Tree on Permutation Graphs 250 Shin-ichi Nakayama, Shigeru Masuyama
Counting the Independent Sets of a Chordal Graph in Linear Time 257
Yoshio Okamoto, Takeaki Uno, Ryuhei Uehara
Packing non-returning A-paths 264 Gyula Pap
Total dual integrality of a description of the stable marriage polyhedron 266 Tam´as Kir´aly, J ´ulia Pap
Line graphs of cubic graphs are normal 273
Zsolt Patakfalvi
Dominating and Large Induced Trees in Regular Graphs 275
Dieter Rautenbach
One-Dimensional Synthesis of Graphs as Tensegrity Frameworks 284
Andr´as Recski, Offer Shai
Circuit Switched Broadcastings and Digit Tilings on Torus Networks 289
Ryotaro Okazaki, Hirotaka Ono, Taizo Sadahiro
Laminar Covering Problem 296
Mariko Sakashita, Kazuhisa Makino, Satoru Fujishige
The Packing Clutter of the Positive Cocircuits of an Oriented Matroid Whose Rank is54 303 Kenji Kashiwabara, Tadashi Sakuma
Spanning Tree Optimization Problems with Degree Based Objective Functions 309 G´abor Salamon
Sharpenings of Sauer’s Bound 316
Richard Anstee, Balin Fleming, Zolt ´an F¨uredi, Attila Sali
On the local chromatic number of graphs 321
G´abor Simonyi, G ´abor Tardos
Some results on the degree prescribed factor problem 324
J´acint Szab´o
DNA-words and word posets 331
P´eter Ligeti, P´eter Sziklai
Chomp with Poison-Strewn Chocolates 336
Hiro Ito, Gisaku Nakamura, Satoshi Takata
A Two-Sided Discrete-Concave Market with Possibly Bounded Side Payments 344 Satoru Fujishige, Akihisa Tamura
Intersection of Random Walks on hierarchical structures 351
Andr´as Telcs
Enumeration of Triangles Configuration in Cube Cutting 358
Yoshinori Teshima, Kiwamu Kase, Akitake Makinouchi
Intersecting families — uniform versus weighted 364
Norihide Tokushige
Approximation Algorithms for Computing a Highly Dense Subgraph 370
Akiko Suzuki, Takeshi Tokuyama
Primal-dual approach for directed vertex connectivity augmentation and generalizations 377 L´aszl´o A. V´egh, Andr´as A. Bencz´ur
Improving Performance Ratios by Repeatedly Executing Approximation Algorithms for Several Graph Connec-
tivity Related Problems 385
Makoto Tamura, Satoshi Taoka, Toshimasa Watanabe
Approximately Separating Systems 398
G´abor Wiener
Coding Floorplans with Fewer Bits 401
Katsuhisa Yamanaka, Shin-ichi Nakano
Author index 407
Tighter Bounds on the OBDD size of Integer Multiplication
KAZUYUKIAMANO∗
GSIS, Tohoku Univ.
Aoba 6-6-05, Sendai, Miyagi, 980-8579 Japan ama@ecei.tohoku.ac.jp
AKIRAMARUOKA
GSIS, Tohoku Univ.
Aoba 6-6-05, Sendai, Miyagi, 980-8579 Japan
maruoka@ecei.tohoku.ac.jp
Abstract: We show that the middle bit of the multiplication of two n-bit integers can be computed by an OBDD of size less than 2.8·26n/5. This improves the previously known upper bound of(7/3)·24n/3by Woelfel (STACS, 2001). The experimental results suggest that our exponent of 6n/5 is (at least very close to) optimal. A general upper bound of O(23n/2)on the OBDD size of each output bit of the multiplication and some conjecture on the structural properties of multipliers inspired by the experimental results are also presented.
Keywords: OBDD, integer multiplication, upper bounds
1 Introduction
Ordered binary decision diagrams (OBDDs), which were first introduced by Bryant [4], are nowadays one of the most well- established computational models for representing and manipulating Boolean functions. OBDDs are widely used in the areas of hardware verification, model checking, and computer aided design (see e.g., [9, 12]).
Definition 1 Let Xn={x1, . . . ,xn}be a set of Boolean variables. A variable orderingπon Xnis a permutation on{1, . . . ,n} leading to the ordered list xπ(1), . . . ,xπ(n)of the variables.
Aπ-OBDD on Xnis a directed acyclic graph whose sinks are labeled by a constant 0 or 1 and whose inner nodes are labeled by a Boolean variables from Xn. Each inner node has two outgoing edges, one of them labeled by 0, the other by 1.
The edges between inner nodes have to respect the variable orderingπ, i.e., if an edge leads from an xi-nodes to an xj-node, thenπ−1(i)<π−1(j). Each node v represents a Boolean function fv:{0,1}n→ {0,1}defined in the following way: An assignment(a1, . . . ,an)∈ {0,1}nto variables Xndefines a uniquely determined path from v to one of the sinks. The label of the reached sink gives fv(a). The size of aπ-OBDD is defined as the number of its nodes. The OBDD size of f , denoted by OBDD(f)is the minimum size of allπ-OBDDs that compute f . Aπ-OBDD for some unspecified variable order is simply called OBDD.
For many practically relevant functions, such as symmetric functions, the corresponding OBDD representations are quite small. However, for several important functions, exponential lower bounds on the size of an OBDD representation are known.
The most “famous” such function is, probably, (the middle bit of) integer multiplication.
Definition 2 For each 0≤k≤2n−1, let MULk,n:{0,1}2n→ {0,1}denote the Boolean function that outputs zk of the product(z2n−1···z0)of two n-bit integers(xn−1···x0)and(yn−1···y0), where x0, y0and z0are the least significant bits.
The middle bit of integer multiplication is denoted byMULn−1,n. Since for any Boolean function on m variables, there exists an OBDD of size(2+ε)2m/m [8], the trivial upper bound on OBDD(MULn−1,n) is O(22n/n). In 1991, Bryant [5]
first proved an exponential lower bound of 28/non OBDD(MULn−1,n). Only recently, Woelfel have succeeded to improve the upper and lower bounds on the size of OBDD forMULn−1,n[14]. Precisely, he showed that OBDD(MULn−1,n) is between
2n/2/61 and(7/3)·24n/3. His lower bound rules out the possibility of constructing an OBDD for 64-bit multiplication with a
reasonable size. Nevertheless, there still exists a considerable gap between the upper and lower bounds.
The main objective of this work is to determine the asymptotic behavior of the size of OBDDs forMULn−1,n, or more generally, forMULk,n. Though we started this work by theoretical interest, it may also have an application in the design of multipliers. In addition, we believe that this may help to make progress on the investigations of the complexity of multiplica- tion for more general models of branching programs, which have been extensively studied recently (e.g., [1, 3, 11, 13]).
In the paper, we mainly consider a restricted variant of OBDDs which is called leveled OBDDs or quasi-OBDDs, denoted by QOBDDs. This is because analyzing the size of QOBDDs is easier than that of OBDDs.
∗Corresponding Author. The work was supported in part by Grant-in-Aid for Scientific Research on Priority Areas “New Horizons in Computing” from MEXT of Japan.
10 KAZUYUKIAMANO, AKIRAMARUOKA
Definition 3 Aπ-QOBDD is aπ-OBDD with the additional property that each edge from an xπ(i)-node for i<n reaches an xπ(i+1)-node. In other words, each path in aπ-QOBDD examines every variable exactly once in the order ofπ. Let π-QOBDD(f)denote the minimum size ofπ-QOBDDs that compute f . The QOBDD size of a Boolean function f , denoted by QOBDD(f)is the minimum size of allπ-QOBDDs that compute f , i.e., QOBDD(f) =minππ-QOBDD(f). Aπ-QOBDD for some unspecified variable order is simply called QOBDD.
Since everyπ-OBDD can be transformed into aπ-QOBDD by inserting dummy nodes on paths from the root to a sink, it is obvious that
OBDD(f)≤QOBDD(f)≤(n+1)OBDD(f)
for every Boolean function f on n variables. Thus, the size of QOBDDs can be considered essentially the same as that of OBDDs, especially for a function having an exponential complexity, such as multiplication. A detailed discussion on the relationship between the OBDD size and the QOBDD size can be found in e.g., [2, 8].
The contributions of the paper are as follows: First, in Section 2, we show thatMULn−1,ncan be computed by a QOBDD of size less than 2.8·26n/5, which improves the previously known upper bound of(7/3)·24n/3[14]. Second, we obtain the optimal QOBDDs forMULn−1,n for small values of n by an exhaustive search using a computer, and analyze them.
Interestingly, our experimental results suggest that the exponent of 6n/5 in our upper bound is the true exponent of the QOBDD size ofMULn−1,n. This will be described in Section 3. Next, in Section 4, we give a general upper bound on the QOBDD size of each output bit of integer multiplication. Precisely, we show that QOBDD(MULk,n) =O(2c)where c=6k/5 for 0≤k≤5n/4, c=3n/2 for 5n/4<k≤3n/2, and c=3n−k for 3n/2<k≤2n−1. Finally, in Section 5, we describe some conjecture on the structural properties of multipliers inspired by the results of our experiments, which may lead to a better lower bound on the OBDD size ofMULn−1,n.
2 Upper Bounds for MUL
n−1,nIn this section, we show an upper bound of 2.8·26n/5on the OBDD size of the middle bit of integer multiplication.
Let X= (xn−1···x0)be an n-bit binary string. We also use X to denote the integer represented by xn−1···x0, i.e., X=
∑ni=0−12ixi. For 0≤i≤j≤n−1, let[X]ijbe the integer represented by the substring xj···xi. Formally, [X]ij = X div 2imod 2j−i+1=X mod 2j+1div 2i.
Here we use the operators “mod” that gives the integer reminder of division, and “div” that gives the integer result of division.
We abbreviate[X]iiby[X]i. For a set S,|S|denotes the cardinality of S.
Theorem 4 There is a QOBDD forMULn−1,nwhose size is less than 2.8·26n/5.
PRO OF: Let X = (xn−1···x0) and Y= (yn−1···y0)be the input variables for MULn−1,n. Let π be the variable ordering (x0,y0,x1,y1, . . . ,xn−1,yn−1). For the sake of simplicity, we suppose that n is a multiple of 5. (Other cases will be discussed later.) Below we show thatπ-QOBDD(MULn−1,n)≤19/7·26n/5<2.72·26n/5.
Let n=5k. Let i,jdenote the set of subfunctions ofMULn−1,nthat obtained by replacing the variables x0, . . . ,xi−1and y0, . . . ,yj−1with constants. It is easy to verify that
π-QOBDD(MULn−1,n) =| 0,0|+| 1,0|+| 1,1|+···+| n,n|. (1) This is because that the number of xi-nodes (yi-nodes, resp.) in an optimalπ-QOBDD forMULn−1,nis shown to be| i,i| (| i+1,i|, resp.). Thus, our goal is to bound the number of different subfunctions in i,iand in i+1,i.
We first bound the size of i,i. Suppose that n/2≤i<n.
Let XL= (xi−1···x0), YL = (yi−1···y0), XH =X\XL= (xn−1···xi) and YH =Y\YL= (yn−1···yi), which means that X=2iXH+XLand Y=2iYH+YL. We focus on the “middle part” of X·Y , namely,[X·Y]in−1of which the most significant bit representsMULn−1,n(X,Y). We have
X·Y mod 2n = (2iXH+XL)·(2iYH+YL)mod 2n
= 2i(XH·YL+YH·XL) +XL·YLmod 2n
= 2i(XH·[YL]0n−i−1+YH·[XL]0n−i−1) + [XL·YL]0n−1mod 2n. Further, we have
[X·Y]in−1= (X·Y mod 2n)div 2i= (XH·[YL]0n−i−1+YH·[XL]0n−i−1) + [XL·YL]in−i.
KAZUYUKIAMANO, AKIRAMARUOKA 11
This implies that the value of[X·Y]in−1and henceMULn−1,n(X,Y)is uniquely determined by XH, YH,[XL]0n−i−1,[YL]0n−i−1 and[XL·YL]in−1. Hence, each subfunction fXL,YL∈ i,iis uniquely determined by[XL]0n−i−1,[YL]0n−i−1and[XL·YL]in−1, each of them has length n−i. Therefore, we have| i,i| ≤23(n−i)for n/2≤i<n. Note that this bound is better than the trivial upper bound of| i,i| ≤22iwhen i≥3n/5. By an analogous argument to the case of| i,i|, we can also show that| i+1,i| ≤23(n−i)−1 for n/2≤i<n, which is better than the trivial bound of| i+1,i| ≤22i+1for i≥3n/5.
The upper bound ofπ-QOBDD(MULn−1,n)is now easily derived by plugging these bounds into Eq. (1). Namely, we have
π-QOBDD(MULn−1,n) =
3k−1 i=0
∑
(| i,i|+| i+1,i|) +
5k−1 i=3k
∑
(| i,i|+| i+1,i|) +| n,n|
≤
6k−1 i=0
∑
2i+
5k−1 i=3k
∑
(23(5k−i)+23(5k−i)−1) +2
= 26k−1+
1+1
2 2k
i=1
∑
23i+2
= 26k+3
2·8(26k−1)
7 +1<19 7 ·26k, which completes the proof for the case n=5k.
The other cases, i.e., n=5k+αforα∈ {1,2,3,4}, can be shown analogously. The upper bounds are 40/7·26k, 96/7·26k, 208/7·26kand 544/7·26kforα=1,2,3 and 4, respectively. By a simple case checking, we can see that all these values are bounded by 2.8·26n/5. Note that the largest constant (= (544/7)/24.8∼2.7897) is attained whenα=4. 2
Remark that we use the variable orderingπ= (x0,y0, . . . ,xn−1,yn−1)in the proof of Theorem 4, whereas Woelfel [14]
used the orderingπ = (x0, . . . ,xn−1,y0, . . . ,yn−1)to show the upper bound of O(24n/3). We also remark that Theorem 4 guarantees that the middle bit of a 16-bit multiplication can be computed by a QOBDD with less than 1.5 million nodes. In addition, the proof gives an explicit construction of such a QOBDD. Remarkably, the experimental results suggest that the exponent of 6n/5 in Theorem 4 is (at least very close to) the true exponent of the QOBDD size ofMULn−1,n, which we will describe in the next section.
3 Empirical Results
In this section, we describe the empirical results supporting the conjecture that the exponent of 6n/5 in the upper bound in Theorem 4 is optimal.
We did an exhaustive search by using a computer to find the optimal QOBDDs forMULn−1,nfor small values of n. Note that the best known algorithm for computing an optimal OBDD for a given function has an exponential running time [6, 7].
In addition, we believe that computing an optimal QOBDD is almost as hard as computing an optimal OBDD.
We use a standard dynamic programming approach to compute the size of optimal QOBDDs forMULn−1,nwhich we briefly describe below.
Let f be a Boolean function over the set of variables X ={x1, . . . ,xn}. For I⊆X , let sub(f,I)denote the number of subfunctions of f which we obtain by fixing all variables in X\I to constants. It is easy to verify that
QOBDD(f) = min
={I0,...,In}
∑
0≤i≤n
sub(f,Ii)
where the minimum ranges over all sequences of sets /0=I0⊂I1⊂ ··· ⊂In=X with|Ii|=i. If we define QOBDD(f,I)for I⊆X by the following recursion,
QOBDD(f,I) = min
x∈I{QOBDD(f,I\{x}) +sub(f,I)}, (2) then QOBDD(f)is given by QOBDD(f,X). It should be noted that if we replace the term sub(f,I)in Eq. (2) by subx(f,I), which denotes the number of subfunctions of f obtained by fixing all variables in X\I and that essentially depend on x, then we can obtain OBDD(f)in a similar fashion [6, 7].
Using the above algorithm, we compute the size of optimal QOBDDs forMULn−1,n for n≤11. In addition, we also compute the minimum size ofπ-QOBDDs forMULn−1,nwith the variable orderingπ= (x0,y0,y1,y1, . . . ,xn−1,yn−1), which is used in the proof of Theorem 4.
The results are shown in Table 1. Remarkably, Table 1 shows that the QOBDD size ofMULn−1,nand also the minimum size ofπ-QOBDDs forMULn−1,nare almost proportional to 26n/5. This leads to a conjecture that QOBDD(MULn−1,n) =
12 KAZUYUKIAMANO, AKIRAMARUOKA
Table 1: The QOBDD size of MULn−1,n is shown in the second column, and the minimum size of π-QOBDDs for MULn−1,nwith the variable orderingπ= (x0,y0, . . . ,xn−1,yn−1)is shown in the fourth column. Note that the computation of QOBDD(MULn−1,n)for n=12 has not completed. We have only confirmed that it is not larger than 22,180.
n QOBDD QOBDD/26n/5 π-QOBDD π-QOBDD/26n/5
4 39 1.40 56 2.01
5 72 1.13 109 1.70
6 156 1.06 230 1.56
7 348 1.03 490 1.45
8 797 1.03 1,106 1.43
9 1,808 1.01 2,490 1.40
10 4,106 1.00 5,751 1.40
11 9,796 1.04 13,228 1.41
12 ≤22,180 ≤1.03 30,862 1.43
13 71,239 1.43
14 166,981 1.46
Θ(26n/5), which means that the upper bound in Theorem 4 is tight up to a constant factor. Table 1 also shows that the optimal QOBDDs forMULn−1,nare almost 30% smaller than the optimalπ-QOBDDs.
During the experiments, the optimal variable orderings forMULn−1,nare also obtained. For example, one of the optimal variable orderings forMUL7,8is
(x1,x2,x3,x4,y3,y4,y2,x5,y5,y1,x6,y6,x0,y7,x7,y0), and that forMUL10,11is
(x3,x4,x5,x6,x7,y4,y5,y6,y7,y3,x2,y2,x1,y1,x8,y8,x9,x9,x0,y10,x10,y0).
We remark that the optimal variable ordering is not unique in general. Generalizing these orders may yield an upper bound with a slightly better constant factor than Theorem 4.
4 General Upper Bounds
In this section, we consider the size of a smallest QOBDD for the k-th bit of integer multiplication for general values of k.
The problem of determining the hardest bit of the multiplication and its complexity is interesting and important since the total complexity of the multiplication may essentially depend on the complexity of the hardest bit. It is well known that the middle bit is the “hardest” bit, in the sense that if it can be computed by OBDDs of size s(n), then any other bit can be computed with size at most s(2n)(e.g., [10]). However, this does not assert that the middle bit is exactly the hardest bit. The experimental results suggest that the hardest bit is located higher than the middle. For example, for a 8 bit multiplication, we verified that the 10-th output bit is the hardest for QOBDDs, namely, QOBDD(MULk,8) =797,1623,1937,2041,1755,1175 for k=7,8, . . . ,12, respectively. Recall that the 0-th bit is the least significant bit.
It is clear that computingMULk,nis not harder than computingMULk,k+1for every k. This is because if k<n, then MULk,n(X,Y) = MULk,k+1([X]0k,[Y]0k),
and if k≥n, then
MULk,n(X,Y) = MULk,k+1(0n−k+1X,0n−k+1Y).
Hence, the following corollary is a direct consequence of Theorem 4.
Corollary 5 For every k, there exists a QOBDD forMULk,nwhose size is O(26k/5).
Apparently, the upper bound in the above corollary overestimates the actual size of a smallest QOBDD forMULk,nif k is close to 2n. The following theorem asserts that the OBDD size of every single bit of multiplication is bounded by O(23n/2).
Theorem 6 For every k, there exists a QOBDD forMULk,nwhose size is O(23n/2).
For a∈ {0, . . . ,2n−1}, letMULak,n:{0,1}n→ {0,1}be the function that outputs the k-th bit of the product of a with an n-bit number, i.e.,MULak,n(X) =MULk,n(a,X). Here the 0-th bit is the least significant bit. To prove the theorem, we use the following lemma, which is a generalization of the results of Woelfel [14]. They showed that QOBDD(MULak,n) =O(2n/2) for k=n−1.
KAZUYUKIAMANO, AKIRAMARUOKA 13
Lemma 7 For every k and for every a∈ {0, . . . ,2n−1}, there exists a QOBDD forMULak,nwhose size is O(2n/2).
PROOF: If k<n, then the theorem follows immediately from the result of Woelfel described above. We therefore assume k≥n. Let Y = (yn−1···y0)be the input variables forMULak,nand letπ be the variable ordering(y0, . . . ,yn−1). Let i be the set of subfunctions ofMULak,nwhich we obtain by fixing the variables y0, . . . ,yi−1to constants. We will upper bound the number of subfunctions in i. Let YL= (yi−1···y0)and YH= (yn···yi). Note that
MULak,n(Y) = MULak,n(YH,YL) =aYH2i+aYLmod 2k+1div 2k.
For h∈ {0, . . . ,2n−i−1}, let zh=ah2imod 2k. Letρ:{0, . . . ,2n−i−1} → {0, . . . ,2n−i−1}be a permutation that satisfies 0≤zρ(0)≤zρ(1)≤ ··· ≤zρ(2n−1)<2k. For the sake of simplicity, we denote that zρ(−1)=0 and zρ(2n−i)=2k.
We claim that for every two distinct integers l,l0∈ {0, . . .,2i−1}such that 2k−(al mod 2k+1)and 2k−(al0mod 2k+1), or 2k+1−(al mod 2k+1)and 2k+1−(al0mod 2k+1)lie in the same interval, precisely,
zρ(t−1)<2k−(al mod 2k+1)≤zρ(t)and zρ(t−1)<2k−(al0mod 2k+1)≤zρ(t), (3) or
zρ(t−1)<2k+1−(al mod 2k+1)≤zρ(t)and zρ(t−1)<2k+1−(al0mod 2k+1)≤zρ(t), (4) for some 0≤t≤2n−i, the subfunctions ofMULak,nobtained by fixing YLto l and to l0are identical.
The claim is proved as follows. We assume that l and l0satisfy condition (3). (The proof for the case of (4) is analo- gous to this case.) Since 0≤zρ(t−1)+al mod 2k+1<2kand 0≤zρ(t−1)+al0mod 2k+1<2k, we have thatMULak,n(h,l) = MULak,n(h,l0)for every h=ρ(t0) with t0∈ {0,1, . . .,t−1}. Similarly, since 2k ≤zρ(t)+al mod 2k+1<2k+1 and 2k≤ zρ(t)+al0mod 2k+1<2k+1, we have thatMULak,n(h,l) =MULak,n(h,l0)for every h=ρ(t0)with t0∈ {t, . . . ,2n−i−1}. Hence, we can conclude thatMULak,n(h,l) =MULak,n(h,l0)for every h∈ {0, . . . ,2n−i−1}, completing the proof of the claim.
The claim implies that the number of subfunctions in iis bounded by the number of such “intervals”, i.e., 2(2n−i+1), which is smaller than the trivial upper bound of 2iwhen i>(n+1)/2. Hence, the size of aπ-QOBDD is bounded by
π-QOBDD(MULak,n) =
∑
n i=0| i|=
∑
0≤i≤dn/2e
2i+
∑
dn/2e<i≤n
2(2n−i+1) =O(2n/2).
This complete the proof of Lemma 7. 2
Theorem 6 follows immediately from Lemma 7.
PROOF:[of Theorem 6] Let X = (xn−1···x0)and Y = (yn−1···y0)be the input variables forMULk,n. We first construct a full binary tree T of depth n which examines all the variables in X . Note that each leaf in T corresponds to an n-bit integer.
Then, for each leaf in T that corresponds to an integer a, we connect a QOBDD that computesMULak,nto the leaf. Lemma 7 guarantees that the resulting QOBDD computesMULk,nand whose size is O(2n2n/2) =O(23n/2). 2
As one might be expected, if the value of k is large enough, then a better upper bound can be obtained.
Theorem 8 For every k≥n, there exists a QOBDD forMULk,nwhose size is O(23n−k).
PROOF: Let X = (xn−1···x0) and Y = (yn−1···y0) be the input variables forMULk,n. Let π be the variable ordering (xn−1,yn−1,xn−2,yn−2, . . . ,x0,y0). Let i,j denote the set of subfunctions of MULk,n that obtained by fixing the variables xn−1, . . . ,xn−iand yn−1, . . . ,yn−jto constants. Note that the suffixes i and j indicate the number of fixed variables in X and Y , respectively.
In the following, we bound the number of subfunctions in i,i. Let XH= (xn−1···xn−i), YH = (yn−1···yn−i), XL= (xn−i−1···x0)and YL= (yn−i−1···y0). We obtain
X·Y mod 2k+1 = (2n−iXH+XL)·(2n−iYH+YL)mod 2k+1
= 22(n−i)XH·YH+2n−i(XH·YL+XL·YH) +XL·YLmod 2k+1. (5) Suppose that k≥2n−i+3. Let l=k−(2n−i) +1. For 0≤x<2n, let xH and xL denote two integers that satisfy x=2n−ixH+xL where 0≤xH <2i and 0≤xL<2n−i. For 0≤y<2n, yH and yL are defined analogously. For a pair of integers(xH,yH), let zH and zLbe two integers, depending on(xH,yH), such that
22(n−i)xH·yHmod 2k+1=22n−izH+zL, (6)
14 KAZUYUKIAMANO, AKIRAMARUOKA
where 0≤zH<2land 0≤zL<22n−i. From Eqs. (5) and (6),MULk,n(x,y)is given by the most significant bit of 22n−izH+zL+2n−i(xH·yL+xL·yH) +xL·yLmod 2k+1.
Since
zL+2n−i(xH·yL+xL·yH) +xL·yL<3·22n−i, (7) if the j-th bit of the binary representation of zH is 0 for some j≥2, then the carry generated by Eq. (7) is not propagated to a higher bit than the j-th bit of zH. Hence, for every pairs of integers(xH,yH)that satisfies[zH]j=0 for some j≥2, the subfunction ofMULk,n obtained by fixing XH to xH and YH to yH is a constant function. Therefore, the number of subfunctions in i,iis bounded by 2 plus the number of pairs of integers(xH,yH)that satisfy the condition that[zH]j=1 for every 2≤j≤l−2, equivalently, the output bits i+2 through i+l−2 of the product xH·yHare all 1. The number of such pairs is at most
∑
1≤y<2i
d2i+2 y ed y2i
2i+l−1e <
∑
1≤y<2i
22i+2 y ·2 y2i
2i+l−1
=
∑
1≤y<2i
2i−l+5<22i−l+5. Hence, we have
| i,i| ≤ 2+22i−l+5<22i−k+(2n−i)+7=22n−k+i+7, (8)
which is better than the trivial bound of| i,i| ≤22iwhen i≥2n−k+7. The total size ofπ-QOBDD forMULk,nis given by π-QOBDD(MULk,n) =
∑
0≤i<n
(| i,i|+| i+1,i|) +| n,n| ≤3
∑
0≤i<n
| i,i|+2. (9)
The last inequality follows from the simple fact that| i+1,i| ≤2| i,i|for every i. By plugging Eq (8) into Eq. (9), we have
π-QOBDD(MULk,n) ≤ 3
∑
0≤i≤2n−k+6
22i+
∑
2n−k+7≤i<n
22n−k+i+7
! +2
≤ 3(24n−2k+13+23n−k+7) +2=O(23n−k).
The last equality follows from the assumption that k≥n. 2
Combining Corollary 5, Theorems 6 and 8, we have the following theorem.
Theorem 9 The QOBDD size ofMULk,nis O(2c)where
c =
6k/5, for 0≤k≤5n/4, 3n/2, for 5n/4<k≤3n/2, 3n−k, for 3n/2<k≤2n−1.
The theorem says that every single bit of the multiplication of two n-bit integers can be computed by a QOBDD (and also by an OBDD) of size O(23n/2). Note that the best known lower bound for MULk,n is 2b(k+1)/2c/61 for k<n and 2b(2n−k−1)/2c/61 for k≥n by Woelfel [14].
5 Concluding Remarks
Although we have not succeeded to improve the lower bound on the size of OBDDs forMULn−1,n, the experiments gave us some insight to improvements. Inspired by our experimental results, we make the following conjecture.
Let s(i), i=0,1, . . . ,be a sequence of integers defined by s(0) =1 and s(i) =
(6s(i−1)−1)/5 if i mod 4 is 0, (5s(i−1)−1)/3 if i mod 4 is 2,
2s(i−1) if i is odd.
(10) The first few numbers of this sequence are: 1,2,3,6,7,14,23,46,55,110,183,366,439,. . . . Note that if i is a multiple of 4, then s(i)has a simple closed formula, i.e., s(4 j) = (6·23 j+1)/7. This can be verified by observing that s(4(j+1)) =8·s(4 j)−1 from Eq. (10).