On-Line Algorithms for 2-Space Bounded Cube and Hypercube Packing
Xiaofan Zhao
School of Computer and Information Technology
Beijing Jiaotong University
Beijing, China
Email: zxfanfan922@gmail.com
Hong Shen
School of Information Science and Technology
Sun Yat-sen University
Guangzhou, China
Email: shenh3@mail.sysu.edu.cn
Abstract—We consider the problem of packing d-
dimensional cubes into the minimum number of unit cubes
with 2-space bounded, as the generalization of the classic bin
packing problem. Given a sequence of items, each of which
is a d-dimensional (d ≥ 3) hypercube with side length not
greater than 1 and an infinite number of d-dimensional (d ≥ 3)
hypercube bins with unit length on each side, we want to pack
all items in the sequence into a minimum number of bins.
The constraint is that only two bins are active at anytime
during the packing process. Each item should be orthogonally
packed without overlapping with others. Items are given in
an on-line manner which means each item comes without
knowing any information about the subsequent items. We
extend the technique of brick partitioning in paper [1] for
square packing and obtain two results: a three dimensional
box partitioning scheme for cube packing and a d-dimensional
hyperbox partitioning scheme for hypercube packing. We give
a 5.43-competitive algorithm for cube packing and a
32
21
· 2
d
-
competitive algorithm for hypercube packing. To the best of
our knowledge these are the first known results on 2-space
bounded cube and hypercube packing.
Keywords-hypercube packing; 2-bounded space; online algo-
rithm; asymptotic competitive ratio;
I. INTRODUCTION
Bin packing problem is one of the oldest classical prob-
lems in both computer science and combinatorial optimiza-
tion [2], [3]. Since it has been studied for over thirty years,
many variants of this problem have also been well studied.
In this paper, we consider the 2-space bounded on-line d-
dimensional ( d ≥ 3) hypercube packing problem, which is
formulated as follows:
• Input: A list L of items, L =(l
1
,l
2
,...,l
n
). Each
item l
i
is a d-dimensional (d ≥ 3) hypercube (s
1
(l
i
) ×
s
2
(l
i
) × ...× s
d
(l
i
)). I.e., s
k
(l
i
) ∈ (0, 1] is the size of
the k-th dimension. An infinite number of unit-capacity
bins T, each of which is a d-dimensional (d ≥ 3)
hypercube bin with unit length on each side. Items
come online and the packing decision must be made
immediately. When an item l
i
comes, we assign it a
position (x
1
l
i
,x
2
l
i
,...,x
d
l
i
) in the current open bin,
subject to x
k
l
i
+ s
k
(l
j
) ≤ 1, for all 0 <j<iand
1 ≤ k ≤ d.
• Constraint: At any time during the packing, there are
only two open bins. An active bin is closed when there
is not enough space to accommodate the incoming item
and a new bin is open to be the current active bin. Once
a bin is closed, it cannot be used again.
• Goal: Using a minimum number of bins T to hold all
the items in L satisfied the above constraint.
Recently, a lot of work has been done for bounded space
bin packing with less than three active bins. For 1-bounded
space 2D packing, Fujita [4] first gave an on-line algorithm
for rectangle packing in an m×m grid with competitive ratio
of O((log log m)
2
). His main idea is to partition the grid
into different parts and packs items with different size into
corresponding parts. Chin et al. [5] divided rectangular items
into three types and partitioned unit square bin into two parts
which accommodate big and small items respectively. Using
this method, a 8.84-competitive ratio was achieved. The
result was improved to 5.155 by Zhang et al. [6]. For 2-space
bounded 2D packing, Januszewski [1] recently presents a 4-
competitive 2-space bounded 2-dimensional on-line packing
algorithm and an on-line strategy with competitive ratio 3.8
for 2-space bounded square packing by using the technique
of brick partitioning for packing small items. For 1-bounded
space multidimensional bin packing, Zhang et al. [7] gave
an on-line algorithm with competitive ratio 4
d
.
In this paper, we first extend the brick partitioning tech-
nique in paper [1]. Through adding the third dimension, a
brick becomes a box. We propose a box partitioning scheme
for cube packing. Continuously adding new dimensions, a
brick can become a d-dimensional hyperbox. We then pro-
pose a hyperbox partitioning scheme for hypercube packing.
For both problems, we present online algorithms and analyze
the competitive ratio.
II. P
RELIMINARIES
A. Asymptotic Competitive Ratio
The standard measure of on-line algorithm is the asymp-
totic competitive ratio, which is computed by the number
of used bins of an on-line algorithm to the number of used
bins of an optimal offline algorithm. Denote by OP T(L) the
cost of an optimal offline bin packing algorithm, by A(L)
the cost of an on-line approximation algorithm A, where
the cost refers to the number of used bins. The asymptotic
2014 Sixth International Symposium on Parallel Architectures, Algorithms and Programming
2168-3034/14 $31.00 © 2014 IEEE
DOI 10.1109/PAAP.2014.37
87