Large Scale
Large Scale
Editorial Board
David Hutchison
Lancaster University, UK
Takeo Kanade
Carnegie Mellon University, Pittsburgh, PA, USA
Josef Kittler
University of Surrey, Guildford, UK
Jon M. Kleinberg
Cornell University, Ithaca, NY, USA
Alfred Kobsa
University of California, Irvine, CA, USA
Friedemann Mattern
ETH Zurich, Switzerland
John C. Mitchell
Stanford University, CA, USA
Moni Naor
Weizmann Institute of Science, Rehovot, Israel
Oscar Nierstrasz
University of Bern, Switzerland
C. Pandu Rangan
Indian Institute of Technology, Madras, India
Bernhard Steffen
University of Dortmund, Germany
Madhu Sudan
Massachusetts Institute of Technology, MA, USA
Demetri Terzopoulos
University of California, Los Angeles, CA, USA
Doug Tygar
University of California, Berkeley, CA, USA
Gerhard Weikum
Max-Planck Institute of Computer Science, Saarbruecken, Germany
Rudolf Fleischer Jinhui Xu (Eds.)
Algorithmic Aspects
in Information
and Management
13
Volume Editors
Rudolf Fleischer
Fudan University
Department of Computer Science and Engineering
Shanghai 200433, China
E-mail: [email protected]
Jinhui Xu
State University of New York at Buffalo
Department of Computer Science and Engineering
Buffalo, NY 14260, USA
E-mail: [email protected]
ISSN 0302-9743
ISBN-10 3-540-68865-X Springer Berlin Heidelberg New York
ISBN-13 978-3-540-68865-5 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting,
reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication
or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965,
in its current version, and permission for use must always be obtained from Springer. Violations are liable
to prosecution under the German Copyright Law.
Springer is a part of Springer Science+Business Media
springer.com
© Springer-Verlag Berlin Heidelberg 2008
Printed in Germany
Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India
Printed on acid-free paper SPIN: 12278879 06/3180 543210
Preface
AAIM 2008 was organized by the Software School of Fudan University, Shanghai,
China.
Program Committee
Tetsuo Asano, JAIST, Japan
Jianer Chen, Texas A&M University, USA
Wei Chen, Microsoft Research Asia, Beijing, China
Francis Chin, The University of Hong Kong, Hong Kong
Ovidiu Daescu, University of Texas at Dallas, USA
Xiaotie Deng, City University of Hong Kong, Hong Kong
Leah Epstein, University of Haifa, Israel
Rolf Fagerberg, University of Southern Denmark, Denmark
Rudolf Fleischer, Fudan University, Shanghai, China (Co-chair)
Xin He, University at Buffalo, The State University of New York, USA
Tsan-Sheng Hsu, Academia Sinica Taipei, Taiwan
Ming-Yang Kao, Northwestern University, USA
Naoki Katoh, Kyoto University, Japan
Guohui Lin, University of Alberta, Canada
Alberto Marchetti-Spaccamela, Sapienza University of Rome, Italy
Ulrich Meyer, Universität Frankfurt, Germany
Matthias Müller-Hannemann, MLU Halle, Germany
M. Muthukrishnan, Google, USA
Giri Narasimhan, Florida International University, USA
Shang-Hua Teng, University of Boston, USA
Xiaodong Wu, University of Iowa, USA
Chen Xi, IAS, Princeton, USA
Jinhui Xu, State University of New York at Buffalo, USA (Co-chair)
Christos Zaroliagis, CTI and University of Patras, Greece
Norbert Zeh, Dalhousie University, Canada
Huaming Zhang, University of Alabama in Huntsville, USA
Yunhong Zhou, HP Labs, USA
External Reviewers
Vincent Conitzer Naoyuki Kamiyama
Refael Hassin Christos H. Makris
Asaf Levin Peter Noel
VIII Organization
Ding-Zhu Du
Vijay V. Vazirani
College of Computing
Abstract. In his seminal 1950 paper, John Nash defined the bargaining
problem; the ensuing theory of bargaining lies today at the heart of game
theory. In this work, we initiate an algorithmic study of Nash bargaining
problems.
We consider a class of Nash bargaining problems whose solution can
be stated as a convex program. For these problems, we show that there
corresponds a market whose equilibrium allocations yield the solution to
the convex program and hence the bargaining problem. For several of
these markets, we give combinatorial, polynomial time algorithms, using
the primal-dual paradigm.
Unlike the traditional Fisher market model, in which buyers spend a
fixed amount of money, in these markets, each buyer declares a lower
bound on the amount of utility she wishes to derive. The amount of
money she actually spends is a specific function of this bound and the
announced prices of goods.
Over the years, a fascinating theory has started forming around a
convex program given by Eisenberg and Gale in 1959. Besides market
equilibria, this theory touches on such disparate topics as TCP conges-
tion control and efficient solvability of nonlinear programs by combina-
torial means. Our work shows that the Nash bargaining problem fits
harmoniously in this collage of ideas.
1 Introduction
The minimum hitting set of bundles problem (mhsb) is defined as follows.
We are given a set E = {e1 , e2 , . . . , en } of n elements. Each element ei (i =
1, . . . , n) has a non negative cost ci . A bundle b is a subset of E. We are also
given a collection S = {S1 , S2 , . . . , Sm } of m sets of bundles. More precisely,
g(j)
each set Sj (j = 1, . . . , m) is composed of g(j) distinct bundles b1j , b2j , . . . , bj .
A solution to mhsb is a subset E ⊆ E such that for every Sj ∈ S at least one
bundle is covered, i.e. blj ⊆ E for
some l ∈ {1, 2, . . . , g(j)}. The total cost of the
solution, denoted by C(E ), is {i|ei ∈E } ci . Notice that, the cost of an element
appearing in several bundles is counted once. The objective is to find a solution
with minimum total cost.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 3–14, 2008.
c Springer-Verlag Berlin Heidelberg 2008
4 E. Angel, E. Bampis, and L. Gourvès
The special case of the mhsb problem, in which a bundle is only an element of
E is the classical minimum hitting set problem1 . It is known to be equivalent
to the classical minimum set cover problem: positive and negative approxima-
bility results for the minimum hitting set can be directly derived from the
classical minimum set cover problem [1]. 2
1.2 Contribution
2 Inapproximability
We exploit the fact that the minimum hitting set problem can be formulated
as a min vertex cover in hypergraphs. In the latter problem, we are given a
hypergraph H and the goal is to find the smallest subset of the vertex set with
non empty intersection with each hyperedge of H. Here, we are interested in the
particular case of this problem where each hyperedge is composed of exactly k
vertices (meaning that for the hitting set instance, each subset S ∈ S is such
that |S| = k). We denote this case by min-hyper k−vertex cover. When
k = 2, we get the classical min vertex cover problem on graphs. min-hyper
k−vertex cover admits a k-approximation algorithm. This result is essentially
tight when k ≥ 3 since Dinur et al [4] recently proved that for every > 0,
min-hyper k−vertex cover cannot be approximated within ratio k − 1 − .
When
√ k = 2, the min vertex cover problem cannot be approximated within
ln |V |
10 5 − 21 ≈ 1.36 [5] while there is a 2 − 2 ln ln |V | (1 − o(1))-approximation
algorithm [6].
6 E. Angel, E. Bampis, and L. Gourvès
3 Approximation Algorithms
3.1 Greedy Algorithms
We first consider the greedy algorithm (denoted by greedy 1) which selects
argmin1≤l≤g(j) {C(blj )} for every j in {1, . . . , m}. Actually, greedy 1 takes the
cheapest bundle of a set without considering what is chosen for the others.
Proposition 1. greedy 1 is an M -approximation algorithm for mhsb and the
result is tight.
We turn to a more evolved greedy algorithm which, unlike greedy 1, takes into
account the bundles selected for other sets. The algorithm, denoted by greedy
2, is based on the one that was originally used for set cover (see [11]). Given
E ⊆ E, let B(E ) = |{Sj ∈ S | ∃blj ⊆ E }|. Actually, B(E ) is the number of sets
in S hit by E . Let Ef f (blj ) be the effective cost of a bundle defined as
C(blj \E )
∪bl )−B(E ) if B(E ∪ bj ) > B(E )
l
l
Ef f (bj ) = B(E j
+∞ otherwise
The algorithm uses a set E which is empty at the beginning. While B(E ) < m,
greedy 2 computes the effective cost of each bundle and add to E the one
which minimizes this function. Unfortunately, we can show that greedy 2 does
not improve the performance guarantee of greedy 1.
Proposition 2. greedy 2 is a ρ-approximation algorithm for mhsb such that
ρ ≥ M.
Each bundle blj is represented by a variable xj,l (xj,l = 1 means blj is a subset
of the solution, xj,l = 0 otherwise). Each element ei is represented by a variable
xi (xi = 1 means ei belongs to the solution, otherwise xi = 0). Among all
bundles of a subset Sj , at least one is selected because of the first constraint
g(j)
l=1 xj,l ≥ 1. The second constraint ensures that all elements
of a selected
bundle appear in the solution. Since the objective function 1≤j≤r xj cj has to
be minimized, an element which does not belong to any selected bundle will not
belong to the solution. Let LP be the linear relaxation of the ILP, i.e. replace
(4) and (5) by
Proof. Let {x∗ } (resp. {x}), be an optimal assignment for ILP (resp. LP). One
has:
xi ci ≤ x∗i ci
1≤i≤n 1≤i≤n
n
n
n
x̃i ci ≤ N xi ci ≤ N x∗i ci
i=1 i=1 i=1
from inequality (3), and the last inequality comes from the definition of M ,
which is the maximum number of sets an element can appear in. Since 1 − ui ≥
(1 − xi )M , one has ui ≤ 1 − (1 − xi )M . The expected cost of the solution is then
bounded as follows:
n
n
M
E[C(E )] = u i ci ≤ 1 − (1 − xi ) ci (9)
i=1 i=1
nn
Using Lemma 1, we know that i=1 xi ci ≤ i=1 x̃i ci since {x̃} is feasible
while {x} is optimal. Using Lemma 1 again we obtain
n
n
n
(1 − xi )M − 1 + M xi
xi ci ≤ f (M, N, xi )ci = ci
i=1 i=1 i=1
M − N (1 − (1 − 1/N )M )
n
Using this last inequality, inequality (9) and i=1 xi ci = OP Tf ≤ OP T we get
the expected result:
Proof of Proposition 3
Proof. The function f (M, N, x) is increasing between 0 and 1 since f (M, N, x) =
−1
M − N (1 − (1 − 1/N )M ) M − M (1 − x)M−1 ≥ 0. Indeed, we know that
M − N (1 − (1 − 1/N )M ) ≥ 0.
(1 − 1/N )M ≥ 1 − M/N
1 − (1 − 1/N )M ≤ M/N
N 1 − (1 − 1/N )M ≤ M (10)
0 ≤ M − N 1 − (1 − 1/N )M
P
P
P
(1 − ri )M − 1 + M ri ≤ (1 − ri )M − 1 + M ri (12)
i=1 i=1 i=1
if we multiply by −1 and add P i=1 M ri on both sides. Finally, we saw in the
proof of Proposition 3 that M − N (1 − (1 − N1 )M ) ≥ 0. Then, one can divide
both parts of inequality (12) by M − N (1 − (1 − N1 )M ) to get the result.
10 E. Angel, E. Bampis, and L. Gourvès
Proof of Lemma 1
Proof. Let {x} be the values assigned to the variables when LP is solved. Con-
sider the following algorithm which, given {x}, computes new values {x̃}.
1 For j = 1 to m Do
1.1 For l = 1 to g(j) Do
x̃j,l := f (M, N, xj,l )
End For
End For
2 For i = 1 to n Do
x̃i = maxj { {l|ei ∈bl } x̃j,l }
j
End For
Actually, the algorithm gives to the variable representing bundle blj the value
f (M, N, xj,l ) which is always nonnegative by Proposition 3 and Remark 1. Then,
{x̃} fulfills constraints (6) of LP.
g(j)
We now show that for all j in {1, . . . , m}, we have l=1 x̃j,l ≥ 1. Let P = g(j )
for a fixed j belonging to {1, . . . , m}. Since xj,l is optimal by Remark 1, we know
that
P
xj ,l = 1 (13)
l=1
1 1
P P
f (M, N, xj ,l ) ≥ f (M, N, xj ,l )
P P
l=1 l=1
1
P
1
f (M, N, xj ,l ) = f (M, N, )
P P
l=1
1
P
1 (1 − P1 )M − 1 + M/P
f (M, N, xj ,l ) ≥ f (M, N, ) =
P
l=1
P M − N (1 − (1 − N1 )M )
P
M − P (1 − (1 − 1 M
P) )
f (M, N, xj ,l ) ≥ (14)
l=1
M − N (1 − (1 − 1 M
N) )
1 M 1
M − P (1 − (1 − ) ) ≥ M − N (1 − (1 − )M ) (15)
P N
On the Minimum Hitting Set of Bundles Problem 11
P
f (M, N, xj ,l ) ≥ 1 (16)
l=1
Since no particular hypothesis was made for j , we deduce that {x̃} fulfills con-
straints (2) of LP. Each variable x̃i receives the value maxj { {l|ei ∈bl } x̃j,l } at
j
step 2 of the algorithm. Thus, {x̃} fulfills constraints (3) of LP. Since every x̃j,l is
nonnegative, we know that x̃i is also nonnegative and {x̃} fulfills constraints (7)
of LP. We can conclude that {x̃} is a feasible assignment for LP. The remaining
part of the proof concerns inequality (8).
Take an element ei ∈ E. We know from step 2 that there is a q in {1, . . . , m}
such that
x̃i = x̃q,l = f (M, N, xq,l ) (17)
{l|ei ∈blq } {l|ei ∈blq }
Using inequalities (17), (18) and (19) we know that x̃i ≤ f (M, N, xi ) holds for
every element ei . We sum this inequality over all elements and obtain
n
n
x̃i ≤ f (M, N, xi )
i=1 i=1
3.3 Derandomization
The derandomization of r-rounding is done via the method of conditional
expectation (see for example [11]). We get a deterministic algorithm called d2-
rounding.
Solve LP
Pr[hj = l] = xj,l where j = 1 . . . m and l = 1 . . . g(j)
For j = 1 to m Do
Let l∗ = argmin1≤l≤g(j) E[C(h) | h1 = l1 , . . . , hj−1 = lj−1 , hj = l]
Set hj = l∗
End For
12 E. Angel, E. Bampis, and L. Gourvès
Proof. In the following, we show that the expected cost never exceeds the original
one.
Suppose we are given l = (l1 . . . lj ), a partial solution of the problem such
that l1 ∈ {1, . . . , g(1)}, l2 ∈ {1, . . . , g(2)}, . . . , lj ∈ {1, . . . , g(j )} and j ∈
{1, . . . , m − 1}.
g(j +1)
E[C(h) | h1 = l1 , . . . , hj = lj ] = E[C(h) | h1 = l1 , . . . , hj = lj , hj +1 = l]
l=1
. Pr[hj +1 = l | h1 = l1 , . . . , hj = lj ]
g(j +1)
= E[C(h) | h1 = l1 , . . . , hj = lj , hj +1 = l] xj +1,l
l=1
E[C(h) | h1 = l1 , . . . , hj = lj , hj +1 = l ] ≤ E[C(h) | h1 = l1 , . . . , hj = lj ]
At each step, the algorithm chooses a bundle (fixes its probability to 1) and the
new expected cost does not exceed the previous one. Since E[C(h)] ≤ N (1 −
(1 − N1 )M ) OP T at the beginning of the algorithm, d2-rounding converges to
a solution whose total cost is N (1 − (1 − N1 )M )-approximate.
– Take i ∈ {0, . . . , N m −1} and let α be the representation of i with the numeral
m−1
N -base system, i.e. i = j=0 α(i, j) N j where α(i, j) ∈ {0, . . . , N − 1}. We
set ei ∈ blj if α(i, j) = l.
OP T N M − (N − 1)M 1
= = N (1 − (1 − )M )
OP Tf N M−1 N
5 Concluding Remarks
References
1. Ausiello, G., D’Atri, A., Protasi, M.: Structure preserving reductions among convex
optimization problems. Journal of Computer and System Sciences 21(1), 136–153
(1980)
2. Avidor, A., Zwick, U.: Approximating MIN 2-SAT and MIN 3-SAT. Theory of
Computer Systems 38(3), 329–345 (2005)
3. Bertsimas, D., Teo, C.-P., Vohra, R.: On dependent randomized rounding algo-
rithms. Operation Research Letters 24(3), 105–114 (1999)
4. Dinur, I., Guruswami, V., Khot, S., Regev, O.: A new multilayered PCP and the
hardness of hypergraph vertex cover. In: Proceedings of STOC 2003, pp. 595–601
(2003)
5. Dinur, I., Safra, S.: The importance of being biased. In: Proceedings of STOC 2002,
pp. 33–42 (2002)
6. Halperin, E.: Improved Approximation Algorithms for the Vertex Cover Problem
in Graphs and Hypergraphs. SIAM J. Comput. 31(5), 1608–1623 (2002)
7. Kohli, R., Krishnamurty, R., Mirchandani, P.: The minimum satisfiability problem.
SIAM Journal on Discrete Mathematics 7, 275–283 (1994)
8. Marathhe, M.V., Ravi, S.S.: On approximation algorithms for the minimum satis-
fiability problem. Information Processing Letters 58, 23–29 (1996)
9. Toroslu, I.H., Cosar, A.: Dynamic programming solution for multiple query opti-
mization problem. Information Processing Letters 92(3), 149–155 (2004)
10. Sellis, T.K.: Multiple-Query Optimization. Transactions on Database Sys-
tems 13(1), 23–52 (1988)
11. Vazirani, V.V.: Approximation Algorithms. Springer, Heidelberg (2001)
Speed Scaling with a Solar Cell
1 Introduction
Chip manufacturers such as Intel, AMD and IBM have made it a priority to
redesign their chips to consume less power and to provide various hardware and
software capabilities for power management. All of these chip manufacturers
make chips that use dynamic speed scaling as a power management technique.
Typically, the power consumed varies as the cube of the processor speed, and
hence this can yield significant energy/temperature reductions.
The first theoretical investigation of speed scaling algorithms was in the sem-
inal paper by Yao, Demers and Shenker [16]. They considered the problem of
feasibly scheduling a collection of jobs with arbitrary release times, deadlines
and sizes to minimize the energy consumed, and gave both offline and online
algorithms for it. Subsequently, there has been a lot of work on improving these
results and extending them to optimize various other objectives such as, flow
time, throughput and so on [2,3,4,5,7,8,11,13,14,15,17].
All of these theoretical investigations of speed scaling as an energy manage-
ment technique involve problems where the goal is to minimize the total energy
used. This would be the appropriate objective if the energy source was a bat-
tery, and the goal was to extend the battery’s lifetime. But some devices, most
notably some sensors, also contain technologies that allow then to harvest en-
ergy from their environment. The most common energy harvesting technology
is solar cells. Some sensors also contain technology that allows then to scavenge
Supported in part by NSF grants CNS-0325353, CCF-0514058 and IIS-0534531.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 15–26, 2008.
c Springer-Verlag Berlin Heidelberg 2008
16 N. Bansal, H.-L. Chan, and K. Pruhs
energy from ambient vibrations. To give some feel for state of technology, batter-
ies can store about 1 Joule of energy per cubic millimeter, while solar cells can
provide approximately 100 micro-Watt per square centimeter in bright sunlight,
and vibration devices can provide nano-Watts per cubic millimeter [1].
In this paper we initiate a study of speed scaling for energy management
in devices that contain both a battery and an energy harvesting device, which
we will henceforth assume for simplicity is a solar cell. Our goal is understand
how the presence of a solar cell will affect the resulting speed scaling problems.
For simplicity, we assume that the solar cell generates energy at a fixed rate
(although many of a our results apply to a more general setting). We consider
the deadline feasibility problem introduced in [16] because it is the most studied,
and probably the best understood, speed scaling problem in the literature. We
consider the objective minimizing the recharge rate, subject to the deadline
feasibility constraint.
In Section 5, we show that the YDS algorithm, that is optimal for the no-
recharge case, is in fact a 2-approximation for the minimum recharge rate prob-
lem. We also show that this bound is tight. In the special case when the release
times and deadlines of jobs are similarly ordered, we show that YDS is optimal.
Finally, in Section 6, we consider the online setting, and show that we show that
the BKP algorithm [4] is O(1) competitive for the problem. In particular, BKP
α α α
achieves a competitive ratio of 4( α−1 ) e .
In summary, our results seem to suggest that the inclusion of a solar cell in
some sense changes the resulting speed scaling problem by a constant factor.
As evidence of this, the optimal energy schedule YDS, is an O(1)-approximate
schedule for recharge rate, and the algorithm BKP is O(1)-competitive for both
energy and recharge rate. The KKT conditions reveal that cutting the recharge-
rate optimal schedule at the points where the battery is empty, partitions the
schedule into energy optimal YDS schedules. So there is some relationship be-
tween energy optimal and recharge-rate optimal schedules. However, computing
the recharge-rate optimal schedule is still seemingly much harder than com-
puting an energy optimal schedule because it is not clear how to partition
the work amongst these YDS subschedules of the recharge-rate optimal
schedule.
2 Preliminaries
We begin by reviewing the algorithms YDS and BKP for energy efficient schedul-
ing, as well as the KKT conditions for convex programming.
The Algorithm YDS. Given an instance I, let the density of any time interval
[t, t ] be defined as den(t, t ) = w(t, t )/(t − t), where w(t, t ) is the total size of
jobs with release time at least t and deadline at most t . Intuitively, den(t, t ) is
the minimum average speed at which any feasible algorithm must work during
the interval [t, t ]. YDS applies the following steps until all jobs are scheduled:
Let [t, t ] be the highest density interval. The speed is set to den(t, t ) during
[t, t ]. Then the instance is modified such that times [t, t ] did not exist. That is,
all deadlines di > t are modified di = max{t, di − (t − t)}, and all release times
ri > t are modified to ri = max{t, ri − (t − t)}, and the process is repeated. The
jobs are scheduled in the earliest deadline first order.
We note that each job is run at fixed speed in the YDS schedule. This speed
is fixed with respect to time, but may be different for different jobs. Moreover,
if job i runs at speed s, then the speed at any time during [ri , di ] is at least s.
Another useful (but non-algorithmic) view of YDS is the following. Start with
an arbitrary schedule, and keep improving the schedule as follows until no longer
possible: If some job i runs at time t when the processor speed is s, and there is
some other time t where job i can run (i.e. ri ≤ t ≤ di ) but the speed at t is
less than s, then move infinitesimally small work of job i from t to t .
The Algorithm BKP. At any time t and t1 < t ≤ t2 , let w(t, t1 , t2 ) be the
total size of jobs that have release time at least t1 , deadline at most t2 and have
been released by time t. Intuitively, it is an estimation for the density of the
interval [t1 , t2 ] based on the jobs released by t. Let v(t) be defined by
w(t, t − (e − 1)(t − t), t )
v(t) = max
t >t e(t − t)
Then, at any time t, BKP runs at speed e · v(t) and processes the unfinished job
α α α
with earliest deadline. BKP is known to be 2( α−1 ) e -competitive [4].
fi (x) ≤ 0 i = 1, . . . , n (1)
λi ≥ 0 i = 1, . . . , n (2)
λi fi (x) = 0 i = 1, . . . , n (3)
Speed Scaling with a Solar Cell 19
n
∇f0 (x) + λi ∇fi (x) = 0 (4)
i=1
We refer to the above four equations as Condition 1, 2, 3 and 4 of the KKT condi-
tions, respectively. Condition 3 is commonly known as complementary slackness.
If the program is strictly feasible, i.e., there is some point x where fi (x) < 0 for
i = 1, . . . , n, then these conditions are also sufficient [9].
min R s.t.
wi − wi,t ≤ 0 ∀i = 1, 2, . . . (5)
t:ri <t≤di
( wx,t )α − Rj ≤ 0 ∀j = 1, 2, . . . (6)
t:t≤j x:rx <t≤dx
−wi,j ≤ 0 ∀i, j = 1, 2, . . . (7)
The constraints (5) enforce that each job is completed. Constraints (6) enforce
that the battery is non-negative at any integral time. We need to show that the
optimal solution for CP gives the minimum recharge rate. This is not completely
obvious since CP does not explicitly enforce that the battery does not run out
of energy at some non-integral time.
Lemma 1. The optimal solution R for CP is the minimum recharge rate to
complete all jobs in I.
Proof. Constraints (5) guarantee that each job is completed. Consider any time j
and let Ej−1 and Ej be the energy in the battery at time j −1 and j, respectively.
Let s = i:ri <j≤di wi,j be the speed during [j − 1, j] and let R = sα . Then for
any w ∈ [0, 1], at time j − 1 + w the energy in the battery is Ej−1 + w(R − R ).
If R − R ≥ 0, then Ej−1 + w(R − R ) ≥ Ej−1 ≥ 0; else if R − R < 0, then
Ej−1 + w(R − R ) ≥ Ej−1 + (R − R ) = Ej ≥ 0. Hence, if Ej−1 ≥ 0 and Ej ≥ 0,
then the battery is not depleted at any time during [j − 1, j]. This implies that
the schedule returned by CP is feasible. Conversely, every feasible schedule must
satisfy the constraints stated in CP. Hence R is the minimum recharge rate.
20 N. Bansal, H.-L. Chan, and K. Pruhs
As we now show, these KKT conditions are equivalent to the following com-
binatorial properties that a schedule must satisfy.
Lemma 2. Let I be any job sequence and S be a schedule for I. Then, S is
optimal if and only if it satisfies the following 4 properties.
1. S completes all jobs and the battery is not depleted at any integral time.
2. There exists time T > 0 such that the battery has zero energy at T and no
job with deadline after T is processed by T .
3. Let T be the smallest time satisfying Property 2. Let 0 = t0 < t1 < . . . <
tk = T be times up to T such that the battery has zero energy. Then, for
each interval [ty−1 , ty ], y = 1, . . . , k, the work processed during [ty−1 , ty ] is
scheduled using the YDS schedule.
4. There exists multipliers m1 , m2 , . . . , mk−1 ≥ 1 for t1 , t2 , . . . , tk−1 with the
following property. Let si,y denote the speed that job i is processed during
[ty−1 , ty ]. Then, if i is processed during both [ty−1 , ty ] and [ty −1 , ty ], y < y ,
we have si,y /si,y = my my+1 · · · my −1 .
Remark: We note that the multipliers m1 , . . . , mk−1 are independent of the jobs,
and hence the ratios siy /siy are identical for each job i.
Proof. We first show sufficiency, that is, if S satisfies the 4 properties stated
in Lemma 2, then S also satisfies the KKT conditions for CP and hence S is
optimal. We then show that these properties are also necessary. In particular,
we show that if S does not satisfy these properties, then there is another feasible
schedule with a smaller recharge rate, implying that S is not optimal. We now
give the details.
Consider the values of wi,j and R implied by S. The first property above
implies that wi,j and R satisfy the constraints of CP and hence Condition 1 of
the KKT conditions. The remaining three properties allow us to determine the
values of α, β and γ satisfying Condition 2, 3 and 4 of the KKT conditions. We
first give some intuition. Assume job i is processed during [j − 1, j]
for some time
j. By (10) it follows that γi,j = 0 and by (12) it follows that if t:j≤t βt > 0,
then the speed during [j − 1, j] is
1/(α−1)
αi
wx,j = (13)
α t:j≤t βt
x:rx <j≤dx
k
1− ty βty = 0 (15)
y=1
This system has a unique non-negative solution, as (14) can be written as βty =
((my )α−1 − 1) t:ty+1 ≤t βt . Hence, by considering the equation from y = k − 1
down to y = 1, we can express each of βtk−1 , . . . , βt1 in terms of βtk . Substituting
these expressions into (15), we obtain a unique solution for βtk , as well as βty
for y = k − 1, . . . , 1. Note that βtk > 0 and βty ≥ 0 for y = k − 1, . . . , 1. This
completely specifies β. Note that by (15), the values of β satisfy requirement
(11) of the KKT conditions.
To calculate the values of α, we consider each job i. Let [ji − 1, ji ] be the
earliest time interval during which i is processed. Then, αi is set to
αi = α( wx,ji )α−1 ( βt ). (16)
x:rx <ji ≤dx t:ji ≤t
Note that αi ≥ 0. As all jobs are completed by S, the KKT condition given
by (8) is satisfied for any value of α. Finally, to calculate the values of γ, we
consider any job i and any time j, ri < j ≤ di . We set γi,j to
γi,j = α( wx,j )α−1 ( βt ) − αi . (17)
x:rx <j≤dx t:j≤t
This guarantees that the KKT conditions specified by (12) are satisfied. It re-
mains to show that γi,j ≥ 0 and (10) is satisfied. This is trivially true if i has
not been processed until time tk , because γi,j = 0 in that case. If i has been
processed by time tk , recall that [ji − 1, ji ] is the first interval that i is processed.
Consider any time [j − 1, j] such that ri < j ≤ di . Let y and y be values that
ty−1 < ji ≤ ty and ty −1 < j ≤ ty . Then, by (17) and (14) we have that
γi,j = α( wx,j )α−1 ( βt ) − αi
x:rx <j≤dx t:j≤t
x:rx <j≤dx wx,j
α−1
=α (my my+1 . . . my −1 )α−1 ( βt ) − αi
my my+1 . . . my −1
t:ty ≤t
x:rx <j≤dx wx,j
α−1
=α ( βt ) − αi (18)
my my+1 . . . my −1
t:ty ≤t
which is identically equal to 0 by (16). Thus the KKT conditions given by (10) are
satisfied in this case. Finally consider the case when i is not processed during
[j − 1, j]. By property 3 in Lemma 2, the schedule during [ty−1 , ty ] is a YDS
schedule, hence it must be that the speed x:rx <j≤dx wx,j is at least as large
as my my+1 . . . my −1 times the speed during [ji − 1, ji ]. By (18) and (16), this
implies that γi,j ≥ 0 if i is not processed during [j − 1, j]. This completes the
proof that the 4 properties above implies the KKT conditions.
It is relatively straightforward to see that the properties in Lemma 2 are
necessary.
Hence, to determine whether a schedule S minimizes the recharge rate, we can
simply check for the above 4 properties. This gives our main result for this section.
5 Performance of YDS
In this section, we analyze the YDS schedule and show that it requires a recharge
rate at most 2 times that of the optimum schedule, and that this bound is the
best possible. Later we show that YDS is optimum for instances where the job
deadlines and release times are ordered similarly.
Let I be any job sequence, and let OPT denote some optimum schedule. We
first state a simple observation used to lower bound the energy usage of OPT.
Lemma 3. Consider the YDS schedule for I. Let s be any speed and t be any
time such that YDS has a speed at least s at t and has a speed strictly less than
s immediately after t. Let Ja be the set of all jobs YDS has processed using a
speed at least s until time t. Then, the energy usage of OPT for processing jobs
in Ja by time t is at least that of YDS.
Proof. We first notice that all jobs in Ja have deadlines at most t and are actually
completed by YDS by time t. Furthermore, in the YDS schedule for I, jobs in Ja
are processed identically as they would be in the YDS schedule for the instance
24 N. Bansal, H.-L. Chan, and K. Pruhs
Well-ordered Jobs: We also consider the special case where the jobs are well-
ordered, i.e., for every jobs i1 , i2 , if the release time of i1 is no later than the
release time of i2 , then the deadline of i1 is no later than the deadline of i2 . We
can show that YDS is optimal for job sequences that are well-ordered. We omit
the proof due to the page limit.
Speed Scaling with a Solar Cell 25
Theorem 3. For well-ordered job sequences, YDS minimizes the recharge rate.
6 An Online Algorithm
We now show that the BKP algorithm is constant competitive in the online set-
α α α
ting. For any job sequence I, it is known that BKP uses no more than 2( α−1 ) e
times the total energy used by YDS [4]. In the following lemma, we show that
in fact at any intermediate time t, the energy usage of BKP up to t is at most
α α α
2( α−1 ) e times that of YDS.
Lemma 4. Consider any job sequence I. Let E(t) be the energy usage of YDS up
to time t, and E (t) be that of BKP. Then, at any time t, E (t) ≤ 2( α−1
α α α
) e E(t).
Proof. For the proof we define another algorithm ALG, that any time t runs at
speed p(t) = e · maxt1 ,t2 w(t, t1 , t2 )/(t2 − t1 ), where t1 < t ≤ t2 and w(t, t1 , t2 )
denotes the amount of work that has release time at least t1 and has deadline
at most t2 . Recall that the speed of BKP at any time t is no greater than that
of ALG. We will show that at any time t, the energy usage of ALG up to t is no
α α α
greater than 2( α−1 ) e E(t), which implies the lemma.
α α α
It is shown in [4] that ALG is 2( α−1 ) e -competitive in total energy usage.
To show that the same guarantee holds for any intermediate time, consider any
job sequence I and any time t. Without loss of generality, we assume t and
the release time and deadline of every job are integers. Let I be a job sequence
constructed based on the YDS schedule for I: At any time j < t, a job is released
with deadline j + 1 and size equal to the speed of YDS during [j, j + 1], and
the last job is released at time t − 1. As ALG is 2( α−1 α α α
) e -competitive for total
energy, the energy usage of ALG up to t with input I is at most 2( α−1 α α α
) e
times that of YDS for I . To argue back about the job sequence I, we note that
at any time up to t, YDS has the same speed for input I and I . For ALG, we
note that at any time i < t, the quantity p(i) for input I is at most that for
input I , and hence the speed of ALG for I is at most that for I . This implies
α α α
that for I, the energy usage of ALG up to time t is at most 2( α−1 ) e times
that of YDS. Since I and t are arbitrary, the lemma follows.
References
1. http://www.eetimes.com/story/OEG20020405S0015
2. Albers, S., Fujiwara, H.: Energy-efficient algorithms for flow time minimization.
In: Durand, B., Thomas, W. (eds.) STACS 2006. LNCS, vol. 3884, pp. 621–623.
Springer, Heidelberg (2006)
26 N. Bansal, H.-L. Chan, and K. Pruhs
3. Albers, S., Müller, F., Schmelzer, S.: Speed scaling on parallel processors. In: Proc.
ACM Symposium on Parallel Algorithms and Architectures (SPAA), pp. 289–298
(2007)
4. Bansal, N., Kimbrel, T., Pruhs, K.: Speed scaling to manage energy and tempera-
ture. J. ACM 54(1) (2007)
5. Bansal, N., Bunde, D., Chan, H.-L., Pruhs, K.: Average rate speed scaling. In:
LATIN 2008 (to appear, 2008)
6. Bansal, N., Chan, H.-L., Pruhs, K., Rogozhnikov-Katz, D.: Improved bounds for
speed scaling in devices obeying the cube-root rule. In: IBM Research Technical
Report
7. Bansal, N., Pruhs, K.: Speed scaling to manage temperature. In: Diekert, V., Du-
rand, B. (eds.) STACS 2005. LNCS, vol. 3404, pp. 460–471. Springer, Heidelberg
(2005)
8. Bansal, N., Pruhs, K., Stein, C.: Speed scaling for weighted flow time. In: SODA
2007: Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete
algorithms, pp. 805–813 (2007)
9. Boyd, S., Vandenberghe, L.: Convex Optimization. Cambridge University Press,
Cambridge (2004)
10. Brooks, D.M., Bose, P., Schuster, S.E., Jacobson, H., Kudva, P.N., Buyukto-
sunoglu, A., Wellman, J.-D., Zyuban, V., Gupta, M., Cook, P.W.: Power-aware
microarchitecture: Design and modeling challenges for next-generation micropro-
cessors. IEEE Micro. 20(6), 26–44 (2000)
11. Chan, H.-L., Chan, W.-T., Lam, T.-W., Lee, L.-K., Mak, K.-S., Wong, P.W.H.:
Energy efficient online deadline scheduling. In: SODA 2007: Proceedings of the
eighteenth annual ACM-SIAM symposium on Discrete algorithms, pp. 795–804
(2007)
12. Irani, S., Shukla, S., Gupta, R.: Online strategies for dynamic power management
in systems with multiple power saving states. Trans. on Embedded Computing Sys
(2003); Special Issue on Power Aware Embedded Computing
13. Kwon, W.-C., Kim, T.: Optimal voltage allocation techniques for dynamically vari-
able voltage processors. In: Proc. ACM-IEEE Design Automation Conf., pp. 125–
130 (2003)
14. Li, M., Liu, B.J., Yao, F.F.: Min-energy voltage allocation for tree-structured tasks.
Journal of Combinatorial Optimization 11(3), 305–319 (2006)
15. Li, M., Yao, F.F.: An efficient algorithm for computing optimal discrete voltage
schedules. SIAM J. on Computing 35, 658–671 (2005)
16. Yao, F., Demers, A., Shenker, S.: A scheduling model for reduced CPU energy. In:
Proc. IEEE Symp. Foundations of Computer Science, pp. 374–382 (1995)
17. Yun, H.S., Kim, J.: On energy-optimal voltage scheduling for fixed priority hard
real-time systems. ACM Trans. on Embedded Computing Systems 2(3), 393–430
(2003)
Engineering Label-Constrained
Shortest-Path Algorithms
1 Introduction
Consider a multimodal road network, with roads differentiated by categories
(highways, local streets etc.) and find in that network a shortest path from a
given start to a destination point that uses highway at most once (thus avoiding
on- and off-ramps). Another example is the k-similar-path problem, where we
want to compute two shortest paths between the same pair of vertices such that
the second path reuses at most k edges of the first (this can be useful to avoid
traffic jams in vehicle routing).
To formalize such problems, we augment the network edges with appropriate la-
bels and model the given restriction as a formal language. The labels of the edges
on a shortest path concatenated must then form an element of the language. A de-
tailed theoretical study of this (formal-) language-constrained shortest-path prob-
lem (LCSP) was undertaken in [4], where also a generalization of Dijkstra’s
algorithm to solve this problem is given, and in [3] an implementation of this al-
gorithm was tested for the special case of linear regular languages (LinLCSP).
Building on this earlier work, we now consider the LCSP with arbitrary reg-
ular expressions (RegLCSP): we propose a concrete implementation of an al-
gorithm solving this extended problem, and present adaptations of speed-up
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 27–37, 2008.
c Springer-Verlag Berlin Heidelberg 2008
28 C. Barrett et al.
2 Foundation
In this section we formally define the regular-language-constrained shortest-path
problem, and describe two out of many algorithmic problems, multimodal plans
and k-similar paths, that can be tackled using our problem formulation.
2.2 Applications
We describe two applications of the RegLCSP problem, which are also re-
spected in our experiments (other examples include turn complexity, counting
constraints, and trip chaining; cf. [3] for an overview).
Multimodal Plans. Consider a traveler who wants to take a bus from a start
s to a destination point d and suppose transfers are undesirable, while walks
from s to a bus stop and from a bus stop to d be allowed. To solve such a task,
add to the given road network a vertex for every bus stop and an edge between
each consecutive pair of stops. Label the edges according to the modes of travel
allowed (e. g., c for car travel; w for walking on sidewalks and pedestrian bridges;
b for bus transit). Now the traveler’s restriction can be modeled as w∗ b∗ w∗ , if
we make sure that the network contains a zero-length w-edge for each change of
bus.
k-Similar Paths. We want to consecutively route two (or more) vehicles from s
to d such that the second uses at most k of the edges passed by the first one.
This can be useful, e. g., to plan for a travel group different transfers between
two fixed points. Note that the second path thus found may, depending on the
network and the choice of k, be of greater length. To do this, find a shortest s-d-
path p in the given network, label p’s edges by t (for taken), the remaining ones
by f (for free), and solve the s-d-query again for the expression f ∗ (t ∪ f ∗ )k f ∗ .
3 Algorithms
We now show how RegLCSP can be solved through a product network con-
structed from given network and NFA, and present some adaptations of unimodal
speed-up techniques to our multimodal algorithm.
and edge set {(e, t) | e ∈ E, t ∈ T, G (e) = A (t)}. The cost of an edge (e, t) ∈ P
corresponds to c(e).
Theorem 1. Finding an L-constrained shortest path for some L ⊆ Σ ∗ and
(s, d) ∈ V × V is equivalent to finding a shortest path in the product network
P = G × A from vertex (s, q0 ) to (d, f ) for some f ∈ F .
For the proof, one need only observe that there is a one-to-one correspondence
between paths in P starting at (s, q0 ) and ending at some vertex (d, f ) and s-d-
paths in G whose labeling belongs to L (for details please refer to [4]). Theorem 1
immediately yields the RegLCSP Algorithm, which performs an s-d-shortest-
path search in P .
Goal-Directed Search (go). For given source and destination vertices s and d,
goal-directed search, or A∗ search, modifies the edge costs so that during the
search, edges pointing roughly towards d are preferred to those pointing away
from it. The effect is that potentially fewer vertices (and edges) have to be
touched before d is found. With networks featuring distance metric, this mod-
ification, c̄, can typically be achieved through Euclidean distances dist(v, w)
between vertices v and w:
c̄(v, w) = c(v, w) − dist(v, d) + dist(w, d)
(in this case, c accounts for curves, bridges, etc., so that dist provides a lower
bound). When using travel, or time, metric, letting dist (·, d) = dist(·, d)/vmax
with vmax = max{v,w}∈E dist(v, w) c(v, w) yields a feasible lower bound.
Bidirectional Search (bi). To reduce the search space, we run two simultaneous
searches, forward and backward, starting from s and d, respectively; the expected
improvement is a halving of the number of touched vertices1 . A shortest s-d-path
has been found when a vertex u is about to be scanned that has already been
settled (i. e., its distance from the search’s origin has become permanent) by the
search in the other direction (note that the shortest path such found need not
pass by u).
Combinations (bi+). We provide two variants for the combination of bi with
either go or sv: (1) the cost function used for the backward search corresponds
to that for the forward search; or (2) the cost function for both searches is the
average of modified cost functions with respect to s and d, respectively:
4 Experimental Study
The empiric part of this work systematically investigates our implementation of
the RegLCSP Algorithm and the speed-up techniques described in the previous
section. It can be seen as both a continuation and extension of [3] in that the re-
striction to linear expressions is waived and besides goal-directed search and the
Sedgewick-Vitter heuristic, bidirectional search and combinations of techniques
are employed. Our main focus is on the suitability of each technique for sev-
eral networks and NFAs and the speed-ups attainable. Moreover, two different
problems that can be tackled by RegLCSP (cf. Section 2.2) are considered.
4.1 Setup
Our experiments are conducted using realistic networks, representing various
US and European road as well as European railway networks2 (cf. Table 1).
The road networks are weighted with actual distances (not necessarily Euclidean
lengths) and labeled with values reflecting road category (from 1 to 4 for US and
from 1 to 15 for EU networks, ranking from fast highways to local/rural streets).
The railway network represents trains and other means of public transportation,
where vertices mark railway stations/bus stops and edges denote non-stop con-
nections between two embarking points, weighted with average travel times and
labeled from 0 to 9 for rapid Intercity Express trains to slower local buses. One
important difference between the US and the European road data collections is
that the former come undirected, while the latter are directed.
We apply several specific language constraints of varying complexity, listed in
Table 2: for the US networks, we distinguish between enforced use of highway
1
The forward search will explore roughly r 2 vertices to find an r-edge shortest path,
while the searches are likely to meet when each has explored roughly (r/2)2 vertices.
2
The US networks are taken from the TIGER/LINE collection, available at
http://www.dis.uniroma1.it/~challenge9/data/tiger/. The European road and
railway data were provided courtesy of PTV AG, Karlsruhe, and HaCon, Hannover.
32 C. Barrett et al.
Table 1. Network sizes. Left: US road networks; right: European road and railway
networks. For each network, a short key, its type (road/rail), and the numbers n and
m of vertices and edges, respectively, are indicated.
Table 2. Left: language constraints used with different networks (from top to bottom:
US road, European road and railway). For each NFA, a short key, regular expression
recognized by the NFA, informal description, and the numbers n and m of vertices and
edges, respectively, are indicated. Right: complex NFA representing for a decomposition
of the alphabet Σ = Σ1 ∪ Σ2 the unrestricted expression, Σ ∗ .
(interstate or national), regional transfer (all categories but interstates), and use
of local/rural streets only; for the European networks, we employ two different
NFAs imposing no restriction at all (besides the ‘canonical’, S, also an ‘artificially
made-complex’ one, C) as well as such restricting to local streets and avoiding
high-speed trains (the latter usually being a little more expensive), respectively.
To measure the performance of each speed-up technique T , we compute the
ratio tvpl /tvT of touched vertices (product vertices added to the priority queue),
where tvpl and tvT stand for the number of touched vertices with plain Dijkstra
(i. e., pure RegLCSP Algorithm) and with T , respectively. This definition of
speed-up both is machine independent and proved to reflect actual running times
quite precisely. Our code was compiled with the GCC (version 3.4) and executed
on several 2- or 4-core AMD Opteron machines with between 8 and 32 GB of
main memory. Unless otherwise noted, each series consists of 1000 queries.
The term multimodal here is used in an extended sense since depending on the
network type, it may refer either to multiple road categories or train classes. For
comparability reasons, we explore the exact algorithms and the Sedgewick-Vitter
heuristic separately.
Engineering Label-Constrained Shortest-Path Algorithms 33
Fig. 1. Average speed-up in terms of touched vertices with each of the algorithms
plain (pl), goal-directed (go), bidirectional (bi), and bidirectional/goal-directed com-
binations (bi+), applied to different networks (from top to bottom and left to right:
AZ, DC; GA, LUX; CHE, DEU); the NFAs used are indicated by the characters on
the lines (cf. Table 2).
Engineering Label-Constrained Shortest-Path Algorithms 35
3.0
8
2.5
6 2.0
1.5
4
1.0
0.5
Fig. 2. Speed-up with go (left) and bi (right) applied to the LUX network and C NFA,
categorized by Dijkstra rank. The x-axis denotes the (approximate) length of a path
(∞ comprises infeasible queries); in each plot, the curve joins the mean values.
1.35
1.030
1.30
1.025
1.25
1.020
1.20
1.015
1.15
1.010
1.10
1.005
1.05
1.00
1.000
Fig. 3. Reduction in the number of touched vertices and path length increase with sv,
applied to the LUX (left) and DEU (right) networks and the NFA S with α-parameters
of 2 and 50, respectively. The x-axis denotes the share of touched vertices with sv in
the number of vertices touched by go, while the y-axis denotes the path length increase.
The horizontal and vertical lines mark the respective mean values.
lengths remain exact for all but a few queries. When raising α to 2, we save just
over 80 % of touched vertices on average, but path lengths increase by around 4 %
(cf. Figure 3). The picture for the DEU network looks similar, although much
higher factors of α are needed to cause some effect: a reasonable choice seems to
be 50 (the number of touched vertices diminishes to roughly a third with path
quality almost unaffected).
2.1
P G
200000
2.0
G
150000
1.9
G
P B G
1.8
G
100000
G
G
B
1.7
P
G
50000
1.6
P B
G
B
P G
B
1.5
B
P G B
P B
B G
G B B B B B
0
0 10 20 30 40 50 0 10 20 30 40 50
linear (in fact, they appear slightly sublinear). With increasing NFA sizes (and
hence bigger product networks), speed-ups also rise: with bi search, only a small
growth is noticeable while with the go variant, the increase ranges between 1.75
(with k = 1) and 2 (with k = 50).
5 Conclusion
We have shown how to solve the regular-language-constrained shortest-path
problem using product networks composed of a graph and an NFA, and proposed
techniques to speed up point-to-point queries. In a practical implementation, all
variants were empirically tested with a variety of real-world networks and con-
straints. Goal-directed and bidirectional search are found to give good speed-ups
also for the multimodal setting. However, their performance greatly depends on
the network properties. The Sedgewick-Vitter heuristic can, especially for rail-
way graphs, take high α-parameters, while the paths found remain near-optimal.
Surprisingly, combinations with bidirectional search do not perform better than
the individual techniques. Investigating the application of k-shortest-path prob-
lems, it could be shown that the speed-up attainable increases with the size of
the NFA.
In our opinion, the most interesting questions for future research include:
adaptation and implementation of further speed-up techniques and heuristics;
comparison between implicit and explicit product network representations; and
integration of time-dependent cost functions.
Acknowledgments
The author Martin Holzer wants to give special thanks to Valentin Mihaylov
for his assistance with parts of the implementation and execution of the exper-
iments.
Engineering Label-Constrained Shortest-Path Algorithms 37
References
1. Barrett, C., Birkbigler, K., Smith, L., Loose, V., Beckman, R., Davis, J., Roberts,
D., Williams, M.: An operational description of TRANSIMS. Technical report, Los
Alamos National Laboratory (1995)
2. Barrett, C.L., Bisset, K., Holzer, M., Konjevod, G., Marathe, M.V., Wagner,
D.: Engineering the label-constrained shortest-path algorithm. Technical report,
NDSSL, Virginia Tech. (2007)
3. Barrett, C.L., Bisset, K., Jacob, R., Konjevod, G., Marathe, M.V.: Classical and
contemporary shortest path problems in road networks: Implementation and ex-
perimental analysis of the TRANSIMS router. In: Möhring, R.H., Raman, R. (eds.)
ESA 2002. LNCS, vol. 2461, pp. 126–138. Springer, Heidelberg (2002)
4. Barrett, C.L., Jacob, R., Marathe, M.V.: Formal-language-constrained path prob-
lems. SIAM J. Comput. 30(3), 809–837 (2000)
5. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische
Mathematik 1, 269–271 (1959)
6. Jacob, R., Marathe, M.V., Nagel, K.: A computational study of routing algo-
rithms for realistic transportation networks. ACM Journal of Experimental Al-
gorithms 4(6) (1999)
7. Mendelzon, A.O., Wood, P.T.: Finding regular simple paths in graph databases.
SIAM J. Comput. 24(6), 1235–1258 (1995)
8. Orda, A., Rom, R.: Shortest-path and minimum-delay algorithms in networks with
time-dependent edge-length. J. ACM 37(3), 607–625 (1990)
9. Romeuf, J.-F.: Shortest path under rational constraint. Information Processing
Letters 28, 245–248 (1988)
10. Sedgewick, R., Vitter, J.S.: Shortest paths in euclidean graphs. Algorithmica 1(1),
31–48 (1986)
11. Sherali, H.D., Jeenanunta, C., Hobeika, A.G.: Time-dependent, label-constrained
shortest path problems with applications. Transportation Science 37(3), 278–293
(2003)
12. Sherali, H.D., Jeenanunta, C., Hobeika, A.G.: The approach-dependent, time-
dependent, label-constrained shortest path problems. Networks 48(2), 57–67 (2006)
13. Yannakakis, M.: Graph-theoretic methods in database theory. In: PODS, pp. 230–
242 (1990)
New Upper Bounds on Continuous Tree
Edge-Partition Problem
1 Introduction
In this paper we consider continuous edge-partition (CEP, for short) problem on
an edge-weighted tree network T = (V (T ), E(T ), l), where V (T ) is the vertex set
and E(T ) is the edge set, and each edge e ∈ E(T ) is associated with a positive
length l(e). We refer to interior points on an edge by their distances, along the
edge, from the two endpoints of the edge. Let π(x, y) be the unique simple path
between a pair of points x and y in T and let d(x, y) denote the length of π(x, y).
For any two different points x, y on an edge e, if x and y are not the two
endpoints of e, then we call the simple path from x to y a partial edge of e. We
define the length of a subtree T of T , denoted by l(T ), to be the total length
of its edges and partial edges.
Let x be a point on an edge e : uv ∈ E(T ). A cut at x is a splitting of e into
two closed partial edges: one is from vertex u to x and the other is from x to
vertex v. A cut at an interior point of an edge is called an interior-cut. A cut at
an endpoint of an edge is called a vertex-cut. Note that a vertex cut is uniquely
defined by a vertex and an edge incident to this vertex.
Let p ≥ 2 be an integer. A p-edge-partition of T is a set of p subtrees induced
by p − 1 cuts. The max-min CEP problem is to find a p-edge-partition of T that
Research was partially supported by MITACS and NSERC.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 38–49, 2008.
c Springer-Verlag Berlin Heidelberg 2008
New Upper Bounds on Continuous Tree Edge-Partition Problem 39
maximizes the smallest length of a subtree; and the min-max CEP problem is to
find a p-edge-partition of T that minimizes the largest length of a subtree.
Recently, Lin et. al. [5] proposed O(n2 )-time algorithms for the two problems,
which improve the O(n2 log (min {p, n})) result of Halman and Tamir [4]. The
proposed algorithms of Lin et. al. [5] are based on efficiently solving a problem,
called ratio search problem. In this paper we consider a more general version of
the ratio search problem that is defined as follows.
Definition 1 (Ratio search problem). Given a positive integer q, a real num-
ber t, a non-increasing function F : R → R, a set of k non-negative real numbers
Δ = {bi , i = 1, . . . , k}, and each number bi in Δ is associated with a non-
negative integer number gi , 1 ≤ i ≤ k, compute the largest real number z in
{bi /ai , i = 1, · · · , k | ai ∈ [gi + 1, gi + q], bi ∈ Δ} such that F (z) ≥ t.
Lin et. al. [5] proposed an algorithm for the ratio search problem with uniform
value of gi = 0, i = 1, · · · , k. We present an approach that solves the ratio search
problem with the same time complexity, for non-uniform values of gi , i = 1, · · · , k.
Using our efficient algorithm for the ratio search problem, we are able to solve the
max-min CEP problem in O(n log 2 n) time, which is a substantial improvement
of the previous results. For the min-max CEP problem, the proposed algorithm
runs in time O(nhT log n), where hT is the height of the underlying tree.
The rest of the paper is organized as follows. Spine decomposition of a tree T
is reviewed in Section 1.1. Section 2 provides a sub-quadratic algorithm for the
max-min CEP problem on a tree network. The min-max problem is discussed in
Section 3. An algorithm for the ratio search problem is presented in Section 4.
Section 5 gives a brief conclusion.
In this section, an O(n log 2 n)-time algorithm for the max-min CEP problem is
presented.
∗
Let lp(1) be the length of the smallest subtree in an optimal solution to the
max-min CEP problem. For any positive real number l ≤ l(T ), define Z1 (l) to
be the largest number such that there exist an Z1 (l)-edge-partition in which the
length of each subtree is at least l. A length l is feasible in the max-min model
if Z1 (l) ≥ p, and infeasible, otherwise.
∗
Lemma 2. In the max-min model, lp(1) ≤ l(T )/p.
Lemma 3. [4] Whether a given positive length l is feasible in the max-min CEP
model can be determined in O(n) time.
Let z1∗ be the largest feasible real number in Z1 = {l(vp(v))/a|a ∈ [1, p], v ∈
V (T ) \ {rT }}. Lin et. al. [5] showed that q(v) = l(vp(v))/z1∗ .
l(vp(v)) p × l(vp(v))
q(v) = ∗ ≥ , v ∈ V \ {rT } (Lemma 2), (1)
lp(1) l(T )
p × l(vp(v))
p≤ < p + n − 1. (2)
l(T )
v∈V \{rT }
We have the following result: v∈V \{rT } (q(v) − p×l(vp(v))
l(T ) ) ≤ n − 1, by com-
bining Equation 2 and Lemma 4. It implies that 0 ≤ q(v) − p×l(vp(v)) l(T ) ≤
n − 1, v ∈ V \ {rT } (Equation 1).
In other words, z1∗ is the largest feasible real number in Z1 = {l(vp(v))/a|a ∈
[ p×l(vp(v))
l(T ) , p×l(vp(v))
l(T ) + n − 1], v ∈ V \ {rT }}. The algorithm for the ratio
search problem presented in Section 4 can be used to compute z1∗ . By using the
linear time feasibility test (Lemma 3) and the result in Theorem 3, z1∗ can be
computed in O(n log n). Therefore, we have the following lemma.
Our approach for the solution of the max-min tree edge-partition model is to
parametrically apply the linear-time feasibility test proposed by Halman and
∗
Tamir [4], using l as the single parameter, to compute Z1 (lp(1) ) without spec-
∗
ifying the value of lp(1) a priori. The approaches in [4,5] are also based on the
general parametric approach of Megiddo [7]. The main difference between our
approach and the two previous approaches [4,5] is described as follows. In their
approaches [4,5], one feasibility test is needed at each vertex. But we plan to
find all edge-partitions at all j th -level spines in an optimal solution by solving
O(log mj ) feasibility tests where mj is the number of vertices in j th -level spines,
j = 1, · · · , τ . Its details are presented in Section 2.3. Basically, we show that
the edge-partitions at j th -level spines in an optimal solution can be computed in
time O(n log n+mj log 2 mj ). Therefore, based upon Lemma 1, i.e., τ = O(log n),
the max-min CEP can be solved in O(n log 2 n) time since τj=1 mj = n.
Theorem 1. The max-min CEP problem can be solved in O(n log 2 n) time.
We assume that, for any k ∈ (j, τ ], the number of cuts at edges in k th -level
spines are known, and that the remainder of each (j + 1)th -level spine is known.
In Fig. 1, an example is demonstrated. The bold pathes are 2nd -level spines and
the dashed parts represent the remainders contributed from 3rd -level spines. We
note that the remainder from each 3rd -level spine is a 1-degree polynomial of
42 R. Benkoczi, B. Bhattacharya, and Q. Shi
rT v1 v2 v3 v4 v5 v6 v7
v10 v21 a2 − b2 × l∗
p
v11
∗ ∗
lp(1) in the form of η − κ × lp(1) where η is a positive real number and κ is a
∗
nonnegative integer number, and that each remainder is less than lp(1) .
We first merge the remainders that are attached to the same vertex. For
∗ ∗
example, in Fig. 1, two remainders η1 − κ1 × lp(1) and η2 − κ2 × lp(1) from 3rd -
level spines are attached to vertex v20 , then we
remove the two remainders and
∗
attach v20 with a new remainder 2s=1 ηs − 2s=1 κs × lp(1) . We note that now
∗
it is possible to have new remainders that are ≥ lp(1) .
Let λ be the number of j th -level spines and mj be the total number of vertices
on these j th -level spines. For each j th -level spine, i.e., Φ : {v0 , · · · , vt } (vt is the
root of Φ) in Fig. 2, we create a balanced binary tree structure over it. Before
we present the balanced binary tree structure over each j th -level spine Φ, more
notations and definitions are introduced as follows.
The edge connecting vi−1 and vi is denoted by ei , i = 1, · · · , t. We define the
∗
remainder xi of each edge ei on Φ to be l(ei ) − (q(vi−1 ) − 1) × lp(1) , i = 1, · · · , t.
∗
Note that vi is the parent of vi−1 in T and q(vi−1 ) = l(ei )/lp(1) . Therefore,
∗ ∗
0 < xi ≤ lp(1) . We continue with the hypothesis that 0 < xi < lp(1) . For each
i, 1 ≤ i < t, we denote by yi the remainder attached to vertex vi (after merging
remainders of (j + 1)th -level spines).
∗
All xi ’s and yi ’s are in the form of η − κ × lp(1) where η is a positive real
∗
number and κ is a nonnegative integer number. Let xi = ηi − κi × lp(1) and
∗
yk = ηk − κk × lp(1) where i = 1, · · · , t and k = 1, · · · , t − 1 (yt is undefined).
Fig. 2 demonstrates a balanced binary tree structure over a spine Φ, denoted
by TΦ , where the vertices on Φ are leaves of TΦ . We denote by Tu the subtree
TΦ
u3 a (j − 1)th -level spine
u1 u2
x1 x2 x3 x4 x5 xt
Φ e1 e2
v0 v1 v2 v3 v4 v5 vt
y1 y2 y3 y4 y5
Let A be the set of constant parts of all these z(·, ·) 1-degree polynomials. As
we know, each ηi in A is associated with a nonnegative integer κi . According to
∗ ∗
Lemma 7, κi × lp(1) < ηi < (κi + n) × lp(1) for each ηi ∈ A. For each η ∈ A,
let q(η) be the smallest positive integer s.t. η/q(η) is feasible. In other words,
∗
q(η) = η/lp(1) .
∗
Let z2 be the largest feasible real number in Z2 = {ηi /fi |ηi ∈ A, fi ∈
[κi + 1, κi + n]}. We obtain that q(η) = η/z2∗ , for each η ∈ A [5]. Ac-
cording to Theorem 3 and Lemma 3, z2∗ can be computed in O(n log n) since
|A| = O(mj log mj ). Therefore, all q(η) (η ∈ A) can be computed in O(n log n)
time.
Definition of Zr and Zr : For each vertex vi in V (Tu ), we let zr (u, i) be the re-
mainder of z(u, i) and let zr (u, i) be yi + zr (u, i), i.e., if z(u, i) = η − κ × lp(1)
∗
then
∗ ∗
zr (u, i) = z(u, i) − (q(η) − κ − 1) × lp(1). Clearly, 0 < zr (u, i) ≤ lp(1) . We continue
∗
with the hypothesis that 0 < zr (u, i) < lp(1) . We define Zr (resp. Zr ) to be the
∗
set of these zr (·, ·) (resp. zr (·, ·)) 1-degree polynomials with unknown lp(1) .
Sort Elements in the Sets Zr , Zr , Zr : Obviously, each of Zr , Zr , and Zr is of size
O(mj log mj ). A comparison between two 1-degree polynomials with unknown
44 R. Benkoczi, B. Bhattacharya, and Q. Shi
u1
∗
lp(1) can be resolved by solving one feasibility test. Under Valiant’s comparison
model [8], all the zr (·, ·) (resp. zr (·, ·), zr (·, ·)) can be sorted in O(n log 2 mj ) time
by applying Megiddo’s parametric-searching technique [7].
Actually, this sorting step can be speeded up by applying the result of Cole
[3]. In this way, the sorting can be done in time O(n log mj + mj log 2 mj ).
Finally, we have the following lemma.
Lemma 8. The computation and sorting of elements of Zr , Zr , Zr , that is, the
preprocessing step for computing edge-partitions at all j th -level spines, can be
done in time O(n log n + mj log 2 mj ), 1 ≤ j ≤ τ .
ei ek+1
xi−1 xi xl xk xk+1 xt
Φ
v0 vi−1 vi vl vk vk+1 vt
yi−1 yi yl yk yk+1
Fig. 4. Lemma 9 shows a property about the next vertex-cut on vertex vk and edge
ek+1 after vertex-cut on vertex vi−1 and edge ei
New Upper Bounds on Continuous Tree Edge-Partition Problem 45
and
k k−1
(xs + ys ) (xs + ys ) + xk
s=i
∗ > s=i
∗ .
lp(1) lp(1)
Lemma 9 says that we can find all vertex-cuts on a j th -level spine Φ one by one,
starting from v0 (we can assume that there is a vertex-cut on v0 and e1 since v0
is a leaf vertex in T ). However, this approach is inefficient and its running time
is O(mj n) (in worst case, we need to solve O(mj ) feasibility tests).
In order to improve the running time of computing vertex-cuts on all j th -
level spines, we propose a parallel approach that is described as follows. We first
describe an algorithm to compute the next vertex-cut for a vertex vi in a j th -
level spine Φ : {v0 , · · · , vt } (0 ≤ i < t − 1) with the assumption that there is a
vertex-cut on vi and ei+1 , and then present our parallel approach to compute
next vertex-cuts for all vertices in j th -level spines.
Computing the next vertex-cut for a vertex vi : refer to Fig. 3. There are
O(log mj ) subtrees of TΦ containing all the vertices in path π(vi+1 , vt−1 ), i.e.,
Tu1 , · · · , Tuh (Iu1 = i+1 < Iu2 < · · · < Iuh < t). For each subtree Tus , 1 ≤ s ≤ h,
we locate the first vertex vk ∈ V (Tus ) s.t. the following condition is satisfied.
k k−1
a=i+1 (xa + ya ) a=i+1 (xa + ya ) + xk
C1: ∗ > ∗ .
lp(1) lp(1)
Note that we might not be able to find such a vertex in some subtrees. If such
vertex does not exist for any subtree Tus , 1 ≤ s ≤ h, then next vertex-cut does
not exist after vi on spine Φ. Otherwise, let Tus1 be the first subtree in which
such type of vertex, say vi1 , does exist. It is not difficult to see that the next
vertex-cut after vi will be on vertex vi1 and edge ei1+1 .
We next show an approach to locate the first vertex vk ∈ V (Tus ) (1 ≤ s ≤ h)
s.t. C1 is satisfied.
We depict important information of vertices in V (Tus ), 1 ≤ s ≤ h, using a
two-dimensional diagram (see Fig. 5). For each vk ∈ V (Tus ), the horizontal co-
ordinate of vk in the two-dimensional diagram corresponds to zr (us , k) and the
vertical coordinate of vk corresponds to zr (us , k). Note that these zr (us , ·) and
zr (us , ·) values are 1-degree polynomials and are already sorted in the prepro-
cessing step.
We denote by I the region in the two-dimensional diagram that contains all
∗
points whose horizontal coordinates are in [0, lp(1) − zr (us , i)] and whose vertical
∗
coordinates are in (lp(1) − zr (us , i), ∞). We denote by II the region in the two-
dimensional diagram that contains all points whose horizontal coordinates are in
∗
(lp(1) − zr (us , i), ∞) and whose vertical coordinates are in (2lp(1)
∗
− zr (us , i), ∞).
Lemma 10. Suppose that there is no vertex-cut in π(vi+1 , vIs −1 ). Then, there
is a vertex-cut in π(vIs , vIs+1 −1 ) if and only if I ∪ II contains at least one point.
Also, if points exist in I ∪ II, let i1 be the smallest index among them, then the
first vertex-cut in π(vIs , vIs+1 −1 ) is on vertex vi1 and edge ei1+1 .
46 R. Benkoczi, B. Bhattacharya, and Q. Shi
zr (us , i)
2l∗ II
p − zr (us , k)
I vi ∈ V (Tus )
l∗
p − zr (us , k)
zr (us , i)
0 l∗
p − zr (us , k)
Using priority search tree structure [6] to maintain the two-dimensional diagram
for subtree Tus , we can check if there exists a vertex-cut and locate it if exists
after O(|V (Tus )|) ⊆ O(log mj ) comparisons between 1-degree polynomials with
∗
unknown lp(1) (one feasibility test needs to be resolved for each comparison). We
note that the vertical and horizontal coordinates of points are 1-degree polyno-
mials and are already sorted in the preprocessing step. Hence, we are able to
create the priority search tree in O(|V (Tus )| log |V (Tus )|) time [6].
Computing next vertex-cuts for vertices in j th -level spines: Since it is ineffi-
cient to locate vertex-cuts one by one, in order to speed up the computation,
we can compute them in a parallel way. For each vertex v in a j th -level spine,
we need to locate candidates for its next vertex-cut among O(log mj ) subtrees.
As shown above, a candidate in a subtree (for v) can be computed in O(log mj )
steps where each step is a comparison between two 1-degree polynomials with
∗
unknown lp(1) .
Therefore, the computation of all possible vertex-cuts can be done in O(log mj )
parallel steps by using O(mj log mj ) processors (there are O(log mj ) processors
associated with each vertex), where each step is a comparison between two 1-
∗
degree polynomials with unknown lp(1) . By applying the idea of Cole [3], the
computation can be done in time O(n log mj + mj log 2 mj ).
Unfortunately, we cannot use the same approach to solve the min-max CEP
problem as the one for the max-min CEP problem. However, from the linear-
time feasibility test [4] for the min-max problem, we can see that all current
cluster vertices can be handled in a parallel way. Due to page restrictions our
algorithm to compute the edge-partitions at all current cluster vertices in an
optimal solution, by solving logarithmic feasibility tests, is omitted here.
We have the following result for the min-max CEP problem.
In this section we propose an algorithm for the ratio search problem (see Defini-
tion 1). Let a∗ , b∗ be numbers s.t. b∗ ∈ Δ, a∗ is an integer number in [g ∗ +1, g ∗ +q]
(g ∗ is the value associated with b∗ ), and z ∗ = b∗ /a∗ . Without loss of any gener-
ality, we assume that F (0) ≥ t.
Notation Δ : Let Δ be the subset of Δ s.t. F (bi /(gi + q)) ≥ t for any bi ∈ Δ .
Clearly, b∗ ∈ Δ since F (·) is non-increasing function. For each bi ∈ Δ , we
denote by a(bi ) the smallest integer number in [gi +1, gi +q] with F (b/a(bi )) ≥ t.
Notations Δ1 , Δ2 : Let Δ1 = {bi |a(bi ) > gi + 1, bi ∈ Δ } and let Δ2 = Δ \ Δ1 .
Obviously, F (bi /(gi + 1)) ≥ t for any bi ∈ Δ2 , but, F (bi /(gi + 1)) < t for any
bi ∈ Δ1 . We can identify the elements in Δ1 and Δ2 by sorting the elements in
Δ and evaluating values of F (·) for O(log |Δ |) elements in Δ .
Notation z2∗ : Let z2∗ = maxbi ∈Δ2 bi /(gi + 1). It is trivial to see that z ∗ ≥ z2∗
since F (z2∗ ) ≥ t. In the following, we assume that z ∗ > z2∗ .
The Case When z ∗ > z2∗ In this case, b∗ must be in Δ1 . We define kb (z) = b/z
for each b ∈ Δ1 where z is a parameter in (0, ∞). Let f (z) = b∈Δ kb (z). We
1
observe that f (z) is a step function with jumps, including the jump point at z ∗ .
Notations a , z : Let a be the smallest integer number s.t. F (( b∈Δ b)/a ) ≥
1
t. Let z = ( b∈Δ b)/a .
1
Lemma 11. bi ∈Δ1 gi + |Δ1 | < a ≤ bi ∈Δ1 gi + q × |Δ1 |.
Since there are at most (q − 1) × |Δ1 | candidate integer values for a (Lemma
11), we are able to compute a in time O(k + tF × (log q + log k)) (note that
|Δ1 | ≤ k).
48 R. Benkoczi, B. Bhattacharya, and Q. Shi
For any b ∈ Δ1 , we can see that b/a(b) < ( bi ∈Δ bi )/(a − 1) since
1
F (( bi ∈Δ bi )/(a − 1)) < t and F (b/a(b)) ≥ t. Similarly, for any b ∈ Δ1 ,
1
z < b/(a(b) − 1) since F (z ) ≥t and F (b/(a(b) − 1)) < t (note that a(b) > 1).
For any b ∈ Δ1 , b/a(b) < ( bi ∈Δ bi )/(a − 1) ⇒ a(b) > b(a − 1)/ bi ∈Δ bi
1 1
⇒ a(b) > (b/z ) − 1 (since z = ( b∈Δ b)/a ); and z < b/(a(b) − 1) ⇒ a(b) <
1
(b/z ) + 1. Therefore, (b/z ) − 1 < a(b) < (b/z ) + 1 for any b ∈ Δ1 . We note
that a(b) is an integer number and then there are at most two integer numbers
between (b/z ) − 1 and (b/z ) + 1 (not including (b/z ) − 1, (b/z ) + 1), denoted
by a1b and a2b . It is not difficult to see that z ∗ is in the set {b/a1b , b/a2b |b ∈ Δ1 } if
z ∗ > z2∗ .
The finding can be done by using the prune-and-search technique. First, we
compute the median x of the numbers in {b/a1b , b/a2b |b ∈ Δ1 } by the linear-time
select algorithm in [2]. If F (x) ≥ t we prune away all numbers smaller than x
in this set; otherwise, we prune away all numbers larger than x. The process is
repeated on the remaining numbers. Note that the size of this set is no more
than 2|Δ1 | ≤ 2k. Therefore, the above finding of the largest real number z3∗ in
{b/a1b , b/a2b |b ∈ Δ1 } such that F (z3∗ ) ≥ t requires O(k + tF × log k) time.
Based upon the above discussion, an algorithm for the ratio search problem
is presented as follows (Algorithm 1).
Algorithm 1. Ratio-Search(q, F, t, Δ)
Input: an integer q > 0, a non-increasing function F, a real number t, a set Δ of k non-
negative real numbers, and each real number bi in Δ is associated with a nonnegative
integer gi , i = 1, · · · , k.
Output: the largest real number z in {bi /ai |ai ∈ [gi + 1, gi + q], bi ∈ Δ} such that
F(z) ≥ t.
begin
1: b ← the largest number in {bi /(gi + q)|bi ∈ Δ} s.t. F(b ) ≥ t.
2: Δ ← the subset of Δ that contains all the numbers bi ∈ Δ with bi /(gi + q) ≤ b .
3: z2∗ ← the largest real number in {bi /(gi + 1)|bi ∈ Δ } ∪ {0} s.t. F(z2∗ ) ≥ t.
4: Δ1 ← the subset of Δ that contains all the ∗
numbers bi ∈ Δ with bi /(gi + 1) > z2 .
5: a ← the smallest integer number s.t. F(( b∈Δ b)/a ) ≥ t.
1
6: z ← ( b∈Δ b)/a .
1
7: a1b , a2b ← the two integers between (b/z ) − 1 and (b/z ) + 1, for each b ∈ Δ1 .
8: z3∗ ← the largest real number in {b/a1b , b/a2b |b ∈ Δ1 } such that F(z3∗ ) ≥ t.
9: return max {z2∗ , z3∗ }.
end
Theorem 3. The ratio search problem can be solved in time O(k + tF × (log q +
log k)).
5 Summary
In this paper we study continuous tree p-edge-partition problems on a tree net-
work, and propose efficient algorithms for the max-min and min-max problems.
Similar to the approaches developed in [4,5], our approaches are also based
on the general parametric approach of Megiddo [7]. The main difference is that
in their approaches one feasibility test is needed at each vertex. However, in
our approach for the max-min problem, we build a spine tree decomposition
structure [1] over the underlying tree and locate edge-partitions at all the spines
at the same level by solving logarithmic feasibility tests. In our approach for the
min-max problem, we locate the edge-partitions at all current cluster vertices by
solving logarithmic feasibility tests. In this way, we are able to solve the max-
min problem in sub-quadratic time and to solve the min-max problem in time
O(nhT log n).
In [4], Halman and Tamir mentioned that their algorithms for the continu-
ous tree p-edge-partition problems can be extended to yield polynomial algo-
rithms of the same complexity for the problems in cactus networks, that is,
O(n2 log (min {p, n})). We conjecture that our algorithms for tree networks can
also be extended to cactus networks.
References
1. Benkoczi, R.: Cardinality constrainted facility location problems in trees, Ph.D.
Thesis, School of computing secience, SFU, Canada (2004)
2. Blum, M., Floyd, R.W., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. J.
Comput. Sys. Sci. 7(4), 448–461 (1973)
3. Cole, R.: Slowing down sorting networks to obtain faster sorting algorithms. J.
ACM 34, 200–208 (1987)
4. Halman, N., Tamir, A.: Continuous bottleneck tree partitioning problems. Disc.
App. Math. 140, 185–206 (2004)
5. Lin, J.-J., Chan, C.-Y., Wang, B.-F.: Improved algorithms for the continuous tree
edge-partition problems. Disc. App. Math. (submitted, 2007)
6. McCreight, E.M.: Priority search trees. SIAM J. Comput. 14(2), 257–276 (1985)
7. Megiddo, N.: Applying parallel computation algorithms in the design of serial algo-
rithms. J. ACM 30(4), 852–865 (1983)
8. Valiant, L.G.: Parallelism in comparison problems. SIAM J. Comput. 4, 348–355
(1975)
A Meeting Scheduling Problem
Respecting Time and Space
1 Introduction
We consider the following problem: A set of people, called participants, would like
to schedule a meeting. The participants are located at different sites and would
like to find a common point for the meeting to be held. These sites are rather
far from each other, so that the travel times to the meeting point are important.
We assume that the travel distances between locations can be measured using
the Euclidean distance in the plane.
Participants have individual schedules which specify: the earliest possible time
they can leave their current location and the latest possible time they must arrive
at their next location. We wish to solve the problem of finding a meeting point
so that the time for all participants to meet is maximized.
Our general objective for this research is to derive efficient algorithms for solv-
ing general meeting scheduling problems, to find approximate solutions, where
appropriate, to implement our solutions, and to integrate them into applica-
tions that allow users who are connected over a network to schedule meetings.
Currently meeting scheduling systems take into consideration only time and not
location/geometry, see e.g. [1,6].
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 50–59, 2008.
c Springer-Verlag Berlin Heidelberg 2008
A Meeting Scheduling Problem Respecting Time and Space 51
2 Problem Definition
We assume a situation where all participants can travel at the same, constant
speed v in the plane. Since the precise value of v is not critical, we may as well
assume that v = 1 holds. Then, the time it takes to travel from location l to
location l is given by the Euclidean distance l − l .
Let M := {M1 , . . . , Mn } denote the set of participants. The ith participant
pre pre
Mi has a previous meeting at location li ∈ R2 that lasts until time ti ∈ R.
He is due for a subsequent meeting that starts at time tisub ∈ R at location
lisub ∈ R2 .
We want to schedule a meeting of longest possible duration in between the
previous and subsequent meetings of all participants (or report that no such
meeting is possible).
To solve our problem, we have to find a location x ∈ R2 such that the time
interval between the arrival of the last participants from their previous meetings
at time
pre pre
S(x) := max ti + li − x
1≤i≤n
is maximized.
We define f (x) := E(x) − S(x). Of course, no common meeting is possible at
locations x with f (x) < 0, but we can easily check this condition once we have
computed a location maximizing f .
In the following, we can assume that there is a solution x with f (x) > 0,
because the optimum meeting points are not changed if we increase f by a
pre
constant. For example, if we define c := f (l1 )−1 and replace all tsub
i values by
sub
ti −c, this leads to a transformed instance where a meeting of positive duration
pre
is possible, because all participants can meet for one time unit at location l1 .
If we can find an optimum solution for the transformed instance, this also leads
to an optimum solution for the original instance.
As an example for the meeting scheduling problem, we consider the following
instance, where every participant has to return to the point of his previous
meeting: ∀i : 1 ≤ i ≤ n
pre
– li = lisub
pre
– ti = 0
pre pre
– tsub
i = C := 1 + 2 max2≤j≤n l1 − lj
pre
The way we have chosen C ensures that f (l1 ) = 1, so there are feasible lo-
cations for the new meeting. The best one can do for this instance is to find a
52 F. Berger et al.
location where the participants can arrive earliest, because of the symmetry this
will also be a location where they can stay longest.
Every participant can reach the location x at time S(x). This means that
pre
all li are within a circle with midpoint x and radius S(x). The center of the
pre
Smallest Enclosing Disk of the li corresponds to the optimum solution.
There is a randomized algorithm for computing the smallest enclosing disk of
n points in the plane with expected running time O(n), see Welzl [8]. LP-type
problems, introduced by Sharir and Welzl [7], build an abstract framework for
Welzl’s algorithm for the smallest enclosing disk. We will use this concept for
developing the algorithm in Section 4.
pre
pre
t1 l2
pre
l1
x
π
Fig. 1. PRE is the intersection of upward cones with apex angle 2
A Meeting Scheduling Problem Respecting Time and Space 53
4 The LP-Approach
In this section, we provide a solution to the meeting scheduling problem using
the concept of LP-type problems. We will show that the problem can be stated
as an LP-type problem and its dimension equals 4. This enables us to compute
a meeting of longest duration for n participants in expected time O(n).
Fig. 2. Axiom 2 does not hold for the participants M1 , M2 , M3 , if we use x → f (x) as
objective function. For the sets F := {M1 }, G := {M1 , M2 } and h := M3 , we obtain
w(F ) = w(G) = 1 and w(G ∪ {h}) < w(G), but 1 = w(F ∪ {h}) = w(F ).
A Meeting Scheduling Problem Respecting Time and Space 55
(x2, E(x2))
BE
(x2, S(x2))
(x1, E(x1)) BS
(x1, S(x1))
Proof. We have to show that every 3 locations maximizing f are collinear. Let
x1 , x2 , x3 denote locations maximizing f , such that S(x1 ) ≤ S(x2 ) ≤ S(x3 ). By
Lemma 1, we conclude x3 − x1 = S(x3 ) − S(x1 ) = S(x3 ) − S(x2 ) + S(x2 ) −
S(x1 ) = x3 − x2 + x2 − x1 . So, the triangle inequality holds with equality,
which means that x1 , x2 , x3 are collinear.
Proof. Let x1 and x2 denote distinct points where f obtains its maximum and let
BS , BE and PRE j be defined as in the proof of Lemma 1. An analogous argument
to the one showing that BS ⊂ ∂PRE j leads to the fact that there is a downward
cone SUB k such that BE ⊂ ∂SUB k . The optimum meeting duration T is obtained
pre
for a subset of the line segment lj lksub . But even a 2-participant-meeting just
of Mj and Mk has maximum duration T . If j = k, which is also possible, the
maximum meeting duration is already determined by only one participant.
Now, we have to look at the dimension of the problem. Figure 4 shows that the
dimension is at least 4.
The proof that the dimension of the problem is at most 4 uses Helly’s theorem.
A similar argument using Helly’s theorem for a related question concerning the
weighted Euclidean 1-center problem is described by Megiddo [4].
Theorem 2 (Helly’s Theorem [5]). Let C1 , . . . , Cn be convex sets in Rd ,
n ≥ d + 1. Suppose that the intersection of every d + 1 of these sets is nonempty.
Then the intersection of all the Ci is nonempty.
Proof. Let us assume that B = {Mi1 , . . . , Mib } is a basis and b = |B| > 4 holds.
For every 4-element subset W of {PRE i1 ∩ SUB i1 , . . . , PRE ib ∩ SUB ib }, let TW
A Meeting Scheduling Problem Respecting Time and Space 57
tpre
2 = −2, tsub
2 =2 l3pre = l3sub = (1, 1)
l2pre = l2sub = (0, 1) tpre
3 = 0, tsub
3 =4
Fig. 4. Set of 4 participants {M1 , M2 , M3 , M4 } and their way to the optimum meeting
location. The start of their optimum meeting is determined by participants M1 and
M3 , while the end is determined by M2 and M4 . Removing any participant enables a
meeting with longer duration. If one, for example, removes participant M1 , the optimum
meeting location becomes (1, 1) and the duration of the optimum meeting increases by
√
2 − 1.
denote the maximum length of a vertical segment in the intersection of the sets
in W . Note that, by the assumption that there is a solution with f (x) > 0,
we know that the intersection of the sets in W is nonempty for every W . We
define T to be the minimum TW obtained for all possibilities of W . Clearly, T
is an upper bound on the length T of a maximum vertical line segment con-
tained in the set of feasible points for the participants in B. In fact, we can even
show that T = T holds. To this end, let SUB ik denote the vertical cone with
apex angle π whose uppermost point is its apex ((lsub ) , (lsub ) , tsub − T ) for
2 ik X ik Y ik
1 ≤ k ≤ b. We observe that all sets in {PRE i1 ∩ SUB i1 , . . . , PRE ib ∩ SUB ib }
are convex and, by definition of T , the intersection of every 4 of them is
nonempty. By Helly’s theorem, this implies that the intersection of all sets in
{PRE i1 ∩ SUB i1 , . . . , PRE ib ∩ SUB ib } is nonempty. But a point in this intersec-
tion corresponds to a vertical line segment of length at least T in the intersection
of the original cones {PRE i1 , . . . , PRE ib , SUB i1 , . . . , SUB ib }. This means, that
T ≥ T and together with T ≤ T we conclude that T = T holds.
Let V denote a 4-element subset of B such that f |V and f |B obtain the same
value as maximum. If f |V obtains its maximum only in one single point x∗ ,
this point must be the optimum meeting point for V as well as for B. But in
this case S|V (x∗ ) = S|B (x∗ ) holds, which means OPT V = OPT B and we get
contradiction to B being a basis.
So, we must consider the case that f |V obtains its maximum in more than
one point. By Lemma 3, there is a subset Z ⊂ V of at most 2 participants
58 F. Berger et al.
such that f |Z , f |V and f |B obtain the same value as maximum. Let xZ denote
the optimum meeting location for the participants in Z and xB the optimum
meeting location for the participants in B. If xZ = xB , we are done.
By Lemma 2, already the participants in Z can schedule meetings of maximum
duration only in locations on the line through xB and xZ . This means, we can
restrict our examination to the plane containing the vertical segments at xB and
xZ . Figure 5 shows the curves resulting from intersecting this plane with the
downward cones corresponding to participants in B \ Z. Since all participants
in B can reach xB at S|Z (xB ), they can also reach xZ at S|Z (xB ) + xZ − xB ,
which equals SZ (xZ ) by Lemma 1. Hence, the upward cones corresponding to
participants of B \ Z are not important.
Fig. 5. The longest meeting duration that is possible for the participants in Z is the
same as for the participants in B. The dotted curves correspond to downward cones in
B \ Z.
The paper addresses the problem which is finding a suitable place and time for
a group of people to meet. By taking into consideration both time and space
limitations of the participants, this paper distinguishes itself from the current
practice of scheduling meetings only based on time limitations. We have seen
that the problem we consider turned out to be an LP-type problem of small
dimension.
One interesting problem we are currently working on is the following: Given
a set of n participants and a parameter k, find a meeting point which maximizes
the duration for a meeting of at least n − k participants. An optimum meeting
for all except k participants can be found by inspecting the optimum meeting
point for every subset of 4 participants, but we would like to find a fast algo-
rithm. However, a subquadratic solution in the full range of k seems unlikely,
because Matoušek [3] mentions that already the problem to find the smallest
circle enclosing at least q points of a set of n points in the plane, is 3SUM-hard.
The techniques described in this paper appear to be generalizable to the
setting of different speeds among participants. We are currently examining this
problem instance.
References
1. BenHassine, A., Ho, T.: An agent-based approach to solve dynamic meeting
scheduling problems with preferences. Engineering Applications of Artificial Intelli-
gence 20(6), 857–873 (2007)
2. Klein, R., Yi, J., Nussbaum, D., Sack, J.-R.: How to Fit in another Meeting. In: 2nd
International Conference on Collaborative Computing (CollaborateCom 2006), At-
lanta, November 2006, IEEE, Los Alamitos (2006), http://ieeexplore.ieee.org
3. Matoušek, J.: On Geometric Optimization with Few Violated Constraints. In: Sym-
posium on Computational Geometry, pp. 312–321 (1994)
4. Megiddo, N.: The weighted Euclidean 1-center problem. Math. Oper. Res. 8, 498–
504 (1983)
5. Radon, J.: Mengen konvexer Körper, die einen gemeinsamen Punkt enthalten. Math.
Ann. 83, 113–115 (1921)
6. Shakshuki, E., Koo, H.-H., Benoit, D., Silver, D.: A distributed multi-agent meeting
scheduler. Journal of Computer and System Sciences 74(2), 279–296 (2008)
7. Sharir, M., Welzl, E.: A combinatorial bound for linear programming and related
problems. In: Finkel, A., Jantzen, M. (eds.) STACS 1992. LNCS, vol. 577, pp. 569–
579. Springer, Heidelberg (1992)
8. Welzl, E.: Smallest enclosing disks (balls and ellipsoids). In: Maurer, H.A. (ed.)
New Results and New Trends in Computer Science. LNCS, vol. 555, pp. 359–370.
Springer, Heidelberg (1991)
Fixed-Parameter Algorithms for Kemeny Scores
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 60–71, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Fixed-Parameter Algorithms for Kemeny Scores 61
m candidates. A vote is a preference list of the candidates, that is, for each
voter the candidates are ordered according to preference. For instance, in case
of three candidates a, b, c, the order c > b > a would mean that candidate c
is the best-liked one and candidate a is the least-liked one for this voter.1 A
“Kemeny consensus” is a preference list that is “closest” to the preference lists
of the voters: For each pair of votes p, q, the so-called Kendall-Tau distance (KT-
distance for short) between p and q, also known as the number of inversions
between two permutations, is defined as dist(p, q) = {c,d}⊆C dp,q (c, d), where
the sum is taken over all unordered pairs {c, d} of candidates, and dp,q (c, d) is 0
if p and q rank c and d in the same order, and 1 otherwise. Using divide and
conquer, the KT-distance can be computed in O(m · log m) time. The score of a
preference list l with respect to an election (V, C) is defined as v∈V dist(l, v). A
preference
list l with the minimum score is called Kemeny consensus of (V, C) and
its score v∈V dist(l, v) is the Kemeny score of (V, C). The problem considered
in this work is as follows:
Kemeny Score
Input: An election (V, C) and a positive integer k.
Question: Is the Kemeny score of (V, C) at most k?
Clearly, in applications we are mostly interested in computing a Kemeny con-
sensus of a given election. All our algorithms that decide the Kemeny Score
problem actually provide a corresponding Kemeny consensus.
Known results. We summarize the state of the art concerning the computa-
tional complexity of Kemeny Score. Bartholdi et al. [2] showed that Kemeny
Score is NP-complete, and it remains so even when restricted to instances with
only four votes [8,9]. Given the computational hardness of Kemeny Score
on the one side and its practical relevance on the other side, polynomial-time
approximation algorithms have been studied. Thus, the Kemeny score can be
approximated to a factor of 8/5 by a deterministic algorithm [16] and to a factor
of 11/7 by a randomized algorithm [1]. Recently, a (theoretical) PTAS result
has been obtained [12]. Conitzer, Davenport, and Kalagnanam [6,5] performed
computational studies for the efficient exact computation of a Kemeny consen-
sus, using heuristic approaches such as greedy and branch and bound. Finally,
note that Hemaspaandra et al. [11] provided further, exact classifications of the
computational complexity of Kemeny elections.
Our results. As pointed out by Conitzer et al. [5], for obvious reasons approx-
imate solutions for election problems such as Kemeny Score may be of limited
interest. Hence, exact solutions are of particular relevance in this context. Given
the NP-completeness of the problem, however, it seems inevitable to live with
exponential-time algorithms for solving Kemeny Score. Fortunately, parame-
terized complexity analysis as pioneered by Downey and Fellows [7,10,13] seems
a fruitful approach here. This will be shown by positive results based on three
natural parameterizations. Before that, note that studying the parameter “num-
ber of votes” is pointless because, as mentioned before, the problem is already
1
Some definitions also allow ties between candidates—we deal with this later.
62 N. Betzler et al.
NP-complete for only four votes. First of all, using the Kemeny score k itself as
the parameter, we derive an algorithm solving Kemeny Score in O(1.53k +
m2 n) time, where n := |V | and m := |C|. This algorithm is based on a problem
kernelization and a depth-bounded search tree. Further, we introduce a struc-
tural parameterization by studying the parameter “maximum KT-distance d
between any two input votes”. Note that in application scenarios such as meta
search engines small d-values may be plausible. We show that Kemeny Score
can be solved in O((3d + 1)! · d · log d · m · n) time by a dynamic program-
ming approach. Eventually, note that by trying all possible permutations of the
m candidates, we can trivially attain an efficient algorithm if m is very small.
The corresponding combinatorial explosion m! in the parameter m is fairly large,
though. Using dynamic programming, we can improve this to an algorithm run-
ning in O(2m ·m2 ·n) time. Finally, we extend our findings to the cases where ties
within votes are allowed and to incomplete votes where not all candidates are
ranked. Due to the lack of space, several proofs are deferred to the full version.
2 Preliminaries
We refer to the introductory section for some basic definitions concerning (Ke-
meny) elections. Almost all further concepts are introduced where needed. Hence,
here we restrict ourselves to concepts of “general” importance. Let the position
of a candidate a in a vote v be the number of candidates that are better than a
in v. That is, the leftmost (and best) candidate in v has position 0 and the
rightmost has position m − 1. Then, posv (a) denotes the position of candidate a
in v. Moreover, we say that two candidates a and b form a dirty pair if in V
there is one vote with a > b and another vote with b > a.
We briefly introduce the relevant notions of parameterized complexity the-
ory [7,10,13]. Parameterized algorithmics aims at a multivariate complexity anal-
ysis of problems. This is done by studying relevant problem parameters and their
influence on the computational complexity of problems. The hope lies in accept-
ing the seemingly inevitable combinatorial explosion for NP-hard problems, but
confining it to the parameter. Hence, the decisive question is whether a given
parameterized problem is fixed-parameter tractable (FPT) with respect to the
parameter, say k. In other words, here we ask for the existence of a solving algo-
rithm with running time f (k) · poly(n, m) for some computational function f . A
core tool in the development of fixed-parameter algorithms is polynomial-time
preprocessing by data reduction rules, often yielding a kernelization. Herein, the
goal is, given any problem instance x with parameter k, to transform it in poly-
nomial time into a new instance x with parameter k such that the size of x is
bounded from above by some function only depending on k, k ≤ k, and (x, k)
is a yes-instance if and only if (x , k ) is a yes-instance. We call a data reduction
rule sound if the new instance after an application of this rule is a yes-instance
iff the original instance is a yes-instance. We also employ search trees for our
fixed-parameter algorithms. Search tree algorithms work in a recursive manner.
The number of recursion calls is the number of nodes in the according tree. This
Fixed-Parameter Algorithms for Kemeny Scores 63
Next, we apply a data reduction rule to get rid of too many identical votes.
Rule 2. If there are more than k votes in V identical to a preference list l, then
return “yes” if the score of l is at most k; otherwise, return “no”.
– b > a > c,
– a > b > c, and
– a > c > b.
For each of these subcases, we add the pairwise orders induced by them into L
if they are consistent for all three pairs and discard the subcase, otherwise. The
worst-case branching vector here is (3, 3, 2), giving a branching number 1.53.
If c > a is in L, then we also get the branching vector (3, 3, 2) by branching
into the following three further subcases:
– b > c > a,
– c > b > a, and
– c > a > b.
Case 3. If there is no dirty triple but at least one dirty pair (a, b) in D, then
check whether there exists some relative order between a and b implied by L:
If L implies no order between a and b, then add an order between a and b to L
that occurs in at least half of the given votes; otherwise, we add the implied
order to L. Finally, decrease the parameter k according to the number of votes
having a and b oppositely ordered compared to the one added to L.
The search tree algorithm outputs “yes” if it arrives at a node with D = ∅ and
a parameter value k ≥ 0; otherwise, it outputs “no”. Observe that a Kemeny
consensus is then the full order implied by L at a node with D = ∅.
Combining this search tree algorithm with the kernelization given in Sec-
tion 3.1, we arrive at the main theorem of this section.
Theorem 2. Kemeny Score can be solved in O(1.53k + m2 n) time, where k
denotes the Kemeny score of the given election.
Observe that the search tree algorithm also works for instances in which the votes
are weighted by positive integers. If the votes have arbitrary positive weights, we
can use the dynamic programming algorithm that is described in the following
section.
The Kemeny score of some instances might be quite large. So, we consider a fur-
ther parameterization, now with the maximum KT-distance d between any two
given votes as the parameter. Formally, d := maxp,q∈V {dist(p, q)}. We describe
a dynamic programming fixed-parameter algorithm for this parameterization.
To this end, we need the following definitions:
A block of size s with start position p denotes the set of candidates a satis-
fying p ≤ posv (a) ≤ p + s − 1 for at least one v ∈ V . By block(p) we denote a
block of size d + 1 with start position p. With a subvote vC of a vote v restricted
to a subset C ⊆ C we mean the order of the candidates in C such that the
66 N. Betzler et al.
Proof. Consider a candidate a and two votes v and w. Assume that posv (a) = p
and posw (a) ≥ p + d + 1. Then, in w there are at least p + d + 1 candidates
that are better than a, and in v there are p candidates that are better than a.
Therefore, there are at least d + 1 candidates that are ranked higher than a in w
and lower than a in v. This means that the KT-distance between v and w is at
least d + 1, a contradiction.
Basic Idea. For designing the algorithm we exploit that blocks of size d + 1
can be used to decompose an election when computing the Kemeny score. More
precisely, consider a block(i) of size d+ 1, then any candidate a with a ∈ / block(i)
must fulfill either posv (a) < i for all v ∈ V or posv (a) > i + d + 1 for all v ∈ V .
Further, we can show that there is a Kemeny consensus in which a must have a
position in a range that is a function of d. This means that, if we iterate from
left to right over the votes and store the Kemeny score for all “partial orders”
of the candidates of a block, then we can forget all candidates that appear only
left of this block.
Roughly speaking, our algorithm works as follows: It iterates from left to right
over the votes and, in each iterative step, considers a block of size d + 1. That
is, in the first iterative step, the initialization, it considers all possible orders of
the candidates of block(0) and uses a table to store the scores of all such orders
with respect to the subinstance of (V, C) restricted to block(0). Then, in the
following iterations, it considers block(i) with i ≥ 1. The computation of the
score of the orders of block(i) is based on the table entries for block(i − 1). The
Kemeny score of (V, C) is the minimum of the entries for block(m − d − 1). For
the formal description of the algorithm we need some further definitions.
Initialization:
For all permutations π(block(0))
T (π(block(0)), 0) := S(π(block(0)))
Update:
For i = 1, . . . , m − d − 1
Output:
min {T (π(block(m − d − 1)), m − d − 1)}.
π(block(m−d−1))
Algorithmic Details. Next, we define the table T used in the dynamic program-
ming algorithm. The columns of T one-to-one correspond to the candidate sub-
sets block(i) ⊆ C with 0 ≤ i ≤ m − d − 1. Each row corresponds to a possible
order of the candidates in block(i). By Lemma 7, the number of candidates of
each block is upper-bounded by 3d + 1. Thus, T has at most (3d + 1)! rows.
An entry in column block(i) and row π, where π is an order of the candidates
in block(i), stores the minimum score of the orders π of C := j≤i block(j)
under the condition that π is compatible with π.
The algorithm is given in Figure 1. In the following, we first state the correct-
ness of the dynamic programming and then analyze its running time.
Lemma 8. The dynamic programming algorithm (see Figure 1) correctly de-
cides Kemeny Score.
Theorem 3. Kemeny Score can be solved in O((3d + 1)! · d · log d · m · n) time
with d being the maximum KT-distance between two input votes.
Proof. As argued above, the table size is bounded by O((3d + 1)! · m). For the
initialization, we compute the score of all orders of at most 3d + 1 candidates
and, for each order, the score is computable in O(d log d · n) time as argued in
the introductory section. Therefore, the initialization can be done in O((3d +
1)! · d log d · n) time.
At block(i) with i ≥ 1, we compute
min {T (π (block(i − 1)), i − 1)}
π (block(i−1))∈Comp(i,π)
68 N. Betzler et al.
for all possible orders π(block(i)). Using a pointer data structure, this can be
done in (3d + 1)! · d log d time by going through the (i − 1)th column once. Thus,
the entries of T (π(block(i)), i) can be computed in O((3d + 1)! · d log d · n) time,
giving the running time of the algorithm.
Note that it is easy to modify the dynamic programming to return a Kemeny
consensus within the same asymptotic running time. Furthermore, the algorithm
can be easily adapted to deal with weighted votes and/or weighted candidates.
Introducing ties, we use the definition of Hemaspaandra et al. [11]: Each vote
consists of a ranking of candidates that can contain ties between candidates
and the Kemeny consensus can contain ties as well. In the definition of the
KT-distance, we then replace dp,q (c, d) by
⎧
⎨ 0 if p and q agree on c and d,
tp,q (c, d) := 1 if p (q) has a preference among c and d and q (p) does not ,
⎩
2 if p and q strictly disagree on c and d.
By increasing the Kemeny score by two if two votes strictly disagree on two
candidates, the overall score becomes larger. It is not surprising that also in case
of ties we can get a linear problem kernel and a search tree with respect to the
parameter Kemeny score. To this end, we extend the notion of dirty pairs such
that a pair of candidates {a, b} is also dirty if we have a = b in one vote and a > b
or a < b in another vote. Then, we can obtain a linear problem kernel in complete
analogy to the case without ties. Concerning the search tree, by branching for
a dirty pair {a, b} into the three cases a > b, a = b, and a < b, we already
achieve the branching vector (1, 2, 4) and, hence, the branching number 1.76.
For example, having three votes in which candidates a and b are ranked equal
in two of the votes and we have a < b in the other vote, by branching into the
case “a = b” we have one inversion that counts one, branching into “a < b” we
have two inversions that count one, and branching into “a > b” we have two
inversions counting one and one inversion counting two.
With some more effort, we can also show that Kemeny Score with Ties is
fixed-parameter tractable with respect to the parameter maximum KT-distance.
To use the dynamic programming of Section 4, we need some bounds on the
positions a candidate can take and the size of a block in analogy to Lemma 6
and Lemma 7. In order to achieve this, we need a preprocessing step, which is
based on the following lemma:
Rule 3. If there are d + i candidates for any integer i ≥ 2 that are tied in all
votes, replace them by one candidate whose weight is the sum of the weights of
the replaced candidates.
70 N. Betzler et al.
The correctness of Rule 3 follows from Lemma 9. Further, note that the dynamic
programming procedure from Section 4 can be adapted to deal with candidate
weights. Now, similar to Lemmas 6 and 7 we can prove the following.
Lemma 10. In a candidate-weighted instance with maximum KT-instance d
obtained after exhaustively applying Rule 3, the positions of a candidate in two
votes differ by at most 2d + 1.
Lemma 11. In a reduced instance with maximum KT-instance d, every block
of size 2d contains at most 6d + 2 candidates.
Using Lemmas 10 and 11, we can show that with the dynamic programming
algorithm given in Section 4, the following running time can be obtained.
Theorem 5. Kemeny Score with Ties can be solved in O((6d + 2)! · d · log d ·
n · m) time with d being the maximum KT-distance between two input votes.
decreased accordingly. Third, after having processed all dirty pairs, we construct
an edge-weighted directed graph for each of the election systems generated by the
second step. The vertices of this graph one-to-one correspond to the candidates.
An arc (c, c ) from vertex c to vertex c is added if there is a vote of the form c > c
and a weight equal to the number of the c > c -votes is assigned to this arc. For
each pair of candidates c and c where the second step has already fixed an or-
der c > c , add an arc (c, c ) and assign a weight equal to k + 1 to this arc. Observe
that solving Kemeny Score on the instances generated by the first two steps is
now equivalent to solving the Weighted Directed Feedback Arc Set prob-
lems on the constructed edge-weighted directed graphs. Directed Feedback
Arc Set is the special case of Weighted Feedback Arc Set with unit edge
weight. The fixed-parameter algorithm by Chen et al. [4] for Directed Feed-
back Arc Set can also handle Weighted Directed Feedback Arc Set with
integer edge weights [3]. Therefore, applying this algorithm in the third step gives
a total running time of (1.48k)k · p(n, m) for a polynomial function p.
References
1. Ailon, N., Charikar, M., Newman, A.: Aggregating inconsistent information: Rank-
ing and clustering. In: Proc. 37th STOC, pp. 684–693. ACM, New York (2005)
2. Bartholdi III, J., Tovey, C.A., Trick, M.A.: Voting schemes for which it can be
difficult to tell who won the election. Social Choice and Welfare 6, 157–165 (1989)
3. Chen, J.: Personal communication (December 2007)
4. Chen, J., Liu, Y., Lu, S., O’Sullivan, B., Razgon, I.: A fixed-parameter algorithm for the
directed feedback vertex set problem. In: Proc. 40th STOC, ACM, New York (2008)
5. Conitzer, V., Davenport, A., Kalagnanam, J.: Improved bounds for computing
Kemeny rankings. In: Proc. 21st AAAI, pp. 620–626 (2006)
6. Davenport, A., Kalagnanam, J.: A computational study of the Kemeny rule for
preference aggregation. In: Proc. 19th AAAI, pp. 697–702 (2004)
7. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, Heidelberg (1999)
8. Dwork, C., Kumar, R., Naor, M., Sivakumar, D.: Rank aggregation methods for
the Web. In: Proc. WWW, pp. 613–622 (2001)
9. Dwork, C., Kumar, R., Naor, M., Sivakumar, D.: Rank aggregation revisited
(manuscript, 2001)
10. Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Heidelberg (2006)
11. Hemaspaandra, E., Spakowski, H., Vogel, J.: The complexity of Kemeny elections.
Theoretical Computer Science 349, 382–391 (2005)
12. Kenyon-Mathieu, C., Schudy, W.: How to rank with few errors. In: Proc. 39th
STOC, pp. 95–103. ACM, New York (2007)
13. Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford University
Press, Oxford (2006)
14. Raman, V., Saurabh, S.: Improved fixed parameter tractable algorithms for
two “edge” problems: MAXCUT and MAXDAG. Information Processing Let-
ters 104(2), 65–72 (2007)
15. Truchon, M.: An extension of the Condorcet criterion and Kemeny orders. Technical
report, cahier 98-15 du Centre de Recherche en Économie et Finance Appliquées (1998)
16. van Zuylen, A., Williamson, D.P.: Deterministic algorithms for rank aggregation
and other ranking and clustering problems. In: Kaklamanis, C., Skutella, M. (eds.)
WAOA 2007. LNCS, vol. 4927, pp. 260–273. Springer, Heidelberg (2007)
The Distributed Wireless Gathering Problem
1 Introduction
Wireless networks are used in many areas of practical interest, such as mobile
phone communication, ad-hoc networks, and radio broadcasting. Moreover, re-
cent advances in miniaturization of computing devices equipped with short range
radios have given rise to strong interest in sensor networks for their relevance in
many practical scenarios (environment control, accident monitoring etc.) [1,19].
In many applications of wireless networks data gathering is a critical operation
for extracting useful information from the operating environment: information
Research supported by EU ICT-FET 215270 FRONTS and MIUR-FIRB Italy-Israel
project RBIN047MH9.
Research supported by EU FET-project under contract no. FP6-021235-2 AR-
RIVAL, EU COST-action 293 GRAAL, and the Dutch BSIK-BRICKS project.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 72–83, 2008.
c Springer-Verlag Berlin Heidelberg 2008
The Distributed Wireless Gathering Problem 73
wireless gathering problem with arbitrary release times. For the case of min-
imizing maximum completion times, we presented a 4-competitive algorithm,
and demonstrated that no shortest paths following algorithm can be better than
4-approximate [6]. For the case of minimizing maximum flow time, we presented
an algorithm which, under resource augmentation by sending packets a factor
5 faster than an offline algorithm, produces a solution with value at most the
optimal off-line solution value. For this objective, we also demonstrated that no
algorithm can be better than Ω(m1/3 )-approximate, without resource augmen-
tation, unless NP = P [7]. We remark that distributed algorithms considered in
[7] require coordination among neighbouring nodes to avoid interferences dur-
ing transmission; this can be accomplished through a suitable signaling protocol
that is not realistic in current sensor networks.
Kumar et al. [15,16] considered decentralized algorithms for wireless packet
routing. They provide near-optimal polynomial time routing and scheduling al-
gorithms for solving throughput maximization problems in wireless ad hoc net-
works. However, their algorithms are not distributed in the sense that nodes use
information of neighbouring nodes in order to decrease interference and in some
case hinge on the solution of a linear or a convex optimization problem. For this
reason the above results are mainly of theoretical interest.
As we remark there has been much work in recent years on various optimiza-
tion issues in communication algorithms for wireless and sensor networks: see
[13,14,18,23] and references therein. However, to the best of our knowledge a
formal analysis of the worst case performance of simple distributed algorithms
that are suitable for implementation in real scenarios of sensor networks is still
lacking.
A different approach in the analysis of routing protocols that has been pro-
posed in the literature is known as adversarial queuing theory as introduced in
[2,8]. Typically, in queuing theory the input is given by a distribution function,
e.g., a Poisson distribution. In the adversarial queuing theory model the input
is given by an adversary, who is restricted by a bound on the average arrival
rate of packets. An adversarial queuing theory model seems more appropriate
than queuing theory when minimizing packet flow times in case of bursty traffic
that consists of alternating periods of high and low packet arrival rates. The
goal is to prove stability: a system is said to be stable if the average number
of packets in the system is bounded [2,8,11]. Given a routing problem and an
algorithm A, let λ∗ and λA be the highest arrival rate that can be sustained,
respectively, by the omniscient optimum finding adversary and by algorithm A
while maintaining stability. The performance of an algorithm is measured by the
ratio λ∗ /λA . Note that the reduction in the arrival rate of the algorithm is a
dual compensation to our resource augmentation to compensate the limitations
imposed to the algorithm. Given a stable system, it is of interest to consider
the expected flow time of packets. In case of packet routing, in [2] and [8] it is
demonstrated that, even in a stable system, the maximum flow time of packets
may be unbounded.
76 V. Bonifaci et al.
2 Preliminaries
It is known from previous work that Wgp is NP-hard both when minimizing the
maximum completion time and the maximum flow time [6]. The latter problem
is actually NP-hard to approximate within a factor of O(m1/3 ) [7]. Here we give
an unconditional lower bound on the approximability of the maximum flow time
in a distributed setting where routing is done through an in-tree. We consider
a scenario in which the conflicts between transmissions from one layer of the
tree to the next are resolved randomly: whenever several transmissions from a
layer occur in the same round, only a uniformly chosen one succeeds. We call
this the random selection model. This assumption seems natural for distributed
The Distributed Wireless Gathering Problem 77
It is useful to compare Proposition 1 with the above cited result, that there
is no polynomial time algorithm which can approximate Wgp within a factor
O(m1/3 ) when minimizing the maximum flow time, unless NP = P. The latter
condition is not required in Proposition 1. In [7] we showed that allowing a
constant increase in speed one can obtain a solution with maximum flow time
which is less than that of the optimal solution for the original instance. The
proof of Proposition 1 indicates that such a result is not likely to be obtainable
for distributed algorithms, as they have basically no control on which packet to
78 V. Bonifaci et al.
advance. The reason is that the lower bound is due to an adversarial selection
of which packet to advance; and the probability of obtaining such a selection
depends on the number of packets, and not on the speed of the algorithm.
In the next section we will analyze a distributed algorithm. It cannot deter-
mine which packet is advanced from each layer to the next. Proposition 1 and
the observations above should thus explain why we focus on the analysis of the
expected total flow time (as opposed to maximum flow time) and why we need
to use resource augmentation.
Finally we remark the intuitive fact that, if conflicts are solved adversarially
as opposed to randomly, Proposition 1 can be strengthened further. In the worst-
case selection model, whenever there is a set of pairwise incompatible calls, only
an adversarially chosen one will succeed.
Proposition 2. In the worst-case selection model, the approximation ratio of
any deterministic algorithm is at least Ω(m) when minimizing maximum flow
time or average flow time.
We can now state a distributed algorithm for Wgp (Algorithm 2). The pro-
tocol requires the existence of a basic communication structure. Therefore, as a
first step of the algorithm a breadth-first search (BFS) tree with the sink as the
root is constructed. This can be done in expected time O((n + δ log n) log Δ) [4].
Since it is done only once, when starting up the system, we will not count this
time in defining the cost of the schedule.
The Distributed Wireless Gathering Problem 79
Theorem 1 ([4]). Let i be a layer of the tree containing some packet at the
beginning of a superphase. There is probability at least μ := e−1 (1 − e−1 ) that
during this superphase DG sends a packet from a node u in layer i successfully
to the parent node of u in the BFS tree.
This theorem shows that, during a superphase, each nonempty layer forwards a
packet with probability μ to the following layer. Notice however that there is no
guarantee on which particular packet is advanced.
For our analysis we define three solution models. For a given instance I of
Wgp, we construct relations between the completion times of packets in these
three models. This approach is similar to the approach of Bar-Yehuda et al. [4].
However, one additional difficulty is that, because packets have release dates,
the extra speed given to the algorithm does not directly translate into shorter
flow times.
- In Model 1 each layer sends with probability at least μ at least one packet
every superphase;
- In Model 2 each layer sends with probability p := 1 − (1 − μ)a one packet
in one of the three last rounds of every a superphases, a ∈ N, and with
probability (1 − μ)a no packet;
- In Model 3 each layer sends with probability p one packet in each round,
and with probability 1 − p no packet.
80 V. Bonifaci et al.
Note, that the probabilities stated above refer to the case in which the layer
contains a packet at the start of the period considered (a single superphase
in Model 1, a superphases in Model 2, and a single round in Model 3). This
restriction is similar to the restriction on the Decay procedure. Thus, it follows
from Theorem 1 that a DG-solution is a solution which fits into Model 1. We
define the completion time and the flow time of a packet j in a Model k solution,
(k) (k)
respectively, as Cj and Fj , k = 1, 2, 3.
Motivated by the negative results of Theorem 1 we focus on deriving a bound
on the expected average flow time of DG. We use resource augmentation to
analyze the performance of DG. A σ-speed algorithm sends data packets at a
speed that is σ times faster than an offline algorithm.
Through a sequence of steps we relate the expected flow times of Model 1
to those of Model 2. Subsequently, we demonstrate that the expected flow time
of σ-speed DG is bounded by the expected flow time of a Model 3-solution.
Finally, we relate the expected flow times of a Model 3-solution to the expected
flow times of an optimal offline solution.
Lemma 2. The expected sum of flow times of σ-speed DG is at most the ex-
pected sum of flow times of a Model 3 solution, for σ ≥ 6a log Δ.
Proof. Consider a Model 3 schedule S for instance I. First, assume that when in
a round some layer fails to communicate, then all layers fail in that round. In this
case, the probability of having no communication in a round is 1−pδ . The sched-
ule S that remains after removing rounds without communication is equivalent
to a schedule of a deterministic tandem queue with unit processing times, where
each packet j of the Model 3 instance is transformed in a job arriving at machine
Md(vj ,s) . Consider any set of k rounds of a schedule of a deterministic tandem
queue with unit processing times. The expectednumber of rounds required to
∞
schedule these k rounds in schedule S is kpδ · i=0 (1 − pδ )i · (i + 1) = k/pδ .
Let Fj be the flow time of packet j in S . Then we have E[Fj ] = Fj /pδ , for
(3)
each packet j. Flow times are not increased if only some layers fail, but others
forward a packet.
The Distributed Wireless Gathering Problem 81
Lemma 4. The sum of flow times of a deterministic tandem queue with unit
processing times is at most the sum of flow times of an optimal offline Wgp
schedule.
Proof. It follows from Lemmas 3 and 4 that the expected sum of flow times of
σ-speed DG is at most 1/pδ times the sum of flow times of an optimal offline
solution, for σ = 6a log Δ. As σ-speed DG is an online algorithm, DG is σ-
speed p−δ -competitive when minimizing average flow times. The probability p =
1 − (1 − μ)a depends on the choice of the speedup a. We set a := μ−1 ln(δ/),
−1
which gives p = 1 − (1 − μ)μ ln(δ/) ≥ 1 − e− ln(δ/) = 1 − /δ, so that p−δ ≤
−δ
(1 − /δ) ≤ e ≤ e2 ln(1+) = 1 + 2 + 2 ≤ 1 + 3.
It follows from the theorem that the competitive ratio of DG can be made
arbitrarily close to 1 with an appropriate increase in speed.
5 An Extension
The model that we considered so far for Wgp assumes that a node can only
cause interference at nodes that are adjacent to it in the network. In practice,
the interference caused by the radio signal can go beyond the transmission radius
[22]. This can be modeled by an integer dI ≥ 1 that specifies the distance
82 V. Bonifaci et al.
(expressed in number of hops) up to which the signal can cause interference: two
calls (u, v) and (u , v ) are now compatible if d(u, v ) ≤ dI and d(u , v) ≤ dI (we
still require that u is adjacent to v, and u to v ).
Algorithm DG can be extended to this setting by assigning to a node in layer
d the label d mod dI + 2 and then using superphases consisting of dI + 2 phases
each. In this way one can avoid interference between nodes from different layers
of the tree. It is easy to see that Theorem 1 can be extended to this setting.
Using this fact, we can extend our analysis in the previous section to prove
the following result.
Theorem 3. Let > 0 and σ = Θ(d2I · log Δ · ln(δ/)). Then σ-speed DG is in
expectation (1 + )-competitive when minimizing the average flow time.
We notice that one dI factor is due to the longer superphases, and another one
is due to Decay having to cope with larger neighborhoods (of size ΔdI ).
References
1. Akyildiz, I.F., Su, W., Sankarasubramaniam, Y., Cayirci, E.: Wireless sensor net-
works: a survey. Computer Networks 38(4), 393–422 (2002)
2. Andrews, M., Awerbuch, B., Fernández, A., Leighton, F.T., Liu, Z., Kleinberg,
J.M.: Universal-stability results and performance bounds for greedy contention
resolution protocols. Journal of the ACM 48(1), 39–69 (2001)
3. Bar-Yehuda, R., Goldreich, O., Itai, A.: On the time-complexity of broadcast in
multihop radio networks: an exponential gap between determinism and random-
ization. Journal of Computer and System Sciences 45(1), 104–126 (1992)
4. Bar-Yehuda, R., Israeli, A., Itai, A.: Multiple communication in multihop radio
networks. SIAM Journal on Computing 22(4), 875–887 (1993)
The Distributed Wireless Gathering Problem 83
5. Bermond, J., Galtier, J., Klasing, R., Morales, N., Pérennes, S.: Hardness and ap-
proximation of gathering in static radio networks. Parallel Processing Letters 16(2),
165–183 (2006)
6. Bonifaci, V., Korteweg, P., Marchetti-Spaccamela, A., Stougie, L.: An approxima-
tion algorithm for the wireless gathering problem. In: Proc. of the 10th Scandina-
vian Workshop on Algorithms and Theory, pp. 328–338 (2006)
7. Bonifaci, V., Korteweg, P., Marchetti-Spaccamela, A., Stougie, L.: Minimzing flow
time in the wireless gathering problem. In: Proc. of the 25th Int. Symp. on Theo-
retical Aspects of Computer Science (2008)
8. Borodin, A., Kleinberg, J.M., Raghavan, P., Sudan, M., Williamson, D.P.: Adver-
sarial queuing theory. Journal of the ACM 48(1), 13–38 (2001)
9. Florens, F.C., McEliece, R.M.: Lower bounds on data collection time in sensory
networks. IEEE J. on Selected Areas in Communications 22, 1110 (2004)
10. Chekuri, C., Goel, A., Khanna, S., Kumar, A.: Multi-processor scheduling to min-
imize flow time with epsilon resource augmentation. In: Proc. of the ACM Symp.
on the Theory of Computing, pp. 363–372 (2004)
11. Håstad, J., Leighton, F.T., Rogoff, B.: Analysis of backoff protocols for multiple
access channels. SIAM Journal on Computing 25(4) (1996)
12. Kalyanasundaram, B., Pruhs, K.: Speed is as powerful as clairvoyance. Journal of
the ACM 47(4), 617–643 (2000)
13. Kar, K., Kodialam, M.S., Lakshman, T.V., Tassiulas, L.: Routing for network
capacity maximization in energy-constrained ad-hoc networks. In: Proc. IEEE IN-
FOCOM (2003)
14. Kodialam, M.S., Nandagopal, T.: Characterizing achievable rates in multi-hop
wireless networks: the joint routing and scheduling problem. In: Proc. MOBICOM,
pp. 42–54 (2003)
15. Kumar, V.S.A., Marathe, M.V., Parthasarathy, S., Srinivasan, A.: End-to-end
packet-scheduling in wireless ad-hoc networks. In: Proc. of the ACM-SIAM Symp.
on Discrete Algorithms, pp. 1021–1030 (2004)
16. Kumar, V.S.A., Marathe, M.V., Parthasarathy, S., Srinivasan, A.: Provable algo-
rithms for joint optimization of transport, routing and MAC layers in wireless ad
hoc networks. In: Proc. Dial-M/POMC (2007)
17. Lu, G., Krishnamachari, B., Raghavendra, C.S.: An adaptive energy-efficient and
low-latency mac for data gathering in wireless sensor networks. In: Proc. IEEE
IPDPS (2004)
18. Moscibroda, T., Wattenhofer, R.: The complexity of connectivity in wireless net-
works. In: Proc. IEEE INFOCOM (2006)
19. Pahlavan, K., Levesque, A.H.: Wireless information networks. Wiley, Chichester
(1995)
20. Perkins, C.E.: Ad hoc networking. Addison-Wesley, Reading (2001)
21. Polastre, J., Hill, J.L., Culler, D.E.: Versatile low power media access for wireless
sensor networks. In: Proc. SenSys., pp. 95–107 (2004)
22. Schmid, S., Wattenhofer, R.: Algorithmic models for sensor networks. In: Proc.
IEEE IPDPS (2006)
23. Xiao, L., Johansson, M., Boyd, S.P.: Simultaneous routing and resource allocation
via dual decomposition. IEEE Transactions on Communications 52(7), 1136–1144
(2004)
Approximating Maximum Edge 2-Coloring in
Simple Graphs Via Local Improvement
1 Introduction
Given a graph G and a natural number t, the maximum edge t-coloring problem
(called Max Edge t-Coloring for short) is to find a maximum set F of edges
in G such that F can be partitioned into at most t matchings of G. Motivated
by call admittance issues in satellite based telecommunication networks, Feige et
al. [2] introduced the problem and proved its APX-hardness. They also observed
that Max Edge t-Coloring is obviously a special case of the well-known
maximum coverage problem (see [4]). Since the maximum coverage problem
can be approximated by a greedy algorithm within a ratio of 1 − (1 − 1t )t [4], so
can Max Edge t-Coloring. In particular, the greedy algorithm achieves an
approximation ratio of 34 for Max Edge 2-Coloring which is the special case
of Max Edge t-Coloring where the input number t is fixed to 2. Feige et al.
13 ≈ 0.769 by an LP approach.
[2] has improved the trivial ratio 34 = 0.75 to 10
The APX-hardness proof for Max Edge t-Coloring given by Feige et al. [2]
indeed shows that the problem remains APX-hard even if we restrict the input
graph to a simple graph and fix the input integer t to 2. We call this restriction
(special case) of the problem Max Simple Edge 2-Coloring. Feige et al. [2]
also pointed out that for Max Simple Edge 2-Coloring, an approximation
ratio of 45 can be achieved by the following simple algorithm: Given a simple
graph G, first compute a maximum subgraph H of G such that the degree of
each vertex in H is at most 2 and there is no 3-cycle in H, and then remove one
arbitrary edge from each odd cycle of H.
In [1], the authors have improved the ratio to 468
575 . Essentially, the algorithm
in [1] differs from the simple algorithm only in the handling of 5-cycles where
instead of removing one arbitrary edge from each 5-cycle of H, we remove a
random edge from each 5-cycle of H. The intuition behind the algorithm is as
follows: If we delete a random edge from each 5-cycle of H, then for each edge
{u, v} in the optimal solution such that u and v belong to different 5-cycles, both
u and v become of degree 1 in H (after handling the 5-cycles) with a probability
4
of 25 and so can be added into H without losing the edge 2-colorability of H.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 84–96, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Approximating Maximum Edge 2-Coloring in Simple Graphs 85
In this paper, we further improve the ratio to 24 29 . The basic idea behind our
algorithm is as follows: Instead of removing a random edge from each 5-cycle of H
and removing an arbitrary edge from each other odd cycle of H, we remove one
edge from each odd cycle of H with more care in the hope that after the removal, a
lot of edges {u, v} (in the optimal solution) with u and v belonging to different odd
cycles of H can be added to H. More specifically, we define a number of operations
that modify each odd cycle of H together with its neighborhood carefully without
decreasing the number of edges in H by two or more; our algorithm just performs
these operations on H until none of them is applicable. The nonapplicability of
these operations guarantees that H is edge 2-colorable and its number of edges is
close to optimal; the analysis is quite challenging.
Kosowski et al. [7] also considered Max Simple Edge 2-Coloring. They
presented an approximation algorithm that achieves a ratio of 28Δ−1235Δ−21 , where Δ
is the maximum degree of a vertex in the input simple graph. This ratio can be
arbitrarily close to the trivial ratio 45 because Δ can be very large. In particular,
this ratio is smaller than 2429 when Δ ≥ 6.
Kosowski et al. [7] showed that approximation algorithms for Max Simple
Edge 2-Coloring can be used to obtain approximation algorithms for cer-
tain packing problems and fault-tolerant guarding problems. Combining their
reductions and our improved approximation algorithm for Max Simple Edge
2-Coloring, we can obtain improved approximation algorithms for their pack-
ing problems and fault-tolerant guarding problems immediately.
2 Basic Definitions
A graph always means a simple undirected graph. A graph G has a vertex set
V (G) and an edge set E(G). For each v ∈ V (G), NG (v) denotes the set of all
vertices adjacent to v in G and dG (v) = |NG (v)| is the degree of v in G. If
dG (v) = 0, then v is an isolated vertex of G. For each U ⊆ V (G), G[U ] denotes
the subgraph of G induced by U .
A path in G is a connected subgraph of G in which exactly two vertices are of
degree 1 and the others are of degree 2. Each path has two endpoints and zero
or more inner vertices. An edge {u, v} of a path P is an inner edge of P if both
u and v are inner vertices of P . The length of a cycle or path C is the number
of edges in C. A cycle of odd (respectively, even) length is an odd (respectively,
even) cycle. A k-cycle is a cycle of length k. Similarly, a k + -cycle is a cycle
of length at least k. A path component (respectively, cycle component) of G is
a connected component of G that is a path (respectively, cycle). A path-cycle
cover of G is a subgraph H of G such that V (H) = V (G) and dH (v) ≤ 2 for
every v ∈ V (H). A cycle cover of G is a path-cycle cover of G in which each
connected component is a cycle. A path-cycle cover C of G is triangle-free if C
does not contain a 3-cycle.
G is edge-2-colorable if each connected component of G is an isolated vertex,
a path, or an even cycle. Note that Max Simple Edge 2-Coloring is the
problem of finding a maximum edge-2-colorable subgraph in a given graph.
86 Z.-Z. Chen and R. Tanahashi
3 The Algorithm
Like the simple algorithm described in Section 1, our algorithm starts by per-
forming the following step:
Type 1: Suppose that {u, v} is an edge in E(G) − E(H) such that dH (u) ≤ 1
and v is a vertex of some cycle C of H. Then, a Type-1 operation on H using
{u, v} modifies H by deleting one (arbitrary) edge of C incident to v and adding
edge {u, v}. Obviously, this operation is robust and does not change |E(H)|.
(Comment: If dH (u) = 0 before a Type-1 operation, then n0 (H) decreases by 1
and p(H) increases by 1 after the operation. Similarly, if dH (u) = 1 before a
Type-1 operation, then neither n0 (H) nor p(H) changes after the operation.)
Type 2: Suppose that some odd cycle C of H has a 5-opener (x, y, P, u, v) with
{u, v} ∈ E(H) (see Figure 1). Then, a Type-2 operation on H using (x, y, P, u, v)
modifies H by deleting edge {u, v}, deleting one (arbitrary) edge of C incident
to y, and adding edges {u, x} and {v, y}. Obviously, this operation is robust
and does not change the number of edges in H. However, edge {u, v} may have
been charged before this operation. If that is the case, we move its charge to
{u, x}. Moreover, if the path component Q of H containing edge {u, x} after
this operation is of length at most 5, then we move the charges on the edges of
Q to edge {v, y} and the edges of C still remaining in H. (Comment: A Type-
2 operation on H maintains Invariants I1 through I4. Moreover, if dH (x) = 0
before a Type-2 operation, then n0 (H) decreases by 1 and p(H) increases by 1
after the operation. Similarly, if dH (x) = 1 before a Type-2 operation, then
neither n0 (H) nor p(H) changes after the operation.)
Type 3: Suppose that some odd cycle C of H has a 5-opener (x, y, P, u, v) such
that E(G) − E(H) contains the edge {w, s}, where w is the neighbor of v in the
subpath of P between u and v and s is the endpoint of P with distP (s, u) <
distP (s, v) (see Figure 2 in the appendix). Then, a Type-3 operation on H using
(x, y, P, u, v) modifies H by deleting edge {v, w}, deleting one (arbitrary) edge
eu of P incident to u, deleting one (arbitrary) edge of C incident to y, and
88 Z.-Z. Chen and R. Tanahashi
u v P u v P
x y x y
C C
s u w v P s u w v P
x y x y
C C
adding edges {u, x}, {v, y}, and {s, w}. Obviously, this operation is robust and
does not change the number of edges in H. Note that {v, w} or eu may have
been charged before this operation. If that is the case, we move their charges to
edges {u, x} and {s, w}, respectively. Moreover, if the path component Q of H
containing edge {u, x} after this operation is of length at most 5, then we move
the charges on the edges of Q to edge {v, y} and the edges of C still remaining
in H. (Comment: A Type-3 operation on H maintains Invariants I1 through I4.
Moreover, if dH (x) = 0 before a Type-3 operation, then n0 (H) decreases by 1
and p(H) increases by 1 after the operation. Similarly, if dH (x) = 1 before a
Type-3 operation, then neither n0 (H) nor p(H) changes after the operation.)
s u v P s u v P
x x
C C
s u v w t P s u v w t P
x x
C C
– E(G) − E(H) contains {u, x}, {s, w}, and {t, v}, where s is the endpoint of
P with distP (s, u) < distP (s, v) and t is the other endpoint of P .
Type 6: Suppose that some odd cycle C of H with length at most 9 has a 6-
opener (x, y, Q, P, u, v) such that {u, v} ∈ E(H) (see Figure 5 in the appendix).
Then, a Type-6 operation on H using (x, y, Q, P, u, v) modifies H by deleting
edge {u, v}, deleting all edges of C, adding edges {u, x} and {v, y}, and adding
all edges of Q. Obviously, this operation does not change the number of edges in
H, and is robust because (1) it does not create a new isolated vertex in H and
(2) if it creates one or more new cycles in H then V (C ) ⊆ V (C) for each new
cycle C . However, {u, v} may have been charged before this operation. If that
is the case, we move its charge to {u, x}. (Comment: A Type-6 operation on H
maintains Invariants I1 through I4, and changes neither n0 (H) nor p(H).)
u v P u v P u v P u v P
x x x x
y y
C C C C
Lemma 1. After Step 2, G has no edge {u, v} such that u is an isolated vertex in
H and either v is an isolated vertex in H or v appears in a cycle component of H.
Unfortunately, H may still have odd cycles after Step 2. So, we need to perform
new types of operations on H that always decrease the number of odd cycles
in H but may also decrease the number of edges in H. Before defining the new
operations on H, we define two concepts as follows. Two cycles C1 and C2 of H
are pairable if at least one of them is odd and their total length is at least 10.
A quintuple (x, y, P, u, v) is an opener for two pairable cycles C1 and C2 of H if
the following hold:
– x is a vertex of C1 and y is a vertex of C2 .
– P is either a path component of H or a 4-cycle of H other than C1 and C2 .
– u and v are distinct vertices of P with dH (u) = dH (v) = 2.
– Both {u, x} and {v, y} are in E(G) − E(H).
Now, we are ready to define the new types of robust operations on H as follows:
Type 7: Suppose that C is an odd cycle of H with length at least 11. Then,
a Type-7 operation on H using C modifies H by deleting one (arbitrary) edge
from C. Clearly, the net loss in the number of edges in H is 1. We charge this
loss evenly to the edges of C still remaining in H. In more details, if C was a
1
k-cycle before the operation, then a charge of k−1 is charged to each edge of
C still remaining in H after the operation. Since k ≥ 11, the charge assigned
1
to one edge here is at most 10 . Obviously, this operation is robust. (Comment:
A Type-7 operation on H maintains Invariants I1 through I4, does not change
n0 (H), and increases p(H) by 1.)
Type 8: Suppose that C1 and C2 are two pairable cycles of H such that there is
an edge {u, v} ∈ E(G) with u ∈ V (C1 ) and v ∈ V (C2 ). Then, a Type-8 operation
on H using {u, v} modifies H by deleting one (arbitrary) edge of C1 incident to
u, deleting one (arbitrary) edge of C2 incident to v, and adding edge {u, v}. Note
that this operation decreases the number of edges in H by 1. So, the net loss in
the number of edges in H is 1. We charge this loss evenly to edge {u, v} and the
edges of C1 and C2 still remaining in H. In more details, if C1 was a k-cycle and
1
C2 was an -cycle in H before the operation, then a charge of k+−1 is assigned to
{u, v} and each edge of C1 and C2 still remaining in H after the operation. Since
k ≥ 5 and ≥ 5, the charge assigned to one edge here is at most 19 . Obviously, this
operation is robust. (Comment: A Type-8 operation on H maintains Invariants I1
through I4, does not change n0 (H), and increases p(H) by 1.)
Approximating Maximum Edge 2-Coloring in Simple Graphs 91
u v P u v P
x y x y
C1 C2 C1 C2
Type 10: Suppose that two odd cycles C1 and C2 of H have an opener
(x, y, P, u, v) such that E(G) − E(H) contains the edge {w, s}, where w is the
neighbor of v in the subpath of P between u and v and s is the endpoint of P
with distP (s, u) < distP (s, v) (see Figure 7 in the appendix). Then, a Type-10
operation on H using (x, y, P, u, v) modifies H by deleting edge {v, w}, deleting
one (arbitrary) edge eu of P incident to u, deleting one (arbitrary) edge of C1
incident to x, deleting one (arbitrary) edge of C2 incident to y, and adding edges
{u, x}, {v, y}, and {s, w}. Note that {v, w} or eu may have been charged before
this operation. If that is the case, we move their charges to edges {u, x} and
{v, y}, respectively. Moreover, the operation decreases the number of edges in H
by 1. So, the net loss in the number of edges in H is 1. We charge this loss evenly
to edge {s, w} and the edges of C1 and C2 still remaining in H. Obviously, the
charge assigned to one edge here is at most 19 . It is also clear that this opera-
tion is robust. (Comment: A Type-10 operation on H maintains Invariants I1
through I4, does not change n0 (H), and increases p(H) by 1.)
s u w v P s u w v P
x y x y
C1 C2 C1 C2
Type 11: Suppose that {u, v} is an edge in E(G) − E(H) such that dH (u) = 1,
dH (v) ≤ 1, and no connected component of H contains both u and v. Then,
a Type-11 operation on H using {u, v} modifies H by adding edge {u, v}. Ob-
viously, this operation is robust and increases the number of edges in H by 1.
(Comment: If dH (v) = 0 before a Type-11 operation, then p(H) does not change
and n0 (H) decreases by 1 after the operation. Similarly, if dH (v) = 1 before a
Type-11 operation, then n0 (H) does not change and p(H) decreases by 1 after
the operation.)
Using the above operations, our algorithm then proceeds to modifying H by
performing the following steps:
4 Performance Analysis
For 1 ≤ i ≤ 4, let Hi be the triangle-free path-cycle cover H of G immedi-
ately after Step i of our algorithm. In order to analyze the approximation ratio
achieved by our algorithm, we need to define several notations as follows:
– Let n, m, nis , and npc be the numbers of vertices, edges, isolated vertices,
and path components in H2 , respectively. (Comment: m ≥ |E(Opt)|.)
– Let m− be the number of Type-i operations with 7 ≤ i ≤ 10 performed in
Step 3.
– Let m+,−1 be the number of Type-11 operations performed Step 3 that
decrease the number of isolated vertices in H by 1.
– Let m+,0 be the number of Type-11 operations performed Step 3 that do
not change the number of isolated vertices in H.
– Let n0,−1 be the number of Type-i operations with 1 ≤ i ≤ 3 performed in
Step 3 that decrease the number of isolated vertices in H by 1.
– For each i ∈ {5, 7, 9}, let ci be the number of i-cycles in H3 .
– Let mc and muc be the numbers of charged edges and uncharged edges in
H3 , respectively.)
Approximating Maximum Edge 2-Coloring in Simple Graphs 93
Proof. By the algorithm, |E(H3 )| = m−m− +m+,0 +m+,−1 . On the other hand,
|E(H3 )| = mc + muc by definition. So, mc = m − m− + m+,0 + m+,−1 − muc . We
also have m− ≤ 19 mc by Invariant I2. Thus, m− ≤ 10 1
(m + m+,0 + m+,−1 − muc ).
By Step 3, |E(H4 )| = |E(H3 )| − c5 − c7 − c9 . So, by the first equality in the
last paragraph, |E(H4 )| = m − m− + m+,0 + m+,−1 − c5 − c7 − c9 .
By Statements 1 and 2, |E(H4 )| ≥ 10
9
(m+m+,0 +m+,−1 )+ 10 1
muc −c5 −c7 −c9 .
We also have muc ≥ 5c5 + 7c7 + 9c9 , because each edge in a cycle component of
H3 is uncharged according to Invariant I3. Combining these two inequalities, we
have Statement 3. 2
Lemma 4. |Eopt T
| ≤ p(H3 ) + 4c5 + 6c7 + 8c9 − |C−2 | ≤ npc + m− − m+,0 + n0,−1 +
4c5 + 6c7 + 8c9 − |C−2 |.
with {u, v} ⊆ T2 . This completes the proof of the first inequality in the lemma.
The second follows from the first and Statement 2 in Lemma 3. 2
Lemma 5. |Eopt T
| ≥ |E(Opt)| − 2m + 2npc + 4m− − 4m+,0 − 2m+,−1 + 2n0,−1 +
10c5 + 14c7 + 18c9 + |T0 | + 12 |T1 |.
Proof. The idea behind the proof is to obtain an upper bound on |E(Opt)−Eopt T
|.
A trivial upper bound is 2(n − |T |), because each edge in E(Opt) − Eopt must be
T
2m − 2npc − 4m− + 4m+,0 + 2m+,−1 − 2n0,−1 − 10c5 − 14c7 − 18c9 − |T0 | − 12 |T1 |.
So, the lemma holds. 2
|E(H4 )| ≥ 10
9
m − ( 12 |E(H4 )| − 16 |E(Opt)| − 16 m). Rearranging this inequality and
using the fact that m ≥ |E(Opt)|, we finally obtain |E(H4 )| ≥ 37 45 |E(Opt)|. 2
Note that 3745 = 0.8222 . . . which is better than the previously best ratio. To show
that our algorithm indeed achieves an even better ratio, our idea is to show that
|C−2 | + |T0 | + 12 |T1 | is large. This holds basically because no Type-i operation
with i ∈ {1, . . . , 11} can be applied to H3 . The proof is very complicated and will
appear in the full version of this paper. In summary, we have our main result:
5 An Application
References
1. Chen, Z.-Z., Tanahashi, R., Wang, L.: An Improved Approximation Algorithm for
Maximum Edge 2-Coloring in Simple Graphs. Journal of Discrete Algorithms (to
appear)
2. Feige, U., Ofek, E., Wieder, U.: Approximating Maximum Edge Coloring in Multi-
graphs. In: Jansen, K., Leonardi, S., Vazirani, V.V. (eds.) APPROX 2002. LNCS,
vol. 2462, pp. 108–121. Springer, Heidelberg (2002)
3. Hartvigsen, D.: Extensions of Matching Theory. Ph.D. Thesis, Carnegie-Mellon Uni-
versity (1984)
4. Hochbaum, D.: Approximation Algorithms for NP-Hard Problems. PWS Publishing
Company, Boston (1997)
5. Jacobs, D.P., Jamison, R.E.: Complexity of Recognizing Equal Unions in Families
of Sets. Journal of Algorithms 37, 495–504 (2000)
6. Kawarabayashi, K., Matsuda, H., Oda, Y., Ota, K.: Path Factors in Cubic Graphs.
Journal of Graph Theory 39, 188–193 (2002)
7. Kosowski, A., Malafiejski, M., Zylinski, P.: Packing Edge Covers in Graphs of Small
Degree (manuscript, 2006)
8. O’Rourke, J.: Art Gallery Theorems and Algorithms. Oxford University Press, Ox-
ford (1987)
9. Urrutia, J.: Art Gallery and Illumination Problems. In: Handbook on Computational
Geometry, Elsevier Science, Amsterdam (2000)
An Improved Randomized Approximation
Algorithm for Maximum Triangle Packing
Abstract. This paper deals with the maximum triangle packing prob-
lem. For this problem, Hassin and Rubinstein gave a randomized
polynomial-time approximation algorithm and claimed that it achieves
an expected ratio of 16989
(1 − ) for any constant > 0. However, their
analysis was flawed. We present a new randomized polynomial-time ap-
proximation algorithm for the problem which achieves an expected ratio
very close to their claimed expected ratio.
1 Introduction
In the maximum triangle packing problem (MTP for short), we are given an
edge-weighted complete graph G = (V, E) such that the edge weights are non-
negative and |V | is a multiple of 3. The objective is to find a partition of V
into 13 |V | disjoint subsets each of size exactly 3 such that the total weight of
edges whose endpoints belong to the same subset is maximized. MTP is a clas-
sic NP-hard problem; indeed, it is contained in Garey and Johnson’s famous
book on the theory of NP-completeness [2]. MTP is not only NP-hard but also
MAX SNP-hard [5], implying that it does not admit a polynomial-time approxi-
mation scheme unless P = N P . A stronger hardness result has been obtained by
Chlebı́k and Chlebı́ková [1]: No polynomial-time approximation algorithm can
approximate MTP within a ratio of 0.9929 unless P = N P .
On the positive side, Hassin and Rubinstein [3] have presented a randomized
polynomial-time approximation algorithm for MTP. In [3], they claimed that
their algorithm achieves an expected ratio of 169 89
(1 − ) for any constant > 0.
However, the first author of this paper pointed out a flaw in their analysis to
them and they [4] have corrected the expected ratio to 43 83 (1 − ).
In this paper, we obtain a new randomized polynomial-time approximation
algorithm for MTP by substantially modifying the algorithm due to Hassin and
Rubinstein. Like their algorithm, our algorithm starts by computing a maximum
cycle cover C in the input graph G, then processes C to obtain three triangle
packings of G, and finally outputs the maximum weighted packing among the
three packings. Unlike their algorithm, our algorithm processes triangles in C in
a different way than the other cycles in C, and tries to connect the cycles in C by
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 97–108, 2008.
c Springer-Verlag Berlin Heidelberg 2008
98 Z.-Z. Chen, R. Tanahashi, and L. Wang
83 (1 − )), it is of interest for the following two reasons: First, the new ratio
43
89
is very close to 169 (1 − ) which is the expected ratio wrongly claimed in [3];
hence our new algorithm and its analysis can be viewed as an almost complete
correction of the flaw committed in [3]. Second, the improvement (achieved by
our new algorithm) from 43 83 (1 − ) to 169 (1 − ) is almost half the improvement
88.85
2 Basic Definitions
w(F ) ≤ · w(C) and then adding one edge between the endpoints of each result-
ing path. In this way, the length of each cycle in C becomes short, namely, is at
most 1 . H&R-algorithm then uses C to compute three triangle packings P1 , P2 ,
and P3 of G, and further outputs the packing whose weight is maximum among
the three.
Computing P1 and P2 from C in H&R-algorithm is easy:
Lemma 1. [3] Let α · w(C) be the total weight of edges in triangles in C. Then,
w(P1 ) ≥ 1+α
2 · w(C) ≥ 2 (1 − ) · w(Opt).
1+α
Lemma 2. [3] Let β · w(Opt) be the total weight of those edges {u, v} such that
some triangle in Opt contains both u and v and some cycle in C contains both
u and v. Then, w(P2 ) ≥ β · w(Opt).
4 New Computation of P3
This section details our new computation of P3 , which is basically a significant
refinement of the computation of P3 in H&R-algorithm. We inherit the notations
in the last section.
There are two main ideas in our new computation of P3 . First, the weight of
the matching M computed in H&R-algorithm (outlined above) may be as small
as 13 w(Opt). In our new computation, we instead compute a maximum-weight
100 Z.-Z. Chen, R. Tanahashi, and L. Wang
Note that w(M1 ) is close to w(Opt) when Opt contains a heavy set of edges
between cycles in C. So, we want to add the edges of M1 to C. However, adding
the edges of M1 to C yields a graph which may have a lot of vertices of degree 3
or 4 and is hence far from a triangle packing of G. To remedy this situation, we
want to compute a set R of edges in C and a subset M of M1 such that adding
the edges of M to C − R yields a graph in which each connected component is
a cycle or path.
The next two steps of our algorithm are for computing the set R. Before
describing the details, we need to define several notations. Let C1 , . . . , Cr be
the cycles in C. Moreover, throughout the remainder of this section, let p be the
20 p − 10 p ≥ 320 ; the reason why
smallest real number satisfying the inequality 27 2 9 3 27
we select p in this way will become clear in Lemma 11. Note that 0.276 < p <
80 p − 80 p ≥ 320 . Now, we are ready to describe
0.277; hence (1 − p)2 > 12 and 27 9 2 27
ii. Starting at e1 and going clockwise around Ci , label the other edges
of Ci as e2 , . . . , ec , where c is the number of edges in Ci .
iii. Add the edges ej with j ≡ 1 (mod 4) and j ≤ c− 3 to Ri . (Comment:
Ri is a matching of Ci and |Ri | = |C4i | .)
iv. If c ≡ 1 (mod 4), then add ec−1 to Ri with probability 14 . (Comment:
Ri remains to be a matching of Ci . Moreover, E[|Ri |] = |Ci4|−1 +1· 41 =
|Ci |
4 .)
v. If c ≡ 2 (mod 4), then add ec−1 to Ri with probability 12 . (Comment:
Ri remains to be a matching of Ci . Moreover, E[|Ri |] = |Ci4|−2 +1· 21 =
|Ci |
4 .)
vi. If c ≡ 3 (mod 4), then add ec−2 to Ri with probability 34 . (Comment:
Ri remains to be a matching of Ci . Moreover, E[|Ri |] = |Ci4|−3 +1· 43 =
|Ci |
4 .)
3. Let R = R1 ∪ · · · ∪ Rr .
Lemma 3. For every triangle Ci in C and for every vertex v of Ci , the following
hold:
1. v is incident to no edge of R with probability (1 − p)2 .
2. v is incident to exactly one edge of R with probability 2p(1 − p).
3. v is incident to exactly two edges of R with probability p2 .
Note that our algorithm processes those cycles Ci of C with |Ci | ≥ 4 as in the
H&R-algorithm. So, we have the following lemma:
4. Let M2 be the set of all edges {u, v} ∈ M1 such that both u and v are of
degree 0 or 1 in graph C − R. Let G2 be the graph (V (G), M2 ).
5. For each odd cycle C of G2 , select one edge uniformly at random and delete
it from G2 .
6. Partition the edge set of G2 into two matchings N1 and N2 .
102 Z.-Z. Chen, R. Tanahashi, and L. Wang
The next lemma will be used to show that for each edge e ∈ M1 , e is included
in the output triangle packing by our algorithm with high probability.
Proof. Assume that the event e = {u, v} ∈ M2 occurs. Let K be the connected
component of G2 that contains e. If K is not an odd cycle, then clearly e is in
M with probability at least 12 ≥ 20 9
. So, assume that K is an odd cycle. We
distinguish two cases as follows:
Case 1: K is an odd cycle of length at least 5. In this case, K must contain a
vertex z ∈ {u, v} such that the cycle in C containing z contains neither u nor v.
Let Bz be the event that the degree of z in the graph C − R is 2. By Statement 1
of Lemma 3 and Statement 2 of Lemma 4, Bz occurs with probability (1 − p)2 or
2 independently of the event e ∈ M2 . Obviously, when Bz occurs, e is contained
1
in M with probability at least 12 . On the other hand, when Bz does not occur,
e is contained in M with probability at least |K|−1 |K| · 2 ≥ 5 . So, the probability
1 2
that e is in M is at least 12 · 12 + 12 · 25 = 20
9
.
Case 2: K is a triangle. In this case, let z be the vertex in K other than u
and v. Note that u, v, and z belong to different cycles in C. Let Bz be the event
that the degree of z in the graph C − R is 2. By Statement 1 of Lemma 3 and
Statement 2 of Lemma 4, Bz occurs with probability (1 − p)2 or 12 independently
of the event e ∈ M2 . Obviously, when Bz occurs, e is definitely contained in M
because of Step 7. On the other hand, when Bz does not occur, e is contained
in M with probability at least 13 . So, the probability that e is in M is at least
2 · 1 + 2 · 3 = 3 > 20 . 2
1 1 1 2 9
10. Classify the cycles C of C into three types: superb, good, or ordinary. Here,
C is superb if |C| = 3; C is good if |C| = 6, |E(C) ∩ M | = 2, and there are
triangles Ci and Cj in C such that |E(Ci )∩E(C)| = 2 and |E(Cj )∩E(C)| = 2;
C is ordinary if it is neither good nor superb.)
11. For each ordinary cycle C in C , choose one edge in E(C) ∩ M uniformly at
random and delete it from C .
12. For each good cycle C in C , change C back to two triangles in C as follows:
Delete the two edges of M ∩ E(C) from C to obtain two paths Q1 and Q2
of length 2, add the edge between the endpoints of Q1 , and add the edge
between the endpoints of Q2 . (Comment: Because of the maximality of C,
this step does not decrease w(C ). Moreover, after this step, each cycle of C
is a triangle.)
We next show that each edge of M1 remains in C after Step 11 with high
probability.
Lemma 7. For each edge e ∈ M such that at least one endpoint of e appears in
a non-triangle in C, e survives the deletion in Step 11 with probability at least 34 .
Proof. Without loss of generality, we may assume that C1 is not a triangle and
contains one endpoint v of e. Because the cycles in C are processed independently
in Step 2, we may assume that C1 is processed after the other cycles in C have
been processed.
Consider the time point t at which our algorithm has just finished processing
all the cycles in C other than C1 . Let S t be the set of all matchings N in the
graph (V (G), M1 ) such that each connected component of the graph obtained
from C − (E(C1 ) ∪ R2 ∪ · · · ∪ Rr ) by adding the edges of N is a path or cycle.
For each matching N ∈ S t , let pt (N ) be the probability that the matching M
constructed in Step 8 equals N . Note that pt (N ) only depends on the random
choices made by our algorithm when processing C1 and later in Steps 5 and 8.
Further let Bet be the event that e is contained in C immediately after Step 11.
Let Set be the set of all matchings N ∈ S t with e ∈ N and pt (N ) > 0. We
claim that for each matching N ∈ Set , Pr[Bet | M = N ] ≥ 34 . If this claim indeed
holds, then
pt (N ) 3
Pr[Bet | e ∈ M ] = Pr[Bet | M = N ] · t
≥
N ∈Set N ∈Set p (N ) 4
which implies the lemma immediately. So, it remains to prove the claim.
To prove the claim, consider an arbitrary matching N ∈ Set . Assume that the
event M = N occurs. Let K be the graph obtained from C−(E(C1 )∪R2 ∪· · ·∪Rr )
by adding the edges of N . Let Q be the connected component of K in which v
appears. Note that Q is a path and v is an endpoint of Q. Let u be the endpoint
of Q other than v. If u does not appear in C1 , then Bet occurs with probability 1.
104 Z.-Z. Chen, R. Tanahashi, and L. Wang
So, assume that u appears in C1 . Then, because |C1 | ≥ 4 and our new algorithm
processes each non-triangle Ci in C in the same way as H&R-algorithm does,
Lemma 2 in [3] guarantees that Bet occurs with probability at least 34 . This
completes the proof of the claim and hence that of the lemma. 2
Lemma 10. Suppose that e = {u1 , v1 } is an edge in M such that both u1 and
v1 appear in triangles in C and both u1 and v1 are incident to exactly one edge
in R. Then, the probability that e is contained in C immediately after Step 11
is at least 34 .
Proof. Without loss of generality, we may assume that C1 (respectively, C2 ) is
the cycle in C to which u1 (respectively, v1 ) belongs. Because the cycles in C are
processed independently in Step 2, we may assume that C1 and C2 are processed
after the other cycles in C have been processed.
Consider the time point t at which our algorithm has just finished processing
all the cycles in C other than C1 and C2 . Let S t be the set of all matchings
N in the graph (V (G), M1 ) such that each connected component of the graph
obtained from C − (E(C1 ) ∪ E(C2 ) ∪ R3 ∪ · · · ∪ Rr ) by adding the edges of N
is a path or cycle. For each matching N ∈ S t , let pt (N ) be the probability that
An Improved Randomized Approximation Algorithm for MTP 105
which implies the lemma immediately. So, it remains to prove the claim.
To prove the claim, consider an arbitrary matching N ∈ Set . Assume that
the events M = N and B1,1 t
occur. Then, Bet occurs with probability at least 12
because each cycle C in the graph C constructed in Step 9 with E(C) ∩ M1 = ∅
contains at least two edges of N . Our goal is to show that Bet occurs with
probability at least 34 . First, we need several definitions:
– Let u2 and u3 be the vertices of C1 other than u1 .
– Let v2 and v3 be the vertices of C2 other than v1 .
– Let H t be the graph obtained from C − (E(C1 ) ∪ E(C2 ) ∪ R3 ∪ · · · ∪ Rr ) by
adding the edges of N . (Comment: The degree of each vertex of V (C1 ) ∪
V (C2 ) in H t is 0 or 1.)
Since N is a matching, there are at most two paths Q in H t such that one
endpoint of Q is in {u2 , u3 } and the other is in {v2 , v3 }. We distinguish three
cases as follows:
Case 1: There is no path Q in H t such that one endpoint of Q is in {u2 , u3 }
and the other is in {v2 , v3 }. In this case, it is easy to see that Bet occurs with
probability 1.
Case 2: There are two paths Q in H t such that one endpoint of Q is in {u2 , u3 }
and the other is in {v2 , v3 }. Without loss of generality, we may assume that H t
contains a path between u2 and v2 and contains another path between u3 and
v3 . Note that each vertex in V (C1 ) ∩ V (C2 ) is incident to an edge in N . So,
exactly one of the following four events occurs:
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v3 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u3 }, {v1 , v2 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v2 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u3 }, {v1 , v3 }, {u2 , u3 }, {v2 , v3 }}.
Obviously, when either of the first two events occurs, e does not appear in a cycle
in the graph C constructed in Step 9 and hence Bet occurs with probability 1.
Moreover, if we concentrate on the random choices made when processing C1
and C2 , the four events occur with the same probability (namely, (1 − p)2 p4 ).
2 4
2(1−p)2 p4 1
Thus, Bet occurs with probability at least 2(1−p) p
4(1−p)2 p4 · 1 + 4(1−p)2 p4 · 2 = 4 .
3
106 Z.-Z. Chen, R. Tanahashi, and L. Wang
(1−p)3 p3 +(1−p)2 p4
2(1−p)3 p3 +4(1−p)2 p4 · 1
2 ≥ 34 .
Case 3.2: Neither u3 nor v3 is incident to an edge in N . In this case, each
vertex in V (C1 ) ∩ V (C2 ) other than u3 and v3 is incident to an edge in N . So,
exactly one of the following nine events occurs:
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v2 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v2 }, {u2 , u3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v2 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v3 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u3 }, {v1 , v2 }, {u2 , u3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v2 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u2 }, {v1 , v3 }, {v2 , v3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u3 }, {v1 , v2 }, {u2 , u3 }}.
– R ∩ (E(C1 ) ∪ E(C2 )) = {{u1 , u3 }, {v1 , v3 }, {u2 , u3 }, {v2 , v3 }}.
Obviously, when one of the first five events occurs, e does not appear in a cycle
in the graph C constructed in Step 9 and hence Bet occurs with probability 1.
As for the last four events, we can say the following:
– Suppose that |E(Q)| = 1. Then, when the sixth event occurs, e appears in
a good cycle in the graph C constructed in Step 9 and hence Bet occurs
with probability 1. Of course, when the ith event with i ∈ {7, 8, 9} occurs, e
appears in an ordinary cycle K in the graph C constructed in Step 9 with
|E(K) ∩ N | ≥ 2 and hence Bet occurs with probability 12 .
An Improved Randomized Approximation Algorithm for MTP 107
Lemma 11. For each e ∈ M1 such that both endpoints of e appear in triangles
in C, e is contained in C immediately after Step 11 with probability at least 320
27
.
Proof. Consider an edge e = {u, v} in M1 such that both u and v appear in a
triangle in C. Let B0 be the event that both u and v are incident to exactly one
edge in R, and let B1 be the event that both u and v are incident to at least one
edge in R and at least one of them is incident to exactly two edges in R.
Note that when B0 or B1 occurs, e is contained in M2 . So, by Lemma 6,
Pr[e ∈ M | E0 ] ≥ 20 9
and Pr[e ∈ M | E1 ] ≥ 20 9
. Moreover, by Statements 2
and 3 of Lemma 3 Pr[E0 ] = 2p(1 − p) · 2p(1 − p) = 4p2 (1 − p)2 and Pr[E1 ] =
p2 ·2p(1−p)+2p(1−p)·p2+p4 = 4p3 −3p4 . Hence, Pr[e ∈ M and E0 ] ≥ 95 p2 (1−p)2
and Pr[e ∈ M and E1 ] ≥ 20 9
(4p3 − 3p4 ).
By Lemma 10, when B0 occurs and e ∈ M , e survives the deletion in Step 11
with probability at least 34 . The crucial point is that when B1 occurs and e ∈ M ,
e survives the deletion in Step 11 with probability 1. Therefore, the probability
that e is contained in C immediately after Step 11 is at least 95 p2 (1 − p)2 · 34 +
20 (4p − 3p ) · 1 = 20 p − 10 p ≥ 320 . 2
9 3 4 27 2 9 3 27
12. If C has at least one path component, then perform the following steps:
(a) Connect the path components of C into a single cycle Y by adding some
edges of G.
(b) Break Y into paths each of length 2 by removing a set F of edges from
Y with w(F ) ≤ 13 · w(Y ).
(c) For each path Q of length 2 obtained in Step 12b, add the edge between
the endpoints of Q.
(Comment: After this step, C is a triangle packing of G.)
13. Let P3 = C .
108 Z.-Z. Chen, R. Tanahashi, and L. Wang
References
1. Chlebı́k, M., Chlebı́ková, J.: Approximating Hardness for Small Occurrence In-
stances of NP-Hard Problems. In: Petreschi, R., Persiano, G., Silvestri, R. (eds.)
CIAC 2003. LNCS, vol. 2653, pp. 152–164. Springer, Heidelberg (2003)
2. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory
of NP-Completeness. Freeman, New York (1979)
3. Hassin, R., Rubinstein, S.: An Approximation Algorithm for Maximum Triangle
Packing. Discrete Applied Mathematics 154, 971–979 (2006)
4. Hassin, R., Rubinstein, S.: Erratum to gAn approximation algorithm for maximum
triangle packingh: [Discrete Applied Mathematics 154 (2006) 971-979]. Discrete Ap-
plied Mathematics 154, 2620–2620 (2006)
5. Kann, V.: Maximum Bounded 3-Dimensional Matching Is MAX SNP-Complete.
Information Processing Letters 37, 27–35 (1991)
6. Raghavan, P.: Probabilistic Construction of Deterministic Algorithms: Approximat-
ing Packing Integer Programs. Journal of Computer and System Sciences 38, 683–
707 (1994)
Line Facility Location in Weighted Regions
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 109–119, 2008.
c Springer-Verlag Berlin Heidelberg 2008
110 Y.K. Cheung and O. Daescu
R2
s2
s1
R3
R1 L1 L2
L
L3
s3
R4
on its characteristics (cost of digging, ownership rights, etc.) From each well, a
spur pipeline is to be connected directly to L, in straight line. Given the x- and
y-coordinates of the wells, the goal is to find the optimal location for the main
pipeline that minimizes the total weighted length of the spurs.
The unweighted case of the problem was studied and solved by Megiddo and
Tamir more than two decades ago [7]. In this case, the goal is to find a line that
minimizes the sum of the Euclidean distances from the points in P to the line.
Megiddo and Tamir showed that, for the unweighted case, the optimal line could
be found in O(n2 log n) time by proving that it must pass through at least two
of the points in P . However, to the best of our knowledge, there is no previous
work for the weighted version discussed in this paper.
The proposed problem is also closely related to the optimal weighted link
problem [2], where the goal is to minimize the weighted length of a line segment
st connecting two given regions, Rs and Rt , of R. In [2], it has been proven
that the problem to minimize the cost S(st) = st∩Rj =∅ wi ∗ di (st) of st can
be reduced to a number of (O(n2 ) in worst case) global optimization problems,
each of which asks to minimize a 2-variable function over a convex domain.
In [4, 5], it has been shown that to minimize the objective function S(st), st
must pass through a vertex of R. By considering each candidate vertex, they
reduced the problem to solving O(n) optimization problems at each vertex. The
√ k ai
objective function can also be expressed in the form 1 + m2 (d0 + i=1 m+b i
),
where d0 , ai and bi are constants, k = O(n), m is the slope of st, and Dm is a
slope interval for the line passing through the vertex. Hence, each subproblem
contains one variable only and can be solved by computing the roots of a poly-
nomial of degree O(n) over the given domain Dm . Unfortunately, this approach
is only practical when the number of fractional terms in S(st) is small. In [5],
a faster approach is suggested, which aims to compute an approximate solution
by bisecting the slope interval and pruning out subproblems that cannot lead to
an optimal solution. Some of the results in [2] were later on generalized in [3]
Line Facility Location in Weighted Regions 111
to more difficult problems, where the line is replaced by a parallel or cone like
beam.
In this paper we first study a special case, in which the slope of L is fixed, and
show that an optimal solution can be found at one of O(ln) well defined locations
called event points. Hence, the optimal line can be computed in O(ln log ln)
time by a simple sweeping line algorithm. For the general case, we show that
the objective function S(L) can be expressed in the form of a summation of a
number of fractional terms, that resembles those in [2, 3]. Similarly to the work
in [2], the problem can be reduced to a number of (O(l2 n2 ) in worst case) 1-
variable optimization problems, which can be solved by either computing the
exact roots of polynomials or by approximation algorithms. Using point-line
duality transforms [9], the feasible domain for each subproblem is an arc or a
line segment on the dual plane.
2 A Special Case
We start with a special case of the proposed problem, where the slope of L
is fixed. Without loss of generality, we assume that L is horizontal. Let ymax
and ymin be the maximum and minimum y-coordinates of the points in P ,
respectively.
Lemma 1. The y-coordinate yL of the optimal line L (L : y = yL ) satisfies
yL ∈ [ymin , ymax ]. In other words, if all points in P are strictly to one side of
L, S(L) cannot be the sought minimum.
Proof. If yL ∈ [ymin , ymax ], we can always find a new line L , such that S(L ) <
S(L). First we translate L towards P until any point in P is reached. Let the
new line be L . Since all points are strictly to one side of L, all orthogonal
links decrease in length, that is, S(L , si ) ≤ S(L, si ), for i = 1, 2, . . . , l, i.e.
S(L ) < S(L). 2
R5 s2
E3
R2 R3 L2
E2
R4
E1
L
R1 L1
s1
Lemma 2. Let Q be the set of intersections between the vertical lines passing
through the points in P and the edges of R. Then there is at least one optimal
solution L for S(L) such that L ∩ (P ∪ Q) = ∅, that is, L passes trough at least
one point in P or Q.
Proof. By Lemma. 1, yL ∈ [ymin , ymax ]. Consider the case that we sweep the
line L upwards from ymin to ymax . We call points in P ∪ Q event points, since
these are the points where we need to update the sweeping process. Let function
be the function of total cost of the orthogonal links from P to L, where x is the
distance swept by L. Now sweep L a small distance δ upwards such that L does
not pass trough any event point.
We have f (x + δ) = f (x) + δ ∗ i=1...l,Li ∩L∩Rj =∅ (wj ∗ N (Li ∩ L)), where
1 if si is below L
N (Li ∩ L) =
−1 otherwise
Hence the first derivative f (x) = i=1...l,Li ∩L∩Rj =∅ (wj ∗N (Li ∩L)) is a constant
between two consecutive event points. This implies that f (x) is piecewise linear
and its slope only changes when L passes though an event point, i.e. local extreme
values can only be found at event points. 2
For example, in Fig. 2, P contains two points, s1 and s2 . Let w1 > w4 > w2 >
w3 > w5 . If we sweep L by a small distance δ, the change of f (x) is (w1 − w4 ) ∗ δ.
Then f (x) is linearly increasing with rate w1 − w4 until L reaches the next event
point E1. Similarly, between event points E1 and E2 , f (x) is linearly decreasing
with rate w2 − w4 , and between E2 and E3 , f (x) is linearly increasing again
with rate w2 − w3 . Between E3 and p2 , f (x) is increasing but with a smaller rate
w2 − w5 . Fig. 3 shows a plot of f (x) for the scenario described above.
f(x)
E3 s2
E1 (w2-w5)
(w2-w4)
(w2-w3)
(w1-w4)
E2
s1
x
Fig. 3. A plot of f (x) for the scenario shown in Fig. 2
Line Facility Location in Weighted Regions 113
Lemma 3. The line L that minimizes S(L) can be computed in O(ln log(ln)) time.
Proof. The optimal solution can be computed by a line sweeping algorithm: (1)
Find out all event points and sort them by the y-coordinate. (2) Compute the
value of f (x) at one event point by brute force. (3) By the piecewise linearity of
f (x), the value of f (x) at successive event points can be calculated in constant
time. There are O(ln) event points. The overall cost is O(ln log(ln)), since sorting
is the dominant step. 2
si
e1
Li e2 L
sr
e3
sr
si
Lj
e1
e2 L
Li
e
e3
Substituting
pi = (bi − mo ai ) and m = −1/mo into (*), we have
k−1 cj
S(Li ) = 1 + m2o ( j=1 mo −m mo +ai
+ck bim 2 +1 +C), where cj and C are constants.
l
j o
M cj l
Hence, S(L) = i=1 S(Li ) = 1 + m2o ( j=1 mo −m j
+ i=1 di bimmo +ai
2 +1 + C),
o
where M = O(n), and cj , di , and C are constants.
Case 2 : If L with slope m does not pass through a fixed point in P , then
L must intersect some orthogonal link Lr , originating at sr ∈ P , on some edge
e : y = me x + pe of R. Again, reset the coordinate system such that sr is the
origin. Let L be y = mx + p (see Fig. 5).
Similarto case 1,we have
k−2 p −pi pj −pi pk−1 −pi
S(Li ) = 1 + m2o ( j=1 wi | moj+1 −mj+1 − mo −mj |+wk−1 | mo −m − mo −mk−1 |) (**).
p−pi
Lr : y = mo x intersects e : y = me x + pe at v = ( mop−m
e
, mo pe ). So we have:
e mo −me
mo p e 1 pe
L:y− =− (x − )
mo − me mo mo − me
1 pe mo p e
y=− x+( + ), and
mo mo (mo − me ) mo − me
Li : y − bi = mo (x − ai )
y = mo x + (bi − mo ai )
Line Facility Location in Weighted Regions 115
Substituting m = − m1o , p = pe
mo (mo −me ) + mo pe
mo −me , and pi = bi − mo ai into
(**), we have:
pj+1 −pi pj −pi pk−1 −pi
S(Li ) = 1 + m2o ( k−2
j=1 wi | mo −mj+1 − mo −mj | + wk−1 | mp−p i
o −m
− mo −mk−1 |)
k−2 p −(bi −mo ai ) pj −(bi −mo ai )
= 1 + m2o ( j=1 wi | j+1mo −m j+1
− mo −mj |+
pe
+ mm o pe −(bi −mo ai ) pk−1 −(bi −mo ai )
wk−1 | mo (mo −me ) o −me
mo + m1o
− mo −mk−1 |)
k−1 cj
= 1 + m2o ( j=1 mo −m + ck ( mop−m
e
− bim
mo +ai
2 +1 ) + C), and thus
j M
e
cj
o
l
S(L) = S(Li ) = 1 + mo ( j=1 mo −mj + i=1 di bim
2 mo +ai
2 +1 + C) (***),
o
where M = O(n) is upper bounded by the number of edges of the subdivision,
and cj , di , and C are all constants.
Thus, both cases have the same mathematical expression for S(L). Obviously,
when we change the slope of L, an orthogonal link may pass through a different
set of edges, and the constants in (***) will change accordingly.
Next, we consider the problem in the dual plane. We use the duality transform
which maps a line L : y = mx + p on the plane onto a point L∗ : (m, p) on the
dual plane and maps a point (a, b) onto the line y = −ax + b on the dual
plane. We will show how to partition the dual plane into cells so that each cell
corresponds to a set of lines L such that (1) L penetrates a fixed sequence of
edges, and (2) all orthogonal links Li from each point si to L have the same
sequence of intersected edges. That is, if L∗ and L∗ belong to the same cell,
Seq(Li , L) = Seq(Li , L ) for all i, where L∗ and L∗ are the duals of L and L .
First, we transform all vertices of R onto the dual plane. The arrangement of
the n dual lines gives us O(n2 ) convex cells on the dual plane. Let Av denote this
arrangement. It is known that for every point L∗ of a given cell, the corresponding
line L in the primal plane intersects the same set of edges (see [2, 3] for details).
To guarantee the second property, consider a special case in which a line L
intersects some orthogonal link Li exactly at some edge e. Let point L∗ be the
si
edge
vj
Li edge
edge
Fig. 6. Moving the intersection point between L and orthogonal link Li along an edge
116 Y.K. Cheung and O. Daescu
mapping of L on the dual plane. Let point L∗a be a point on the dual plane
slightly vertically above L∗ . The line La corresponding to L∗a on the primal
plane has the same slope as L and is slightly above L. That is, with La replacing
L, Li does not intersect with e. Similarly, let L∗b be a point slightly vertically
below L∗ . On the primal plane, when Lb replaces L, Li intersects with e. Hence,
if we transform all lines intersecting with some orthogonal link at some edge
onto the dual plane, the dual plane will be divided into cells such that if L∗ and
L∗ belong to the same cell, the last edge in Seq(Li , L) is the same as the last
edge in Seq(Li , L ) for all i, i.e. in a given cell, Li intersects with L in the same
region, for all i (see Fig. 6).
Let line L : y = mx + p intersect some orthogonal link Li from some fixed
point si : (ai , bi ) at some edge e : y = me x + pe . We have
1
Li : (y − bi ) = − (x − ai )
m
1 ai
y=− x+ + bi
m m
L : y = mx + p
Find the intersection point of L and Li :
1 ai
− x+ + bi = mx + p
m m
bi m − pm + ai
x=
m2 + 1
2
L and Li intersect at v : ( bi m−pm+a
m2 +1
i bi m +ai m+p
, m2 +1 ). Since v ∈ Le , we have
b i m2 + ai m + p bi m − pm + ai
= me + pe
m2 + 1 m2 + 1
bi m2 + ai m + p = me (bi m − pm + ai ) + pe (m2 + 1)
(bi − pe )m2 + (ai + me p − me bi )m + (p − me ai − pe ) = 0
(bi − pe )m2 + (ai − me bi )m − me ai − pe
p=−
me m + 1
Considering all possible combinations of a fixed point si and an edge e ∈ R,
we have an arrangement of O(ln) such curves on the dual plane. Let Ac denote
this arrangement. To find all intersection points between two curves, we need
to solve a cubic equation, which has at most three real roots. Hence, two such
curves can intersect at most 3 times.
However, this is not enough. While the last edge intersected by each orthog-
onal link does not change within a cell of the arrangement Ac defined above,
given a cell of Ac it is still possible for some orthogonal link Li to sweep through
some vertex vj , which would change Seq(Li , L) within the cell (see Fig. 6). This
Line Facility Location in Weighted Regions 117
can be prevented by forbidding the line to rotate through a set of slopes. For
example, in Fig. 6, Li would sweep trough vj . Then, we should not allow L to
rotate through slope −1/mij , where mij is the slope of the line passing though si
and vj . There are ln such slopes. On the dual plane, this is equivalent to adding
ln vertical lines. Let Ar denote this arrangement.
The overall partition to enforce both criteria is the overlapping of Av , Ac and
Ar (see Fig. 7), which is an arrangement of O(ln) curves and O(ln) lines. Notice
that all curves in this partition have constant number of pairwise intersections.
Using the algorithm in [1], the arrangement can be computed in O(ln log(ln)+k)
time and O(ln + k) space, where k is the number cells, which is O(l2 n2 ) in worst
case.
Lemma 4. The global minimum of S(L) can be found on the boundary of the
cells of Av and Ac .
Proof. Consider a sweeping process with a fixed slope m. We have already shown
that the optimal line L, which minimize S(L), must pass through an event point.
On the dual plane, this corresponds to checking all intersections between the
corresponding vertical line x∗ = m and the boundary of the cells of Av and Ac
(the lines and curves of Av and Ac , respectively). If we set m as a variable, a
global minimum should appear on the boundary of the cells of Av and Ac . The
proof follows. 2
min(Lj ∩ Rjq ), over the given feasible domain (the value of min(Lj ∩ Rjq ) can
k
be computed in O(1) time). The lower bound, Simin , of Pi is j=1 Lminj . The
upper bound of Pi could be any sample value of the objective function in the
given domain. If the domain is bounded, we can sample at both endpoints and
choose the smaller value as the lower bound.
Lemma 5. The prune process is safe.
Proof. Consider a subproblem Pi . If the lower bound Simin ≥ S min , then the
subproblem that produces S min can give us a solution at least as good as the
best possible solution given by Pi . Hence, there is no need to consider Pi for
optimization.
4 Conclusion
In this paper, we discussed a facility location problem in weighted regions. We
proved that if the slope of the line L is fixed, we can compute the optimal solution
in O(ln log ln) time, where n is the number vertices of the weighted subdivision
and l is the number of fixed input points. For the general case, in which the
slope of L is not fixed, we showed that the problem can be reduced to O(l2 n2 )
1-dimensional global optimization problems, and proposed a prune-and-search
scheme to effectively deal with those problems.
References
1. Amato, N.M., Goodrich, M.T., Ramos, E.A.: Computing the arrangement of curve
segments: Divide-and-conquer algorithms via sampling. In: Proc. 11th Annual CAM-
SIAM Symposium on Discrete Algorithms, 2000, pp. 705–706 (2000)
2. Chen, D.Z., Daescu, O., Hu, X., Wu, X., Xu, J.: Determining an optimal penetration
among weighted regions in two and three dimensions. J. combinat. Optim. 5(1), 59–
79 (2001)
3. Chen, D.Z., Hu, X., Xu, J.: Computing Beams in Two and Three Dimensions.
Journal of Combinatorial Optimization 7, 111–136 (2003)
4. Daescu, O.: Improved optimal weighted links algorithms. In: Proceedings of ICCS,
2nd International Workshop on Computational Geometry and Applications, pp.
227–233 (2002)
5. Daescu, O., Palmer, J.: Minimum Separation in Weighted Subdivisions. The Inter-
national J. Computat. Geom. & Appl. (Submitted, 2003) (Manuscript)
6. Michel, X.: Cooperative facility location games. In: Proceedings of the eleventh
annual ACM-SIAM symposium on Discrete algorithms SODA 2000(2000)
7. Megiddo, N., Tamir, A.: Finding Least-Distance Lines. SIAM J. ALG. DISC.
MATH. 4(2) (1983)
8. Mitchell, J.S.B., Papdimitriou, C.H.: The weighted region problem: Finding shortest
paths through a weighted planer subdivision. Journal of the ACM 38(1), 18–73
(1991)
9. Preparata, F.P., Shamos, M.I.: Computational Geometry: An Introduction.
Springer, New York (1985)
Algorithms for Temperature-Aware Task
Scheduling in Microprocessor Systems
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 120–130, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Algorithms for Temperature-Aware Task Scheduling 121
after T time units, the cooling system divided by 2 the difference between the
processor’s temperature and the ambient temperature. In this work we assume
that this constant is exactly the length of a unit length job. The general case
will be considered in the full version of this paper.
Different tasks use different microprocessor units in different ways; in partic-
ular, some tasks are more CPU-intensive than other. As a result, the processor’s
thermal behavior – and thus the performance as well – depends on the order of
the task execution. In particular, Yang et al. [10] point out that the accepted
model for the microprocessor thermal behavior implies that, given two jobs,
scheduling the “hotter” job before the “cooler” one, results in a lower final tem-
perature. They take advantage of this phenomenon to improve the performance
of the OS scheduler.
With multitudes of possible underlying architectures (for example, single- vs.
multi-core systems), models for cooling and hardware thermal management, as
well as types of jobs (real-time, batch, etc.), this gives rise to a plethora of
interesting and never yet studied scheduling problems.
We prove that in the offline case computing the optimum schedule is NP-
hard, even if all jobs are released at the same time. In the online case, we show
a 2-competitive deterministic algorithm and a matching lower bound.
the execution of a gadget job, the temperature is exactly 1. This is clearly the
case after execution of the first job, since its heat contribution is 2. Now let u
be the time when a 1.75-job is scheduled, and suppose that at time u − 3 the
temperature was 1. Let (a, b, c) be the matching associated to the slots between
u − 3 and u. Then at time u the temperature is
7 3 7 3
+ α= + > 1/4.
32 2 32 26
This contradicts that a 1.75-job is scheduled at time u + 3, since the temperature
would exceed 1 at u + 4. So we can conclude that the 1.75-jobs are scheduled
every 4-th time unit. This partitions the remaining time slots into blocks of 3
time slots each.
We show now that every block contains exactly one A-job, one B-job and
one C-job, in that order. For a proof by contradiction assume that some A-job
is scheduled at the 2nd position of some block. Its heat contribution is at least
8f (0). The coolest jobs scheduled at position 1 and 3 have heat contribution
2f (0) = 2α at least. Then the temperature at the end of the block is at least
7 α 7 13 7 1
+ + 2α + α = + α= + > 1/4.
64 4 32 4 32 4
This would be too hot for the following 1.75-job. The same argument shows
that A-jobs cannot be scheduled at position 3 in a block, and therefore the 1st
position of a block is always occupied by an A-job. Now we show that a B-job
cannot be scheduled at the 3rd position of some block. This is because otherwise
the temperature at the end of the block would be again at least
7 α 7 7
+ α + + 2α = + α > 1/4.
64 2 32 2
126 M. Chrobak et al.
We showed that every block contains jobs that correspond to some matching
(a, b, c) ∈ A×B×C. It remains to show that each matching satisfies a+b+c = m.
Let (ai , bi , ci ) be the matching corresponding to the i-th block, for 1 ≤ i ≤ n.
Let be ti = (3α − (ai + bi + ci ))/2 + 7/8. Also let be t0 = 1. Then for 1 ≤ k ≤ n
the temperature at the end of time 4k + 1 is
k k−i
1
ti ≤ 1, (1)
i=1
16
For convenience we write pi = 15/16 − ti. Assumption (A2) said that the average
of ai + bi + ci over 1 ≤ i ≤ n is m. Therefore the average of ti (excluding t0 ) is
15/16, and therefore we have
n
pi = 0. (2)
i=1
k
∀1≤k ≤n: 16i pi ≤ 0. (3)
i=1
We will show now that for every i, pi = 0. This would imply that ai + bi +
ci = m, and imply that the matching problem has a solution. For a proof by
contradiction suppose that (pi ) is not all zero. Let be the smallest index such
that p > 0 and
p1 + . . . + p ≥ 0. (4)
p1 + . . . + pk−1 ≤ 0 and pk + . . . + p ≥ 0
and finally
16p1 + 162 p2 + . . . 16−1 p−1 + 16−1 p ≥ 0.
adv. k j −
Fix an instance, and consider both the schedule produced by the algorithm
and some arbitrary schedule, say produced by some adversary. Suppose that the
adversary schedules j at time v. There will be three types of charges.
Type 1 Charges: If the algorithm schedules a job k at time v, charge j to k.
Otherwise, we are idle, and we have two cases.
Type-2 Charges: Suppose that the algorithm is hotter than the adversary at
time v and cooler at v + 1. In this case we charge j to the previous heating step,
by which we mean a time u < v, where either the algorithm schedules a job
which is strictly hotter than the one scheduled by the adversary, or where only
the algorithm schedules something and the adversary is idle.
128 M. Chrobak et al.
Type-3 Charges: Suppose now that the algorithm is hotter than the adversary
at v + 1 or cooler at v (and therefore also at v + 1). Now we argue that j has
been scheduled by the algorithm at some earlier time u: In the case where the
algorithm was cooler at v, j would have been available and we assumed the
algorithm is non-waiting. Now consider the case where the algorithm was hotter
than the adversary at time v + 1. Its temperature is at most 1/2 at that time, so
the temperature of j can be at most 1. So again it would have been executable
at time v. This observation is also true for any job cooler than j, and this will
be useful later.
So let u < v be the execution time of j by the algorithm. To find a job that we
can charge j to, we perform pointer chasing of sorts: If, at time u, the adversary
is idle or schedules an equal or hotter job, then we charge j to itself (its “copy”
in the algorithm’s schedule). Otherwise, let k be the strictly cooler job scheduled
by the adversary at u. Now we claim that the algorithm schedules k at some
time before v. Indeed, if it were still pending at u, since the algorithm never
schedules a dominated job, its deadline is not before the one of j, in particular it
is after v. By our earlier observation it would have been executable at v, so at v
job k is not pending anymore. We iterate to the time the algorithm executes k.
This iteration will end at some point, since we deal with cooler and cooler jobs.
Now we show that any job scheduled by the algorithm will get at most two
charges. Obviously, each job in the algorithm’s schedule gets at most one type-
1 charge. Every chain defining a type-3 charge is uniquely defined by the first
considered job, and therefore type-3 charges are assigned to distinct jobs. This
also holds for type-2 charges, since between any two time steps that satisfy the
condition of the type-2 charge there must be a heating step, so the type-2 charges
are assigned to distinct heating steps.
Now let k be a job scheduled by the algorithm at some time v. By the previous
paragraph, k can get at most one charge of each type. If the adversary is idle
at v, k cannot get a type-1 charge. If the adversary schedules a job j at time
v whose heat contribution is equal or smaller than k’s then k cannot get the
type-2 charge. If it schedules something hotter it cannot get the type-3 charge.
So in total every job scheduled by the adversary is charged to some job sched-
uled by the algorithm, and every job scheduled by the algorithm receives no
more than 2 charges, therefore the competitive ratio is not more than 2.
6 Final Comments
Many open problems remain. Perhaps the most intriguing one is to determine
the randomized competitive ratio for the problem we studied. The proof of The-
orem 3 can easily be adapted to prove the lower bound of 1.5, but we have not
been able to improve the upper bound of 2; this is, in fact, the main focus of our
current work on this scheduling problem.
Extensions of the cooling model can be considered, where the temperature
after executing j is (t + hj )/R, for some R > 1. Even this formula, however, is
only a discrete approximation for the true model (see, for example, [10]), and it
would be interesting to see if the ideas behind our 2-competitive algorithm can
be adapted to these more realistic cases.
In reality, thermal violations do not cause the system to idle, but only to
reduce the frequency. With frequency reduced to half, a unit job will execute for
two time slots. Several frequency levels may be available.
We assumed that the heat contributions are known. This is counterintuitive,
but not unrealistic, since the ”jobs” in our model are unit slices of longer jobs.
Prediction methods are available that can quite accurately predict the heat con-
tribution of each slice based on the heat contributions of the previous slices.
Nevertheless, it may be interesting to study a model where exact heat contribu-
tions are not known.
Other types of jobs may be studied. For real-time jobs, one can consider the
case when not all jobs are equally important, which can be modeled by assigning
weights to jobs and maximizing the weighted throughput. For batch jobs, other
objective functions can be optimized, for example the flow time.
One more realistic scenario would be to represent the whole processes as jobs,
rather then their slices. This naturally leads to scheduling problems with preemp-
tion and with jobs of arbitrary processing times. When the thermal threshold is
reached, the execution of a job is slowed down by a factor of 2. Here, a schedul-
ing algorithm may decide to preempt a job when another one is released or, say,
when the processor gets too hot.
Finally, in multi-core systems one can explore the migrations (say, moving
jobs from hotter to cooler cores) to keep the temperature under control. This
leads to even more scheduling problems that may be worth to study.
References
1. Bellosa, F., Weissel, A., Waitz, M., Kellner, S.: Event-driven energy accounting for
dynamic thermal management. In: Workshop on Compilers and Operating Systems
for Low Power (2003)
2. Choi, J., Cher, C.-Y., Franke, H., Hamann, H., Weger, A., Bose, P.: Thermal-aware
task scheduling at the system software level. In: International Symposium on Low
Power Electronics and Design, pp. 213–218 (2007)
3. Gomaa, M., Powell, M.D., Vijaykumar, T.N.: Heat-and-run: leveraging smt
and cmp to manage power density through the operating system. SIGPLAN
Not. 39(11), 260–270 (2004)
130 M. Chrobak et al.
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 131–142, 2008.
c Springer-Verlag Berlin Heidelberg 2008
132 D. Delling et al.
2 Preliminaries
We assume that G = (V, E) is an undirected, unweighted and connected graph.
Let n := |V |, m := |E|, and C := {C1 , . . . , Cp } a partitioning of V . We call C
a clustering and the Ci clusters of the graph. The set of all possible clusterings
is A(V ). Let E(C) := {{u, v} ∈ E | u, v ∈ Ci } be the set of intra-cluster edges
of C and E(C) := {{u, v} ∈ E | u ∈ Ci , v ∈ Cj , i = j} the set of inter-cluster
edges of C. The cardinalities are indicated by m(C) := |E(C)| and m(C) := |E(C)|.
We call a graph with disjoint cliques a clustergraph and FC , the set of edges to
be added or deleted in order to transform a given graph and clustering C into an
according clustergraph, the cluster editing set of C. When comparing two cluster-
ings we use C and C , with k := |C|, l := |C |. With deg(Ci ) := v∈Ci deg(v) we
indicate the sum of all degrees of nodes within a cluster. All presented measures
are given in a distance version, normalized to the interval [0, 1]. In the following,
we give a short overview of existing comparison techniques. Among them are
measures based on quality and on comparing the partitions of node-sets, the
latter are also called node-structural.
Counting Pairs. In [17] some techniques based on counting pairs are pre-
sented. Summarizing, every pair of nodes is categorized based on whether they
are in the same (or different) cluster with respect to both clusterings. Four sets
are defined: S11 (S00 ) is the set of unordered pairs that are in the same (differ-
ent) clusters under both clusterings, whereas S01 (S10 ) contains all pairs that are
Engineering Comparators for Graph Clusterings 133
in the same cluster under C (C ) and in different under C (C). In the following
we present two representatives for this class: Rand and adjusted Rand measure.
Rand introduced the distance function R given in Equation 1 in [12], it suffers
from several drawbacks. For example, it is highly dependent on the number of
clusters. One attempt to remedy some of these drawbacks, which is known as
adjusted Rand AR and given in Equation 1, is to subtract the expected value
for clusterings with a hypergeometric distribution of nodes, see [11].
where t1 := n11 + n10 , t2 := n11 + n01 , and t3 := (2t1 t2 )/(n(n − 1)) and t1 (t2 )
is the cardinality of all pairs of nodes that are in the same cluster under C (C ).
1 1
k l
N VD(C, C ) := 1 − max mij − max mij (2)
2n i=1 j 2n j=1 i
One major drawback of N VD is that the distance between the two trivial clus-
terings, i. e.,k = 1, l = n, only yields a value of about 0.5. In addition, this
measure suffers from the drawback that only the maximum overlaps contribute,
resulting counter-intuitive examples are given in [10].
one introduced by Fred & Jain [6] and Variation of Information, introduced by
Meila [9].
2I(C,C )
1− H(C)+H(C ) , if H(C) + H(C ) = 0
F J (C, C ) := (4)
0 , otherwise
VI(C, C ) := H(C) + H(C ) − 2I(C, C ) (5)
C C C C1 C1 C2 C2
Fig. 1. The sum of two minor Fig. 2. Two static comparisons of graph cluster-
changes result in a major one ings
Engineering Comparators for Graph Clusterings 135
where t3 := (m(C)m(C ))/m. Note, that m(C) = e11 + e10 and m(C ) = e11 + e01 ,
respectively, hold.
1 1
k l
N VDg (C, C ) := 1 − max mdij − max mdij (7)
4m i=1 j 4m j=1 i
The equivalence of the node- and the graph-structural variant of the normalized
van Dongen measure for regular graphs follows from m = dn/2 and mij = mdij /d.
Edge Entropy. The entropy defined in Section 2 solely depends on the node-
set, thus we extend it to the edge-set using the following paradigm: Instead of
136 D. Delling et al.
randomly picking a node from the graph for measuring the uncertainty, we pick
the end of an edge randomly. As a consequence, a node with high degree has a
greater impact on the distance. The formal definition of edge entropy HE and
edge mutual information IE is given in Equation 8 and 9.
k
HE (C) := − PE (i) log2 PE (i) , (8)
i=1
k
l
PE (i, j)
IE (C, C ) := PE (i, j) log2 , (9)
i=1 j=1
PE (i)PE (j)
where PE (i) := deg(Ci )/2m and PE (i, j) := deg(Ci ∩ Cj )/2m. Note that for
regular graphs, the entropy and the edge entropy coincide. The extensions of
F J and VI are given in Equation 10 and 11.
1 − HE2I E (C,C )
, if HE (C) + HE (C ) = 0
F J g (C, C ) := (C)+H E (C )
(10)
0 , otherwise
VI g (C, C ) := HE (C) + HE (C ) − 2IE (C, C ) (11)
The equivalence of the node- and the graph-structural variant for regular graphs
results from the equality of entropy and edge entropy for complete graphs. Meila
showed in [10] that VI ≤ log2 (n) also holds for weighted clusterings. Since the
degree of a node can be interpreted as node-weight our log2 (n)-normalization
maps to the interval of [0, 1].
Although the extensions introduced in the previous section incorporate the un-
derlying graph structure, they are not suitable for comparing clusterings on
different graphs. As a first step to solve this task, we consider the restriction to
graphs with the same node-set, but potentially different edge-sets. Motivated by
the cluster editing set, we introduce the editing set difference defined in Equa-
tion 12.
|FC ∪ FC | − |FC ∩ FC | |FC ∩ FC |
ESD(C, C ) = =1− (12)
|FC ∪ FC | |FC ∪ FC |
Small cluster editing sets correspond to significant clusterings. By comparing
the two clusterings with a geometric difference, we obtain an indicator for the
structural difference of the two clusterings. It easy to see, that in the case of
static comparison, ESD is a metric.
We evaluate the introduced measures on two setups. The first focuses on struc-
tural properties of clusterings, the second concentrates on qualitative aspects:
Engineering Comparators for Graph Clusterings 137
Initial and Random Clusterings. The tests consist of two comparisons, each
including clusterings with the same expected intrinsic structure of the par-
titions, i. e.,the expected number of clusters and the size of clusters. The
first comparison uses one significant clustering and one uniformly random
clustering, while the second one uses two uniformly random clusterings.
Local Minimization. The setup consists of two parts, each comparing a ref-
erence clustering with a clustering of less significance. The two parts differ
in the significance of the reference clustering.
The intuition of the first test is to clarify the drawbacks of the node-structural
measures, while the second setup verifies the obtained results. We use the attrac-
tor generator introduced in [5] which uses geometric properties based on Voronoi
Diagrams to generate initial clusterings. The Voronoi cells represent clusters and
the maximum Euclidean distance of two nodes being connected is determined by
a perturbation parameter. All tests use n = 1000 nodes and are repeated until
the maximal length of the 0.95-confidence intervals is not larger than 0.1.
1.0
1.0
● ● ● ● ● x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x ● ● x● ● x
+++++++ ● x x x x x x x x x x
measured quality
++ ● ● x
measured quality
+ ● x x x x
●
++
+ ● ●
++ ● ●
++ ● ● ● coverage
x performance
+ ●
++ ● ● + modularity
++ ● ● ●
++ ● ●
+++
+
● coverage ● ●
● ● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ● ● ●
● ●
● ●
x performance ● ● ● ● ●
0.0
+
0.0
modularity ++++++++++++++++++++++++++++++
0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0
ρ ρ
1.0
1.0
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
++++++++++++++++++++++++++++++
measured distance
measured distance
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
0.0
0.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0
ρ ρ
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
● ● ● ● ● ●
++++++++++++++++++++++++
0.2 0.4 0.6 0.8
+++
● ●
++++++++++++++++++++++++
0.2 0.4 0.6 0.8
measured distance
measured distance
+++
● ●
●
● +
+ ●
● +
+ ●
●
●
●
+
+ ●
●
●
●
●
● Rand (g) Fred & Jain (g) ● ● ● Rand (g) Fred & Jain (g)
●
x adj. Rand (g) norm. var. inf. (g) ● ● x adj. Rand (g) norm. var. inf. (g)
● ●
+ van Dongen (g) ESD + van Dongen (g) ESD
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
0.0
0.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0
ρ ρ
1.0
1.0
x●x●x●x●x●x●x●x●xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xx xxx
● xxx x xx xxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxx
0.2 0.4 0.6 0.8 ++++++ ●●●●●●●●● x xx x xxxx x xxxxxxxxxxxxxxxxxx xx
measured quality
+++++ ●
++++ ++ ●●●●●●●●●●●
++ +++ ●●●●
●●● ●
+++++ ● ●●●●
++++++ ●●●●● ●
● ●●● ●
++++++ ● ●●●● ●
++++++++ ●● ●●
●●●●●●●●
++++++++++++ ●●● ●
● ●●●●● ●
● ●●●● ●● ●
● ●●●●●●●
+ ++++++++++ ●●●●●●
●●●●
+ +++ + +++++++++ ●●●●●●●● ●● ●
++++++++++ ++++++++++
● ● ●●●●●
●●●●●●● ● ● ●
+++++++ +++++++++++ ● ●● ● ●●●●●●●●
●●●●●●●●●● ●
++++++++++ + ●●●● ●●●●●●●● ● ●●●●
● coverage ● coverage +++++++++++ + ● ● ●●●●●●●●●●
+++++++++++++++ +
x performance x performance +++++++++++++++
+
+++++++++++++++++
0.0
+ modularity
0.0
modularity
0 100 200 300 400 500 0 100 200 300 400 500
moved nodes moved nodes
1.0
● Rand ● Rand
x adj. Rand x adj. Rand
xx
0.2 0.4 0.6 0.8
+
xxxxxxxx
van Dongen
measured distance
+ van Dongen
xxxxxx xxxxxxx
Fred & Jain
xxxxxxx
Fred & Jain xxxxxx
xxxxxx xxxxxx
xxxxx
norm. var. inf. norm. var. inf.
xxxxx xxx
xxxxx xxxxx
xxxxxxx xxxxx
xxxxx xxxx
xxxx +++++ xxxx +++++++
xxxxx ++++++++ xxxx +++++++
xxxx ++++++++ xxxxxx +++++++
xxxx +++++++ xxxx
xx +++++++
xxx +++++++ xxxx +++++++
xxxxxxx ++++
+ ++++++++ xxx +
+ ++++++++++
+++++ xxx ++++++ +
xxxx +++++++ xxxx +++++++
xxxx +++++++ xxx +++++++
xxxx +++++++ ● ●●
●●●●●●●●●●● ●● xxx +++++++ ●● ●●●●●●●●●●●●●●●●●●●
●●
xxxx+++++++++++++
xx+ ●●●●●●●●●●●●
●●●●●●●●●●●●●●
xxx +++++++++++++ ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●
xx x+
x+ + + + ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
++ xx xx+
x++ ++
+ +●●●●●●●●●●●●●●●●●●
+
0.0
x +
0.0
x●+
+ ●+
●+
x●+ ●●●●●●●●●●●●●● x
x●+
x●+
+ ●+
●+●●●●●●●●●●
0 100 200 300 400 500 0 100 200 300 400 500
moved nodes moved nodes
1.0
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
xxxxxxxxx
xxxxxxx
xxxxx
0.2 0.4 0.6 0.8
measured distance
xxxx
xxx xxxx
xxx xxxxxxx
xx xxxxxxx
xx xxxxxx
xx ●●●●●●●
●●●●
xxxxxxxxxx
●●●●●●● x
x ●●●●●
++++++++ xxxxx ++
x ●●●●●
●●●●●
++++++++ xxxxx +++++++
●●●●●
●●●●●
++++++++ xxxxx +++++++
x ●●●●● +++++++ xxxxx +++++++
x ●●●● ++++++ xxxxx +++++++
+++++++
●
● ++ xxxxx
+++++++
●●●●
●●●● + ●
x x +
+ + ●●●●●●●●●
●●●● +++++++ x ++
x + ●●●●●
+++++++●●●●●●●●●●●●●●●●●●●●●●●●
x ●●●●
●●●●
●●●●
++++++ xxxxx ++++++
x ●●● +++++++ xxxx +++++++ ●●●●●●●●
●
●●●
●●●
++++++ xxxx +++++++
xxxx +++++
++ ●●●●●●
x ●●● +
●●● + ++
+ ++++++ ● Rand (g) Fred & Jain (g)
xxx
x +++
+
+●●●●●●●●●
●●●●●●● ● Rand (g) Fred & Jain (g)
+++++ ●+
● ●
●+
●
●
●●● + x adj. Rand (g) norm. var. inf. (g) xx+
x+ ++ ●●●●● x adj. Rand (g) norm. var. inf. (g)
●+
●+ +++++
●●+
+ van Dongen (g) x●+ x●+
x●+ x●+
x●+ ●●+ ●+
●●+●●●●●
+ van Dongen (g)
0.0
0.0
x●+
+ ●+
●+ ESD x●+
x●+
x●+
+ ESD
0 100 200 300 400 500 0 100 200 300 400 500
moved nodes moved nodes
type 2 the loss of significance is lower. Figure 4 shows the results for all measures
on this specific setup. As shown in Figures 4.3 and 4.4, all node-structural mea-
sures hardly distinguish the two cases. This reveals additional disadvantages.
Evaluating the graph-structural measures (Figures 4.5 and 4.6), the intuitive
behavior of Rand is verified. Furthermore, adjusted Rand and ESD distinguish
both cases very well. The remaining graph-structural measures show the same
behavior as their node-structural counterparts. Thus, the failure of van Dongen
and the Variation of Information is confirmed. Unlike in Section 4.1 Fred & Jain
fails on this setup. The unexpected behavior of the overlap and entropy based
measures may be due to—as mentioned in Section 4.1—the fact that for = 0.5
and = 2.5 attractor graphs have a fairly regular structure. As shown in Section
2 the graph-structural versions of overlap- and entropy-based measures equal the
node-structural variants for regular graphs.
5 Real-World Scenario
Fig. 5. Karlsruhe e-mail graph. Groups refer to the reference clustering, colors to the
clustering obtained by the greedy modularity algorithm.
Engineering Comparators for Graph Clusterings 141
Table 1. Quality scores achieved by the reference clustering and those computed by
the greedy approach and by MCL. The input is the Karlsruhe e-mail graph.
Table 2. Measured distances between reference and two computed clusterings. One
clustering is obtained by MCL, the other one by the greedy modularity algorithm. The
input is the Karlsruhe e-mail graph (cf. Figure 5).
6 Conclusion
both structural and qualitative aspects, they can be used as a foundation for clus-
tering in dynamic scenarios. Summarizing, extensions of node-structural mea-
sures are not trivial and need not lead to intuitive results. Furthermore, our
presented extensions are only suitable for comparing clusterings on the same
graph. In contrast, the editing set distance only requires the same node-set.
Thus, this improves the foundation for dynamic graph clusterings. Concluding,
this work is a first step towards a unifying comparison framework.
References
1. Brandes, U., Erlebach, T. (eds.): Network Analysis. LNCS, vol. 3418. Springer,
Heidelberg (2005)
2. Brandes, U., Gaertler, M., Wagner, D.: Experiments on Graph Clustering Algo-
rithms. In: Di Battista, G., Zwick, U. (eds.) ESA 2003. LNCS, vol. 2832, pp. 568–
579. Springer, Heidelberg (2003)
3. Clauset, A., Newman, M., Moore, C.: Finding community structure in very large
networks. Physical Review E 70(066111) (2004)
4. Cover, T., Thomas, J.: Elements of Information Theory. John Wiley & Sons, Inc.,
Chichester (1991)
5. Delling, D., Gaertler, M., Wagner, D.: Generating Significant Graph Clusterings.
In: European Conference of Complex Systems (ECCS 2006) (2006)
6. Fred, A., Jain, A.: Robust Data Clustering. In: IEEE Computer Society Conference
on Computer Vision and Pattern Recognition, CVPR, pp. 128–136 (2003)
7. Gaertler, M., Görke, R., Wagner, D.: Significance-Driven Graph Clustering. In:
Kao, M.-Y., Li, X.-Y. (eds.) AAIM 2007. LNCS, vol. 4508, pp. 11–26. Springer,
Heidelberg (2007)
8. Jain, A., Dubes, R.: Algorithms for Clustering Data. Prentice Hall, Englewood
Cliffs (1988)
9. Meila, M.: Comparing Clusterings by the Variation of Information. In: 16th Annual
Conference of Computational Learning Theory (COLT), pp. 173–187 (2003)
10. Meila, M.: Comparing Clusterings - An Axiomatic View. In: 22nd International
Conference on Machine Learning, Bonn, Germany, pp. 577–584 (2005)
11. Morey, R., Agresti, A.: The Measurement of Classification Agreement: An Adjust-
ment to the RAND Statistic for Chance Agreement. Educational and Psychological
Measurement 44, 33–37 (1984)
12. Rand, W.: Objective criteria for the evaluation of clustering methods. Journal of
the American Statistical Association 66, 846–850 (1971)
13. Strehl, A., Ghosh, J.: Cluster ensembles – a knowledge reuse framework for com-
bining multiple partitions. J. Mach. Learn. Res. 3, 583–617 (2003)
14. van Dongen, S.: A cluster algorithm for graphs. Tech. Report INS-R0010 (2000)
15. van Dongen, S.: Performance criteria for graph clustering and markov cluster exper-
iments. Technical Report INS-R0012, National Research Institute for Mathematics
and Computer Science in the Netherlands, Amsterdam (May 2000)
16. Vidal, M.: Interactome modeling. FEBS Lett. 579, 1834–1838 (2005)
17. Wagner, S., Wagner, D.: Comparing Clusterings – An Overview. Technical Report
2006-4, Faculty of Informatics, Universität Karlsruhe (TH) (2006)
On the Fast Searching Problem
1 Introduction
Assume that we want to secure a system of tunnels from a hidden intruder. We
can model this system as a graph where junctions correspond to vertices and
tunnels correspond to edges. We will launch a group of searchers into the system
in order to catch the intruder. Let G = (V, E) denote a graph where V is its
vertex set and E is its edge set. In this paper, we only consider finite connected
simple graphs. Definitions omitted here can be found in [13]. We assume that
every edge of G is contaminated initially and our aim is to clean the whole graph
by a sequence of steps. First we place a given set of k searchers on a subset of
V (allowing multiple searchers to be placed on any vertex). Each step of an
edge search strategy consists of either: removing a searcher from one vertex and
placing it on another vertex (a “jump”), or sliding a searcher from a vertex along
an edge to an adjacent vertex.
An edge search strategy is a combination of the moves defined above so that
the state of all edges being simultaneously clean is achieved, in which case we
say that the graph is cleaned. The problem becomes cleaning the graph using the
fewest searchers. The least number of searchers needed to clean the graph is the
edge search number of the graph and is denoted s(G). All models of searching
in this paper are variations of edge searching, so we will normally omit the term
“edge”.
If we are not allowed to remove a searcher from the graph, then we have an
internal search strategy, in which each move is to slide a searcher from a vertex
along an edge, to an adjacent vertex.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 143–154, 2008.
c Springer-Verlag Berlin Heidelberg 2008
144 D. Dyer, B. Yang, and Ö. Yaşar
2 Properties
For any graph G, it is immediate from the definitions that s(G) ≤ sf (G). The gap
sf (G) − s(G) is zero for some graphs. For Kn , the complete graph on n vertices,
it is straightforward to show that sf (Kn ) = s(Kn ) = n if n ≥ 4. Furthermore,
it is known that the edge search number is critical for complete graphs, that is,
deleting a single edge from Kn will reduce the search number by one. We can
show that this also holds for the fast search number.
On the Fast Searching Problem 145
11
00 1
0 1
0 1
0
00
11 0
1 0
1 0
1
00
11 0
1 0
1 0
1
1
0 11
00 11
00 1
0
0
1 00
11 00
11 0
1
11
00 1
0 1
0 1
0
00
11 0
1 0
1 0
1
00
11 0
1 0
1 0
1
Fig. 1. The graph G on the left and its subgraph H on the right where sf (G) = 3 and
sf (H) = 5
146 D. Dyer, B. Yang, and Ö. Yaşar
3 Trees
For any graph G = (V, E), since v∈V deg(v) = 2|E|, we know that the number
of odd degree vertices in G must be even. For a tree T , the following algorithm
TP(T ) partitions T into edge disjoint paths such that the two end vertices of
each path have odd degree in T .
Algorithm TP(T )
1. Initially i = 1.
2. Arbitrarily select a leaf u in T . Let uv ∈ E(T ) be the edge incident on u.
Mark uv with color i and set T ← T − uv.
3. If v is an isolated vertex in T , then go to Step 4; otherwise, let vw ∈ E(T )
be an edge incident on v. Mark vw with color i, T ← T − vw, v ← w, and
go to Step 3.
4. If there is no leaf in T , then stop; otherwise, set i ← i + 1 and go to Step 2.
Lemma 2. The Algorithm TP(T ) defines a valid coloring for T and the edges
with the same color form a path such that the two end vertices of this path have
odd degree.
Proof. From Step 2, after an edge is colored, then it is deleted from the graph.
Thus every edge is colored at most once. Since the algorithm keeps running as
long as there is a leaf, every edge must be colored. Hence every edge is colored
exactly once. Let Pi be the graph formed by all the edges with color i. From
Step 3, we know that Pi is a path. From Steps 2 and 3, we know that both end
vertices of P1 have degree 1. Note that after we delete each edge of P1 from T ,
the odd-even degree state of each vertex in T does not change except for the end
vertices of P1 . Thus, a leaf vertex chosen by the algorithm as a start vertex for
P2 corresponds to either a leaf in the original T or a vertex with odd degree in T ,
and similarly, the other end vertex of P2 found by the algorithm also corresponds
to either a leaf in the original T or a vertex with odd degree in T . This holds for
every Pi , i ≥ 2. Hence both end vertices of every path have odd degree in T .
Using the decomposition of Algorithm TP, we can compute a fast search strategy
as follows.
Algorithm FS(T )
1. Call TP(T ). Let k be the number of colors used by TP(T ) and Pi , 1 ≤ i ≤ k,
be the path formed by all edges with color i.
On the Fast Searching Problem 147
take linear time. In Step 3, after a searcher slides along an edge, we can delete this
edge immediately. Since each edge is deleted exactly once, we know that Steps 3
and 4 take linear time.
We can construct an infinite family of trees for which the gap between the search
number and the fast search number is big.
Example 2. Let T1 = K1,3 . Take three copies of T1 and choose a vertex of
degree one from each copy. Identify these three vertices to construct T2 . Continue
in an inductive fashion. Thus Tk is constructed from three copies of Tk−1 by
identifying a vertex of degree one from each copy.
By Parson’s lemma in [12], we can show that s(Tk ) = k + 1. Also, each vertex
in Tk are of degree 1 or 3. Thus V (Tk ) = Vo (Tk ). Since |V (Tk )| = 3k + 1, by
k
Theorem 1 we have sf (Tk ) = 3 2+1 .
4 Bipartite Graphs
Lemma 4. If 1 ≤ m ≤ n, then
⎧n
⎪
⎪ 2 , m = 1,
⎨
2, m = n = 2,
sf (Km,n ) =
⎪
⎪ 3, m = 2, n ≥ 3,
⎩
6, m = 4, n ≥ 4.
searchers are placed on the graph. Clean all vertices in V2 except for un with
the same strategy used in Case 1. Observe that the only contaminated edges are
the ones incident to un and there is a searcher located on each vertex in V1 . We
let λ2 slide along v1 un and clean v1 . Then let λ3 slide along v2 un and clean v2 .
Similarly we clean all vertices in V1 and finally clean un .
Case 3: n = 4k + 3. Once again place the searchers as in Case 1. Place
another searcher on vm . Hence we used m + 1 + n−3 n+1
2 + 1 = m + 2 searchers.
Use the same strategy as in Case 1 to clean every vertex in V2 except for un−1
152 D. Dyer, B. Yang, and Ö. Yaşar
5 Cost Function
Given a graph G = (V, E), let s be the number of searchers used in a search
strategy to clean G. Certainly, s(G) ≤ s. For each value of s, there is a strategy
that clears G in the minimum number of steps; that is, the minimum time. We
define the minimum number of steps for each s to be t(s). Certainly, |E| ≤ t(s).
In some real-life scenarios, the cost of a searcher may be relatively low in
comparison to the cost of allowing an intruder to be free for a long period of
time. Thus, it may be beneficial to use more searchers than s(G). Since the
minimum number of steps to clear a graph is |E| (each edge must be cleared),
it will never be necessary to use more searchers than the minimum needed to
clear the graph in |E| steps. So we can bound the number of searchers above by
sf (G), giving s ≤ sf (G).
When we construct a cost function for searching we may consider the following
parameters: α, cost per searcher; β, cost per searcher per step; and γ, cost per
step. Several combinations of these parameters above can be considered. Fomin
and Golovach [7] introduced a cost function in the node searching problem, which
is the sum of the number of searchers in every step of the node search process.
For a fixed graph G, we choose to consider the following cost function in the
edge searching problem:
vertex, using s moves. They would then use 2 moves, moving out from and then
back towards the central vertex, for each of n − 2s pendant edges. Finally, each
searcher would move out from the central vertex along one of the s remaining
pendant edges.)
Substituting into (1), we obtain
CK1,n (s) = αs + βs(2n − 2s) + γ(2n − 2s) = −2βs2 + (α + 2nβ − 2γ)s + 2nγ. (2)
But this is clearly a quadratic function in s, which has a maximum value at its
critical point. We obtain its minimum value at the minimum or maximum value
for s, that is when either s = 2 or s = n2 . (Both are possible depending on
choice of α, β, and γ.)
More informally, the cost of cleaning the n-stars is minimized by either treat-
ing it as an edge searching problem, when searchers are expensive and time is
cheap, or by treating it as a fast searching problem when searchers are cheap
and time is expensive.
References
1. Alspach, B., Dyer, D., Hanson, D., Yang, B.: Lower bounds on edge searching. In:
Chen, B., Paterson, M., Zhang, G. (eds.) ESCAPE 2007. LNCS, vol. 4614, pp.
516–527. Springer, Heidelberg (2007)
154 D. Dyer, B. Yang, and Ö. Yaşar
2. Barrière, L., Flocchini, P., Fraigniaud, P., Santoro, N.: Capture of an intruder by
mobile agents. In: Proceedings of the 14th annual ACM symposium on Parallel
algorithms and architectures (SPAA 2002), pp. 200–209 (2002)
3. Barrière, L., Fraigniaud, P., Santoro, N., Thilikos, D.: Searching is not Jumping. In:
Bodlaender, H.L. (ed.) WG 2003. LNCS, vol. 2880, pp. 34–45. Springer, Heidelberg
(2003)
4. Bienstock, D., Seymour, P.: Monotonicity in Graph Searching. Journal of Algo-
rithms 12, 239–245 (1991)
5. Breisch, R.L.: An intuitive approach to speleotopology. Southwestern Cavers 6,
72–78 (1967)
6. Chung, F.: On the cutwidth and the topological bandwidth of a tree. SIAM J.
Algebraic Discrete Methods 6, 268–277 (1985)
7. Fomin, F.V., Golovach, P.A.: Interval completion and graph searching. SIAM Jour-
nal on Discrete Mathematics 13, 454–464 (2000)
8. Fomin, F.V., Thilikos, D.M.: An annotated bibliography on guaranteed graph
searching. Theoretical Computer Science, Special Issue on Graph Searching (sub-
mitted on November 2007)
9. Kinnersley, N.G.: The Vertex Separation Number of a graph equals its path-width.
Information Processing Letters 42, 345–350 (1992)
10. LaPaugh, A.S.: Recontamination does not help to search a graph. Journal of
ACM 40, 224–245 (1993)
11. Megiddo, N., Hakimi, S.L., Garey, M.R., Johnson, D.S., Papadimitriou, C.H.: The
Complexity of Searching a Graph. Journal of ACM 35, 18–44 (1988)
12. Parsons, T.: Pursuit-evasion in a graph. In: Theory and Applications of Graphs.
Lecture Notes in Mathematics, pp. 426–441. Springer, Heidelberg (1976)
13. West, D.B.: Introduction to Graph Theory. Prentice Hall, Englewood Cliffs (1996)
14. Yang, B., Dyer, D., Alspach, B.: Sweeping graphs with large clique number. In:
Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 908–920.
Springer, Heidelberg (2004)
Confidently Cutting a Cake into
Approximately Fair Pieces
1 Introduction
The classic cake cutting problems originated in the 1940’s in the Polish mathe-
matics community and involves fairly apportioning valuable resources (the cake)
when there is not an agreed upon value of the resources. The analogy of cake
was used because of the well known phenomenon of people valuing frosting and
cake differently. Cake cutting is widely studied within the social sciences because
of the obvious importance of fairly dividing resources, and is widely studied in
the mathematical sciences because of the elegance of the problems. There are
several books written on cake cutting, and related fair allocation problems (See,
for example, [3,12]). Because of the inherent interest of cake cutting problems to
a wide audience, cake cutting is often taught in discrete mathematics courses,
and often appears in the media in shows that try to popularize mathematics.
For example, in the “One Hour” episode of the TV show Numb3rs, the lead FBI
agent uses his understanding of cake cutting algorithms to deduce the portion
of the ransom received by the head of a kidnapping conspiracy. 1
The setting for the cake cutting problem involves a continuous resource mod-
eled by the unit interval, n players, a value function Vp for each player p, and
a referee protocol. The value function for each player specifies how much that
player values each subinterval of the cake. A piece is a union of disjoint subin-
tervals, and the value function is additive, so that the value of a piece is the sum
of the values of the underlying subintervals. The value functions are initially
unknown to the referee. The standard operation is a cut query, in which the
Supported in part by NSF grants CNS-0325353, CCF-0514058 and IIS-0534531.
1
Although, as is often the case in this show, the application of mathematics is designed
to aid the plot development, and is not necessarily designed to satisfy mathemati-
cian’s sensibilities.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 155–164, 2008.
c Springer-Verlag Berlin Heidelberg 2008
156 J. Edmonds, K. Pruhs, and J. Solanki
referee asks the player to identify the shortest subinterval with a fixed value and
a fixed left endpoint. We assume here that the players answer queries honestly
(for more discussion of this issue, see section 2). After the cut queries, the referee
partitions the resulting subintervals among the players. The referee’s goal is to
fairly apportion the cake among the players. There are several notions of fairness
in the literature, but the original, and most basic, notion is that of proportional
fairness. An apportionment is proportionally fair, or simply proportional if each
player believes that his piece is worth at least 1/n of the total value of the cake,
according to that player’s value function. In this paper, we consider the notion
of approximate fairness. We will say that an apportionment is c-fair fair if each
player believes that his piece is worth at least 1/(cn) of the total value of the
cake, according to that player’s value function. We will say that a referee protocol
is approximately fair if there exists some constant c ≥ 1 such that the protocol
guarantees a c-fair apportionment. We are interested in the query complexity of
a referee protocol, which is the worst-case number of queries required to achieve
a fair allocation for each player.
A deterministic proportional protocol with query complexity Θ(n2 ) was given
in 1948 by Steinhaus in [14]. In 1984, Even and Paz [6] gave a deterministic
divide and conquer proportional protocol that has query complexity Θ(n log n).
Recently, there has been several papers [7,13,4] that give lower bounds on the
query complexity for proportional cake cutting. Sgall and Woeginger [13] showed
that every proportional protocol (deterministic or randomized) has query com-
plexity Ω(n log n) if each player must receive a contiguous piece of the cake.
Edmonds and Pruhs [4] show that the query complexity of every deterministic
approximately-fair protocol is Ω(n log n).
This left open the question of whether approximate-fairness was achievable
by a randomized protocol with query complexity O(n). In the subsequent paper
[5], Edmonds and Pruhs was settled this question in the affirmative by giving a
randomized approximately-fair protocol with expected query complexity O(n).
This protocol was based on the following theorem:
Lemma 1 (Balanced Allocation Lemma [5]). Let α ≥ 17 be some suffi-
ciently large constant. Assume each of the n players conceptually partitions the
unit interval into αn disjoint candidate subintervals/pieces of equal value. Then
assume that each player independently picks d = 2d = 4 of her candidate pieces
uniformly at random, with replacement. Then there is an efficient apportionment
method that, with probability Ω(1), assigns each player one final piece of her d
candidate pieces, so that every point on the cake is covered by at most 2 players.
Once overlap of O(1) is achieved for every point of the cake, one can achieve
approximate fairness with linearly more queries by using any proportional al-
gorithm to apportion the portions of cake where there is contention among the
final pieces. By applying the Edmonds and Pruhs Balanced Allocation Theorem
until a successful apportionment is possible, one get expected query complexity
of O(n). This is because each application of the Balanced Allocation Theorem
has complexity O(n), and the number of applications until a success is a geo-
metrically distributed random variable with probability of success Ω(1).
Confidently Cutting a Cake into Approximately Fair Pieces 157
However, several referees of [5] complained that in order to have high con-
fidence of success one would have to apply the Balanced Allocation Theorem
Ω(log n) times, and thus if one accepts the requirement that a randomized al-
gorithm should succeed with high probability, then this randomized algorithm
would have no better query complexity than the Evan and Paz deterministic
algorithm. In the context of this paper, high probability of success means that
the probability of failure, as a function of n, should approach zero as n increases.
In this paper, we answer the referees of [5] by showing the following high
confidence version of the Balanced Allocation Lemma in [5].
The lower bound proofs in [13,4] also allow the referee to make evaluation queries,
which ask a player to state their value for a particular piece. Edmonds and
Pruhs [4] also showed that every randomized approximately-fair protocol has
query complexity Ω(n log n) if answers to the queries asked by protocol are
approximations to actual answers. Approximately fair protocols were introduced
by Robertson and Webb [11]. There is deterministic protocol [11,10,15] that
achieves approximate-fairness with Θ(n) cuts and Θ(n2 ) evaluations. There are
several other notions of fairness studied in the cake cutting setting, most notably
envy-free fairness. There are known finite complexity protocols for envy-free
divisions, but no bounded complexity protocols are known (See, for example, [3]
for details). The cake cutting problem is often defined so that the players do
not need to answer the queries truthfully. For deterministic protocols, lying is
generally a non-issue since it is easy to catch any form of lying that would mess
up the standard protocols (See [3] for details). But for randomized protocols, it
seems much more difficult to catch cheaters.
158 J. Edmonds, K. Pruhs, and J. Solanki
In the multiple-choice balls and bins model, d of αn discrete bins are selected
for each ball uniformly at random. Then we select one bin out of d bins such
that maximum number of balls in any bin is minimized. There is an efficient
procedure, essentially a matching algorithm for a bipartite graph, that picks one
of the d bins for each player so that maximum number of balls in any bin is O(1),
1
with probability (1−O( poly(n) )). [2]. The balls and bins model is equivalent to the
special case of the cake model in which all the players value the cake uniformly.
Analysis of the balls and bins model has found wide applications in areas such
as load balancing [8]. In these situations, a ball represents a job that can be
assigned to various bins/machines/servers. Roughly speaking, load balancing of
identical machines is to balls and bins, as load balancing on unrelated machines
is to cake cutting. In the unrelated machine model, the speed that a machine
runs a job depends on the job. So the jobs may not agree on the values of the
various machines. Unrelated machines is one of the standard models in the load
balancing literature [1].
In the balls and bins model, the maximum number of balls in any bin is
θ( logloglogn n ) with probability (1 − O( poly(n)
1
)) [9]. Assume n balls are thrown se-
quentially into n bins, each ball is placed in the least full bin at the time of the
placement, among d bins, d ≥ 2, chosen independently and uniformly at random.
Then after all the balls are placed, the maximum number of balls in any bin is
θ( logloglogd n ) with probability Ω(1 − poly(n)
1
). [2].
We now outline the protocol and analysis that establishes the Balanced Alloca-
tion Lemma in [5]. Note this protocol uses two graphs, the implication graph,
and the same-player-vee graph, and some graph theoretic definitions, that we
will define after the protocol.
Edmonds-Pruhs Protocol:
– Step 1: Independently, for each player p ∈ [1, n] and each r ∈ [0, 1], ran-
domly choose d = 2 of the candidate pieces cp,i to be in the quarterfinal
bracket Ap,r . Thus each player has two quarterfinals brackets, each con-
taining two intervals.
– Step 2: In each quarterfinal bracket Ap,r , pick as the semifinal piece ap,r ,
the piece that intersects the fewest other candidate pieces cq,j . Thus each
player is left with two semifinal intervals.
– Step 3: Form the implication graph and same-player-vee graph for the semi-
final pieces
– Step 4: If implication graph contains a pair path of length greater than or
equal to 3, then admit failure.
– Step 5: If same-player-vee graph is not w = 2 colorable, then admit failure.
– Step 6: Let Sh be the subgraph of the implication graph containing only
those players colored h, in the same-player-vee graph. This ensures that
implication graph restricted to Sh contains no pair paths of length 2.
Confidently Cutting a Cake into Approximately Fair Pieces 159
– Step 7: For each Sh , pick the final piece for each player involved in Sh by
applying the Final Piece Selection Algorithm to Sh .
We now turn to the graph theoretic notions used in this protocol. The vertices
of the implication graph IG are the 2n pieces ap,r , 1 ≤ p ≤ n and 0 ≤ r ≤ 1,
and if piece ap,r intersects piece aq,s , then there is a directed edge from piece
ap,r to piece aq,1−s , and similarly from aq,s to ap,1−r . The intuition behind
the this definition is that if a player p gets ap,r as her final piece, then player
q must get piece aq,1−s if p’s and q’s pieces are not to overlap. Similarly if
q gets aq,s , then p must get ap,1−r . As an example, Figure 1 gives a subset
of the semifinal pieces selected from the candidate pieces. The corresponding
implication graph is also given in Figure 1. A pair path in an implication graph
is a directed path between two pieces for one player.
a <4,0> a<4,1>
a <3,0> a<3,1>
a <2,1> a <2,0>
a <1,0> a <1,1>
In Figure 1, there are two pair paths of length three from the first player’s left
semifinal piece to her right and two pair paths of length two from the fourth player’s
left semifinal piece to her right. Pair paths are problematic because they effectively
imply that if the first player gets her left semifinal piece as his final piece then she
must get her right piece too. Edmonds and Pruhs [5] prove that if the implication
graph IG does not contain pair paths then the following algorithm selects a final
piece for each player in such a way that these final pieces are disjoint.
n z
n 1 1
Prob[IG contain pair paths] ≈ ≈ .
z=2
z αn α(α − 1)
160 J. Edmonds, K. Pruhs, and J. Solanki
Lemma 3. If each player only chooses 2 semifinal pieces then the expected num-
ber of vees in IG can be as high as Θ(n2 ), which would be disastrous. However,
if two brackets of d = 2 pieces are chosen and these are narrowed down to two
3
semifinal piece then the expected number of vees in IG is at most 16d
α2 n.
Using Lemma 3 [5] proved the following lemma that bounds the probability of
implication graph having pair paths of length three or more.
Lemma 4. The probability that the implication graph IG contains a pair path
32d5
of length at least three is at most α2 (α−4d 2) .
A pair path of length two occurs if and only if the implication graph con-
tains a same-player-vee. A same-player-vee is a vee where both of the base
pieces belong to the same player. That is, there is a center piece ap,r and
two bases aq,0 and aq,1 . For example, see pieces a4,0 , a2,0 and a2,1 in
Figure 1. To get around the problem of same-player-vees, they introduced the
same-player-vee graph. The vertices of the same-player-vee graph SG are the
n players p, 1 ≤ p ≤ n, and if player p and player q are involved in same-
player-vee with player p in the center then there is a directed edge from p
to q. [5] show how to partition the players into two groups such that there
is no same-player-vee involving two players in the same partition. [5] proved
Lemma 5 by bounding the probability of same-player-vee graph having a path of
length two.
Finally, because the implication graph on Sh contains no pair paths of any length,
the Edmonds-Pruhs protocol ensures that the final piece of at most one player
from Sh covers this point. We can then conclude that for any point in the cake,
the final pieces of at most w = 2 players cover this point.
Confidently Cutting a Cake into Approximately Fair Pieces 161
Thus the probability that the Modified-Edmonds-Pruhs protocol does not suc-
ceed after k applications is at most O( n1k ).
To us, the most obvious way to modify the Edmonds-Pruhs protocol to obtain
a high confidence result was to show that the same-player-vee graph is O(1)-
colorable with high probability, and to show that the implication graph does not
have a pair-path with high probability. We were able to accomplish the former
in Lemma 6 by slightly modifying the protocol. But the latter is unfortunately
false, there can be pair-paths with high probability.
162 J. Edmonds, K. Pruhs, and J. Solanki
Protocol
........
Execution 1
E E
X X
E E
Run 1 Run 2
C C
U U
Bracket 1: Each player randomly Bracket 2: Each player randomly Bracket 1: Each player randomly Bracket 2: Each player randomly T T
select a bracket of d pieces of select a bracket of d pieces of select a bracket of d pieces of select a bracket of d pieces of I I
value α1n value α1n value α1n value α1n O
O
N N
2 k
Select one semifinal Select one semifinal Select one semifinal Select one semifinal
piece from Bracket 1 piece from Bracket 2 piece from Bracket 1 piece from Bracket 2
From 2n semfinal pieces, build implication From 2n semfinal pieces, build implication
graph IG and same−player−vee graph SG graph IG and same−player−vee graph SG
Remove bad players from IG and SG Interaction Remove bad players from IG and SG
........
If some player is bad in
both the runs then HALT
Colour SG with red and blue colours Colour SG with red and blue colours
IG for red players IG for blue players IG for red players IG for blue players
After some reflection, it is clear that a pair path in the implication graph, in and
of itself, is not a problem. A pair path from ap,r to ap,1−r just implies that we
should select ap,1−r for player p. However, a directed path in both directions,
from ap,0 to ap,1 and from ap,1 to ap,0 is problematic since the selection
of either piece requires the selection of the other. This leads us to the following
definition.
Pair Cycle:A pair cycle in the implication graph is a directed cycle containing
both semifinal pieces ap,0 and ap,1 for some player p.
It is not to difficult to see that if the implication graph IG does not contain
pair cycle then one can modify the Final Piece Selection Algorithm so that
it can select a disjoint final piece for each player. Further, if the edges in the
implication graph were independent, using our standard calculations, we find
that the probability of a pair-cycle would be O( n1 ):
n z
n 1 1
Prob[IG contain a pair cycle] ≈ ≈Θ
z=2
z − 1 αn n
The reason that this calculation gives Θ(1) for a pair-path and Θ( n1 ) for a
pair-cycle is that a pair-cycle has one more edge relative to the number of ver-
tices than does a pair-path. While we know that the edges are not independent,
this calculation did give approximately the right probability for a pair-path,
and we the saw no reason why this calculation shouldn’t also give approxi-
mately the right calculation for a pair-cycle. This led us to the following natural
conjecture:
Conjecture 1. The probability that for some player p, we have pair paths of
length at least three from ap,0 to ap,1 and from ap,1 to ap,0 in the implica-
tion graph IG is at most O( n1 ).
Recall that pair cycle requires that at least one player’s both semifinal pieces
have to be present in it. In Lemma 7, we were able to prove Conjecture 1 in
the case where exactly one player’s both semifinal pieces are present in the pair
cycle.
Lemma 7. The probability that for some player p we have pair paths of length
at least three from ap,0 to ap,1 and from ap,1 to ap,0 in the implication
graph IG and except player p there is no common player involved in both the
pair paths, is at most O( n1 ).
Our intuition is that the probability of having more than one player repeating
in a pair cycle is not so high. But we are unable to prove this. More generally,
we wonder whether the selection of the semifinal pieces from the quarterfinal
pieces (by throwing out pieces that overlap the most other pieces) leave with
a collection of pieces that essentially have the same graph properties as in the
balls and bins model.
164 J. Edmonds, K. Pruhs, and J. Solanki
References
1. Azar, Y.: On-line Load Balancing. In: Online Algorithms - The State of the Art,
pp. 178–195. Springer, Heidelberg (1998)
2. Azar, Y., Broder, A., Karlin, A., Upfal, E.: Balanced Allocations. SIAM Journal
of Computing 29, 180–200 (2000)
3. Brams, S.J., Taylor, A.D.: Fair Division – From cake cutting to dispute resolution.
Cambridge University Press, Cambridge (1996)
4. Edmonds, J., Pruhs, K.: Cake cutting really isn’t a piece of cake. In: Proceedings
of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2006)
(2006)
5. Edmonds, J., Pruhs, K.: Balanced Allocations of Cake. In: Proceedings of the 47th
Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), pp.
623–634 (2006)
6. Even, S., Paz, A.: A note on cake cutting. Discrete Applied Mathematics 7, 285–296
(1984)
7. Magdon-Ismail, M., Busch, C., Krishnamoorthy, M.S.: Cake cutting is not a piece
of cake. In: Alt, H., Habib, M. (eds.) STACS 2003. LNCS, vol. 2607, pp. 596–607.
Springer, Heidelberg (2003)
8. Mitzenmacher, M., Richa, A., Sitaraman, R.: The power of two random choices: A
survey of the techniques and results. In: Pardalos, P., Rajasekaran, S., Rolim, J.
(eds.) Handbook of Randomized Computing, Kluwer, Dordrecht (2000)
9. Johnson, N., Kotz, S.: Urn Models and Their Application. John Wiley and Sons,
Chichester (1977)
10. Krumke, S.O., Lipmann, M., de Paepe, W., Poensgen, D., Rambau, J., Stougie,
L., Woeginger, G.J.: How to cut a cake almost fairly. In: Proceedings of the 13th
Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2002), pp. 263–
264 (2002)
11. Robertson, J.M., Webb, W.A.: Approximating fair division with a limited number
of cuts. Journal of Combinatorial Theory, Series A 72, 340–344 (1995)
12. Robertson, J.M., Webb, W.A.: Cake-cutting algorithms: Be fair if you can. A.K.
Peters Ltd. (1998)
13. Sgall, J., Woeginger, G.J.: A Lower Bound for Cake Cutting. In: Di Battista, G.,
Zwick, U. (eds.) ESA 2003. LNCS, vol. 2832, pp. 459–469. Springer, Heidelberg
(2003)
14. Steinhaus, H.: The problem of fair division. Econometrica 16, 101–104 (1948)
15. Woeginger, G.J.: An approximation scheme for cake division with a linear number
of cuts. In: Möhring, R.H., Raman, R. (eds.) ESA 2002. LNCS, vol. 2461, pp.
896–901. Springer, Heidelberg (2002)
Copeland Voting Fully Resists
Constructive Control
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 165–176, 2008.
c Springer-Verlag Berlin Heidelberg 2008
166 P. Faliszewski et al.
1 Introduction
Preference aggregation by voting procedures has been the focus of much atten-
tion within the field of multiagent systems. Agents (called voters in the context of
voting) may have different, often conflicting individual preferences over the given
alternatives (or candidates). Voting rules (or, synonymously, election systems)
provide a useful method for them to come to a “reasonable” decision on which
alternative to choose. One key issue here is that there might be attempts to
influence the outcome of elections. Settings in which such influence on elections
can be implemented include manipulation [3,17], electoral control [2,9,10,11,17],
and bribery [7,9].
Bribery and control are settings in which an external actor seeks to influ-
ence the outcome of an election. In bribery, the briber tries to reach his or her
goal via bribing some of the voters to change their preferences (i.e., via bribing
them to cast their votes as the briber says). In control scenarios, the external
actor—often referred to as “the chair”—attempts to influence the outcome of
elections by modifying their structure, via such actions as adding, deleting, or
partitioning either candidates or voters. In contrast, there is no external actor in
manipulation; rather, a group of voters, the manipulators, attempt to cast their
votes insincerely in order to achieve their desired goal.
Although reasonable election systems typically are susceptible to these kinds
of influence (for manipulation this is, essentially, universally true, via the
Gibbard–Satterthwaite and Duggan–Schwartz Theorems), computational com-
plexity can be used to provide some protection in each such setting. We study
the extent to which the Copeland election system [4] (see also [18,15]; a similar
system was also studied by Zermelo [19]) resists, computationally, control and
bribery attempts.
An election is specified by a finite set C of candidates and a finite collection
V of voters, where each voter has preferences over the candidates. We consider
both rational and irrational voters. The preferences of a rational voter are ex-
pressed by a preference list of the form a > b > c (assuming C = {a, b, c}),
where the underlying relation > is a strict linear order that is transitive. The
preferences of an irrational voter are expressed by a preference table that for
any two distinct candidates specifies which of them is preferred to the other
by this voter. An election system is a rule that determines the winner(s) of
each given election (C, V ). In this paper we consider a parameterized version of
Copeland’s election system [4], denoted Copelandα , where the parameter α is
a rational number between 0 and 1 that specifies how ties are rewarded in the
head-to-head majority-rule contests between any two distinct candidates. This
parametrized version of Copeland’s system is due to Faliszewski et al. [9].
points. Let E = (C, V ) be an election. For each c ∈ C, score α E (c) is the sum of
c’s Copelandα points in E. Every candidate c with maximum score α E (c) wins.
Let Copelandα Irrational denote the same election system but with voters allowed
to be irrational.
In the context of the above definition, the system widely referred to in the lit-
erature as “Copeland elections” is Copeland0.5 , where tied candidates receive
half a point each (see, e.g., Merlin and Saari [18,15]; the definition used by
Conitzer et al. [3] can be scaled to be equivalent to Copeland0.5 ). Copeland0 ,
where tied candidates come away empty-handed, has sometimes also been re-
ferred to as “Copeland elections” (see, e.g., [16,9]). An election system proposed
by the Catalan philosopher and theologian Ramon Llull in the 13th century (see,
e.g., the references in [9]) is in this notation nothing other than Copeland1 , where
tied candidates are awarded one point each, just like winners of head-to-head
contests.
Bartholdi, Tovey, and Trick [2] were the first to study the computational as-
pects of control: How hard is it, computationally, for the chair to exert control?
In their seminal paper they introduced a number of fundamental control sce-
narios involving (what is now called) constructive control, i.e., scenarios where
the chair’s goal is to make some designated candidate win. Other papers study-
ing control include [10,17,11,9], which in addition to constructive control also
consider destructive control, where the chair tries to preclude some designated
candidate from winning. The notion of bribery in elections was introduced by
Faliszewski et al. [7] and was also studied in [9]. Faliszewski et al. [9] studied
the systems Copeland0 and Copeland1 with respect to their (computational)
resistance and vulnerability to bribery and procedural control.
At first glance one might be tempted to think that the definitional perturba-
tion due to the parameter α in Copelandα elections is negligible. However, as
noted in [9], “. . . it can make the dynamics of Llull’s system quite different from
those of [Copeland0 ]. Proofs of results for Llull differ considerably from those for
[Copeland0 ].” This statement notwithstanding, we show that in most cases it is
possible to obtain a unified—though sometimes rather involved—construction
that works for both systems, and even for Copelandα with respect to every ra-
tional α, 0 ≤ α ≤ 1. In particular, we establish resistance or vulnerability results
for Copeland0.5 (which is the system commonly referred to as “Copeland”) in
every previously studied control scenario.1 In doing so, we provide an example of
a control problem where the complexity of Copeland0.5 differs from that of both
Copeland0 and Copeland1 : While the latter two systems are vulnerable to con-
structive control by adding (an unlimited number of) candidates, Copeland0.5 is
resistant to this control type (see Theorem 3).
Thus Copeland (i.e., Copeland0.5 ) is the first natural election system with a
polynomial-time winner problem that is proven to be resistant to every type of
constructive control that has been proposed in the literature to date. Closing
1
Also, our new results apply, e.g., to events such as the group stage of FIFA world-cup
finals, which is, in essence, a series of Copelandα tournaments with α = 1/3.
168 P. Faliszewski et al.
a 15-year-long quest, this result resolves a question that has been open since
Bartholdi, Tovey, and Trick’s 1992 paper [2].
This paper is in the worst-case model. It will be interesting to see what holds
in the average or typical case. (However, most of the papers that look at average-
case or typical-case complexity regarding election problems are limited to specific
distributions or make strong assumptions, so the state-of-the-art in that impor-
tant direction is not as advanced as many believe (see the discussion of this
in [12, Section 1] and [6]).)
Due to space, we omit most of our proofs. A representative proof is given in
Section 2.3 and all proofs, and additional discussion and results, can be found
in the in-preparation full version of the paper [8].
2 Control
2.1 Definition of Control Problems
We now define the control problems we consider, in both the constructive and
the destructive version. Let E be an election system. In our case, E will be either
Copelandα or Copelandα Irrational , where α, 0 ≤ α ≤ 1, is a fixed rational number.
The types of control we consider here are well-known from the literature (see,
e.g., [2,9,10]) and we will content ourselves with the definition of those problems
whose proofs we give in the main body of the paper.
We define control via adding candidates. Note that there are two versions of
this control type. The unlimited version (which, for the constructive case, was
introduced by Bartholdi, Tovey, and Trick [2]) asks whether the election chair
can add (any number of) candidates from a given pool of spoiler candidates
in order to either make his or her favorite candidate win the election (in the
constructive case), or prevent his or her despised candidate from winning (in the
destructive case):
The only difference in the limited version of constructive and destructive con-
trol via adding candidates (E-CCAC and E-DCAC, for short) is that the chair
needs to achieve his or her goal by adding at most k candidates from the given
set of spoiler candidates. This version of control by adding candidates was pro-
posed in [9] to synchronize the definition of control by adding candidates with
the definitions of control by deleting candidates, adding voters, and deleting
voters.
Copeland Voting Fully Resists Constructive Control 169
As seen in the above definition example, we use the following naming con-
ventions for control problems. The name of a control problem starts with the
election system used (when clear from context, it may be dropped), followed
by CC for “constructive control” or by DC for “destructive control,” followed
by the acronym of the type of control: AC for “adding (a limited number of)
candidates,” ACu for “adding (an unlimited number of) candidates,” DC for
“deleting candidates,” PC for “partition of candidates,” RPC for “run-off parti-
tion of candidates,” AV for “adding voters,” DV for “deleting voters,” and PV
for “partition of voters,” and all the partitioning cases (PC, RPC, and PV) are
followed by the acronym of the tie-handling rule used in subelections, namely
TP for “ties promote” (i.e., all winners of a given subelection are promoted to
the final round of the election) and TE for “ties eliminate” (i.e., if there is more
than one winner in a given subelection then none of this subelection’s winners
is promoted to the final round of the election).
Note that our definitions focus on a winner, i.e., they are in the nonunique-
winner model. The unique-winner analogs of these problems can be defined by
requiring the distinguished candidate p to be the unique winner (or to not be a
unique winner in the destructive case).
Let E be an election system and let Φ be a control type. We say E is immune to
Φ-control if the chair can never reach his or her goal (of making a given candidate
win in the constructive case, and of blocking a given candidate from winning in
the destructive case) via asserting Φ-control. E is said to be susceptible to Φ-
control if E is not immune to Φ-control. E is said to be vulnerable to Φ-control if
it is susceptible to Φ-control and there is a polynomial-time algorithm for solving
the control problem associated with Φ. E is said to be resistant to Φ-control if it
is susceptible to Φ-control and the control problem associated with Φ is NP-hard.
The above notions were introduced by Bartholdi, Tovey, and Trick [2] (see also,
e.g., [10,17,11,9]).
Copelandα
α=0 0<α<1 α=1
Control type CC DC CC DC CC DC
ACu V V R V V V
AC R V R V R V
DC R V R V R V
RPC-{TP,TE} R V R V R V
PC-{TP,TE} R V R V R V
PV-{TP,TE} R R R R R R
AV R R R R R R
DV R R R R R R
Let us now focus on the problem of constructive control via adding candidates.
In the now standard version of this problem (i.e., in the constructive control via
adding a limited number of candidates problem) we obtain the following result
(a special case of Theorem 1).
This result generalizes and strengthens the result of [9] in a natural way. However,
if we consider the unlimited version of the problem (CCACu ), the complexity of
the problem changes dramatically depending on the parameter α. In particular,
Faliszewski et al. [9] showed that for α ∈ {0, 1} this problem is in P, whereas we
show that for all rational values of α strictly between 0 and 1 it is NP-hard.
The proof of this theorem follows via a reduction from the vertex cover problem:
Given an undirected graph G = (V (G), E(G)) and a nonnegative integer k,
does there exist a set W such that W ⊆ V (G), W ≤ k, and for every edge
e = {u, v}, e ∈ E(G), it holds that e ∩ W = ∅? However, before we proceed
with the reduction we need the following two lemmas that simplify constructing
complicated instances of Copelandα elections.
Copeland Voting Fully Resists Constructive Control 171
score E (di ) ≤ n + 1.
α 2
(b) {p, r, e1 , . . . , em } ⊆ C (the remaining candidates are used for padding); (c)
score αE (p) = 2 − 1; (d) score E (r) = 2 − 1 − k + kα in the nonunique-
2 α 2
We will now show that G contains a vertex cover of size at most k if and only
if there is a set D ⊆ D such that p is a winner (the unique winner) of Copelandα
2
Note that via the second paragraph of the proof it is easy to build an election where
r has a score of this form.
172 P. Faliszewski et al.
of bribery [7]. Faliszewski et al. [9] showed that the 16 resistance results for
constructive and destructive voter control within Copeland0 and Copeland1 (see
Table 1) are in FPT (i.e., they each are fixed-parameter tractable) if the number
of candidates is bounded, and also if the number of voters is bounded. They also
showed that these results hold even when the multiplicities of preference lists in
a given election are represented succinctly (by a binary number).
We generalize these results in Theorems 4 and 5 below. To state those the-
orems concisely, we borrow a notational approach from transformational gram-
mar, and use square brackets
as an “independent choice” notation. So, for
It
runs
example, the claim She walks is a shorthand for six assertions: It runs; She
He
runs; He runs; It walks; She walks; and He walks. A special case is the symbol
“∅” which, when it appears in such a bracket, means
that when unwound it
should be viewed as no text at all. For example, “ Succinct
∅ Copeland is fun”
asserts both “Succinct Copeland is fun” and “Copeland is fun.”
Theorem 4. For each rational α, 0 ≤ α ≤ 1, and each choice from the inde-
pendent choice brackets below, the specified parameterized (as j varies over N)
problem is in FPT:
⎡ ⎤
AV
succinct Copelandα C ⎢ DV ⎥ BVj
- - ⎢
C⎣ ⎥ - .
∅ CopelandαIrrational D PV-TE⎦ BCj
PV-TP
Theorem 5. For each rational α, 0 ≤ α ≤ 1, and each choice from the inde-
pendent choice brackets below, the specified parameterized (as j varies over N)
problem is in FPT:
⎡ ⎤
ACu
⎢ AC ⎥
⎢ ⎥
⎢ DC ⎥
succinct Copelandα C ⎢ ⎥
- - C⎢ ⎥
⎢ PC-TE ⎥ -BCj .
∅ Copelandα
Irrational D ⎢ PC-TP ⎥
⎢ ⎥
⎣RPC-TE⎦
RPC-TP
The proofs of Theorems 4 and 5, which in particular employ Lenstra’s [14] algo-
rithm for bounded-variable-cardinality integer programming, are omitted here.
FPT and Extended Control. We now introduce and look at extended control.
By that we do not mean changing the basic control notions of adding/dele-
ting/partitioning candidates/voters. Rather, we mean generalizing past merely
looking at the constructive (make a distinguished candidate a winner) and the
destructive (prevent a distinguished candidate from being a winner) cases. In
particular, we are interested in control where the goal can be far more flexibly
specified, for example (though in the partition cases we will be even more flexible
than this), we will allow as our goal region any (reasonable—there are some time-
related conditions) subcollection of “Copeland output tables” (specifications of
who won/lost/tied each head-to-head contest).
174 P. Faliszewski et al.
Since from a Copeland output table, in concert with the current α, one
can read off the Copelandα Irrational scores of the candidates, this allows us a
tremendous range of descriptive flexibility in specifying our control goals, e.g.,
we can specify a linear order desired for the candidates with respect to their
Copelandα Irrational scores, we can specify a linear-order-with-ties desired for the
candidates with respect to their Copelandα Irrational scores, we can specify the
exact desired Copelandα Irrational scores for one or more candidates, we can spec-
ify that we want to ensure that no candidate from a certain subgroup has a
Copelandα α
Irrational score that ties or beats the CopelandIrrational score of any can-
didate from a certain other subgroup, etc.
All the FPT algorithms given in Theorems 4 and 5 regard, on their surface, the
standard control problem, which tests whether a given candidate can be made a
winner (constructive case) or can be precluded from being a winner (destructive
case). We note that the general approaches used to prove those results in fact
yield FPT schemes even for the far more flexible notions of control that we just
mentioned.
Resistance Results. In contrast with the FPT results in [9] for Copeland0 and
Copeland1 , Faliszewski et al. [9] showed that, for α ∈ {0, 1}, Copelandα Irrational
remains resistant to all types of candidate control even for two voters. We gen-
eralize these results by showing that even for each rational α, 0 ≤ α ≤ 1, for
Copelandα Irrational all 19 candidate-control cases that we showed earlier in this
paper (i.e., without bounds on the number of voters) to be resistant remain re-
sistant even for the case of bounded voters (nonsuccinct). This resistance holds
even when the input is not in succinct format, and so it certainly also holds
when the input is in succinct format.
It remains open whether Table 1’s resistant, rational-voter, candidate-control
cases remain resistant for the bounded-voter case.
3 Bribery
We now turn to the issue of bribery (see [7]), where the briber seeks to reach his
or her goal via bribing certain voters to make them change their preferences.
Name: E-bribery.
Given: A set C of candidates, a collection V of voters represented via their
preference lists (or preference tables in the irrational case) over C, a distin-
guished candidate p ∈ C, and a nonnegative integer k.
Question: Does there exist a voter collection V over C, where V results from
V by modifying at most k voters, such that p wins the E election (C, V )?
For E-destructive-bribery, the destructive bribery problem for E, we require p
to be not a winner. We say E is vulnerable to constructive (destructive) bribery
if E-bribery (E-destructive-bribery) is in P. We say E is resistant to constructive
(destructive) bribery if E-bribery (E-destructive-bribery) is NP-hard. Theorem 6
carries to the case of all rationals α, 0 ≤ α ≤ 1, a result for Copeland0 and
Copeland1 of [9].
Copeland Voting Fully Resists Constructive Control 175
4 Conclusions
References
1. Bartholdi III, J., Tovey, C., Trick, M.: Voting schemes for which it can be difficult
to tell who won the election. Social Choice and Welfare 6(2), 157–165 (1989)
2. Bartholdi III, J., Tovey, C., Trick, M.: How hard is it to control an election?
Mathematical and Computer Modeling 16(8/9), 27–40 (1992)
3. Conitzer, V., Sandholm, T., Lang, J.: When are elections with few candidates hard
to manipulate? Journal of the ACM 54(3) Article 14(2007)
4. Copeland, A.: A “reasonable” social welfare function. Mimeographed notes from
a Seminar on Applications of Mathematics to the Social Sciences, University of
Michigan (1951)
5. Downey, R., Fellows, M.: Parameterized Complexity. Springer, Heidelberg (1999)
6. Erdélyi, G., Hemaspaandra, L., Rothe, J., Spakowski, H.: Frequency of correct-
ness versus average polynomial time and generalized juntas (manuscript, December
2007)
7. Faliszewski, P., Hemaspaandra, E., Hemaspaandra, L.: The complexity of bribery
in elections. In: Proc. AAAI 2006, pp. 641–646. AAAI Press, Menlo Park (2006)
8. Faliszewski, P., Hemaspaandra, E., Hemaspaandra, L., Rothe, J.: Llull and
Copeland voting computationally resist bribery and control. Technical report, De-
partment of Computer Science, University of Rochester, Rochester, NY (in prepa-
ration)
9. Faliszewski, P., Hemaspaandra, E., Hemaspaandra, L., Rothe, J.: Llull and
Copeland voting broadly resist bribery and control. In: Proc. AAAI 2007, pp.
724–730. AAAI Press, Menlo Park (2007)
10. Hemaspaandra, E., Hemaspaandra, L., Rothe, J.: Anyone but him: The complexity
of precluding an alternative. Artificial Intelligence 171(5-6), 255–285 (2007)
11. Hemaspaandra, E., Hemaspaandra, L., Rothe, J.: Hybrid elections broaden
complexity-theoretic resistance to control. In: Proc. IJCAI 2007, pp. 1308–1314.
AAAI Press, Menlo Park (2007)
176 P. Faliszewski et al.
12. Homan, C., Hemaspaandra, L.: Guarantees for the success frequency of an algo-
rithm for finding Dodgson-election winners. Journal of Heuristics (to appear). Full
version available as [13]
13. Homan, C., Hemaspaandra, L.: Guarantees for the success frequency of an algo-
rithm for finding Dodgson-election winners. Technical Report TR-881, Department
of Computer Science, University of Rochester, Rochester, NY, September 2005. Re-
vised (June 2007)
14. Lenstra Jr., H.: Integer programming with a fixed number of variables. Mathemat-
ics of Operations Research 8(4), 538–548 (1983)
15. Merlin, V., Saari, D.: Copeland method II: Manipulation, monotonicity, and para-
doxes. Journal of Economic Theory 72(1), 148–172 (1997)
16. Procaccia, A., Rosenschein, J., Kaminka, G.: On the robustness of preference ag-
gregation in noisy environments. In: Proc. AAMAS 2007, pp. 416–422. ACM Press,
New York (2007)
17. Procaccia, A., Rosenschein, J., Zohar, A.: Multi-winner elections: Complexity of
manipulation, control, and winner-determination. In: Proc. IJCAI 2007, pp. 1476–
1481. AAAI Press, Menlo Park (2007)
18. Saari, D., Merlin, V.: The Copeland method I: Relationships and the dictionary.
Economic Theory 8(1), 51–76 (1996)
19. Zermelo, E.: Die Berechnung der Turnier-Ergebnisse als ein Maximumproblem der
Wahrscheinlichkeitsrechnung. Mathematische Zeitschrift 29(1), 436–460 (1929)
The Complexity of Power-Index Comparison
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 177–187, 2008.
c Springer-Verlag Berlin Heidelberg 2008
178 P. Faliszewski and L.A. Hemaspaandra
In essence, these power indices measure the probability that, assuming some
coalition formation model, our designated player is critical for the forming coali-
tion. By critical we mean here that the coalition is successful with our designated
player but is not successful without him or her.
Let G = (w1 , . . . , wn ; q) be a voting game, let i be a player in this game, and
let N = {1, . . . , n} be the set of all players of G. The value of the Banzhaf power
∗
index of i in G is defined as Banzhaf(G, i) = Banzhaf 2n−1
(G,i)
, where Banzhaf ∗ (G, i)
is the raw version of the index,
Banzhaf ∗ (G, i) = (succG (S ∪ {i}) − succG (S)).
S⊆N −{i}
Bovet and Crescenzi [4]. Below we review some of them, focusing on the less
frequently known ones.
We fix the alphabet Σ = {0, 1} and we assume that all the problems we
consider are encoded in a natural, efficient manner over Σ. By | · | we mean the
length function. We assume ·, · to be a standard, natural pairing function such
that |x, y| = 2(|x| + |y|) + 2.
The main result of this paper, Theorem 1, says that the power-index com-
parison problem is PP-complete both for the Shapley-Shubik power index and
for the Banzhaf power index. The class PP, probabilistic polynomial time, was
defined by Simon [17] and Gill [9]. A language L ⊆ Σ ∗ belongs to PP if and
only if there exists a polynomial p and a polynomial-time computable relation
R such that
x ∈ L ⇐⇒ {w ∈ Σ p(|x|) | R(x, w) holds} > 2p(|x|)−1 .
2 Main Results
Our main result, Theorem 1, says that the power index comparison problem is
PP-complete. This section is devoted to building infrastructure for Theorem 1’s
proof and giving that proof.
Theorem 1. Let f be either the Banzhaf or the Shapley-Shubik power index.
The problem PowerComparef is PP-complete.
We start via showing PP-membership of a problem closely related to our
PowerCompareBanzhaf and PowerCompareSS problems. Let f be a #P func-
tion and let Comparef be the language {x, y | x, y ∈ Σ ∗ ∧ f (x) > f (y)}.
(PowerCompareBanzhaf and PowerCompareSS are essentially, up to a minor def-
initional issue, incarnations of Comparef for appropriate functions f .)
Lemma 1. Let f be a #P function. The language Comparef is in PP.
Proof. Let f be an arbitrary #P function and let N be an NP machine such that
f = #accN . Without the loss of generality, we assume that there is a polynomial
q such that for each input x ∈ Σ ∗ all computation paths of N make exactly q(|x|)
binary nondeterministic choices. Thus each computation path of N on input x
can be represented as a string w in Σ q(|x|) .
In order to show that Comparef is in PP we need to provide a polynomial-time
computable relation R and a polynomial p such that for each string z = x, y
it holds that:
z ∈ Comparef ⇐⇒ {w ∈ Σ p(|z|) | R(z, w) holds} > 2p(|z|)−1 .
We now define such R and p. Let us fix two strings, x and y, and let z = x, y and
n = |z|. We define p(n) = q(n) + 1 and, for each string w = w0 w1 . . . wp(n)−1 ∈
Σ p(n) , we define R(z, w) as follows:
Case 1. If w0 = 0 then R(z, w) is true exactly if the string w1 , . . . , wq(|x|) spells
an accepting computation path of N on x and the symbols wq(|x|)+1 through
wp(n)−1 are all 0. R(z, w) is false otherwise.
182 P. Faliszewski and L.A. Hemaspaandra
Hunt et al. [11] showed that #X3C is parsimonious complete for #P. This is
very useful for us as the standard reduction from #X3C to #SubsetSum (see,
e.g., [14, Theorem 9.10]; #SubsetSum is the function that accepts as input a
target integer K and a set S of nonnegative integers and returns the number of
subsets of S that sum up to K) is parsimonious and Prasad and Kelly’s reduction
from #SubsetSum to Banzhaf ∗ (the raw version of Banzhaf’s power index) is
parsimonious as well. Since Banzhaf ∗ is in #P, Banzhaf ∗ is #P-parsimonious-
complete. Thus the following theorem is, essentially, a direct consequence of
Lemma 2.
Theorem 2. PowerCompareBanzhaf is PP-complete.
Proof. The raw version of the Banzhaf power index is #P-parsimonious-complete
and so, via Lemma 2, CompareBanzhaf ∗ is PP-complete. Via a slight misuse of no-
tation, we can say that CompareBanzhaf ∗ accepts as input two weighted voting
games, G and G , and two players, p and p , such that p participates in G and p
participates in G and accepts if and only if Banzhaf ∗ (G , p ) > Banzhaf ∗ (G , p ).
We give a reduction from CompareBanzhaf ∗ to PowerCompareBanzhaf .
Let G , p and G , p be our input to the CompareBanzhaf ∗ problem. We can
assume that G and G have the same number of players. If G and G do
not have the same number of players then it is easy to see that the game with
fewer players can be padded with players whose weight is equal to this game’s
quota value. Such a padding leaves the raw Banzhaf power index values of the
game’s original players unchanged. (The reason for this is that any coalition that
includes any of the padding candidates is already winning and so none of the
original players is critical to the success of the coalition, and so the coalition
does not contribute to original players’ power index values.)
We form two games, K and K , that are identical to games G and G ,
respectively, except that K lists player p as first and G lists player p as first.
Our reduction’s output is (K , K , 1).
Naturally, Banzhaf(K , 1) > Banzhaf(K , 1) if and only if Banzhaf ∗ (G , p ) >
Banzhaf ∗ (G , p ). Also, clearly, K and K can be computed in poly-
nomial time. Thus we have successfully reduced CompareBanzhaf ∗ to
PowerCompareBanzhaf . This shows PP-hardness of PowerCompareBanzhaf . PP-
membership of PowerCompareBanzhaf is, essentially, a simple consequence of
Lemma 1. This completes the proof.
Let us now focus on the computational complexity of the power index comparison
problem for the case of Shapley-Shubik. It would be nice if the raw Shapley-
Shubik power index were #P-parsimonious-complete. Had it been the case, we
could establish PP-completeness of PowerCompareSS in essentially the same way
as we have done for PowerCompareBanzhaf . However, Prasad and Kelly [15] at the
end of their paper, after—in effect—showing #P-parsimonious-completeness of
the raw Banzhaf power index (their Theorem 4) write: “Such a straightforward
approach does not seem possible with the Shapley-Shubik [power index].” We
reinforce their intuition by now proving that the raw Shapley-Shubik power index
in fact is not #P-parsimonious-complete.
184 P. Faliszewski and L.A. Hemaspaandra
Theorem 3. The raw Shapley-Shubik power index, the function SS∗ , is not #P-
parsimonious-complete.
Proof. For the sake of contradiction, let us assume that SS∗ is #P-parsimonious-
complete. Thus for each natural number k there is a weighted voting game G and
a player i within G such that SS∗ (G, i) = k. This is the case because the function
f (x) = x belongs to #P (we assume that the “output x” is an integer obtained
via a standard bijection between Σ ∗ and N) and if SS∗ is #P-parsimonious-
complete then there has to be a parsimonious reduction from f to SS∗ .
Let G be an arbitrary voting game with n ≥ 4 players and let i be a player
in G. By definition, SS∗ (G, i) is a sum of terms of the form k!(n − k − 1)!,
where k is some value in {0, . . . , n − 1}. Since n ≥ 4, each such term is even
and thus SS∗ (G, i) is even. The raw Shapley-Shubik power index of any player
in a game with at most 3 players is at most 3! = 6 and thus there is no input
on which SS∗ yields the value 7. This contradicts the assumption that SS∗ is
#P-parsimonious-complete and completes the proof.
So the well-known result of Deng and Papadimitriou [5] that the raw Shapley-
Shubik power index is #P-metric-complete cannot be strengthened to #P-
parsimonious-completeness. Theorem 3 prevents us from directly using Lemma 2
to show that PowerCompareSS is PP-complete. Nonetheless, via the following
lemma, we will be able to obtain our result.
Lemma 3. Let f and g be two arbitrary #P functions. There exists a
polynomial-time computable function cmpf,g (x, y) such that
(∀x, y ∈ Σ ∗ )[f (x) > g(y) ⇐⇒ cmpf,g (x, y) ∈ PowerCompareSS ].
Proof. Let f and g be as in the lemma and let x and y be two arbitrary strings.
Since both f and g are in #P and #X3C is #P-parsimonious-complete, there
exist functions φf and φg that compute parsimonious reductions from f to #X3C
and from g to #X3C, respectively.
Let (Bx , Sx ) = φf (x) and (By , Sy ) = φg (y). We can, without the loss of
generality, assume that Sx = Sy = r and that Bx = By = 3k, where
r and k are two nonnegative integers. If this is not the case, we can use the
following algorithm.
If, say, Bx is not a multiple of three then we have #X3C(Bx , Sx ) = 0 and we
can add one or two extra elements to Bx without introducing any new solutions
but ensuring that Bx is a multiple of three. Naturally, the same trick works
for By . If both Bx and By are multiples of three and, for example, Bx <
By then we can add three new elements, b , b , b to Bx and include the set
{b , b , b } in Sx . This doesn’t change the number of solutions of (Bx , Sx ), but
it increases the cardinality of Bx by three. We can keep repeating this operation
until the cardinalities of the sets Bx and By match. Then, via similar trickery,
without breaking the Bx = By equality we can ensure that Sx = Sy .
We omit the details of this process but the reader can easily recreate them.
Let φs be the standard, parsimonious reduction from #X3C to #SubsetSum
(see, e.g., [14, Theorem 9.10]). φs has the property that given an instance (B, S)
The Complexity of Power-Index Comparison 185
Thus, f (x) > f (y) if and only if SS(Gx , 1) > SS(Gy , 1) and so it is clear that
function cmpf,g does what the theorem claims. Naturally, cmpf,g can be com-
puted in polynomial time.
We have shown that the problem of deciding in which of the two given voting
games our designated player has higher power index value is PP-complete for
both Banzhaf and Shapley-Shubik power indices. For the case of Banzhaf, we
have used the fact that Banzhaf power index is #P-parsimonious-complete. For
the case of Shapley-Shubik, we have shown that Shapley-Shubik power index is
not #P-parsimonious-complete, but using the index’s properties we were able
to show PP-completeness of PowerCompareSS . We believe that these results are
interesting and practically important. Below we mention one particular applica-
tion.
In the context of multiagent systems, the Shapley-Shubik power index is often
used to distribute players’ payoffs, i.e., each player’s payoff is proportional to
his or her power index value. Recently Bachrach and Elkind [1] asked about
186 P. Faliszewski and L.A. Hemaspaandra
the exact complexity of the following problem: Given a weighted voting game
G = (w1 , w2 , . . . , wn ; q), is it profitable for players 1 and 2 to join? That is, if
G = (w1 + w2 , w3 , . . . , wn ; q), is it the case that SS(G , 1) > SS(G, 1) + SS(G, 2).
Using Lemma 3 and the fact that #P is closed under addition we can easily show
that this problem reduces to PowerCompareSS and thus is in PP. We believe that
Bachrach and Elkind’s problem is, in fact, PP-complete and that the techniques
presented in this paper will lead to the proof of this fact. However, at this point
the exact complexity of the problem remains open.
Acknowledgments. We thank Jörg Rothe and Edith Elkind for helpful discussions
on the topic of weighted voting games and Jörg Rothe for hosting a visit during
which this work was done in part.
References
1. Bachrach, Y., Elkind, E.: Divide and conquer: False-name manipulations in
weighted voting games. In: Proceedings of the 7th International Conference on
Autonomous Agents and Multiagent Systems, May 2008 (to appear, 2008)
2. Balcázar, J., Book, R., Schöning, U.: The polynomial-time hierarchy and sparse
oracles. Journal of the ACM 33(3), 603–617 (1986)
3. Banzhaf, J.: Weighted voting doesn’t work: A mathematical analysis. Rutgers Law
Review 19, 317–343 (1965)
4. Bovet, D., Crescenzi, P.: Introduction to the Theory of Complexity. Prentice-Hall,
Englewood Cliffs (1993)
5. Deng, X., Papadimitriou, C.: On the complexity of comparative solution concepts.
Mathematics of Operations Research 19(2), 257–266 (1994)
6. Dubey, P., Shapley, L.: Mathematical properties of the Banzhaf power index. Math-
ematics of Operations Research 4(2), 99–131 (1979)
7. Dwork, C., Kumar, R., Naor, M., Sivakumar, D.: Rank aggregation methods for
the web. In: Proceedings of the 10th International World Wide Web Conference,
pp. 613–622. ACM Press, New York (2001)
8. Faliszewski, P., Hemaspaandra, L.: The complexity of power-index compari-
son. Technical Report TR-929, Department of Computer Science, University of
Rochester, Rochester, NY (January 2008)
9. Gill, J.: Computational complexity of probabilistic Turing machines. SIAM Journal
on Computing 6(4), 675–695 (1977)
10. Hemaspaandra, L., Rajasethupathy, K., Sethupathy, P., Zimand, M.: Power balance
and apportionment algorithms for the United States Congress. ACM Journal of
Experimental Algorithmics 3(1) (1998),
http://www.jea.acm.org/1998/HemaspaandraPower
11. Hunt, H., Marathe, M., Radhakrishnan, V., Stearns, R.: The complexity of planar
counting problems. SIAM Journal on Computing 27(4), 1142–1167 (1998)
12. Krentel, M.: The complexity of optimization problems. Journal of Computer and
System Sciences 36(3), 490–509 (1988)
13. Matsui, Y., Matsui, T.: NP-completeness for calculating power indices of weighted
majority games. Theoretical Computer Science 263(1–2), 305–310 (2001)
14. Papadimitriou, C.: Computational Complexity. Addison-Wesley, Reading (1994)
15. Prasad, K., Kelly, J.: NP-completeness of some problems concerning voting games.
International Journal of Game Theory 19(1), 1–9 (1990)
The Complexity of Power-Index Comparison 187
16. Shapley, L., Shubik, M.: A method of evaluating the distribution of power in a
committee system. American Political Science Review 48, 787–792 (1954)
17. Simon, J.: On Some Central Problems in Computational Complexity. PhD thesis,
Cornell University, Ithaca, N.Y, Available as Cornell Department of Computer
Science Technical Report TR75-224 (January 1975)
18. Toda, S.: PP is as hard as the polynomial-time hierarchy. SIAM Journal on Com-
puting 20(5), 865–877 (1991)
19. Valiant, L.: The complexity of computing the permanent. Theoretical Computer
Science 8(2), 189–201 (1979)
20. Zankó, V.: #P-completeness via many-one reductions. International Journal of
Foundations of Computer Science 2(1), 76–82 (1991)
Facility Location Problems:
A Parameterized View
1 Introduction
The basic task of all variants of facility location problems is the following: a
company wants to open up a number of facilities to serve their customers. Both
the opening of a facility at a specific location and the service of a particular
customer through a facility incurs some cost. The goal is to minimize the overall
cost associated to a specific way of opening up facilities and serving customers.
We will formalize this task in the following more precisely.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 188–199, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Facility Location Problems: A Parameterized View 189
condition formalizes that the overall costs (weights) of opening up facilities and
serving customers should be bounded by k. In the literature, the problem formu-
lated above is mostly known as uncapacitated discrete facility location
problem, see [3] for a good recent overview. Notice that we subsumed the usu-
ally separated customer demands and service costs (per demand unit) into the
weight function ωE . We will also discuss variants (e.g., allowing real number
costs) in this paper.
Alternatively, and sometimes more convenient, this problem can be formulated
in terms of a “matrix problem:”
Facility Location (matrix formulation)
(n+1)×m
Given: A matrix M ∈ N≥1 , indexed as M [0 . . . n][1 . . . m], k ∈ N
Question: Is there a set C ⊆ {1, . . . , m}
of columns and a function
s : {1, . . . , n} → C such that f ∈C (M [0, f ] + c:s(c)=f M [c, f ]) ≤ k?
In the matrix formulation, the columns play the role of the potential facility
locations and the rows represent the customers to be served (except for row
0). Since “missing edges” in the bipartite graph formulation can be expressed as
edges which have “infinite weight” (corresponding in turn to a weight larger than
k in the decision problem formulation), we can assume that the graph is indeed
a complete graph. Then, the matrix M [1 . . . n][1 . . . m] contains the weights of
the edges, while M [0][1 . . . m] stores the weights associated to potential facility
locations.
In the following, we will use terminology from both formulations interchange-
ably, according to convenience.
Our Contribution. Facility location problems have been quite extensively studied
in the literature under many perspectives (hardness, approximation, heuristics,
etc.), and this is of course also thoroughly done within the operations research
and management science communities. Our aim is to initiate systematic research
on these problems from the viewpoint of parameterized complexity. We will show
190 M. Fellows and H. Fernau
parameterized tractability for the described problem formulation and many vari-
ants thereof, but also give some related intractability results. In doing so, we
also provide an introduction of how F PT -results can be obtained in a rather
systmematic fashion. Moreover, we will exhibit connections to many application
areas outside economics, which might stir up research between different commu-
nities on this topic.
Related Work and Variations. It is often useful to relate the costs of serving
customers with an underlying metric space, i.e., ωE (c, f ) can be described by
the distance of c and f times the demand that is incurred by c. This problem
variant is also referred as the (metric) uncapacitated facility location problem. A
more general setting is given in the capacitated facility location problem, where
each facility can only serve up to a given maximum load; then, there are again
two variants considering the possibility that a demand of one specific costumer
might be satisfied from only one facility or possibly split among different facilities
(which is of course more flexible). Good overviews of approximation algorithms
for many variants can be found in [3,13,14].
This amounts in O(3k ) operations. Namely, there are basically three possilities
for a customer: it either belongs to Y , X \ Y or to C \ X.
Remark 1. Notice that the bound k > n immediately implies an O∗ (3n ) estimate
for Alg. 1. Alternatively, we can first kernelize (with respect to k) and then run
Alg. 1. on the kernel, which would amount in an O∗ ((2k)k ) estimate due to
Lemma 6.
Cheap Serves. In view of our discussion it might be also an idea to allow for
(some) services of zero cost. Irrespectively of whether or not zero costs for open-
ing up facilities are allowed, the complexity picture now changes dramatically:
Facility Location Problems: A Parameterized View 195
Proof. (Sketch) Consider the special case when opening any facility costs one
unit, and all services are for free. Then, the problem corresponds to selecting
(at most) k of the facility to serve all customers. In more graph-theoretic form,
this exactly corresponds to red-blue dominating set, which in turn can be
seen to be equivalent to hitting set [8]. Hence, any hitting set instance can
be seen as a special instance of the variant of Facility Location that we are
considering. Since hitting set is well-known to be W[2]-hard, this property
transfers to our problem at hand.
Conversely, membership in W[2] can be seen, e.g., by showing how to solve our
problem with a short multi-tape nondeterministic Turing machine, see [4].
Facility location and its variants have numerous applications, even when
only allowing integer costs. We shall now describe some of the less obvious ones
that one way or the other apply the Minimum Description length (MDL) prin-
ciple.
ab
abab
ac
ad ab
bc abab
bd ac
bbd ad
bbbbe bc
(ab)* bd
(a|b)* bbd
b*d bbbbe
b*e
b*(d|e)
(a|b)(c|d)
Fig. 1. How to apply the MDL principle
Garofalakis et al. propose using the related facility location problem, using the
following translation: (a) place facilities (in our case: the selected theory) (b)
into some locations (here: the regular expressions to choose from) (c) in order
to minimize the costs incurred by the facilities (here: the number of bits needed
to encode the theory) and by serving a given set of customers (in this case: the
number of bits for encoding the given strings).
Our results imply that we can solve MDL-optimal-coding as a parameter-
ized problem to optimality. This is particularly important if MDL is actually
used to evaluate hypotheses. Using here algorithms which only provide a loga-
rithmic approximation guarantee will eventually mean that hypotheses will be
rejected or preferred not according to their quality but according to the “quality”
of the evaluation algorithm.
Since the number of bits (the costs) could be seen to be bounded by the input
length itself, and all these numbers are integers, we can infer:
Corollary 2. MDL-optimal-coding can be solved in time O∗ (2n ) (or also
O∗ (2k )), where n denotes the number of input strings to be coded.
Observe that n < m in this particular application, since the input strings themselves
are also always seen as possible regular expressions. So, the time bound derived by
the preceding corollary is always superior to the trivial approach from Thm. 1.
Notice that similar methods are also used for data compression purposes.
There, the “theory part” has sometimes to be explicitly encoded (as side in-
formation) and sometimes it is statically known to the (de)coder, which means
that the “costs” of “opening up a facility” are zero. Hence, we face (again) the
median problem discussed in Sec. 3, so that this problem is also parameterized
tractable, when parameterized by an upper bound on the number of bits used
for the compressed data.
It is quite natural to assume that only (relatively) few facilities are within the
“natural reach” of a single customer (it might be different from the viewpoint of
the facilities, though). This implies a sort of degree-restriction on the side of the
customer (in the underlying bipartite graph) which might yield a better runtime
estimate of the dynamic programming algorithm, see [2].
References
1. Björklund, A., Husfeldt, T., Kaski, P., Koivisto, M.: Fourier meets Möbius: fast
subset convolution. In: Symposium on Theory of Computing STOC, pp. 67–74.
ACM Press, New York (2007)
2. Björklund, A., Husfeldt, T., Kaski, P., Koivisto, M.: Trimmed Möbius inversion
and graphs of bounded degree. In: Symposium on Theoretical Aspects of Computer
Science STACS, IBFI, Schloss Dagstuhl, Germany, pp. 85–96 (2008)
3. Bumb, A.: Approximation algorithms for facility location problems. PhD Thesis,
Univ. Twente, The Netherlands (2002)
4. Cesati, M.: The Turing way to parameterized complexity. Journal of Computer
and System Sciences 67, 654–685 (2003)
5. Charikar, M., Guha, S., Tardos, E., Shmoys, D.S.: A constant-factor approximation
algorithm for the k-median problem. Journal of Computer and System Sciences 65,
129–149 (2002)
6. Charikar, M., Khuller, S., Mount, D.M., Narasimhan, G.: Algorithms for facility
location problems with outliers. In: Symposium on Discrete Algorithms SODA, pp.
642–651. ACM Press, New York (2001)
7. Conklin, D., Witten, I.H.: Complexity-based induction. Machine Learning 16, 203–
225 (1994)
8. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, Heidelberg
(1999)
9. Du, Q., Emelianenko, M., Ju, L.: Convergence of the Lloyd algorithm for computing
centroidal Voronoi tessellations. SIAM Journal on Numerical Analysis 44, 102–119
(2006)
10. Fernau, H.: Extracting minimum length Document Type Definitions in NP-hard.
In: Paliouras, G., Sakakibara, Y. (eds.) ICGI 2004. LNCS (LNAI), vol. 3264, pp.
277–278. Springer, Heidelberg (2004)
11. Garofalakis, M., Gionis, A., Rastogi, R., Seshadri, S., Shim, K.: XTRACT: learn-
ing document type descriptors from XML document collections. Data Mining and
Knowledge Discovery 7, 23–56 (2003)
12. Koivisto, M., Manila, H., Perola, M., Varilo, T., Hennah, W., Ekelund, J., Lukk,
M., Peltonen, L., Ukkonen, E.: An MDL method for finding haplotype blocks and
for estimating the strength of block boundaries. In: Pacific Symposium on Biocom-
puting 2003 (PSB 2003), pp. 502–513 (2002),
http://psb.stanford.edu/psb-online/proceedings/psb03/
13. Shmoys, D.B., Tardos, É., Aardal, K.: Approximation algorithms for facility loca-
tion problems (extended abstract). In: Symposium on Theory of Computing STOC,
pp. 265–274. ACM Press, New York (1997)
14. Young, N.E.: k-medians, facility location, and the Chernoff-Wald bound. In: Sym-
posium on Discrete Algorithms SODA, pp. 86–95. ACM Press, New York (2000)
Shortest Path Queries in Polygonal Domains
1 Introduction
We consider the All Pairs Query (APQ) problem in a polygonal domain P which
is a scene scattered with h polygonal obstacles (holes) with disjoint interiors. P
has totally n obstacle vertices. Paths that avoid the interior of obstacles are
called obstacle-avoiding paths. We focus on finding a shortest obstacle-avoiding
path (i.e., shortest path) and/or distance between two arbitrary query points in
P . The length of the shortest path between the query points is called distance
between them. If one query point is pre-selected, then the APQ problem is
simplified to the Single Source Query (SSQ) problem. To place our work in the
context of the literature, we state some relevant results next.
Solving the SSQ and APQ problem in the presence of multiple obstacles has
proven to be challenging. In a polygonal domain P with h holes having n obstacle
vertices, Hershberger and Suri [1] presented an optimal algorithm for comput-
ing a shortest path map (SPM) from a fixed point to all other points in P in
O(n log n) time and space using the continuous Dijkstra paradigm. The SPM
can be used to answer single-source shortest path queries to any destination in
O(log n) time. Kapoor et al. [2] proposed an algorithm which computes a SPM
for a given source in O(n + h2 log n) time using visibility graphs.
The APQ problem in polygonal domains is considered to be more challeng-
ing than in the case of simple polygons. Only a few results are known for this
problem instance. For any pair of query points a and b in a polygonal domain P ,
Chen et al. [3] have shown that using O(n2 ) space and O(n2 log n) time in pre-
processing, one can answer an APQ query in O(min(Qa , Qb ) log n) time, where
Qa (Qb ) is the number of vertices visible from a (b, respectively). Chiang and
Mitchell [4] proposed an algorithm which uses O(n11 ) space and preprocessing
time to construct a data structure supporting optimal O(log n) time queries. Al-
ternatively, their algorithm requires O(n10 log n) space and preprocessing time
Research supported by NSERC and SUN Microsystems.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 200–211, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Shortest Path Queries in Polygonal Domains 201
to support O(log2 n) time queries. They also sketched strategies to make their
algorithms sensitive to h but incur significant preprocessing cost.
Throughout the paper, let P be a polygonal domain having n vertices and h
holes. Let (a, b) be any pair of points in P . Let π(a, b) be a shortest path between
a and b in P and dist(a, b) be the length of π(a, b) (i.e., distance) between them.
New Results: We present a novel algorithm for solving the APQ problem for
P in O(h log n) query time. Our algorithm builds a data structure of size O(n2 )
in O(n2 log n) time. In particular,
1. Using a reduced skeleton graph of P as a tool, we tessellate P into a set
of triangles and simple polygons. The merit of our approach is that (i) the
reduced skeleton graph is static and it captures the topology of P ; (ii) this
tessellation of P is unique.
2. Our algorithm is sensitive to the number, h, of holes.
Our results improve the previous result by Chen et al. [3] in the following
way. Our algorithm is sensitive to the number of holes. In particular, it achieves
an O(log n) query time for simple polygons or polygonal regions with a constant
number of holes. Chen et al.’s algorithm [3] is not sensitive to the number of holes,
but depends on the minimum number of vertices inside the visibility regions of
the two query points. The preprocessing time and space of our algorithm matches
the result in [3].
2 Preliminaries
In this section, we review some notation and theorems used.
Funnels: As appeared in, e.g., [5], a funnel represents shortest paths from a
source point s to points on a polygonal edge or diagonal associated with the
funnel. Let l = pi pj be a diagonal in a simple polygon Q (Fig. 1 (a)). The union
f(s, l) = π(s, pi )∪π(s, pj ) is called the funnel associated with the diagonal l in Q.
The shortest path π(s, pi ) may share a subpath with the shortest path π(s, pj ).
At some vertex v, called apex, the two paths part and proceed separately to their
respective destinations. If v is not s, the subpath from s to v is called string of
the funnel. For any point q ∈ l, there is a unique tangent from q to the portion of
the funnel between the apex and an endpoint of l. Let pi pj pk be a triangle in
Q (Fig. 1 (b)). Let l = pi pj , l1 = pi pk and l2 = pk pj . The funnel f(s, l) splits into
two funnels when it reaches the vertex pk , i.e., f(s, l)∪pi pj pk = f(s, l1 )∪f(s, l2 ).
202 H. Guo, A. Maheshwari, and J.-R. Sack
The funnel f(s, l) is closed if no point on l is visible from the source s. Otherwise,
it is open.
Hourglass: Let p and q be any two points in Q. The triangles (assume they
are distict) containing p and q in the underlying triangulation associated with Q
determine the sequence of diagonals crossed by a shortest path π(p, q) between
p and q. These diagonals that each split Q into two parts, one containing p
and the other q, are called separating diagonals for p and q [5]. A shortest path
π(p, q) crosses these separating diagonals exactly once in a particular order.
An hourglass represents all shortest paths between two diagonals of Q [5]. Let
li = pi pi+1 , lj = pj pj+1 be two diagonals in the triangulation of Q, labeled so
that pi , pj , pj+1 , pi+1 is a subsequence of the vertex sequence of Q. The union
of the two shortest paths π(pi , pj ) and π(pi+1 , pj+1 ) is the hourglass, H(li , lj ),
associated to Q for li and lj (cf. Fig. 1 (c)). Let lp and lq be the first and last
diagonals in the sequence of separating diagonals between p and q. Given the
hourglass H(lp , lq ), the shortest path π(p, q) can be computed via tangents to the
hourglass that pass through p and q [5]. Consider p and q as length zero diagonals.
Concatenating the hourglasses H(p, lp ), H(lp , lq ) and H(lq , q) produces a single
closed hourglass which is only a string. The string is the shortest path between
p and q.
pk
Q
pi
Q p i l1 p k Q pj
pi
l2 lj
v l v l li pj+1
s s pi+1
pj pj
Fig. 1. An illustration of (a) a funnel f(s, l); (b) a funnel f(s, l) splitting into funnels
f(s, l1 ) and f(s, l2 ); (c) an hourglass H(li , lj ) between diagonals li , lj
0000000 1111111
1111111 0000000
1111111 1111111
0000000 0000000
00000000000000
11111111111111
0000000
1111111
0000000 1111111
1111111 00000000000000
11111111111111
0000000 0000000
1111111
0000000
1111111 00000000000000
11111111111111
0000000
1111111
00000000000000
11111111111111
0000000
1111111
0000000 1111111
1111111
0000000
1111111 00000000000000
11111111111111
0000000
00000000000000
11111111111111
0000000
1111111 0000000
1111111
00000000000000
11111111111111
0000000
1111111
0000000
1111111 00000000000000
11111111111111
0000000
1111111
0000000 1111111
1111111 00000000000000
11111111111111
0000000
00000000000
11111111111 00000000000000
11111111111111
0000000
1111111
00000000000000
11111111111111
0000000
1111111
000000000001111111
11111111111
00000000000 11111111111111
11111111111
00000000000
11111111111
00000000000000
0000000
00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000 11111111111111
11111111111
00000000000
11111111111
00000000000000
00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000 11111111111111
11111111111
00000000000
11111111111
00000000000000
00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000 11111111111111
11111111111 00000000000000
00000000000000
11111111111111
00000000000
11111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000
11111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000
11111111111 00000000000000
11111111111111
00000000000000
11111111111111
00000000000
11111111111
00000000000 11111111111111
11111111111 00000000000000
00000000000000
11111111111111
00000000000000
11111111111111
Fig. 2. An illustration of a polygonal domain P , the skeleton graph (thin, solid lines
and parabolic arcs) and the Voronoi diagram of P (thin, dotted and solid lines and
parabolic arcs). Edges of P are solid segments. The shortest path π(a, b) between query
points a and b passes through a sequence of reflex vertices.
Theorem 1. [7] Given a polygonal domain P having n vertices and h holes, the
Voronoi diagram of P consists of at most n + r + 2h − 2 Voronoi vertices and at
most 2(n + r) + 3h − 3 Voronoi edges, where r is the number of reflex vertices of P .
3 A Tessellation of P
In this section, we present a tessellation of P that is required in our algorithm.
Using a so-called reduced skeleton graph of P , we decompose P into a set of
triangles and simple polygons.
A skeleton graph, Gs = (Vs , Es ), of P is a subgraph of the Voronoi diagram
of P , derived by removing all Voronoi edges incident to vertices of P from the
diagram. Nodes and edges of a skeleton graph, called skeleton nodes and skeleton
edges, respectively, are Voronoi vertices and edges. We assume that no four
vertices of P are co-circular. Skeleton nodes are of degrees 1, 2 or 3. Given a
204 H. Guo, A. Maheshwari, and J.-R. Sack
Lemma 2 (Critical Site). The local shortest path πφ (a, b) must pass through
a critical site for the point a.
Lemma 3. Let fφ (s, l) be a closed funnel from the source s to a polygon edge
or diagonal l, lying in the free space of P with respect to a skeleton path φ. The
first vertex (other than the source s if s is a vertex) on the string of the funnel
fφ (s, l) is the critical site on the local shortest path from s to points on l, with
respect to φ.
206 H. Guo, A. Maheshwari, and J.-R. Sack
5 Our Algorithm
In this section, we present an algorithm which builds a data structure of size
O(n2 ) in O(n2 log n) time to support O(h log n) time shortest path queries be-
tween a pair of points, (a, b), in P . First, we describe the main idea of our
algorithm. Let Ca be the set of critical sites for a and Cb for b. If a and b are
mutually visible, then we compute and report the distance dist(a, b) directly.
Otherwise, our task is reduced to identifying the critical sites Ca and Cb such
that each local shortest path leaves a via a site in Ca , and reaches b via a site in
Cb (Lemma 3). For each critical site c ∈ Ca , we search the shortest path map of c
and compute the distances dist(c, a) and dist(c, b). The sum, dist(c, a)+dist(c, b),
is the length of the shortest path from a to b via c. The distance dist(a, b) is the
minimum of these path lengths for all c ∈ Ca ∪ Cb . We summarize this in the
next lemma.
Lemma 4. The distance dist(a, b) can be computed by minc∈Ca ∪Cb (dist(a, c) +
dist(c, b)).
Let Cmin be the smaller set between Ca and Cb . We can reduce our determination
of dist(a, b) to a smaller size, i.e. |cmin |, as opposed to |Ca | + |Cb |, since it is
sufficient to investigate either all prefixes of local shortest paths leaving a, or all
suffixes of local shortest paths reaching b. We summarize this next.
Corollary 1. The shortest distance dist(a, b) can be correctly computed by
dist(a, b) = minc∈Cmin (dist(a, c) + dist(c, b)).
For the sake of simplicity, let Cmin be Ca . Then, we compute all closed funnels
from a and collect critical sites from the strings of these funnels.
Next, we present our preprocessing algorithm (Table 1) which takes P as
input and outputs a data structure. The data structure, denoted by APQ PD(P ),
consists of (i) a skeleton graph Gs , a reduced skeleton graph Gr and a tessellation
P ; (ii) for each simple polygon R(l1 , l2 ) of P with gates l1 and l2 , a hierarchy
of hourglasses, HH(R) and an hourglass H(l1 , l2 ) (iii) a point-location data
structure. The following lemma summarizes the complexity of the preprocessing
algorithm.
Lemma 5. Algorithm APQ PD Preprocessing(P ) builds a data structure of size
O(n2 ) in O(n2 log n) time.
Next, we present the key ideas of our query algorithm. First, we introduce nota-
tion used. Let i ∈ {a, b}. Let R(i) be the region containing i in the tessellation
P . Let Fo (i) (resp., Fc (i)) be a set of open (resp., closed) funnels from i to
the explored gates in P . The set Fo (i) is a balanced binary search tree (BST).
Funnels from a to the gates of the region R(a) are called initial funnels from a.
Our query algorithm is a process of funnel propagation. Let R(l1 , l2 ) be a
simple polygon of P with gates l1 and l2 . Propagating a funnel f(a, l1 ) to its
neighboring region R(l1 , l2 ), i.e., to its neighboring gate l2 , is the concatenation
of f(a, l1 ) with the hourglass H(l1 , l2 ) associated with R(l1 , l2 ). If the neighboring
region of f(a, l1 ) is a triangle, l1 l2 l3 , then propagating f(a, l1 ) to l1 l2 l3 involves
Shortest Path Queries in Polygonal Domains 207
l2
R(a) = R(b) lb 2
l1 lb 2 b
b lb l2
b l1
la = l1 lb 1 la1 la
a la a
l2 a
The key step (Step 2) of the algorithm loops through the BSTs, Fo (a) and
Fo (b), until one of them is empty. Consider the point a first. In Step 2.1, for each
ready gate la in the ready queue, two cases arise. Case 1: the gate la is incident
to a neighboring triangle la l1 l2 . Case 2: la is incident to a neighboring simple
polygon R with gates l1 and l2 , la = l1 . In Case 1, if la l1 l2 contains b (Fig.
3 (a)), determine if a sees b by computing a tangent from b to the open funnel
associated with la . If yes, compute and return dist(a, b). Pull either a funnel to
split at la l1 l2 from the previous base gate or two neighboring funnels which
are end-funnels, one for each gate, l1 or l2 . In Case 2, if R contains b (Fig. 3 (b)),
identify the hourglass H(la , lb1 ) in R. Propagate the end-funnels of la and the
associated hourglass to lb1 by concatenating them with H(la , lb1 ), respectively.
If there exists an open resulting funnel, determine if a sees b. If yes, compute
and return dist(a, b). Otherwise, propagate the open funnel to b. The resulting
funnel f(a, b) is a string. In Step 2.2, propagate the end-funnels at la and their
associated hourglass to each neighboring gate. Remove each closed funnel from
the BST Fo (a) and add it to the set Fc (a). Update the DAG D(a). Repeat Steps
2.1 and 2.2 for b.
The algorithm reaches Step 3 when a does not see b and one of the sets Fo (a)
and Fo (b) is empty. W.l.o.g., let this set be Fo (a). In Step 3, for each funnel in
Fc (a), collect the first vertex (other than a if a is also a vertex) on the string of
the funnel (Lemma 3). Store it in Cmin . The algorithm outputs Cmin in Step 3.
We summarize the complexity of this algorithm in the next lemma.
Lemma 6. For any query pair (a, b) in P , Algorithm FindMinCriticalSites either
correctly finds the minimum set Cmin of critical sites or detects that a sees b. This
algorithm executes in the worst case in O(h log n) time.
Proof. We prove the correctness of the algorithm first. Let i ∈ {a, b}. Upon
termination, the algorithm either detects that a sees b or the set Fo (i) is empty.
For each funnel in Fc (i), the first vertex (other than the source i) on the string
of the funnel is the critical site in Cmin (Lemma 3 and Corollary 1). Next,
we analyze the complexity of the algorithm. The set of paths (in the reduced
skeleton graph) forming the open funnels from i at any stage of the algorithm
is planar. The total number of funnels encountered is bounded by O(h). Then,
the total number of funnels removed from Fo (i) is bounded O(h). We perform
O(h) concatenations, O(1) for each gate, and O(h) pulling operations. Thus,
210 H. Guo, A. Maheshwari, and J.-R. Sack
Finally, we present our query algorithm. The algorithm takes input as a query
pair (a, b) and outputs the distance dist(a, b). Using the point-location data
structure, first find triangles fa and fb containing a and b, respectively. Next,
identify the region R(a) containing a and R(b) containing b in the tessellation P .
Two cases arise. Case 1: R(a) = R(b); Case 2: R(a) = R(b). We consider Case
1. If R(a) is a triangle, than a sees b. Compute and return dist(a, b). Otherwise,
R(a) is a simple polygon. Let la and lb be the separating diagonals in R(a)
close to a and to b, respectively (Fig. 3 (c)). Construct an hourglass H(la , lb ) for
la and lb using the hierarchy of hourglasses, HH(R(a)), associated with R(a),
applying the algorithm of [5]. Concatenate H(a, la ), H(la , lb ) and H(lb , b). The
resulting hourglass H(a, b) is closed and it is the local shortest path between a
Shortest Path Queries in Polygonal Domains 211
References
1. Hershberger, J., Suri, S.: An optimal algorithm for Euclidean shortest paths in the
plane. SIAM J. Computing 28(6), 2215–2256 (1999)
2. Kapoor, S., Maheshwari, S.N., Mitchell, J.S.B.: An efficient algorithm for Euclidean
shortest paths among polygonal obstacles in the plane. Discete Comput. Geom. 18,
377–383 (1997)
3. Chen, D.Z., Daescu, O., Klenk, K.S.: On geometric path query problems. In:
Rau-Chaplin, A., Dehne, F., Sack, J.-R., Tamassia, R. (eds.) WADS 1997. LNCS,
vol. 1272, pp. 248–257. Springer, Heidelberg (1997)
4. Chiang, Y.J., Mitchell, J.S.B.: Two-point Euclidean shortest path queries in the
plane. In: SODA 1999: Proceedings of the tenth annual ACM-SIAM symposium
on Discrete algorithms, Philadelphia, PA, USA. Society for Industrial and Applied
Mathematics, pp. 215–224 (1999)
5. Guibas, L., Hershberger, J.: Optimal shortest path queries in a simple polygon. J.
Comput. Syst. Sci. (JCSS) 39(2), 126–152 (1989)
6. Srinivasan, V., Nackman, L.R.: Voronoi diagram for multiply-connected polygonal
domains I: algorithm. IBM Journal of Research and Development 31(3), 361–372
(1987)
7. Yang, C.L., Wang, J.Y., Meng, X.X.: Upper bounds on the size of inner Voronoi
diagrams of multiply connected polygons. J. Software 17(7), 1527–1534 (2006)
8. Kirkpatrick, D.G.: Optimal search in planar subdivisions. SIAM J. Comput. 12,
28–35 (1983)
A Fast 2-Approximation Algorithm for the
Minimum Manhattan Network Problem
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 212–223, 2008.
c Springer-Verlag Berlin Heidelberg 2008
A Fast 2-Approximation Algorithm 213
2 Preliminaries
Basic notations: For p = (p.x, p.y) ∈ IR2 , let Qk (p) denote the k-th closed
quadrant with respect to the origin p, e.g., Q1 (p) := {q ∈ IR2 | p.x ≤ q.x, p.y ≤
q.y}.
Define R(p, q) as a closed rectangle (possibly degenerate) where p, q ∈ IR2 are
its two opposite corners. BV (p, q) is defined as the vertical closed band bounded
by p, q, whereas BH (p, q) denotes the horizontal closed band bounded by p, q.
For the given point set T , let Γ be the union of vertical and horizontal lines
which pass through some point in T . In addition, we use [c, d] to represent the
vertical or horizontal segment with endpoints c and d, as Fig. 1 shows.
a
c d
e
b
d
c
a b
(a) (b)
Fig. 2. An example of a Pareto envelope. The black points in (a) are the set T . The
two separate grey regions in (b) are non-degenerate blocks, whereas the black lines are
degenerate blocks. All these blocks form the Pareto envelope P(T ).
Lemma 1. [4] For any non-trivial block B and any convex corner p in ∂B, it
holds that p ∈ TB .
Strips and staircases: Informally, for p, q ∈ TB , p.y < q.y, we call R(p, q) a
vertical strip if it does not contain any point in the region BV (p, q) except the
vertical lines {(x, y)|x = p.x, y ≤ p.y} and {(x, y)|x = q.x, y ≥ q.y}. Similarly,
for the points p, q ∈ TB , p.x < q.x, we call R(p, q) a horizontal strip R(p, q) if
it does not contain any point in the region BH (p, q) except the horizontal lines
{(x, y)|x ≤ p.x, y = p.y} and {(x, y)|x ≥ q.x, y = q.y}. Especially, we say a
vertical or horizontal strip R(p, q) is degenerate if p.x = q.x or p.y = q.y. Fig. 3
gives an example of a horizontal strip.
The other notion which plays a critical role in our algorithm is the staircase.
There are four kinds of staircases specified by a parameter k ∈ {1, · · · , 4}, and
without loss of generality we only describe the one with k = 1. Suppose R(p, q)
is a vertical strip and R(p , q ) is a horizontal strip, such that q ∈ Q1 (p), q ∈
Q1 (p ), p, q ∈ BV (p , q ), p , q ∈ BH (p, q), i.e., they cross in the way as Fig. 4
216 Z. Guo, H. Sun, and H. Zhu
R(p, q) q t
p
Fig. 3. The rectangle is a horizontal strip. Any point in TB within BH (p, q) can only
be placed on the dashed linee, e.g., the point t.
shows. Let o be the topmost and rightmost point in R(p, q) ∩ R(p , q ). Denote
by Tpp |qq the set of v in TB ∩Q1 (o) such that (Q3 (v)\Q3 (o)) ∩ TB = {v}. If
Tpp |qq = ∅, then let Spp |qq = v∈Tpp |qq R(o, v), which is said to be a staircase
(see Fig. 4). In this figure, no point in TB is located in the dark area and the
light grey regions (i.e., the staircase and the two unbounded half-bands) except
those in Tpp |qq .
As was observed in [1,4], the interiors of two staircases are disjoint, and the
interior of a staircase and a strip are disjoint. For a strip R(p, q), (p, q) is called
a strip pair. For each staircase Spp |qq , let v be any point in Tpp |qq , and (v, p)
(also (v, p )) is called a staircase pair.
Theorem 1. [4] For a network GB , if for any strip pair or staircase pair (p, q),
p, q ∈ TB , there exists a Manhattan path in GB connecting p and q, then GB is
a Manhattan network on TB .
3 Algorithm Description
Tpp |qq
Spp |qq
q
o
p
p
Proof. The procedure CreateNC consists of two steps. In the initial step, we run
the algorithm proposed by Benkert et al. [1,2] to get a nice cover EC .
In the second step, we modify EC to guarantee that EC ⊆ ΓB . Clearly a
segment e of EC which is not entirely laid on B must be used to cover a non-
degenerate strip. Without loss of generality, we use e to cover R(p, q), a vertical
strip with p the lower left corner and q the upper right corner. Assume that e
contains q. From q ∈ B we know ∂B crosses e. From p ∈ B, ∂B turns at some
point p down to p, as Fig. 6 shows. Let q be the bottom endpoint of e. It turns
out that the Manhattan path between p and q switches at the y-ordinate of q
which is less than that of p .
We move the switch segment up to the y-ordinate of p (note that switch seg-
ments are not added yet so the movement is just done in concept). Accordingly,
the part of e lying outside of B is moved left onto ∂B. Since no point of TB is
put outside of B, the part that has been moved is not used to cover any other
strip, which shows that EC is still a nice cover after the movement. We repeat
the modification until no such e exists. Then, we have EC ⊆ ΓB .
Corollary 1. For |TB | = n, the time complexity of CreateNC is O(n log n).
Proof. From [1], the time complexity of creating a nice cover is O(n log n).
Now we analyze the running time of the second step. Since each point of TB
is exactly in one vertical segment and one horizontal segment in EC , there exist
at most 2n segments in EC . Due to the fact that one modification step decreases
one segment that is not entirely on B and the number of segments is O(n), the
time complexity of the second step is O(n).
In summary, the running time of CreateNC is O(n log n).
Lemma 3. After the procedure CreateNC, ∂B ⊆ EC .
Proof. For p, q ∈ ∂B, let ∂Bpq be the part of ∂B from p to q in the counter-
clockwise direction (p, q excluded). It suffices to prove that ∂Bpq ⊆ EC whenever
p, q ∈ ∂B, TB ∩ ∂Bpq = ∅, i.e., p, q are two neighboring points. This is obviously
218 Z. Guo, H. Sun, and H. Zhu
true if p.x = q.x or p.y = q.y. For the other cases, we know there is no convex
corner in ∂Bpq since if such a convex corner exists, then it is not in TB , which
contradicts Lemma 1. Thus there is a concave corner on ∂Bpq , denoted by t.
Without loss of generality, assume that p, q ∈ Q4 (t), as Fig. 7 shows.
Among the points in TB let p be the leftmost one in Q1 (p) (choose the
bottommost if more than one exist) and q be the topmost point in Q3 (q) (choose
the rightmost if more than one exist). Note it is possible that p = q or q = p.
It is clear that R(p, p ) is a vertical strip and R(q, q ) is a horizontal strip.
From EC ⊆ B we have [p, t] ⊆ EC to cover R(p, p ), and [q, t] ⊆ EC to cover
R(q, q ). Therefore ∂Bpq ⊆ EC .
q q ∂B
p ∂B p ∂B p
e t
q
q
q q
p p p
q q
Mpq ∂B
Spp |qq
Spp |qq
q q
o
p p o
p Mp q p
Fig. 8. From a staircase to an RS. The black line in the left picture is ∂B.
Mpq and Mp q which are also in B, enclose a closed area covering S . So we
have S ⊆ B, which yields that all segments added within S are also within B.
Theorem 3. There exists a procedure CompOptNet such that for the given RS
S with the point set Ts , |TS | = n, CompOptNet takes O(n2 ) time and space to
compute an optimal network E such that E ∪ ∂B connects each point in TS to
either Mpq or Mp q .
vi
∂B
S(i, k) vk
w(i, k) yk
xk vk+1 (yk+1 )
xk+1
h(k + 1, j)
S(k + 1, j) vj
Input: T
Algorithm:
1. Compute P(T ).
2. For each trivial block B ⊆ P(T ),
connect the two points in TB with a Manhattan path.
3. For each non-trivial block B ⊆ P(T ) do the following:
3.1. Run CreateNC to get EC satisfying EC ⊆ ΓB .
3.2. Add the union of switch segments ES .
3.3. For each RS Spp |qq ,
Theorem 4. For the given point set T of size n, the algorithm above takes
O(n2 ) time and space to compute a Manhattan network G on T .
Proof. As Chalmet et al. [3] described, we can use O(n log n) time to compute
the Pareto envelope P(T ). Step 2 takes O(n) time since at most O(n) blocks
exist. Now we analyze the time complexity of Step 3. By Corollary 1, the time
complexity of Step 3.1 is O(n log n), whereas by Theorem 3, the time complexity
of Step 3.3 is
O |Tpp |qq |2 = O(n2 )
Spp |qq
A Fast 2-Approximation Algorithm 221
Note that at most O(n) switch segments exist, so the running time of Step 3.2
is O(n).
In conclusion, the overall time complexity of the algorithm is O(n2 ).
4 Approximation Analysis
Let G ⊆ Γ be the optimal Manhattan network on T such that ∂B ⊆ G
whenever B is non-trivial. For any block B ⊆ P(T ) let GB := G ∩ B and
GB := G ∩ B, where G is the network we obtained by the approximation
algorithm. So we need to give the upper bound of L(G) with respect to L(G ).
Given the non-trivial block B, we know Epp |qq is the local optimal network
within a single RS Spp |qq . Let ER be the union of these local optimal net-
Fig. 10. A segment shared by two different RSes. These segments form the set ED .
≤
L(Epp |qq )
Spp |qq
References
1. Benkert, M., Wolff, A., Widmann, F.: The minimum Manhattan network problem:
a fast factor-3 approximation. Technical Report 2004-16, Fakultät für Informatik,
Universität Karlsruhe. In: Proceedings of the 8th Japanese Conference on Discrete
and Computational Geometry, pp. 16–28 (2005) (A sort version appeared)
2. Benkert, M., Shirabe, T., Wolff, A.: The minimum Manhattan network problem:
approximations and exact solution. In: Proceedings of the 20th European Workshop
on Computational Geometry, pp. 209–212 (2004)
3. Chalmet, G., Francis, L., Kolen, A.: Finding efficient solutions for rectilinear distance
location problems efficiently. European Journal of Operations Research 6, 117–124
(1981)
4. Chepoi, V., Nouioua, K., Vaxès, Y.: A rounding algorithm for approximating min-
imum Manhattan networks. Theoretical Computer Science 390, 56–69 (2008) Pre-
liminary version appeared. In: Proceedings of the 8th International Workshop on
Approximation Algorithms for Combinatorial Optimization, pp. 40–51 (2005)
5. Frances Yao, F.: Efficient dynamic programming using quadrangle inequalities. In:
Proceedings of the 12th Annual ACM Symposium on Theory of Computing, pp.
429–435 (1980)
6. Gudmundsson, J., Levcopoulos, C., Narasimhan, G.: Approximating a minimum
Manhattan network. Nordic Journal of Computing 8, 219–232 (2001); Preliminary
version appeared. In: Proceedings of the 2nd International Workshop on Approxi-
mation Algorithms for Combinatorial Optimization, pp. 28–37 (1999)
7. Kato, R., Imai, K., Asano, T.: An improved algorithm for the minimum Manhattan
network problem. In: Proceedings of the 13th International Symposium on Algo-
rithms and Computation, pp. 344–356 (2002)
8. Lam, F., Alexandersson, M., Pachter, L.: Picking alignments from (Steiner) trees.
Journal of Computational Biology 10, 509–520 (2003)
9. Seibert, S., Unger, W.: A 1.5-approximation of the minimal Manhattan network
problem. In: Proceedings of the 16th International Symposium on Algorithms and
Computation, pp. 246–255 (2005)
A Fast 2-Approximation Algorithm 223
+ 1.
We divide the proof into three cases.
Case 1: i = i or j = j . Then, obviously c(i, j) + c(i , j ) = c(i, j ) + c(i , j).
Case 2: i < i = j < j . Then, we need to prove c(i, j) + c(i , j ) ≤ c(i, j ).
Choose z ∈ [i, j − 1] such that c(i, j ) = c(i, z)+ c(z + 1, j )+ w(i, z)+ h(z + 1, j ).
Assume z ∈ [i, j − 1] (The other cases can be proven symmetrically since z ∈
[i , j − 1]), then we have
The second inequality holds since (1) the function h and w satisfy the quadrangle
inequality, and (2) c(y + 1, j) + c(z + 1, j ) ≤ c(y + 1, j ) + c(z + 1, j) by induction
hypothesis.
Combining the three cases, we conclude that c the satisfies quadrangle in-
equality.
Minimum Cost Homomorphism Dichotomy for
Oriented Cycles
1 Introduction
For directed (undirected) graphs G and H, a mapping f : V (G)→V (H) is a
homomorphism of G to H if uv is an arc (edge) implies that f (u)f (v) is an
arc (edge). Let H be a fixed directed or undirected graph. The homomorphism
problem for H asks whether a directed or undirected input graph G admits a
homomorphism to H. The list homomorphism problem for H asks whether a
directed or undirected input graph G with lists (sets) Lu ⊆ V (H), u ∈ V (G)
admits a homomorphism f to H in which f (u) ∈ Lu for each u ∈ V (G).
Suppose G and H are directed (or undirected) graphs, and ci (u), u ∈ V (G),
i ∈V (H) are nonnegative costs. The cost of a homomorphism f of G to H
is u∈V (G) cf (u) (u). If H is fixed, the minimum cost homomorphism problem,
MinHOM(H), for H is the following discrete optimization problem. Given an
input graph G, together with costs ci (u), u ∈ V (G), i ∈ V (H), we wish to find
a minimum cost homomorphism of G to H, or state that none exists.
The minimum cost homomorphism problem was introduced in [9], where it
was motivated by a real-world problem in defence logistics. We believe it offers
a practical and natural model for optimization of weighted homomorphisms.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 224–234, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Minimum Cost Homomorphism Dichotomy for Oriented Cycles 225
The problem’s special cases include the homomorphism and list homomorphism
problems [15] and the general optimum cost chromatic partition problem, which
has been intensively studied [12,17].
There is an extensive literature on the minimum cost homomorphism prob-
lem, e.g., see [4,5,6,7,8,9]. These and other papers study the time complexity
of MinHOM(H) for various families of directed and undirected graphs. In par-
ticular, Gutin, Hell, Rafiey and Yeo [5] proved a dichotomy classification for
all undirected graphs (with possible loops): If H is a reflexive proper interval
graph or a proper interval bigraph, then MinHOM(H) is polynomial time solv-
able; otherwise, MinHOM(H) is NP-hard. It is an open problem whether there
is a dichotomy classification for the complexity of MinHOM(H) when H is a
digraph with possible loops. We conjecture that such a classification exists and,
moreover, the following assertion holds:
For the definitions of a Min-Max and k-Min-Max ordering see Section 3, where
we give theorems (first proved in [9,8]) showing that if H has one of the two or-
derings, then MinHOM(H) is polynomial time solvable. So, it is the NP-hardness
part of Conjecture 1 which is the ‘open’ part of the conjecture.
Very recently Gupta, Hell, Karimi and Rafiey [4] obtained a dichotomy classi-
fication for all reflexive digraphs that confirms this conjecture. They proved that
if a reflexive digraph H has no Min-Max ordering, then MinHom(H) is NP-hard.
Gutin, Rafiey and Yeo [7,8] proved that if a semicomplete multipartite digraph
H has neither Min-Max ordering nor k-Min-Max ordering, then MinHom(H) is
NP-hard.
In this paper, we show that the same result (as for semicomplete multipartite
digraphs) holds for oriented cycles. This provides a further support for Con-
jecture 1. In fact, we prove a graph-theoretical dichotomy for the complexity
of MinHom(H) when H is an oriented cycle. The fact that Conjecture 1 holds
for oriented cycles follows from the proof of the graph-theoretical dichotomy.
In the proof, we use a new concept of a (k, l)-Min-Max ordering introduced in
Section 3. Our motivation for Conjecture 1 partially stems from the fact that
we initially proved polynomial time solvability of MinHOM(H) when V (H) has
a (k, l)-Min-Max ordering by reducing it to the minimum cut problem. How-
ever, we later proved that (k, l)-Min-Max orderings can simply be reduced to
p-Min-Max orderings for p ≥ 1 (see Section 3).
Homomorphisms to oriented cycles have been investigated in a number of
papers. Partial results for the homomorphism problem to oriented cycles were
obtained in [10] and [16]. A full dichotomy was proved by Feder [2]. Feder,
Hell and Rafiey [3] obtained a dichotomy for the list homomorphism problem
for oriented cycles. Notice that our dichotomy is different from the ones in [2]
and [3].
226 G. Gutin, A. Rafiey, and A. Yeo
b 10 b 12
b7 b9
b 13
b 11
b2 b4 b6 b8
b 14
b1 b3 b5
(i) Every arc of H is an arc from Vi to Vi+1 for some i ∈ [k] and
(ii) (V i , V i+1 ) = (v1i , v2i , . . . , v(i)
i
v1i+1 v2i+1 , . . . , v(i+1)
i+1
) is a Min-Max ordering
of the subdigraph of H induced by Vi ∪ Vi+1 for each i ∈ [k]. (All indices are
taken modulo k.)
Our study of MinHOM(H) for oriented cycles H has led us to the following new
concept.
(i) Every arc of H is an arc from Vi to Vi+1 ) for some i ∈ [k − 1], or is an arc
from Uj to Uj+1 for some j ∈ [l − 1].
(ii) (V i , V i+1 ) is a Min-Max ordering of the subdigraph H[Vi ∪ Vi+1 ] for all
i ∈ [k − 1].
(iii) (U i , U i+1 ) is a Min-Max ordering of the subdigraph H[Ui ∪ Ui+1 ] for all
i ∈ [l − 1].
(iv) (V 1 , V 2 , U 2 ) is a Min-Max ordering of the subdigraph H[V1 ∪ V2 ∪ U2 ].
Minimum Cost Homomorphism Dichotomy for Oriented Cycles 229
It turns out that (k, l)-Min-Max orderings can be reduced to p-Min-Max order-
ings as follows from the next assertion:
Theorem 3. If a digraph H has a (k, l)-Min-Max ordering, then MinHOM(H)
is polynomial-time solvable.
Proof. Let H have a (k, l)-Min-Max ordering as described in Definition 1. Let
d = k−l. We will show that H has a d-Min-Max ordering, which will be sufficient
because of Theorems 1 and 2. (Recall that a 1-Min-Max ordering is simply a
Min-Max ordering.) Let us consider two cases.
Case 1: d = 1. It is not difficult to show that the ordering
is a Min-Max ordering. Indeed, all crossing pairs of arcs are only in the subgraphs
given in (ii)-(v) of Definition 1. According to the definition, the maximum and
minimum of every crossing pair is in H.
Case 2: d ≥ 2. Let si = max{p : i + pd ≤ l} for each i ∈ [d]. Consider the
following orderings for each 2 ≤ i ≤ d
for each i ∈ [q]. We write l+ h+ instead of (l+ h+ )1 . For example, the cycle in
Figure 1 is of the form l+ h+ . Balanced oriented cycles C of the form l+ h+ are
considered in the following:
230 G. Gutin, A. Rafiey, and A. Yeo
The following lemma was first proved in [11]; see also [2,18] and Lemma 2.36 in
[15].
b1 b2 . . . bp ar−1 ar−2 . . . a2 a1 b1
Lemma 2. Let P1 and P2 be two oriented paths of type r. Let P1 be of the form
h+ l+ and let P2 be of the form (l+ h+ )k , k ≥ 1. Then there is an oriented path P
of type r that maps homomorphically to P1 and P2 such that the initial vertex of
P maps to the initial vertices of P1 and P2 and the terminal vertex of P maps to
the terminal vertices of P1 and P2 . The length of P is polynomial in the lengths
of P1 and P2 , and P is of the form (l+ h+ )k .
(i) cb1 (q1 ) = cb1 (ql ) = 0 and cbq (q1 ) = cbq (ql ) = 1;
(ii) cbs (qr ) = cbt (qr ) = 0 and cb (qr ) = M for all b ∈ V (C) − {bs , bt };
(iii) cb2 (q) = M for all q ∈ {q2 , q3 , . . . , qr−1 } (= ∅, as r ≥ 3);
(iv) if s = 2 then cb1 (qr−1 ) = M ;
(v) all other costs of mapping vertices of D to H are zero.
References
1. Bang-Jensen, J., Gutin, G.: Digraphs: Theory, Algorithms and Applications.
Springer, London (2000)
2. Feder, T.: Homomorphisms to oriented cycles and k-partite satisfiability. SIAM J.
Discrete Math. 14, 471–480 (2001)
3. Feder, T., Hell, P., Rafiey, A.: List homomorphism to balanced digraphs (submit-
ted)
4. Gupta, A., Hell, P., Karimi, M., Rafiey, A.: Minimum cost homomorphisms to
reflexive digraphs. In: LATIN 2008 (to appear, 2008)
5. Gutin, G., Hell, P., Rafiey, A., Yeo, A.: Minimum Cost Homomorphisms to Proper
Interval Graphs and Bigraphs. Europ. J. Combin. (to appear)
6. Gutin, G., Rafiey, A., Yeo, A.: Minimum Cost and List Homomorphisms to Semi-
complete Digraphs. Discrete Appl. Math. 154, 890–897 (2006)
7. Gutin, G., Rafiey, A., Yeo, A.: Minimum Cost Homomorphisms to Semicomplete
Multipartite Digraphs. Discrete Applied Math. (to apear)
8. Gutin, G., Rafiey, A., Yeo, A.: Minimum Cost Homomorphisms to Semicomplete
Bipartite Digraphs (submitted)
9. Gutin, G., Rafiey, A., Yeo, A., Tso, M.: Level of repair analysis and minimum cost
homomorphisms of graphs. Discrete Appl. Math. 154, 881–889 (2006); Preliminary
version appeared. In: Megiddo, N., Xu, Y., Zhu, B. (eds.): AAIM 2005. LNCS,
vol. 3521, pp. 427–439. Springer, Heidelberg (2005)
10. Gutjahr, W.: Graph Colourings, PhD thesis, Free University, Berlin (1991)
11. Häggkvist, R., Hell, P., Miller, D.J., Neumann-Lara, V.: On multiplicative graphs
and the product conjecture. Combinatorica 8, 63–74 (1988)
234 G. Gutin, A. Rafiey, and A. Yeo
12. Halldorsson, M.M., Kortsarz, G., Shachnai, H.: Minimizing average completion
of dedicated tasks and interval graphs. In: Goemans, M.X., Jansen, K., Rolim,
J.D.P., Trevisan, L. (eds.) RANDOM 2001 and APPROX 2001. LNCS, vol. 2129,
pp. 114–126. Springer, Heidelberg (2001)
13. Feder, T., Hell, P., Huang, J.: List homomorphisms and circular arc graphs. Com-
binatorica 19, 487–505 (1999)
14. Hell, P., Nešetřil, J.: On the complexity of H-colouring. J. Combin. Theory B 48,
92–110 (1990)
15. Hell, P., Nešetřil, J.: Graphs and Homomorphisms. Oxford University Press, Oxford
(2004)
16. Hell, P., Zhu, X.: The existence of homomorphisms to oriented cycles. SIAM J.
Discrete Math. 8, 208–222 (1995)
17. Jansen, K.: Approximation results for the optimum cost chromatic partition prob-
lem. J. Algorithms 34, 54–89 (2000)
18. Zhu, X.: A simple proof of the multipilicatively of directed cycles of prime power
length. Discrete Appl. Math. 36, 333–345 (1992)
Minimum Leaf Out-Branching Problems
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 235–246, 2008.
c Springer-Verlag Berlin Heidelberg 2008
236 G. Gutin, I. Razgon, and E.J. Kim
2 MinLOB-DAG
MINLEAF
Proof. We start with proving the validity of the algorithm. Observe that an
acyclic digraph has an out-branching if and only if there exists only one vertex
of in-degree zero. Hence Step 1 returns ‘NO’ precisely when min (D) = 0.
Let M be the maximum matching obtained in Step 2, let V (M ) be the set of
vertices of B covered by M , and let Z = X \ V (M ) and Z = X \ V (M ).
First we claim that Z is the set of the leaves of T , the out-branching of D
obtained in the end of Step 7. Consider the edge set M ∗ obtained at the end of
Step 5. First observe that for each vertex y ∈ Z , there exists an edge of E(B)
which is incident with y since r is the only vertex of in-degree zero and thus
no vertex of Z is isolated. Moreover, all neighbors of y are covered by M due
to the maximality of M . It follows that M ∗ ⊇ M covers all vertices of X and
leaves Z uncovered. Notice that r is covered by M . Indeed there exists a vertex
u such that r is the only in-neighbor of u in D. Hence if r was not covered by
M then u would not be covered by M either, which means we could extend M
by ru , a contradiction.
Consider T which has been obtained in the end of Step 7. Clearly d− T (v) = 1
for all v ∈ V (D) \ {r} due to the construction of M ∗ . Moreover D does not have
a cycle, which means that T is connected and thus is an out-branching. Finally
no vertex of Z has an out-neighbor in T while all the other vertices have an
out-neighbor. Now the claim holds.
Conversely, whenever there exists a minimum leaf out-branching T of D with
the leaf set Z, we can build a matching in B which covers exactly X\Z among the
vertices of X. Indeed, simply reverse the process of building an out-branching T
from M ∗ described at Step 7. If some vertex x ∈ X has more than one neighbor
in X , eliminate all but one edge incident with x.
Secondly we claim that T obtained in MINLEAF(D) is of minimum number
of leaves. Suppose to the contrary that the the attained out-branching T is not
a minimum leaf out-branching of D. Then a minimum leaf out-branching can
be used to produce a matching of B that covers more vertices of X than M
238 G. Gutin, I. Razgon, and E.J. Kim
3 Parameterizations of MinLOB
The following is a natural way to parameterize MinLOB.
MinLOB Parameterized Naturally (MinLOB-PN)
Instance: A digraph D.
Parameter: A positive integer k.
Question: Is min (D) ≤ k ?
Clearly, this problem is NP-complete already for k = 1 as for k = 1 MinLOB-
PN is equivalent to the hamiltonian directed path problem. Let v be an arbi-
trary vertex of D. Transform D into a new digraph Dk by adding k vertices
v1 , v2 , . . . , vk together with the arcs vv1 , vv2 , . . . , vvk . Observe that D has a
hamiltonian directed path terminating at v if and only if min(Dk ) ≤ k. Since
the problem is NP-complete of checking whether a digraph has a hamiltonian
directed path terminating at a prescribed vertex, we conclude that MinLOB-PN
is NP-complete for every fixed k.
Clearly, min (D) ≤ n − 1 for every digraph D of order n > 1. Consider a
different parameterizations of MinLOB.
MinLOB Parameterized Below Guaranteed Value (MinLOB-
PBGV)
Instance: A digraph D of order n with min (D) > 0.
Parameter: A positive integer k.
Question: Is min (D) ≤ n − k ?
Solution: An out-branching B of D with at most n − k leaves or the
answer ‘NO’ to the above question.
Note that we consider MinLOB-PBGV as a search problem, not just as a de-
cision problem. In the next section we will prove that MinLOB-PBGV is fixed-
parameter tractable. We will find a problem kernel of order O(k · 2k ) and con-
struct an additive FPT algorithm of running time O(2O(k log k) + n3 ). To obtain
our results we use notions and properties of vertex cover and tree decomposition
of underlying graphs and Las Vergnas’ theorem on digraphs.
The parametrization MinLOB-PBGV is of the type below a guaranteed value.
Parameterizations above/below a guaranteed value were first considered by Ma-
hajan and Raman [20] for the problems Max-SAT and Max-Cut; such parameter-
izations have lately gained much attention, cf. [11,15,16,17,21] (it worth noting
Minimum Leaf Out-Branching Problems 239
that Heggernes, Paul, Telle, and Villanger [17] recently solved the longstanding
minimum interval completion problem, which is a parametrization above guar-
anteed value). For directed graphs there have been only a couple of results on
problems parameterized above/below a guaranteed value, see [6,12].
Let us denote by K 1,p−1 the star digraph of order p, i.e., the digraph with
vertices 1, 2, . . . , p and arcs 12, 13, . . . , 1p. Our success with MinLOB-PBGV may
lead us to considering the following stronger (than MinLOB-PBGV) parameter-
izations of MinLOB.
4 Solving MinLOB-PBGV
The underlying graph U G(D) of a digraph D is obtained from D by omitting all
orientation of arcs and by deleting one edge from each resulting pair of parallel
edges. For a digraph D, let α(D) denote the independence number of U G(D).
Lemma 1. Let D be a digraph of order n with min (D) > 0. In time O(1.28k +
n3 ), we can find either an out-branching of D with at most n − k leaves or a
vertex cover of D of size less than k.
LEAFRED(D, B)
improve ← true
while improve = true do {
while there is an arc xy such that x and y are leaves and d+ (p(y)) ≥ 2
do B ← B + xy − p(y)y
if there is an arc xy such that x and y are leaves of B then {
B ← LEAFRED(D − y, B − y)
if p(y) ∈ L(B ) then B ← B + p(y)y
else B ← B + xy }
else B ← B
if |L(B )| < |L(B)| then B ← B else improve ← false }
return B
It follows from Lemma 1 that there is an FPT algorithm that given an instance
(D, k) of the MinLOB-PBGV problem either returns a solution or specifies a
vertex cover of D of size less than k. We are going to show that, in the latter
case, there is a possibility of kernelization. Let U be a vertex cover of D. Let
S ⊆ U , u ∈ U (we allow S = ∅). We denote by V (S, u) a subset of vertices w
of V (D) \ U such that (u, w) ∈ A(D) and N + (w) = S. Let N List be the set of
all non-empty items V (S, u). Now we create a set V according to the following
algorithm called KERNEL.
Minimum Leaf Out-Branching Problems 241
1. V ← ∅
2. let all the elements of N List be unmarked
3. while N List has at least one unmarked item V (S, u) do
if |V (S, u) \ V | ≤ 2|U | then
V ← V ∪ V (S, u) else
V ← V ∪W , where W is an arbitrary subset of 2|U | vertices of V (S, u)\
V
endif
mark V (S, u)
endwhile
4. V ← V ∪ U
5. if D has a vertex v ∗ with in-degree 0 then V ← V ∪ {v ∗ }
6. return V
at least k non-leaf vertices, which shows that (D , k) is a ‘YES’ instance of the
MinLOB-PBGV problem.
Thus we have shown that the MinLOB-PBGV problem has a kernel of order
proportional to k · 2k . Now we are going to clarify how we explore this kernel
in order to get the desired out-branching. A straightforward exploration of all
possible out-branchings (using, e.g., the main algorithm of [18]) is not a good
choice because the number of different out-branchings may be up to pp−1 , where
p = |V (D )| = (k · 2k ). Indeed, by the famous Kelly’s formula the number
of spanning trees in the complete graph Kp on p vertices equals pp−2 . In the
complete digraph on p vertices, one can get p out-branchings from each spanning
tree of Kp by assigning a vertex to be the root.
In order to achieve a better running time we provide an alternative way of
showing the fixed-parameter tractability of the MinLOB-PBGV problem based
on the notion of tree decomposition.
A tree decomposition of an (undirected) graph G is a pair (X, U ) where U is
a tree whose vertices we will call nodes and X = {Xi : i ∈ V (U )} is a collection
of subsets of V (G) (called bags) such that
1. i∈V (U) Xi = V (G),
2. for each edge {v, w} ∈ E(G), there is an i ∈ V (U ) such that v, w ∈ Xi , and
3. for each v ∈ V (G) the set of nodes {i : v ∈ Xi } form a subtree of U .
244 G. Gutin, I. Razgon, and E.J. Kim
The width of a tree decomposition ({Xi : i ∈ V (U )}, U ) equals maxi∈V (U) {|Xi |−
1}. The treewidth of a graph G is the minimum width over all tree decompositions
of G. We use the notation tw(G) to denote the treewidth of a graph G.
By a tree decomposition of a digraph D we will mean a tree decomposition of
the underlying graph U G(D). Also, tw(D) = tw(U G(D)).
Alon et al. [1,2] proved that this problem is FPT for several special classes of
digraphs such as strongly connected digraphs and acyclic digraphs, and Bonsma
and Dorn [7] proved that the problem is FPT. Note that in the three papers,
O(1)
MaxLOB-PN algorithms are of running time O(2k(log k) · nO(1) ).
Interestingly, MaxLOB-PN remains NP-complete even when the given digraph
D is acyclic [3], which is in a clear contrast with MinLOB-PBGV unless P=NP.
References
1. Alon, N., Fomin, F., Gutin, G., Krivelevich, M., Saurabh, S.: Parameterized Algo-
rithms for Directed Maximum Leaf Problems. In: Arge, L., Cachin, C., Jurdziński,
T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 352–362. Springer, Hei-
delberg (2007)
2. Alon, N., Fomin, F., Gutin, G., Krivelevich, M., Saurabh, S.: Better Algorithms
and Bounds for Directed Maximum Leaf Problems. In: Arvind, V., Prasad, S. (eds.)
FSTTCS 2007. LNCS, vol. 4855, Springer, Heidelberg (2007)
3. Alon, N., Fomin, F.V., Gutin, G., Krivelevich, M., Saurabh, S.: Spanning directed
trees with many leaves. Report arXiv: 0803.0701 (2008)
4. Alt, H., Blum, N., Melhorn, K., Paul, M.: Computing
of maximum cardinality
matching in a bipartite graph in time O(n1.5 m/ log n). Inf. Proc. Letters 37,
237–240 (1991)
5. Bang-Jensen, J., Gutin, G.: Digraphs: Theory, Algorithms and Applications.
Springer, Heidelberg (2000), www.cs.rhul.ac.uk/books/dbook/
6. Bang-Jensen, J., Yeo, A.: The minimum spanning strong subdigraph problem is
fixed parameter tractable. Discrete Applied Math. (to appear)
7. Bonsma, P.S., Dorn, F.: An FPT Algorithm for Directed Spanning k-Leaf. Preprint
046-2007, Combinatorial Optimization & Graph Algorithms Group, TU Berlin
(November 2007) (preprint 046-2007)
8. Chandran, L.S., Grandoni, F.: Refined memorization for vertex cover. Inform. Proc.
Letters 93, 125–131 (2005)
9. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, Heidelberg
(1999)
246 G. Gutin, I. Razgon, and E.J. Kim
10. Demers, A., Downing, A.: Minimum leaf spanning tree. US Patent no. 6,105,018
(August 2000)
11. Fernau, H.: Parameterized Algorithmics: A Graph-theoretic Approach. Habilita-
tion thesis, U. Tübingen (2005)
12. Fernau, H.: Parameterized Algorithmics for Linear Arrangement Prob-
lems(manscript, July 2005)
13. Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Heidelberg
(2006)
14. Guo, J., Niedermeier, R.: Invitation to Data Reduction and Problem Kernelization.
ACM SIGACT News 38, 31–45 (2007)
15. Gutin, G., Rafiey, A., Szeider, S., Yeo, A.: The Linear Arrangement Problem Pa-
rameterized Above Guaranteed Value. Theory of Computing Systems 41, 521–538
(2007)
16. Gutin, G., Szeider, S., Yeo, A.: Fixed-Parameter Complexity of Minimum Profile
Problems. Algorithmica (to appear)
17. Heggernes, P., Paul, C., Telle, J.A., Villanger, Y.: Interval completion with few
edges. In: Proc. STOC 2007 - 39th ACM Symposium on Theory of Computing,
pp. 374–381 (2007)
18. Kapoor, S., Ramesh, H.: An Algorithm for Enumerating All Spanning Trees of a
Directed Graph. Algorithmica 27, 120–130 (2000)
19. Las Vergnas, M.: Sur les arborescences dans un graphe orienté. Discrete Math. 15,
27–29 (1976)
20. Mahajan, M., Raman, V.: Parameterizing above guaranteed values: MaxSat and
MaxCut. J. Algorithms 31, 335–354 (1999)
21. Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford University
Press, Oxford (2006)
Graphs and Path Equilibria
Stéphane Le Roux
École normale supérieure de Lyon, Université de Lyon, LIP, CNRS, INRIA, UCBL
1 Introduction
This paper summarises a 40-page document [4] that presents detailed proofs and
more examples. This paper provides an abstract formalism that enables generic
proofs, yet accurate results, about path equilibria in graphs. Other approaches
to optimisation in graphs may be found in [3], for instance.
This paper introduces dalographs, i.e. finite, arc-labelled, directed graphs with
non-zero outdegree wlog (without loss of generality). In this paper, paths are infi-
nite wlog. Note that the outdegree constraint ensures existence of infinite paths,
starting from any node. This uniformity facilitates an ”algebraic” approach.
Also, paths are non-self-crossing: their shapes resemble 6 or 0 but not 8 or A.
This is often desirable, but may yield a loss of generality in some areas.
In this formalism, a path induces an ultimately periodic sequence of labels
(of arcs that are involved in the path). An arbitrary binary relation over such
sequences is assumed and named preference. Using the preference to compare the
sequences induced by two paths starting from the same node, one can compare
these paths. If a path has no successor wrt the new relation/preference, it is
deemed maximal. A strategy is an object built on a dalograph. It amounts to
every node’s choosing an outgoing arc. Hence from any node, a strategy induces
a path. Finally, an equilibrium is a strategy inducing maximal paths at any node.
This paper gives a sufficient condition on the preference for equilibrium ex-
istence in any dalograph, and examples of relations complying with it: lexico-
graphic and Pareto ordering. The condition involves strict weak orders, which
http://perso.ens-lyon.fr/stephane.le.roux/. Now working at INRIA-Microsoft Re-
search. I thank Pierre Lescanne for his comments on the draft of this paper.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 247–258, 2008.
c Springer-Verlag Berlin Heidelberg 2008
248 S. Le Roux
are discussed e.g. in [1]. To prove sufficiency, design the seeking-forward function
that expects a node and returns a path starting from the node: Informally, pick
a (candidate) path that is preference-wise maximal at the given node; follow it
until its current suffix, which is also a path, is not maximal among the suffixes
that form a path when appended to the current prefix; pick a suffix that is max-
imal among these possible suffixes, and append it to the current prefix to form
a new candidate path, and so on till there is only one possible suffix. This pro-
cess terminates due to the non-self-crossing constraint, and it yields a hereditary
maximal path: a path that is maximal at all of its nodes. Equilibrium existence
is proved by induction on the number of arcs in the dalograph, as follows:
– Compute a hereditary maximal path in the dalograph.
– Remove the arcs of the dalograph that the path ignored while visiting adja-
cent nodes. This yields a smaller dalograph.
– Compute an equilibrium on this smaller dalograph and add the ignored arcs
back. This yields an equilibrium for the original dalograph.
Conversely, this paper gives a necessary condition on the preference for equi-
librium existence in every dalograph. The condition involves binary relation clo-
sures that are actually related to the sufficient condition: e.g. sufficiency involves
preference’s transitivity, and necessity involves the preference’s transitive closure.
These closures preserve equilibrium existence: if a preference ensures equilibrium
existence, so do its closures. By the notion of simple closure, the combination of
the above-mentioned closures also preserves equilibrium existence, which gives a
non-trivial necessary condition. This paper also provides an example of a relation
that does not meet the requirements of this condition.
An example shows that the necessary condition is not sufficient in general,
although it is sufficient when preference is a total order. However, it is unclear
whether or not the sufficient condition is necessary, and what a practical nec-
essary and sufficient condition would be. As an application to networking, one
derives a sufficient condition on routing policies for stable routing to exist. This
condition is also necessary when the policy is a total order, as suggested above.
Section 2 defines dalographs and their equilibria; section 3 discusses strict
weak orders; section 4 proves a sufficient condition for equilibrium existence and
gives examples and an application to network routing; section 5 defines simple
closures, proves a necessary condition for equilibrium existence, and gives an
example; section 6 compares the sufficient condition and the necessary condition,
and presents a further application to network routing in the total order case.
Unless said otherwise, universal quantifiers are usually omitted in front of
formal statements: e.g. a claim of the form P (x, y) should be read ∀x, y, P (x, y).
Δ
Also, the notation P (x) = Q(x) means that P is defined as coinciding with Q.
u uovo
The usual induction principle for walks goes from the empty walk to bigger
walks, along the inductive definition of walks. Here, walks are bounded since
dalographs are finite. This enables an alternative induction principle for walks.
Lemma 3 (Nibbling induction principle for walks). Let P be a predicate
on walks in a dalograph g. Assume that for every walk x, ”P (xo) for all walks
xo” implies ”P (x)” (where o is a node). Then P (x) for every walk x.
A strategy is an object built on a dalograph by choosing an outgoing arc at each
node. In the strategy below, the choices are represented by double lines.
o1 a1 o2 a2
a4 a5 o3 a3
a6 a7
o4 o5
a8
Definition 4 (Strategy). Given a dalograph g, a strategy s on g is a pair (g, c),
where c is a function from the nodes of g to themselves, and such that for all
nodes o, the pair (o, c(o)) is an arc of g.
250 S. Le Roux
Let o be a node of some strategy s = (g, c). Following the choices of s starting
Δ
from c(o) defines (co-inductively) the path p(s, o) = c(o) · p(s, c(o)). For instance
in the picture above, p(s, o4 ) = o1 o2 oω
3 . In turn, any path Γ induces a (ultimately
periodic) sequence of labels seq(Γ ). For instance above, seq(o5 o2 oω ω
3 ) = a6 a2 a3 .
These sequences may be compared through a preference binary relation ≺. More-
over, if paths Γ1 and Γ2 start from the same node and induce sequences γ1 and
γ2 with γ1 ≺ γ2 , one writes Γ1 ≺ Γ2 by abuse of notation.
The following definition captures the notion of maximality (with respect to
a preference) of a path among the continuations of a given walk. In addition,
this paper needs to discuss paths all of whose subpaths are maximal from their
starting points. The notion of hereditary maximality captures this idea.
In the rest of this paper, ”equilibrium” may mean ”global equilibrium”. In the
strategy below, arcs are labelled with natural numbers and ≺ is the lexicographic
extension of the usual order to infinite sequences of natural numbers. So, the
strategy is a local equilibrium for node o but not for node o. Then, lemma 7
says that subpreference preserves (local) equilibrium.
o 2 3
0 0
1 1 1
o
0
3 Binary Relations
This section rephrases the notion of strict weak order (studied in [1]) and in-
troduces a few predicates on binary relations over sequences. It also proves a
Graphs and Path Equilibria 251
≺ ≺ ≺ ≺
γ α β δ
This section proves a sufficient condition for equilibrium existence in any dalo-
graph, it gives examples of relations meeting the requirements of the sufficient
condition, and it applies the result to network routing.
The notion of semi-hereditary maximality lies and makes the connection be-
tween maximality and and hereditary maximality. A lemma follows its definition.
Given a non-empty walk, the function below expects and returns a continuation
of the walk. Informally: If the walk is looping, return its sole continuation. Oth-
erwise, follow the given continuation until its current suffix is not a maximal
continuation of the new walk composed of the given walk and the current prefix
of the given continuation. At that point, feed the function with the new walk
and any of its maximal continuation. Given u a non-empty finite sequence, uf
(resp. ul ) represents the first (resp. last) element of u.
The properties of lemma 16 were proved in the same order they are stated. Their
combination helps prove lemma 17 on sufficiency for equilibrium existence.
uF (x, Γ ) ≺ uf Δ ⇒ uΓ ≺ uf Δ
F (x, F (x, Γ )) = F (x, Γ )
F (x, oΓ ) = oΓ ⇒ F (xo, Γ ) = Γ
o o
Γ u v
Γ Δ
Below, two examples of relations that are (included in) subcontinuous E-prefix
strict weak orders. Other examples involving limit sets are detailed in [4].
254 S. Le Roux
For instance 0 · 1ω <lex 1 · 0ω and (0 · 3)ω <lex 1ω <lex (3 · 0)ω , where < is the
usual order over the naturals. The Pareto extension (smaller than lexicographic)
also allows comparing infinite vectors. A vector is greater than another one if it
is not smaller for all components and if it is greater for some component.
Theorem 20. (By theorem 17) A dalograph over elements of a strict weak order
has a global equilibrium with respect to the lexicographic/Pareto extension.
The following defines routing problems and states a condition for every routing
problem to have a routing equilibrium. The condition is decidable for routing
problems with decidable policy, which ought to be the case in the real world.
This approach is different from [2] but may complement it nicely.
Lemma 22. If a routing policy is (included in) a E-prefix strict weak order ≺r
such that v ≺r uv for all v and u, every routing problem has an equilibrium.
u ≺r v α ∈ Lω u ∈ L∗
udlω ≺ vdlω α ≺ udlω
Like ≺r , ≺ is E-prefix. By v ≺r uv assumption, ≺ is subcontinuous. By theo-
rem 17, the dalograph has an equilibrium, which yields a routing equilibrium.
Graphs and Path Equilibria 255
In the next definition and lemma, relations have arity r and X is a vector
(X1 , . . . , Xr ) of dimension r. Below, a class of closures (on relations) is defined
together with a union operation. A preservation property follows.
Lemma 27. Let ≺ be a preference, and let α and β be such that α ≺st β. There
exists a dalograph g with the following properties.
– The dalograph g has the following shape (dashed lines represent and delimit
the rest of the dalograph).
β
α
The following lemma states that under some conditions (similar to the conclu-
sions of lemma 27), superrelation preserves equilibrium existence.
In this case, if all dalographs have ≺-equilibria, then they have ≺ -equilibria.
α≺β α ≺c β uβ ≺c γ W α ≺c W β
α ≺c β uα ≺c γ α ≺c β
Theorem 30. If all dalographs have ≺-equilibria, then they have ≺c -equilibria.
The relation that is defined below does not guarantee equilibrium existence.
Definition 31. Let (E, ≺) be a strict weak order. A total order on the -equi-
Δ
valence classes is defined as follows: A ≺ B = ∃x ∈ A , ∃y ∈ B , x ≺ y.
The max (resp. min) of a finite subset A of E is the maximal (resp. minimal)
-class intersecting A. The max-min order is defined on finite subsets of E.
Δ
A ≺Mm B = max(A) ≺ max(B) ∨ (max(A) = max(B) ∧ min(A) ≺ min(B))
For instance {1, 2, 3} <Mm {0, 4} and {0, 2, 3} <Mm {1, 3}. The max-min set
order is defined below and proved not to guarantee equilibrium existence.
Definition 32 (Max-min set order). Let (E, ≺) be a strict weak order. For
α an infinite sequence over E, let Sα be the set of all elements occurring in α.
Δ
α ≺Mms β = Sα ≺Mm Sβ
Proof. 2(02)ω <Mms 21ω and 1ω <Mms (02)ω . Therefore any E-prefix and tran-
sitive relation including <Mms is not irreflexive. Conclude by theorem 30.
Graphs and Path Equilibria 257
Theorem 34
The preference ≺ is included in some ≺ .
The preference ≺ is a E-prefix and subcontinuous strict weak order.
Corollary 35. Let a preference be a strict total order. All dalographs have equi-
libria iff the preference is E-prefix and subcontinuous.
u 1 y 1 β2 ≺ v1 x1 α1 u 2 y 2 β1 ≺ v2 x2 α2
v1 x2 α2 ≺ u1 α1 v2 x1 α1 ≺ u2 α2
v1 x1 y1 β2 ≺ u1 α1 v2 x2 y2 β1 ≺ u2 α2
v1 x2 y2 β2 ≺ u1 α1 v2 x1 y1 β1 ≺ u2 α2
The preference ≺ complies with the necessary condition but the dalograph
below has no ≺-equilibrium. Indeed, the node o1 ”wants” to follow a path leading
to α1 or β1 , while the node o2 ”wants” to follow a path leading to α2 or β2 .
o1 v1 v2 o2
u1 x1 x2 u2
y1 y2
α1 α2
β1 β2
In the total order case, the condition for equilibrium in dalographs yields a
necessary and sufficient condition for routing equilibrium existence in routing
problems. Necessity invokes constructive arguments that are similar to the ones
used for the necessary condition in dalographs. However, the proof is simple
enough so that just doing it is simpler than invoking a big theorem.
Theorem 36. Let ≺r be a total order routing policy. Every routing problem has
an equilibrium iff ≺r is E-prefix and uv ≺r v for all v and non-empty u.
258 S. Le Roux
References
1. Fishburn, P.: Intransitive indifference in preference theory: A survey. Operations
Research 18, 207–228 (1970)
2. Griffin, T., Sobrinho, J.: Metarouting. In: SIGCOMM 2005: Proceedings of the 2005
conference on Applications, technologies, architectures, and protocols for computer
communications, pp. 1–12. ACM Press, New York (2005)
3. Lawler, E.: Combinatorial Optimization: Networks and Matroids. Dover (2001)
4. Le Roux, S.: Graphs and path equilibria. Research report, INRIA (2007),
http://hal.inria.fr/inria-00195379/fr/
No l Grid-Points in Spaces of Small Dimension
Hanno Lefmann
1 Introduction
The No-Three-in-Line problem, which has been raised originally by Dudeney
[7], asks for the maximum number of grid-points, which can be chosen from the
T × T -grid in Z2 , i.e., from the set {0, . . . , T − 1} × {0, . . . , T − 1}, such that no
three distinct points are on a line, see [5,16]. It has been proved by Erdös [10]
that this maximum number is Θ(T ). The lower bound follows by considering
for primes T the grid-points (x, x2 mod T ), x = 0, . . . , T − 1. For the upper
bound observe that each horizontal line may contain at most two grid-points.
For constructons of (near-)optimal solutions for small values of T see [11,12].
Cohen, Eades, Lin and Ruskey [6] investigated embeddings of graphs into Z3
such that distinct edges (represented by segments) do not cross each other in a
point distinct from the endpoints. One is interested in compact representations
of graphs, in particular, in the minimum volume of an axis-aligned bounding box
in Z3 , which contains the drawing. The endpoints of crossing edges in a drawing
of a graph are coplanar. In connection with this, it has been proved in [6] that
there is a set of Ω(T ) grid-points in the T × T × T -grid, which does not contain
four distinct coplanar grid-points, and up to a constant factor this lower bound
is best possible. Thus, the minimum volume of an axis-aligned bounding box for
a crossing-free drawing of the complete graph Kn on n vertices in Z3 is Θ(n3 ),
see [6] and compare [17].
Pór and Wood [18] considered embeddings of graphs in Z3 , where the line
segments, which represent the edges, do not cross any vertex distinct from its
endpoints. Then n grid-points in Z3 yield a crossing-free drawing of Kn , if no
three of the n grid-points are on a line. Pór and Wood proved in [18] that there
are Ω(T 2 ) grid-points in the T × T × T -grid with no three collinear points, by
considering the set of all triples (x, y, (x2 + y 2 ) mod T ), x, y ∈ {0, . . . , T − 1},
for T a prime with T ≡ 3 mod 4. This gives the upper bound O(n3/2 ) on the
minimum volume of a bounding box of a drawing of Kn in Z3 .
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 259–270, 2008.
c Springer-Verlag Berlin Heidelberg 2008
260 H. Lefmann
For higher dimensions, Pór and Wood [18] raised the question of determin-
ing vol (n, d, k), which is defined as the minimum volume of an axis-aligned
bounding box for embeddings of n points in Zd , such that no (k + 2) points are
contained in a k-dimensional affine space. By a partition of such a bounding
box into vol (n, d, k)(d−k)/d many affine k-dimensional subspaces they obtained
vol (n, d, k) ≥ (n/(k + 1))d/(d−k) . Known from [6] is that vol (n, 3, 2) = Θ(n3 ),
and in general vol (n, d, d − 1) = Θ(nd ).
A closely related problem – finding in the d-dimensional T × · · · × T -grid
large sets of grid-points with distinct slopes (or distances) – has been considered
in [9,15] and has applications to the problem of measuring distances by using
radar or sonar signals, see [14], compare also [20] for avoiding collinear triples in
connection with perturbation techniques.
Motivated by the question of Pór and Wood, we consider here for fixed in-
tegers d, k, l ≥ 1 lower and upper bounds on the function fd (l, k, T ), which is
defined as the maximum number of grid-points in the d-dimensional T × · · · × T -
grid, such that no l distinct grid-points are contained in a k-dimensional affine
subspace. A lower bound of fd (k + 2, k, T ) = Ω(T β ) yields immediately the
upper bound vol (n, d, k) = O(nd/β ) on the minimum volume of a bounding
box. In the following the focus is on the investigation of the growth of the
function fd (l, k, T ) rather than on vol (n, d, l). In Section 2 we investigate con-
structive lower bounds for fd (l, T ) := fd (l, 1, T ), i.e., no l distinct points are
on a line. We obtain fd (l, T ) = Θ(l · T d−1 ) for l ≥ d + 1. For l ≤ d we prove
fd (l, T ) = Ω(T d(l−2)/(l−1) · poly(log T )). We also give a simple but useful con-
struction for obtaining lower bounds on fD (l, T ) from lower bounds on fd (l, T ),
d < D. In Section 3 we give new upper bounds on fd (k + 2, k, T ) for integers
k ≥ 1, in particular fd (k + 2, k, T ) = O(T 2d/(k+2) ) for k even. We also consider
distributions of grid-points, where no l points are contained in a k-dimensional
linear subspace and disprove a suggested order of the corresponding function
fdlin (l, k, T ), see [4,5]. Moreover, in connection with a question of Füredi [13]
we show for any finite set S ⊂ R2 , which does not contain l collinear points, a
lower bound on the largest size of a subset S ⊆ S, where S does not contain
k collinear points, 3 ≤ k < l. All of our arguments for proving lower bounds
are of a probabilistic nature, however, they easily can be made constructive in
polynomial time by using derandomization arguments. In Section 4 we finish
with some concluding remarks.
2 No l Collinear Points
For integers d, l, T with d ≥ 2 and 3 ≤ l ≤ T let fd (l, T ) denote the largest size
of a subset S of grid-points in the d-dimensional T × · · · × T -grid, such that no l
distinct points of S are collinear. By monotonicity we have fd (l+1, T ) ≥ fd (l, T ).
Well-known is the following upper bound on fd (l, T ):
Proposition 1. For integers d, l, T with d ≥ 2 and 3 ≤ l ≤ T it is
fd (l, T ) ≤ (l − 1) · T d−1. (1)
No l Grid-Points in Spaces of Small Dimension 261
fd (l, T ) ≥
⎩ l−2
c · T d l−1 if l ≤ d.
An independent set I ⊆ V with |I| ≥ ((l − 1)/l) · (N/t) can be found in time
O(N + |El |).
Proof. We only have to consider the case l = d+1. Form an l-uniform hypergraph
G = (V, El ) with vertex-set V , which consists of all T d grid-points in the d-
dimensional T ×· · ·×T -grid. For distinct grid-points P1 , . . . , Pl let {P1 , . . . , Pl } ∈
El be an edge iff P1 , . . . , Pl are collinear. We want to find a large independent set
I ⊆ V in G, as I yields a subset of grid-points, where no l distinct grid-points
are on a line.
We give an upper bound on the size |El | of the edge-set. Let P1 , . . . , Pl be
distinct, collinear grid-points in the T × · · · × T -grid, where w.o.l.g. P2 , . . . , Pl−1
are contained in the segment P1 Pl . There are T d choices for the grid-point P1 =
(p1,1 , . . . , p1,d ). Any d-tuple (s1 , . . . , sd ) ∈ {−T + 1, −T + 2, . . . , T − 1}d fixes at
most one grid-point Pl = (p1,1 + s1 , . . . , p1,d + sd ) in the T × · · · × T -grid. By
symmetry, which we take into account by a factor of 2d , we may assume that
s1 , . . . , sd ≥ 0. Given the grid-points P1 and Pl with Pl − P1 = (s1 , . . . , sd ) =
(0, . . . , 0), on the segment P1 Pl there are less than gcd(sl−2 1 ,...,sd )
choices for the
N
grid-points P2 , . . . , Pl−1 . With the inequality k ≤ ((e · N )/k)k we obtain
T −1
T −1
gcd(s1 , . . . , sd )
|El | ≤ 2d · T d · ···
s1 =0 sd =0
l−2
T −1
T −1 l−2
e · gcd(s1 , . . . , sd )
≤ 2d · T d · ··· . (3)
s1 =0 sd =0
l−2
T
The sum g=1 g l−d−2 is O(T l−d−1 /l) for l ≥ d + 2, and O(log T ) for l = d + 1,
and O(1) for l ≤ d. Thus, by (4) for fixed d ≥ 2 for a constant c > 0 we infer
⎧ l+d−1
⎨ c · 9l−1 · T ll−1 if l ≥ d + 2
|El | ≤
⎩
c · T 2d if l ≤ d.
Hence, the average-degree tl−1 = l · |El |/T d of G fulfills for a constant c > 0:
⎧
⎨c · l ≥ d+2
T
l if
t≤
⎩ d
c · T l−1 if l ≤ d.
No l Grid-Points in Spaces of Small Dimension 263
|I| ≥
⎩ 1 d l−2
2·c · T if l ≤ d.
l−1
The grid-points, which correspond to the vertices of the independent set I satisfy,
that no l distinct points are collinear.
To improve the results from Theorem 1 for fixed l ≤ d by a logarithmic factor,
we use the following result of Ajtai, Komlos, Pintz, Spencer and Szemeredi [1]
in a version arising from work in [3] and [8].
Theorem 3. Let l ≥ 3 be a fixed integer. Let G = (V, El ) be an l-uniform, linear
hypergraph on |V | = N vertices with average-degree tl−1 = l · |El |/N .
Then the independence number α(G) of G satisfies for a constant Cl > 0:
N 1
α(G) ≥ Cl · · (log t) l−1 . (5)
t
An independent set I ⊆ V with |I| = Ω((N/t) · (log t)1/(l−1) ) can be found in
polynomial time.
Theorem 4. Let d, l ≥ 2 be fixed integers with l ≤ d. Then there exists a
constant c > 0 such that for all integers T ≥ 1:
l−2 1
fd (l, T ) ≥ c · T d l−1 · (log T ) l−1 . (6)
Proof. We form a non-uniform hypergraph G = (V, El ∪ El+1 ). The vertex-set
consists of all T d grid-point from the d-dimensional T × · · · × T -grid and for m =
l, l + 1 and distinct grid-points P1 , . . . , Pm it is {P1 , . . . , Pm } ∈ Em iff P1 , . . . , Pm
are collinear. By the proof of Theorem 1 (see remarks following inequality (4))
for l ≤ d we have for constants c1 , c2 > 0 that
|El | ≤ c1 · T 2d and |El+1 | ≤ c2 · T 2d · log T. (7)
2 ε d/(l−1)
For ε := d/l we select with probability p := T /T uniformly at random
and independently of each other grid-points from the d-dimensional T × · · · × T -
grid. Let V ∗ be the random set of chosen grid-points, let Em∗
:= Em ∩ [V ∗ ]m , and
∗ ∗
let E(|V |), E(|Em |), m = l, l + 1, be their expected sizes. We infer with (7):
E(|V ∗ |) = p · T d = T ε+d(l−2)/(l−1)
E(|El∗ |) = pl · |El | ≤ pl · c1 · T 2d ≤ c1 · T εl+d(l−2)/(l−1)
∗
E(|El+1 |) = pl+1 · |El+1 | ≤ pl+1 · c2 · T 2d · log T ≤ c2 · T ε(l+1)+d(l−3)/(l−1) · log T.
By Markov’s and Chernoff’s inequalities (this argument can be easily deran-
domized in time polynomial in T by using the method of conditional probabili-
ties) there exists a subset V ∗ ⊆ V of grid-points such that
|V ∗ | = (1 − o(1)) · T ε+d(l−2)/(l−1) (8)
|El∗ | ≤ 3 · c1 · T εl+d(l−2)/(l−1)
(9)
∗
|El+1 | ≤ 3 · c2 · T ε(l+1)+d(l−3)/(l−1)
· log T. (10)
264 H. Lefmann
l · |El∗∗ |
tl−1 = ≤ 6 · c1 · l · T ε(l−1) := tl−1
0 . (13)
|V ∗∗ |
Since G ∗∗ is linear, we can apply Thereom 3 and we infer with (12) and (13) for
the independence number α(G) for constants Cl , Cl > 0:
|V ∗∗ | |V ∗∗ |
α(G) ≥ α(G ∗∗ ) ≥ Cl · · (log t)1/(l−1) ≥ Cl · · (log t0 )1/(l−1) ≥
t t0
(1/2) · T ε+d(l−2)/(l−1) 1/(l−1)
≥ Cl · · log (6 · c1 · l)1/(l−1) · T ε
(6 · c1 · l)1/(l−1) · T ε
≥ Cl · T d(l−2)/(l−1) · (log T )1/(l−1) ,
Some of the few known lower bounds on fd (l, T ) have been shown for small
dimension d ≥ 2. Having a good construction for small d might also give a good
construction for higher dimensions as the following observation shows.
By Lemma 1 we infer by induction that fgd (l, T ) ≥ (fd (l, T ))g for integers g ≥ 1.
We can improve on the upper bound (14) for certain pairs (l, k) as follows.
Lemma 2. Let d, k ≥ 1 with k ≤ d−1 be fixed integers. Then, for some constant
c > 0 it is:
d
fd (k + 2, k, T ) ≤ c · T (k+1)/2 (16)
266 H. Lefmann
For even k ≥ 2, the upper bound (16) on fd (k + 2, k, T ) is smaller than (14) for
k < d − 2, and the exponents of T are equal for k = d − 2 in both bounds, and
(14) is smaller than (16) only for k = d − 1. For odd k ≥ 1, (16) is smaller than
(14) for (d − 1)/2 − (d − 1)2 /4 − d ≤ k ≤ (d − 1)/2 + (d − 1)2 /4 − d.
Proof. Let k ≥ 2 be even and set g := k/2. Let S be a subset of the d-dimensional
T × · · · × T -grid, where no (k + 2) distinct points in S are contained in a k-
dimensional affine subspace, w.l.o.g. |S| ≥ k + 2. Consider the set Sg+1 of all
(g + 1)-term sums of distinct elements from S with addition component-wise:
Concerning lower bounds, Brass and Knauer proved in [4] for fixed integers
d, k, l ≥ 2 by a random selection of grid-points from the T × · · · × T -grid that
Then (18) guarantees only fd (l, k, T ) = Ω(T ) for l − 1 ≥ d(k + 1)/(d − k − 1) for
k ≤ d − 2. One can improve (18) a little by using a (slightly) different argument:
No l Grid-Points in Spaces of Small Dimension 267
Lemma 3. For fixed integers d, k, l ≥ 1 with k ≤ d−1 and l ≥ k+2 and integers
T ≥ 1 it is:
l · |El | l · c · T kl+d(k+1)
tl−1 = ≤ ≤ c · T k(d+l) . (20)
|V | Td
By Theorem 2 and (20) we can find in time polynomial in T an independent set
I ⊆ V in G, such that for a constant c > 0 it is
l−1 Td
|I| ≥ · 1/(l−1) ≥ c ·T d−k−(k(d+1)/(l−1)) .
l c · T k(d+l)/(l−1)
Some more appropiate representations of low-dimensional subspaces would pos-
sibly give a better counting of the bad objects than that in the proof of Lemma 3,
if one wants to apply a random selection process as given above.
Next we consider linear subspaces. Let fdlin (l, k, T ) denote the maximum num-
ber of grid-points in the d-dimensional T ×· · ·×T -grid, such that no l grid-points
are contained in a k-dimensional linear subspace. From number theory it is
known [5] that for fixed d ≥ 2 it is fdlin (2, 1, T ) = Θ(T d ). Bárány, Harcos, Pach
and Tardos proved in [2] that fdlin (d, d − 1, T ) = Θ(T d/(d−1) ) for fixed d ≥ 2.
Based on this, Brass and Krauer [4] conjectured (stated as a problem in [5]) that
(d−k)d
fdlin (k + 1, k, T ) = Θ(T d−1 ). (?) (21)
d
fdlin (k + 1, k, T ) ≤ c · T k/2 . (22)
268 H. Lefmann
For odd k the upper bound (22) is asymptotically smaller than the conjectured
growth of fdlin (k + 1, k, T ) in (21) for 1 < k < d − 2 with equality for k =
d − 2. Similarly, for even k the upper bound (22) is smaller than in (21) for
d/2 − d2 /4 − 2d + 2 < k < d/2 + d2 /4 − 2d + 2. Hence, (21) does not hold
for several values of k, d.
Proof. The proof is similar to that of Lemma 2, therefore we only sketch it.
Let k ≥ 1 be an odd integer and set g := (k + 1)/2. Let S be a subset of the
d-dimensional T × · · · × T -grid, where no (k + 1) distinct points from S are
contained in a k-dimensional linear subspace, w.l.o.g. |S| ≥ k + 1. Let
Next we give upper bounds on the numbers s2,j (G) of (2, j)-cycles in G, j =
2, . . . , k − 1. For a (2, j)-cycle {E, E } in G all points in E ∪ E are collinear.
No l Grid-Points in Spaces of Small Dimension 269
Thus we have s2,j (G) = 0 for j ≤ 2 ·k − l, as the set S does not contain l collinear
points. For j > 2 · k − l we obtain as in (24) for some constant c > 0:
N l−1
s2,j (G) ≤ · ≤ c · N 2 . (25)
2 2·k−j
For ε := 1/k 2 , we select uniformly at random and independently of each other
points from S with probability p := N ε /N 1/(k−1) . Let S ∗ ⊆ S be the random
set of chosen points and let G ∗ = (S ∗ , Ek∗ ) with Ek∗ := Ek ∩ [S ∗ ]k be the induced
subhypergraph of G on S ∗ . The expected numbers satisfy E[|S ∗ |] = p · |S| =
p · N , and E[|Ek∗ |] = pk · |Ek | and E[s2,j (G ∗ )] = p2k−j · s2,j (G), j = 2, . . . , k − 1.
By Markov’s and Chernoff’s inequality and with (24) and (25) there exists an
induced subhypergraph G ∗ = (S ∗ , Ek∗ ) of G such that
k−2
|S ∗ | ≥ p · N/2 = N k−1 +ε /2 (26)
k−2
|Ek∗ | ≤ 3 · pk · |Ek | ≤ 3 · c · N k−1 +εk (27)
j−2
∗
s2,j (G ) ≤ 3 · p 2k−j
· s2,j (G) ≤ 3 · c · N k−1 +ε(2k−j) . (28)
j−2 k−2
By (26) and (28) it is N k−1 +ε(2k−j) = o(N k−1 +ε ), j = 2, . . . , k − 1, for
ε ≤ 1/(2 · k 2 ), thus
s2,j (G ∗ ) = o(|S ∗ |). (29)
Discard one vertex from each (2, j)-cycle in G ∗ , j = 2, . . . , k − 1. By (29) we
obtain a subset S ∗∗ ⊆ S ∗ with |S ∗∗ | = (1 − o(1)) · |S ∗ | ≥ |S ∗ |/2. The induced
subhypergraph G ∗∗ = (S ∗∗ , Ek∗∗ ) of G ∗ on S ∗∗ with Ek∗∗ := Ek∗ ∩ [S ∗∗ ]k is linear.
With |Ek∗∗ | ≤ |Ek∗ | and (27) we infer for the average-degree (t∗∗ )k−1 of G ∗∗ :
k−2
∗∗ k−1 k · |Ek∗∗ | N k−1 +εk
(t ) := ≤ 6 · k · c · = 6 · k · c · N ε(k−1) =: (t∗∗
0 )
k−1
.(30)
|V ∗∗ | k−2
N k−1 +ε
By Theorem 3 with (30) one can find in time polynomial in N an independent
set I ⊆ S ∗∗ , such that, as ε > 0 is fixed, for constants Ck , Ck > 0 we have
|S ∗∗ | |S ∗∗ |
· (log t∗∗ ) k−1 ≥ Ck · ∗∗ · (log t∗∗
1 1
|I| ≥ Ck · ∗∗ 0 )
k−1 ≥
t t0
k−2
(1/2) · N k−1 +ε 1
1
k−1
≥ Ck 1 · log (6 · k · c) k−1 · N ε
(6 · k · c) k−1 · N ε
k−2
≥ Ck · N k−1 · (log N ) k−1 .
1
4 Concluding Remarks
We have considered extensions of the no-three-in-line-problem, motivated by
questions on the embeddings of graphs in Zd . Very desirable would be construc-
tive lower, and upper bounds on the function fd (l, k, T ), as already for the case
270 H. Lefmann
k = 2 and arbitrary fixed d the known lower bounds are quite weak. Towards
this, a better counting of the incidences of given sets of grid-points and affine or
linear subspaces seems to be necessary.
References
1. Ajtai, M., Komlós, J., Pintz, J., Spencer, J., Szemerédi, E.: Extremal Uncrowded
Hypergraphs. J. Comb. Theory Ser. A 32, 321–335 (1982)
2. Bárány, I., Harcos, G., Pach, J., Tardos, G.: Covering Lattice Points by Subspaces.
Per. Math. Hung. 43, 93–103 (2001)
3. Bertram–Kretzberg, C., Lefmann, H.: The Algorithmic Aspects of Uncrowded Hy-
pergraphs. SIAM J. on Comput. 29, 201–230 (1999)
4. Brass, P., Knauer, C.: On Counting Point-Hyperplane Incidences. Comp. Geo. 25,
13–20 (2003)
5. Brass, P., Moser, W., Pach, J.: Research Problems in Discrete Geometry, pp. 417–
421. Springer, Heidelberg (2005)
6. Cohen, R.-F., Eades, P., Lin, T., Ruskey, F.: Three-Dimensional Graph Drawing.
Algorithmica 17, 199–208 (1996)
7. Dudeney, H.E.: Amusements in Mathematics, Nelson, London, pp. 94–222 (1917)
8. Duke, R.A., Lefmann, H., Rödl, V.: On Uncrowded Hypergraphs. Rand. Struct. &
Algorithms 6, 209–212 (1995)
9. Erdős, P., Graham, R.L., Rusza, I.,, H.: Bounds for Arrays of Dots with Distinct
Slopes or Lengths. Combinatorica 12, 39–44 (1992)
10. Erdös, P., Roth, K.-F.: On a Problem of Heilbronn. J. London Math. Soc. 26,
198–204 (1951)
11. Flammenkamp, A.: Progress in the No-three-in-a-Line-Problem. J. Comb. Theory,
Ser. A 60, 305–311 (1992)
12. Flammenkamp, A.: Progress in the No-three-in-a-Line-Problem. II. J. Comb. The-
ory, Ser. A 81, 108–113 (1998)
13. Füredi, Z.: Maximal Independent Subsets in Steiner Systems and in Planar Sets.
SIAM J. Disc. Math. 4, 196–199 (1991)
14. Golomb, S.W.: Construction of Signals with Favourable Correlation Properties.
Surveys in Combinatorics, London Mathematical Society LNS 166, 1–39 (1991)
15. Golomb, S.W., Taylor, H.: Two-dimensional Synchronization Patterns for Mini-
mum Ambiguity. IEEE Transactions Information Theory IT-28, 600–604 (1982)
16. Guy, R.: Unsolved Problems in Number Theory, 2nd edn. Springer, Heidelberg
(1994)
17. Pach, J., Thiele, T., Tóth, G.: Three Dimensional Grid Drawings of Graphs. In:
Chazelle, B., Goodman, J.E., Pollack, R. (eds.) Advances in Discrete and Compu-
tational Geometry. Contemporary Math. 223, pp. 251–255. AMS (1999)
18. Pór, A., Wood, D.W.: No-Three-in-Line-in-3D. Algorithmica 47, 481–488 (2007)
19. Spencer, J.: Turán’s Theorem for k-Graphs. Disc. Math. 2, 183–186 (1972)
20. Thiele, T.: Geometric Selection Problems and Hypergraphs, PhD thesis, FU Berlin
(1995)
The Secret Santa Problem
1 Introduction
The problem we deal with is well described by the following Wikipedia [14] entry:
We assume that additional constraints may exist in the definition of the problem.
For instance, it may be required that self-gifts and gifts between certain pairs of
participants should be avoided. These constraints are enforced on a graph model:
participants are represented by vertices and the possibility of a participant giving
a gift to another participant is represented by an arc between the corresponding
vertices.
Previous academic work on the Secret Santa problem is scarce. A secure pro-
tocol for the distributed solution of the Secret Santa problem is proposed in [11],
with the corresponding implementation being described in [12]. Some published
works in social sciences exist [3]. A scholarly discussion ensued in 1999-2001 in
the Mathematical Gazette [7,9,1] focussing on the probability of picking a gift
assignment without mutual gifts. This is extended in [8] to deal with more con-
straints on pairs of people that cannot exchange gifts, and in [13] to include at
least a cyclic assignment of given length.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 271–279, 2008.
c Springer-Verlag Berlin Heidelberg 2008
272 L. Liberti and F. Raimondi
Let xij ≥ 0 be real non-negative continuous variables for all (i, j) ∈ A, and
consider the equations:
∀i ∈ V xij = 1 (1)
j∈δ + (i)
∀i ∈ V xji = 1. (2)
j∈δ − (i)
Proposition 2.2. If the graph G = (V, A) contains a vertex v such that |δ − (v)|
= 1 or |δ + (v)| = 1 then G is not SESAN.
Proof. Let δ − (v) = {(u)} (the proof for δ + (v) is the same). All VDCCs S will
necessarily contain (u, v), thereby contradicting Defn. 2.1.
The converse to Prop. 2.2 is of course false: the complete digraph over three
vertices is an example of a graph where |δ − (i)| = |δ + (i)| = 2 for each i ∈ {1, 2, 3},
but since there are only two possible VDCCs, G is not SESAN.
Proof. This follows trivially from Eq. (3), as apart from S there is at most one
VDCC for each pair of distinct arcs in S (the fact that |S| = |V | follows trivially
from (1)-(2)).
Consider the directed graph obtained from K4 (in Fig. 1, left) by replacing edge
edge with two antiparallel arcs. The second graph on from the left of Fig 1 is
a possible witness; a verification family is displayed on the right, therefore the
graph is SESAN.
i j
Lemma 3.1. For any α ⊆ A and distinct (i, j), (k, l) ∈ A, if Pijkl
α
is infeasible
then no acceptable solution in S contains the arc (i, j).
α
α
Proof. Since Pijkl is infeasible, ∀T ∈ C α ((i, j) ∈ T → (k, l) ∈ T ), hence ∀T ∈
C ((i, j) ∈ T → T ∈ S α ). This implies that ∀S ∈ S α ((i, j) ∈ S).
α
Proof. An n2 term arises because of the internal loop on the distinct arcs in S
(Line 10), as |S| = |V |. An m term arises because of the external loop (Line 2),
and because |α| increases at each outer iteration (Line 13) unless the algorithm
1
α
terminates. The remaining n 2 m term refers to the solution of each Pijkl problem
in Line 11.
4 Computational Results
We tested Alg. 1 on a class of randomly generated graph instances. As the main
target application of the SESANP is in communication protocols, communication
The Secret Santa Problem 277
20
|V|=10
|V|=20
|V|=30
|V|=40
|V|=50
15
number of SESAN graphs over 20
10
0
0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
edge generation probability
20
|V|=10
|V|=15
|V|=20
|V|=25
|V|=30
|V|=35
|V|=40
15
number of SESAN graphs over 20
10
0
0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24
edge generation probability
5 Conclusion
References
9. Pinkham, R.: The Secret Santa problem revisited. Mathematical Gazette 85(502),
96–97 (2001)
10. Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Springer,
Berlin (2003)
11. Tel, G.: Cryptografie, Beveiliging van de digitale maatschappij. Addison-Wesley,
Reading (2002)
12. Verelst, J.: Secure computing and distributed solutions to the Secret Santa problem.
Master’s thesis, Computer Science Dept., University of Utrecht (2003)
13. White, M.: The Secret Santa problem. Rose-Hulman Institute of Technology Un-
dergraduate Math Journal 7(1) (paper 5) (2006)
14. Secret Santa. Wikipedia (2006), http://en.wikipedia.org/wiki/Secret Santa
Finding Optimal Refueling Policies in
Transportation Networks
Shieu-Hong Lin
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 280–291, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Finding Optimal Refueling Policies in Transportation Networks 281
where ls and lt are the initial fuel level and the required minimal final fuel level
at vertices s and t respectively, fi is the amount of fuel to purchase at vertex
vi , F Eπ (vi ) denotes the fuel level when entering the ith vertex vi on the path,
and F Lπ (vi ) denotes the fuel level when leaving vi or when finally ending at vm
when i = m.
policy. This is true even if in degenerate cases there may be multiple ways of
interpreting π into LU transition sequences.
– a path p is an optimal transition path for an [L, U ] transition (vi , L), (vi , U )
if and only if p is the self loop vi , vi ,
– a path p is an optimal transition path for an [L, L] transition (vi , L), (vj , L)
where vi = vj if and only if p is a shortest path from vi to vj in G = (V, A),
– a path p is an optimal transition path for an [U, U ] transition (vi , U ), (vj , U )
where vi = vj if and only if p is a shortest path from vi to vj in G = (V, A),
and
– a path p is an optimal transition path for an [U, L] transition (vi , U ), (vj , L)
where vi = vj if and only if p = vi , . . . , vk , . . . vj where vi = vk = vj , the
subpath vi , . . . , vk in p is a shortest path from vi to vk in G = (V, A), the
subpath vk , . . . , vj in p is a shortest path from vk to vj in G = (V, A), and
vk = arg minv (X̂(vi , v) + X̂(v, vj ) − (U − L)) ∗ P (v) over every vertex v in V
where X̂(vi , v) ≤ (U − L)), X̂(v, vj ) ≤ (U − L)), and X̂(vi , v) + X̂(v, vj ) >
(U − L). We refer to vertex vk above as the medium vertex of the optimal
transition path for the [U, L] transition.
Proof Sketch. The optimal transition costs above follow from Theorem 2, the
definition of optimal LU transition paths in Definition 10, and the definition of
LU transitions in Definition 8.
Theorem 3. (Reduction of finding optimal [L, L] refueling policies into
finding optimal LU transition sequences). Finding an optimal [L, L] (k-
stop-bounded) refueling policy from vertex s to vertex t is equivalent to finding
a minimum-cost LU transition sequence (of no more than k transitions) from
the LU state (s, L) to the LU state (t, L), in which the LU transition costs have
the optimal-transition-cost structure depicted in Corollary 1.
Proof Sketch. It follows from Lemma 3 and Corollary 2.
Lemma 4. (Compact representation of optimal [L, L] refueling policies).
Given the information of all-pairs shortest paths in the network, for each pair of
vertices s and t we can compactly represent an optimal [L, L] (k-stop-bounded)
L,L
refueling policy π = πs→t = (v0 , f0 ), . . . , (vm , fm ) as the refueling stop se-
quence Stops(π) = vi0 , vi1 , . . . , viρ(π) , viρ(π)+1 together with fi0 , fi1 , . . . , fiρ(π) ,
the sequence of refueling amounts at vik ’s for 0 ≤ k ≤ ρ(π).
Proof Sketch. Since no refueling occurs between two refueling stops, it is re-
dundant to record the refueling information of fi = 0 for every vertex vi that is
not a refueling stop. And because every optimal [L, L] (k-stop-bounded) refuel-
ing policy satisfies the shortest subpath property, it is redundant to record the
vertices between two adjacent refueling stops since we can use any shortest path
between them and still maintain the optimality of the policy.
Theorem 4. (Determining an [L, L] refueling policy from an LU tran-
sition sequence). Given an LU transition sequence LU of length m of an
optimal [L, L] (k-stop-bounded) refueling policy, Algorithm 1 below can deter-
mine in O(m) time the compact representation of an [L, L] refueling policy π
that satisfies the optimal LU transition property and has an LU transition se-
quence LU π = LU . If two different [L, L] refueling policies both satisfy the
288 S.-H. Lin
– the vertex set VILU = {(v, L)|v ∈ V } ∪ {(v, U )|v ∈ V } is the set of all LU
states,
– the set of directed edges ALU I = {(v, L), (v, U )|v ∈ V } ∪
{(v, L), (v , L)|v, v ∈ V, X̂(v, v ) ≤ U − L} ∪
{(v, U ), (v , U )|v, v ∈ V, X̂(v, v ) ≤ U − L} ∪
{(v, U ), (v , L)|v, v ∈ V, X̂(v, v ) > U − L,
∃v ∈ V, X̂(v, v ) ≤ U − L, X̂(v , v ) ≤ U − L}
is the set of all possible LU transitions between LU states, and
– the distance metric function XILU encodes information of the optimal LU
transition costs described in Corollary 1:
(i) XILU (y, y) = 0 for y ∈ VILU ,
(ii) XILU (y, z) = ∞ for (y, z) ∈ / ALU I when y = z,
(iii) XI ((v, L), (v, U )) = (U − L) ∗ P (v) for
LU
Definition 10, which takes O(n3 ) time time all together for the n2 pairs of [U, L]
transitions. The optimal transition costs as the metric XILU can be determined
in O(n3 ) time similarly as described in Corollary 1.
Theorem 5. (Reduction to the all-pairs shortest path problem). Given
L,L
a vehicle-network instance I = L, U, V, A, X, P , π = πs→t is an optimal [L, L]
(k-stop-bounded) refueling policy from s to t if and only if an LU transition
sequence LU π of π is a shortest path from (s, L) to (t, L) (of length k or less) in
the optimal LU transition graph GLU I . Finding all-pairs [L, L] (k-stop-bounded)
optimal refueling policies for a vehicle-network instance I = L, U, V, A, X, P is
equivalent to finding all-pairs shortest paths (of length up to k) in the optimal
LU transition graph GLU I .
References
1. Atamtürk, A., Küçükyavuz, S.: Lot sizing with inventory bounds and fixed costs:
polyhedral study and computation. Operations Research 53, 711–730 (2005)
2. Corman, T.H., Leiserson, C.E.: Introduction to Algorithms, 2nd edn. MIT Press,
Cambridge (2001)
3. Khuller, S., Malekian, A., Mestre, J.: To fill or not to fill: the gas station problem.
In: Proceedings of European Symposia on Algorithms (2007)
4. Lin, S.-H., Gertsch, N., Russell, J.: A linear-time algorithm for finding optimal
refueling policies. Operations Research Letters 35(3), 290–296 (2007)
5. Love, S.F.: Bounded production and inventory models with piecewise concave costs.
Management Science 20, 313–318 (1973)
6. Suzuki, Y.: A generic model for motor-carrier fuel optimization. Working paper,
College of Business, Iowa State University
Scale Free Interval Graphs
1 Introduction
Since early works by Watts & Strogatz [8] and Barabási & Albert [2], small world
networks are the focus of recent interest because of their potential as models
for the interaction networks of complex systems in real world [1,7]. There are
three major properties that a small world network and/or a scale free network
has (see, e.g., [4]): (SF) the node connectivities follow a scale free power law
distribution, (CC) two neighbors of a node are also connected by an edge with
high probability, and (SW) any two nodes are connected by a short path through
a very few nodes called hubs.
Up to now, many models have been proposed and their properties have been
investigated. Aside from few deterministic models, most of the randomized mod-
els are based on some dynamic recursive construction of random graphs. Thus,
the analysis of certain properties of the obtained graphs becomes rather compli-
cated, and it is not so easy to see the combinatorial structure of the obtained
graphs. Typically, for example, in order to obtain a formula for the distribution
of degrees (for showing the property (SF) mentioned above), one has to ap-
proximate the process by some differential equations and solve them. Therefore,
although many random graph models have been proposed, we think that it is yet
important to introduce some random graph model that can be easier to analyze
by somewhat standard probabilistic/combinatorial methods. This is important
in particular for designing and analyzing algorithms for scale free networks.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 292–303, 2008.
c Springer-Verlag Berlin Heidelberg 2008
Scale Free Interval Graphs 293
In this paper, we propose a simple random model for generating scale free in-
terval graphs. Interval graphs have many applications from scheduling to bioin-
formatics. A graph G = (V, E) is an interval graph if and only if G has an
interval representation I such that each vertex v corresponds to an interval Iv
and two vertices u and v are adjacent in G if and only if corresponding intervals
Iu and Iv share a common interval on I. For defining a random interval graph
model, we introduce a way to randomly generate an interval representation I;
some standard random process is used for choosing intervals’ starting points, and
a power law distribution is used for determining intervals’ lengths. This model
has the following intuitive reasoning: Each interval is regarded as a period of
existence, i.e., life, of some object (or creature), and relationships are created
between these objects who have an overlap of lives. A power law distribution of
a lifespan is derived from the simple rule “longer intervals tend to survive yet
longer” (since experience is the best teacher).
Technically we consider a random model for generating interval representa-
tions. For combinatorial analysis, it is easier to assume that all intervals start
at integer points and their lengths are integers. Thus, we adapt the immigration
and death process for randomly choosing intervals’ starting points as integers;
this model has been studied well in the queuing theory as the infinite server
model. We use a power law distribution on integers for determining lengths of
generated intervals.
Although our interval model is defined as a random process, it is also possible
to consider random interval distributions in a static way. For example (under
the condition that n intervals are generated in a given period) we may assume
that the starting points of these intervals are uniformly distributed in the period.
Thus, the probabilistic/combinatorial structure of the model gets more clear, and
we may be able to use various techniques for analyzing the obtained graphs. In
fact, by relatively standard methods, we show that the obtained random interval
graphs satisfy two properties of the scale free networks, namely, (SF) and (CC).
2 Preliminaries
and only if Ivi ∩ Ivj = ∅ for each i and j with 0 < i, j ≤ n. We call the set I of
intervals an interval representation of the graph. For each interval I, we denote
by R(I) and L(I) the right and left endpoints of the interval, respectively (hence
we have L(I) ≤ R(I) and I = [L(I), R(I)]). For any interval representation I
and a point p, ξ[p] denotes the set of intervals that contain the point p. We
denote by Ivi ∼ Ivj if Ivi ∩ Ivj = ∅, which means same as vi ∼ vj for an interval
graph, and denote the length of an interval I by |I|.
In this paper, we focus on a discrete interval model. In this model, each interval
I has two integer endpoints L(I) and R(I), and each interval is closed interval
with minimum length 0. This model seems the most natural and simple one.
However, sometimes, it is (intuitively) better to assume that the minimum length
of an interval is 1. In this case, we may use another (but equivalent) interval
model that consists of open intervals of length at least one. In the following, we
use [i..j] to denote the set of integers {i, i + 1, . . . , j}.
Many social networks can be modeled as a scale free graph such that the degrees
of the graph follow a scale free power law distribution [4]. More precisely, given
a random distribution on some family of graphs, we consider the following con-
dition for a random graph under this distribution: (SF) the probability that a
vertex v has deg(v) = k is proportional to k −γ for some positive constant γ. We
call such a random graph (more precisely, a random graph distribution) satisfy-
ing this condition scale free. Two other properties are required for the notion of
small world. The first one is about “clustering coefficient”, which characterizes
the probability that two neighbors of a node are adjacent. The second one is
the average (or longest) distance between any pair of vertices in the graph. In
this paper we consider the first property and leave the second one for our future
topic.
We explain a condition for the small world property on the clustering coeffi-
cient. For a vertex v ∈ V , clustering coefficient of v, denoted by CC(v), is defined
by:
|{{u, w} ∈ E | u, w ∈ N (v)}|
deg(v)
2
Example 1. It has been usually claimed that typical scale-free networks satisfy
(SF) with α = 2.1 2.8. Since our later analysis shows that the smaller α
gives the smaller clustering coefficient in our model, we consider α = 2.1 for
our example. Then, since ζ(2.1) 1.560, we have on average n0 0.641n,
n1 0.150n, and n2 0.064n, where ni denotes the number of vertices such
that corresponding interval has length i, and n denotes the number of vertices.
In this section, we will show that our scale free interval graph has the degree
sequence following a power law distribution.
To consider the degree of a vertex, let us define ξ(T ) for time T and A(I)
for an interval I. ξ(T ) is the number of intervals which exist on time T in our
Scale Free Interval Graphs 297
ξ(L[Iv ])
Iv
N (Iv )
Fig. 1. An example of the degree of v: deg(v) = 9. There are 6 intervals on time L[Iv ],
6 intervals are put on time [L[Iv ]..R[Iv ]] and 3 intervals starts at time L[Iv ].
algorithm 1. A(I) represents the number of intervals whose left endpoints are
put on [L[I]..R[I]]. It is easy to see that the degree of a vertex v is the sum of
ξ(L[Iv ]) and A(Iv ) minus tL[Iv ] . (See figure 1). ξ(L[Iv ])−tL[Iv ] means the number
of intervals which exist on time L[Iv ] and started before L[Iv ]. We will analyze
the stationary distribution π(k) of ξ(T ) (i.e., π(k) = limT →∞ Pr[ξ(T ) = k]) and
A(I). First, we will show that ξ(T )−tT follows Poisson(λ ζ(α−1)−1ζ(α) ) in the steady
state. Second, we will show that Pr[A(I) = k] follows a power law distribution for
large k. Third, we conclude with the fact that a power law distribution dominates
the Poisson distribution for large degrees. In the rest of this section, we use the
f (x) ∼ g(x) notation to approximate f (x) by g(x). Precisely, “f (x) ∼ g(x) as
x → ∞” stands for “limx→∞ f (x)/g(x) = 1”.
Consider the time T of the procedure put-intervals. Some intervals exist and
each of them has their current length ≥ 0. Since the length of an interval follows
P(α), the probability of survive depends on the current length of the interval.
Let the pi (for i ≥ 0) be the probability such that an interval whose current
length is i at time T will survive at time T + 1. Since we consider that the length
of an interval follows P(α), pi is derived from equation (1).
Let ρTi be the number of intervals which are alive and have current length i at
time T . As the time T will proceed, ρTi+1 +1
is depends only on ρTi because some
of intervals of ρTi will survive at time T + 1 with probability pi and others ends
at time T . From this observation, we obtain this formula for i ≥ 0:
∞
m k
Pr[ρTi+1
+1
= k] = p (1 − pi )m−k Pr[ρTi = m]. (2)
k i
m=k
298 N. Miyoshi et al.
k
Since ρT0 is the number of intervals starting at time T , Pr[ρT0 = k] = e−λ λk! . Let
us consider the stationary distribution πi such that πi (k) = limT →∞ Pr[ρTi = k].
For the stationary distribution πi , the equation (2) becomes
∞
m k
πi+1 (k) = p (1 − pi )m−k πi (m) (3)
k i
m=k
k
and π0 (k) = e−λ λk! .
We will show the following lemma as the solution of the equation (3).
i−1
Lemma 1. Let us denote Pi = j=0 pj for i ≥ 1 and P0 = 1. The stationary
distribution πi follows Poisson(λPi );
(λPi )k
πi (k) = e−λPi .
k!
k
Proof. The proof is done by induction. For i = 0, π0 (k) = e−λP0 (λPk!0 ) . Assume
k
it holds for i ≤ k, i.e., πi (k) = e−λPi (λPk!i ) . The stationary distribution is:
∞
m
m! (λPi )
πi+1 (k) = pki (1 − pi )m−k e−λPi
(m − k)!k! m!
m=k
∞
k
(λpi Pi ) {λPi (1 − pi )}
m k k
−λPi −λPi (λPi+1 ) λPi (1−pi ) (λPi+1 )
=e = e e .
k!
m ! k! k!
m =0
Proof. Since πi s are independent and follow Poisson(λPi ), the sum ξ(T ) − π0 =
∞ ∞
i=1 πi also follows the Poisson distribution with parameter i=1 λPi =
λ ζ(α−1)−1
ζ(α) .
Second, we will show that A(I) follows a power law distribution. Recall that for
any T0 and T ≥ 0, the number of intervals which start on time [T0 ..T0 +T ] follows
the Poisson distribution with parameter λ(T +1). Let us suppose that the interval
I has length l. The number of intervals starting on [L[I]..R[I]](= [L[I]..L[I] + l])
is;
k
{λ(l + 1)}
Pr[A(I) = k | |I| = l] = e−λ(l+1) (4)
k!
Scale Free Interval Graphs 299
λk ∞ k−α −λl
Proof. Let f (k) = k! l=0 l e and suppose k > α. We then have
∞
λk λα
f (k) ≥ xk−α e−λx dx −
(k − α)k−α e−(k−α) ,
k!0 k!
∞
λk λα
f (k) ≤ xk−α e−λx dx + (k − α)k−α e−(k−α) .
k!0 k!
k ∞ α
Let the integral part g(k) = λk! 0 xk−α e−λx dx and the rest h(k) = λk! (k −
α)k−α e−(k−α) . We show that g(k) ∼ λα−1 k −α as k → ∞ and h(k) = o(k −α ) as
k → ∞. Changing the variable to u = λ x, we have
∞
λα−1 λα−1
g(k) = uk−α e−u du =
Γ (k − α + 1),
0 k! k!
∞
where Γ denotes the Gamma function Γ (s) = 0 us−1 e−u du. We use the fol-
lowing properties of Gamma function;
(i) Γ (s + 1) = s Γ (s),
k! k s
(ii) Γ (s) = lim (s = 0, −1, −2, · · · ).
k→∞ s (s + 1) · · · (s + k)
Third, we will show that we can neglect the effect of ξ(L[I]) − tL[I] if the
degree of v is large enough. We present the following lemma.
Lemma 4. Let F̄ and Ḡ be the tail probability of a power law distribution with
parameter α and the Poisson distribution with parameter λμ, respectively. In
∞ ∞ k
precise, using the constant c, F̄ (k) = c i=k i−α and Ḡ(k) = i=k e−λμ (λμ)k! .
Then we have;
Ḡ(k)
→ 0 as k → ∞.
F̄ (k)
k k
Proof. Let us recall that k! ≥ 3 and if lim f (x) = 0 and lim g(x) = 0, then
x→∞ x→∞
d
g(x) dx g(x)
lim = lim d
.
x→∞ f (x)
dx f (x)
x→∞
i
∞
Ḡ(k)
∞
e−λμ (λμ)
i
e−λμ i=k 3λμ i
i=k i!
lim = lim ∞ < lim ∞
k→∞ F̄ (k) k→∞ c i=k i−α k→∞ c i=k i−α
∞ 3λμ x x
e−λμ k x dx e−λμ
3λμ
x
< lim ∞ = lim =0
k→∞ c k x−α dx c x→∞ x−α
By Lemma 4 with μ = ζ(α−1)−1 ζ(α) , for sufficiently large degree vertices, A(Iv )
dominates ξ[L[Iv ]] − tL[Iv ] on the degree distribution. We now conclude with the
following result.
Theorem 1. A scale free interval graph generated according to our discrete
model has the degree sequence following P(α) for large degrees.
5 Clustering Coefficient
In this section, we will show the constant lower bound of the expected value of
the clustering coefficient. First, we show that there are many short intervals and,
second, the expected value of the clustering coefficient of those short intervals
are large. For given G = (V, E), we partition V into V0 , V1 , . . . such that Vi
contains vertices corresponding to intervals of length i. Let ni be the number of
vertices in Vi , and n the number of vertices in V . Our goal is to show how to
compute a lower bound of the clustering coefficient of a scale free interval graph
since it depends on the distribution of ni . Typically, we have the following lower
bound.
Scale Free Interval Graphs 301
Pr[Iu ∼ Iw | Iu ∼ Iv and Iw ∼ Iv ]
l −1
1
v
i + lu + 1
= 2 + (lw − lv + 1)
lv + lw + 1 l + lu + 1
i=0 v
lu lv + lv lw + lw lu + lu + lv + lw + 1
= .
(lu + lv + 1)(lw + lv + 1)
In the other two cases (lv < lw , lu , and lw , lu < lv ), we can analyze in a similar
way, and obtain equations which imply the same results.
Hereafter, we denote by f (lv ; lu , lw ) = lu lv +l v lw +lw lu +lu +lv +lw +1
(lu +lv +1)(lw +lv +1) . It is easy to
check that for any fixed positive integer lv , f (lv ; lu , lw ) is a nondecreasing func-
tion for lu and lw . We also note that f (0; lu , lw ) = 1 for any lu and lw , which
means that any two intervals Iu and Iw intersecting with Iv of length 0, Iu and
Iw share a common interval Iv , which is a point.
Now, we turn to the computation of the lower bound of the expected value
of CC(G). We denote by CC(Vi ) the expected value of the clustering coefficient
of a vertex in Vi . Then we have CC(G) = n1 i=0,1,... ni CC(Vi ). In this section,
our goal is to give a good lower bound of CC(Vi ). In our model, first few Vi s are
influential. Hence we can give a good lower bound by analyzing them.
302 N. Miyoshi et al.
Lemma 6. We have CC(V0 ) = 1, and CC(V1 ) > (63n2 − 9n20 − n21 − 18n0 n −
6n1 n − 6n0 n1 − 183n + 51n0 + 15n1 + 112)/(72(n − 2)(n − 1)).
Proof. Due to the limit of space, we omitted the proof. For the complete proof,
see [5].
By the equation of Lemma 6, we have a lower bound of CC(G) for fixed α. For ex-
ample, letting n0 = 0.641n and n1 = 0.150n (see Example 1), we have CC(G) =
1 1 1 46.2647n2 −148.059n+112
n i=0,1,... ni CC(Vi ) > n i=0,1 ni CC(Vi ) = n (n0 + 72(n−1)(n−2) n1 ) =
452n2 −1395n+1008
1
n (0.641n + 648(n−1)(n−2) 0.150n) = 0.737385(n−1.99726)(n−1.02891)
(n−1)(n−2) 0.7374. In
Lemma 6, we only consider three sets V0 , V1 , and V \ (V0 ∪ V1 ). We can repeat
the idea once more, and obtain a better lower bound. The computations in the
proof are straightforward and tediously, and hence omitted.
Lemma 7. We have CC(V1 ) > (1656n2 −324n20 −64n21 −9n22 −432n0 n−192n1 n−
72n2 n − 288n1n0 − 108n2 n0 − 48n2 n1 − 4776n + 1476n0 + 576n1 + 201n2 +
2800)/(1800(n−1)(n−2)) and CC(V2 ) > (500n2 −100n20 −25n21 −4n22 −200n0n−
100n1n − 40n2n − 100n1n0 − 40n2n0 − 20n2n1 − 1460n + 540n0 + 245n1 + 92n2 +
921)/(600(n − 1)(n − 2)).
Using the equations of Lemma 7, we have a better lower bound of
CC(G) for fixed α. For example, letting n0 = 0.641n, n1 = 0.150n, and
n2 = 0.064n, we have CC(G) = n1 i=0,1,... ni CC(Vi ) > n1 i=0,1,2 ni CC(Vi ) =
1 1178.5n2 −3730.62n+2800 301.125n2 −1071.22n+921
n n 0 + 1800(n−1)(n−2) n 1 + 600(n−1)(n−2) n 2 =
0.771328(n−1.99648)(n−1.04782)
(n−1)(n−2) 0.7713.
6 Concluding Remarks
In this paper, we have proposed the scale free interval graph model, and analyzed
that it has power law degree distribution and large clustering coefficient. Actu-
ally, we had considered the time-continuous model which is almost the same as
the time-discrete model introduced in Section 3. For the time-continuous model,
we also showed the following results.
Theorem 2. A scale free interval graph generated according to our time-
continuous model has the degree sequence following P(α) for large degrees.
Theorem 3. For α = 2.1 (same as Example 1), A scale free interval graph
generated according to our time-continuous model has the expected clustering
coefficient of G is at least 0.159. Note that it is independent of the size of the
graph.
However, our model seems to not satisfy the third property (SW). The property
(SW) is that any two nodes are joined by short path, which is estimated by
average or longest distance between any two nodes in G. Our experimental results
showed that the average distance and the diameter of the graph are both linear
in n. We leave for future works that proposing scale free interval graph model
that has the property (SW).
Scale Free Interval Graphs 303
Acknowledgment
This research was supported in part by JSPS Global COE program ”Computa-
tionism as a Foundation for the Sciences”.
References
1. Barabási, A.: Linked: The New Science of Networks. Perseus Books Group (2002)
2. Barabási, A., Albert, R.: Emergence of Scaling in Random Networks. Sci-
ence 286(5439), 509–512 (1999)
3. Cox, D.R., Isham, V.: Point Processes. Chapman & Hall, Boca Raton (1980)
4. Newman, M.: The structure and function of complex networks. SIAM Review 45,
167–256 (2003)
5. Miyoshi, N., Shigezumi, T., Uehara, R., Watanabe, O.: Scale Free Interval Graphs.
Dept. of Math. and Comp. Sciences Tokyo Institute of Technology Research Reports
(Series C), series C-255 (2008),
http://www.is.titech.ac.jp/research/research-report/C/C-255.pdf
6. Takács, L.: Introduction to the Theory of Queues. Oxford University Press, Oxford
(1962)
7. Watts, D.J.: Small Worlds: The Dynamics of Networks Between Order and Ran-
domness. Princeton University Press, Princeton (2004)
8. Watts, D.J., Strogatz, D.H.: Collective Dynamics of ’Small-World’ Networks. Na-
ture 393, 440–442 (1998)
9. Wolff, R.W.: Poisson Arrivals See Time Averages. Operations Research 30, 223–231
(1982)
On Representation of Planar Graphs by
Segments
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 304–315, 2008.
c Springer-Verlag Berlin Heidelberg 2008
On Representation of Planar Graphs by Segments 305
the width W is always (|V1 | − 1), and the height H is always (|V2 | − 1). (Of
course, here the roles played by width and height are symmetric, i.e., they are
interchangeable.)
We introduce the following geometric representation for plane graphs (a plane
graph is a planar graph with a fixed planar embedding):
Applying above lemma and the existence of VVCR for 2-connected maximal bi-
partite plane graphs, we actually prove that every 2-connected plane multigraph
G = (V, E) has a VFCR and it can be constructed in linear time. The size of
the VFCR for G is always (|F | − 1) × (|V | − 1), where |F | is the number of faces
in G, |V | is the number of vertices of G.
In this paper, we consider the problem the other way around. Namely, we con-
sider the problem from VFCR first. We present a linear time algorithm for con-
structing VFCR for a 2-connected plane multigraph. Our algorithm has the fol-
lowing advantages: (1) The algorithm is simple and it only uses an st-orientation
O of G and its corresponding st-orientation O∗ of the dual graph of G. The co-
ordinates of the segments carry clear combinatorial meanings. The grid size is
length(O∗ )×length(O), where length(O) (length(O∗ ), respectively) is the length
306 S. Sadasivam and H. Zhang
of the longest directed path in O (O∗ , respectively). (2) Although the grid size
bound remains to be the trivial bound (|F |− 1)× (|V |− 1), it in general produces
VFCR (and hence VVCR) in a smaller grid size for 2-connected plane graphs in
practice. Actually, Papamanthou and Tollis [8] introduced a practical algorithm
on controlling the length of the longest directed paths in st-orientations and they
conjectured that for a 2-connected planar graph, there exists an st-orientation
of G such that (length(O) + length(O∗ )) ≤ 2|V |.
For a 3-connected planar graph, all its planar embeddings are derived from its
unique spherical embedding. Therefore, its faces and vertices maintain the same
adjacency relations in all its different planar embeddings. Hence, it is meaningful
to define VFCR for 3-connected planar graphs. Let G be a 3-connected planar
graph with n vertices and f faces. We present a linear time algorithm
to construct
an st-orientation of G such that either length(O) ≤ 2n + 2 n/3 + 5, or
3
length(O∗ ) ≤ 2f3 + 2 f /3 + 5. This bound result is of independent interest. In
addition, it guarantees a non-trivial grid size bound for VFCR for 3-connected
planar graphs and hence it guarantees a non-trivial grid size bound for VVCR
for a large class of bipartite planar graphs, i.e., the class of angular graphs of
3-connected planar graphs.
2 Preliminaries
A graph G = (V, E) is a multigraph if G allows more than one edge between its
any two vertices. A graph G is a planar graph if G admits a planar embedding
without edge crossings except possibly at their common end vertices. A plane
graph G is a planar graph with a fixed planar embedding. G is called a directed
graph (digraph for short) if each edge of G is assigned a direction. We abbreviate
the words “counterclockwise” and “clockwise” as ccw and cw respectively.
The dual graph G∗ = (V ∗ , E ∗ ) of a plane graph G is defined as follows: For
each face F of G, G∗ has a node vF . For each edge e in G, G∗ has an edge
e∗ = (vF1 , vF2 ) where F1 and F2 are the two faces of G with e on their common
boundaries. e∗ is called the dual edge of e. For each vertex v ∈ V , the dual face
of v in G∗ is denoted by v ∗ .
An orientation O of a multigraph G is a digraph obtained from G by assigning
a direction to each edge of G. We will use G to denote both the resulting digraph
and the underlying undirected graph unless otherwise specified. (Its meaning
will be clear from the context.) The length of the longest directed path in O is
denoted by length(O).
For a 2-connected plane multigraph G and an exterior edge (s, t), an orienta-
tion of G is called an st-orientation if the resulting digraph is acyclic with s as
the only source and t as the only sink.
Given an st-orientation O of 2-connected plane multigraph G, consider the
dual graph G∗ of G. For each e ∈ G, we direct its dual edge e∗ from the face on
the left of e to the face on the right of e when we walk on e along its direction
in O. We then reverse the direction of (s, t)∗ . It was shown in [9,10] that this
orientation is an st-orientation of G∗ with (s, t)∗ as the distinguished exterior
On Representation of Planar Graphs by Segments 307
t=v 6
4 t=v
6
t *= f6
4
v 3
4
2 v v
f 4 5
4 v5
f 3 f4
2
1 v
* 3 v
s = f1 3
2
0 1 v f1 f2 f f f
2 3 f 3 5 6
5
f v
3 2
2
s=v1 0
s=v
1
(1) (2)
1. For i ∈ {1, 2, n}, the root of Ti is vi , the edges of G are directed from children
to parent in Ti .
2. Each edge of G is contained in at least one and at most two spanning trees.
If an edge of G is contained in two spanning trees, then it has different
directions in the two trees.
3. For each vertex v of G, when v is not the root of the tree, it has exactly
one edge leaving v in each of T1 , T2 , Tn . The ccw order of the edges incident
to v is: leaving in T1 , entering in Tn , leaving in T2 , entering in T1 , leaving
in Tn , and entering in T2 (Figure 2 shows two examples of edge directions
around a vertex v). Each entering block could be empty. An edge with two
opposite directions is considered twice. The first and the last incoming edges
are possibly coincident with the outgoing edges.
4. For i ∈ {1, 2, n}, all the incoming edges of the root vi belong to Ti .
Tn Tn
T2 T1 T2
v v T1
T1
T1
Tn T2 Tn T2
(1) (2)
For each vertex v of G and i ∈ {1, 2, n}, pi (v) denotes the path in Ti from v to
the root vi of Ti . A subpath of pi (v) between the end vertex v and an ancestor u
of v in Ti is denoted by pi (v, u). The subpath of the external face of G with end
vertices v1 and v2 and not containing vn is denoted by ext(v1 , v2 ). The subpaths
ext(v2 , vn ) and ext(vn , v1 ) are defined similarly. The properties of realizer have
been studied extensively in [1,5,6]. We summarize them in the following lemma.
Lemma 2. Let G = (V, E) be a 3-connected plane graph, v1 , v2 , vn be its three
exterior vertices in ccw. Then G admits a realizer R = (T1 , T2 , Tn ), where vertex
vi is the root of Ti for i ∈ {1, 2, n}. The realizer can be constructed in linear
time. It satisfies the following properties:
1. For each vertex v of G, p1 (v), p2 (v) and pn (v) have only the vertex v in
common.
2. For vertices v1 , v2 , vn the following hold: p1 (v2 ) = p2 (v1 ) = ext(v1 , v2 );
p2 (vn ) = pn (v2 ) = ext(v2 , vn ); pn (v1 ) = p1 (vn ) = ext(vn , v1 ).
Figure 3 shows an example of a 3-connected plane graph and one of its realizers.
Simple observation also verifies the following property for 3-connected plane
graph G with a realizer R = (T1 , T2 , Tn ):
Property 1. Let v be a vertex other than v1 , v2 , vn of G.
1. All ancestors of v in T1 (T2 , Tn respectively) constitute a nonempty set and
they appear before v in the ccw postordering of the vertices of G with respect
to Tn (T1 , T2 respectively).
2. All ancestors of v in T2 (Tn , T1 respectively) constitute a nonempty set and
they appear before v in the cw postordering of the vertices of G with respect
to Tn (T1 , T2 respectively).
An ordering O of a set consisting of elements a1 , a2 , . . . , ak is written as O =<
a1 , a2 , . . . , ak >. For two elements ai and aj , if ai appears before aj in O, we
write ai ≺O aj . The concatenation of two ordered lists O1 and O2 is written as
O1 O2 .
vn
e
k
f
h
g d
c
a
b
v1 v2
t H(G)
t*
s y
c*
e*
H(G) s*
u v w
d*
x s y
(1) (2)
Fig. 4. A wheel graph of order n. Dashed lines represent a path with possibly many
vertices on it. (1) H(G) is an interior vertex in the planar embedding, (2) H(G) is an
exterior vertex in the planar embedding.
5 Conclusion
In this paper, we introduce VFCR for 2-connected plane multigraphs. We present
a linear time algorithm for constructing VFCR for 2-connected plane multi-
graphs. For 3-connected planar graphs, we present a non-trivial bound on the
length of its longest directed path for its st-orientations. This non-trivial bound
yields non-trivial grid size bound for VFCR for 3-connected planar graphs. The
relation between VFCR and VVCR is also presented.
References
1. Di Battista, G., Tamassia, R., Vismara, L.: Output-sensitive Reporting of Disjoint
Paths. Algorithmica 23(4), 302–340 (1999)
2. Fraysseix, H.D., de Mendez, P.O., Pach, J.: Representation of planar graphs by
segments. Intuitive Geometry 63, 109–117 (1991)
3. Fraysseix, H.D., de Mendez, P.O., Pach, J.: A Left-First Search Algorithm for
Planar Graphs. Discrete & Computational Geometry 13, 459–468 (1995)
4. Lempel, A., Even, S., Cederbaum, I.: An algorithm for planarity testing of graphs.
In: Theory of Graphs Proc. of an International Symposium, Rome, July 1966, pp.
215–232 (1966)
5. Felsner, S.: Convex drawings of Planar Graphs and the Order Dimension of 3-
Polytopes. Order 18, 19–37 (2001)
6. Miura, K., Azuma, M., Nishizeki, T.: Canonical decomposition, realizer, Schnyder
Labelling and orderly spanning trees of plane graphs. International Journal of
Foundations of Computer Science 16, 117–141 (2005)
7. Ossona de Mendez, P.: Orientations bipolaires, PhD thesis, Ecole des Hautes
Etudes en Sciences Sociales, Paris (1994)
8. Papamanthou, C., Tollis, I.G.: Applications of parameterized st-orientations in
graph drawings. In: Healy, P., Nikolov, N.S. (eds.) GD 2005. LNCS, vol. 3843, pp.
355–367. Springer, Heidelberg (2006)
9. Rosenstiehl, P., Tarjan, R.E.: Rectilinear planar layouts and bipolar orientations
of planar graphs. Discrete Comput. Geom. 1, 343–353 (1986)
10. Tamassia, R., Tollis, I.G.: An unified approach to visibility representations of planar
graphs. Discrete Comput. Geom. 1, 321–341 (1986)
11. He, X., Zhang, H.: Nearly Optimal Visibility Representations of Plane Graphs.
In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP 2006. LNCS,
vol. 4051, pp. 407–418. Springer, Heidelberg (2006)
An Optimal On-Line Algorithm for Preemptive
Scheduling on Two Uniform Machines
in the p Norm
1 Introduction
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 316–327, 2008.
c Springer-Verlag Berlin Heidelberg 2008
An Optimal On-Line Algorithm for Preemptive Scheduling 317
resolutions tend to be complicated and often generate novel ideas that are usually
useful in attacking scheduling problem of more than two machines. Therefore,
the investigation of such problems is of important theoretical significance.
The rest of the paper is organized as follows. After some preliminary results in
Section 2, we present an on-line algorithm algorithm and prove its competition
ratio in Section 3. Then we show a matching lower bound in Section 4.
Proof. The desired result follows if we could show that H(μ, t̂) has opposite
signs on the two boundaries of (1, 1 + 1/ŝp ) because H(μ, t̂) is monotonic by
Lemma 1(4).
First of all, there exists a positive number ε 1, such that the value at the
left boundary of (1, 1 + 1/ŝp ):
p−1
1+ε p
H(1 + ε, t̂) = (1 + ŝp − s)t̂ ŝ − (st̂)p −sp (1 + ε)p−1 ŝ − t̂p−1 > 0.
ε
Second of all, we show that the value H(1 + 1/ŝp , t̂) ≤ 0 at the right boundary
of (1, 1 + 1/ŝp ). Let
H(1 + 1/ŝp , t̂) = ŝt̂W (s),
where
sp t̂p−1
W (s) := (1 + ŝp − s)p + s1/(1−p) + s − (1 + ŝp )p − .
ŝ
Note that W (s) is decreasing by checking the derivative:
p2
W (s) = ŝ{(1 + ŝp − s)p−1 − (1 + ŝp )p−1 } + {1 − p(1 + ŝp − s)p−1 }
p−1
p −p p p−1
+ ŝ (s t̂ − 1) + psp (1 + ŝp )−1 − s−p t̂p−1 ≤ 0.
p−1
So, for s > 1, W (s) ≤ W (1) = 3 − 2p − 21−p ≤ 0 for all p > 1, implying that
H(1 + ŝ−p , t̂) ≤ 0.
Define two intervals T = [0, t̂] and U = [μ1 , μ̂], where μ̂ is the unique root defined
in Lemma 2.
Lemma 3. The following equations system has a unique solution (μ, t) such
that t ∈ T and μ ∈ U .
ϕ(μ, t) = 0,
φ(μ, t) = 0.
Proof. First, we show that there exists a unique positive solution t(μ) ∈ T for
any given μ ∈ U . Consider the equation H(μ, t) = 0, or equivalently,
p−1 p
μ 1
ŝ 1 − (1 − t) − (st)p − sp μp−1 ŝ − t̂p−1 = 0 (1)
μ−1 ŝ
A direct calculation reveals that the derivative Ht (μ, t) ≥ 0 for μ ∈ U and
t ∈ T , implying H(μ, t) is an increasing function of t ∈ T . Consequently, the
desired result follows if we could show that H(μ, t) has opposite signs on the two
320 T. Shuai, D. Du, and X. Jiang
boundaries of (0, t̂). (i) t = 0: Note that H(μ, 0)/μp−1 = (μ − 1)1−p (ŝ − 1)p /s −
sp (ŝ − (1 + ŝp )1−p ) is an decreasing function for μ ≥ 1 and H(μ1 , 0)/μp−1
1 = 0,
implying that H(μ, 0)/μp−1 1 ≤ H(μ1 , 0)/μp−1
1 ≤ 0 for any μ ≥ μ1 . (ii). t = t̂:
H(μ, t̂) ≥ 0 for any μ ≤ μ̂ by Lemma 1(4) and Lemma 2.
Next, we show the important property that t(μ) is an increasing function of
μ ∈ U , which will be needed to prove the existence and uniqueness of solution
μ ∈ U . Implicitly differentiating Equation (1) yields
p
(p − 1)μp−2 sp ŝ − t̂p−1 + (μ−1)
ŝ
p 1 − 1−t
ŝ
t (μ) = p−1
1−t p−1
p μ
μ−1 1 − ŝ −s t
p p−1
Note that D(t) := D1 (t)−D2 (t) is a linear function of t for any fixed μ. Moreover,
(i) D(0) = μ(ŝ − 1) > 0. (ii) μ ≤ μ̂ ≤ 1 + 1/ŝp ≤ ŝp /(s − 1) implies that
D(t̂) = (ŝ(μ(1 − s) + ŝp ))/(1 + ŝp ) > 0. Consequently, D(t) > 0 for all t ∈ T ,
implying the denominator is positive. Therefore t (μ) ≥ 0, implying t(μ) is an
increasing function of μ ∈ U .
Finally, we are ready to show that there exists a unique solution u ∈ U . Note
that, for any μ ∈ U , t(μ) being increasing implies that t(μ) ≤ t(μ̂) = t̂ by the
definitions of μ̂ and t̂. Define the following function based on ϕ(μ, t):
p−1 p
μ 1
ξ(μ) := ŝϕ(μ, t) = ŝ 1 − (1 − t) + (1 − t)p − sp+1/(p−1) μp−1
μ−1 ŝ
t=t(μ)
= (st)p + (1 − t)p − sp (μt̂)p−1 = φ(μ, t)
Lemma 1(3) and t(μ) being increasing implies that (st)p + (1 − t)p is decreasing
for t ∈ T . Consequently ξ(μ) = φ(μ, t(μ)) is decreasing for μ ∈ U . Note that
t(μ1 ) = 0 and t(μ̂) = t̂. Therefore, (i) μ1 ≤ 1 + 1/ŝp implies that ξ(μ1 ) =
1 − (sp μp−1
1 )/((1 + ŝp )p−1 ) > 0. (ii) μ̂ > 1 and t(μ̂) = t̂ imply that
p p
s ŝp sp μp−1 sp (1 − μ̂p−1 )
ξ(μ̂) = p
+ p
− p−1 = p−1 < 0.
1 + 1/ŝ 1 + 1/ŝ (1 + 1/ŝp ) (1 + 1/ŝp )
From now on, denote (μ∗ , t∗ ) to be the unique solution of the system (1)-(2),
and let α = μp−1
∗ . From the proof of Lemma 3, it is clear that μ∗ ≥ μ1 > 1.
The following result is an immediate consequence of Lemmas 1 and 3.
An Optimal On-Line Algorithm for Preemptive Scheduling 321
Lemma 4. Assume t ∈ T .
Therefore ϕ(μ∗ , t) < 0 for t ∈ [0, t̄(μ∗ )] and it is increasing for t > t̄(μ∗ ) by
Lemma 1(2). Moreover, Lemma 1(1) and μ∗ ≤ μ̂ ≤ 1 + 1/ŝp ≤ ŝp /(s − 1) implies
that t̄(μ∗ ) ≤ t̂ and hence t̄(μ∗ ) ∈ T . Consequently, the desired result follows as
t∗ is the unique root of ϕ(μ∗ , t) in t ∈ T by Lemma 3.
(2) Note that φ(μ∗ , 0) = 1 + sp − sp (μ∗ t̂)p−1 > 0 and φ(μ∗ , t) is decreasing
for t ∈ T by Lemma 1(3). Consequently, the desired result follows as t∗ is the
unique root of ϕ(μ∗ , t) in t ∈ T by Lemma 3.
3 Upper Bound
√
We devise an on-line algorithm and show its competitive ratio to be p α in this
section. In the next section (Section 4), we shall prove that no√ deterministic
on-line algorithm can achieve a competitive ratio smaller than p α.
For simplicity, we will identify a job with its length whenever there is no
confusion. We introduce some notations first. In any on-line algorithm, after
scheduling some jobs, let Li (i = 1, 2) be the machine load on machine Mi prior
to the new incoming job x. Thus L = L1 + sL2 is the total workload before x,
and the objective value C = p Lp1 + Lp2 . Denote Copt to be the optimal off-line
objective prior to x, then for any job z prior to x,
z p p
Copt ≥ p
max , ŝt̂L + min L − z, Lt̂
s
Define the following functions and quantities:
p
1 1 Lp x p
f (x) = (L1 + x) + 1 − L2 + 2 − α + Lp ,
s ŝ ŝ s
322 T. Shuai, D. Du, and X. Jiang
p
x−y
p
g(x, y) = (L1 + y) + L2 + − α(L + x)p t̂p−1 ,
s
L1 + s(1 − 1/ŝ)L2
x1 = ,
μ∗ − 1
μ∗ L − (1 + ŝp )L1
x2 = ,
1 + ŝp − μ∗
μ∗ ŝL − L2 (1 − 1/ŝp )(1 + ŝp )p−1
x3 = .
(1 + ŝp )p−1 /s − μ∗ ŝ
Lemma 5
Proof. (1), (2) and (3) being easy to prove by checking the derivative and (4)
being easy to verify. We only prove (5). Note that
L2 sμ∗ 1
x2 − − L1 = − L2
ŝ 1 + ŝp − μ∗ ŝ
s 1
≥ − L2 = 0,
1 + ŝp − 1 ŝ
where the first inequality follows because the first term therein sμ/(1 + ŝp − μ)
is an increasing function of μ and μ∗ ≥ 1.
max y
p−1 p (L2 +(x−y)/s)p
μ∗
μ∗ −1
L1 +y
s + 1 − 1ŝ L2 + x−y
s + ŝ ≤ α(x + L)p (2)
0≤y≤x (3)
0≤y≤ 1
ŝ L2 − L1 (4)
An Optimal On-Line Algorithm for Preemptive Scheduling 323
4 Lower Bound
We show that the upper bound proved in the previous section is actually best
possible.
Theorem
√ 2. No deterministic on-line algorithm has a competitive ratio smaller
than p α.
Proof. Consider the sequence of jobs with size 1, ŝp , w, where w will be specified
shortly. We only need to consider those schedules with no simultaneous idle time.
Suppose there exists an on-line algorithm A with competitive ratio less than
√
p
α. Without loss of generality, algorithm A schedules the first job on M2 . Let
0 ≤ x ≤ 1 be the amount assigned to M1 after the second job. The optimal
off-line objective value now is 1 + ŝp . Note that xp + (ŝ + (1 − x)/s)p < α(1 + ŝp )
implies
p
(1 + ŝp )p 1−x
p
φ(μ∗ , xt̂) = x + ŝ + − α(1 + ŝp ) < 0,
sp s
which again implies that xt̂ > t∗ . We shall now prove a contradictory claim that
xt̂ ≤ t∗ and hence completes the proof.
Let
1 + ŝp − ŝ − (1 − x)/s
w= .
μ∗ − 1
First, we show that w ≥ ŝp (1 + ŝp ). Let t = s(ŝp (μ∗ − 1) − 1) + 1. If t∗ ≥ t ,
then xt̂ > t∗ implies that
1 + ŝp − ŝ − 1−x (1 + ŝp ) 1 − 1−t∗
w= s
≥ s
μ∗ − 1 μ∗ − 1
(1 + ŝ )(1 − s + (s(ŝ (μ∗ − 1) − 1) + 1)/s
p 1 p
≥ = ŝp (1 + ŝp ).
μ∗ − 1
So, we only need to prove t∗ ≥ t . Clearly, this is true when t ≤ 0. Therefore,
we assume that t ≥ 0. Note that
p−1 p
μ∗ s p (s(1 − ŝp (μ∗ − 1)))
ϕ(μ∗ , t ) = 1 + (ŝp (μ∗ − 1) − 1) + − αsp
μ∗ − 1 ŝ ŝ
p−1
1 1 p ŝp−2 − 1
p p−1
= s μ∗ + (ŝ (μ∗ − 1) − 1) s−
s ŝ s(μ∗ − 1)
p
(1 − ŝ (μ∗ − 1))
p
+ −1
ŝμp−1
∗
1 1 p (1 − ŝp (μ∗ − 1))
≤ sp μp−1
∗ + (ŝ (μ∗ − 1) − 1) + ×
s ŝ ŝ
p−1 p−1
ŝp−2 − 1 (1 − ŝp (μ∗ − 1))
max s− , −1
s(μ∗ − 1) μ∗
326 T. Shuai, D. Du, and X. Jiang
p−1 p−1
1 ŝp−2 − 1 (1 − ŝp (μ∗ − 1))
= sp μp−1
∗ max s− , − 1 ≤ 0.
s s(μ∗ − 1) μ∗
Then
p
1 + w − ŝ − (1 − x)/s
p
(ŝ + (1 − x)/s)p + ŝ + < p α((w/s)p + (1 + ŝp )p ),
s
or equivalently
p−1 p
μ∗ ŝp + 1 − ŝ − (1 − x)/s
(ŝ + (1 − x)/s) + p
−μp−1
∗ (1 + ŝp )p < 0.
μ∗ − 1 s
So
ϕ(μ∗ , xt̂)
p p−1
p−1 p+1
+ŝ−1−ŝp +x p
= (st̂)p 1ŝ ŝ+ 1−x
s −μ ∗ (1+ ŝ p p
) + μ∗
μ∗ −1
ŝ
ŝp
p p−1
p−1 p
ŝ +1−ŝ−(1−x)/s
p
< (st̂)p ŝ + 1−x
s −μ ∗ (1+ ŝ p p
) + μ∗
μ∗ −1 s < 0.
Hence ϕ(μ∗ , xt̂) < 0. This implies that xt̂ < t∗ by lemma 4, which is an
obvious contradiction to the previous claim that xt̂ > t∗ .
References
1. Alon, N., Azar, Y., Woeginger, G.J., Yadid, T.: Approximation schemes for schedul-
ing. In: SODA, pp. 493–500 (1997)
2. Avidor, A., Azar, Y., Sgall, J.: Ancient and new algorithms for load balancing in
the p norm. Algorithmica 29, 422–441 (2001)
3. Azar, Y., Epstein, A.: Convex programming for scheduling unrelated parallel ma-
chines. In: STOC, pp. 331–337 (2005)
4. Azar, Y., Epstein, A., Epstein, L.: Load balancing of temporary tasks in the p
norm. Theoretical Computer Science 361(2-3), 314–328 (2006)
5. Azar, Y., Epstein, L., Richter, Y., Woeginger, G.J.: All-norm approximation algo-
rithms. In: Penttonen, M., Schmidt, E.M. (eds.) SWAT 2002. LNCS, vol. 2368, pp.
288–297. Springer, Heidelberg (2002)
An Optimal On-Line Algorithm for Preemptive Scheduling 327
6. Azar, Y., Taub, S.: All-Norm Approximation for Scheduling on Identical Machines.
In: Hagerup, T., Katajainen, J. (eds.) SWAT 2004. LNCS, vol. 3111, pp. 298–310.
Springer, Heidelberg (2004)
7. Chandra, A.K., Wong, C.K.: Worst-case analysis of a placement algorithm related
to storage allocation. SIAM Journal on Computing 1, 249–263 (1975)
8. Du, D.-L., Jiang, X., Zhang, G.: Optimal preemptive online scheduling to minimize
lp norm on two processors. Journal of Manufacturing and Management Optimiza-
tion 1(3), 345–351 (2005)
9. Epstein, L., Noga, J., Seiden, S., Sgall, J., Woeginger, G.J.: Randomized online
scheduling on two uniform machines. Journal of Scheduling 4(2), 71–92 (2001)
10. Epstein, L., Tassa, T.: Optimal Preemptive Scheduling for General Target Func-
tions. Journal of Computer and System Sciences 72(1), 132–162 (2006)
11. Kumar, V.S.A., Marathe, M.V., Parthasarathy, S., Srinivasan, A.: Approximation
Algorithms for Scheduling on Multiple Machines. In: FOCS, pp. 254–263 (2005)
12. Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., Shmoys, D.B.: Sequencing and
scheduling: Algorithms and complexity. In: Graves, S.C., Rinnooy Kan, A.H.G.,
Zipkin, P.H. (eds.) Logistics of Production and Inventory, pp. 445–522. North-
Holland, Amsterdam (1993)
13. Lin, L.: Semi-online scheduling algorithm under the p norm on two identical ma-
chines. Journal of Zhejiang University (Science Edition) 34(2), 148–151 (2007) (in
chinese)
14. Lin, L., Tan, Z.Y., He, Y.: Deterministic and randomized scheduling problems
under the p norm on two identical machines. Journal of Zhejiang University Sci-
ence 6(1), 20–26 (2005)
15. Tan, Z., He, Y., Epstein, L.: Optimal On-line Algorithms for the Uniform Machine
Scheduling Problem with Ordinal Data. Information and Computation 196(1), 57–
70 (2005)
16. Wen, J., Du, D.-L.: Preemptive on-line scheduling for two uniform processors.
Operations Research Letters 23, 113–116 (1998)
An Optimal Strategy for Online Non-uniform
Length Order Scheduling
1 Introduction
Since there are many dynamic and unpredictable factors in modern manufactur-
ing business, including production order scheduling and processing operations,
many authors adopt online theory to describe and investigate the scenario, and
online scheduling has caught much interest among extensive scheduling litera-
ture in recent decades. In online scheduling, there is a manufacturer who may
accept or decline orders that arrive one by one over time. Each order will stay
in the system to be satisfied after arrival until it expires, i.e., its deadline cannot
be met at the time even started at once. The manufacturer will gain a profit
from each completed order. He may also abort an order on running to start a
new one in favor of larger profit, and the aborted order has to be started again
from the beginning to be satisfied. That is, we consider the preemption-restart
online model to maximize the total profit of completed orders.
Corresponding author. Tel.: +86-29-8266-5034; fax: +86-29-8266-5543. This work
was supported by NSF of China under Grants 70525004, 70702030, 70602031,
70121001 and 60736027, and Doctoral Fund of Ministry of Education of China
20070698053.
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 328–336, 2008.
c Springer-Verlag Berlin Heidelberg 2008
An Optimal Strategy for Online Non-uniform Length Order Scheduling 329
In most literature, it is usually assumed that the shortest and longest order
is of one unit and Δ units of length respectively. Most literature studied the
case where the knowledge of Δ is known to online strategies at the first begin-
ning. Fung et al. [1] studied an online
√ broadcast problem. Translated into our
terminology, they proved a Δ + 2 Δ + 2-competitive strategy ACE (Another
Completes Earlier). Zheng et al. [2] present a lower bound of Ω(Δ/ ln Δ). Ting
[3] proved a matching upper bound of O(Δ/ log Δ), and left it open whether
there exist O(Δ/ log Δ)-competitive online strategies without the knowledge of
Δ. In the above studies, online strategies make use of Δ. Kim et al. [4] presented
a 5-competitive greedy strategy GD for the case of unit length of order, i.e.,
Δ = 1. GD makes an abortion if a newly arrival order has weight α times that
of the order being processed, otherwise GD continues the current service. Zheng
et al. [5] proved that GD is 4Δ + 1-competitive with α = 2 for the case where
Δ ≥ 1. GD is treated as an online strategy that acts without the knowledge of
Δ and it performs poorly for the case where Δ > 1. For the other case where Δ
is unknown beforehand, it is harder for online strategies to act efficiently, and to
the best of our knowledge there is little result considering to maximize profits.
We believe that it is a reasonable case in real business since the manufacturer
usually can not foresee the exact information of future orders, including order
length. So, the work will focus on the performance of online strategies in the
latter case and give a positive answer to the problem proposed in Ting [3].
We describe our problem formally as follows. There is one manufacturer who
processes orders arriving over time. Each order J has four attributes, namely,
a(J): the arrival time, p(J): the processing time or the length, w(J): the profit
or weight to be obtained only if J is finished and d(J): the deadline by which the
order has to be completed to be satisfied. p(J), w(J) and d(J) become known
on the arrival of J, i.e., at time a(J). 1 ≤ p(J) ≤ Δ where Δ is assumed w.l.o.g.
to be a natural number. The goal is to maximize the total profit of completed
orders within a time period.
Lipton and Tomkins’s work and investigated the case where orders have slack
time equal to k ≥ 0 times of order length, i.e., d(J) − a(J) = (k + 1)p(J). They
proved a matching upper and lower bound of 2 + Δ−1 Δ when Δ 1
≤ k < 1, and
Δ
a matching bound of 1 + Δ when 1 ≤ k < Δ (please refer to [11] for details).
In this work, we will study the preemption-restart online model to maximize the
total profit of completed orders. An online deterministic strategy that does not
6Δ 5/6
make use of Δ is proposed and proved to be ( log Δ + O(Δ ))-competitive when
√
20
Δ > 20, and ( √20−1 Δ + 6.8)-competitive when 1 < Δ ≤ 20 respectively. Since
the lower bound of Ω(Δ/ ln Δ) in [2] applies to the case without the knowledge
of Δ, the online strategy is optimal when Δ > 20.
The rest of the paper is organized as follows. Section 2 gives the definition
of competitive ratio, and presents the online deterministic strategy. We propose
several fundamental properties for the strategy in Section 3 and prove its optimal
competitiveness in Section 4. Section 5 concludes the work.
For the model without preemption penalties, Ting [3] proposed the BALANCE
strategy applying the knowledge of Δ. In this section, we will put forward the
Dynamic Preemption Criteria (abbr. DPC) strategy that does not make use
of the knowledge of Δ. Similar to BALANCE, DPC makes two kinds of pre-
emptions: the good-profit preemption that would increase the supposed profit of
processing, and the short-length preemption that would reduce the completion
time but not increase the supposed profit of processing.
Before describing DPC strategy, we give some preliminary definitions. Given
an arbitrary order input list Γ , let σ = (J0 , . . . , Jm ) be a preempting chain
produced by DPC such that Ji is preempted by Ji+1 for 0 ≤ i < m and Jm is
completed by DPC. J0 preempts none, that is, σ cannot be backward extended.
If m = 0, then σ consists of a single order to be completed by DPC. If Ji
preempts Ji−1 by good-profit preemption, Ji is called a gp order, otherwise if
An Optimal Strategy for Online Non-uniform Length Order Scheduling 331
3 Basic Properties
By construction of DPC, all the orders in σ = (J0 , . . . , Jm ) except J0 are started
by DPC on their arrival. So, s(Ji ) = a(Ji ) holds for 0 < i ≤ m. For J0 , it may
or may not be started by DPC on its arrival.
Property 1. In an arbitrary preempting chain σ = (J0 , . . . , Jm ) produced by
DPC, p(Ji ) ≤ δs(Ji ) ≤ δs(Ji+1 ) for 0 ≤ i ≤ m − 1.
Proof. By the definition of δt , it is a non-decreasing function in time t. First,
δs(Ji ) ≤ δs(Ji+1 ) due to s(Ji ) < s(Ji+1 ). Since Ji shall arrive on or before s(Ji ),
p(Ji ) is a candidate for δs(Ji ) , implying that p(Ji ) ≤ δs(Ji ) .
Assume that there are n + 1 (n ≥ 0) gp orders in σ = (J0 , . . . , Jm ). We will
divide σ into n + 1 segments σ = (τ0 , . . . , τn ) such that in each segment τi =
(Ri,0 , Ri,1 , . . . , Ri,ki ) (0 ≤ i ≤ n), the first order Ri,0 is a gp order and the other
ki orders are sp orders. If ki = 0, it means that there is no sp orders in τi . For
0 ≤ i < n, the last order in τi will be preempted by Ri+1,0 by C1 condition. For
τn , Rn,kn = Jm .
Property 2. In an arbitrary preempting chain σ = (τ0 , . . . , τn ) produced by DPC,
we have that s(Ri+1,0 ) − s(Ri,0 ) < p(Ri,0 ) for 0 ≤ i < n.
332 F. Zheng et al.
For notational convenience, denote by ai , wi and pi the arrival time, weight and
processing length of order Ri,0 respectively, and by si the time DPC starts Ri,0 .
For 1 ≤ j ≤ ki , denote by ai,j , wi,j , pi,j and si,j those of Ri,j respectively in the
rest of Section 2. For segment τi (0 ≤ i < n), we have the following lemma.
4 Competitive Analysis
6Δ
Theorem 1. In online non-uniform length order scheduling, DPC is ( log Δ +
√
20
O(Δ5/6 ))-competitive when 20 < Δ and ( √20−1 Δ + 6.8)-competitive when 1 <
Δ ≤ 20, respectively.
Proof. Let Γ be the schedule produced by DPC for a given order input list.
Assume w.l.o.g. that DPC completes η (≥ 1) orders in Γ . We can divide Γ
into η preempting chains so that in each preempting chain only the last order
is completed by DPC. Since the total profit of both OPT and DPC in Γ is the
simple summation of their respective total profit in each preempting chain, to
upper bound the ratio between the profit of OPT and that of DPC in Γ , it
suffices to bound the ratio in an arbitrary preempting chain σ = (τ0 , . . . , τn ),
where τi (0 ≤ i ≤ n) are segments defined before. For DPC, |σ| = wm by the
definition of σ. Assume that δsk ≤ 20 and δt > 20 for some t ∈ (sk , sk+1 ], where
0 ≤ k < n. We will discuss two cases
where 0 ≤ k ≤ n − 1 and where k = n.
Case 1. 0 ≤ k ≤ n − 1. Let ri = max{20, δsi }. Since Ri,0 preempts Ri−1,ki−1
n−1
by C1 condition, wi ≤ wi+1 /ri ≤ . . . ≤ wn / j=i rj .
n−1
|σ ∗ | − |τn∗ | = |τi∗ |
i=0
k
√ n−1
6δsi
≤ (δsk + 20)wi + ( + δsi )wi
i=0
log δsi
i=k+1
√
k
(δsk + 20)wn
n−1
6δsi wn
≤ √ + ( + δsi ) n−1
i=0
( 20)n−i log δsi j=i rj
i=k+1
√
(δsk + 20)wn
n−1
6δsi wn
< √ √ + ( + δsi ) n−1
( 20 − 1)( 20) n−k−1
i=k+1
log δsi j=i rj
5 Conclusion
This paper discussed an online order scheduling scenery where online strategies
6Δ
does not have the knowledge of Δ at all beforehand. We mainly present a ( log Δ+
O(Δ5/6 ))-competitive optimal strategy DPC, extending the previous conclusion
in [3] from the case with the knowledge of Δ to the one without the knowledge.
It is interesting that whether randomization can help to break this bound.
References
1. Fung, S.P.Y., Chin, F.Y.L., Poon, C.K.: Laxity helps in broadcast scheduling. In:
Proceedings of 11th Italian Conference on Theoretical Computer Science, Siena,
Italy, pp. 251–264 (2005)
2. Zheng, F.F., Fung, S.P.Y., Chan, W.T., Chin, F.Y.L., Poon, C.K., Wong, P.W.H.:
Improved On-line Broadcast Scheduling with Deadlines. In: Proceedings of the 12th
Annual International Computing and Combinatorics Conference, Taipei, Taiwan,
pp. 320–329 (2006)
3. Ting, H.F.: A near optimal scheduler for on-demand data broadcasts. In: 6th Italian
Conference on Algorithms and Complexity, Rome, Italy, pp. 163–174 (2006)
4. Kim, J.H., Chwa, K.Y.: Scheduling broadcasts with deadlines. In: Proceedings of
9th Italian Conference on Theoretical Computer Science, Big Sky, MT, USA, pp.
415–424 (2003)
5. Zheng, F.F., Dai, W.Q., Xiao, P., Zhao, Y.: Competitive Strategies for On-line Pro-
duction Order Disposal Problem. In: 1st International Conference on Algorithmic
Applications In Management, Xi’an, China, pp. 46–54 (2005)
336 F. Zheng et al.
6. Borodin, A., El-yaniv, R.: Online computation and competitive analysis. Cam-
bridge University Press, England (1998)
7. Motwani, R., Phillips, S., Torng, E.: Nonclairvoyant Scheduling. Theoretical Com-
puter Science 130(1), 17–47 (1994)
8. Kalyanasundaram, B., Pruhs, K.R.: Minimizing flow time nonclairvoyantly. Journal
of the ACM 50(4), 551–567 (2003)
9. Becchetti, L., Leonardi, S.: Nonclairvoyant scheduling to minimize the total flow
time on single and parallel machines. Journal of the ACM 51(4), 517–539 (2004)
10. Lipton, R.J., Tomkins, A.: Online Interval Scheduling. In: Proc. Of the 5th Annual
ACM-SIAM Symposium on Discrete Algorithm (SODA 1994), pp. 302–311. New
York (1994)
11. Goldwasser, M.H.: Patience is a Virtue: The effect of slack on competitiveness for
admission control. Journal of Scheduling 6(2), 183–211 (2003)
Large-Scale Parallel Collaborative Filtering for
the Netflix Prize
1 Introduction
Recommendation systems try to recommend items (movies, music, webpages,
products, etc) to interested potential customers, based on the information avail-
able. A successful recommendation system can significantly improve the revenue
of e-commerce companies or facilitate the interaction of users in online commu-
nities. Among recommendation systems, content-based approaches analyze the
content (e.g., texts, meta-data, features) of the items to identify related items,
while collaborative filtering uses the aggregated behavior/taste of a large num-
ber of users to suggest relevant items to specific users. Collaborative filtering is
popular and widely deployed in Internet companies like Amazon [16], Netflix [2],
Google News [7], and others.
The Netflix Prize is a large-scale data mining competition held by Netflix
for the best recommendation system algorithm for predicting user ratings on
movies, based on a training set of more than 100 million ratings given by over
480,000 users to 17,700 movies. Each training data point consists of a quadruple
(user, movie, date, rating) where rating is an integer from 1 to 5. The test
dataset consists of 2.8 million data points with the ratings hidden. The goal is
R. Fleischer and J. Xu (Eds.): AAIM 2008, LNCS 5034, pp. 337–348, 2008.
c Springer-Verlag Berlin Heidelberg 2008
338 Y. Zhou et al.
to minimize the RMSE (root mean squared error) when predicting the ratings
on the test dataset. Netflix’s own recommendation system (CineMatch) scores
0.9514 on the test dataset, and the grand challenge is to improve it by 10%.
The Netflix problem presents a number of practical challenges. (Which is
perhaps why, as yet, the prize has not been won.) First, the size of the dataset
is 100 times larger than previous benchmark datasets, resulting in much longer
model training time and much larger system memory requirements. Second,
only about 1% of the user-movie matrix has been observed, with the majority of
(potential) ratings missing. This is, of course, an essential aspect of collaborative
filetering in general. Third, there is noise in both the training and test dataset,
due to human behavior – we cannot expect people to be completely predictable,
at least where their feelings about ephemera like movies is concerned. Fourth,
the distribution of ratings per user in the training and test datasets are different,
as the training dataset spans many years (1995-2005) while the testing dataset
was drawn from recent ratings (year 2006). In particular, users with few ratings
in the training set are well represented in the test set. Intuitively, it is hard to
predict the ratings of a user who is sparsely represented in the training set.
In this paper, we introduce the problem in detail. Then we describe a paral-
lel algorithm, alternating-least-squares with weighted-λ-regularization. We use
parallel Matlab on a Linux cluster as the experimental platform, and our core
algorithm is parallelized and optimized to scale up well with large, sparse data.
When we apply the proposed method to the Netflix Prize problem, we achieve
a performance improvement of 5.91% over Netflix’s own CineMatch system.
The rest of the paper is organized as follows: in Section 2 we introduce the
problem formulation. In Section 3 we describe our novel parallel Alternative-
Least-Squares algorithm. Section 4 describes experiments that show the effec-
tiveness of our approach. Section 5 discusses related work and Section 6 concludes
with some future directions.
2 Problem Formulation
Let R = {rij }nu ×nm denote the user-movie matrix, where each element rij
represents the rating score of movie j rated by user i with its value either being a
real number or missing, nu designates the number of users, and nm indicates the
number of movies. As in most recommendation systems our task is to estimate
some of the missing values in R based on the known values. (The Netflix dataset
consists of nm = 17770 movies, nu = 488000 users, and nr ≈ 100 million known
ratings.)
We start with a low-rank approximation of the ratings matrix R. This ap-
proach models both users and movies by giving them coordinates in a low di-
mensional feature space. Each user and each movie has a feature vector, and
each rating (known or unknown) of a movie by a user is modeled as the inner
product of the corresponding user and movie feature vectors. More specifically,
let U = [ui ] be the user feature matrix, where ui ∈ Rnf , i = 1 . . . nu , denotes
the ith column of U , and let M = [mj ] be the movie feature matrix, where
Large-Scale Parallel Collaborative Filtering for the Netflix Prize 339
1 2
Lemp (R, U, M ) = L (rij , ui , mj ), (2)
n
(i,j)∈I
where I is the index set of the known ratings and n is the size of I.
We can formulate the low-rank approximation problem as follows.
where U and M are real, have nf rows, but are otherwise unconstrained.
In this problem, (Eq. (3)), there are (nu + nm ) × nf free parameters to be
determined. Our results show that allowing nf to be quite large, 1000 in our tests,
improves the quality of the results. Thus, for Netflix we have over 480, 000, 000
model parameters, more data than there are points in the training set I. For this
reason, problem 3 is underdetermined. Indeed, very few users will have rated nf
movies when nf is greater than a few hundred, yet we must assign each user a
point in an nf dimensional feature space.
Thus, when nf is relatively large, solving the problem Eq. (3) overfits the data.
To avoid overfitting, a common method appends a Tikhonov regularization [22]
term to the empirical risk function:
Lreg
λ (R, U, M ) = L
emp
(R, U, M ) + λ(U ΓU 2 + M ΓM 2 ), (4)
3 Our Approaches
As the rating matrix contains both signals and noise, it is important to remove
noise and use the recovered signal to predict missing ratings. Singular Value
Decomposition (SVD) is a natural approach that approximates the original user-
movie rating matrix R by the product of two rank-k matrices R̃ = U T × M . The
solution given by the SVD minimizes the Frobenious norm of R − R̃, which is
equivalent to minimizing the RMSE over all elements of R. However, as there
are many missing elements in the rating matrix R, standard SVD algorithms
cannot find U and M .
In this paper, we use alternating-least-squares (ALS) to solve the low-rank
matrix factorization problem as follows:
Step 1. Initialize matrix M by assigning the average rating for that movie as
the first row, and small random numbers for the remaining entries.
Step 2. Fix M , Solve for U by minimizing the objective function (4);
Step 3. Fix U , solve for M by minimizing the objective function similarly;
Step 4. Repeat Steps 2 and 3 until a stopping criterion is satisfied.
Observe that when the regularization matrices Γ(U,M) are nonsingular, each of
the problems of Steps 2 and 3 of the algorithm has a unique solution, which
we derive below. Note that the sequence of achieved errors Lreg λ (R, U, M ) is
monotone nonincreasing and bounded below, hence this sequence converges.
Rather than going all the way to convergence, we use a stopping criterion
based on the observed RMSE on the probe dataset. The probe dataset is provided
by Netflix, and it has the same distribution as the hidden test dataset. After one
round of updating both U and M , if the change in RMSE on the probe dataset
is less than 1 bps2 , the iteration stops and we use the obtained U, M to make
final predictions on the test dataset.
As we mention in Section 2, there are many free parameters. Without reg-
ularization, ALS might lead to overfitting. A common fix is to use Tikhonov
regularization, which penalizes large parameters. We tried various regulariza-
tion matrices, and eventually found the following weighted-λ-regularization to
work the best, as it never overfits the test data (empirically) when we increase
the number nf of features or the number of ALS iterations.
⎛ ⎞
f (U, M ) = (rij − uTi mj )2 + λ ⎝ nui ui 2 + nmj mj 2 ⎠ , (5)
(i,j)∈I i j
where nui and nmj denote the number of ratings of user i and movie j respec-
√
tively. This corresponds to Tikhonov regularization (4), where ΓU = diag( nui )
√
and ΓM = diag( nmj ). 3
2
1 bps equals 0.0001.
3
The same objective function was used previously by Salakhutdinov et al. [20] and
solved using gradient descent. We will discuss more on their approach in Section 5.2.
Large-Scale Parallel Collaborative Filtering for the Netflix Prize 341
Now we demonstrate how to find the matrix U when M is given. Let IiU denote
the set of indices of movies that user i rated, so that nui is the cardinality of
IiU ; similarly IjM denotes the set of indices of users who rated movie j, and nmj
is the cardinality of IjM . A given column of U , say ui , is determined by solving
a regularized linear least squares problem involving the known ratings of user i,
and the feature vectors mj of the movies j ∈ IiU that user i has rated.
1 ∂f
= 0, ∀i, k
2 ∂uki
⇒ (uTi mj − rij )mkj + λnui uki = 0, ∀i, k
j∈IiU
⇒ mkj mTj ui + λnui uki = mkj rij , ∀i, k
j∈IiU j∈IiU
⇒ MIiU MITU + λnui E ui = MIiU RT (i, IiU ), ∀i
i
⇒ ui = A−1
i Vi , ∀i
mj = A−1
j Vj , ∀j,
where Aj = UIiM UITM + λnmj E and Vj = UIiM R(IiM , j). UIiM denotes the sub-
i
matrix of U where columns i ∈ IiM are selected, and R(IiM , j) is the column
vector where rows i ∈ IiM of the j-th column of R is taken.
Let nr denote the total number of ratings, then we have nr nu nm for
a sparse rating matrix. We can easily derive the running time of the above
algorithm based on standard matrix operations:
Theorem 1. For ALS-WR, each step of updating U takes O n2f (nr + nf nu )
time while each step of updating M takes O n2f (nr + nf nm ) . If ALS-WR takes
totally nt rounds to stop, it runs in time O n2f (nr + nf nu + nf nm )nt .
4.1 Postprocessing
For postprocessing of the prediction results, we first apply a global bias correction
technique to the prediction solution. Given a prediction P , if the mean of P is
not equal to the mean of the test dataset, we can shift all predicted values by a
fixed constant τ = mean(test) − mean(P ), thus improving the RMSE. We also
use convex combinations of several predictors to obtain a better predictor. For
example, given two predictors P0 and P1 , we can obtain a family of predictors
Px = (1 − x)P0 + xP1 , x ∈ [0, 1], and use linear regression to find x∗ minimizing
RMSE(Px ). Therefore we obtain Px∗ which is at least as good as P0 or P1 .
λ=0.03
λ=0.04
0.965
λ=0.05
λ=0.06
0.96 λ=0.075
λ=0.065
0.955
RMSE
0.95
0.945
0.94
0.935
5 10 15 20 25 30 35 40 45 50
Number of Iterations
Fig. 1. Comparisons of different λ values for ALS-WR with nf = 8. The best performer
with 25 rounds is λ = 0.065. For this fixed λ, after 50 rounds, the RMSE score still
improves but only less than 0.1 bps for each iteration afterwards.
λ 0.03
0.96 λ 0.04
λ 0.05
0.955
0.95
RMSE
0.945
0.94
0.935
0.93
0.925
2 4 6 8 10 12 14 16 18 20
Number of hidden features (n )
f
λ values to get a good RMSE score. Figure 2 shows the performance of ALS-WR
with fixed λ value and varying number of hidden features (nf ranges from 2 to
20). For each experiment, ALS-WR iterations continue until the RMSE over the
probe dataset improves less than 1 bps. From the figure we can tell that the
RMSE monotonically decreases with larger nf , even though the improvement
diminishes gradually.
Next we conduct experiments with real submissions using large values of nf .
For ALS with simple λ regularization (Γu = Γm = E), we obtain a RMSE of
0.9184. For ALS with weighted-λ-regularization, we obtained a RMSE of 0.9114
with nf = 50, 0.9066 with nf = 150. With nf = 300 and global bias correc-
tion, we obtain a RMSE of 0.9017; with nf = 400 and global bias correction,
a score of 0.9006 was obtained; with nf = 500 and global bias shift, a score of
0.9000 was obtained. Ultimately, we experimented with nf = 1000 and obtained
Large-Scale Parallel Collaborative Filtering for the Netflix Prize 345
a RMSE score of 0.8985.6 Given that 6 bps improvement is obtained from 400 to
500 features, and assuming diminishing (equal-decrease) return with increasing
number of features, moving from 500 to 1000 features improves approximately
5 + 4 + 3 + 2 + 1 = 15 bps. Therefore, 0.8985 is likely the limit we can achieve
using ALS with Weighted-λ-Regularization. A RMSE score of 0.8985 translates
into a 5.56% improvement over Netflix’s CineMatch, and it represents one of the
top single-method performance according to our knowledge.
5 Related Work
For a partially specified matrix, the SVD is not applicable. To minimize the
sum of squared differences between the known elements and the corresponding
elements of the factored low rank matrix, ALS has proven to be an effective
approach. It provides non-orthogonal factors, unlike SVD. The SVD can be
computed one column at a time, whereas for the partially specified case, no such
recursive formulation holds. An advantage of ALS is its easy parallelization. Like
Lanczos for the sparse, fully specified case, ALS preserves the sparse structure
of the known matrix elements and is therefore storage-efficient.
6 Concluding Remarks
References
1. The Hadoop Project, http://lucene.apache.org/hadoop/
2. Netflix CineMatch, http://www.netflix.com
3. Balabanovi, M., Shoham, Y.: Fab: content-based, collaborative recommendation.
Communications of the ACM 40(3), 66–72 (1997)
4. Bell, R., Koren, Y., Volinsky, C.: The bellkor solution to the netflix prize. Netflix
Prize Progress Award (October 2007),
http://www.netflixprize.com/assets/ProgressPrize2007 KorBell.pdf
348 Y. Zhou et al.
5. Bell, R., Koren, Y., Volinsky, C.: Modeling relationships at multiple scales to im-
prove accuracy of large recommender systems. In: Proc. KDD 2007, pp. 95–104
(2007)
6. Chang, F., et al.: Bigtable: A distributed storage system for structured data. In:
Proc. of OSDI 2006, pp. 205–218 (2006)
7. Das, A., Datar, M., Garg, A., Rajaram, S.: Google news personalization: Scalable
online collaborative filtering. In: Proc. of WWW 2007, pp. 271–280 (2007)
8. Dean, J., Ghemawat, S.: Mapreduce: Simplified data processing on large clusters.
In: Proc. OSDI 2004, San Francisco, pp. 137–150 (2004)
9. Deerwester, S., Dumais, S.T., Furnas, G.W., Landauer, T.K., Harshman, R.: In-
dexing by latent semantic analysis. J. Amer. Soc. Info. Sci. 41(6), 391–407 (1999)
10. Ghemawat, S., Gobioff, H., Leung, S.-T.: The Google File System. In: Proc. of
SOSP 2003, pp. 29–43 (2003)
11. Hill, W., Stead, L., Rosenstein, M., Furnas, G.: Recommending and evaluating
choices in a virtual community of use. In: Proc. of CHI 1995, Denver (1995)
12. Krulwich, B., Burkey, C.: Learning user information interests through extraction
of semantically significant phrases. In: Proc. AAAI Spring Symposium on Machine
Learning in Information Access, Stanford, CA (March 1996)
13. Kurucz, M., Benczur, A.A., Csalogany, K.: Methods for large scale SVD with miss-
ing values. In: Proc. KDD Cup and Workshop (2007)
14. Lang, K.: NewsWeeder: Learning to filter Netnews. In: Proc. ICML 1995, pp. 331–
339 (1995)
15. Lim, Y.J., Teh, Y.W.: Variational bayesian approach to movie rating prediction.
In: Proc. KDD Cup and Workshop (2007)
16. Linden, G., Smith, B., York, J.: Amazon.com recommendations: Item-to-item col-
laborative filtering. IEEE Internet Computing 7, 76–80 (2003)
17. Paterek, A.: Improving regularized singular value decomposition for collaborative
filtering. In: Proc. KDD Cup and Workshop (2007)
18. Popescul, A., Ungar, L., Pennock, D., Lawrence, S.: Probabilistic models for unified
collaborative and content-based recommendation in Sparse-Data Environments. In:
Proc. UAI, pp. 437–44 (2001)
19. Resnick, P., Iacovou, N., Suchak, M., Bergstrom, P., Riedl, J.: GroupLens: an open
architecture for collaborative filtering of Netnews. In: Proc. the ACM Conference
on Computer-Supported Cooperative Work, Chapel Hill, NC (1994)
20. Salakhutdinov, R., Mnih, A., Hinton, G.E.: Restricted boltzmann machines for
collaborative filtering. In: Proc. ICML, pp. 791–798 (2007)
21. Takacs, G., Pilaszy, I., Nemeth, B., Tikk, D.: On the gravity recommendation
system. In: Proc. KDD Cup and Workshop (2007)
22. Tikhonov, A.N., Arsenin, V.Y.: Solutions of Ill-posed Problems. John Wiley, New
York (1977)
23. Wu, M.: Collaborative filtering via ensembles of matrix factorizations. In: Proc.
KDD Cup and Workshop (2007)
Author Index