Lecture Notes in Computer Science Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
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 TU Dortmund University, Germany Madhu Sudan Microsoft Research, Cambridge, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max Planck Institute for Informatics, Saarbruecken, Germany
6681
Mikhail Atallah Xiang-Yang Li Binhai Zhu (Eds.)
Frontiers in Algorithmics and Algorithmic Aspects in Information and Management Joint International Conference, FAW-AAIM 2011 Jinhua, China, May 28-31, 2011 Proceedings
13
Volume Editors Mikhail Atallah Purdue University, Department of Computer Science West Lafayette, IN 47907, USA E-mail:
[email protected] Xiang-Yang Li Illinois Institute of Technology, Department of Computer Science Chicago, IL 60616, USA E-mail:
[email protected] Binhai Zhu Montana State University, Department of Computer Science Bozeman, MT 59717, USA E-mail:
[email protected]
ISSN 0302-9743 e-ISSN 1611-3349 ISBN 978-3-642-21203-1 e-ISBN 978-3-642-21204-8 DOI 10.1007/978-3-642-21204-8 Springer Heidelberg Dordrecht London New York Library of Congress Control Number: Applied for CR Subject Classification (1998): F.2, G.2, F.1, J.1, I.2 LNCS Sublibrary: SL 1 – Theoretical Computer Science and General Issues
© Springer-Verlag Berlin Heidelberg 2011 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. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com)
Preface
The papers in this volume were presented at the 5th International Frontiers in Algorithmics Workshop and the 7th International Conference on Algorithmic Aspects in Information and Management (FAW-AAIM 2011), jointly held during May 28-31, 2011, in Jinhua, China. The topics cover most areas in algorithms, combinatorial optimization and applications. Submissions to the conference this year were conducted electronically. A total of 92 papers were submitted, of which 35 were accepted. The papers were evaluated by two International Program Committees overseen by the Program Committee Co-chairs: Mikhail Atallah, Xiang-Yang Li, Binhai Zhu and Xuding Zhu. It is expected that most of the accepted papers will appear in a more complete form in scientific journals. The submitted papers were from 19 countries/regions: Canada, China, Denmark, France, Germany, Greece, Hong Kong, Hungary, India, Iran, Israel, Japan, Korea, Poland, Singapore, Slovakia, Taiwan, UK and USA. Each paper was evaluated by at least three Program Committee members (and in some case by five Program Committee members), assisted in some cases by sub-reviewers. In addition to the selected papers, the conference also included four invited presentations by Jin-Yi Cai, Michael Fellows, Elias Koutsoupias and Jack Snoeyink. We thank all the people who made this meeting possible: the authors for submitting papers, the Program Committee members and external reviewers (listed in the proceedings) for their excellent work, and the four invited speakers. Finally, we thank Zhejiang Normal University and SIAM for the support and the local organizers and colleagues for their assistance. May 2011
Mikhail Atallah Xiang-Yang Li Binhai Zhu
Organization
General Chairs John Hopcroft Franco Preparata Jianming Zhao
Cornell University, USA Brown University, USA Zhejiang Normal University, China
Program Committee Co-chairs Mikhail Atallah Xiang-Yang Li Binhai Zhu Xuding Zhu
Purdue University, USA Illinois Institute Technology, USA Montana State University, USA Zhejiang Normal University, China
FAW 2011 Program Committee Members Heep-Kap Ahn Lars Arge Tetsuo Asano Gill Barequet Danny Chen Alon Efrat Xin Han Haitao Jiang Minghui Jiang Samir Khuller Michael Langston Hao Li Minming Li Guohui Lin Stefano Lonardi Pinyan Lu Jun Luo Andrew McGregor Petra Mutzel Detlef Seese Michiel Smid
Pohang University of Science and Technology, Korea University of Aarhus, Denmark JAIST, Japan Technion, Israel University of Notre Dame, USA University of Arizona, USA Dalian University of Technology, China Shandong University, China Utah State University, USA University of Maryland, USA University of Tennessee, USA LRI, CNRS and Universit´e Paris-Sud 11, France City University of Hong Kong, Hong Kong University of Alberta, Canada University of California at Riverside, USA Microsoft Research Asia, China Shenzhen Institute of Advanced Technology, China University of Massachusetts, USA University of Dortmund, Germany KIT, Germany Carleton University, Canada
VIII
Organization
Xuehou Tan Shin-ichi Tanigawa Jianping Yin Binhai Zhu (Track Chair)
Tokai University, Japan Kyoto University, Japan National University of Defense Technology, China Montana State University, USA
AAIM 2011 Program Committee Members Gruia Calinescu Illinois Institute of Technology, USA Wei Chen Microsoft Research Asia, China Xi Chen Columbia University, USA Francis Chin University of Hong Kong, Hong Kong Marek Chrobak University of California at Riverside, USA Bhaskar DasGupta University of Illinois at Chicago, USA Xiaotie Deng University of Liverpool, UK Rudolf Fleischer Fudan University, China Jie Gao University of Stony Brook, USA Mordecai Golin HKUST, Hong Kong Ming-Yang Kao Northwestern University, USA Sanjiv Kapoor Illinois Institute of Technology, USA Erran Li Bell Labs, USA Fei Li George Mason University, USA Xiang-Yang Li (Track Chair) Illinois Institute Technology, USA Chung Keung Poon City University of Hong Kong, Hong Kong Jie Wang University of Massachusetts-Lowell, USA Yajun Wang Microsoft Research Asia, China Xiaodong Wu University of Iowa, USA Jinhui Xu State University of New York at Buffalo, USA Yinfeng Xu Xi’an Jiaotong University, China Yinyu Ye Stanford University, USA Ke Yi HKUST, Hong Kong Huaming Zhang University of Alabama at Huntsville, USA Xianchao Zhang Dalian University of Technology, China
Organizing Committee Xin Guan Chenghua Lin Zhangxing Wu (Chair) Xiangfu Zhao
ZJNU, ZJNU, ZJNU, ZJNU,
China China China China
Organization
Referees Mohammad Abam Saeed Alaei Hajo Broersma Laurent Bulteau Zhiping Cai Xue Chen Hu Ding Zheng Fang Matt Gibson Dongfeng Han Rafi Hassin Yoon-Ho Hwang Lucian Ilie Sungjin Im Sang-Sub Kim Irina Kostitsyna
Henry C.M. Leung Jian Li Yong Li Weifa Liang Yunlong Liu Qiang Liu Sanaz Mostaghim Chung Wah Ngo Sudhir Naswa Dong-Woo Park Liuying Peng Charles Phillips Manolis Pountourakis Youming Qiao Sadish Sadasivam Wanbin Son
Branislav Stojkovic Haitao Wang Kai Wang Lixin Wang Shiguang Wang Weiwei Wu Yongan Wu Lei Xu Ping Xu Xiaohua Xu Jie Yang Yubin Zhan Jialin Zhang Yongding Zhu Bingbing Zhuang
IX
Table of Contents
Invited Lectures Progress in Complexity of Counting Problems . . . . . . . . . . . . . . . . . . . . . . . Jin-Yi Cai
1
Recent Developments in the Theory of Pre-processing . . . . . . . . . . . . . . . . Michael R. Fellows
4
Recent Developments in the Mechanism Design Problem for Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Elias Koutsoupias Degree-Driven Design for Correct Geometric Algorithms . . . . . . . . . . . . . . Jack Snoeyink
6 8
Contributed Papers Approximation Algorithm for the Uniform Bounded Facility Problem . . . Kerui Weng
10
The k-Canadian Travelers Problem with Communication . . . . . . . . . . . . . . Huili Zhang and Yinfeng Xu
17
An Improved Competitive Algorithm for One-Dimensional Incremental Median Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wenqiang Dai and Yi Feng
29
Approximation Scheme for Scheduling Resumable Proportionally Deteriorating Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wenchang Luo and Lin Chen
36
An Improved Approximation Algorithm for the Complementary Maximal Strip Recovery Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zhong Li, Randy Goebel, Lusheng Wang, and Guohui Lin
46
Greedy Routing via Embedding Graphs onto Semi-metric Spaces . . . . . . . Huaming Zhang and Swetha Govindaiah
58
On Variants of the Spanning Star Forest Problem . . . . . . . . . . . . . . . . . . . . Jing He and Hongyu Liang
70
An Implicit Degree Condition for Cyclability in Graphs . . . . . . . . . . . . . . . Hao Li, Wantao Ning, and Junqing Cai
82
XII
Table of Contents
Parallel Enumeration of Lattice Animals . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gadi Aleksandrowicz and Gill Barequet Parameterized Edge Dominating Set in Cubic Graphs (Extended Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mingyu Xiao and Hiroshi Nagamochi On Some Geometric Problems of Color-Spanning Sets . . . . . . . . . . . . . . . . Chenglin Fan, Wenqi Ju, Jun Luo, and Binhai Zhu Approximation Algorithms for Cutting a Convex Polyhedron Out of a Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xuehou Tan and Gangshan Wu
90
100
113
125
An Algorithm for Optimal Acyclic Edge-Colouring of Cubic Graphs . . . . Edita M´ aˇcajov´ a and J´ an Maz´ ak
136
Complexity of Total {k}-Domination and Related Problems . . . . . . . . . . . Jing He and Hongyu Liang
147
The Min-Power Multicast Problems in Wireless Ad Hoc Networks: A Parameterized View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Weizhong Luo, Jianxin Wang, Qilong Feng, and Jiong Guo
156
Constant Sum Flows in Regular Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tao-Ming Wang and Shi-Wei Hu
168
2D Knapsack: Packing Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Min Chen, Gy¨ orgy D´ osa, Xin Han, Chenyang Zhou, and Attila Benko
176
Tight Approximation Bounds for Greedy Frugal Coverage Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ioannis Caragiannis, Christos Kaklamanis, and Maria Kyropoulou Algorithms for Interval Structures with Applications . . . . . . . . . . . . . . . . . Danny Z. Chen and Ewa Misiolek Single Machine Scheduling with an Operator Non-availability Period to Minimize Total Completion Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yong Chen, An Zhang, and Zhiyi Tan PSAEC: An Improved Algorithm for Short Read Error Correction Using Partial Suffix Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zhiheng Zhao, Jianping Yin, Yubin Zhan, Wei Xiong, Yong Li, and Fayao Liu Two Hardness Results on Feedback Vertex Sets . . . . . . . . . . . . . . . . . . . . . . Wei Jiang, Tian Liu, Tienan Ren, and Ke Xu
185
196
208
220
233
Table of Contents
Approximation Algorithms for Unrelated Machine Scheduling with an Energy Budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lin Chen, Wenchang Luo, and Guochuan Zhang
XIII
244
Plane-Filling Properties of Directed Figures . . . . . . . . . . . . . . . . . . . . . . . . . Wlodzimierz Moczurad
255
An Iterative Method for Generating Loop Invariants . . . . . . . . . . . . . . . . . . Shikun Chen, Zhoujun Li, Xiaoyu Song, and Mengjun Li
264
Algorithms for Computing Bidirectional Best Hit r-Window Gene Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trong Dao Le, Melvin Zhang, and Hon Wai Leong
275
Contracted Webgraphs: Structure Mining and Scale-Freeness . . . . . . . . . . Yushi Uno and Fumiya Oguri
287
Hardness of Finding Two Edge-Disjoint Min-Min Paths in Digraphs . . . . Longkun Guo and Hong Shen
300
Online Algorithm for 1-Space Bounded Multi-dimensional Bin Packing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yong Zhang, Francis Y.L. Chin, Hing-Fung Ting, Xin Han, and Zhuo Chang
308
Online Algorithms for Maximizing Weighted Throughput of Unit Jobs with Temperature Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Martin Birks, Daniel Cole, Stanley P.Y. Fung, and Huichao Xue
319
Temperature Aware Online Algorithms for Scheduling Equal Length Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Martin Birks and Stanley P.Y. Fung
330
Visibility Testing and Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sharareh Alipour and Alireza Zarei The Nearest Neighbor Spearman Footrule Distance for Bucket, Interval, and Partial Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Franz J. Brandenburg, Andreas Gleißner, and Andreas Hofmeier
343
352
Minimum Width Rectangular Annulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Joydeep Mukherjee, Priya Ranjan Sinha Mahapatra, Arindam Karmakar, and Sandip Das
364
An Experimental Study on Generating Planar Graphs . . . . . . . . . . . . . . . . Sascha Meinert and Dorothea Wagner
375
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
389
Progress in Complexity of Counting Problems Jin-Yi Cai University of Wisconsin-Madison
[email protected]
Abstract. There has been remarkable progress in the classification program of the complexity of counting problems. This program is carried out in at least three interrelated formulations: Graph Homomorphisms, Counting CSP, and Holant Problems. In each formulation, complexity dichotomy theorems have been achieved which classify every problem in a given class to be either solvable in polynomial time or #P-hard.
The primary goal of complexity theory is to classify computational problems according to their inherent computational complexity. The success of this theory is judged by how complete a classification one can obtain. Unfortunately we cannot yet separate complexity classes such as P vs. NP. Instead, classification is in terms of completeness, which has the implication that, e.g., assuming P = NP, then every NP-complete problem is not solvable in polynomial time. For counting problems the corresponding notion is #P-completeness or more generally #P-hardness. Assuming #P is separate from P, an assumption stronger than P = NP, every #P-hard function cannot be computed in polynomial time. As an overly ambitious goal, one might wish to classify every function in #P to be either computable in polynomial time or #P-hard. Such a result is called a complexity dichotomy theorem [10]. However for the whole #P this is known to be false, assuming #P is separate from P. Therefore, for counting problems, assuming #P is separate from P, one aims to achieve such a complete classification for as broad a class of problems as possible. Recently there has been remarkable progress on this classification program. Progress has been made in at least three frameworks: Graph Homomorphisms, Counting CSP, and Holant problems. In each case substantial complexity dichotomy theorems have been achieved. Graph homomorphism is defined as follows [9,8]. Given a k × k matrix A, the graph homomorphism function, a.k.a. partition function, ZA (G) is defined as Aξ(u),ξ(v) , ZA (G) = ξ:V →[k] (u,v)∈E
where G = (V, E) is any input graph. If A is symmetric and G is an undirected graph, then this is graph homomorphism for undirected graphs, which has been studied more intensively with a longer history. The function ZA (G) can encode many interesting graph E.g. counting vertex covers corresponds to properties. 01 (the matrix form of the binary Or function), and the 2 by 2 matrix 11 M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 1–3, 2011. c Springer-Verlag Berlin Heidelberg 2011
2
J.-Y. Cai
counting k-colorings corresponds to the k by k matrix with 0’s on the diagonal and 1’s off diagonal (the binary DisEquality function on domain size k). For undirected graph homomorphism, a complete dichotomy theorem has been achieved, where the matrix A can be an arbitrary complex-valued symmetric matrix [3]. For directed graph homomorphism, the strongest result is for all A with non-negative entries [2]. The difficult case when the matrix A can take negative or complex values, and therefore there is cancellation in the partition function, remains open for undirected graph homomorphism. For unweighted counting CSP, denoted as #CSP, the problem is defined as follows: Let D be an arbitrary fixed finite domain and let Γ be an arbitrary fixed finite set of constraint relations {R1 , . . . , Rk } over D, where each Ri has some arity ri . An instance of #CSP(Γ ) consists of two parts. The first part is a finite set of variables X = {x1 , . . . , xn } each taking values in D. The second part is a finite sequence of relations in Γ , each applied to a subset of X. These are the constraints to be satisfied for this instance. Let R be the n-ary relation over D defined to be the Boolean conjunction of these constraints. The (unweighted) #CSP(Γ ) problem asks for the cardinality of R, namely the number of assignments satisfying all the constraints in the input instance. More generally, in a non-negatively weighted #CSP, Γ is replaced by a fixed finite set of constraint functions F = {f1 , . . . , fk }, where each fi maps D ri to non-negative reals R+ . An instance of #CSP(F ) consists of variables X, ranging over D, and a sequence of constraint functions from F , each applied to a subset of X. It defines an n-ary function F : For any (x1 , . . . , xn ) ∈ D n , F (x1 , . . . , xn ) is the product of the constraint function evaluations. The output of #CSP(F ) is the sum of F over all assignments, known as the partition function for #CSP(F ). Clearly unweighted #CSP is the special case where each constraint function fi is 0-1 valued. #CSP can encompass an enormous varieties of counting problems which can be expressed by choosing a particular D, and a particular Γ or F . Graph Homomorphism corresponds to the special case of #CSP with a single binary function expressed as the matrix A. In 2008, Bulatov [1] gave a dichotomy theorem for all (unweighted) #CSP(Γ ). The theorem states that for every D and Γ , #CSP(Γ ) is either computable in polynomial time or #P-complete. This proof uses deep structural theorems from Universal Algebra. Dyer and Richerby [7] gave an alternative proof of Bulatov’s dichotomy theorem for unweighted #CSP. They also showed that the decision problem, given D and Γ whether #CSP(Γ ) satisfies the criterion for being #P-complete, is decidable in NP. This theorem has been extended to all non-negatively weighted #CSP(F ) [2]. Again, the difficult case when the constraint functions can take negative or complex values, and therefore there is cancellation in the partition function, remains open. The Holant framework is as follows. D is a finite set called a domain, and F is a finite set of functions over D. A signature grid Ω = (G, F , π) consists of a labeled graph G = (V, E) where π labels each vertex v ∈ V with a function fv ∈ F. We consider all edge assignments ξ : E → D; fv takes inputs from its
Progress in Complexity of Counting Problems
3
incident edges E(v) at v and outputs values in C. The counting problem on the instance Ω is to compute fv (ξ |E(v) ). HolantΩ = ξ:E→D v∈V
For example, if we take D = {0, 1} and attach the Exact-One function at every vertex v ∈ V , then Holant(Ω) computes exactly the number of perfect matchings of G. #CSP is the special case of Holant problems where Equality functions of all arities are assumed to be present in F . In fact each #CSP instance can be realized as a signature grid on a bipartite graph where each vertex on the LHS is labeled by a variable xi attached with an Equality function and each vertex on the RHS is labeled by a constraint function of the #CSP instance. For Holant problems there is a strong interaction with holographic algorithms [11,4], and the issue of cancellation is of the foremost concern. Some dichotomy theorems have been achieved in this framework, mostly on domain size 2 (Boolean domain) [5,6]. The primary challenge is to deal with domain size greater than 2.
References 1. Bulatov, A.A.: The complexity of the counting constraint satisfaction problem. In: Proceedings of the 35th International Colloquium on Automata, Languages and Programming, pp. 646–661 (2008) 2. Cai, J.-Y., Chen, X.: A decidable dichotomy theorem on directed graph homomorphisms with non-negative weights. In: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science, pp. 437–446 (2010) 3. Cai, J.-Y., Chen, X., Lu, P.: Graph homomorphisms with complex values: A dichotomy theorem. In: Proceedings of the 37th International Colloquium on Automata, Languages and Programming (2010), Full version in http://arxiv.org/abs/0903.4728 4. Cai, J.-Y., Lu, P.: Holographic algorithms: from art to science. In: STOC 2007: Proceedings of the Thirty-Ninth Annual ACM Symposium on Theory of Computing, pp. 401–410. ACM, New York (2007) 5. Cai, J.-Y., Lu, P., Xia, M.: Holant problems and counting CSP. In: Proceedings of the 41st Annual ACM Symposium on Theory of Computing, pp. 715–724 (2009) 6. Cai, J.-Y., Lu, P., Xia, M.: Holographic algorithms with matchgates capture precisely tractable planar #CSP. In: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science, pp. 427–436 (2010) 7. Dyer, M.E., Richerby, D.M.: On the complexity of #CSP. In: Proceedings of the 42nd ACM Symposium on Theory of Computing, pp. 725–734 (2010) 8. Hell, P., Neˇsetˇril, J.: Graphs and Homomorphisms. Oxford University Press, Oxford (2004) 9. Lov´ asz, L.: Operations with structures. Acta Mathematica Hungarica 18, 321–328 (1967) 10. Schaefer, T.J.: The complexity of satisfiability problems. In: Proceedings of the 10th Annual ACM Symposium on Theory of Computing, pp. 216–226 (1978) 11. Valiant, L.G.: Holographic algorithms. SIAM J. Comput. 37(5), 1565–1594 (2008)
Recent Developments in the Theory of Pre-processing Michael R. Fellows Parameterized Complexity Research Unit, Charles Darwin University, Darwin, Northern Territory, Australia
[email protected]
Abstract. Although pre-processing is a practical computing strategy almost universally employed for real-world attacks on NP-hard problems, it is perhaps surprising that for more than thirty years there has been no mathematically-disciplined theory of the subject. The parameterized / multivariate view of computational complexity makes such a theory possible, and this turns out to be deeply productive and useful. In the theory of parameterized complexity and algorithmics, the subject is termed kernelization. We survey the origins, recent developments and applications of the theory of polynomial-time kernelization.
1
Summary
It is surprising that a computational strategy — pre-processing — that is so important in practical computing, has for so long acked an effective mathematical theory. The subject was relegated to heuristics, and remarkably effective heuristic pre-processing strategies were discovered for some NP-hard problems. On the side of computational theory, the main ideas until recently, were focused on a one-dimensional outlook, the single dimension being the overall input size n, the number of bits of a reasonable encoding of the input, and the central central notion of polynomial time. From an engineering point of view, the main distinction has been between algorithms that run in time polynomial in n (such as we have for Sorting, Inverting Matrices, Testing Primality, Network Flow, Maximum Matching, Shortest Paths, Minimum Weight Spanning Trees, and for various problems depending on these few polynomial-time workhorses) and problems that in the worst-case require time O(2p(n) ) where the exponent p(n) is usually a polynomial function of n, such as for all of the problems in the one-dimensional decision problem class NP. The difficulty for the one-dimensional theory of “P versus NP”, in regards the potential for a theory of polynomial-time preprocessing, is that if you had any polynomial-time algorithm guaranteed to shrink the input of an NP-hard problem, then by repeatedly applying it, you would have a proof that P=NP. Consequently, there has been no mathematically-powered theory of pre-processing for the last four decades of computer science theory. It is a lesson in the importance of intellectual frameworks that empower the asking of the right questions. M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 4–5, 2011. c Springer-Verlag Berlin Heidelberg 2011
Recent Developments in the Theory of Pre-processing
5
As the multivariate view of computational complexity has gradually come into focus, beginning with the two-dimensional framework of parameterized complexity, there has emerged a beautiful and useful and deep mathematical theory of pre-processing. The following concrete results may entice and illustrate. (1) If you are interested in deciding whether a graph G (on n vertices) has a vertex cover of size at most k, in other words, the bivariate input is (G, k), then there is a polynomial-time pre-processing (kernelization) algorithm that can efficiently solve the “easy parts”, and return to you a (G , k ) where: • G has a size k vertex cover if and only if G has a size k vertex cover • k ≤ k • G has at most 2k vertices (2) Similarly (after several rounds of improvements), if you are interested in deciding whether there is, in an undirected graph G, a set of at most k vertices that are a Feedback Vertex Set, that is to say, every cycle in the graph must contain one of these vertices, then there is a P-time kernelization algorithm that returns a pair (G , k ) where: • G has a size k feedback vertex set if and only if G has a size k feedback vertex set • k ≤ k • G has at most k 2 vertices (3) For the problem of Connected Vertex Cover of size k, it is now known that there is no polynomial-time kernelization to a graph G on a polynomial-in-k number of vertices (compare (1) and (2) above) unless the Polynomial Hierarchy collapses to the third level. Polynomial-time pre-processing has always been useful for hard problems. Theory seems to be catching up to the issue, and is now providing both highpowered routines for instance condensation and data-reduction, going far beyond the established heuristic approaches, as well as illuminating intrinsic lower bounds for such algorithm design efforts, as in (3) above. This adds up to a substantial reconfigurization of the relationship of theory and practice in Computer Science.
Recent Developments in the Mechanism Design Problem for Scheduling Elias Koutsoupias University of Athens
[email protected]
Scheduling unrelated machines is a classical optimization problem in which we want to minimize the makespan of executing m tasks on n machines when machine i can execute task j in time tij . Nisan and Ronen [6] posed the following problem: if the machines are selfish, how well can an incentive compatible mechanism approximate the minimum makespan? This is an important multiparameter problem in mechanism design and this question has been one of primary motivating problems in algorithmic game theory. There has been little progress in resolving this question. The best known upper bound for the approximation ratio of truthful deterministic mechanisms is given in the original paper by Nisan and Ronen: the mechanism has approximation ratio n and it allocates each task independently using the classical VCG (secondprice) auction. There is a wide gap between this upper bound and the best known deterministic lower bound of 2.61. For randomized algorithms which are truthful in expectation the situation is similar: the best known upper bound is (n + 1)/2 [3,4] and the best known lower bound is 2. On the other hand, there are more successes for specific cases. For example, for anonymous truthful mechanisms, Ashlagi, Dobzinski and Lavi [1] showed that they cannot do better than the VCG allocation (which gives an n-approximation to the makespan). On the positive side, Lavi and Swamy [5] give a truthful deterministic mechanism with an O(1) approximation for the special case when all jobs take one of two values. Furthermore, a truthful in expectation O(1) approximation is possible when all jobs on a specific machine take one of two values. Extending these results to more than two values has also proven very elusive. We will give an overview of these attempts and we will describe recent developments on this problem. We will discuss a mechanism which, with high probability, will guarantee a (1 + )-approximation for makespan minimization, if the job sizes are bounded from above and from below. Our mechanism is an “implementation in undominated strategies”: although the agents may have various strategic considerations, as long as they are rational and do not use strategies that are strictly dominated by other strategies, the result holds. Moreover, our result holds, not only for makespan minimization, but for a large class of other problems including many combinatorial auction settings. At the heart of our technique is a “real life application” (in undominated strategies) of bribing a prison guard to avoid being sent to the mines. (This is joint work with Amos Fiat and Angelina Vidali.) M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 6–7, 2011. c Springer-Verlag Berlin Heidelberg 2011
Recent Developments in the Mechanism Design Problem for Scheduling
7
We will also discuss the design of coercive algorithms: allocation algorithms that are announced to the players (machines) which in turn play a game trying to minimize their execution time. We seek truthful or non-truthful coercive algorithms without payments that have small price of anarchy or price of stability.
References 1. Ashlagi, I., Dobzinski, S., Lavi, R.: An optimal lower bound for anonymous scheduling mechanisms. In: Proceedings of the Tenth ACM Conference on Electronic Commerce, pp. 169–176 (2009) 2. Christodoulou, G., Koutsoupias, E., Kov´ acs, A.: Mechanism design for fractional scheduling on unrelated machines. ACM Transactions on Algorithms 6(2) (2010) 3. Christodoulou, G., Koutsoupias, E., Vidali, A.: A Lower Bound for Scheduling Mechanisms. Algorithmica 55(4), 729–740 (2009) 4. Koutsoupias, E., Vidali, A.: A lower bound of 1+φ for truthful scheduling mechanisms. In: Mathematical Foundations of Computer Science (MFCS), Krumlov, Czech Republic, August 26-31, pp. 454–464 (2007) 5. Lavi, R., Swamy, C.: Truthful mechanism design for multi-dimensional scheduling via cycle monotonicity. In: ACM Conference on Electronic Commerce, EC (2007) 6. Nisan, N., Ronen, A.: Algorithmic mechanism design (extended abstract). In: Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing (STOC), pp. 129–140 (1999)
Degree-Driven Design for Correct Geometric Algorithms Jack Snoeyink Department of Computer Science, University of North Carolina, Chapel Hill, NC 27599–3175, USA
[email protected] Abstract. This talk surveys results from applying an idea of Liotta, Preparata and Tamassia: that a designer of geometric algorithms could consider the arithmetic precision necessary to guarantee a correct implementation as a resource whose use is to be minimized, much as we do with running time and memory space. As is often the case, constraints can inspire creativity in design of new algorithms for classic problems; examples include point location, segment intersection, and Voronoi diagram construction. Keywords: computational geometry, geometric predicates.
Why do we analyze the running time and memory space of algorithms in theoretical computer science? We obtain many benefits from doing so: measuring these resources gives us a way to measure the quality of a solution and to recognize and appreciate new ideas; analyzing algorithms promotes understanding of both the solutions and the problems, making it more likely that our solutions are not only efficient, but also correct; limiting resources inspires creativity, and has provided a fertile ground for the study and development of mathematical ideas. But the original motivation comes from the fact that we develop algorithms for abstract models of computation that are unrealistic by allowing infinite time or memory, so we need to restrict these resources to make our algorithms implementable on real hardware. Geometric algorithms are typically built on several levels of abstraction. Algorithm invariants are often geometric and/or topological relationships (e.g., is a point in a polygon). These may be determined by evaluating geometric predicates (e.g., is a point above or below a line) or performing constructions (computing the intersection point of two line segments) in Euclidean or some other geometry. These, in turn, are determined by numerical computation on coordinate values. Error can creep into geometric algorithms at all levels. The highest levels are the realm of the algorithms designer – ensuring that the invariants are maintained as events are processed, that sufficient structural information is stored in the data structures, and that the proofs of correctness are sound. Thus, most descriptions in papers and textbooks occurs at the predicate level and above. It is common to assume the realRAM model of computation to avoid precision issues, and to assume general position for the input to avoid tedious discussion of special case handling. M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 8–9, 2011. c Springer-Verlag Berlin Heidelberg 2011
Degree-Driven Design for Geometric Algorithms
9
a = (0, 4) When an algorithm is implemented, however, the base levels can intrude. Geometric predicates typically depend on the sign of a result, and errors introduced by finite precision arithmetic in the b = (0, 3) 1 8 q = (3, 3) computer can easily change the sign of values at or near zero, and invalidate the properties that we expect from geometry. The figure d = (1, 2) at right shows a simple example in which the intersection of segments ac and bd, calculated as IEEE 754 doubles, lies on ac, but not on bd. Thanks to a quirk of the order of rounding, when I mirror the configuration about x = y then the intersection doesn’t lie c = (1, 0) on either segment! If we used rational arithmetic or homogeneous coordinates, then the computation is exact. A typical implementer, however, will change all comparisons against zero to some arbitrarily chosen ε, such as 10−8 , which really just hides the first errors encountered, creating new errors elsewhere that are hard to debug. In my experience with large data sets, e.g. triangulating billions of LIDAR points, though the chance of an individual error may be very small, they occur, and the more clever or efficient the algorithm, the more damaging a predicate error can be, as the results of many predicates are inferred from the few that are evaluated. The abstraction of predicates and constructions has been very important to the field of computational geometry: It has separated the tasks of establishing geometric/topological correctness and numerical correctness, allowing researchers in the field to greatly improve on the former for published papers and textbooks. (E.g., Before 1988, every published 2d convex hull algorithm has some input on which it fails to compute the desired output.) It has also allowed researchers to clearly enunciate possible demands on the latter, including Yap’s Exact Geometric Computation paradigm,which demands that the execution path of an implementation of an algorithm on given hardware should be the same as the execution path on an ideal machine with infinite precision, and to develop arbitrary precision arithmetic, lazy expression evaluation with fast filters, and bounds on arithmetic error, and package these approaches insophisticated libraries, such as CGAL and LEDA. But what about improving our textbook implementations for the non-sophisticated student or application programmer? Liotta, Preparata, and Tamassiasuggested to consider arithmetic precision as a resource whose use is to be optimized in the design of algorithms and data structures, much like memory space and running time. This resource can be measured, up to constants, by the degree of polynomials in predicates and constructions. This approach follows Yap’s Exact Geometric Computation paradigm by a simple form of static analysis– pre-calculating the degrees of predicates and guaranteeing correct evaluation, as long as the assumptions of input precision are satisfied. In this talk I give examples where restricting designers to low degree predicates forced creative new solutions to classical problems – solutions that are only a little more complex than the standard ones, yet can be correctly implemented on native machine arithmetic with no need for multi-precision arithmetic packages, floating point filters, or sophisticated libraries.
Approximation Algorithm for the Uniform Bounded Facility Problem Kerui Weng School of Economy and Management, China University of Geosciences Wuhan 430070, P.R. China
[email protected]
Abstract. The uniform bounded facility location problem (UBFLP) seeks to the optimal way of locating facilities to minimize total costs (opening costs plus routing costs), while the maximal routing costs of all clients are at most a given bound d. After building a mixed 0-1 integer programming model for UBFLP, the paper gives lnn+1-approximation algorithm for UBFLP on general graph. Then, we present the first constant-factor approximation algorithm with an approximation guarantee of 6.853 + for UBFLP on plane, which is composed of the algorithm by Dai and Yu [1] and the schema of Xu and Xu [2].
1
Introduction
Facility location problem asks for the optimal decision on number and location of facilities needed to provide some services to a set of clients. A lot of location problems have to consider both the total costs and the maximal routing costs. For example, the carriers have to locate the freight depots carefully to obtain a minimal transportation cost, while all services distance should be small enough to fulfil the promised delivery time. Similarly, when locating the ambulances and firehouses, the governments desire minimizing the average responses time for emergencies from all residents of cities, while the maximal arrival time for remote districts of cities should be smaller than their promised time. This kind of location decisions also arise in network design when exits or entrances location must be considered. For instance, in the case of designing the mouth of underground tunnel network of mines, the planner aims at optimal routing costs between working places and entrances, while the maximal distance should be short enough to escape when emergency happened. All above cases object at lowest total routing costs as well as opening costs of facilities, and the largest routing costs should be satisfied with certain restrictions. We classify these location decisions as bounded facility location problem. The formal definition of this problem is: Given an undirected graph G(N, A), we want to find a subset F ⊆ N such that each vertex j in V is assigned to the closest facility in F with connect costs no more than a given number dj and the total opening costs plus routing costs are minimized. If the bounded numbers dj for all j in N are uniform, our problem will become uniform bounded facility location problem (UBFLP). M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 10–16, 2011. c Springer-Verlag Berlin Heidelberg 2011
Approximation Algorithm for Uniform Bounded Facility Problem
11
In classical location problems, the uncapacitated facility location and the weighted set covering problem consider the service costs and the bounds respectively. The uncapacitated facility location problem is to find the optimal facilities such that the total traffic costs plus total building costs are minimized, which attracts a good many researches interest on its models, algorithms as well as extended problems. Shmoys et al. [4] present the first constant approximation algorithm for metric uncapacitated facility location in 1997, which is based on linear program rounding algorithm. Then, several techniques were subsequently found to improve the constant approximation ratio, including the LP-rounding [5] and [6], the primal-dual schema [7], and the scaling & greedy augmentation [8]. Mahdian et al. [9] developed a 1.52-approximation algorithm. Recently, 1.50approximation algorithm was found by Byrka [10], which is the best performance ratios untill now and still does not yet arrive the lower bound of 1.46 [11]. An interesting variant of facility location problem is facility location with penalties (FLWP). The FLWP allows each client is either assigned to an opened facility or rejected by paying a penalty and aims at minimal total costs including opening costs, routing cost as well as penalty costs. Charikar et al gave the first constant approximation algorithm to FLWP with 3 ratios [3]. Then it was improved to 2 by Jain et al [7]. Recently, Xu and Xu [2] presents 1.853-approximation algorithm for FLWP which will be used in our algorithm in section 4. Weighted Set covering problem is to select the facilities with minimal opening costs to cover all vertexes. Feige [12] showed that there is no (1 − )lnn-approximation algorithm to the problem unless N P ⊆ DT IM E(nloglogn ) where > 0. When it comes to plane and the cover range is uniform, the problem becomes minimum weighted dominating set problem in unit disk graph (MWDS in UDG). Amb´ uhl et al [13] gave the first constant-factor approximation algorithm with 72 ratios for MWDS in UDG. Then the ratios was improved to 6 + by Huang et al [14]. Recently, Dai and Yu [1] found a 5 + -approximation algorithm. Our algorithm in section 4 will also make use of their algorithm. For UBFLP, the exact algorithms for solving bounded facility location in exponential time were studied in [15] and [16]. Piotr and Roberto [17] proved that the bounded p-median problem can not be approximated within a factor 1 smaller than 1 + e1+ unless N P ⊆ DT IM E(nloglogn ), and showed the known approximation schema of metric facility location on UBFLP usually violates the feasibility of routing bounds. To the best of our knowledge, there are no other researches on approximation algorithms about UBFLP. This article is organized as follows. In section 2, we present the model of UBFLP. Section 3 describes the lnn+1-approximation algorithm of UBFLP on general graph. In section 4, we present the constant-factor approximation algorithm for UBFLP on plane.
2
UBFLP Model
Given a connected network G(N, A) where N = {1, · · · , n} is the set of nodes, A is the set of edges. Let cij be the cost from i to j, fi be the opening cost of
12
K. Weng
node i. And let Yi = {0, 1} be 1 if node i is selected as a facility and 0 otherwise, Xij = {0, 1} be 1 if node j is serviced by node i and 0 otherwise, d be the bounded routing cost. Now, we can formulate the UBFLP as P 1. P 1 minimize cij Xij + f i Yi (1) i
j
i
subject to Xij ≤ Yi ∀(i, j) Xij = 1 ∀j
(2) (3)
i
Xij cij ≤ d ∀i, j
(4)
Yi = 0, 1; Xij = 0, 1 ∀i, j
(5)
In P 1, the objective function (1) accounts for the minimization of the total routing costs plus opening costs. Constraints (2) and (3) require that every node j must be serviced by a selected facility. Constraint (4) ensures the closest facility to j is within required bound. If d = max∀i,j cij , then P 1 became an uncapacitated facility location. So, UBFLP is a generalization of uncapacitated facility location problem, which means that it is NP-hard since its special case is NP-hard.
3
Greedy Approximation Algorithm for UBFLP on General Graph
UBFLP doesn’t likely have an approximation algorithm better than lnn because set covering is also a special case of UBFLP. This section presents a lnn + 1 approximation algorithm using greedy technique. The key idea of the schema is that it selects a facility with minimal average operation costs to service new clients at every step until all nodes have been assigned. Let wi = {j|cij ≤ d} be the set of nodes that can be covered by i, E be the set of uncovered nodes, C be the set of already selected facilities, and Dj be the shortest distance between j from facilities of C. As Fig. 1 showed, the nodes serviced by C can be divided into X1 , X2 , and X3 . Dj = ∞ if node j has not been covered. Define s as the new selected facility, which would serve X3 and X4 in Fig. 1 where X4 = ws ∩ E. When s is selected, X2 would still be assigned to C while X3 would serviced by s. Let
θs =
fs +
j∈X4
cij −
|X4 |
j∈X3 (Dj
− csj )
(6)
The equation (6) shows that the average operation costs induced by s including opening costs of s, routing costs of X4 , and then decreased costs by saving routing costs of X3 .
Approximation Algorithm for Uniform Bounded Facility Problem
X
1
C
X X 2
3
13
X
4
s
Fig. 1. Add New Facility
The following gives the procedure of our algorithm for UBFLP. 1. Initialize C = ∅, S = N , E = N , X1 = ∅, ALG = 0, Dj = ∞ for ∀ j. 2. While E = ∅, for ∀i ∈ S, compute X4 = wi ∩ E, X2 = {j|j ∈ X1 , Dj ≤ cij }, X3 = {j|j ∈ X1 , Dj > cij }, and then choose s = argmini∈S θi while θi is defined as equation (6), renew C = C ∪ s, S = S \ {s}, E = E \ {X4 }, X1 = X1 ∪ X4 , ALG = ALG + θs |X4 |, Dj = cjs for ∀j ∈ X3 ∪ X4 . 3. End. And C is set of facilities to be opened. The procedure above can be finished in O(n3 ) time. When the algorithm ended, we have the opening facilities C, and the serviced distance Dj for node j, as well as the totalcosts ALG. Besides, by j∈N Dj , we obtain the total routing costs. And by i∈C fi , we get the total opening costs. Now, we analyze the performance of the algorithm. Theorem 1. ALG ≤ (lnn + 1)OP T where ALG is the solution cost of the algorithm and OP T is the total cost of the optimal solution. Proof. In the algorithm, we select facilities by the efficiency of their unassigned nodes, or number of uncovered elements per operation cost. For every picked s, we have θs which is the minimal mean operation costs. For every node j, let si be the first picked facility that covers it. Node j has toafford the costs of cost(j) = θsi . And the total costs of the algorithm ALG = j∈N cost(j). We order the nodes in the order that they were joined to X1 . At the iteration t of step 2, the algorithm has selected facilities s1 , s2 , · · · , st . We define Et as the set of unassigned nodes after that time. Then the average cost of service Et is at T OP T most OP |Et | . So, there is at least one node in Et who afford costs cost(i) ≤ |Et | . T Actually we can obtain a facility with θst+1 ≤ OP |Et | at iteration t + 1, since θst+1 is the minimal average operation costs. In the ordered sequence, let j be the first node assigned in iteration t + 1, and T OP T notice that |Et | = n − j + 1. So cost(j) = θst+1 ≤ OP |Et | ≤ n−j+1 . Now, we have n n 1 ALG = j∈N cost(j) ≤ OP T j=1 n−j+1 = OP T j=1 1j ≤ (lnn + 1)OP T .
14
4
K. Weng
Constant-Factor Approximation Algorithm for UBFLP on Plane
In general graph, there are no approximation algorithm better than lnn unless N P ⊆ DT IM E(nloglogn ) for UBFLP. However, when it came to plane, we may improve the approximation guarantee by taking advantages of geometry characteristics of plane graph. In this section, we present the constant approximation algorithm with for UBFLP on plane, which is composed of the algorithm by Dai and Yu [1] and the schema of Xu and Xu [2]. The following gives the procedure of our algorithm for UBFLP on plane. 1. Compute a set W which can cover all nodes of N . Let Cj be the minimal routing costs of node j serviced by W. 2. Compute a set V such that all nodes of N is either assigned to a facility of V or pay the penalty Cj . 3. Let F be the union of W and V , and assign all nodes to the closet facility in F . In step 1, the algorithm actually chose a weighted dominating set W which assure that all nodes can assigned to a facility with a routing costs no more than d. And we compute a FLWP in step 2 such that the routing costs of all nodes can be further decreased. When the algorithm ended, the node j in N is either assigned to V or to W with routing cost Cj . The following gives the performance analysis of our algorithm. Lemma 1. Let W ∗ be the optimal solution for weighted dominating set, and OP Tw be total costs of W ∗ , then OP Tw ≤ OP Tf , where OP Tf is the opening costs of optimal solution for UBFLP. Proof. Given the optimal solution F ∗ of UBFLP, then all nodes in N can be assigned a facility in F ∗ while their routing cost is at most d, which means F ∗ is a dominating set of N . Since W ∗ is the minimum weighted dominating set, so OP Tw ≤ OP Tf . Let zj = {0, 1} be 1 if node j is assigned to W in step 2. The FLWP in step 2 can be programmed as P 2. P 2 minimize
i
subject to
j
cij Xij +
f i Yi +
j
Xij ≤ Yi ∀(i, j) Xij + zj ≥ 1 ∀j
zj Cj
(7)
j
(8) (9)
i
Yi = 0, 1; Xij = 0, 1 ∀i, j
(10)
In P 2, the objective (7) minimizes the total opening costs, routing costs as well as penalties. constraint (9) ensures that the node j ∈ N is either served by a
Approximation Algorithm for Uniform Bounded Facility Problem
15
facility in V, or covered by W which counts cost Cj . Let V ∗ be the optimal solution of P 2 with objective value OP Tf lwp = OP Tv + OP Tr + OP Tp , where OP Tv , OP Tr , and OP Tp are the opening costs, routing costs, penalties of the optimal solution respectively. Lemma 2. OP Tv + OP Tr + OP Tp ≤ OP T where OP T is the optimal cost of UBFLP. Proof. Suppose to the contrary, there exists a solution H of UBFLP whose total costs F + R (opening costs F plus routing costs R) is less than OP Tf lwp . Let rj be smallest routing costs of j assigned to H. Then we can construct a feasible solution for P 2. Let H be the opened facilities of FLWP. Node j is assigned to H if rj ≤ Cj , and get penalties Cj if rj > Cj . Obviously the total routing costs COSTr plus penalties COSTp are not great than R. Now, OP Tv + OP Tr + OP Tp ≤ F + COSTr + COSTp ≤ F + R, a contradiction. We note that the optimal solution V ∗ of step 2 should have no common facilities with W. If there is a common facility j, we can delete j, and let all nodes assigned to j get penalties, which would not increase the total costs since the penalties should no more than the routing costs to j in W. Theorem 2. There exists a 6.853 + -approximation algorithm for UBFLP on plane in polynomial time. Proof. Dai and Yu [1] gave a polynomial time algorithm with approximation guarantee 5 + for MWDS in UDG. And Xu and Xu [2] presented a 1.853approximation algorithm for FLWP in O(n3 ) times. So if we compute step 1 by the schema of Dai and Yu [1], let W be the cost we obtained, then we have can cover all nodes by W ≤ (5 + )OP Tw . If we compute step 2 by the algorithm of Xu and Xu [2], let V, R, P be the opening costs, routing costs, penalties of the solution respectively, and then we have V + R + P ≤ 1.853(OP Tv + OP Tr + OP Tp ). By Lemma 2 and Lemma 3, the total costs of out algorithm W +V +R+P ≤ (5+)OP Tw +1.853(OP Tv +OP Tr +OP Tp ) ≤ (6.853+)OP T.
5
Conclusion
The uniform bounded facility location problem has a wide range of application in the location of warehouses, network designs, fire engines as well as ambulances. We present a O(lnn)-approximation for UBFLP on general graph. And the 6.853 + -approximation algorithm for UBFLP on plane is also obtained. The great mass of the algorithm cost is the computing for MWDS in UDG at step 1. To reduce the ratios by computing a feasible dominating set with lower costs may be promising to improve on the first step. Another interesting open problem would be the bounded facility location in the case when the bounds are different.
16
K. Weng
Acknowledgment The research was supported by the Special Fund for Basic Scientific Research of Central Colleges, CUG090113.Thanks are also due to the anonymous referees who provided very valuable comments and advises.
References 1. Dai, D., Yu, C.: A 5+-approximation algorithm for minimum weighted dominating set in unit disk graph. Theoretical Computer Science (2008), doi:10.1016/j.tcs.2008.11.015 2. Xu, G., Xu, J.: An improved approximation algorithm for uncapacitated facility location problem with penalties. Journal of Combinatorial Optimization 17, 424– 436 (2008) 3. Charikar, M., Khuller, S., Mount, D. Narasimhan, G.: Algorithms for facility location problems with outliers. In: Proceedings of the symposium on discrete algorithms, pp. 642–651 (2001) ´ Aardal, K.: Approximation algorithms for facility location 4. Shomys, D., Tardos, E., problems. In: Proceedings of STOC, pp. 265–274 (1997) 5. Sviridenko, M.: An improved approximation algorithm for the metric uncapacitated facility location. In: Proceedings of IPCO, pp. 240–257 (2002) 6. Chudak, F., Shomys, D.: Improved approximation algorithms for the uncapacitated facility location problem. SIAM J. Comput. 33, 1–25 (2003) 7. Jain, K., Mahdian, M., Saberi, A.: Approximation algorithms for metric facility location and k-median problems using the primalCdual 8. Charikar, M., Guha, S.: Improved combinatorial algorithm for facility location problems. SIAM J. Comput. 34, 803–824 (2005) 9. Mahdian, M., Ye, Y., Zhang, J.: Approximation algorithms for metric facility location problems. SIAM J. Comput. 36, 411–432 (2006) 10. Byrka, J.: An optimal bifactor approximation algorithm for the metric uncapacitated facility location problem. In: Charikar, M., Jansen, K., Reingold, O., Rolim, J.D.P. (eds.) RANDOM 2007 and APPROX 2007. LNCS, vol. 4627, pp. 29–43. Springer, Heidelberg (2007) 11. Byrka, J., Aardal, K.: The approximation gap for the metric facility location problem is not yet closed. Oper. Res. Lett. (2006) 12. Feige, U.: A Threshold of ln n for Approximating Set Cover. J. ACM 45, 634–652 (2006) 13. Amb¨ uhl, C., Erlebach, T., Mihal´ ak, M., Nunkesser, M.: Constant-factor approximation for minimum-weight (Connected) dominating sets in unit disk graphs. In: D´ıaz, J., Jansen, K., Rolim, J.D.P., Zwick, U. (eds.) APPROX 2006 and RANDOM 2006. LNCS, vol. 4110, pp. 3–14. Springer, Heidelberg (2006) 14. Huang, Y., Gao, X., Zhang, Z., Wu, W.: A better constant-factor approximation for weighted dominating set in unit disk graph. J. Comb. Optim., 1573–2886 (2008) 15. Berman, O., Yang, E.K.: Medi-center location problems. Journal of the Operational Research Society 42, 313–322 (1991) 16. Choi, I.C., Chaudhry, S.S.: The p-median problem with maximum distance constraints: a direct approach. Location Science 1, 235–243 (1993) 17. Piotr, K., Roberto, S.: Approximation algorithms for bounded facility location problems. Journal of Combinatorial Optimization 5, 233–247 (2001)
The k-Canadian Travelers Problem with Communication Huili Zhang1,2,3, and Yinfeng Xu1,2,3 1
2 3
School of Management, Xi’an JiaoTong University, Xianning West Road, Xi’an, 710049, China State Key Lab for Manufacturing Systems Engineering, Xi’an, 710049, China Ministry of Education Key Lab for Process Control & Efficiency Engineering, Xi’an, 710049, China
[email protected],
[email protected]
Abstract. From the online point of view, this paper studies a variation of the k-Canadian Traveler Problem (k-CTP), in which there are multiple travelers who communicate with each other to share real-time information. The objective is to find a route from the origination to the destination as soon as possible. Based on different communication levels, we consider two problems with full communication(P1 ) and with limited communication(P2 ) respectively. We present lower bounds for the two problems respectively. Considering the urban traffic environment, we propose a Retrace-Alternating strategy for both problems, and prove that increasing the proportion of full communication travelers may not always improve the competitive performance of online strategies. Keywords: online k-CTP; multiple travelers; communication; competitive analysis.
1
Introduction
The Canadian Traveler Problem (CTP) is a routing problem under uncertain environment. Given an undirected graph G = (V,E) with one source node O and one destination node D. A traveler plans to travel from O to D, and knows in advance the original structure of the graph and the costs of all the edges. However, some edges may be timelessly blocked during travel, and the blocking can not be observed until the traveler reaches one endpoint of a blocked edge. When the traveler meets a blocked edge in the preplanned route, it is necessary to adjust the planned route to avoid the blocked edge. The traveler needs to devise a good travel strategy from O to D with smallest cost in the above online environment. This problem was introduced by Papadimitriou and Yannakakis [1], and was proved that devising an online algorithm with a bounded competitive ratio is PSPACE-complete. Several variations of the CTP have been studied since the introduction. One variation is the k-CTP problem where the number of blocked edges is no more than
Corresponding author.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 17–28, 2011. c Springer-Verlag Berlin Heidelberg 2011
18
H. Zhang and Y. Xu
k. Bar-Noy and Schieber [2] investigated the problem by the worst-case criterion which aims at a strategy where the maximum cost is minimized [2]. Westphal [3] considered the online version of k-CTP and gave an optimal deterministic strategy with the competitive ratio 2k + 1. Westphal [3] also showed a lower bound of k + 1 of the competitive ratio for any randomized online algorithm against an oblivious adversary. Xu et al. [4] gave two deterministic strategies, the Comparison strategy and the Greedy strategy, and showed the corresponding tight competitive ratio 2k+1 and 2k+1 −1. Particularly, they explained why the Greedy strategy is usually carried out in the urban environment. Another variation is the recoverable CTP problem where one blockage recovers after some non-negative time. Bar-Noy and Schieber [2] and Su et al. [5] studied the problem from the perspective of worst-case analysis and competitive analysis, respectively. CTP with multiple travelers is an interesting variation which plays an important role in many real life situations. Itai and Shachnai [6] studied the packet routing problem in Internet. Burgard et al [7] and Simmons et al [8] started the research of the collaborative multi-robot exploration problem, in which a team of robots explores an unknown environment. The problem has been widely studied in the last decade. Lita et al [9] modified the problem to the situation of disaster, where the multiple relief trucks corporately attempt to reach multiple target locations in a heavily destroyed network, and aim to get the largest reward which exponentially decays in cost. As mentioned above, the CTP with multiple travelers is mainly studied with unknown or almost unknown graph. Whereas we usually face more practical situations in which there are just a few number of uncertain edges in the network. For example, when there is a big fire in the city, the traffic network is mostly fine except a few affected edges. Although the study on the totally unknown map can be used in this situation, it is meaningful to take the advantage of map information for designing better routing strategies for the multiple trucks. In view of competitive analysis, this paper studies the k-Canadian Travelers Problem with multiple travelers. Two communication levels among the travelers are introduced in the problem. The first level is of full communication, which means that all the travelers can receive and send information on blockages with each other at any time. The second level is of limited communication, which means that some travelers can both receive and send information while the others can only receive information. The organization of this paper is as follows. Section 2 describes the k-Canadian Travelers Problem, and gives some assumptions. In Sections 3 and 4, we study the k-Canadian Travelers Problem based on two different communication levels, respectively. In Section 5, we examine the performance of the Retrace-Alternating strategy with different communication levels in a special urban traffic environment.
2
Problem Description
Let G = (V, E) denote an undirected network, O the source and D the destination. Let l(ei ) denote the weight or passing time of edge ei , and Ei = {e1 , e2 , . . . , ei } the
The k-Canadian Travelers Problem with Communication
19
set of blocked edges. Ei is unknown to travelers at the beginning. Suppose that there are multiple travelers who plan to travel from O to D. The objective is to find a feasible route spending as little time as possible. It is natural to consider the following questions: If the travelers can share their travel information by communication, what will be different from the situation without communication? Does the level of communication affect the performance of strategies and to what extent? Before answering these questions, we first present several fundamental assumptions. 1) There are L (> 1) travelers who have the knowledge of original structure and edge cost of the graph but not Ei in advance. 2) Each traveler take ei time to pass through edge l(ei ) given that ei is not in Ei . 3) At most k (L < k) edges may fail during travel. 4) A traveler knows that edge ei = (vi , vi+1 ) is blocked either he reached one of the endpoints or at least one another traveler sends the blockage information. 5) The block of an edge is irrecoverable and timeless, and graph G is connective after the blocked edges are removed from the graph. Competitive ratio We use the competitive analysis [10] to measure the performance of an online strategy. For any input blockage sequence I, let con (I) denote the time spent by the L travelers who adopt the online strategy AON , and copt (I) the time spent by an optimal offline strategy. In this paper, the cost is time from the starting out of the first traveler to the arrival of the earliest traveler. We say that AON is c-competitive if con (I) ≤ c · copt (I) + v where v is a constant. We also say that c is the competitive ratio of AON . A strategy is optimal if its competitive ratio matches the lower bound of competitive ratio.
3
The k-Canadian Travelers Problem with Full Communication (P1 )
In this section, we present a lower bound for k-Canadian Travelers Problem with full-communication (P1 ) and give an optimal strategy for a special case. In P1 , all travelers are equipped with the facilities to receive and send information at any time. For example, the fire engines have radios and telephones which are used to assist the emergency process. Suppose that there are L travelers and at most k blocked edges, we have the following theorem. Theorem 1. There is no deterministic online strategy with competitive ratio less than 2 Lk + 1 for P1 .
20
H. Zhang and Y. Xu
Proof. Consider a special graph in Fig.1 where the lengths of all the paths are the same. Let AON be any deterministic strategy which contains a permutation {(x1 , t1 ), . . . , (xi , ti ), . . . , (xn , tn )}, where (xi , ti ) means that xi travelers are sent to D along the different paths at time ti , and tn is the starting time of the earliest arrival. v1
1
v
1 1
O
1 1
H
2
H
v3
D
H H H
vk
vk 1 Fig. 1. A special graph
Assume that there exists a strategy {(x1 , t1 ), . . . , (xi , ti ), . . . , (xn , tn )} where tn < 2 Lk . We derive a contradiction to the assumption in the following. Let tn = 2 Lk −δ (δ > 0) and divide the time interval [0, tn ] into n segments by Ti = 2i−δ (i = 1, . . . , n = Lk ) as showed in Fig.2. The strategy can be redefined as ({y1 , (T0 , T1 )}, {z1 , T1 }, . . . , {yi , (Ti−1 , Ti )}, {zi, Ti }, . . . , {yn , (Tn−1 , Tn )}, {zn, Tn }), where T0 = 0, Tn = tn , yi is the total number of travelers who set out for the node D during the time interval (Ti−1 , Ti ), and zi (i = 1, 2, . . . , n) is the number of travelers who set out at time Ti .
y2
y3
z3
0
2 G
4 G
"
6 G "
yn 1 zn 1
yn
zn
^ ^
z2
^ ^
^
y1 z1
2n 2 G
2n G
Fig. 2. Divided Time Interval
Obviously, the length of time interval [Ti−1 , Ti ) is at most 2 which is the necessary time for a traveler to leave from O and then go back to O after observing a blocked edge. Therefore, there are at most L − yi travelers at the node O at Ti because the yi travelers who were sent out during [Ti−1 , Ti ) are still on the way at the time. Obviously, there are two choices for the L − yi travelers. The first one is that some of L − yi travelers leave for D at Ti while the others leave later, then at Ti+1 they will find at most L − yi blockages but less than L − yi travelers return to O. The second choice is that all of the L − yi travelers go to D at Ti , it is certain that they will find L − yi blockages and the same number
The k-Canadian Travelers Problem with Communication
21
of travelers will return to O. Thus, the later choice (zi = L − yi ) is not worse than the former one (zi < L − yi ). To draw a smallest competitive ratio, we select the later choice, i.e., zi = L−yi . n n The total number of blockages to be find until tn + 1 is Σi=1 (yi + zi ) = Σi=1 (yi + k L − yi ) = nL = L L ≤ k, which means every traveler who leaves for D at time tn can still be blocked in the worst case. This contradicts to the assumption tn < 2 Lk , which is the starting time of the earliest arrival traveler. Hence, it is a contradiction, and thus tn ≥ 2 Lk for any strategy {(x1 , t1 ), . . . , (xi , ti ), . . . , (xn , tn )}. The cost of online travelers is con ≥ 2 Lk + δ + (1 + ε), and the optimal cost is copt = 1 + ε. c=
2 k + δ + (1 + ε) con ≥ L copt 1+ε
As ε → 0, c → 2 Lk + 1. The theorem follows.
Below we present a strategy for the case where there are exactly two travelers with full communication. Alternating strategy: Let one traveler (A) takes the shortest path SPG (O, D) on graph G, and the other traveler (B) waits at node O. If the path of A is blocked on any edge e1 , then A returns to O and B takes the shortest path SPG−{e1 } on the graph G = G − {e1 } at the time A finds a blockage; if the edge e2 of the path taken by B is blocked, B returns to O and A takes the shortest path SPG−{e1 ,e2 } (O, D) on the graph G − {e1 , e2 } when B is blocked and A is at node O. The two travelers leave for D in turn and repeatedly until one of the travelers arrives at D. Theorem 2. When L = 2, the Alternating algorithm is k+1-competitive for P1 . Proof. At any time when one traveler finds a blocked edge, the traveler returns to O at once and at the same time the other one sends out. Obviously, the cost of finding a blockage on graph G − {e1 , . . . , ei } is at most l(SPG−{e1 ,...,ei } ). Suppose the travelers arrive at D after they have found i blockages. Then the online cost is con = l(SPG ) + l(SPG−{e1 } ) + . . . + l(SPG−{e1 ,e2 ,...,ei ,ei+1 } ) ≤ (i + 2)l(SPG−{e1 ,e2 ,...,ei ,ei+1 } The optimal cost is copt = l(SPG−{e1 ,e2 ,...,ei ,ei+1 } . Hence, the competitive ratio is c = max { i≤k−1
The theorem follows.
con }=k+1 copt
Note: If k is even, the competitive ratio is optimal; otherwise the competitive ratio is 1 larger than the lower bound.
22
4
H. Zhang and Y. Xu
The k-Canadian Travelers Problem with Limited Communication (P2 )
In this section, we present a lower bound for the k-Canadian Travelers Problem with limited communication (P2 ). The limited communication means that some travelers can both receive and send traffic information, but the others can only receive. For example, some fire engines can both receive and send information, such as the communication fire engine which is used to manage the process. There are also special fire engines only to take water or lighting installation or something else used in emergency. Consider the following situation: L travelers are leaving from O to D. L1 of the L travelers can both receive and send information, and are defined as R&S-type. The others can only receive information, and are defined as R-type. There are at most k blockages on the graph. This problem is defined as P2 (L, L1 ). Since the R-type travelers can not share their travel information, they might repeat the infeasible path that the other R-travelers have already taken. Consider the graph showed in figure 1, the following lemmas hold. Lemma 1: In P2 , it does not improve competitive ratio when the R-type travelers take different paths. Lemma 2: P2 (L, L1 ) equals to P1 with L1 travelers with full communication and at most k − 1 blockages. Proof. According to Lemma 1, all the R-type travelers can be regarded as one traveler in any deterministic strategy for P2 . The R&S -type travelers can communicate with each other, but they don’t know the path taken by the R-type travelers. Therefore, in the worst case they will take the way R-type travelers have taken. However, when the number of unknown blockages (x) equals to that of R&S-type travelers at O, the R-type travelers get this information from R&Stype travelers, and will select a different way. In this case, there are x + 1 paths selected and at most x blockages unknown. Obviously, at least one traveler will arrive at D. Above all, the R-type travelers will detect one blockage and leave the k − 1 blockages to the L1 travelers with full communication. The lemma follows. Theorem 3. For P2 (L, L1 ), there is no deterministic online algorithm with competitive ratio less than 2 k−1 L1 + 1. Proof. According to Lemma 2 and Theorem 2, the online cost of the travelers in Fig.1 is con ≤ 2 k−1 + 1 + ε. The offline cost is copt = 1 + ε. As ε → 0, L1 con k−1 → 2 + 1. copt L1 The theorem follows.
The k-Canadian Travelers Problem with Communication
5
23
Retrace-Alternating Strategy in Urban Environment
In this section we propose a Retrace-Alternating strategy for the k-Canadian Travelers Problem in urban environment, and examine the performance of the strategy for both P1 and P2 . Because of the overlap among different paths on the general network, it is difficult to design a good strategy including multiple paths without overlaps for all the travelers. However, most urban city traffic networks are highly connected and there usually exist several paths without overlap from O and D. These paths are not much longer than the shortest path SPG on the graph G. What’s more, when some edges are blocked, there are still such paths on the new graph G , such as the graphs showed in Fig.3.
Fig. 3. Part of the traffic network of Barcelona, Spain and Xi’an, Shannxi, China
Based on this fact, we assume that: 1) d denotes the degree of node D. There are at least d paths without overlap and their lengths are in the interval [l(SPG ), αl(SPG )] (α > 1). Furthermore, there still exist such paths even when several edges are blocked and their lengths are in the interval [l(SPG ), αl(SPG )]. 2) Px is the detouring path of the edge e(vi , D) on path P , and l(Px ) = 2xl(e(vi , D)) < 2l(P ), where x is the number of the blockages needed to be detoured. The following is the Retrace-Alternating strategy in the urban traffic network for P1 . Retrace-Alternating strategy for P1 : Case 1. L ≤ d: Step1: i = 1, Ei = φ, x = L; Step2: x travelers leave for node D along separate paths on graph G without overlap. If the selected paths are all blocked and no blockage is connected to D, all the travelers return to node O, i = i + 1, add all the blocked edges to set Ei , G = G − Ei , go to step2; if all the paths are blocked and there is any blockage edge whose the other endpoint is exactly D, go to step3; otherwise if at least one traveler reaches the node D, stop; Step3: Let the traveler who is at one endpoint of the blocked edge whose the other endpoint is D detour until arriving at D, stop.
24
H. Zhang and Y. Xu
Case 2. L > d: Step1: Let i = 1, x1 = d, x2 = min{d, L − d}, Ei = φ. Step2: When there are at least x1 travelers at O, the x1 travelers go to D along separate paths on graph G without overlap. If the x1 paths are all blocked and no blockage is connected to D, all the x1 travelers retrace to O, i = i + 1, add all the blocked edges to set Ei , G = G − Ei , and go to step 3; if all the paths are blocked and there is at least one blocked edge whose the other endpoint is D, go to step 4; otherwise if some traveler reaches D, stop; Step3: When there are at least x2 travelers at node O, x2 travelers go to D along separate paths on graph without overlap. If all the x2 paths are blocked and no blockage is connected to D, i = i + 1, add all the blocked edges to set Ei , G = G − Ei , the x2 travelers all retrace to O, return to step 2; if all the paths are blocked and there is at least one blockage edge connected to D, go to step 4; if some traveler reaches D, stop; Step4: Let the traveler who is at one endpoint of the blocked edge whose the other endpoint is D detour until arriving at D, stop. Theorem 4. The competitive ratio of Retrace-Alternating strategy for P1 is ⎧ ⎨ α(2 Lk + 1) L ≤ d k c = α(2 X + 2) a = 0, L > d , ⎩ k α(2 X + 3) a = 1, L > d k 1 k − X X − d ≥ 0 where X = min{L, 2d} and a = . 0 else Proof. Case 1. L ≤ d. According to the process of strategy, there are mainly two cases. One is that strategy executes step 3, and the other is that strategy doesn’t execute step 3. Case 1.1: Doesn’t execute Step 3. In this case, all the L travelers will return to O when the selected paths on the graph G are all blocked and the cost is at most 2αl(SPG ). Step 2 is repeated at most i = Lk times. The total online i cost is con ≤ 2αΣj=1 l(SPG−Ej ) + αl(SPG−Ei+1 ). The offline optimal cost is cof f = l(SPG−Ei+1 ). In this subcase, the ratio c1 =
con k ≤ α(2 + 1). cof f L
Case 1.2: Execute Step 3. In this case, before the strategy executes the step 3, it continues to return to O when all the selected paths are blocked. Suppose the strategy goes to step 3 on graph G − Ei+1 , the cost before the strati egy executes the step 3 is at most 2αΣj=1 l(SPG−Ej ) + αl(SPG−Ei+1 ). Because it is blocked on graph G − Ei+1 , the length of the detouring path in step 3 is l(Px ) = 2xl(e(vi , D) ≤ 2αl(SPG−Ei+1 ). Therefore, the total cost is con ≤ i 2αΣj=1 l(SPG−Ej ) + αl(SPG−Ei+1 ) + 2αl(SPG−Ei+1 ) ≤ α(2i + 3)l(SPG−Ei+1 ). The offline optimal cost is cof f ≥ l(SPG−Ei+1 ). k Obviously, i < L , otherwise some traveler must have arrived at D and there is no need to detour.
The k-Canadian Travelers Problem with Communication
25
The ratio in this subcase is c2 =
con k ≤ α(2 + 1). cof f L
The competitive ratio of the strategy is then given by k c = max{c1 , c2 } = α(2 + 1). L Case 2. L > d. The analysis is similar to Case 1, the details are presented in Appendix 1. We can easily get the competitive ratio of the strategy for P1 when L > d is k α(2 X + 2) a = 0, L > d c= , k α(2 X + 3) a = 1, L > d k 1 k X X − d ≥ 0 where X = min{L, 2d} and a = . 0 else The theorem follows. The following is the Retrace-Alternating strategy in the urban traffic network for P2 . Retrace-Alternating strategy for P2 According to Theorem 3, P2 (L, L1 ) equals to P1 with L1 travelers and at most k − 1 blockages. The Retrace-Alternating strategy for P1 can be used to P2 after a little modification when the number of unknown blockages equals to that of the R&S-type travelers at O. The details are listed in Appendix 2. Similar to the proof of Theorem 4, we have the competitive ratio of the Retrace-Alternating strategy for P2 . Theorem 5. The competitive ratio of Retrace-Alternating strategy for P2 is ⎧ k−1 ⎨ α(2 L1 + 1) L1 ≤ d c = α(2 k−1 + 2) a = 0, L1 > d , X ⎩ α(2 k−1 + 3) a = 1, L1 > d X k 1 k − X X − d ≥ 0 where X = min{L1 , 2d} and a = . 0 else Comparing the competitive ratio of Retrace − Alternating strategy for P1 and P2 with the same number of travelers (by Theorem 4 and Theorem 5), we can find: 1) if L ≤ 2d and L1 ≤ 2d, the Retrace-Alternating strategy for the problem with full communication (P1 ) has better competitive ratio than that with limited communication(P2 ). Moreover, a larger L1 indicates a smaller difference between P1 and P2 ; 2) if L > 2d and L1 ≤ 2d, the competitive ratio of the strategy for (P1 ) does not change as L increases. Furthermore, a larger L1 also indicates a smaller difference between P1 and P2 ;
26
H. Zhang and Y. Xu
3) if L > 2d and L1 > 2d, the strategy for P1 behaves as well as that for P2 . Hence, we conclude that the increase of the proportion of travelers with full communication does not always improve the competitive ratio.
6
Conclusion
This paper studied the k-Canadian Travelers Problem with different communication abilities: full communication (P1 ) and limited communication (P2 ).We presented lower bounds of the competitive ratio for the two subproblems. The results showed that the more travelers with full communication, the smaller the lower bound is. Based on the urban traffic environment, the paper studied the performance of the Retrace-Alternating strategy of the two communication situations. The results indicated that the increase of the proportion of full communication travelers does not always improve the competitive ratio, which is actually related to the structure of network.
Acknowledgments The authors would like to acknowledge the financial support of Grants (No. 71071123, 60736027 and 60921003.) from NSF of China.
References 1. Papadimitriou, C.H., Yannakakis, M.: Shortest paths without a map. Theoretical Computer Science 84, 127–150 (1991) 2. Bar-Noy, A., Schieber, B.: The Canadian Traveller Problem.In: Proceedings of the second annual ACM-SIAM symposium on discrete algorithms, pp. 261–270, San Francisco (1991) 3. Westphal, S.: A note on the k-Canadian Traveler Problem. Information Processing Letter 106, 87–89 (2008) 4. Xu, Y.F., Hu, M.L., Su, B., Zhu, B.H., Zhu, Z.J.: The Canadian Traveller Problem and its competitive analysis. Journal of combinatorial optimization 18, 195–205 (2009) 5. Su, B., Xu, Y.F.: Online recoverable Canadian Traveler Problem on a road. Information 7, 477–486 (2004) 6. Itai, A., Shachnai, H.: Adaptive source routing in high-speed networks. Journal of Algorithms 20, 218–243 (1996) 7. Burgard, W., Fox, D., Moors, M., Simmons, R., Thrun, S.: Collaborative multirobot exploration. In: Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), San Francisco, pp. 476–481 (2000) 8. Simmons, R., Apfelbaum, D., Burgard, W., Fox, M., Moors, D., Thrun, S., Younes, H.: Coordination for multi-robot exploration and mapping. In: Proceedings of the Seventeenth National Conference on Artificial Intelligence and Twelfth Conference on Innovative Applications of Artificial Intelligence, Austin, pp. 852–858 (2000) 9. Lita, L.V., Schulte, J., Thrun, S.: A System for Multi-Agent Coordination in Uncertain Environments. In: Proceedings of the Fifth International Conference on Autonomous Agents, Montreal, pp. 21–22 (2001) 10. Borodin, A., El-Yaniv, R.: Online Computation and Competitive Analysis. Cambridge University Press, Cambridge (1998)
The k-Canadian Travelers Problem with Communication
27
Appendix Appendix 1. Competitive analysis of Retrace-Alternating strategy for P1 . Case 2. L > d. Let X = x1 + x2 = min{L, 2d}. According to the process of the strategy, there are mainly two cases. One is that the strategy executes step 4, the other is that the strategy doesn’t execute step 4. Case 2.1: Doesn’t execute Step 4. In this case, the two groups travelers go to the destination alternatively when the other group is blocked. All the x1 /x2 travelers will return to O when the selected paths are all blocked and the cost to find a blockage on graph G − Ej is at most l(SPG−Ej ). Step 2 and step 3 are k totally repeated at most i = 2α X times. The total cost of the online strategy i is con ≤ αΣj=1 l(SPG−Ej ) + αl(SPG−Ei+1 ) + aαl(SPG−Ei+2 ), where a = 0 when some of the x1 travelers reach D and ka = 1 when some of the x2 travelers 1 k− X X−d≥0 reach D. That is to say a = . The offline optimal cost 0 else l(SPG−Ei+1 ) a = 0 is copt ≥ . l(SPG−Ei+2 ) a = 1 k α(2 X + 1) a = 0 on The ratio in this subcase is c1 = ccopt ≤ k α(2 X + 2) a = 1 Case 2.2: Execute Step 4. In this case, before the strategy executes the step 4, it continues to return to O when all the selected paths are blocked. Suppose the strategy goes to step 4 on graph G − Ei+1 and the cost at this time is con ≤ i αΣj=1 l(SPG−Ej ) + αl(SPG−Ei+1 ). The length of the detouring path in step 4 will be l(Px ) = 2xl(e(vi , D) ≤ 2αl(SPG−Ei+1 ). Therefore, the total cost is con ≤ i αΣj=1 l(SPG−Ej )+αl(SPG−Ei+1 )+2αl(SPG−Ei+1 ) ≤ α(2i+3)l(SPG−Ei+1 ). The offline optimal cost is cof f ≥ l(SPG−Ei+1 ). on The ratio is c2 = ccof ≤ α(i + 3). f k Obviously if a = 0, i < 2 X ; else there are must some traveler arrived at D k and no need to detour . The worst case is c2 ≤ α(2 X + 2). k Else if a = 1, i ≤ 2 X ; else there are must some traveler arrived at D and k no need to detour . The worst case is c2 ≤ α(2 X + 3). k α(2 X + 2) a = 0 So the ratio in this subcase is c2 = k α(2 X + 3) a = 1 Above all, the competitive ratio of the Retrace-Alternating strategy when L > d is k α(2 X + 2) a = 0 c = max{c1 , c2 } = , X = min{L, 2d}. k α(2 X + 3) a = 1
Appendix 2. Retrace-Alternating strategy for P2 . Case 1. L1 ≤ d: Step1: i = 1, Ei = φ, x = L, N o = 0; Step2: x travelers go to node D along separate paths on graph G without overlap. If the selected paths are all blocked and no blockage is connected to D, the travelers all retrace to node O, i = i + 1, add all the blocked edges to set
28
H. Zhang and Y. Xu
Ei , G = G − Ei , N o = N o + 1, let x = x + 1 when k − N o = x, go to step 2; if all the paths are blocked and there is blockage connected to D, go to step 3; if at least one traveler reaches the node D, stop; Step3: Just let the traveler who is blocked by the edge connected to D detour until the arrival at node D, stop. Case 2. L1 > d: Step1: Let i = 1, x1 = d, x2 = min{d, L1 − d}, Ei = φ, N o = 0. Step2: When there are at least x1 travelers at O, the x1 travelers go to D along separate paths on graph without overlap. If the x1 path are all blocked and no blockage is connected to D, the x1 travelers all retrace to O, i = i + 1, add all the blocked edges to set Ei , G = G − Ei , N o = N o + x1 , let x2 = x2 + 1 when k − N o = x2 , go to step 3; if all the paths are blocked and there is at least one blockage connected to D, go to step 4; if some traveler reaches D, stop; Step3: When there are x2 travelers at node D, x2 travelers go to D along separate paths on graph without overlap. If all the x2 paths are all blocked and no blockage is connected to D, i = i + 1, add all the blocked edges to set Ei , G = G − Ei , N o = N o + x2 , let x2 = x2 + 1 when k − N o = x1 , the x2 travelers all retrace to O, go to step 2; if all the paths are blocked and there is at least one blockage connected to D, go to step 4; if some traveler reaches D, stop; Step4: Just let the traveler who is blocked by the edge connected to D detour until the arrival at node D, stop.
An Improved Competitive Algorithm for One-Dimensional Incremental Median Problem Wenqiang Dai and Yi Feng School of Management and Economics, University of Electronic Science and Technology of China, Chengdu, Sichuan, 610054, P.R. China {wqdai,fengyi}@uestc.edu.cn
Abstract. The incremental median problem consists of finding an incremental sequence of facility sets F1 ⊆ F2 ⊆ · · · ⊆ Fn , where each Fk contains at most k facilities. We say that this incremental medians sequence is c-competitive if the cost of each Fk is at most c times of the optimum cost of k-median problem. The smallest such c is called the competitive ratio. A particular case of the problem is considered in this paper: both the clients and facilities are located on the real line. [5] and [14] presented a polynomial-time algorithm for this one-dimensional case that computes an incremental sequence with competitive ratio 8. The √ best algorithm available has competitive ratio (1 + 2)2 ≈ 5.83[19]. In this paper we give an improved polynomial-time algorithm with competitive factor 4.
1
Introduction
The k-median problem is a classical facility location model and is also one of several problems considered fundamental in the field of combinatorial optimization, operation research and management science, see, e.g. several survey articles and books [16,3,18,7,8,6]. In the standard metric k-median version, we are given two sets: a set C of clients and a set F of n facilities, with a metric distance function d(x, y) ≥ 0 defined for each x, y ∈ C ∪ F, a weight function w(c) ≥ 0 defined for each c ∈ C. We define the distance of a point x to a point set S is d(x, S) = min d(x, y) and y∈S
|S| is the number of points in S. For any facility subset F ⊆ F, let its cost be cost(F ) = y∈C d(y, F )w(y). Given k, the objective of k-median problem is to give a k facilities subset F ⊆ F with minimum cost. The k-median problem is a very hard combinatorial optimization problem and has been the subject of a great deal of previous work. Here we just review some significant theoretical analysis. Lin and Vitter [15] proved that, in general, even
Supported in part by the NSF of China under Grant No.70901012, the Specialized Research Foundation for the Doctoral Program of Higher Education of China, Grant No. 200806141084, and Science Foundation of UESTC for Youths(JX0869). Supported by the Social Science Funding of China Education Ministry, Grant No. 10XJC630005.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 29–35, 2011. c Springer-Verlag Berlin Heidelberg 2011
30
W. Dai and Y. Feng
finding an approximate solution to the k-median problem is NP-hard. The problem remains hard if restricted to metric spaces. Guha and Khuller [11] proved that this problem is MAX-SNP Hard. Jain, Mahdian and Saberi [13] provided the best known lower bound of 1 + 2/e on the approximation ratio for this problem unless N P ⊆ DT IM E(nO(log log n) ). Now the best known approximation ratio is 3+, for any > 0, given by Arya et al.[2]. In the specific case of points in plane, Arora et.al [1] developed a PTAS. Recently several generalizations of the k-meidan problem have been considered. As investigated in Mettu and Plaxton [17], we consider the incremental version of k-median problem and its competitive algorithm in this paper. Such an algorithm produces an incremental sequence of facility sets Fˆ = (F1 , F2 , · · · , Fn ) such that (i) F1 ⊆ F2 ⊆ · · · ⊆ Fn ⊆ F; (ii) for any k = 1, 2, · · · , n, |Fk | ≤ k; (iii) for any k, cost(Fk ) ≤ c · optk , where optk denotes the corresponding optimum cost of k-median problem and c is called competitive ratio. For the incremental median problem, Mettu and Plaxton [17] proposed a linear time competitive algorithm with competitive ratio ≈ 29.98. Chrobak et. al. [5] gave a competitive algorithm (and Lin et.al.[14] also independently gave an analogous algorithm) with competitive ratio 8α, where α is the approximation ratio of k-median problem, thus achieving factor 24 + . Chrobak √ and Hurand [4] presented a competitive algorithm with competitive ratio (2 + 4 2)α. Lin et.al [14] further gave a competitive algorithm with competitive ratio 16. Consider a particular case of the incremental median problem in which both clients and facilities lie on the real line. Although this topology is the simplest model for location problems, the problem under consideration remains as hard to solve as in the general case. Due to the fact of that one-dimensional k-median problem can be solved in polynomial time[12], α = 1, the previous algorithms √ for the one-dimensional case thus present 8-competitive [5,14] and (2 + 4 2)competitive [4]. Recently, Shenmaier [19] gave a polynomial time competitive √ algorithm with ratio factor (1 + 2)2 ≈ 5.83. In this paper, we give a polynomial time incremental algorithm to prove that the competitive ratio factor is improved to 4. The rest of this paper is organized as follows. Section 2 presents the competitive algorithm, following section 3 gives the competitive ratio analysis. Section 4 puts a proof of an important and detail inequality which has been used in the proof of competitive ratio in section 3. The final section, section 5, concludes this paper and describes future research.
2
Algorithm Description
The basic idea of the algorithm coincides with that of the algorithm in [5,14,19]. We firstly find the solutions F1∗ , F2∗ , · · · , Fn∗ for the usual k-median problem for k = 1, 2, · · · , n. In this case, these are the exact solutions because the onedimensional k-median problem can be solved in polynomial time[12].
Algorithm for One-Dimensional Incremental Median Problem
31
Next, the algorithm determines a set E consisting of a subscript sequence E = {T (1), T (2), · · · , T (m)} in which T (1) = 1 and, for k = 1, 2, · · · , m − 1, the index T (k + 1) is the minimal subscript such that cost(FT∗ (k+1) ) ≤
1 cost(FT∗ (k) ) 2
Thus we have T (m) = n. Note that, when the algorithm of [19] is used, the √ analogous constant used in RHS is divided by 1 + 2. We then construct a partial solution to the incremental median problem corresponding to the indices in E. Let FT (m) = FT∗(m) , and for k = m − 1, · · · , 1, we put FT (k) as the method in [19] as following: ∀f ∈ FT∗(k) , we consider the set C(f ) of clients for which f serves them in Fi∗k , that is, C(f ) = {c ∈ C|d(c, f ) ≤ d(c, g), ∀g ∈ FT∗(k) , g = f } This set is called the cluster of f . We determine the facilities in FT (k+1) nearest to f in the line both from the left and the right, which have at most 2 nodes and at least one of these exist, under the following criteria: we pick the best of them from the viewpoint of minimizing the weighted sum of the distances to the customers in C(f ). The facilities chosen in this way for all f ∈ FT∗(k) constitute the set FT (k) . Henceforth, we denote this construction of FT (k) by Γ ; i.e., FT (k) = Γ (FT∗(k) , FT (k+1) ) Note that FT (k) ⊆ FT (k+1) , and the number of points in FT (k) is at most the size of FT∗(k) , which is equal to T (k). Note also that, in the algorithm of [5,14], during the construction of FT∗ (k) , the analogous function Γ is determined as the facility in FT∗ (k+1) nearest to f . Now we have obtained a partial solution FT (1) ⊆ FT (2) ⊆ · · · ⊆ FT (m) for the incremental median problem for indices in E. For t ∈ {1, 2, ..., n} \ E, we just let Ft = Ft− , where t− = max{i ∈ E|i ≤ t}. This completes the constructed process. The complexity of this algorithm is determined by the complexity of finding the initial sequence F1∗ , F2∗ ,· · · , Fn∗ , which in turn coincides with the complexity of finding k-median problem on a real line. Since the latter problem can be solved in polynomial time, thus the algorithm is also a polynomial one.
3
Competitive Ratio Analysis
Let us introduce the following concept: a configuration is a triple consisting of an arbitrary weighted set C of clients and two sets S and S ∗ of facilities, of which the second is the exact solution to the k-median problem with k = |S ∗ | and the set C of clients. We have the following result.
32
W. Dai and Y. Feng
Lemma 1. Given an arbitrary configuration C, S, S ∗ , we have the following inequality cost(Γ (S, S ∗ )) ≤ β(cost(S) + cost(S ∗ )), β = 1
(1)
We prove this lemma in the next section. Note that the constant in [19] is √ β = 1+2 2 . Now we consider the competitive ratio factor for the algorithm. Lemma 2. ∀k ∈ {1, 2, 3, · · · · · · , n}, cost(Fk ) ≤
m l=i,T (i)=k−
cost(FT∗(l) ).
Proof. If k ∈ E, let k = T (i), now by Lemma 1, we have cost(FT (i) ) = cost(Γ (FT∗(i) , FT (i+1) )) ≤ cost(FT∗(i) ) + cost(FT (i+1) ) thus cost(Fk ) = cost(FT (i) ) ≤ cost(FT∗ (i) ) + cost(FT (i+1) ) ≤ cost(FT∗ (i) ) + cost(FT∗(i+1) ) + cost(FT (i+2) ) ≤ ······ m−1 ≤ cost(FT∗(l) ) + cost(FT (m) ) =
l=i,T (i)=k m l=i,T (i)=k
cost(FT∗(l) ))
If k ∈ / E, we have k − ∈ E and Fk = Fk− , thus cost(Fk ) = cost(Fk− ) ≤
m
cost(FT∗(l) )).
l=i,T (i)=k−
Thus, we have the main result of this paper. Theorem 1. By the algorithm, the obtained set {F1 , · · · · · · , Fn−1 , Fn } satisfy the following: (1) F1 ⊆ F2 ⊆ · · · · · · ⊆ Fn ; (2) ∀k = 1, 2, ..., n, |Fk | ≤ k; (3) ∀k = 1, 2, ..., n, cost(Fk ) ≤ 4 · optk . That is, the algorithm has competitive ratio 4. Proof. Firstly we prove (1) and (2). By our algorithm, we have F1 ⊆ F2 ⊆ · · · · · · ⊆ Fn and ∀k, |Fk | ≤ k. Actually, if k ∈ E, then ∃i such that k = T (i), thus we have |Fk | = |FT (i) | = |Γ (FT∗(i) , FT (i+1) )| ≤ |FT∗ (i) | ≤ T (i) = k. Now if k∈ / E, we have |Fk | = |Fk− | ≤ k − ≤ k, thus the (1) and (2) are done.
Algorithm for One-Dimensional Incremental Median Problem
33
Now we prove (3). By Lemma 2 and the construction method of E, we have ∀k, cost(Fk ) ≤
m
cost(FT∗ (l) ) ≤
l=i,T (i)=k−
m l=i,T (i)=k−
1 cost(FT∗(i) ) ≤ 2cost(Fk∗− ) 2l−i
Now if k ∈ E, cost(Fk ) ≤ 2cost(Fk∗− ) = 2cost(Fk∗ ) = 2optk . If k ∈ / E, denote T (i) = k − , cost(Fk ) ≤ 2cost(Fk∗− ) ≤ 4cost(FT∗(i+1) ) ≤ 4optk , as desired.
4
Proof of Lemma 1
In this section, we prove the Lemma 1. Proof. Suppose the lemma 1 does not work, that is, for some configuration C, S, S ∗ , we have the converse: cost(Γ (S, S ∗ )) > cost(S) + cost(S ∗ )
(2)
We will use 5 simplifying operations as following to construct a substantially simpler k-median problem instance in which (2) holds as well and then obtain a contradiction. Note that the operation 1-4 here is analogous as in [19], which √ 1+ 2 ∗ have been used under the assumption cost(Γ (S, S )) > 2 (cost(S)+cost(S ∗ )). Here for our later used, we restate them and argument that these operations will also hold under assumption (2). Simplification 1.By (2), there exists at least one facility s ∈ S ∗ such that (2) still holds. Consequently, if we let S ∗ = {s} and C = C(s) then (2) still holds. Observe that the set {C, S, s} is still a configuration as the point s is the optimal 1-median of its cluster. Now denote the nearest neighboring facilities of s in S on the left and on the right respectively by a and b. Let d = a+b 2 and without loss of generality, we can assume s ≤ d, the case in which s > d is completely symmetric and can be dealt with similarly. Denote the costs of the sets S, {s},{a}, {b}, respectively by f , f s , f a , f b . Then inequality (2) assumes the following form min(f a , f b ) > f s + f
(3)
To concluded this lemma, we will prove (3) does not hold. Simplification 2. Consider the clients and facilities in S in the interval of the real line to the left of a. Move these clients to point a and delete these facilities. All quantities in (3) do not increase, while f s , f a , and f b decrease by the same constant. Consequently, (3) still holds. Repeat this for the clients and facilities located to the right of b. It can be observed that, following this simplification, facility set S will contain only two facilities a and b and there does not exist clients in the interval (−∞, a) ∪ (b, +∞). Simplification 3. Consider the clients in the intervals (a, s) ∪ (s, d) ∪ (d, b). Observe that the weighted sum of the distances from a facility to the clients located on one side of the facility is equal to the distance from this facility to
34
W. Dai and Y. Feng
the center of mass of these clients multiplied by their total weight. Thus, The quantities f a , f b , f s , and f do not change if we replace these clients with the set consisting of two clients located at the endpoints of the interval and having the same total weight and center of mass. Only four clients a, s, d, and b remain now. Simplification 4. Consider the client located on d. Move this client to the point s. Observe that f b does not decrease while f a , f s and f decrease by a same constant. Thus (3) still holds and then only three clients a, s and b remain now. By [9,10], we can know that a point on the line is a median if and only if the total weight of the clients located on one side of it is at most the total weight of the clients on the other side and at the point itself. Since Simplifications 1-4 preserve this property, the point s is still an optimal 1-median among the configuration {a, s, b}. Now normalize the coordinates of all points and let d(a, s) = x ≤ 12 . We have the following fact. Fact 1.w(a) < w(b). Proof. We write out explicitly the terms f a , f s , f : f a = xw(s) + w(b), f = xw(s), f s = xw(a) + (1 − x)w(b). Now by (3) we have f a > f s + f , that is xw(s) + w(b) > xw(s) + xw(a) + (1 − x)w(b) or w(a) < w(b) as desired. Simplification 5. Decrease the weight of the client s by w(s), while increase the weight of the client a by (1 − 2x)w(s) and remain the weight of the client b unchanged. Observe that f a and f b decrease by a same constant xw(s), and f s + f decrease by 2x2 w(s). Due to 0 ≤ x ≤ 12 , (3) still holds. Note also that, during the analysis of [19], this step is instead by decreasing the weights of the clients a and b by w = min(w(a), w(b)) = w(a). Now we have three clients: a = 0, s = x, 0 ≤ x ≤ 0.5, and b = 1 with the weights w(a), 0, and w(b), respectively. we write out explicitly the terms in the inequality (3): f a = w(b), f b = w(a), f s = xw(a) + (1 − x)w(b), f = 0. and then the inequality (3) is the following: min(w(a), w(b)) > xw(a) + (1 − x)w(b) this contradiction result completes the proof of the lemma.
Algorithm for One-Dimensional Incremental Median Problem
5
35
Conclusion
This paper presents a competitive algorithm for one dimensional incremental median problem. We have given an improved upper bound of 4 for this problem. There are still various open problems for future research. For example, the optimal lower and upper bound of the competitive ratio for this problem is still unknown.
References 1. Arora, S., Raghavan, P., Rao, S.: Approximation schemes for Euclidean k-medians and related problems. In: STOC 1998, pp. 106–113 (1998) 2. Arya, V., Garg, N., Khandekar, R., Munagala, K., Pandit, V.: Local search heuristics for k-median and facility location problems. In: STOC 2001, pp. 21–29 (2001) 3. Brandeau, M.L., Chiu, S.S.: An overview of representative problems in location research. Management Science 35(6), 645–674 (1989) 4. Chrobak, M., Hurand, M.: Better bounds for incremental medians. In: Kaklamanis, C., Skutella, M. (eds.) WAOA 2007. LNCS, vol. 4927, pp. 207–217. Springer, Heidelberg (2008) 5. Chrobak, M., Kenyon, C., Young, N.E.: Oblivious medians via online bidding. In: Correa, J.R., Hevia, A., Kiwi, M. (eds.) LATIN 2006. LNCS, vol. 3887, pp. 311–322. Springer, Heidelberg (2006) 6. Daskin, M. (ed.): Network and Discrete Location. Wiley, New York (1995) 7. Drezner, Z. (ed.): Facility Location: A Survey of Applications and Methods. Springer, New York (1995) 8. Drezner, Z., Hamacher, H. (eds.): Facility Location: Applications and Theory. Springer, Berlin (2002) 9. Goldman, A.J.: Optimal center location in simple networks. Transportation Science 5, 212–221 (1971) 10. Goldman, A.J., Witzgall, C.J.: A localization theorem for optimal facility location. Transportation Science 4, 406–409 (1970) 11. Guha, S., Khuller, S.: Greedy strikes back: Improved facility location algorithms. Journal of Algorithms 31, 228–248 (1999) 12. Hassin, R., Tamir, A.: Improved complexity bounds for location problems on the real line. Operations Research Letters 10, 395–402 (1991) 13. Jain, K., Mahdian, M., Saberi, A.: A new greedy approach for facility location problems. In: STOC 2002, pp. 731–740 (2002) 14. Lin., G.L., Nagarajan, C., Rajamaran, R., Williamson, D.P.: A general approach for incremental approximation and hierarchical clustering. In: SODA 2002. ACM/SIAM (2006) 15. Lin, J.H., Vitter, J.S.: -approximations with minimum packing constraint violation. In: STOC 1992, pp. 771–782 (1992) 16. Love, R.F., Morris, J.G., Wesolowsky, G.O. (eds.): Facilities Location: Models and Methods. North Holland, New York (1988) 17. Mettu, R.R., Plaxton, C.G.: The online median problem. SIAM Journal of Computing 32(3), 816–832 (2003) 18. Mirchandani, P., Francis, R. (eds.): Discrete location theory. Wiley Interscience, Hoboken (1990) 19. Shenmaier, V.V.: An Approximate Solution Algorithm for the One-Dimensional Online Median Problem. Journal of Applied and Industrial Mathematics 2(3), 421– 425 (2008)
Approximation Scheme for Scheduling Resumable Proportionally Deteriorating Jobs Wenchang Luo1, and Lin Chen2 1
2
Faculty of Science, Ningbo University, Ningbo, 315211, China
[email protected] College of Computer Science, Zhejiang University, Hangzhou, 310027, China
[email protected]
Abstract. In this paper, we investigate the problem of scheduling resumable proportionally deteriorating jobs on a single machine with a non-availability constraint. The goal is to minimize the total completion time. We show the problem is NP-hard. Furthermore, we present a fully polynomial time approximation scheme (FPTAS). Keywords: Scheduling; Complexity; Resumable; Non-availability.
1
Proportionally
deteriorating;
Introduction
Scheduling with deteriorating jobs and scheduling with machine non-availability constraints are two important variants of the traditional scheduling problems and have been extensively investigated in the last two decades. For recent related surveys, we refer readers to [1] and [9]. Since 2003, problems of scheduling deteriorating jobs on a single machine with the non-availability constraints have begun to receive considerable attention (see [4] [5] [6] [7] [11]). In such problems, job processing is interrupted by the non-availability periods of a machine, during which the maintenance, for example, takes place. Generally there are 2 different versions with respect to the job preemption by the non-availability periods. One is the resumable version, the other is the non-resumable version. In the resumable version the processing of one job is preempted by the nonavailability periods of the machine and can be resumed later at no extra cost when the machine becomes available again. But in the non-resumable version the job preemption is not allowed, i.e., once the processing of one job is interrupted by the non-availability periods of the machine, it has to be restarted after the machine is available again. Motivated by the work of Gawiejnowicz and Kononov [5], in this paper we consider the problem of scheduling resumable proportionally deteriorating jobs on a single machine with a non-availability constraint to minimize the total completion time. More detailed description of this model is as follows.
Supported in part by NFSC (11071215) and Science Foundation of Ningbo University (No. xk1061).
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 36–45, 2011. c Springer-Verlag Berlin Heidelberg 2011
Scheduling Resumable Proportionally Deteriorating Jobs
37
Problem statement. We are given a set of n proportionally deteriorating jobs J = {J1 , J2 , · · · , Jn } to be processed on a single machine, all of which are available to be processed at time t0 (> 0). The machine, however, is not available all the time. A non-availability period [s, d] of the machine is given in advance, and the processing of each job can be only preempted by this interval [s, d] and resumed without extra cost when the machine becomes available. Let pj and Cj denote the processing time and the completion time of job Jj respectively. By saying proportionally deteriorating job we mean pj is defined as pj = αj sj , where αj (> 0) is the deteriorating rate of job Jj and sj (≥ t0 ) its starting time. We aim to schedule all these jobs such that the total completion time is minimized. Following the three-field notation of Graham et al. [3], we denote the problem as 1, r − na|pj = αj sj | j Cj . Related work. For scheduling proportionally deteriorating jobs on a single machine without non-availability constraints, Mosheiov [8] show that arbitrary order of the jobs achieves the same makespan and the smallest-deteriorating-rate (SDR) first rule gives the minimum total completion time. For scheduling proportionally deteriorating jobs on a single machine with a non-availability constraint in the non-resumable version, Ji et al. [6] consider the problems with the objectives of minimizing makespan as well as total completion time. They show that both problems are NP-hard and admit pseudo-polynomial time exact algorithms. An FPTAS is presented for the problem of minimizing makespan and a heuristic algorithm with numeric experiments is proposed for the problem of minimizing total completion time. For scheduling proportionally deteriorating jobs on a single machine with a non-availability constraint in the resumable version, Wu and Lee [11] first show the problem of minimizing makespan can be solved using the 0 − 1 integer program technique. Some special cases when the 0 − 1 integer program could be solved efficiently are discussed in their paper, yet the computational complexity of the general problem remains unknown. Very recently, Gawiejnowicz and Kononov [5] also consider the same problem proposed by Wu and Lee [11] and show that it is weakly NP-hard and also propose an FPTAS. Furthermore, they prove that instead of a single non-availability period, if two or more non-availability periods are allowed, then no polynomialtime approximation algorithm with a constant worst-case ratio exists, unless P=NP. Our results. In this paper, we first show that the problem 1, r − na|pj = αj sj | j Cj is NP-hard through reduction from the subset production problem. We observe that, every feasible schedule has at most one job preempted by the non-availability period of the machine, thus our algorithm starts by guessing which job is preempted in the optimum solution. Once this job is determined, dynamic programming for the remaining job yield a pseudo-polynomial time exact algorithm, and through the framework proposed by Woeginger [10] with some elaborate modification an FPTAS could then be derived.
38
W. Luo and L. Chen
The remainder of the paper is organized as follows. In section 2 we introduce some definitions which will be used in subsequent section. In Section 3 we show the problem is NP-hard. In Section 4 we propose an FPTAS. Some concluding remarks are given in Section 5.
2
Preliminaries
In this section, we introduce a lemma and some definitions used in subsequent section. The following lemma is due to Mosheiov [8] and will be used in our analysis. Lemma 1. Let a machine starting from time t0 , execute jobs from set J without idle times, and let the processing times of the jobs be in the form of pj = αj sj for j ∈ J, where J denotes the set of indices of these jobs, then the completion time of the last job from set J is equal to t0 j∈J (1 + αj ) and it does not depend on the order of the jobs. For problem 1, r −na|pj = αj sj | j Cj , without loss of generality we can assume n that t0 j=1 (1 + αj ) > s, since otherwise by Mosheiov [8], the SDR order of jobs in the set J = {J1 , J2 , · · · , Jn } gives an optimal schedule for the problem 1, r − na|pj = αj sj | j Cj . Given a schedule π, let (π(1), π(2), · · · , π(n)) denote the permutation of schedule π. We define the job which has been started before and completed strictly larger than the starting time s of non-availability period as a critical job. For schedule π, let π(k) be a critical job, i.e., sπ(k) < s and Cπ(k) > s. Then according to the resumable definition by Wu and Lee [11], the completion time of job Jπ(k) can be described as CJπ(k) = t0 kj=1 (1 + απ(j) ) + d − s. Following [5], an approximation algorithm is called ρ−approximation algorithm, if for a real number ρ > 1 it returns a solution which is at most ρ times worse than the optimal one. A family of (1 + ε)−approximation algorithms is called a polynomial time approximation scheme (PTAS), if for an arbitrary real number ε > 0 the running time of any algorithm from this family is polynomial. If in addition the PTAS is running in polynomial time with respect to 1/ε, it is called a fully polynomial time approximation scheme (FPTAS).
3
The Complexity
In this section by using the subset production problem for the reduction we show the problem 1, r − na|pj = αj sj | j Cj is NP-hard. Theorem 1. The problem 1, r − na|pj = αj sj | j Cj is NP-hard. Proof. To show that the problem is NP-hard, we use the subset production problem [2] for the reduction. Subset Production Problem: Given a finite set R = {1, 2, · · · , r}, a positive integer xj ∈ Z + for each j ∈ R, and a positive integer B, does there exist
Scheduling Resumable Proportionally Deteriorating Jobs
39
a subset R1 ⊆ R such that the product of the integers of the elements in R1 satisfies j∈R1 xj = B ? Given an arbitrary instance Isp of the subset product problem, we construct = α s | the corresponding instance I of problem 1, r − na|p j j j j Cj . Let X = j∈R xj and A = X/B. There are n = r + 5 proportionally deteriorating jobs to be processed on a single machine such that αj = xj − 1 for j = 1, 2, · · · , r and 5 large jobs αr+1 = XA−1, αr+2 = XB−1, αr+3 = αr+4 = X 3 −1, αr+5 = X 6 −1. All jobs are available after t0 = 1. The non-available period [s, d] of the machine satisfies s = t0 X 5 + 1 and d = s + t0 X 11 . Let G = t0 X 2 + t0 X 5 + 2t0 X 11 + 2(r + 1)t0 X 13 + 2t0 X 16 . For the constructed instance I, we show that a schedule π such that j Cj (π) ≤ G exists if and only if the instance Isp has a solution. To prove our result, we need the following lemmas. Lemma 2. (Ji et al. [6]) For any subset R1 ⊂ R, we have B j∈R\R1 xj + A j∈R1 xj ≥ 2X, and the equality holds if and only if j∈R1 xj = B and j∈R\R1 xj = A. Lemma 3. If there exists a schedule π for the instance I of problem 1, r − na|pj = αj sj | j Cj with the total completion time Z(π) ≤ G, where Z(π) denote the total completion time of schedule π, then the following claims hold: – (1) Job Jr+5 is the critical job; – (2) one of the jobs Jr+3 and Jr+4 is started before the non-availability period, and the other after the non-availability period; – (3) one of the jobs Jr+1 and Jr+2 is started before the non-availability period, and the other after the non-availability period. Proof. (1) we claim that job Jr+5 must be started before the non-availability period. Since if Jr+5 are started after the non-availability period, then Cr+5 ≥ (t0 X 5 + 1 + t0 X 11 )(1 + αr+5 ) = t0 X 11 + X 6 + t0 X 17 > G, which achieves a contradiction. (2) Assume that jobs Jr+3 and Jr+4 are started before the non-availability period, then job Jr+5 must be started after the non-availability period, which achieves a contradiction. Assume that jobs Jr+3 and Jr+4 are started after the non-availability period, then at least one of their completion times will be greater than (t0 (1 + αr+5 ) + t0 X 11 )(1 + αr+3 )(1 + αr+4 ) = t0 X 11 + t0 X 17 > G, which also achieves a contradiction. Thus the claim holds. (3)Assume that jobs Jr+1 and Jr+2 are started before the non-availability period, then from (2), either job Jr+3 or Jr+4 are started before the non-availability period. Then the maximum completion time of these jobs will be no less than t0 X 6 (> s), which achieves a contradiction. Assume that jobs Jr+1 and Jr+2 are started after the non-availability period, similarly we can achieve a contradiction. Thus the claim also holds. Now we come back to the proof of theorem 1. Assume that there exists a subset R1 ⊂ R satisfying j∈R1 xj = B (i.e., j∈R2 xj = A, where R2 = R\R1 ). Let S1 and S2 denote the the subset of
40
W. Luo and L. Chen
jobs corresponding to R1 and R2 , respectively. Construct a schedule π in the following way: Starting from t0 , first schedule the jobs in S1 according to SDR order, and jobs Jr+1 , Jr+3 , Jr+5 , then schedule the jobs in S2 according to SDR order with jobs Jr+2 , Jr+4 following them. For simplicity we denote the schedule π as π = (S1 , Jr+1 , Jr+3 , Jr+5 , [s, d], Jr+5 , S2 , Jr+2 , Jr+3 ). It can be easily seen that job Jr+5 encounter the non-availability period and be preempted, then be resumed after the non-availability period. We shall show that j Cj (π) ≤ G. Clearly we have Cr+1 = t0 (1 + αj )(1 + αr+1 ) = t0 X 2 , j∈S1
Cr+3 = Cr+1 (1 + αr+4 ) = t0 X 5 , Cr+5 = Cr+5 (1 + αr+5 ) + t0 X 11 = 2t0 X 11 , (1 + αj )(1 + αr+2 ) = 2t0 X 13 , Cr+2 = Cr+5 j∈S2
Cr+4 = Cr+2 (1 + αr+4 ) = 2t0 X 16 . Because Cj < Cr+2 = 2t0 X 13 for j = 1, 2, · · · , r, we conclude Z(π) ≤
r j=1
Cj +
5
Cr+k < t0 X 2 +t0 X 5 +2t0 X 11 +2(r +1)t0 X 13 +2t0 X 16 = G.
k=1
Conversely, assume that there exists a schedule π such that Z(π) ≤ G. By Lemma 3 and the fact that jobs Jr+3 and Jr+4 are the same, we only need to consider two cases. Case 1. Jobs Jr+1 and Jr+3 are started before the non-availability period, and jobs Jr+2 and Jr+4 are started after the non-availability period; Case 2. Jobs Jr+2 and Jr+3 are started before the non-availability period, and jobs Jr+1 and Jr+4 are started after the non-availability period. ˆ {J1 , J2 , · · · , Jr }) denote the jobs started after Consider Case 1. Let S2 ⊂ J(= ˆ 2 . Then the the non-availability period except the 5 large jobs and S1 = J\S completion time of the job Jr+5 is Cr+5 = t0 (1 + αj )(1 + αr+1 )(1 + αr+3 )(1 + αr+5 ) + t0 X 11 j∈S1
= t0 X 10 (A
(1 + αj )) + t0 X 11 ,
j∈S1
and the completion time of the job Jr+4 is (1 + αj )) + t0 X 11 ) (1 + αj )(1 + αr+2 )(1 + αr+4 ) Cr+4 = (t0 X 10 (A j∈S1
j∈S2
Scheduling Resumable Proportionally Deteriorating Jobs
= t0 X 16 + t0 X 15 (B
41
(1 + αj )).
j∈S2
Hence, we have Z(π) > Cr+5 + Cr+4 = t0 X 10 (A
(1 + αj )) + t0 X 11 + t0 X 16
j∈S1 15
+t0 X (B
(1 + αj ))
j∈S2
= t0 X 11 + t0 X 16 + t0 X 15 (B −(t0 X 15 − t0 X 10 )(A
(1 + αj ) + A
j∈S2
(1 + αj ))
j∈S1
(1 + αj )).
j∈S1
5 ByLemma 3 we have t0 j∈S1 (1 + α j )(1 + αr+1 )(1 + αr+3 ) ≤ t0 X + 1, i.e., A j∈S1 (1 + αj ) ≤ X, which implies j∈S1 (1 + αj ) ≤ B. Now suppose there is nosolution for the instance Isp , then j∈S1 (1+α j ) < B. ByLemma 2, we have B j∈S2 xj + A j∈S1 xj > 2X, and thus B j∈S2 xj + A j∈S1 xj ≥ 2X + 1. With some simple calculations we conclude Z(π) > t0 X 11 + t0 X 16 + 2t0 X 16 + t0 X 15 − (t0 X 15 − t0 X 10 )(A
(1 + αj ))
j∈S1
> t0 X 11 + t0 X 16 + 2t0 X 16 + t0 X 15 − (t0 X 15 − t0 X 10 )X > 2t0 X 11 + 2t0 X 16 + t0 X 15 > G, which achieves a contradiction, thus j∈S1 (1 + αj ) = B, i.e., there exists a solution for instance Isp . For Case 2, the proof is similar to Case 1, and we omit it.
4
An FPTAS
In this section, we propose an FPTAS for the problem 1, r−na|pj = αj sj | j Cj . From the proof of the complexity, we know that choosing the right job to be the critical job is the most important, thus our algorithm starts by guessing the critical job of the optimum solution. For each guess a dynamic programming is then proposed, then utilizing the framework by Woeginger [10] with some elaborate modification we transform the dynamic programming into an FPTAS. The following lemma can be easily proved by using the interchange argument. Lemma 4. In the optimal schedule, the jobs scheduled before the critical job are scheduled according to the smallest deteriorating rate (SDR) first order, and so are the jobs after the critical job.
42
W. Luo and L. Chen
Dynamic programming Without loss of generality we assume the critical job in the optimal schedule is Jc and the corresponding deteriorating rate is αc . For the critical job Jc , clearly there exists n possible choices. For each choice, we execute the following dynamic programming. First we remove the critical job, then by Lemma 4 we renumber the remaining jobs according to SDR order, i.e., α1 ≤ α2 ≤, · · · , ≤ αn−1 . Consider the first i jobs (0 ≤ i ≤ n − 1), we use a five-dimensional vector [i, F1 , F2 , Z1 , Z2 ] as a state to encode a schedule, where i denotes the first i jobs that we currently scheduled, F1 denotes the maximum completion time of jobs completed before the non-availability period (i.e., before s), F2 denotes the maximum product j:sj >d (1 + αj ) of jobs started after the non-availability period (i.e., after d) and Z1 denotes the the total completion time of all the jobs completed before s, Z2 denotes the sum of product j:sj >d (1 + αj ) of all the jobs started after d. The state space V Si consists of all five-dimensional vectors for schedules for the first i jobs. For i = 1, the state space contains [1, t0 (1+α1 ), 1, t0 (1+α1), 1] and [1, t0 , (1+α1 ), 0, (1+α1 )] two elements. For i ≥ 2, every state [i−1, F1 , F2 , Z1 , Z2 ] in state space V Si−1 can be extended either by assigning job Ji before s or by assigning job Ji after d. This yields the following two states in V Si : [i, F1 + αi F1 , F2 , Z1 + (1 + αi )F1 , Z2 ] and [i, F1 , F2 (1 + αi ), Z1 , Z2 + F2 (1 + αi )]. States with F1 ≤ s are called feasible and all unfeasible states are then deleted. To the end, for each choice on the critical job (at most n choices), we obtain the objective value from V Sn−1 by minimizing Z = Z1 +F1 (1+αc )+d−s+(F1 (1+αc )+d−s)F2 for all [n − 1, F1 , F2 , Z1 , Z2 ] ∈ V Sn−1 and in last choose the minimal objective value as the optimal solution. The above dynamic programming runs in O(n4 s2 ( nj=1 (1 + αj ))2 ) time and is pseudo-polynomial. Next we describe the details about how to transform the above dynamic programming into an FPTAS by applying the framework proposed by Woeginger [10] with elaborate modification. Now, we provide the Algorithm H1 as follows. Algorithm H1 Step 1. For each choice on the critical job Jc = {J1 , J2 , · · · , Jn }, first we remove the critical job, then renumber the remaining jobs according to SDR order, i.e., α1 ≤ α2 ≤, · · · , ≤ αn−1 . Step 2. Let Δ = 1 + ε/(2(n − 1)), we split – the interval [t0 , s] into q1 = logΔ s/t0 subintervals [t0 , t0 Δ], · · · , [t0 Δk , t0 Δk+1 ], · · · , [t0 Δq1 −1 , s]; n−1 n−1 – the interval [1, j=1 (1 + αj )] into q2 = logΔ j=1 (1 + αj ) subintervals n−1 [1, Δ], · · · , [Δk , Δk+1 ], · · · , [Δq2 −1 , j=1 (1 + αj )]; – the interval [t0 , (n − 1)s] into q3 = logΔ(n − 1)s/t0 subintervals [t0 , t0 Δ], · · · , [t0 Δk , t0 Δk+1 ], · · · , [t0 Δq3 −1 , (n − 1)s];
Scheduling Resumable Proportionally Deteriorating Jobs
43
n−1 n−1 – and the interval [1, (n − 1) j=1 (1+αj )] into q4 = logΔ (n − 1) j=1 (1 + αj ) n−1 subintervals [1, Δ], · · · , [Δk , Δk+1 ], · · · , [Δq4 −1 , (n − 1) j=1 (1 + αj )] . Then we construct a four-dimension grid with the boxes Ik1 k2 k3 k4 , 1 ≤ k1 ≤ q1 , 1 ≤ k2 ≤ q2 , 1 ≤ k3 ≤ q3 , 1 ≤ k4 ≤ q4 . Step 3. Let V S1 = V S1 = {[1, t0 (1 + α1 ), 1, t0 (1 + α1 ), 1], [1, t0 , 1 + α1 , 0, 1 + α1]}. , do the For i ∈ {2, 3, · · · , n − 1}, for every state [i − 1, F1 , F2 , Z1 , Z2 ] in V Si−1 following. 1. If F1 + αi F1 ≤ s, put [i, F1 + αi F1 , F2 , Z1 + (1 + αi )F1 , Z2 ] into V Si . 2. Put [i, F1 , F2 (1 + αi ), Z1 , Z2 + (1 + αi )F2 ] into V Si . For the states in the same box we choose the state with minimum F1 and remove all the other states, i.e., reduce the state space V Si into V Si . Step 4. Output the vector [n − 1, F1 , F2 , Z1 , Z2 ] that minimize the value Z = Z1 + (F1 (1 + αc ) + d − s) + (F1 (1 + αc ) + d − s)Z2 and denote the corresponding schedule as π(c). Step 5. Output the schedule π = arg min1≤c≤n Z(π(c)) as the solution, where Z(π(c)) denote the objective value of schedule π(c). To show that Algorithm H1 is an FPTAS for the problem 1, r − na|pj = αj sj | j Cj , we give the following lemmas.
Lemma 5. Every state [i, F1 , F2 , Z1 , Z2 ] in the (un-reduced) state space V Si satisfies F1 ≤ F1 ≤ F1 Δi , F2 /Δi ≤ F2 ≤ F2 Δi , Z1 /Δi ≤ Z1 ≤ Z1 Δi and Z2 /Δi ≤ Z2 ≤ Z2 Δi , where the state [i, F1 , F2 , Z] is in the reduced state space V Si . Proof. For i = 1, we have V Si = V Si . Hence, the statement is trivial. Now assume that the statement is true up to i − 1. Consider an arbitrary state [i, F1 , F2 , Z1 , Z2 ] in V Si . The dynamic program ming algorithm puts the state [i, F1 , F2 , Z1 , Z2 ] into V Si when it assign job Ji from some feasible state for the first i − 1 jobs. Let [i − 1, F1∗ , F2∗ , Z1∗ , Z2∗ ] be the feasible state that yields the state [i, F1 , F2 , Z1 , Z2 ]. Two cases can be dis tinguished: either [i, F1 , F2 , Z1 , Z2 ] = [i, F1∗ + αi F1∗ , F2∗ , Z1∗ + (1 + αi )F1∗ , Z2∗ ] or [i, F1 , F2 , Z1 , Z2 ] = [i, F1∗ , F2∗ + αi F2∗ , Z1∗ , Z2∗ + (1 + αi )F2∗ ].
Case 1. [i, F1 , F2 , Z1 , Z2 ] = [i, F1∗ + αi F1∗ , F2∗ , Z ∗ + (1 + αi )F1∗ , Z2∗ ]. Since [i − 1, F1∗ , F2∗ , Z1∗ , Z2∗ ] ∈ V Si−1 , there exists [i − 1, F1 , F2 , Z1 , Z2 ] ∈ such that F1 ≤ F1∗ ≤ F1 Δi−1 , F2 /Δi−1 ≤ F2∗ ≤ F2 Δi−1 , Z1 /Δi−1 ≤ V Si−1 ∗ Z1 ≤ Z1 Δi−1 and Z2 /Δi−1 ≤ Z2∗ ≤ Z2 Δi−1 . Consequently, the state [i, F1 + αi F1 , F2 , Z1 + (1 + αi )F1 , Z2 ] is generated. However, it may be removed when the state space is reduced. Let [i, F1 , F2 , Z1 , Z2 ] be the state chosen in V Si such that it is in the same box with [i, F1 + αi F1 , F2 , Z1 + (1 + αi )F1 , Z2 ], i.e., F1 ≤ F1 + αi F1 ≤ F1 Δ, F2 /Δ ≤ F2 ≤ F2 Δ, Z1 /Δ ≤ Z1 + (1 + αi )F1 ≤ ZΔ and Z2 /Δ ≤ Z2 + (1 + αi )F1 ≤ Z2 Δ. With some simple calculations we have
44
W. Luo and L. Chen
F1 ≤ F1∗ +αi F1∗ ≤ F1 Δi , F2 /Δi ≤ F2∗ ≤ F2 Δi , Z1 /Δi ≤ Z1∗ +(1+αi )F1∗ ≤ Z1 Δi and Z2 /Δi ≤ Z2∗ ≤ Z2 Δi .
Case 2. [i, F1 , F2 , Z1 , Z2 ] = [i, F1∗ , F2∗ + αi F2∗ , Z1∗ , Z2∗ + (1 + αi )F2∗ ]. The proof is similar to Case 1. We omit it.
Lemma 6. The size of every reduced state space V Si is polynomial bounded by O(n7 (logD)4 /ε4 ), where D = max{s, (1 + αj ), j = 1, · · · , n}. Proof. Clearly, when Algorithm H1 is executed, every box in four-dimension grid contains at most one state, there are at most logΔ q1 logΔ q2 logΔ q3 logΔ q4 boxes, i.e., every state space V Si contains at most logΔ q1 logΔ q2 logΔ q3 logΔ q4 states. Then the size of V Si is bounded from above by logΔ q1 logΔ q2 logΔ q3 logΔ q4 ≤ O(n7 (logD)4 /ε4 ). Lemma 7. Algorithm H1 is an FPTAS running in O(n9 (logD)4 /ε4 ) time. Proof. Let Jc∗ be the critical job and [n − 1, F1∗ , F2∗ , Z1∗ , Z2∗ ] be the state that yields the optimal objective value, then Z ∗ = Z1∗ + (F1∗ (1 + α∗c ) + d − s) + (F1∗(1 + in which the α∗c ) + d − s)Z2∗ . Clearly there exists a reduced state space V Sn−1 critical job is Jc∗ . By Lemma 5, V Sn−1 contains a state [n − 1, F1 , F2 , Z1 , Z2 ] such that F1 ≤ F1∗ , F2 ≤ F2∗ Δn−1 , Z1 ≤ Z1∗ Δn−1 , Z2 ≤ Z2∗ Δn−1 . Let Z = Z1 + (F1 (1 + α∗c ) + d − s) + (F1 (1 + α∗c ) + d − s)Z2 . Thus Z ≤ Z1∗ Δn−1 + (F1∗ (1 + α∗c ) + d − s) + (F1∗ (1 + α∗c ) + d − s)Z2∗ Δn−1 , i.e., Z ≤ Z ∗ Δn−1 ≤ Z ∗ (1 + ε/(2(n − 1))n−1 ≤ (1 + ε)Z ∗ , where the inequality (1 + x/m)m ≤ 1 + 2x for real numbers x with 0 ≤ x ≤ 1 and for integer m ≥ 1 is adopted. Clearly by Step 5 in Algorithm H1 we have Z(π) ≤ (1 + ε)Z ∗ . Because there is at most n choices for the critical job, by Lemma 6 Algorithm H1 runs in O(n9 (logD)4 /ε4 ) time.
5
Concluding Remarks
In this paper, we studied the problem of scheduling resumable proportionally deteriorating jobs on a single machine with a non-availability period. The goal is to minimize the total completion time. We show that the problem is NP-hard. Furthermore, we propose an fully polynomial time approximation scheme. It is challenging to design a fast approximation algorithm with the worst-case ratio of 2.
References 1. Cheng, T.C.E., Ding, Q., Lin, B.M.T.: A concise survey of scheduling with timedependent processing time. European Journal of Operation Research 152, 1–13 (2004) 2. Garey, M.R., Johnson, D.S.: Computer and Intractability: A Guide to the Theory of NP-Completeness. Freeman, San Francisco (1979)
Scheduling Resumable Proportionally Deteriorating Jobs
45
3. Graham, R.L., Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G.: Optimization and approximation in deterministic sequencing and scheduling: A survey. Annals of Discrete Mathematics 5, 287–326 (1979) 4. Gawiejnowicz, S.: Scheduling deteriorating jobs subject to job or machine availability constraints. European Journal of Operational Research 180, 472–478 (2007) 5. Gawiejnowicz, S., Kononov, A.: Complexity and approximability of scheduling resumable proportionally deteriorating jobs. European Journal of Operational Research 200, 305–308 (2010) 6. Ji, M., He, Y., Cheng, T.C.E.: Scheduling linear deteriorating jobs with an availability constraint on a single machine. Theoretical Computer Science 362, 115–126 (2006) 7. Ji, M., Cheng, T.C.E.: Scheduling resumable simple linear deteriorating jobs on a single machine with an availability constraint to minimize makespan. Computers & Industrial Engineering 59(4), 794–798 (2010) 8. Mosheiov, G.: Scheduling jobs under simple linear deterioration. Computers & Operations Research 21, 653–659 (1994) 9. Ma, Y., Chu, C., Zuo, C.: A survey of scheduling with deterministic machine availability constraints. Computers & Industrial Engineering 58, 199–211 (2010) 10. Woeginger, G.J.: When does a dynamic programming formulation guarantee the existence of a fully polynomial time approximation scheme (FPTAS)? Informs Journal on Computing 12, 57–75 (2000) 11. Wu, C.C., Lee, W.C.: Scheduling linear deteriorating jobs to minimize makespan with an availability constraint on a single machine. Information Processing Letters 87, 89–93 (2003)
An Improved Approximation Algorithm for the Complementary Maximal Strip Recovery Problem Zhong Li1 , Randy Goebel1 , Lusheng Wang2 , and Guohui Lin1, 1
Department of Computing Science, University of Alberta, Edmonton, Alberta T6G 2E8, Canada 2 Department of Computer Science, City University of Hong Kong, Kowloon, Hong Kong, China {zhong4,rgoebel,guohui}@ualberta.ca,
[email protected]
Abstract. Given two genomic maps G1 and G2 each represented as a sequence of n gene markers, the maximal strip recovery (MSR) problem is to retain the maximum number of markers in both G1 and G2 such that the resultant subsequences, denoted as G∗1 and G∗2 , can be partitioned into the same set of maximal strips, which are common substrings of length greater than or equal to two. The complementary maximal strip recovery (CMSR) problem has the complementary goal to delete the minimum number of markers. Both MSR and CMSR have been shown NP-hard and APX-complete, and they admit a 4-approximation and a 3-approximation respectively. In this paper, we present an improved 7 -approximation algorithm for the CMSR problem, with its worst-case 3 performance analysis done through a sequential amortization. Keywords: Maximal strip recovery, approximation algorithm, sequential amortized analysis.
1
Introduction
In comparative genomics, one of the first steps is to decompose two given genomes into syntenic blocks — segments of chromosomes that are deemed homologous in the two input genomes. Many decomposition methods have been proposed, but they are vulnerable to ambiguities and errors, which are isolated points that do not co-exist with other points in genomic maps [4,10]. The maximal strip recovery (MSR) problem was formulated for eliminating these noise and ambiguities. In the more precise formulation, we are given two genomic maps G1 and G2 each represented as a sequence of n distinct gene markers (which form the alphabet Σ), and we want to retain the maximum number of markers in both G1 and G2 such that the resultant subsequences, denoted as G∗1 and G∗2 , can be partitioned into the same set of maximal strips, which are common substrings of length greater than or equal to two. Each retained marker thus belongs to
Correspondence author.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 46–57, 2011. c Springer-Verlag Berlin Heidelberg 2011
Approximating the Complementary MSR Problem
47
exactly one of these substrings, which can appear in the reversed and negated form and are taken as nontrivial chromosomal segments. The deleted markers are regarded as noise or errors. The MSR problem, and its several close variants, have been shown NPhard [9,2,3]. More recently, it is shown to be APX-complete [6], admitting a 4-approximation algorithm [3]. This 4-approximation algorithm is a modification of an earlier heuristics for computing a maximum clique (and its complement, a maximum independent set) [4,10], to convert the MSR problem to computing the maximum independent set in t-interval graphs, which admits a 2t-approximation [1,3]. In this paper, we investigate the complementary optimization goal to minimize the number of deleted markers — the complementary MSR problem, or CMSR for short. CMSR is certainly NP-hard, and was proven to be APX-complete recently [7], admitting a 3-approximation algorithm [5]. Our main result is an improved 73 -approximation algorithm for CMSR. As we will show later, the key design technique is a local greedy scheme to retain the most possible isolates while deleting some isolate(s); and the performance ratio is proven using a novel technique called delayed sequential amortized analysis. Some preliminary ideas of the design and analysis have appeared in [5].
2
Preliminaries
In the sequel, we use a lower case letter to denote a gene marker. A negation sign together with the succeeding gene indicate that the gene is in its reversed and negated form. We reserve the bullet symbol “•” for connection use, that is, a • b means gene b comes directly after gene a (in a specific sequence). When a common substring (also called strip, or syntenic block) of the two current target sequences (G1 and G2 , or their remainders after deleting some letters) is specified, it is of length greater than or equal to two, unless otherwise explicitly stated that it is a single letter; The substring will (often) be labeled using a capital letter. We abuse this capital letter a bit to also denote the set of gene markers in the substring, when there is no ambiguity. We present several important structural properties of the CMSR problem in this section, which are used in the design of the approximation algorithm and its performance analysis in the next section. We first look at a warm-up instance. In this instance, G1 = a, b, c, d, e, f, g, h, i, j, k, and G2 = −i, −d, −g, −f, h, a, c, b, −, −k, −j, −e (commas are used to separate the gene markers for easier reading). By deleting markers c, d, e, and h from both G1 and G2 , the remainder sequences are G∗1 = a, b, f, g, i, j, k, and G∗2 = −i, −g, −f, a, b, −, −k, −j. These two remainder sequences can be decomposed into three maximal common substrings S1 = a • b, S2 = f • g • i (appearing in the reversed and negated form in G∗2 ), and S3 = j • k • (appearing in the reversed and negated form in G∗2 ). In the rest of the paper, we use OP T to denote an optimal solution to the instance of the CMSR problem. That is, OP T is a minimum-size subset of letters that, deleting them from G1 and G2 gives the remainder sequences, denoted G∗1 and G∗2 , respectively, which can be partitioned into maximal common substrings.
48
Z. Li et al.
Given any CMSR instance, in at most quadratic time, we can determine all maximal common substrings of G1 and G2 (of length at least two) and the isolated letters that do not belong to any of the common substrings. We use unit to refer to a maximal common substring or an isolated letter. A unit and its reversed and negated form are considered identical. The above determined units form a common partition of G1 and G2 , i.e., every letter occurs in exactly one of these units. For ease of presentation, these maximal common substrings are called type-0 substrings; the isolated letters are called isolates. Note that every letter appears exactly once in each of the two sequences G1 and G2 ; for distinction purpose we use an isolate copy to refer to exactly one copy of the isolate. In our algorithm Approx-CMSR to be presented in the next section, all the type-0 substrings are kept in the final sequences and our goal is to eliminate the isolates, by either deleting them from the input sequences, or to “merge” them into substrings while deleting some other isolates from the input sequences. Here “merging” refers to either appending an isolate to some existing substring, or forming two isolates into a novel common substring, which is called a type-1 substring. Lemma 1. [5] For any CMSR instance, there exists an optimal solution OP T such that 1) for each type-0 substring S, either S ⊆ OP T or S ∩ OP T = ∅; 2) if |S| ≥ 4, then S ∩ OP T = ∅. The above Lemma 1 tells that in the optimal solution, for every type-0 substring, either all its letters are deleted or none of them is deleted. We partition OP T into a subset O3 of length-3 type-0 substrings, a subset O2 of length-2 type-0 substrings, and a subset O1 of isolates: OP T = O3 ∪ O2 ∪ O1 . These substrings and isolates are referred to as units of OP T in the sequel. 2.1
Favorable Operations
Consider an isolate x in the given sequences G1 and G2 . For ease of presentation we append an imaginary type-0 substring H to the head of G1 and to the tail of G2 , and another imaginary type-0 substring T to the tail of G1 and to the head of G2 . It follows that x has exactly four neighboring letters in G1 and G2 — duplicates are counted separately. Assume without loss of generality that the two neighboring letters in G1 are a and b, and the two neighboring letters in G2 are c and d. In the most extreme case, {a, b, c, d} reduces to a set of two isolates (see the first row in Table 1) and deleting x enables the merging of a and b into a novel length-2 substring. (Remark: There is another possible configuration where a • x • b appears in G1 and a • −x • b appears in G2 , which can be identically discussed. For the same reason, in the following operations, reversed and negated gene form is skipped.) Such a scenario is favorable in the sense that a gain of one letter is achieved — deleting one while keeping two. Our algorithm ApproxCMSR will execute the deleting and the subsequent merging, referred to as an operation 1, which is given the top priority.
Approximating the Complementary MSR Problem
49
In another interesting case, a • b appears in G2 and c • d appears in G1 . When these four letters are distinct isolates (see the second row in Table 1), then deleting x enables the merging of a and b and the merging of c and d into two novel length-2 substrings. Such a scenario is also favorable for a gain of three letters. Our algorithm Approx-CMSR will execute the deleting and the subsequent merging, referred to as an operation 2, which is also given the top priority. Table 1. Nine different isolate elimination operations with three levels of priorities, where a smaller number indicates a higher priority. In these operations, lower case letters are isolates, while the capital ones are existing substrings. Priority Operation Local configuration 1
1
. . . aj • xj • bj . . . . . . − bj • xj • −aj . . .
2
. . . aj • xj • bj . . . cj • dj . . . . . . aj • bj . . . cj • xj • dj . . .
3
. . . aj • xj • bj . . . cj • S . . . . . . aj • bj . . . cj • xj • S . . .
4
. . . aj • xj • S1 . . . cj • S2 . . . . . . aj • S1 . . . cj • xj • S2 . . .
5
. . . aj • xj • S . . . . . . aj • S . . .
6
Comments Uj = {xj }; Vj = {aj , bj } aj , bj , cj , dj distinct; Uj = {xj }; Vj = {aj , bj , cj , dj } aj , bj , cj distinct; Uj = {xj }; Vj = {aj , bj , cj } Uj = {xj }; Vj = {aj , cj }
Uj = {xj }; Vj = {aj } a , b , c , d , e distinct; . . . aj • xj • bj • yj • cj . . . dj • ej . . . j j j j j Uj = {xj , yj }; . . . aj • bj • cj . . . dj • xj • yj • ej . . . Vj = {aj , bj , cj , dj , ej }
2
7
. . . aj • xj • bj . . . . . . aj • bj . . .
3
8
. . . aj • xj • yj • bj . . . . . . aj • bj . . .
9
. . . aj • xj • bj . . . . . . aj • yj • bj . . .
Uj = {xj }; Vj = {aj , bj } Uj = {xj , yj }; Vj = {aj , bj } Uj = {xj , yj }; Vj = {aj , bj }
If exactly one of these four letters, say d, resides in an existing substring S and the other three are distinct isolates (see the third row in Table 1), then deleting x enables the merging of a and b and the appending of c to S. This scenario is also favorable in the sense that a gain of two letters is achieved. Our algorithm Approx-CMSR will execute the deleting and the subsequent merging
50
Z. Li et al.
and appending, referred to as an operation 3, which is given the top priority too. If exactly two of these four letters reside in substrings (see the 4th row in Table 1) such that deleting x enables two separate appending of the neighboring isolates to the two substrings respectively, it is also favorable for a gain of one letter. Approx-CMSR will execute the deleting and the subsequent appending, referred to as an operation 4, which is given the top priority too. There are two other top priority operations. In an operation 5, deleting x enables one appending of a neighboring isolate to a substring, for zero gain of letters (see the 5th row in Table 1). As one sees, both operations 3 and 4 are special cases of an operation 5, with additional gains out of deleting the other copy of isolate x. In an operation 6, the neighborhood of isolate x overlaps with the neighborhood of another isolate y (see the 6th row in Table 1), such that deleting x and y simultaneously enables the formation of a novel length-2 substring and a novel length-3 substring, using the involved five distinct neighboring isolates in the union of the two neighborhoods. An operation 6 has a gain of three letters. Notice that wherever an operation 6 can be applied, deleting one and only one of x, y, and b enables a merging of two its neighboring isolates into a novel length-2 substring. For example, from the 6th row in Table 1, deleting b enables the merging of x and y. It is however very important to recognize that in this scenario both x and y should be deleted. The operation 7, in which one isolate is deleted and its two neighboring isolates are merged into a novel length-2 substring (see the 7th row in Table 1), has a lower priority than all the above six operations. This might look odd since an operation 7 has a gain of one letter, seemingly better than an operation 5; but giving it a lower priority is crucial in the proof of performance guarantee in Lemma 9, where we cannot afford to execute an operation 7 to delete isolate b and form substring x • y, which prevents the formation of substrings a • c and d • e. Also as one sees (analogous to operations 3 and 4 against an operation 5), both operations 2 and 3 are special cases of an operation 7, with additional gains out of deleting the other copy of isolate x. The last two operations have the lowest priority, in both of which two isolates x and y are deleted and (only) one novel length-2 substring is formed using their two neighboring isolates a and b. In an operation 8, x and y reside in between a and b in one sequence, while a and b are adjacent in the other sequence (see the 8th row in Table 1); In an operation 9, x and y reside in between a and b separately one in each of the two sequences (see the 9th row in Table 1). These two operations must have a lower priority than an operation 7, which means the removal of the other copy of x or y does not save any other isolate, a condition used in the proofs of their performance guarantees in Lemma 9.
3
A 73 -Approximation Algorithm
We assume at hand an optimal solution OP T stated in Lemma 1, and it is partitioned into O3 , O2 , and O1 .
Approximating the Complementary MSR Problem
3.1
51
The Approx-CMSR Algorithm
In the first step of our approximation algorithm, denoted as Approx-CMSR, it retains all type-0 substrings. That is, Approx-CMSR will only delete isolates from the input sequences (in the second and the third steps). In the second step, Approx-CMSR iteratively removes one or two isolates; the candidate isolates have to be in one of the nine cases listed in Table 1, and the one with the top priority is chosen (tie breaks arbitrarily) for removal at the time of consideration. In each of the nine cases, the isolate removal can give rise to a novel length-2 or length-3 common substring to the remainder sequences (all except operations 4 and 5), and/or allow an isolate to be appended to an existing common substring in the remainder sequences (operations 3, 4, and 5). If a novel common substring is formed, it is referred to as a type-1 substring; if an existing substring is extended, it retains its type for ease of presentation. The involved isolates, in either scenario, lose their isolate identity and are retained by Approx-CMSR. Algorithm Approx-CMSR: Input: two sequences (permutations) G1 and G2 on the same set of letters. Output: two subsequences of G1 and G2 respectively, that can be partitioned into maximal common substrings of length at least 2. 1. Determines all type-0 substrings of G1 and G2 , and retains them; 2. While (there are feasible operations in the current sequences G1 and G2 ), do 2.1. finds an operation of the currently highest priority; 2.2. removes the letters of Uj from G1 and G2 ; 2.3. retains the letters of Vj in G1 and G2 by forming appropriate substrings; 3. Deletes all the remaining isolates from G1 and G2 . Fig. 1. A high-level description of the algorithm Approx-CMSR
Let U = {U1 , U2 , . . . , Um }, where Uj denotes the set of isolates deleted by Approx-CMSR in the j-th iteration of the second step. Associated with each Uj , for j = 1, 2, . . . , m, let Vj denote the set of isolates that are retained by ApproxCMSR in the j-th iteration. In Table 1, the Uj and Vj for each of the nine operations are specified. Let R denote the set of remaining isolates at the time the algorithm finds no operations to execute (at the end of the m-th iteration). In the third (the last) step of the algorithm, Approx-CMSR deletes all letters of R from the two sequences. A high-level description of the algorithm Approx-CMSR is depicted in Figure 1. 3.2
Performance Analysis
m Let U = ∪m j=1 Uj and V = ∪j=1 Vj . The following two lemmas state some preliminary observations on algorithm Approx-CMSR.
52
Z. Li et al.
Lemma 2. The set of all isolates is the union of the disjoint sets U1 , U2 , . . . , Um , V1 , V2 , . . . , Vm , and R, that is, U ∪ V ∪ R; Algorithm Approx-CMSR deletes exactly all isolates of U ∪ R. Lemma 3. (Once adjacent, always adjacent) In the j-th iteration of algorithm Approx-CMSR, for j = 1, 2, . . . , m, if two letters aj and bj (at least one of them is an isolate of Vj , while the other can be in Vj too or inside an existing substring) are made adjacent into a common substring, then aj and bj are maintained adjacent toward the termination of the algorithm. Moreover, in the two original input sequences G1 and G2 , all the letters in between aj and bj belong to ∪ji=1 Ui . Lemma 4. Assume two letters aj and bj are made adjacent into a common substring in the j-th iteration of algorithm Approx-CMSR, for some j = 1, 2, . . . , m. If both aj and bj are kept in G∗1 and G∗2 but they are not adjacent to each other, then they do not reside in the same substring of G∗1 and G∗2 . Proof. Due to space limit, the detailed proof is provided in [8].
We use W to denote the set of such isolates aj ∈ Vj − O1 , which is adjacent to bj in the Approx-CMSR output but does not reside with bj in the same substring of G∗1 and G∗2 . Note that there are two possible cases, in one case bj is not kept in G∗1 and G∗2 at all, while in the other case bj is kept but resides in a different substring. We have the following lemma. Lemma 5. For any j = 1, 2, . . . , m, if O1 ∩ (Uj ∪ Vj ) = ∅, then Vj ⊆ W . Proof. Due to space limit, the detailed proof is provided in [8].
In the sequel, we estimate the size of U ∪ R in terms of the size of OP T . We do this by attributing all isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 , where V 8 is defined after Definition 1 as a subset of V , to the letters of OP T , through a sequential amortized analysis, and prove that every letter of OP T is attributed with at most 73 isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 . Note that W ⊆ (V − O1 ). When an isolate x of U ∪R and an isolate w of W are identified as a pair, we say they cancel out each other in the sense that, to whichever letter o ∈ OP T w is attributed, w is replaced by x at the end of the attribution process. That is, these attributed isolates of W relay the isolates of U ∪ R during the attribution process. For ease of presentation, we create a bin B to load the letters of OP T once they are proven to be attributed with 73 isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 . Consider the inverse process of deleting units of OP T from G1 and G2 to obtain the optimal subsequences G∗1 and G∗2 . In this inverse process, we add the units of OP T back to G∗1 and G∗2 using their original positions in G1 and G2 to re-construct G1 and G2 . At the beginning of this process, there are no isolated letters in G∗1 and G∗2 ; each isolate of U ∪ V ∪ R thus either is a unit of O1 , or is in some substring of G∗1 and G∗2 but then singled out at some point of the inverse process when inserting a unit of OP T back into G∗1 and G∗2 , which breaks the substring (or one of its fragments if already broken) into fragments, one of which is the single isolate. In either case, when the isolate is known to be in U ∪ R ∪ (V − O1 ) ∪ V 8 , it is
Approximating the Complementary MSR Problem
53
generated by the inserting unit of OP T and is thus attributed to the unit. Since there could be multiple units of OP T that are able to single out this particular isolate, we will set up the conditions for proper attribution, according to the order of the isolates deleted by algorithm Approx-CMSR. At any time of the process, inserting one unit of OP T back to the current G1 and G2 can generate at most four single-letter fragments, since in the worst case two current length-2 substrings, one in each of current sequences G1 and G2 , can be broken into four such fragments. We firstly insert units of O3 and O2 , one by one; all the isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 that are singled out by inserting a unit of O3 ∪ O2 are attributed to the unit. Lemma 6 summarizes this fact that every letter in a unit/substring of O3 ∪ O2 is classified into B. The resultant sequences are denoted as G01 and G02 . Lemma 6. Every letter in a substring of O3 ∪ O2 is in B. Proof. Due to space limit, the detailed proof is provided in [8].
Consider an isolate x ∈ U ∪ R that resides in a common substring of G01 and G02 . Let x • y be the adjacency in G01 and G02 , such that in the inverse process when it is broken x becomes an isolated letter. Since inserting all units of O1 has to single x out, we conclude that there are units of O1 residing in between x and y in the original sequences G1 and G2 . Denote this subset of units of O1 as X, inserting each of which back into G01 and G02 will break the adjacency between x and y. If X contains more than one unit, then two of them are attributed with half of x each; If X contains exactly one unit, then this unit is attributed with the whole x. This is the attributed rule to be followed in the subsequent inverse process. We next insert isolates of O1 ∩ (Uj ∪ Vj ) back into G01 and G02 , for j = 1, 2, . . . , m, sequentially, and show that they all belong to bin B. Right after inserting isolates of O1 ∩ (Uj ∪ Vj ), the achieved sequences are denoted as Gj1 and Gj2 . We emphasize that this sequential order is very important, as we need it in the proof of Lemma 9, each of which counts the number of isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 that are attributed to the isolates of O1 ∩ (Uj ∪ Vj ), when one of the nine different operations is executed in the j-th iteration of algorithm Approx-CMSR. Lemma 7. For any j = 1, 2, . . . , m, 1) a letter of Uj and a letter not of Uj cannot reside in the same substring of Gj1 and Gj2 ; 2) except that algorithm Approx-CMSR executes an operation 8 in the j-th iteration, letters of Uj are isolates in Gj1 and Gj2 . Proof. Due to space limit, the detailed proof is provided in [8].
Lemma 8. In the j-th iteration of algorithm Approx-CMSR, for j = 1, 2, . . . , m, assume two letters aj and bj are made adjacent into a common substring. If aj ∈ W and aj • z is an adjacency in G∗1 and G∗2 such that z ∈ / Uj , then this j−1 and G . adjacency is not broken by inserting bj into Gj−1 1 2
54
Z. Li et al.
Proof. Notice that if bj is in G∗1 and G∗2 , then it is not inserted into Gj−1 and 1 ∗ ∗ Gj−1 . So the lemma holds when b is kept in G and G , which resides in a j 1 2 2 different substring from aj . j−1 Consider first the case Uj ⊆ O1 . Note that all letters of ∪j−1 i=1 Ui are in G1 j−1 and G2 ; and by Lemma 7 for each i = 1, 2, . . . , j − 1, the letters of Ui are either isolated letters or they form a length-2 substring. Therefore, in Gj−1 and Gj−1 , 1 2 there is no adjacency at aj involving another letter in between aj and bj in the original sequences G1 and G2 , since by Lemma 3 such a letter belongs to ∪j−1 i=1 Ui . j−1 j−1 If bj ∈ O1 and aj is adjacent to a letter z in G1 and G2 , we claim that z resides at the opposite side of aj with respect to bj (in both original sequences G1 and G2 ); for otherwise, bj is closer to aj than z and thus inserting bj alone into G∗1 and G∗2 achieves a better than optimum solution, a contradiction. It follows that inserting bj changes nothing to this adjacency. In the other case of Uj − O1 = ∅, for the same reason as in the first case, if bj ∈ O1 and aj is adjacent to a letter z ∈ / Uj in Gj−1 and Gj−1 1 2 , then z resides at the opposite side of aj with respect to bj (in both original sequences G1 and G2 ). Thus, inserting bj into Gj−1 and Gj−1 will not break this adjacency. 1 2 Definition 1. If Approx-CMSR executes an operation 8 in the j-th iteration, and xj • yj is a length-2 substring in G∗1 and G∗2 , then in our attribution process each of xj and yj is counted as a 23 -isolate, and each of aj and bj is counted as a 13 -isolate. Let V 8 denote the set of all those isolates aj and bj in Definition 1, and let U 8 denote the set of corresponding isolates xj and yj . Clearly the letters of V 8 ⊆ V are not deleted by algorithm Approx-CMSR. In the following Lemma 9, we show that every isolate of O1 ∩(Uj ∪Vj ) can be put into bin B, when the j-th iteration of Approx-CMSR executes an operation 1, 2, 3, 4, 5, 6, 7, 8, or 9, respectively. A special care is paid to canceling pairs, when an aj ∈ V 8 becomes involved then the corresponding xj must be in U 8 for the sake of proper relay. Lemma 9. For any j = 1, 2, . . . , m, O1 ∩ (Uj ∪ Vj ) ⊆ B, i.e., every isolate of O1 ∩ (Uj ∪ Vj ) is attributed with at most 73 isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 . Proof. The proof of this lemma is long, and is actually separated for each of the nine operations [8]. In this extended abstract, we prove it for operation 1 only. Recall that an operation 1 deletes isolate xj , and forms a length-2 type-1 substring aj • bj , i.e., Uj = {xj } and Vj = {aj , bj } (see Table 1). From Lemma 3, we know that in the original sequences G1 and G2 all letters in between aj and bj belong to ∪ji=1 Ui . If aj ∈ O1 , inserting it into Gj−1 and Gj−1 in the worst case would break two 1 2 distinct adjacencies, one in each sequence, giving rise to a maximum of 4 isolated letters. For each such adjacency that results in two isolated letters, denoted as r • s, either {r, s} = Ui for some i < j which is resulted from an operation 8, or {r, s} ∩ Ui = ∅ for all i < j from Lemma 7. Moreover, in the first case, due to priority of an operation 8 being lower than that of an operation 7, we conclude
Approximating the Complementary MSR Problem
55
that there is at least one other isolate from O1 , which breaks this adjacency too if it is inserted back into Gj−1 and Gj−1 alone. Therefore, according to 1 2 the attribution rule, aj is attributed with only one of the two newly generated isolates r and s, while the other isolate of O1 is attributed with the other newly generated isolate. Note also that from Definition 1, both r and s are counted as 23 -isolates. In the second case, if xj ∈ / {r, s}, then r and s must not reside in between aj and bj by Lemma 3, but thus at different sides, in both original sequences G1 and G2 . We discuss two cases. In the first case, xj ∈ O1 . Again let r • s denote an adjacency broken by aj ∈ O1 when it is inserted into Gj−1 and Gj−1 1 2 . If this broken adjacency gives rise to at most one isolated letter, we are done in the sense that this adjacency attributes at most one isolate of U ∪R∪(V −O1 )∪V 8 to aj ; else if {r, s} = Ui for some i < j which is resulted from an operation 8, we are also done since this adjacency attributes at most 23 isolate of U ∪R∪(V −O1 )∪V 8 to aj ; otherwise, we conclude that bj ∈ O1 as well from the last paragraph, and r and s are attributed together to aj and bj . It follows that in the worst case, on average each of aj and bj , when they are in O1 , is attributed with at most 2 newly generated isolated letters of U ∪ R ∪ (V − O1 ) ∪ V 8 . Afterwards, xj is inserted back. Again let r • s denote an adjacency broken by this insertion, then {r, s} = Ui for some i < j which is resulted from an operation 8 from Lemmas 3 and 7. For the same priority reason one of them is attributed to xj ; it follows from Definition 1 that xj is attributed with 73 isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 , including itself. In the other case, xj ∈ / O1 . Similarly, let r • s denote an adjacency broken by aj ∈ O1 when it is inserted into Gj−1 and Gj−1 1 2 . If this broken adjacency gives rise to at most one isolated letter, we are done; else if {r, s} = Ui for some i < j which is resulted from an operation 8, we are also done. Otherwise, when xj ∈ / {r, s}, we similarly conclude that bj ∈ O1 as well from the second paragraph in this proof, and r and s are attributed together to aj and bj . When xj = s, r must reside at the same side of aj with respect to xj in one of the original sequences G1 and G2 and at the opposite side of aj with respect to xj in the other original sequence. Consequently, bj ∈ O1 as well, and r and xj are attributed together to aj and bj . It follows that in the worst case, on average each of aj and bj , when they are in O1 , is attributed with at most 2 newly generated isolated letters of U ∪ R ∪ (V − O1 ) ∪ V 8 . This proves the lemma that every isolate of O1 ∩ (Uj ∪ Vj ) is attributed with at most 73 isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 . Denote O1 = O1 ∩ R. For an isolate, we call each of its appearance in one of the original sequences G1 and G2 an isolate copy. That is, each isolate has two isolate copies, one in each of the original sequences. Note that at the end of the m-th iteration in the algorithm Approx-CMSR, deleting two isolate copies is impossible to form a novel type-1 substring, neither deleting one isolate copy is possible to append an isolate to an existing substring. In other words, for any two remaining isolates r1 , r2 ∈ R that are not separated by any existing (type0 or type-1) substring in both sequences, there are at least three other isolate
56
Z. Li et al.
copies in between them, in two sequences; and for any remaining isolate r1 ∈ R, there are at least two other isolate copies in between it and each neighboring substring, in two sequences. We have the following lemma. m Lemma 10. In Gm 1 and G2 ,
1) if there is an adjacency r1 • r2 for r1 , r2 ∈ R, then r1 and r2 are separated by at least three isolate copies of O1 ; 2) if there is an adjacency r • a for r ∈ R and a ∈ Σ − U − R, then r and a are separated by at least two isolates of O1 ; 3) if there is an adjacency xj • yj for xj , yj ∈ U 8 , then xj and yj are separated by at least two isolate copies of O1 ; 4) if there is an adjacency vj • a for vj ∈ V 8 and a ∈ Σ − U − R, then v and a are separated by at least two isolate copies of O1 . Proof. Due to space limit, the detailed proof is provided in [8].
m In the sequences Gm 1 and G2 obtained after inserting units of O3 ∪O2 ∪(O1 − O1 ) ∗ ∗ into G1 and G2 , some units of R are already isolates, while the other still reside in substrings (of length at least two). From Lemma 9, we know that all units of m U ∪ V are in Gm 1 and G2 . From Lemma 7 we know that if an xj ∈ Uj is not an m m isolate in G1 and G2 , then xj ∈ U 8 . After inserting all the isolates of O1 back m into Gm 1 and G2 , we will obtain the two original sequences G1 and G2 and thus m all letters of U ∪ V ∪ R, if still residing in substrings of Gm 1 and G2 , have to be singled out. Recall that W ⊆ V .
Lemma 11. O1 ⊆ B. Proof. Every isolate of O1 has two isolate copies, some of which could have been attributed with isolates of U ∪ R ∪ (V − O1 ) ∪ V 8 in the inverse process achieving 2 m Gm 1 and G2 . For each such isolate copy, it was attributed with exactly 3 isolates of U , and in fact of Ui for some i where an operation 8 is executed by algorithm Approx-CMSR. We examine next those letters of U ∪ V ∪ R that still reside in substrings of m m Gm 1 and G2 . For each letter of U , if it is still residing in a substring of G1 and m G2 , then it falls into Case 3 of Lemma 10 by Lemma 7. For each letter of V , m if it is still residing in a substring of Gm 1 and G2 , then it does not participate in any canceling pair and it is counted as at most a 13 -isolate, see Definition 1. m Also by Lemma 7, any adjacency involving a letter of U ∪ V ∪ R in Gm 1 and G2 falls into one of the four cases listed in Lemma 10. Therefore, every isolate copy that can break the adjacency is attributed with at most 23 isolates of U ∪ V ∪ R. The above two paragraphs state that every isolate of O1 is attributed with at most 43 isolates of U ∪ V ∪ R. As O1 ⊆ R, we attribute each isolate of O1 to itself. This proves the lemma. Theorem 1. Algorithm Approx-CMSR is a 73 -approximation algorithm for the CMSR problem.
Approximating the Complementary MSR Problem
57
Proof. From Lemma 11 we conclude that all isolates of U ∪ R (in fact, isolates of (V − O1 ) ∪ V 8 as well) have been attributed to letters of OP T , and Lemmas 6, 9, and 11 together guarantee that each letter of OP T is attributed with at most 7 isolates. Therefore, Approx-CMSR is a 73 -approximation algorithm. 3
4
Conclusions
In this paper, we presented a 73 -approximation algorithm Approx-CMSR for the CMSR problem. An infinite series of instances provided in [8] show that this performance ratio 73 is tight.
References 1. Bar-Yehuda, R., Halld´ orsson, M.M., Naor, J.S., Shachnai, H., Shapira, I.: Scheduling split intervals. SIAM Journal on Computing 36, 1–15 (2006) 2. Bulteau, L., Fertin, G., Rusu, I.: Maximal strip recovery problem with gaps: hardness and approximation algorithms. In: Dong, Y., Du, D.-Z., Ibarra, O. (eds.) ISAAC 2009. LNCS, vol. 5878, pp. 710–719. Springer, Heidelberg (2009) 3. Chen, Z., Fu, B., Jiang, M., Zhu, B.: On recovering synthetic blocks from comparative maps. Journal of Combinatorial Optimization 18, 307–318 (2009) 4. Choi, V., Zheng, C., Zhu, Q., Sankoff, D.: Algorithms for the extraction of synteny blocks from comparative maps. In: Giancarlo, R., Hannenhalli, S. (eds.) WABI 2007. LNCS (LNBI), vol. 4645, pp. 277–288. Springer, Heidelberg (2007) 5. Jiang, H., Li, Z., Lin, G., Wang, L., Zhu, B.: Exact and approximation algorithms for the complementary maximal strip recovery problem. Journal of Combinatorial Optimization (2010) (accepted for publication on November 3, 2010) 6. Jiang, M.: Inapproximability of maximal strip recovery. In: Dong, Y., Du, D.-Z., Ibarra, O. (eds.) ISAAC 2009. LNCS, vol. 5878, pp. 616–625. Springer, Heidelberg (2009) 7. Jiang, M.: Inapproximability of maximal strip recovery: II. In: Lee, D.-T., Chen, D.Z., Ying, S. (eds.) FAW 2010. LNCS, vol. 6213, pp. 53–64. Springer, Heidelberg (2010) 8. Li, Z., Goebel, R., Wang, L., Lin, G.: An improved approximation algorithm for the complementary maximal strip recovery problem. Technical Report TR11-02, Department of Computing Science, University of Alberta (January 2011) 9. Wang, L., Zhu, B.: On the tractability of maximal strip recovery. Journal of Computational Biology 17, 907–914 (2010); Correction 18, 129 (2011) 10. Zheng, C., Zhu, Q., Sankoff, D.: Removing noise and ambiguities from comparative maps in rearrangement analysis. IEEE/ACM Transactions on Computational Biology and Bioinformatics 4, 515–522 (2007)
Greedy Routing via Embedding Graphs onto Semi-metric Spaces Huaming Zhang and Swetha Govindaiah Computer Science Department University of Alabama in Huntsville Huntsville, AL, 35899, USA {hzhang,sg0017}@cs.uah.edu Abstract. In this paper, we generalize the greedy routing concept to use semimetric spaces. We prove that any connected n-vertex graph G admits a greedy embedding onto an appropriate semi-metric space such that (1) each vertex v of the graph is represented by up to k virtual coordinates (where the numbers are from 1 to 2n − 1 and k ≤ deg(v)); and (2) using an appropriate distance definition, there is always a distance decreasing path between any two vertices in G. In particular, we prove that, for a 3-connected plane graph G, there is a greedy embedding of G such that: (1) the greedy embedding can be obtained in linear time; and (2) each vertex can be represented by at most 3 virtual coordinates from 1 to 2n − 1. To our best knowledge, this is the first greedy routing algorithm for 3-connected plane graphs, albeit with non-standard notions of greedy embedding and greedy routing, such that: (1) it runs in linear time to compute the virtual coordinates for the vertices; and (2) the virtual coordinates are represented succinctly in O(logn) bits.
1 Introduction Routing is one of the most important algorithmic problems in networking. Extensive research has been devoted to discover efficient routing algorithms (see [5,18]). Previously, routing was done via routing protocols (e.g., see [5,18]). This approach is space inefficient and requires considerable setup overhead, which makes it infeasible for some networks (e.g., wireless sensor networks). Recently, an alternative approach geometric routing has been proposed. Geometric routing uses geometric coordinates of the vertices to compute the routing paths. The simplest geometric routing is greedy routing, in which a vertex simply forwards messages to a neighbor that is closer to the destination. Greedy routing is simple, but also imposes some problems. First, GPS devices, typically used to determine geometric coordinates, are expensive and increase energy consumption. (This should be avoided, especially, for sensor networks). More importantly, a bad network topology and geographical location of network nodes can lead to routing failures because a void position has been reached. (Namely, a packet has reached a node all whose neighbors are farther from the destination than the node itself). For example, for a star-shaped network K1,6 embedded in R2 , as in Figure 1, greedy routing fails due to the fact that the vertex u is at a void position: all neighbors (only one) of u are farther from the destination w than itself in the embedding.
Research is supported by NSF grant CCF-1017366.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 58–69, 2011. c Springer-Verlag Berlin Heidelberg 2011
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
59
c u
v
Fig. 1. Greedy routing fails for K1,6 at u. u is at a void position
To solve these problems, an elegant solution was proposed by Rao et al. in [15]. Instead of using the real geometric coordinates (e.g., GPS coordinates), one could use graph drawing, based on the structure of a network G, to compute vertex coordinates in the drawing. The drawing coordinates are used as the virtual coordinates of the vertices of G. Then geometric routing algorithms rely on virtual coordinates to compute routes. Greedy drawing is introduced as a solution for greedy routing. Simply speaking, a greedy drawing is a drawing of the graph G into a metric space in which greedy routing works. More precisely: Definition 1. [16] Let S be a set and d(∗, ∗) a metric function over S. Let G = (V, E) be a graph. 1. A drawing of G in S is a mapping δ : V → S such that u = v implies δ(u) = δ(v). 2. The drawing δ is a greedy drawing with respect to d if for any two vertices u, w of G (u = w), u has a neighbor v such that d(δ(u), δ(w)) > d(δ(v), δ(w)). Consider a greedy drawing δ for G in a metric space S, endowed with a metric function d(∗, ∗). Let’s define dδ : V → R as follows: dδ (u, w) = d(δ(u), δ(w)). Then it is easy to see that dδ (∗, ∗) is a metric function defined on the vertex set V of G. We will simply call this metric function the induced metric function for G from d(∗, ∗) and δ, and always denote it by dδ . Consider any two vertices u = w of G in the greedy drawing δ. According to the definition of a greedy drawing, it is easy to see that there is a distance decreasing path between u and w in the drawing with respective to the metric function dδ (see [16]). Namely, there is a path (u = v1 , v2 , · · · , w = vk ) in G such that dδ (vi , w) < dδ (vi+1 , w). Therefore, greedy routing simply forwards the message from u to such a neighbor v, which is closer to the destination w than u. The forwarding process continues and the distance to the destination w keeps dropping. Eventually, the distance become 0 and the message reaches the destination w. Therefore, when there is a greedy drawing of G into a metric space S, greedy routing always succeeds. 1.1 Greedy Drawing in the Euclidean Spaces After [15], there has been intense research on the existence of greedy drawings of graphs in natural metric spaces. It turns out that the existence of greedy drawings of a graph G
60
H. Zhang and S. Govindaiah
depends heavily on the choices of the metric spaces. Not surprisingly, research initiated the search from the Euclidean plane R2 . Unfortunately, as proved by Papadimitriou et al. [16], K1,6 does not admit any greedy drawing in R2 . Later, Goodrich and Strash proved that [10], star graphs (consisting of a central vertex adjacent to an arbitrarily large number of leaves) does not have greedy drawing into any fixed-dimensional Euclidean space. They observed that, by a simple packing argument, there has to be two leaves in such a graph, that are closer to each other than to the central vertex. Afterwards, research focuses on more restricted networks in which their underlying topology are 3-connected planar graphs. Papadimitriou and Ratajczak [16] showed that any 3-connected planar graph admit a greedy embedding in R3 , albeit with respect to a non-standard metric function. They conjectured that greedy drawing is possible in the Euclidean plane R2 . This conjecture has drawn a lot of interests [2,6,8,10,11,12,13]. Greedy drawings in R2 were first discovered only for graphs containing power diagrams [6], then for graphs containing Delaunay triangulations [12]. The existence of greedy drawing for plane triangulations were proved in [8]. However, the proof was not constructive. Leighton and Moitra [11] eventually settled this conjecture positively by giving an algorithm to produce a greedy drawing of any 3-connected planar graph in R2 . A similar result was independently found by Angelini et al. [2]. However, neither of the two papers presents time efficiency analysis of their algorithms, it is not clear whether their algorithms run in polynomial time. 1.2 Succinctness in Greedy Drawing More importantly, as pointed out in [9], in the worst case, the above two greedy drawing algorithms by Leighton and Moitra [11] and Angelini et al. [2] requires Ω(nlogn) bits to represent their virtual coordinates. Thus, these greedy approaches to greedy routing have the same space usage as traditional routing approaches. Even worse, the above greedy drawing approaches have inferior bandwidth requirements, since they use message headers of length Ω(nlogn) bits in the worst case, whereas traditional routing table approaches use message headers of size Θ(logn) bits [9]. Since the utmost reason for greedy drawings is to improve and to simplify traditional routing schemes, if drawings are to be useful for geometric routing purposes, they should be succinct. That is, every virtual coordinate should be representable in a number of bits that is polylogarithmic in n. Such a greedy drawing will be called a succinct greedy drawing. Thus, the main obstacle for the applicability of greedy routing is not only the existence of a greedy drawing, but also the existence of a succinct greedy drawing. Angelini et al. [1] proved that succinct greedy drawing does not always exist in R2 . They proved that there are infinitely many trees which are greedy drawable in R2 , but all greedy drawings need exponential size grids. In their recent work [10], Goodrich and Strash used the property of Leighton-Moitra drawing to formulate a new coordinate systems (not the underlying coordinates used for embedding), where coordinate corresponds to certain information on the Leighton-Moitra drawing, and each vertex is assigned a triplet of three such coordinates for the routing purposes. Since each element of the triple can take on values in the range [0..n], the triple can be stored using O(log n) bits. This O(log n) representation is totally different from the real underlying greedy drawing, which still needs Ω(n log n) bits in the worst case, according to [9].
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
61
In [19], a generalized greedy routing algorithm based on Schnyder drawing was introduced. The routing decision is based on rules other than decreasing distance. So it is not a true greedy drawing either. In [20], using a non-standard metric over R2 , He and Zhang presented a linear time succinct greedy drawing algorithms for plane triangulations, with respect to a non-standard metric function on R2 . However, up to the time of writing the paper, the problem of finding polynomial-time algorithm for producing succinct greedy drawing for general 3-connected plane graphs in R2 remains open, even if allowing non-standard metric functions over R2 . 1.3 Succinct-Greedy Drawing in the Hyperbolic Plane To circumvent the existence issue of succinct greedy drawings for graphs in R2 , several researchers (e.g., see [9,13,14]) began to look for other metric spaces, in particular, the hyperbolic plane. Kleinberg proved that [14] any tree, and hence any connected graph, admits a greedy drawing in the hyperbolic plane. However, as pointed out by Eppstein and Goodrich [9], their drawing are not succinct. Their algorithms requires Ω(nlogn) bits in the worst case to represent such virtual coordinates. Recently, Eppstein and Goodrich [9] proved that any n-vertex connected graph admit a succinct greedy drawing in the Hyperbolic plane, in which every virtual coordinate can be represented in O(logn) bits. However, there are two drawbacks for their algorithm. First, their algorithm uses a sophisticated data structure to facilitate the computation of the greedy drawing. Secondly, their algorithm runs in unknown degree polynomial-time (it appears to be high degree polynomial time). We feel that the two drawbacks prevent this algorithm from being deployed to some networks, such as wireless sensor networks, in which the computation power of the agents are too limited to support such heavy computation. To summarize, up to this writing, there is no known linear time succinct greedy routing algorithms for general 3-connected planar graphs, even if one allows to use any metric space for such an embedding. 1.4 Our Approach and Results We feel that, there is no compelling reason that greedy routing should be so-closely and even somewhat awkwardly tied with greedy drawing into metric spaces. The awkwardness can be seen from several of the above results. For example, for both of the greedy drawing algorithms presented for 3-connected plane graphs in R2 [2] and [11], neither of the drawings is planar. Then a natural question would be: if the drawing is not planar, then what is the advantage of using R2 ? In [20], the greedy drawing presented for plane triangulations over R2 is planar, but the metric used is not the standard Euclidean metric. Again, one may ask: if the metric is not the standard Euclidean metric, then why use R2 ? Even worse, if using metric spaces such as the Hyperbolic plane, then as one can imagine, the greedy drawing in the Hyperbolic plane would greatly distort the true geometric distance between any underlying nodes in the network. As a matter of fact, for all the above greedy drawing algorithms, the virtual coordinates are computed purely from the underlying topology of the network. The topology of the network is extracted purely from the network connectivity (i.e., there is an edge between two vertices if and only if they are connected in the underlying network). No information for the true
62
H. Zhang and S. Govindaiah
geometric distances between the network nodes have been kept in the network topology whatsoever. Therefore, regardless of what metric space we use, R2 or the Hyperbolic plane, the virtual coordinates and the virtual distances (as computed from the virtual coordinates) have no tie to the true geometric locations of the network nodes, nor do they have tie to the true geometric distance between the network nodes. Thus, when coming to greedy routing via greedy drawing in metric spaces, the bottom line truth is that the true geometric distance between the network nodes has lost its trace since its very beginning. Thus, judging from the greedy routing perspective, the requirement for drawing a graph in R2 , or the Hyperbolic plane, or any other metric spaces is simply artificial. Indeed, in greedy routing, all we care are the following: (1) virtual coordinates can be easily computed. Ideally, they should be computable in linear time. (2) Virtual coordinates should always be succinct. (3) Using the virtual coordinates, a virtual distance (i.e., a distance computed from the virtual coordinates. From now on, we will simply use distance to mean virtual distance) between any two vertices can be computed easily. Ideally, the distance between any two vertices can be computed in constant time from the virtual coordinates. (4) Using such distances, for any two distinct vertices u and w, there is always a distance decreasing path connecting u and w. Therefore, a message can be forwarded to the destination w along such a distance decreasing path. In this paper, we propose a new notion of greedy drawing. Instead of using greedy drawing of graphs in metric spaces, we use greedy embedding of graphs in semi-metric spaces. In such an embedding, each vertex will be assigned a finite set of virtual coordinates, a distance can be easily computed from the virtual coordinates and a distance decreasing routing path can be easily computed between any two vertices. Applying these concepts, we present a simple linear time algorithm to find such a greedy embedding for a 3-connected plane graph G in which: (1) each vertex has 1 to 3 virtual coordinates. The virtual coordinates are integers between 1 and 2n− 1; (2) The distance between any two vertices can be computed in constant time from the virtual coordinates. To our best knowledge, this algorithm is the first linear time algorithm which provides a practical greedy routing algorithm for such graphs. Generalization of such results to arbitrary connected graphs is also included in the paper. In Section 2, we present related concepts and our main result.
2 Greedy Routing via Embedding Graphs into Semi-metric Spaces 2.1 Greedy Routing via Semi-metric Spaces Definition 2. Let S be a set. A semi-metric on S is a function d : S × S → R that satisfies the following three conditions: 1. d(x, y) ≥ 0. 2. d(x, y) = 0 if and only if x = y. 3. d(x, y) = d(y, x). Now, we have the following definition, which is a generalization from Definition 1. The only difference is that now we use a semi-metric space instead of a metric space.
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
63
Definition 3. [16] Let S be a set and d(∗, ∗) a semi-metric function over S. Let G = (V, E) be a graph. 1. An embedding of G into S is a mapping δ : V → S such that u = v implies δ(u) = δ(v). 2. The embedding δ is a greedy embedding with respect to d if for any two vertices u, w of G (u = w), u has a neighbor v such that d(δ(u), δ(w)) > d(δ(v), δ(w)). Let δ be a greedy embedding of a graph G = (V, E) into a semi-metric space S, whose semi-metric function is d(∗, ∗). Consider the vertex set V of G, for any two vertices u and v in V , if we define dδ (u, v) = d(δ(u), δ(v), then dδ (∗, ∗) is a semi-metric function defined on the vertex set V of G, dδ (∗, ∗) is called the induced semi-metric function for G. Note that, given a greedy embedding into a semi-metric space, greedy routing works exactly the same as for the case of greedy drawing in metric spaces. Consider a greedy embedding δ for G into a semi-metric space S, equipped with a semi-metric function d(∗, ∗). Consider any two distinct vertices u = w of G, there is a distance decreasing path between u and w in the embedding. Namely, there is a path (u = v1 , v2 , · · · , w = vk ) in G such that dδ (vi , w) < dδ (vi+1 , w). Therefore, greedy routing simply needs to forward the message to such a neighbor which is closer to the destination. The message keeps forwarded, the distance keep dropping until the message reaches the destination w (whose distance to w is 0). Since all that matters are the existence of a greedy embedding, it does not matter whether the space is associated with a metric function or a semi-metric function, nor does it matter what kind metric function or semi-metric function the space has. This relaxation gives us great flexibility in choosing an ideal semi-metric space so that efficient greedy routing algorithms can be built upon. In the next subsection, we will introduce such kind semi-metric spaces. 2.2 A Group of Semi-metric Spaces We use N to denote {1, 2, · · · , n, · · ·}, i.e. the set of natural numbers. We use P (N ) to denote the power set of N . We have the following definition: Definition 4. A proper subset Π of P (N ) is called a perfect sub-power set of N if Π satisfies all the following conditions: 1. 2. 3. 4.
Π = ∅ and Π is a finite set. ∅∈ / Π. For any two distinct elements x and y ∈ Π, x ∩ y = ∅. Every element x ∈ Π is a finite set of natural numbers. We define the thickness of Π to be the maximum cardinality of all its elements, which will be denoted by TΠ .
We have the following technical lemma: Lemma 1. Let Π be a perfect sub-power set of N . x and y be two elements in Π. Let d(x, y) = min{|xi − yj |: xi ∈ x and yj ∈ y }. Then d(∗, ∗) is a semi-metric function defined on Π.
64
H. Zhang and S. Govindaiah 16 r
r 2
15 1 b
c
3
c
b
5
13
f 4
e
d
6
8
h g
12 e
d
14
f
10
i 7 9 g
(1)
h
11 i
(2)
Fig. 2. (1) A tree T . (2) Virtual coordinates for each vertex in T .
Proof. First note that, both x and y ∈ Π are nonempty and finite, so d(∗, ∗) is well defined. Next, we will verify the three conditions for d(∗, ∗) to be a semi-metric function on Π. 1. d(x, y) = min{|xi − yj |: xi ∈ x and yj ∈ y}, so d(x, y) ≥ 0. 2. If d(x, y) = 0, then there is a xi ∈ x equals a yj ∈ y, so x ∩ y = ∅. According to the definition of a proper sub-power set, we have x = y. On the other hand, if x = y, then obviously, d(x, y) = 0. 3. d(x, y) = d(y, x) is trivially true. Therefore, d(∗, ∗) is a semi-metric function defined on Π. Note that, there are infinitely many such perfect sub-power sets Π. In the remaining of the paper, we will simply use Π to refer to one such perfect sub-power set of N . Its semi-metric function is the function d(∗, ∗) defined above. 2.3 A Simple Greedy Routing Algorithm for Arbitrary Trees In this subsection, we introduce a simple greedy drawing algorithm for arbitrary trees into a semi-metric space. First, we introduce a few terms and notations. A planar graph is a graph which can be drawn in the plane so that the edges do not intersect at any point other than their end vertices. A planar graph with a fixed planar embedding is called a plane graph. A plane graph divides the plane into regions which are called faces. The unbounded region is called exterior face, the other faces are called interior faces. The vertices and the edges on the exterior face are called exterior vertices and exterior edges, respectively. (See [4] for more terms on graphs.) deg(v) represents the degree of v in G. Δ(G) represents the largest degree of all the vertices in G. Let T = (V, E) be a tree with n vertices. Set a vertex r to be the root of T . Consider a fixed planar embedding of T into R2 . Using this embedding, we can talk about
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
65
counterclockwise direction, and the orders of all the children of a specific node in the tree. Consider an internal (i.e., non-leaf) node u, the subtree hangs on its i-th child, from counterclockwise direction, is called the i-th subtree of u. For each edge of T , associate it with a dummy edge so that the two parallel edges enclose a dummy face enclosing no other vertices in it (see Figure 2). Note that, every edge and its corresponding dummy edge are both adjacent to the exterior face of T . It is easy to see that if one starts from the root r, walks along the facial cycle of the exterior face in counterclockwise direction, every edge, including the dummy ones, will be walked through exactly once. Eventually, the walk comes back to r and stops at r. We will use this walk to define a mapping δ from the vertex set V of T to a perfect sub-power set Π. For each vertex v, initially, δ(v) is set to be ∅. When walking counterclockwisely along the exterior facial cycle, we use a timer. The timer starts from time 1. We insert its value 1 into δ(r), while walking along the edges, whenever we reaches a vertex v, the time is increased by 1 and its value is inserted into δ(v). This process stops when we exhaust all the edges and come back to r, including the dummy ones. See Figure 2 (2) for an illustration for the walking of the tree T in Figure 2 (1) (In Figure 2 (2), dummy edges are drawn in dashed lines. The edges are directed according to the way we walk through them.). Consider the vertex C, it is walked through when the timer is at the time 4, 6, 14, 16. Therefore, δ(C) = {4, 6, 14, 16}. Since every time when we walk through a vertex v, the timer is incremented by 1 and its value is insert into δ(v), so for any two distinct vertices u and w, δ(u) ∩ δ(w) = ∅. In addition, every vertex is walked through at least once, so for every vertex v, δ(v) = ∅. Also, it is easy to see that ∪v∈V δ(v) = {1, · · · , 2n − 1}. Therefore, δ : v → delta(v) is a mapping from V onto the perfect sub-power set Π = {δ(v) : v ∈ V }. Such Π is called the corresponding perfect sub-power set of T . Note that, Π has a semi-metric function d(∗, ∗) defined on it. Correspondingly, V has a semi-metric function dδ (∗, ∗) defined on it. Consider a vertex u in T , according to the mapping δ, it is mapped to a set of distinct natural numbers {u1 , · · · , uk }, where u1 < · · · < uk . We have the following technical lemma. Its proof is trivial and hence omitted. Lemma 2. Let T be a tree, r be its root. 1. The root r is mapped to {r1 = 1 < r2 < · · · < rk = 2n−1}, where k = deg(r)+1. 2. If u is a leaf, then u is mapped to a singleton set {u1 }. 3. If u is non-root internal (i.e., non-leaf) vertex, then u is mapped to u1 < u2 < · · · < uk , where k = deg(u). 4. Let u be a non-leaf vertex of T . Let δ(u) = {u1 , · · · , uk }. Then then natural numbers within the open interval (ui , ui+1 ) are not empty and they are the virtual coordinates assigned to the vertices in the i-th subtree of u. 5. Let w and u be two distinct vertices of T . Let δ(w) = {w1 , · · · , wkw } (For a vertex w, the notation kw represents the largest index for w in δ(w). Hence, wkw is the largest number in δ(w).). δ(u) = {u1 , · · · , uku }. Then w is a descendant of u if and only if u1 < w1 ≤ wkw < uku . According to Lemma 2, consider a tree T with maximum vertex degree Δ(T ), then the thickness TΠ of its corresponding Π is at most Δ(T ) + 1. The reason to have a plus 1
66
H. Zhang and S. Govindaiah a=v v
v
u
a b
b
w
w u
(2)
(1)
Fig. 3. (1) Case 3a1. (2) Case 3a2.
term is due to case for the root r (see Lemma 2 (1)). It is easy to see, if we intentionally set a degree-1 vertex as the root r, then the thickness of the corresponding Π can be reduced to Δ(T ), assuming that T is not a single-edge tree. Thus, from now on, we will assume that T is not a single-edge tree and the root r is a degree-1 vertex of T . Hence, the thickness TΠ of Π always equals Δ(T ). Next, we have our main technical lemma: Lemma 3. For any two distinct vertices u, w in T , the unique path between u and w is a distance decreasing path with respect to the semi-metric function dδ (∗, ∗), where dδ (u, w) = d(δ(u), δ(w)). Namely, for δ(w) = {w1 , · · · , wkw }, δ(u) = {u1 , · · · , uku }, dδ (u, w) = min{|wi − uj |}, i = 1, · · · , kw , and j = 1, · · · , ku . Proof. Let u and w be two distinct vertices of T . We need to show that the unique path between u and w in T is a distance decreasing path between u and w. We will apply mathematical induction on the length n of the unique path between u and w in T to prove the lemma. Initial Step: n = 1: u and w are adjacent in T . w itself is a closer neighbor of u to w. Hence the unique path between u and w, namely the edge (u, w) is a distance decreasing path between u and w. Inductive Step: Our inductive assumption is as follows: Let u = w be two distinct vertices in T , and the length n of the unique path between u and w is less than or equal to k, then the unique path between u and w is a distance decreasing path between u and w. Now consider the case where the length n of the unique path between u and w equals k + 1. We have the following several cases: Case 1: u is a non-parent ancestor of w. Let v be a child of u, which is an ancestor of w. Suppose that v is the root of the i-th subtree of u. According to Lemma 2, we have ui < v1 < w1 ≤ wkw < vkv < ui+1 . Therefore, we have u1 < · · · < ui < v1 < w1 ≤ wkw < · · · < vkv < ui+1 < · · · < uku . Hence, dδ (u, w) = min{|ui − w1 |, |ui+1 − wkw |} = min{w1 − ui , ui+1 − wkw }, which is greater than min{w1 − v1 , vkv − wkw } = dδ (v, w). Hence, v is a neighbor of u which is closer to the destination w. Note that the unique path between u and w in T is the edge (u, v) concatenated with the unique
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
67
path between v and w in T . Consider the unique path between v and w in T , its length is k. According to the inductive assumption, the unique path between v and w in T is a distance decreasing path between v and w. Therefore, the unique path between u and w in T is a distance decreasing path between u and w. This proves the inductive step for Case 1. Case 2: u is a non-child descendant of w. The case is similar to Case 2 and can be proved symmetrically. Case 3: u is neither an ancestor nor a descendant of w. Let v be the smallest common ancestor of u and w. Let u be in the i-th subtree of v and w be the j-th subtree of v. Then i = j since v is the smallest common ancestor of u and w. We have the following two symmetric subcases: Case 3a: i < j. Therefore we vi+1 ≤ vj . According to Lemma 2, we have vi < u1 ≤ uku < vi+1 and vj < w1 ≤ wkw < vj+1 . Note that i < j. Hence, vi < u1 ≤ uku < vi+1 ≤ vj < w1 ≤ wkw < vj+1 . So dδ (u, w) = w1 − uku . Consider u’s parent a in T . According to the properties of a tree, the unique path between u and w passes through a. Therefore, according to our inductive assumption, the unique path between a and w is a distance decreasing path between a and w. Therefore, in order to show that the unique path between u and w is a distance decreasing path between u and w, we only need to show that dδ (u, w) > dδ (a, w). We have two subcases: Case 3a1: a = v. Note that, uku < vi+1 ≤ vj < w1 , so dδ (v, w) ≤ w1 − vj ≤ w1 − vi+1 < w1 − uku = dδ (u, w), as to be shown. See Figure 3 (1) for an illustration. Note that, we may or may not have a vertex b in this subcase. Case 3a2: a is a descendant of v. So a is also in the i-th subtree of v. According to Lemma 2, vi < a1 < u1 ≤ uku < aka < vi+1 . Therefore, we have vi < a1 < u1 ≤ uku < aka < vi+1 ≤ vj < w1 ≤ wkw < vj+1 . Hence, dδ (a, w) = w1 − aka < w1 − uku = dδ (u, w), as to be shown. See Figure 3 (2) for an illustration. Note that, we may or may not have a vertex b in this subcase. Case 3b: i > j. This subcase is symmetric to Case 3a and can be proved symmetrically. Applying mathematical induction, principle, we obtain that the unique path between u and w is a distance decreasing path between u and w. Therefore, we have the following theorem: Theorem 1. Let T = (V, E) be a tree. The embedding δ : V → Π = {δ(v) : v ∈ V } is a greedy embedding from T onto Π = {δ(v) : v ∈ V } with respect to its semi-metric function d. The embedding can be obtained in linear time. The thickness TΠ of Π is at most ≤ Δ(T ) + 1. When |V | = n > 2, the thickness TΠ of Π could be reduced to Δ(T ) if one chooses a degree-1 vertex r as its root. Proof. Lemma 3 demonstrates that the embedding δ : V → Π is a greedy embedding. The thickness TΠ of Π is at most ≤ Δ(T ) + 1. It is easy to see that, the embedding can be computed in linear time when given a tree T = (V, E). As noted earlier, if one choose degree-1 vertex as the root of T , then as long as T is not a simple edge, the thickness TΠ of Π is Δ(T ).
68
H. Zhang and S. Govindaiah
When implementing the greedy routing algorithm for a tree T = (V, E), via greedy embedding onto a perfect sub-power set Π = {δ(v); v ∈ V }. Each vertex u needs to store all the numbers in δ(u), which we will also call them virtual locations of u. Each virtual location is represented by a natural number, which is called a virtual coordinate. Apparently, each vertex u stores up to TΠ virtual coordinates. On computing to which neighbor to forward a message, a vertex u needs to know all its virtual coordinates, and all the virtual coordinates of all its neighbors, and all the virtual coordinates of the destination. For any two vertices u and w, if there virtual coordinates are pre-sorted, then the distance between u and w can be computed in TΠ time. Therefore, at any vertex u, the time to find a neighbor to forward a message takes at most Δ(T )×TΠ time, which is bounded by O((Δ(T ))2 ) according to Theorem 1. Therefore, if T is a boundeddegree tree, then such computation only takes constant time. When Δ(T ) ∈ O(logn), such computation only takes O(log 2 n) time. In either case, such computation is very affordable, even for wireless sensor networks. 2.4 Greedy Routing for Connected Graphs When given a regular connected network, modeled as a connected graph G. Then one can first compute a spanning tree T . A greedy embedding δ : V → Π can then be constructed using T . Apparently, δ is also a greedy embedding for the graph G. Obviously, Δ(T ) ≤ Δ(G). Therefore, we have the following theorem. Its proof is trivial and it is omitted. Theorem 2. Let G = (V, E) be a connected graph with n > 2. Then G admits a greedy embedding δ from V onto a perfect sub-power set Π. The embedding can be obtained in linear time. The thickness TΠ of Π is at most Δ(G). Obviously, for such a G, one always wants to find a bounded degree spanning tree, since the thickness of the embedding, and hence the running time for each node of the network to forwarding a message is reduced. Fortunately, there have been extensive literature on computing bounded degree spanning trees, for example, see [7]. In particular, Barnette showed that every 3-connected planar graph G has a spanning tree T with maximum degree 3 [3]. Such a T can be found in linear time [17]. Thus we immediately have: Theorem 3. Let G be a 3-connected planar graph with n > 2 vertices. Then G has a greedy embedding onto a perfect sub-power set Π with thickness 3. Such a greedy embedding can be computed in linear time. Theorem 3 implies that for a 3-connected planar graph, we can find a greedy embedding of G onto a perfect sub-power set such that every node of the graph has at least 1, but at most 3 virtual coordinates. The virtual coordinates are all from 1 to 2n − 1. Hence, the cost of finding a distance decreasing path is cheap. To our best knowledge, for 3-connected plane graphs, this is the first greedy routing algorithm which: (1) runs in linear time to compute the virtual coordinates for the vertices; and (2) the virtual coordinates can be represented succinctly. Every 3-connected graph that excludes K3,3 as a minor has a 3-connected spanning planar subgraph [11]. Hence we have: Corollary 1. Every 3-connected graph of n vertices that excludes K3,3 as a minor has a greedy embedding into a perfect sub-power set Π with thickness 3.
Greedy Routing via Embedding Graphs onto Semi-metric Spaces
69
References 1. Angelini, P., Di Battista, G., Frati, F.: Succinct greedy drawings do not always exist. In: Eppstein, D., Gansner, E.R. (eds.) GD 2009. LNCS, vol. 5849, pp. 171–182. Springer, Heidelberg (2010) 2. Angelini, P., Frati, F., Grilli, L.: An algorithm to construct greedy drawings of triangulations. In: Tollis, I.G., Patrignani, M. (eds.) GD 2008. LNCS, vol. 5417, pp. 26–37. Springer, Heidelberg (2009) 3. Barnette, D.: 3-trees in polyhedral graphs. Isreal Journal of Mathematics 18, 731–736 (1966) 4. Bondy, J.A., Murty, U.S.R.: Graph theory with applications. Elsevier Science Publishing Co., Inc., Amsterdam 5. Comer, D.: Internetworking with TCP/IP, Volume 1: Principles, Protocols, and Architecture. Prentice-Hall, Inc., Upper Saddle River (2006) 6. Ben-Chen, M., Gotsman, C., Wormser, C.: Distributed computation of virtual coordinates. In: Proc. SoCG 2007, pp. 210–219 (2007) 7. Czumaj, A., Strothmann, W.-B.: Bounded degree spanning trees (Extended abstract). In: Burkard, R.E., Woeginger, G.J. (eds.) ESA 1997. LNCS, vol. 1284, pp. 104–117. Springer, Heidelberg (1997) 8. Dhandapani, R.: Greedy drawings of triangulations. In: Proc. SODA 2008, pp. 102–111 (2008) 9. Eppstein, D., Goodrich, M.T.: Succinct greedy graph drawing in the hyperbolic plane. In: Tollis, I.G., Patrignani, M. (eds.) GD 2008. LNCS, vol. 5417, pp. 14–25. Springer, Heidelberg (2009) 10. Goodrich, M.T., Strash, D.: Succinct Greedy Geometric Routing in the Euclidean Plane, submitted ot arXiv: 0812.3893v3 (October 2009) 11. Leighton, T., Moitra, A.: Some results on greedy embeddings in metric spaces. In: Proc. FOCS 2008, pp. 337–346 (2008) 12. Lillis, K.M., Pemmaraju, S.V.: On the efficiency of a local iterative algorithm to compute delaunay realizations. In: McGeoch, C.C. (ed.) WEA 2008. LNCS, vol. 5038, pp. 69–86. Springer, Heidelberg (2008) 13. Muhammad, R.B.: A distributed geometric routing algorithm for ad hoc wireless networks. In: Proceedings of the 4th International Conference on Information Technology (ITNG 2007), pp. 961–963. IEEE Press, Los Alamitos (2007) 14. Kleinberg, R.: Geographic routing using hyperbolic space. In: INFOCOM 2007: 26th IEEE International Conference on Computer Communications, pp. 1902–1909 (2007) 15. Rao, A., Papadimitriou, C.H., Shenker, S., Stoica, I.: Geographic routing without location information. In: Proc. Mobicom 2003, pp. 96–108 (2003) 16. Papadimitriou, C.H., Ratajczak, D.: On a conjecture related to geometric routing. Theoretical Computer Science 344(1), 3–14 (2005) 17. Strothmann, W.B.: Bounded degree spanning trees, Ph.D. thesis, Heinz-Nixdorf-Institut, Universit¨at, Paderborn (1997) 18. Tanenbaum, A.S.: Computer networks, 4th edn. Prentice-Hall, Inc., Upper Saddle River (2003) 19. He, X., Zhang, H.: Schnyder greedy routing algorithm. In: Kratochv´ıl, J., Li, A., Fiala, J., Kolman, P. (eds.) TAMC 2010. LNCS, vol. 6108, pp. 271–283. Springer, Heidelberg (2010) 20. He, X., Zhang, H.: On Succinct Convex Greedy Drawing of 3-Connected Plane Graphs. In: The Proceedings of SODA, the 22nd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1477–1486 (2011)
On Variants of the Spanning Star Forest Problem Jing He and Hongyu Liang Institute for Interdisciplinary Information Sciences, Tsinghua University, Beijing, China {he-j08,lianghy08}@mails.tsinghua.edu.cn
Abstract. A star forest is a collection of vertex-disjoint trees of depth at most 1, and its size is the number of leaves in all its components. A spanning star forest of a given graph G is a spanning subgraph of G that is also a star forest. The spanning star forest problem (SSF for short) [14] is to find the maximum-size spanning star forest of a given graph. In this paper, we study several variants of SSF, obtaining first or improved approximation and hardness results in all settings as shown below. 1. We study SSF on graphs of minimum degree δ(n), n being the number of vertices in the input graph. Call this problem (≥ δ(n))-SSF. We give an (almost) complete characterization of the complexity of (≥ δ(n))-SSF with respect to δ(n) as follows. – When 1 ≤ δ(n) ≤ O(1), (≥ δ(n))-SSF is AP X-complete. – When ω(1) ≤ δ(n) ≤ O(n1− ) for some constant > 0, (≥ δ(n))SSF is N P -hard but admits a PTAS. – When δ(n) ≥ ω(n1− ) for every constant > 0, (≥ δ(n))-SSF is not N P -hard assuming Exponential Time Hypothesis (ETH). 2. We investigate the spanning k-tree forest problem, which is a natural generalization of SSF. We obtain the first inapproximability bound of 1 − Ω( k1 ) for this problem, which asymptotically matches 1 the known approximation ratio of 1 − k+1 given in [13]. We then propose an approximation algorithm for it with a slightly improved 1 approximation ratio of 1 − k+2 . 3. We prove that SSF cannot be approximated to any factor larger than 244 in polynomial time, unless P = N P . This improves the 245 previously best known bound of 259 [14]. 260
1
Introduction
All graphs considered in this paper are undirected and simple, that is, they contain neither self-loops nor parallel edges. A star is a tree of depth at most 1, and its root is called the center of it. A star forest is a collection of vertex-disjoint
This work was supported in part by the National Basic Research Program of China Grant 2007CB807900, 2007CB807901, the National Natural Science Foundation of China Grant 61033001, 61061130540, 61073174. Part of this work was done while the authors were visiting Cornell University.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 70–81, 2011. c Springer-Verlag Berlin Heidelberg 2011
On Variants of the Spanning Star Forest Problem
71
stars, and its size is the number of leaves in all its components. A spanning star forest of a graph G is a spanning subgraph of G that is also a star forest. The spanning star forest problem (SSF for short) [14] is the problem of finding a maximum-size spanning star forest of a given graph G . This problem has found applications in aligning multiple genomic sequences [14], comparison of phylogenetic trees [5], and the diversity problem in the automobile industry [1]. Spanning star forests are closely related to dominating sets, which are fundamental in graph theory. A dominating set of a graph G is a subset of vertices with the property that every other vertex is adjacent to at least one vertex in it. The minimum dominating set problem is to find a smallest dominating set of a given graph. Let G be a graph of order n and F be a spanning star forest of it. Then the collection of all centers of F form a dominating set of G, whose size is precisely n minus the size of F . Conversely, any dominating set D of G naturally induces a spanning star forest of G whose centers are exactly those vertices in D. Thus, the spanning star forest problem and the minimum dominating set problem are equivalent in finding the optimum solution. Nevertheless, they appear totally different in terms of approximation. It is proved by Feige [10] that, unless N P ⊆ DT IM E(nO(log log n) ), there is no (1 − ) ln n approximation algorithm for the minimum dominating set problem. In contrast, a 0.5-approximation to SSF can be easily attained by dividing a spanning tree into alternating levels and choosing odd or even levels to be centers depending on which part induces a larger star forest [14]. In their paper initializing the study of SSF, Nguyen et al. [14] proposed a 0.6-approximation algorithm based on a graph-theoretic observation that every graph of order n has a dominating set of size at most 25 n. They also proved that this problem is N P -hard to approximate within a factor of 259 . In addition, they 260 introduced the edge-weighted version of SSF, whose goal is to find a spanning star forest of an edge-weighted graph such that the total weight of edges in the star forest is maximized, and showed a 0.5-approximation algorithm for this variant (with the aforementioned idea of alternating levels). The approximation ratio for unweighted SSF was improved to 0.71 by Chen et al. [7] based on a natural linear programming relaxation combined with randomized rounding. Using similar ideas, they gave a 0.64-approximation algorithm for the nodeweighted SSF, in which the input graph is node-weighted and the objective is to find a spanning star forest with maximum total weight of leaves. Note that node-weighted SSF is just the complement of the weighted dominating set problem, whose goal is to find a minimum-weight dominating set of the given node-weighted graph. Chakrabarty and Goelin [6] proved that edge-weighted and node-weighted SSF cannot be approximated to 10 + and 13 + respectively, 11 14 unless P = N P . Athanassopoulos et al. [4] designed a 0.804-approximation for SSF using the idea of semi-local search for k-set cover [9]. He and Liang studied SSF on c-dense graphs [11], where a graph of n vertices is called c-dense if it contains at least cn2 /2 edges (see [3]). They showed that, for every fixed c ∈ (0, 1), SSF on c-dense graphs √ is AP X-hard and can be efficiently approximated within factor 0.804 + 0.196 c.
72
1.1
J. He and H. Liang
Our Contributions
In this paper, we study several variants of the spanning star forest problem from both algorithmic and hardness points of view, and obtain first or improved approximation and inapproximability results in all settings. Part 1. We study the spanning star forest problem in graphs with minimum degree constraints. More specifically, we consider the spanning star forest problem on graphs in which every vertex has degree at least δ(n) for some function δ : N → N, where n is the order (i.e., the number of vertices) of the graph. Denote this problem by (≥ δ(n))-SSF. We prove threshold behaviors for the complexity of the problem with respect to δ(n). To be precise, we show that: – When 1 ≤ δ(n) ≤ O(1), (≥ δ(n))-SSF is AP X-complete. – When ω(1) ≤ δ(n) ≤ O(n1− ) for some constant > 0, (≥ δ(n))-SSF is N P -hard but allows a PTAS. – When δ(n) ≥ ω(n1− ) for every constant > 0, (≥ δ(n))-SSF is not N P -hard assuming Exponential Time Hypothesis (ETH) [12]. We note that graphs of minimum degree cn for some constant c > 0 are called everywhere-c-dense graphs [3], which form a subclass of c-dense graphs. Our results indicate that spanning star forest on everywhere-c-dense graphs are easier than on c-dense graphs, since SSF on c-dense graphs is AP X-hard for every fixed c ∈ (0, 1) [11]. Part 2. We next investigate a generalization of SSF, called the spanning k-tree forest problem, which is introduced in [13]. A forest is called a k-tree forest if every component of it can be regarded as a tree of depth at most k. The size of a k-tree forest is the number of non-root vertices of it (which equals to the number of vertices of the forest minus the number of its components). A spanning k-tree forest of G is a spanning subgraph of G that is also a k-tree forest. The goal of the spanning k-tree forest problem is to find a maximum-size spanning k-tree forest of the input graph. When k = 1, this is just the ordinary spanning star 1 forest problem. We propose a (1 − k+2 )-approximation algorithm for the spanning k-tree forest problem, which slightly improves the previously known bound 1 of 1 − k+1 [13]. What is more interesting is that we also prove an asymptotically matching hardness result. Namely, it is N P -hard to approximate the problem to 1 − Ω( k1 ). To our knowledge, this is the first inapproximability result for this problem. Part 3. We finally give a short note on the hardness aspect of the original (unweighted) spanning star forest problem. We show, by using the results from Chleb´ık and Chleb´ıkov´a [8], that the spanning star forest problem is N P -hard to approximate within ratio 244 245 even on graphs of maximum degree 5. This improves the previously best known hardness factor of 259 [14]. 260
On Variants of the Spanning Star Forest Problem
1.2
73
Notation Used for Approximation Algorithms
Let Π be a maximization (resp. minimization) problem and 0 < β ≤ 1 (resp. β ≥ 1). Let A be an algorithm for solving Π. We say A is a β-approximation algorithm for Π if, on every instance of Π, it runs in polynomial time and finds a solution with objective value at least (resp. at most) β times the value of the optimum solution. The parameter β is called the approximation ratio, or alternatively approximation factor or performance guarantee of A for the problem Π. Usually β is considered to be a constant, but sometimes it can also be regarded as a function of the input size or some given parameters. We say Π has a polynomial time approximation scheme (PTAS) if for every constant > 0, there is a (1 − ) (resp. (1 + ))-approximation algorithm for Π. We say Π is AP X-hard if it does not have a PTAS, and say Π is AP X-complete if it has a constant factor approximation algorithm and is AP X-hard. We refer the readers to [15] for standard definitions and notations not given here.
2
Spanning Star Forest in Graphs with Minimum Degree Constraints
In this section, we study the spanning star forest problem on graphs with minimum degree δ(n), where n is the order of the graph and δ : N → N is a function satisfying 1 ≤ δ(n) ≤ n − 1 for all n ∈ N. Denote this restricted problem by (≥ δ(n))-SSF. Putting on the requirement 1 ≤ δ(n) ≤ n − 1 does not lose generality, since we only consider simple connected graphs. (For disconnected graphs, we simply run the algorithm for connected graphs on every component of it, and gather the obtained star forests to obtain the final solution. This process clearly preserves the approximation ratio.) By Theorem 1.2.2 in Chap. 1 of [2], it is easy to design a (1 − O( logk k ))approximation algorithm for (≥ k)-SSF. (We temporarily write k instead of δ(n) for notational simplicity.) The next lemma generalizes the argument to node-weighted graphs. Lemma 1. Given any node-weighted graph G of minimum degree k,we can find in polynomial time a dominating set of G of weight at most Θ logk k · W , where W is the total weight of all vertices in G. Proof. Assume G = (V, E) and w : V → R+ ∪{0} be the weight function. Let p = k1 1 1 − k+1 ∈ (0, 1). We pick every vertex v ∈ V randomly and independently with probability p, and denote by U1 the set of picked vertices. Let U2 be the set of vertices not dominated by U1 , i.e., U2 = {v ∈ V | N (v) ∪ {v} ⊆ V \ U1 }, where N (u) denotes the set of neighbors of vertex u. Clearly U1 ∪ U2 is a dominating set of G. Let us bound the expected weight of this set. For all v ∈ V , we have Prob(v ∈ U1 ) = p
74
J. He and H. Liang
and Prob(v ∈ U2 ) = (1 − p)1+|N (v)| . By linearity of expectation, E(w(U1 ∪ U2 )) = w(v) p + (1 − p)1+|N (v)| ≤ p + (1 − p)1+k w(v). v∈V
Substituting p = 1 −
v∈V 1 k+1
1 k
, we get
E(w(U1 ∪ U2 )) ≤ 1 −
k 1
(k + 1)1+ k
W =Θ
log k k
· W.
Therefore, there exists a dominating set of G of weight at most this much. Note that, for any subset V ⊆ V , if all vertice in V have been determined whether to belong to U1 or not, we can calculate the conditional expectation of w(U1 ∪ U2 ) in a similar manner. Thus we can find a dominating set of at least this size in deterministic polynomial time by the standard method of conditional expectation.
Corollary 1. Every node-weighted graph G with minimum degree k has a spanning star forest of weight at least 1 − Θ logk k W , where W is the total weight of all vertices in G. Moreover, such a star forest can be found in polynomial time. The next claim follows from the fact that the maximum weight of a spanning star forest of G never exceeds the total weight of all vertices in G. Corollary 2. There is a 1 − Θ logk k -approximation algorithm for the nodeweighted (≥ k)-SSF problem. The following theorem is straightforward from the hardness result for the spanning k-tree forest problem (Theorem 5) which will be shown later, and thus we omit its proof. Theorem 1. There is a constant c > 0 such that, for every fixed integer k ≥ 2, it is NP-hard to approximate (≥ k)-SSF within a factor of 1 − kc . Notice that (≥ k)-SSF is a subproblem of (≥ k )-SSF whenever k ≥ k . Thus, combined with the fact that SSF has an Ω(1)-approximation algorithm, Theorem 1 directly yields the following corollary, which is the first part of our trichotomy characterization. Corollary 3. (≥ δ(n))-SSF is APX-complete if δ(n) = O(1). Now suppose δ(n) = ω(1) and G = (V, E) is an input graph to (≥ δ(n))-SSF. By Corollary 2 we can find a 1 − Θ ln(δ(n)) -approximation algorithm for δ(n)
(≥ δ(n))-SSF. It is easy to check that the approximation factor becomes 1 − o(1) when δ(n) = ω(1), which immediately implies the following:
On Variants of the Spanning Star Forest Problem
75
Corollary 4. For any function δ(n) with ω(1) ≤ δ(n) ≤ n − 1, (≥ δ(n))-SSF admits a polynomial time approximation scheme (PTAS). A PTAS becomes (almost) useless if the problem can be solved optimally in polynomial time. We next show that, for a large range of δ(n), the restricted problem remains N P -hard, thus establishing the second part of our results. Theorem 2. For any fixed > 0, (≥ n1− )-SSF is N P -hard. Proof. Fix such that 0 < < 1 (the case ≥ 1 is trivial). Let C = 1/ − 1. We now describe a polynomial-time reduction from the original (unweighted) SSF problem (or, (≥ 1)-SSF) to unweighted (≥ n1− )-SSF, thus proving the N P -hardness of the latter. Let G = (V, E) be a simple connected graph. Suppose V = {v1 , v2 , . . . , vn }, where n = |V |. We construct a graph G = (V , E ) from G as follows: Let V = V ∪ {wi,j : 1 ≤ i ≤ n, 1 ≤ j ≤ nC − 1}, and E = E ∪ {(vi1 , wi2 ,j ) : i1 = i2 or (vi1 , vi2 ) ∈ E, 1 ≤ j ≤ nC − 1} ∪ {(wi,j1 , wi,j2 ) : 1 ≤ i ≤ n, 1 ≤ j1 < j2 ≤ nC − 1}. Note that |V | = n + n(nC − 1) = nC+1 . Let us examine the minimum degree of G . For every vertex vi , it is connected to at least one other vertex vi with i = i, together with nC − 1 nodes wi,j , 1 ≤ j ≤ nC − 1. Thus its degree is at least nC . For each vertex wi,j , it is adjacent to vi and nC − 2 other vertices wi,j , j = j. Furthermore, since (vi , vi ) ∈ E for at least one vertex vi with i = i, wi,j is also adjacent to this vi according to our definition of E . Hence C wi,j also has degree at least nC . As nC = |V | C+1 ≥ |V |1− , the graph G is a valid input to (≥ n1− )-SSF. Also note that this construction can be finished in polynomial time, since C is a constant. Let OP T (resp. OP T ) denote the size of the maximum spanning star forest of G (resp. G ). We now prove that OP T = OP T + n(nC − 1), which will finish the reduction. Let S be the set of centers in the maximum-size spanning star forest of G. We know that S is a dominating set of G, and OP T = n − |S|. By the construction of G , the same vertex set S is also a dominating set of G . Thus we have OP T ≥ |V | − |S| = nC+1 − |S| = OP T + n(nC − 1). Now consider the other direction. Let S be the collection of centers in the optimal spanning star forest of G . If there exists wi,j ∈ S for some i, j, we construct a new set of centers S by removing wi,j from S and then declaring vi as a new center (if vi ∈ S); that is, we set S = (S \ {wi,j }) ∪ {vi }. Since every neighbor of wi,j other than vi is also a neighbor of vi , S is a dominating set of G of cardinality no more than that of S. We repeatedly perform the above procedure until all vertices in the center set, denoted S ∗ , are vi for some i. It is clear that S ∗ is a dominating set of G with |S ∗ | ≤ |S|. Thus OP T = |V | − |S| ≤ nC+1 − |S ∗ | = n − |S ∗ | + n(nC − 1) ≤ OP T + n(nC − 1). Combined with the previous result, we have OP T = OP T + n(nC − 1), thus completing the reduction and concluding the N P -hardness of (≥ n1− )-SSF. We now show that the term n1− is actually optimal assuming the following Exponential Time Hypothesis (ETH) [12].
76
J. He and H. Liang
Conjecture 1 (Exponential Time Hypothesis [12]). Any deterministic algorithm for 3-SAT has time complexity 2Ω(n) . Consequently, any N P -hard probΩ(1) lem has time complexity 2n . Theorem 3. Assuming ETH, (≥ δ(n))-SSF is not N P -hard if δ(n) = ω(n1− ) for every constant > 0. Proof. Assume δ(n) = ω(n1− ) for every constant > 0. Let G be a graph of order n and minimum degree δ(n). Let λ(n) = n/δ(n). Then λ(n) = 2o(log n) . δ(n) By Lemma 1 we know that G has a dominating set of size n · O( logδ(n) ) = λ(n) · O(log δ(n)) ≤ 2o(log n) · O(log n) = no(1) . Therefore, we can enumerate all possible subsets of size no(1) to find the minimum dominating set of G and o(1) hence the maximum spanning star forest of G. This takes time O(nn ) = o(1) o(1) O(2n ·log n ) = 2n . However, assuming ETH every N P -hard problem has Ω(1) time complexity 2n , concluding the proof. We end up this section by summarizing the obtained results in Table 1. Table 1. Complexity results for (≥ δ(n))-SSF δ(n) complexity of (≥ δ(n))-SSF 1 ≤ δ(n) ≤ O(1) NP-hard; APX-complete ω(1) ≤ δ(n) ≤ O(n1− ) for some fixed > 0 NP-hard; admits a PTAS ω(n1− ) ≤ δ(n) for any fixed > 0 not NP-hard assuming ETH
3
Spanning k-Tree Forest Problem
In this section we investigate the node-weighted spanning k-tree forest problem, where k is a fixed positive integer. Recall that the objective of this problem is, given a graph G, to find a spanning forest of G, each component of which has depth at most k when one of its vertices is designated as the root, such that the total weight of all non-root vertices is maximized. As before, we assume that the input graph is connected, since otherwise we can run our algorithm on every connected component of it. 3.1
Improved Approximation Algorithm
Liao and Zhang [13] show that a simple algorithm (denoted as Simple-Alg), based on the idea of dividing a spanning tree into k disjoint star forests, can find k a spanning k-tree of weight at least k+1 times the total weight of all vertices in the input graph. We first observe that the spanning k-tree forest problem is the complement of the k-domination problem, where the objective of the latter is to find a minimumweight vertex set of a graph G such that every vertex in G is at distance at most k from some node in this set.
On Variants of the Spanning Star Forest Problem
77
Lemma 2. For every node-weighted graph G, the maximum weight of a spanning k-tree forest of G equals the total weight of vertices in G minus the minimum weight of a k-domination set of G. Proof. Let G = (V, E) and w : V → R+ ∪ {0} be the weight function on vertices of G. If there is a spanning k-tree forest of G of weight W , the roots in this forest form a k-domination set of weight v∈V w(v) − W . If there is a k-domination set of G of weight W , we can perform a breadth-first search rooted at the vertices in this set to construct a spanning k-tree forest of G, which has weight w(v) − W .
v∈V The following lemma is straightforward and we omit its (trivial) proof. Lemma 3. For every graph G, let Gk denote the graph with the same vertex set with G such that every two vertices are adjacent in Gk if and only if they are within distance k from each other in G. Then, every k-domination set of G is a dominating set of Gk , and vice versa. It is easy to see that Gk has minimum degree at least k for any connected graph G with at least k + 1 vertices. Thus the spanning k-tree forest problem is reducible k to the (≥ k)-SSF problem. Note that the Simple-Alg is a ( k+1 )-approximation for the spanning k-tree forest problem, which is better than the performance log k guarantee of 1 − Θ for (≥ k)-SSF obtained before. We next show how to k improve this approximation ratio slightly. The following lemma is due to Chen et. al. [7]. 1
Lemma 4 (Lemma 1 in [7], restated). There is an (1−r) r −1 -approximation algorithm for node-weighted SSF, where r is the ratio of the weight of the optimal solution over the total weight of all vertices in the graph. Algorithm 1. Finding approximate spanning k-tree forest of G 1: Construct Gk from G. 2: Run Rounding-Alg on Gk and Simple-Alg on G, and return the better solution.
We call the algorithm ensured by Lemma 4 Rounding-Alg (since it is based on an LP-rounding scheme). Consider now the algorithm described in Algorithm 1 for the spanning k-tree forest problem given the input graph G. Clearly this algorithm runs in polynomial time. Suppose the total weight of all vertices T in G is W , and the weight of the optimum solution is OP T . Let r = OP W . We k kW have r ≥ k+1 , since Simple-Alg returns a solution of weight k+1 . Note that kW k Simple-Alg has an approximation factor of k+1 /OP T = (k+1)r . The algorithm 1
Rounding-Alg produces a solution with approximation ratio (1 − r) r −1 . By comparing the two algorithms and pick the better one, we obtain the following theorem.
78
J. He and H. Liang
Theorem 4. Algorithm 1 is a k+1 k+2 -approximation algorithm for the nodeweighted spanning k-tree forest problem. Proof. It suffices to show that
min max k r: k+1 ≤r<1
When r ≤ r>
k(k+2) . (k+1)2
k(k+2) (k+1)2
it holds that
As (1 − r)
1 r −1
k 1 , (1 − r) r −1 (k + 1)r k (k+1)r
≥
k+1 k+2 ,
≥
k+1 . k+2
so we only need to prove it for
is monotone increasing with r [7], it suffices to prove
(k+1)2 −1 k(k + 2) k(k+2) k+1 1− ≥ (k + 1)2 k+2 21 k +2k 1 k+1 ⇐ ≥ 2 (k + 1) k+2 k2 +2k 2 k+2 ⇐k+1≤ k+1 k 2 + 2k k+2 ⇐ ln(k + 1) ≤ ln . 2 k+1 When k = 2 it can be directly verified by simple calculation. For k ≥ 3, using x the inequality ln(1 + x) ≥ 1+x for all x ≥ 0, we have ln(k + 1) ≤
k k 2 + 2k ≤ · 2 2
1 k+1 k+2 k+1
≤
k 2 + 2k ln 2
k+2 k+1
.
This completes the proof of Theorem 4. 3.2
Inapproximability Results
We next show an inapproximability ratio of 1 − Ω( k1 ) for the spanning k-tree 1 forest problem, which asymptotically matches our approximation ratio of 1− k+2 . This result holds even for the unweighted case. Theorem 5. There exists a universal constant c > 0 such that, for every integer k ≥ 2, it is N P -hard to approximate the spanning k-tree forest problem within a factor of 1 − kc . Proof. Let > 0 be a constant such that approximating SSF within 1 − is N P -hard [14]. Let k ≥ 2. Given an instance G = (V, E) of SSF, we construct a corresponding instance G of the spanning k-tree forest problem (k-SF for short) as follows. Initially set G = ∅. For every vertex v ∈ V , add k vertices
On Variants of the Spanning Star Forest Problem
79
v (0) , v (1) , . . . , v (k−1) to G together with the edges (v(i) , v (i+1) ) for all 0 ≤ i < k − 1 (i.e., create a chain of length k − 1). For every edge e = (u, v) ∈ E, add to G an edge (u(0) , v (0) ). This finishes the construction of G . We claim that G has a spanning star forest of size m if and only if G has a spanning k-tree forest of size m + n(k − 1), n being the number of vertices in G. First assume G has a spanning star forest of size m. By attaching to every vertex the corresponding chain of length k − 1, we can easily construct a spanning k-tree forest in G of size m + n(k − 1). More formally, letting the edge set of the spanning star forest of G be {(u1 , v1 ), . . . , (um , vm )}, the edges (0) (0) (0) (0) in {(u1 , v1 ), . . . , (um , vm )} ∪ v∈V {(v(0) , v (1) ), . . . , (v (k−2) , v (k−1) )} form a spanning k-tree forest of G of size m + n(k − 1). Now suppose G has a spanning k-tree forest F of size m . For notational simplicity we call i the order of v (i) . We first prove that there exists a spanning k-tree forest of size at least m such that every center has order 0. Suppose v (t) is a center in F of order t > 0. If v (0) is also a center in F , the connected component of F containing v (t) must be a chain, and there exists i s.t. (v (i) , v (i+1) ) ∈ F . We merge this component with that containing v (0) ; that is, we attach the chain (v (1) , v (2) , . . . , v(k−1) ) to v (0) . It is easy to verify that the resulting subgraph is also a spanning k-tree forest, and has size at least m + 1. If v (0) is not a center in F , we declare it as a new center, delete from F the (unique) edge incident on v(0) , and connect the entire chain (v(1) , v (2) , . . . , v (k−1) ) to v (0) . This generates a spanning k-tree forest of size at least m . Hence, w.l.o.g. we may assume that every center in F has order 0. Let v (0) be any order-0 vertex in G . If v(0) is neither a center nor directly connected to a center in F , there must exist some i such that (v (i) , v (i+1) ) is not in F ; otherwise, since v (0) is at distance at least 2 from any center in F , v (k−1) is at distance at least k + 1 from any center in F , contradicting the k-tree property. Let u(0) be the vertex to which v (0) is connected in F (such vertex exists since v (0) is not a center and every center is of order 0). We delete (v (0) , u(0) ) from F and designate v(0) as a new center in F . We then add all edges (v (i) , v (i+1) ) to F (at least 1 new edge is added). Recursively doing this will finally give a spanning k-tree forest F of size ≥ m , in which every vertex of order 0 is either a center itself or is directly connected to another center. Now, deleting edges (v (i) , v (i+1) ) for all v and i (if they are in F ) and then replacing v (0) with v for all v ∈ V will produce a spanning star forest of G, which has size at least m − n(k − 1). We have thus proved that G has a spanning star forest of size m if and only if G has a spanning k-tree forest of size m + n(k − 1), and one solution can be easily converted to another in polynomial time. Suppose the k-SF problem admits an r-approximation algorithm. Denoting by m the size of the optimal solution to G, we know that the optimal solution to G has size m + n(k − 1). Also note that m ≥ n/2 since G is connected. Applying the r-approximation scheme on G and then transforming it back to a solution to G will give us a spanning star forest of size at least r(m + n(k − 1)) − n(k − 1). As approximating SSF within 1 − is N P -hard, there exist an instance G with n, m > 0 such that r(m + n(k − 1)) − n(k − 1) ≤ (1 − )m. We thus have
80
J. He and H. Liang (1−)+ n (k−1)
m r ≤ (1−)m+n(k−1) = 1+ n (k−1) m+n(k−1) m c = /2 completes the proof.
≤
1−+2(k−1) 1+2(k−1)
= 1−
2k−1
≤ 1−
/2 k .
Taking
We note that Theorem 1 follows directly from Theorem 5, since as argued before, the spanning k-tree forest problem is a special case of the (≥ k)-spanning star forest problem.
4
Improved Hardness Results for Spanning Star Forest
In this section we show that, by a careful examine of the reductions used by Chleb´ık and Chleb´ıkov´a [8] for proving hardness for N P -hard problems on lowdegree instances, we can improve the hardness bound for the unweighted spanning star forest problem. Theorem 6. For any > 0, it is N P -hard to approximate the spanning star forest problem to a factor of 244 245 + even on graphs of maximum degree 5. Proof. One of Chleb´ık and Chleb´ıkov´a’s results says that vertex cover in 4-regular graphs cannot be approximated to within 52 assuming P = N P (Corol53 lary 18 in [8]). The reductions in their paper crucially depend on a class of carefully constructed gadgets called consistency gadgets. Revisiting their proof of Theorem 17 in [8], it can be seen that they actually prove the following stronger result: Given any 4-regular graph G of n vertices, it is N P -hard to tell whether −MH )/k+8+ the optimal vertex cover has size at most n 2(VH2V , or has size at least H /k+12 −MH )/k+9− n 2(VH2V , where > 0 is any small constant, H is a fixed consistency H /k+12 gadget (depending on ) and VH , MH , k are parameters of H satisfying that VH = 2MH and MH /k ≤ 21.7. Given a graph G = (V, E), we construct a graph G by adding a vertex ve to V for every e ∈ E, and then connecting ve and the two endpoints of e. More specifically, G = (V , E ) where V = V ∪{ve |e ∈ E} and E = E ∪{(x, ve ), (y, ve )|e = (x, y) ∈ E}. It is easy to argue that the size of the optimum vertex cover of G is equal to that of the optimum dominating set of G , which equals |V | minus the size of the maximum spanning star forest of G . Combining this reduction with the aforementioned gap instances of 4-regular vertex cover, it is easy to argue the following: Given any graph G of 3n vertices with maximum degree −MH )/k+9− 5, it is N P -hard to distinguish whether OP Tssf (G) ≤ n 3 − 2(VH2V H /k+12 2(VH −MH )/k+8+ or OP Tssf (G) ≥ n 3 − , where OP Tssf (G) denote the maxi2VH /k+12 mum size of a spanning star forest of G. Hence, it is N P -hard to approximate unweighted SSF to a factor of 2(VH − MH )/k + 9 − 2(VH − MH )/k + 8 + 3− / 3− 2VH /k + 12 2VH /k + 12 27 + 4VH /k + 2MH /k + 27 + 10 · 21.7 + 244 = ≤ ≤ + , 28 + 4VH /k + 2MH /k − 28 + 10 · 21.7 − 245
for any small > 0, since VH = 2MH and MH /k ≤ 21.7. The theorem is thus proved.
On Variants of the Spanning Star Forest Problem
81
References 1. Agra, A., Cardoso, D., Cerfeira, O., Rocha, E.: A spanning star forest model for the diversity problem in automobile industry. In: Proceedings of the 17th European Conference on Combinatorial Optimization, ECCO XVII (2005) 2. Alon, N., Spencer, J.H.: The Probabilistic Method. Wiley, New York (1992) 3. Arora, S., Karger, D., Karpinski, M.: Polynomial time approximation schemes for dense instances of NP-hard problems. J. Comput. Syst. Sci. 58(1), 193–210 (1999) 4. Athanassopoulos, S., Caragiannis, I., Kaklamanis, C., Kyropoulou, M.: An improved approximation bound for spanning star forest and color saving. In: Kr´ aloviˇc, R., Niwi´ nski, D. (eds.) MFCS 2009. LNCS, vol. 5734, pp. 90–101. Springer, Heidelberg (2009) 5. Berry, V., Guillemot, S., Nicolas, F., Paul, C.: On the approximation of computing evolutionary trees. In: Wang, L. (ed.) COCOON 2005. LNCS, vol. 3595, pp. 115– 125. Springer, Heidelberg (2005) 6. Chakrabarty, D., Goel, G.: On the approximability of budgeted allocations and improved lower bounds for submodular welfare maximization and GAP. In: Proceedings of 49th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pp. 687–696 (2008) 7. Chen, N., Engelberg, R., Nguyen, C.T., Raghavendra, P., Rudra, A., Singh, G.: Improved approximation algorithms for the spanning star forest problem. In: Charikar, M., Jansen, K., Reingold, O., Rolim, J.D.P. (eds.) RANDOM 2007 and APPROX 2007. LNCS, vol. 4627, pp. 44–58. Springer, Heidelberg (2007) 8. Chleb´ık, M., Chleb´ıkov´ a, J.: Complexity of approximating bounded variants of optimizatin problems. Theor. Comput. Sci. 354, 320–338 (2006) 9. Duh, R., Furer, M.: Approximation of k-set cover by semi local optimization. In: Proceedings of the 29th Annual ACM Symposium on the Theory of Computing (STOC), pp. 256–264 (1997) 10. Feige, U.: A threshold of ln n for aproximating set cover. J. ACM 45(4), 634–652 (1998) 11. He, J., Liang, H.: An improved approximation algorithm for spanning star forest in dense graphs. In: Wu, W., Daescu, O. (eds.) COCOA 2010, Part II. LNCS, vol. 6509, pp. 160–169. Springer, Heidelberg (2010) 12. Impagliazzo, R., Paturi, R.: On the complexity of k-SAT. J. Comput. Syst. Sci. 62(2), 367–375 (2001) 13. Liao, C.-S., Zhang, L.: Approximating the spanning k-tree forest problem. In: Deng, X., Hopcroft, J.E., Xue, J. (eds.) FAW 2009. LNCS, vol. 5598, pp. 293–301. Springer, Heidelberg (2009) 14. Nguyen, C.T., Shen, J., Hou, M., Sheng, L., Miller, W., Zhang, L.: Approximating the spanning star forest problem and its applications to genomic sequence alignment. SIAM J. Comput. 38(3), 946–962 (2008) 15. Vazirani, V.: Approximation Algorithms. Springer, Heidelberg (2001)
An Implicit Degree Condition for Cyclability in Graphs Hao Li1,2 , Wantao Ning1 , and Junqing Cai1 1
School of Mathematics and Statistics, Lanzhou University, Lanzhou 730000, China
[email protected],
[email protected] 2 L R I, UMR 8623 CNRS and Universit´e de Paris-Sud 11, F-91405 Orsay, France
[email protected]
Abstract. A vertex subset X of a graph G is said to be cyclable in G if there is a cycle in G containing all vertices of X. Ore [6] showed that the vertex set of G with cardinality n ≥ 3 is cyclable (i.e. G is hamiltonian) if the degree sum of any pair of nonadjacent vertices in G is at least n. Shi [8] and Ota [7] respectively generalized Ore’s result by considering the cyclability of any vertex subset X of G under Ore type condition. Flandrin et al. [4] in 2005 extended Shi’s conclusion under the condition called regional Ore s condition. Zhu, Li and Deng [10] introduced the definition of implicit degrees of vertices. In this work, we generalize the result of Flandrin et al. under their type condition with implicit degree sums. More precisely, we obtain that X is cyclable in a k-connected graph G if the implicit degree sum of any pair of nonadjacent vertices u, v ∈ Xi is at least the order of G, where each Xi , i = 1, 2, · · · , k is a vertex subset of G and X = ki=1 Xi . In [10], the authors demonstrated that the implicit degree of a vertex is at least the degree of the vertex. Hence our result is better than the result of Flandrin et al. in some way. Keywords: Graph, Implicit degree, Cycles, Cyclability.
1
Introduction
In this paper we consider only undirected and simple graphs. For a graph G, V (G) and E(G) denote the vertex set and edge set of G, respectively. Let v be a vertex of G. We denote by N (v) the neighborhood of v and by d(v) the degree of v in G. Let d(v) = |N (v)|. We use δ(G) to show the minimum degree of vertices of G. Other notations appearing in this paper can be found in [1]. A graph G is said to be hamiltonian if G has a cycle containing all vertices of G. This cycle is called a hamiltonian cycle. A subset X of V (G) is defined as cyclable in G if there is a cycle in G containing all vertices of X. We also say that G is X-cyclable. The hamiltonian problem is a basic problem in graph theory. Various sufficient conditions for a graph to be hamiltonian have been given in term of vertex degree conditions, especially the following two theorems due to Dirac and Ore respectively. Obviously Ore’s theorem is an extension of Dirac’s theorem. M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 82–89, 2011. c Springer-Verlag Berlin Heidelberg 2011
An Implicit Degree Condition for Cyclability in Graphs
83
Theorem 1. (Dirac [3]). Let G be a graph on n ≥ 3 vertices. If δ(G) ≥ n/2, then G is hamiltonian. Theorem 2. (Ore [6]). Let G be a graph on n ≥ 3 vertices. If d(u) + d(v) ≥ n for each pair of nonadjacent vertices u, v ∈ V (G), then G is hamiltonian. A graph G being hamiltonian is equivalent to V (G) being cyclable in G. Hence we can regard hamiltonian problem as a special case of cyclable problem. Therefore the following theorem is a generalization of Theorem 2. Theorem 3. (Shi [8], Ota [7]). Let G be a graph of order n and X be a subset of V (G). If G is 2-connected and such that for any pair of nonadjacent vertices x and y in X we have d(x) + d(y) ≥ n, then X is cyclable in G. Many other conditions for cyclability can be found in [2,5] etc. Theorem 3 is improved under the condition called regional Ore s condition by the following theorem. Theorem 4. (Flandrin, Li, Marczyk and Wo´ z niak [4]). Let G = (V, E) be a k-connected graph, k ≥ 2, of order n. Denote by X1 , X2 , · · · , Xk subsets of the vertex set V and let X = X1 ∪ X2 ∪ · · · ∪ Xk . If for each i, i = 1, 2, · · · , k, and for each pair of nonadjacent vertices x, y ∈ Xi , we have d(x) + d(y) ≥ n, then G is X-cyclable. Here we are interested in the following Definition 1 that generalizes the classical degrees. For a graph G and two vertices u, v ∈ V (G), let d(u, v) be the distance between u and v. Define N1 (v) = N (v) = {u ∈ V (G) : d(u, v) = 1} and N2 (v) = {u ∈ V (G) : d(u, v) = 2}. Definition 1. (Zhu, Li and Deng [10]). Let v ∈ V (G). (a) If N2 (v) = ∅ and d(v) ≥ 2, denote by M2 = max{d(u) : u ∈ N2 (v)}. Let d(v) = l+1 and d1 ≤ d2 ≤ d3 ≤ · · · ≤ dl ≤ dl+1 ≤ · · · be the degree sequence of the vertices of N1 (v) ∪ N2 (v). Put ∗
d (v) =
dl+1 , dl ,
if dl+1 > M2 ; otherwise.
Then the implicit degree id(v) of vertex v is defined as id(v) = max{d(v), d∗ (v)}. (b) If N2 (v) = ∅ or d(v) < 2, then id(v) = d(v). It is clear from the definition that id(v) ≥ d(v) for every vertex v. The first result on hamiltonian graph theory that is on the implicit degrees was obtained by Zhu et al. [10].
84
H. Li, W. Ning, and J. Cai
Theorem 5. (Zhu, Li and Deng [10]). Let G be a 2-connected graph of order n. If a and b are two nonadjacent vertices such that id(a) + id(b) ≥ n, then G is hamiltonian if and only if G + ab is hamiltonian. There has another definition of implicit degrees in [9] which is used for Chvat´ al type condition on implicit degree sequences. In this paper, we show the following new result that is of Flandrin et al. type condition (see Theorem 4) with implicit degrees. Theorem 6. Let G be a k-connected graph on n vertices with k ≥ 2. Denote by X1 , X2 , · · · , Xk subsets of the vertex set V (G) and let X = X1 ∪ X2 ∪ · · · ∪ Xk . If for each j, j = 1, 2, · · · , k, and for each pair of nonadjacent vertices u, v ∈ Xj , we have id(u) + id(v) ≥ n, then X is cyclable in G. It is clear that Theorem 6 is an extension of Theorem 4. We postpone the proof of Theorem 6 to next section. Here we have a look at the following example in which a vertex subset X of a graph G does not satisfy the conditions of Theorem 4 but it can be verified to be cyclable by using Theorem 6. Example. Let G be a bipartite graph with order n = 9 as follows (Fig. 1). In this graph, we take X = X1 ∪ X2 , where X1 = {y, u} and X2 = {v, w}. Obviously X is cyclable. We can verify that d(y) = d(u) = d(v) = 5 and d(w) = 3. Also it is easy to get that id(y) = id(u) = id(v) ≥ d(v) = 5 and id(w) ≥ 4. We can not get that X is cyclable from the result of Flandrin et al. because d(v)+ d(w) = 8 < 9. However by Theorem 6 we can show that X is cyclable since id(y) + id(u) ≥ 9 and id(v) + id(w) ≥ 9.
y
u v w Fig. 1.
Remark 1. A complete bipartite graph G[X, Y ] with two partitions X and Y such that |X| = |Y | + 1 can show that the bound of Theorem 6 is tight. We omit the detail.
An Implicit Degree Condition for Cyclability in Graphs
85
Remark 2. Zhu, Li and Deng proposed two kinds of definitions of implicit degrees in [10]. The first one is the Definition 1 above. For the second definition, we need only change d∗ (v) of Definition 1 into ⎧ if dl < m2 ; ⎨ m2 , if dl+1 > M2 ; d∗ (v) = dl+1 , ⎩ dl , if dl ≥ m2 and dl+1 ≤ M2 , where m2 = min{d(u) : u ∈ N2 (v)}. The following Fig. 2 manifests that using the second definition of implicit degrees can not get the cyclablity of a vertex subset X of G under the similar conditions of Theorem 6. In Fig. 2, Km is a complete graph with order m ≥ 6 and x1 , x2 are adjacent to every vertex of Km . Then the order of G is m + 14. In the second definition of implicit degrees, we use the symbol d2 (v) to represent the implicit degree of a vertex v. By the definition, d2 (u0 ) = d2 (u1 ) = d2 (u2 ) = d2 (u3 ) = m + 4. Then d2 (u0 ) + d2 (u1 ) = d2 (u2 ) + d2 (u3 ) = 2m + 8 ≥ m + 14. Hence if we take X = X1 ∪ X2 and X1 = {u0 , u1 }, X2 = {u2 , u3 }, then each pair of nonadjacent vertices in X1 or X2 has implicit degree sum at least m + 14. But we can find directly that X is not cyclable in G.
x1
u1
u3 u0
u2
x2
Km Fig. 2.
2
The Proof of Theorem 6
Let C = u1 u2 · · · uk u1 be a cycle of G with a fixed orientation. We use u+ i and to denote the successor and predecessor of u on C, respectively. For two u− i i distinct vertices x and y of C, the segment of C from x to y, denoted by xCy, is the ordered set of consecutive vertices of C from x to y (x and y included) ¯ denotes the same set but in reverse order. along the direction of C while y Cx If x = y, xCy means the one-vertex set {x}. The analogous notations is used for a path P of G. Let P1 = u1 u2 · · · uk and P2 = v1 v2 · · · vd be two paths. If only uk = v1 , then we use P1 ∪ P2 to denote the path u1 u2 · · · uk v2 v3 · · · vd .
86
H. Li, W. Ning, and J. Cai
If V (P1 )∩V (P2 ) = ∅, then we denote by P1 ∪P2 the path u1 u2 · · · uk v1 v2 v3 · · · vd . We also regard a vertex as a path. Let P (a, b) = v0 v1 v2 · · · vl be a path with v0 = a and vl = b in graph G. Denote by lP (a) = max{i : vi ∈ P (a, b) and vi a ∈ E(G)}, and lP (b) = min{i : vi ∈ P (a, b) and vi b ∈ E(G)}. Let LP (a) = vlP (a) and LP (b) = vlP (b) . Proof of Theorem 6. Let G, Xi , i = 1, 2, · · · , k and X be as in Theorem 6. We prove by contradiction and suppose that X is not cyclable. Since G is k-connected with k ≥ 2, there exists a cycle C in G. Choose C such that it contains as many vertices of X as possible. We give C a direction by the clockwise direction. Since X is not cyclable, there exists at least one vertex x0 in G − C such that x0 ∈ X. Since G is k-connected, by Menger’s theorem, there exist k internal vertex-disjoint paths connecting x0 and C. We may assume Pi , i = 1, 2, · · · , k be k internal vertex-disjoint paths connecting x0 and C and V (Pi ) ∩ V (C) = {ui }. Without loss of generality suppose u1 , u2 , · · · , uk occur on C in the order of their indices along the direction of C. Let us orient the Pi from x0 to ui . Hence P¯i is the path Pi oriented from ui to x0 (Fig 3). − Denote by xi the first vertex of X lying on the segment u+ i Cui+1 . By the + choice of C, there exist at least one vertex of X lying on each ui Cu− i+1 .
x0
Pi
Pj xi ui
uj xj C
Fig. 3.
Claim 1. {x0 , x1 , x2 , · · · , xk } is an independent set. Proof. The proof of this claim can be found in many related papers, see [4,7] etc. We omit its proof.
An Implicit Degree Condition for Cyclability in Graphs
87
We know that {x0 , x1 , x2 , · · · , xk } has k + 1 elements and they all belong to X. Hence at least two elements of them belong to the same Xq for some q ∈ {1, 2, · · · , k}. We let xi and xj belong to the same Xq for 0 ≤ i < j ≤ k. If i = 0, take ¯ j Q = xi Cuj ∪ P¯j ∪ Pi ∪ ui Cx be a path containing more vertices of X than C. If i = 0, take ¯ j Q1 = Pj ∪ uj Cx be a path containing more vertices of X than C. In the following proof, we only discuss the path Q because for Q1 the argument is similar to the discussion of Q. Let G be a graph and M be a subset of V (G). Then we denote by NM (h) = N (h) ∩ M , where h ∈ V (G). Set R = G − Q. Suppose Q = v1 v2 · · · vp . For any vertex subset I of Q, let I − = {vi : vi+1 ∈ I} and I + = {vi : vi−1 ∈ I}. We show a lemma as follows. Lemma 1. Let Q = v1 v2 · · · vp with v1 = xi and vp = xj . If d(u) < id(xi ) for every u ∈ NR (xi ) ∪ {xi }, then there exists some vertex vi ∈ (NQ (xi ))− such that d(vi ) ≥ id(xi ). Proof. Let d(xi ) = l + 1. Since Q has more vertices of X than C and by the choice of C, we can get that xi xj ∈ / E(G). Hence vlQ (xi )+1 ∈ N2 (xi ). Here (NR (xi ) ∪ (NQ (xi ))− − {xi }) ∪ {vlQ (xi )+1 } has l + 1 vertices. Also (NQ (xi ))− ⊆ N1 (xi ) ∪ N2 (xi ) ∪ {xi }. It implies that these l + 1 vertices are in N1 (xi ) or in N2 (xi ). In order to unify with the definition of implicit degrees, let M2 = max{d(u) : u ∈ N2 (xi )} and d1 ≤ d2 ≤ d3 ≤ · · · ≤ dl ≤ dl+1 ≤ · · · be the degree sequence of the vertices of N1 (xi ) ∪ N2 (xi ). By the definition of implicit degrees, we know id(xi ) = dl+1 when dl+1 > M2 . Since d(u) < id(xi ) for every u ∈ NR (xi ) ∪ {xi }, d(u) < dl+1 . Also we have d(vlQ (xi )+1 ) ≤ M2 < dl+1 . Let’s revisit the l + 1 vertices in (NR (xi ) ∪ (NQ (xi ))− − {xi }) ∪ {vlQ (xi )+1 }. Since these vertices belong to N1 (xi ) ∪ N2 (xi ), we get that there exists some vertex vi ∈ (NQ (xi ))− such that d(vi ) ≥ dl+1 = id(xi ). When dl+1 ≤ M2 , id(xi ) = dl . Now we consider the l vertices in NR (xi ) ∪ (NQ (xi ))− − {xi }. Similar to dl+1 > M2 , we can also obtain the desired result. Similar to Lemma 1, the following lemma is obvious. Lemma 2. Let Q = v1 v2 · · · vp with v1 = xi and vp = xj . If d(w) < id(xj ) for every w ∈ NR (xj ) ∪ {xj }, then there exists some vertex vj ∈ (NQ (xj ))+ such that d(vj ) ≥ id(xj ).
88
H. Li, W. Ning, and J. Cai
We consider two cases to look for a special path W . Let’s revisit the path Q = v1 v2 · · · vp with v1 = xi and vp = xj . Case 1. There is a vertex u ∈ NR (xi ) ∪ {xi } such that d(u) ≥ id(xi ). If there is also a vertex w ∈ NR (xj ) ∪ {xj } such that d(w) ≥ id(xj ), then take W = u ∪ Q ∪ w. If every vertex in NR (xj ) ∪ {xj } has degree less than id(xj ), then by Lemma 2 there exists some vertex vj ∈ (NQ (xj ))+ such that d(vj ) ≥ id(xj ). Take W = u ∪ v1 v2 · · · vj−1 vp vp−1 · · · vj . Case 2. Every vertex in NR (xi ) ∪ {xi } has degree less than id(xi ). By Lemma 1, there exists some vertex vi ∈ (NQ (xi ))− such that d(vi ) ≥ id(xi ). Subcase 2.1. There is a vertex w ∈ NR (xj ) ∪ {xj } such that d(w) ≥ id(xj ). In this subcase, take W = vi vi−1 · · · v1 vi+1 vi+2 · · · vp ∪ w. Subcase 2.2. Every vertex in NR (xj ) ∪ {xj } has degree less than id(xj ). By Lemma 2, there exists some vertex vj ∈ (NQ (xj ))+ such that d(vj ) ≥ id(xj ). If i + 1 ≤ lQ (xj ), set W = vi vi−1 · · · v1 vi+1 vi+2 · · · vj−1 vp vp−1 · · · vj . If i + 1 > lQ (xj ), let A = {vq1 : vq1 ∈ (NQ (xj ))− and q1 < i} and B = {vq2 : vq2 ∈ (NQ (xj ))+ and q2 > i + 1} and D = {vq3 : vq3 ∈ (NQ (xj ))+ , q3 < i + 1 and q3 is as large as possible}. Clearly xj ∈ B. Then |A| + |B| + |D| + |NR (xj )| − |{xj }| ≥ d(xj ) and clearly the only vertex in D belongs to N2 (xj ). We also know that the vertices in (A ∪ B ∪ NR (xj )) − {xj } belong to N1 (xj ) ∪ N2 (xj ). By the definition of id(xj ), similar to the proof of Lemma 1, we know that there is some vh ∈ (A ∪ B) − {xj } such that d(vh ) ≥ id(xj ). When vh ∈ B − {xj }, set W = vi vi−1 · · · v1 vi+1 vi+2 · · · vh−1 vp vp−1 · · · vh ,
An Implicit Degree Condition for Cyclability in Graphs
89
and when vh ∈ A, set W = vi vi−1 · · · vh+1 vp vp−1 · · · vi+1 v1 v2 · · · vh . In all cases, we have found a new path W = w1 w2 · · · wt connecting w1 and wt such that d(w1 ) ≥ id(xi ) and d(wt ) ≥ id(xj ). Since W contains more vertices of X than C, we have N (w1 ) ∩ N (wt ) ∩ V (G − W ) = ∅, and
(NW (w1 ))− ∩ NW (wt ) = ∅ and w1 wt ∈ / E(G).
(1)
(2)
(1) and (2) imply that d(w1 ) + d(wt ) ≤ n − 1.
(3)
But from the condition of Theorem 6 and our discussion, we have d(w1 ) + d(wt ) ≥ id(xi ) + id(xj ) ≥ n. (3) and (4) show a contradiction. The proof of Theorem 6 is completed.
(4)
References 1. Bondy, J.A., Murty, U.S.R.: Graph theory with applications. Macmillan and Elsevier, London, New York (1976) 2. Broersma, H., Li, H., Li, J., Tian, F., Veldman, H.J.: Cycles through subsets with large degree sums. Discrete Math. 171, 43–54 (1997) 3. Dirac, G.A.: Some theorems on abstract graphs. Proc. London Math. Soc. 3, 69–81 (1952) 4. Flandrin, E., Li, H., Marczyk, A., Wo´zniak, M.: A note on a generalisation of Ore’s condition. Graphs Combin. 21, 213–216 (2005) 5. Fournier, I.: Th`ese d’Etat. L.R.I., Universit´e de Paris–Sud, France (1985) 6. Ore, O.: Note on Hamilton circuits. Amer. Math. Monthly 67, 55 (1960) 7. Ota, K.: Cycles through prescribed vertices with large degree sum. Discrete Math. 145, 201–210 (1995) 8. Shi, R.: 2-neighborhoods and hamiltonian condition. J. Graph Theory 16, 267–271 (1992) 9. Zhu, Y., Gao, J.: Implicit degrees and Chv´ atal’s condition for hamiltonicity. Systems Sci. Math. Sci. 2, 353–363 (1989) 10. Zhu, Y., Li, H., Deng, X.: Implicit-degree and circumference. Graphs Combin. 5, 283–290 (1989)
Parallel Enumeration of Lattice Animals Gadi Aleksandrowicz and Gill Barequet Center for Graphics and Geometric Computing Dept. of Computer Science Technion—Israel Institute of Technology Haifa 32000, Israel {gadial,barequet}@cs.technion.ac.il
Abstract. Lattice animals are connected sets of lattice cells. When the lattice is in d dimensions, connectedness is through (d − 1)-dimensional features of the lattice. For example, connectedness of two-dimensional animals (e.g., on the rectangular, triangular, and hexagonal lattices) are through edges, connectedness of 3-dimensional polycubes is through faces, etc. Much attention has been given in the literature to algorithms for counting animals of a given size (number of cells) on different lattices. One such algorithm was suggested in 1981 by Redelmeier for counting polyominoes (animals on the 2D orthogonal lattice). This was the first algorithm that generated polyominoes without repetitions. In previous works we extended this algorithm to other lattices and showed how to avoid its (originally) huge memory consumption. In the current paper we describe how to parallelize the extended algorithm. Our implementation runs on the Internet, effectively using an unlimited number of computers running portions of the computation. Thus, we were able to extend the known counts of animals on many types of lattices with values which were previously out of reach. Keywords: Polyominoes, polycubes, leapers, subgraph counting.
1
Introduction
A 2-dimensional polyomino (resp., d-dimensional polycube) of size n is an edgeconnected (resp., (d − 1)-D face-connected) set of n squares (resp., d-D cubes) on the orthogonal lattice Z2 (resp., Zd ). Similarly, one can consider structures on other types of lattices, such as polyamonds on the planar triangular lattice, polyhexes on the planar hexagonal lattice, as well as structures on lattices of higher dimensions. All these structures are usually called lattice animals in the statistical-physics literature. Animals play an important role in computing the mean cluster density in percolation processes, in particular those of fluid flow in random media [BH57], and in modeling the collapse of branched polymer molecules in dilute solution [PG95]. Fixed animals are considered distinct if they differ in their shapes or orientations. That is, animals that match only by rotation are considered distinct. M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 90–99, 2011. c Springer-Verlag Berlin Heidelberg 2011
Parallel Enumeration of Lattice Animals
91
u
(a) Three-dimensional dominoes (b) Three-dimensional trominoes Fig. 1. Fixed three-dimensional dominoes and trominoes
In this paper we consider only fixed animals. Figures 1(a,b) show the three and fifteen polycubes of size 2 and 3, respectively, in three dimensions. Let L be a lattice, and denote by AL (n) the number of fixed animals on L of size n. One of the main open problems related to animals on a nontrivial lattice L is finding a formula for AL (n).1 Since no analytic formula for AL (n) is known for any nontrivial lattice, even not for Z2 , a great portion of the research has so far focused on efficient algorithms for counting animals on lattices. Most work has been done on computing AZ2 (n) (usually denoted in the literature as A2 (n) or simply A(n)) for as high as possible values of n. Redelmeier [Re81] introduced the first efficient algorithm for counting polyominoes, in the sense that it generated all polyominoes sequentially without repetitions. Thus, it wastes time neither on computing previously-generated polyominoes, nor on checking whether a newly-generated polyomino has ever been generated before; it only has to count the generated polyominoes. Since the algorithm generates each polyomino in constant time, its total running time is O(A2 (n)). (This depends on the assumption that any operation on integer numbers can be performed in constant time, an assumption which breaks when we deal with extremely large numbers, as is the case here. The reader is referred to a discussion of this issue in [AB09b].) Redelmeier implemented his algorithm in Algol W and (for efficiency) also in the PDP assembly language. His program required about 10 months of CPU time on a PDP-11/70 to compute the value of A2 (24). The best currently-known algorithm (in terms of running time) for counting two-dimensional fixed polyominoes is that of Jensen [Je01]. This is a so-called transfer-matrix algorithm, which does not even generate all the polyominoes. Instead, it generates representatives of classes of polyominoes with identical “boundaries,” while being able to compute efficiently the number of polyominoes in each such class. Jensen parallelized his algorithm and computed A2 (n) up to 1
Any one-dimensional lattice, for example, is trivial.
92
G. Aleksandrowicz and G. Barequet
n = 56 [Je03]. However, this notion of “boundaries” does not extend easily to higher dimensions and/or different types of lattices. The reader is referred to [AB09b] for an extensive review of the history of counting polyominoes and polycubes. In this work we describe our parallel implementation of the generalization of Redelmeier’s algorithm to any lattice, providing a broad sense to the notion of “neighborhood” of cells on the lattice. The original algorithm [Re81] counts two-dimensional polyominoes. Although it is not presented in this way, it is based on counting connected subgraphs in the underlying graph of the twodimensional orthogonal lattice, that contain one particular (so-called canonical ) node. As already observed (see discussions by Mertens [Me90] and in [AB09b]), Redelmeier’s algorithm does not depend on any particular property of the graph. In our first generalization of this algorithm to higher dimensions and to other lattices [AB09a], we first computed the respective lattice graphs, clipped to the size of the sought-after animals, and then applied the same subgraph-counting algorithm. The main drawback of this approach is that it keeps in memory at all times the entire set of “reachable” cells—that is, all cells that are part of some animal. For d-dimensional polycubes the number of such cells is roughly (2n)d , hence the algorithm becomes useless for relatively small values of d. In [AB09b] we significantly improved the algorithm by not keeping this set of reachable cells in memory at all. Instead, we maintained only the “current” animal and a set of its immediate neighboring cells, entirely omitting the lattice graph. The latter is computed locally “on demand” in the course of the algorithm. Consequently, for d-dimensional polycubes we needed to store in memory only O(nd) cells, which made the new version of the algorithm much more feasible. In the next sections we describe Redelmeier’s original algorithm and mention its generalization to any type of lattice and our new ingredient that eliminates the need to hold the entire underlying graph in memory. The focus of this paper is on the perfect parallelization of the algorithm. This enabled us to count animals on various lattices far beyond any previous attempt. With contemporary computing resources, the bottleneck of the newest version of the algorithm (in higher dimensions) is again its running time and not its consumed amount of memory. This bottleneck is remedied by our ability to run the algorithm simultaneously on practically unlimited number of computers over the Internet.
2
Redelmeier’s Algorithm
We first describe briefly Redelmeier’s algorithm for counting two-dimensional polyominoes. The reader is referred to Redelmeier’s paper [Re81] and to [AB09b] for the full details. The algorithm is essentially a procedure for connected-subgraph counting, where the underlying graph is induced by the orthogonal lattice. Since translated copies of a fixed polyomino are considered identical, one must decide upon a canonical form. Redelmeier’s choice was to fix the leftmost square of the bottom
Parallel Enumeration of Lattice Animals a1
e4
4 3
e3 d3 e5
2
e2 d 2 c2 d 4 e6
1
e1 d1 c1 b1 c3 d5 e7
b1 c1
a1 b2 c4 d6 e8
0
93
b2 c2
d1
d2
d3
c3 d4
c4 d5
d6
-1 -4 -3 -2 -1
0
1
2
3
4
(a) Reachable cells in pentominoes
e1
e2
e3 e4 e5
e6
e7
e8
(b) Corresponding graph
Fig. 2. Pentominoes as subgraphs of some underlying graph
row of a polyomino at the origin, that is, at the square with coordinates (0,0). (Note that coordinates are associated with squares and not with their corners.) Thus, he needed to count the number of edge-connected sets of squares (that contain the origin) in {(x, y) | (y > 0) or (y = 0 and x ≥ 0)}. The squares in this set are located above the thick line in Figure 2(a). The shaded area in this figure consists of all the reachable cells (possible locations of cells) of pentominoes (polyominoes of size 5). Counting pentominoes amounts to counting all the connected subgraphs of the graph shown in Figure 2(b), that contain the vertex a1 . The algorithm, taken verbatim from [Re81, p. 196], is the following: Initialize the parent to be the empty polyomino, and the untried set to contain only the origin. The following steps are repeated until the untried set is exhausted. 1. 2. 3. 4.
Remove an arbitrary element from the untried set. Place a cell at this point. Count this new polyomino. If the size is less than n: (a) Add new neighbors to the untried set. (b) Call this algorithm recursively with the new parent being the current polyomino, and the new untried set being a copy of the current one. (c) Remove the new neighbors from the untried set. 5. Remove newest cell.
Step 4(a) deserves some attention. By “new neighbors” we mean only neighbors of the new cell c (chosen in Step 2) that were not neighbors of any cells of the current polyomino prior to the addition of c. This ensures that we will not count the same polyomino more than once [AB09b, p. 4580, Theorem 1]. When this sequential algorithm is regarded as a subgraph-counting algorithm, one can easily notice it that can be applied to any graph, and that it has the property that it never produces the same subgraph twice. In [AB09a, AB09b] we describe how to generalize Redelmeier’s algorithm to any lattice. In particular,
94
G. Aleksandrowicz and G. Barequet
we describe there in detail the conversion of the orthogonal lattice in any fixed dimension, and also the triangular and hexagonal lattices in the plane, into graphs in which the algorithm can search subgraphs of a given size n, and the counts thereof will be the numbers of animals of size n on these lattices. In [AB09b] we also showed how one can avoid altogether the creation of the underlying graph. At first glance this may seem impossible since any search algorithm must store, for each node of the graph, at least an indication of whether or not the node was already visited in the course of the algorithm. However, it turns out that one can search a lattice graph without actually creating and holding it in memory. The trick is based on the fact that such a graph is repetitive, that is, it locally looks the same at every node. Therefore, the algorithm can avoid storing a “having been visited” indication for each node. Instead, one can implement an oracle, which based on the general structure of the lattice and the direction of entry to the new node (i.e., from which node the new node is entered), predicts correctly (in constant time), upon entering a new node, whether or not this node has already been visited. This, naturally, has some computational cost, but it allows the counting of animals of sizes never reached before on large graphs, such as those of the orthogonal lattices in high dimensions. In a sense, this improved algorithm bears some resemblance with the general reverse search technique of Avis and Fukuda [AF96], which allows to search combinatorial configurations with low time and space resources. In particular, our improved version of Redelmeier’s algorithm is similar to the application of the reverse search to the enumeration of connected subgraphs [ibid, §3.4]. The main difference is that we use heavily the self-repeating structure of the lattice. A minor additional difference is that we enumerate only subgraphs that contain one specific vertex.
3
Parallelism
Our algorithm can be parallelized efficiently, and so it can be run simultaneously on an unlimited number of different computers. This is done in a fashion similar to the one used by Mertens and Lautenbacher [ML92] in their parallelization of the two-dimensional version of Redelmeier’s algorithm (for counting polyominoes in the plane). The parallelism relies crucially on the fact that the execution of any subtree of the recursion does not change the contents of the data structures at the top of the subtree, and so the computation can be distributed between many processors in such a way that only one of them counts the number of animals in some subtree, while all the other processors skip it altogether and count animals in other subtrees. In practice, the main procedure recurses only until some level k < n. Regardless of the value of n, this induces AL (k) subtrees. (Recall that AL (k) denotes the number of animals of size k on the lattice L.) These subtrees can be assigned independently to the processors which we have at hand. The results for all levels m (where 1 ≤ m ≤ n, and, in particular, level n) are collected from all the processors, and their summation yields the values of A(m).
Parallel Enumeration of Lattice Animals
95
The parallelism is perfect in the sense that the split of the computation into parallel tasks can be done at any level 1 ≤ k ≤ n. Setting the level k is based on the desired complexity of a task. Note that for a fixed value of k, the complexities of different subtrees whose roots are at level k may differ significantly. Obviously, setting k = 1 results in a single task, in which case the algorithm runs sequentially. Also note that all tasks involve running the entire algorithm up to level k, and recursing only into the designated subtrees. In principle we could avoid this by transferring over the Internet the initial and target configurations (i.e., contents of the data structures that monitor the recursive algorithm), effectively allowing a “warm restart” of the algorithm at any task. In practice, our experiments showed that with our choices of k, the time wasted on running the entire algorithm up to level k in each task was absolutely negligible. In some cases, care should be taken to differentiate between animals that should be counted and those that should not be counted. For example, when we count only convex polycubes, or proper polycubes (polycubes that span all dimensions,2 or any other specialized type of animals, intermediate animal-like structures do not match the definition of the sought animals, but we cannot skip their creation during the course of the algorithm since subsequent animals may well be of the desired type. Our actual implementation of the parallel version of Redelmeier’s algorithm is based on the “server-client” model. The server was designed to count at the same time several types of animals, hence, it maintains a list of the currently running counters. Each counter is characterized by the type of lattice, the maximum animal size, the value k that controls the parallelization, etc. One of these counters is the active counter, corresponding to the lattice on which animals are counted at the present time. Each counter keeps a list of counting tasks, that is, subtrees or ranges of subtrees of the enumeration tree. A task is characterized by the counter type and by the range of k-level subtrees to be processed. Every counter also keeps an indication, for each of its tasks, whether or not the task was already executed, and if yes, what its counting results are. When a new client introduces itself to the server (by communicating over the Internet), the latter responds with a request to carry out one of the yetunhandled tasks of the currently active counter. The client then invokes a local copy of the polyomino-counting program, performing the entire computation up to level k, and recursing to the subtrees only in the requested range. At the end of the computation, the client forwards the counting results to the server, again, by communicating over the Internet. Upon receiving these data, the server updates its records. Namely, the task is marked as handled, and the counting results are stored and added the total results of the active counter. Then, a new task is assigned to the same client, and the process continues until all tasks are handled. At this time the active counter has finished its execution and another counter, if available, becomes the active counter. 2
For example, in the plane, “stick” (straight-line) polyominoes are not proper because they span only one dimension.
96
G. Aleksandrowicz and G. Barequet
To accommodate situations in which a task is “lost,” that is, the main server never receives the task’s results from the client to which the task was assigned, the server assigns tasks to clients in a cyclic manner. When all tasks are either completed or assigned to clients, the server returns to the beginning of the task list, and for each yet uncompleted task, if a nominal amount of time has passed since its allocation to a client, the task is assigned to the next available client. In principle, this can lead to the execution of the same task by more than one client, and to the reporting of this task’s results more than once. (This happens only towards the completion of executing a counter.) In this case the server checks for contradicting results, and if such results are encountered, a warning message is sent to the operator of the server. (So far we have never experienced such a situation, indicating, so we believe, that the client code is free of bugs.) The main server was implemented using the Ruby on Rails framework, and it is accessible via the http protocol. The client and counting program were written in C++. All the programs can run under either MS Windows or a Linux environment. An extremely-easy-to-install client package (only a few mouse clicks are needed) is found in http://www.cs.technion.ac.il/~gadial/counter.rar .
4
Results
We implemented several engines for counting different types of animals. Each engine considers some type of a lattice, as well as some constraints imposed on the counted animals, in order to create the underlying graph in which subgraphs are sought. We counted, inter alia, the following types of animals.
Table 1. Numbers of fixed d-dimensional polycubes A4 (n) A5 (n) A6 (n) A7 (n) A8 (n) n A151830 A151831 A151832 A151833 A151834 1 1 1 1 1 1 2 4 5 6 7 8 3 28 45 66 91 120 4 234 495 901 1484 2276 5 2162 6095 13881 27468 49204 6 21272 80617 231008 551313 1156688 7 218740 1121075 4057660 11710328 28831384 8 2323730 16177405 74174927 259379101 750455268 9 25314097 240196280 1398295989 5933702467 10 281345096 3648115531 27012396022 139272913892 11 3178474308 56440473990 12 36400646766 886696345225 13 421693622520 14111836458890 14 4933625049464 15 58216226287844
Parallel Enumeration of Lattice Animals
Table 2. Numbers of fixed tree d-dimensional polycubes (T) A2 (n) n A066158 1 1 7 570 13 942651 19 1946892842 25 4444545298879 2 2 8 1908 14 3329608 20 7027047848 26 16229462702152 3 6 9 6473 15 11817582 21 25424079339 27 59347661054364 4 18 10 22202 16 42120340 22 92185846608 5 55 11 76886 17 150682450 23 334925007128 6 174 12 268352 18 540832274 24 1219054432490 (T) (T) (T) (T) (T) (T) n A3 (n) A4 (n) A5 (n) A6 (n) A7 (n) A8 (n) 1 1 1 1 1 1 1 2 3 4 5 6 7 8 3 15 28 45 66 91 120 4 83 228 485 886 1463 2248 5 486 2018 5775 13281 26460 47636 6 2967 18892 73437 213978 516691 1088017 7 18748 184400 979335 3630090 10654378 26424957 8 121725 1857856 13536225 64012932 9 807381 19189675 192393410 10 5447203 202214452 2796392165 11 37264974 12 257896500 13 1802312605 (a) All trees (PT) (PT) (PT) (PT) n A2 (n) A3 (n) A4 (n) A5 (n) 1 0 0 0 0 2 0 0 0 0 3 4 0 0 0 4 16 32 0 0 5 53 324 400 0 6 172 2448 8064 6912 7 568 17041 112824 239120 8 1906 116004 1382400 5445120 9 6471 787965 15998985 104454120 10 22200 5380600 180558848 1839569920 11 76884 37034319 .. .(*) (b) Proper trees (PT) (T) (*) Note that A2 (n) = A2 (n) − 2 since only the two “sticks” are 2D tree polyominoes that are not proper.
97
98
G. Aleksandrowicz and G. Barequet Table 3. Numbers of more types of animals
(LC) n A3 (n) 1 1 2 3 3 15 4 86 5 522 6 3241 7 20256 8 126520 (a) Line Convex, 3D
(Lp(2,1)) A2 (n) n A030444 1 1 2 4 3 28 4 234 5 2162 6 20972 7 209608 8 2135572 9 22049959 10 229939414 11 2416816416 12 25569786440 (b) (1,2)-Leapers
1. Two-dimensional polyominoes, lying on the two-dimensional orthogonal lattice. This was the first implementation of a counter, which mainly served for checking the entire package. 2. d-dimensional polycubes, for any fixed value of d. These animals lie on the d-dimensional orthogonal lattice. 3. Polyamonds, that is, two-dimensional animals on the planar triangular lattice. 4. Polyhexes, that is, two-dimensional animals on the planar hexagonal lattice. 5. Proper d-dimensional polycubes, that is, polycubes that span all the d dimensions, or, equivalently, cannot be embedded in less than d dimensions. (The number of all polycubes in d dimensions is related to the numbers of proper polycubes in i dimensions, for all 0 ≤ i ≤ d, by Lunnon’s formula [Lu75, p. 366].) 6. Tree polycubes, that is, polycubes whose dual (cell adjacency) graphs are trees. This engine was implemented for any fixed dimension d ≥ 2. In two dimensions, our count confirms all the 27 already-known values. 7. Proper tree polycubes (in any fixed dimension d ≥ 2). 8. (a, b)-leapers, lying on the two-dimensional orthogonal lattice, in which the neighbors of cell (x, y) are defined to be cells (x ± a, y ± b) and (x ± b, y ± a). Under this definition, regular polyominoes are (1,0)-leapers. The term polyknights is usually used for (2, 1)-leapers for obvious reasons. 9. Line-convex three-dimensional polycubes, that is, polycubes whose intersection with an axis-parallel line is continuous.3 3
Note that a “torus” forming a 45◦ angle with the three major axes is line-convex. Probably a more appropriate definition of polycube convexity would be recursive: A d-dimensional polycube p is convex if every intersection of p and a (d−1)-dimensional axis-parallel flat is a convex (d − 1)-dimensional polycube. We are currently working on implementing an engine that counts polycubes convex under this definition.
Parallel Enumeration of Lattice Animals
99
Finally, we provide the most advanced counts of animals that we have at hand at the time of publishing this work. Table 1 shows counts of all polycubes in 4 ≤ d ≤ 8 dimensions. Table 2 shows counts of all (resp., proper) fixed tree polycubes in 2 ≤ d ≤ 8 (resp., 2 ≤ d ≤ 5) dimensions. Table 3 shows additional counts of line-convex polycubes in three dimensions and (1,2)-leapers in the plane. IDs of series which appear in the Encyclopedia of Integer Sequences [EIS] are marked in the tables. All new values, that have never been tabulated before and appear here in the first time, are shown in boldface.
References [AB09a] Aleksandrowicz, G., Barequet, G.: Counting d-dimensional polycubes and nonrectangular planar polyominoes. Int. J. of Computational Geometry and Applications 19, 215–229 (2009) [AB09b] Aleksandrowicz, G., Barequet, G.: Counting polycubes without the dimensionality curse. Discrete Mathematics 309, 4576–4583 (2009) [AF96] Avis, D., Fukuda, K.: Reverse search for enumeration. Discrete Applied Mathematics 65, 21–46 (1996) [BH57] Broadbent, S.R., Hammersley, J.M.: Percolation processes: I. Crystals and mazes. Proc. Cambridge Philosophical Society 53, 629–641 (1957) [EIS] http://www.research.att.com/~ njas/sequences (the on-line encyclopedia of integer sequences) [Je01] Jensen, I.: Enumerations of lattice animals and trees. J. of Statistical Physics 102, 865–881 (2001) [Je03] Jensen, I.: Counting polyominoes: A parallel implementation for cluster computing. In: Sloot, P.M.A., Abramson, D., Bogdanov, A.V., Gorbachev, Y.E., Dongarra, J., Zomaya, A.Y. (eds.) ICCS 2003. LNCS, vol. 2659, pp. 203–212. Springer, Heidelberg (2003) [Lu75] Lunnon, W.F.: Counting multidimensional polyominoes. The Computer Journal 18, 366–367 (1975) [Me90] Mertens, S.: Lattice animals: A fast enumeration algorithm and new perimeter polynomials. J. of Statistical Physics 58, 1095–1108 (1990) [ML92] Mertens, S., Lautenbacher, M.E.: Counting lattice animals: A parallel attack. J. of Statistical Physics 66, 669–678 (1992) [Re81] Redelmeier, D.H.: Counting polyominoes: Yet another attack. Discrete Mathematics 36, 191–203 (1981) [PG95] Peard, P.J., Gaunt, D.S.: 1/d-expansions for the free energy of lattice animal models of a self-interacting branched polymer. J. Phys. A: Math. Gen. 28, 6109–6124 (1995)
Parameterized Edge Dominating Set in Cubic Graphs (Extended Abstract) Mingyu Xiao1 and Hiroshi Nagamochi2 1
2
School of Computer Science and Engineering, University of Electronic Science and Technology of China, China
[email protected] Department of Applied Mathematics and Physics, Graduate School of Informatics, Kyoto University, Japan
[email protected]
Abstract. In this paper, we present an improved algorithm to decide whether a graph of maximum degree 3 has an edge dominating set of size at most k or not, which is based on enumeration of vertex covers. We first enumerate vertex covers of size at most 2k and then construct an edge dominating set based on each vertex cover to find a satisfied edge dominating set. To enumerate vertex covers, we use a branch-and-reduce method that will generate a search tree of size O(2.1479k ). Then we get the running time bound of the algorithm.
1
Introduction
Given a graph G = (V, E), an edge dominating set of the graph is a subset M ⊆ E of edges such that each edge in E − M is adjacent to at least one edge in M . The minimum edge dominating set problem (EDS) is to find an edge dominating set of minimum size. EDS is a basic graph problem and one of the early-known NP-hard problems [4]. It is related to many other important problems, such as matching problems in graphs. A matching in a graph is an independent subset of edges of the graph, i.e., a subset of edges such that no pair of them share a common endpoint. Clearly, a matching is an edge dominating set. The maximum matching problem, to find a matching of maximum size in a graph, is a well-known problem that can be solved in polynomial time. However, the minimum maximal matching problem (MMM), to find a matching of minimum size such that no edge can be added into the matching to get another matching, is NP-hard. In fact, MMM is equivalent to EDS, since a minimum maximal matching is also a minimum edge dominating set and a minimum maximal matching can be constructed from any minimum edge dominating set in linear time. Therefore, many papers discuss these two problems together. EDS is also related to the famous vertex cover
The work is supported in part by National Natural Science Foundation of China Grant No. 60903007.
M. Atallah, X.-Y. Li, and B. Zhu (Eds.): FAW-AAIM 2011, LNCS 6681, pp. 100–112, 2011. c Springer-Verlag Berlin Heidelberg 2011
Parameterized Edge Dominating Set in Cubic Graphs
101
problem. A vertex cover in a graph is a subset of vertices removal of which leaves no edges. The set of endpoints of all edges in an edge dominating set is a vertex cover, which lights a way to solve EDS based on enumeration of minimal vertex covers. To find an edge dominating set of size k, we may enumerate vertex covers of size at most 2k and construct edge dominating sets from the vertex covers. In fact, many previous exact and parameterized algorithms for EDS are based on enumeration of vertex covers. In this paper, we further study EDS algorithms based on this framework and get an improved parameterized algorithm for the edge dominating set problem in graphs of maximum degree 3. In parameterized algorithms, an edge dominating set instance I together with a parameter k is given, we are going to design an algorithm with running time f (k)poly(|I|) to decide whether the graph has an edge dominating set of size ≤ k, where f (k) is a function of parameter k and poly(|I|) is a polynomial of input size |I|. We use k-EDS to denote this problem. EDS is a basic problem introduced in Garey and Johnson’s work on NPcompleteness [4]. Yannakakis and Gavril [15] further showed that EDS is NPhard even in planar or bipartite graphs of maximum degree 3. Randerath and Schiermeyer [8] designed an O∗ (1.4423m)-time1 algorithm for EDS, where m is the number of edges in the graph, which was improved to O∗ (1.4423n ) by Raman et al. [7], where n is the number of vertices in the graph. Fomin et al. [3] improved the result to O∗ (1.4082n) by considering the treewidth of the graph. Rooij and Bodlaender [9] designed an O∗ (1.3226n)-time algorithm by using the ‘measure and conquer’ method. For k-EDS, Fernau [2] gave an O∗ (2.6181k)-time algorithm. Fomin et al. [3] improved the result to O∗ (2.4181k ). Wang et al. [10] also studied the problem of enumerating weighted edge dominating sets of small size. For EDS in graphs of maximum degree 3, the best exact and parameterized algorithms are the O∗ (1.2721n)-time and O∗ (2.2306k )-time algorithms due to Xiao [12]. Xiao designed the parameterized algorithm by using a result of kernelization in graphs of maximum degree 3. In this paper, we improve the result of O∗ (2.2306k) to O∗ (2.1479k ) by designing an algorithm based on enumeration of vertex covers. Note that recently there are many interesting results on basic graph NP-hard problems in sparse and low-degree graphs, such as the O∗ (1.0854n)-time algorithm for the independent set problem in graphs of maximum degree 3 [1], the O∗ (1.1616k )-time time algorithm for the k-vertex cover problem in graphs of maximum degree 3 [11], the O∗ (1.251n )-time algorithm for TSP in cubic graphs [5] and so on. This is the reason why we have special interests in the problem in degree-3 graphs.
2
Enumeration-Based Algorithms
For a set M of edges, we use V (M ) to denote the set of vertices appearing in at least one edge in M . Many previous algorithms for the edge dominating set problem are based on enumeration of minimal vertex covers, such as the 1
In this paper, notation O∗ suppresses all polynomially bounded factors. For two functions f and g, we write f (n) = O∗ (g(n)) if f (n) = g(n)nO(1) .
102
M. Xiao and H. Nagamochi
algorithms in [2,9,10,3]. In this framework, we first find out a set C ∗ of vertices that is the vertex set V (M ) of a minimum edge dominating set M . Then we find a maximum matching in the induced graph G[C ∗ ] and add an edge for every unmatched vertex in C ∗ to get a minimum edge dominating set. In fact, sometimes set C ∗ may just be a subset of V (M ), but the edge dominating set can be found in polynomial time if C ∗ is given. The vertex set C ∗ may not be easy to compute. We will enumerate minimal vertex covers to find C ∗ . This step may cause exponential time. Since all minimal vertex covers can be enumerated in O(1.4423n ) time [6], we can solve EDS in O∗ (1.4423n) time. For k-EDS, we may use a branch-and-reduce method to find vertex covers of size up to 2k by fixing part of a vertex cover. Assume that the size of a vertex cover to be constructed in addition to a fixed partial vertex cover is at most p (initially p = 2k). For any vertex v, we can branch on it into two branches by either including it into the vertex cover or excluding it from the vertex cover. For the second branch, we should include all neighbors N (v) of v into the vertex cover. Then we can get the following recurrence on p: C(p) ≤ C(p − 1) + C(p − |N (v)|),
(1)
where C(p) denotes the worst running time to enumerate minimal vertex covers up to size p in any graphs.2 If we always select a vertex of maximum degree to branch on, then we can branch on vertices of degree at least 2. By solving C(p) ≤ C(p − 1) + C(p − 2),
(2)
Fernau [2] showed that the edge dominating set problem can be solved in O∗ (1.6181p) = O∗ (2.6181k) time. The method of iteratively branching on maximum degree vertices is simple and powerful. It is interesting to know whether we can get further improvement on this method. For example, if we can guarantee the vertices to be branched on are of degree at least 3, then we can always get recurrence C(p) ≤ C(p − 1) + C(p − 3),
(3)
which solves to O∗ (1.4656p) = O∗ (2.1479k ). Some drafts claimed this improvement. However, the proofs are incomplete. In this paper, we show that this improvement for k-EDS can be achieved in graphs of maximum degree 3. The details omitted due to space limitation can be found in the full version of this paper [14]. In this paper, we will use the branch-and-reduce method to find the vertex cover C ∗ of size at most p. For a subset C ⊆ V and an independent set I ⊆ V − C in G, an edge dominating set M is called a (C, I)-eds if C ⊆ V (M ) and 2
In many algorithms, we may not enumerate all minimal vertex covers of size at most p. But we will guarantee to find at least one satisfied vertex cover, based on which we can find an edge dominating set of size at most k in polynomial time, if it exists. Then C(p) should be the worst running time to solve the corresponding problem.
Parameterized Edge Dominating Set in Cubic Graphs
103
I ∩ V (M ) = ∅ hold. To search the vertex cover V (M ) of a minimum (C, I)-eds M , we will keep track of a partition of the vertices of G in four sets: C, I, U1 and U2 (initially C = I = U1 = ∅ and U2 = V ) such that I is an independent set in G, and each connected component of G[U1 ] is a clique of G[V \(C ∪ I)] (In our algorithm, G[U1 ] may also contain pseudo-cliques, which are defined in Section 4 and can just be regarded as cliques). The vertices in U1 ∪ U2 are called undecided vertices. Note that G[U1 ] may not be the set of all cliques in G[V \(C ∪ I)] or U2 may contain a vertex adjacent to I so that some cliques are allowed to exist in G[U2 ] in order to get an amortized time complexity. We use a five-tuple (G, C, I, U1 , U2 ) to denote the state described above. Rooij and Bodlaender proved the following lemma in [9]: Lemma 1. Given a five-tuple (G, C, I, U1 , U2 ), let qi = |Qi | denote the size of clique Qi of G[U1 ], if U2 = ∅, a minimum (C, I)-eds M of G can be found in polynomial time. Lemma 1 implies that we can avoid branching on clique components in the graph to reduce the size of our search tree. Initially, let U2 = V (G) and C = I = U1 = ∅. While U2 = ∅, pick up a vertex v of maximum degree in G[U2 ] and branch on it by including it into the vertex cover or excluding it from the vertex cover. In the first branch, we include v into C and reduce p by 1. In the second branch, we include v into I, include N (v) to C and reduce p by |N (v)|. In each branch, if we move any newly created clique component Q in G[U2 ] into U1 , then we can reduce p by |V (Q)| − 1 at least. In this case, we have a recurrence C(p) ≤ C(p − 1 − qv ) + C(p − |N (v)| − qN (v) ),
(4)
where qv (resp., qN (v) ) denotes the sum of |V (Q)| − 1 over all cliques Q in G[U2 ] generated by removing v (resp., N (v)) from U2 . A path v0 v1 · · · vl with l + 1 vertices is called an l-path and a cycle with l vertices is called an l-cycle. If there is a degree-2 vertex v1 having one degree-1 neighbor v0 and the other neighbor v2 of degree > 1, we say path v0 v1 v2 is a tail. If there is a degree-3 vertex adjacent to two degree-1 vertices, we call this vertex a good vertex.
3
Branching on Graphs of Maximum Degree 2
When the remaining graph in G[U2 ] has a vertex of degree ≥ 3, we can branch on this vertex with recurrence (3) or a better one. In this section, we show that there are three types of graphs of maximum degree 2 for which our branching requires a recurrence worse than (3). This suggests that we need to avoid creating such a “bad component” in G[U2 ] even when we branch on a vertex of degree ≥ 3. Before we identify “bad components”, we first introduce two branching rules that will be used in our algorithm. Branching on tails. Recall that a tail v0 v1 v2 is a path such that v0 is a degree-1 vertex, v1 is a degree-2 vertex and v2 is a vertex of degree > 1. Branching on a tail
104
M. Xiao and H. Nagamochi
v0 v1 v2 means branching on v2 . We have qv2 = 1 since v0 v1 is a clique component in G[U2 ] after removing v2 . Since v2 is a vertex of degree > 1, |N (v2 )| ≥ 2. By (4), we can get recurrence C(p) ≤ 2C(p − 2)
(5)
or a better recurrence by branching on a tail. Branching on 4-cycles. Let C4 = v0 v1 v2 v3 be a 4-cycle in G[U2 ], where each vertex vi can be of degree > 2 in G[U2 ]. It is shown that for any 4-cycle v0 v1 v2 v3 , any vertex cover in the graph contains either {v0 , v2 } or {v1 , v3 } [13]. Branching on a 4-cycle v0 v1 v2 v3 means branching by including v0 and v2 into C or including v1 and v3 into C. By branching on a 4-cycle, we can also get recurrence (5) or a better one. When the graph has maximum degree 2, our algorithm will do in this way: if there is a tail or a 4-cycle, branch on the tail or 4-cycle, else pick a degree-2 vertex and branch on it by including it into C or I. It turns out that only for a component of a 2-path or 6-cycle or 7-cycle, we will get a recurrence worse than (3) (see the full version [14] for more details). Then we say a component of a 2-path or 6-cycle or 7-cycle a bad component. If we guarantee that after each operation no bad component is created in G[U2 ], then we can get the claimed improvement. In fact, we will show that for many cases a clique component is also created in G[U2 ] whenever a bad component is created in G[U2 ]. We call such a clique component the saving clique of the bad component, and keep the saving clique until we branch on the bad component, where p is further reduced by 1 by moving the saving clique into U1 . This is the main idea of our algorithm. There are finite local structures by branching on which we may get bad components in a graph of degree bounded by 3. We will use different branching rules to deal with those local structures and then get the improvement. Before presenting our algorithm, we introduce some techniques first.
4
Some Techniques
We introduce a new concept: “pseudo-clique”. In our algorithm, we move a clique component from U2 to U1 without branching. A pseudo-clique is a connected graph similar to a clique. We can also move a pseudo-clique to U1 directly. Let Q be a connected graph in G[U2 ]. If there is a minimum (C, I)-eds M such that |V (Q) − V (M )| ≤ 1, we call Q a pseudo-clique. Roughly speaking, a pseudoclique has at most one vertex not contained in the vertex cover V (M ) if a solution M exists. Any clique is a pseudo-clique. We give another example of pseudo-clique: a 2-path component v0 v1 v2 in G[U2 ] is a pseudo-clique if v1 is a degree-2 vertex in the original graph G. For a pseudo-clique, we can add an edge between any two nonadjacent vertices and the size of the minimum (C, I)-eds M will not increase. Therefore, we can simply move pseudo-cliques to U1 . Sometimes it is easy to check if a 2-path component is a pseudo-clique or not for EDS in degree-3 graphs. This is the reason why we can get the improvement
Parameterized Edge Dominating Set in Cubic Graphs
105
for the problem in degree-3 graphs. We say a degree-2 vertex v in G[U2 ] a crucial vertex, if there is a minimum (C, I)-eds M such that v ∈ V (M ) or vu ∈ M where u is a vertex in U2 . For a 2-path component v0 v1 v2 in G[U2 ], if v1 is a crucial vertex, then v0 v1 v2 is also a pseudo-clique. We may also use the technique of amortized transfer of cliques. In some operation which generates cliques, we usually move all the generated cliques into U1 immediately. However, the recurrence in the operation may still be good enough for our analysis if we do not include some clique uv into U1 in this step (we may reduce p less than 1 in some later branch). We keep the clique uv as the saving clique of any bad components created in this operation without including it into U1 . In the next step, we branch on the bad components after moving the saving clique uv into U1 . In our algorithm, when we save a clique there are at most two bad components can be created. By branching on the two bad components, we can get recurrence C(p) ≤ C(p − 2) + 2C(p − 3) + C(p − 4) or a better one. Since we can also reduce p by 1 by moving the saving clique uv into U1 . Then we can get recurrence C(p) ≤ C(p − 3) + 2C(p − 4) + C(p − 5) at least, which is better than (3).
5
The Algorithm
We say a cycle a leaf cycle if there is exactly one degree-3 vertex in the cycle. In our algorithm, we will first deal with leaf 6-cycles and leaf 7-cycles in G[U2 ]. When the graph G[U2 ] has no such kind of 6-cycles or 7-cycles, we may use some techniques to avoid creating 6-cycle or 7-cycle components in our algorithm. Then we only need to deal with 2-path components. We call a vertex v an (x, y) vertex, if no component of a 6-cycle or 7-cycle is created and x 2-path components are created after deleting v, and no component of a 6-cycle or 7cycle is created and y 2-path components are created after deleting N (v). We assume that initially there is no bad component in G[U2 ], since an arbitrary edge from each bad component in a given graph G with C = I = ∅ can be directly included into a minimum (C, I)-eds M without branching, leaving no bad component in G[U2 ]. In our algorithm, we will effectively avoid creating bad components by saving cliques of size 2 for any newly created bad components in each step. The main steps of our algorithm are listed in Fig. 1. In the subsequent sections, we show that in each step, there is a branching rule such that its recurrence is not worse than (3) and no bad component is newly created. By definition, branching on a (0,0) vertex of degree 3 in Step 5 does not create a bad component and its recurrence is (3). Hence we shall investigate Steps 3, 4, 6, 7, 8 and 9. 5.1
Dealing with Leaf 6-Cycles
Assume that the algorithm will branch on a leaf 6-cycle v0 v1 v2 v3 v4 v5 in G[U2 ] in Step 3. We assume that v0 is the degree-3 vertex in it and u is the third neighbor of v0 . Note that either no bad component is created after removing v0 or no bad
106
M. Xiao and H. Nagamochi
Algorithm P EDS3(G, C, I, U1 , U2 , p) Input: A degree-3 graph G = (V, E), sets C, I, U1 and U2 partitioning V (initially C = I = U1 = ∅, U2 = V ), and an integer p (initially p = 2k). Output: A (C, I)-eds of size ≤ k in G if it exists. 1. While there is a clique component Q in G[U2 ], do move it into U1 and reduce p by |Q| − 1. 2. If p < 0, halt. 3. If there is a leaf 6-cycle in G[U2 ], use the branching rules in Section 5.1 to branch on it. 4. Elseif there is a leaf 7-cycle in G[U2 ], we use the branching rules in Section 5.2 to branch on it. 5. Elseif there is a (0, 0) degree-3 vertex v in G[U2 ], branch on it. 6. Elseif there is a (3, 0) degree-3 vertex v in G[U2 ], use the branching rules in Section 5.3 to branch on it. 7. Elseif there is a good vertex or a tail in G[U2 ], use the branching rules in Section 5.4 to branch on it. 8. Elseif there is 4-cycle v0 v1 v2 v3 in G[U2 ], branch on the 4-cycle. 9. Elseif the graph G[U2 ] is not an empty graph, we pick a vertex v of maximum degree in G[U2 ], and use the branching rules in Section 5.6 to branch on it. 10. Compute a minimum (C, I)-eds M by Lemma 1 (here: U2 = ∅, C ∪I ∪U1 = V ) and return M . Fig. 1. Algorithm P EDS3(G, C, I, U1 , U2 , p)
component is created after removing v0 and u.We distinguish the following two cases to design our branching rules. Case 1: no bad component created after removing v0 from G[U2 ]. We branch in the following way. First, we branch on v3 by including it into C or including it into I (also including v2 and v4 into C). Then in the first branch we further branch on v0 by including it into C or including it into I. We will get three subbranches. In the first subbranch, we include v3 , v0 into C, include v1 , v2 , v4 , v5 into U1 , and reduce p by 4, creating no bad component by the assumption. In the second subbranch, we include v3 , u into C, include v0 into I, include only v4 into U1 (leaving v1 , v2 in U2 ), and reduce p by 3, keeping v1 v2 as the saving clique for any bad components newly created by removing v0 and u. In the third subbranch, we include v2 , v4 into C, include v3 into I and reduce p by 2, creating no bad component. Then we get the following recurrence C(p) ≤ C(p − 2) + C(p − 3) + C(p − 4),
(6)
which solves to O(1.4656p). In the second subbranch, we keep a saving clique v1 v2 for the new bad components. Then in the next step we will directly move v1 v2 into U1 and branch on the bad component created. Since at most two bad components can be created in the second subbranch after removing v0 and u.
Parameterized Edge Dominating Set in Cubic Graphs
107
By branching on these bad components we can get recurrence C(p) ≤ C(p − 2) + 2C(p − 3) + C(p − 4) at least (if a 6-cycle or 7-cycle is created, we will get a better recurrence). Consider that we can also reduce p by 1 from the saving clique v1 v2 . Then we can branch with C(p) ≤ C(p − 3) + 2C(p − 4) + C(p − 5) at least to deal with all bad components created in this subbranch. This recurrence solves to C(p) = O(1.4253p) and is better than (3). Therefore, when there is a saving clique, we can always branch with a recurrence better than (3) without leaving any bad component in G[U2 ]. Case 2: no bad component created after removing v0 and u in G[U2 ]. First, we branch on v3 by including it into C or including it into I (also including v2 , v4 into C). Then in the first branch we further branch on v0 by including it into C or including it into I. We will get three subbranches. In the first subbranch, we include v0 , v3 into C, include only v4 , v5 into U1 , and reduce p by 3, keeping v1 v2 as the saving clique for any bad components newly created by removing v0 . In the second subbranch, we include v3 , v1 , v5 , u into C, include v0 into I, include v2 , v4 into U1 and reduce p by 4, where no bad component is created by the assumption. In the third subbranch, we include v2 , v4 into C, include v3 into I and reduce p by 2, creating no bad component. Analogously with Case 1, we can branch on the new bad components with its saving clique, and we also get (6) without leaving any bad component in G[U2 ]. Lemma 2. If there is a leaf 6-cycle in G[U2 ], Algorithm P EDS3 can always branch with (6) or a better recurrence in Step 3 without creating any bad component in each branch. 5.2
Dealing with Leaf 7-Cycles
In Step 4, there is no leaf 6-cycle in G[U2 ]. Assume that the algorithm will branch on a leaf 7-cycle v0 v1 v2 v3 v4 v5 v6 in this step. We also let v0 be the degree-3 vertex and u the third neighbor of v0 , and distinguish the following two cases. Case 1: no bad component created after removing v0 in G[U2 ]. Case 2: a bad component created after removing v0 in G[U2 ]. For each case, we can also branch with (6) at least without creating any bad components (see the full version [14] for more details). Then we get Lemma 3. If there is a leaf 7-cycle in G[U2 ], Algorithm P EDS3 can always branch with (6) or a better recurrence in Step 4 without creating any bad component in each branch. 5.3
Dealing with (3, 0) Vertices
Let v be the (3, 0) vertex in