Lecture Notes in Computer Science 5038 CommencedPublicationin1973 FoundingandFormerSeriesEditors: GerhardGoos,JurisHartmanis,andJanvanLeeuwen EditorialBoard DavidHutchison LancasterUniversity,UK TakeoKanade CarnegieMellonUniversity,Pittsburgh,PA,USA JosefKittler UniversityofSurrey,Guildford,UK JonM.Kleinberg CornellUniversity,Ithaca,NY,USA AlfredKobsa UniversityofCalifornia,Irvine,CA,USA FriedemannMattern ETHZurich,Switzerland JohnC.Mitchell StanfordUniversity,CA,USA MoniNaor WeizmannInstituteofScience,Rehovot,Israel OscarNierstrasz UniversityofBern,Switzerland C.PanduRangan IndianInstituteofTechnology,Madras,India BernhardSteffen UniversityofDortmund,Germany MadhuSudan MassachusettsInstituteofTechnology,MA,USA DemetriTerzopoulos UniversityofCalifornia,LosAngeles,CA,USA DougTygar UniversityofCalifornia,Berkeley,CA,USA GerhardWeikum Max-PlanckInstituteofComputerScience,Saarbruecken,Germany Catherine C. McGeoch (Ed.) Experimental Algorithms 7th International Workshop, WEA 2008 Provincetown, MA, USA, May 30–June 1, 2008 Proceedings 1 3 VolumeEditor CatherineC.McGeoch DepartmentofMathematics andComputerScience AmherstCollege Amherst,MA,USA E-mail:[email protected] LibraryofCongressControlNumber:2008927191 CRSubjectClassification(1998):F.2.1-2,E.1,G.1-2,I.3.5,I.2.8 LNCSSublibrary:SL1–TheoreticalComputerScienceandGeneralIssues ISSN 0302-9743 ISBN-10 3-540-68548-0SpringerBerlinHeidelbergNewYork ISBN-13 978-3-540-68548-7SpringerBerlinHeidelbergNewYork Thisworkissubjecttocopyright.Allrightsarereserved,whetherthewholeorpartofthematerialis concerned,specificallytherightsoftranslation,reprinting,re-useofillustrations,recitation,broadcasting, reproductiononmicrofilmsorinanyotherway,andstorageindatabanks.Duplicationofthispublication orpartsthereofispermittedonlyundertheprovisionsoftheGermanCopyrightLawofSeptember9,1965, initscurrentversion,andpermissionforusemustalwaysbeobtainedfromSpringer.Violationsareliable toprosecutionundertheGermanCopyrightLaw. SpringerisapartofSpringerScience+BusinessMedia springer.com ©Springer-VerlagBerlinHeidelberg2008 PrintedinGermany Typesetting:Camera-readybyauthor,dataconversionbyScientificPublishingServices,Chennai,India Printedonacid-freepaper SPIN:12275052 06/3180 543210 Preface The Workshop on Experimental Algorithms, WEA, is intended to be an inter- national forum for research on the experimental evaluation and engineering of algorithms, as well as in various aspects of computational optimization and its applications. The emphasis of the workshop is the use of experimental meth- ods to guide the design,analysis,implementation,andevaluationofalgorithms, heuristics, and optimization programs. WEA 2008 was held at the Provincetown Inn, Provincetown, MA, USA, on May30–June 1,2008.Thiswasthe seventhworkshopofthe series,afterRome (2007),Menorca(2006),Santorini(2005),RiodeJaniero(2004),Asconia(2003), and Riga (2001). This volume containsallcontributed papersacceptedfor presentationatthe workshop.The 26 contributed papers were selected by the ProgramCommittee onthebasisofatleastthreerefereereports,somecontributedbytrustedexternal referees. In addition to the 26 contributed papers, the programcontainedtwo invited talks. Camil Demetrescu, of the University of Rome “La Sapienza,” spoke on “Visualization in Algorithm Engineering.” David S. Johnson of AT & T Labs – Research, gave a talk on “Bin Packing: From Theory to Experiment and Back Again.” Wewouldliketothanktheauthorswhorespondedtothecallforpapers,our invitedspeakers,the membersoftheProgramCommittee,theexternalreferees, and the Organizing Committee members for making this workshop possible. March 2008 Catherine C. McGeoch Organization Program Committee Catherine C. McGeoch (Chair) Amherst College (USA) Lars Arge University of Aarhus (Denmark) Jon Bentley Avaya Laboratories (USA) Gerth Stolting Brodal University of Aarhus, BRICS (Denmark) Adam Buchsbaum AT & T Labs (USA) Camil Demetrescu University of Rome “La Sapienza” (Italy) Thomas Erlebach University of Leicester (UK) Irene Finocchi University of Rome “La Sapienza” (Italy) Andrew Goldberg Microsoft (USA) Mark Goldberg Rensselaer Polytechnic Institute (USA) Michael Goodrich University of California, Irvine (USA) Richard Ladner University of Washington (USA) Ian Munro University of Waterloo (Canada) Stefan Naeher University of Trier (Germany) Sotiris Nikoletseas University of Patras and CTI (Greece) Luis Paquete University of Algarve (Portugal) Mike Preuss University of Dortmund (Germany) Mauricio G.C. Resende AT & T Labs (USA) Celso Ribeiro Universidade Federal Fluminense (Brazil) Steve Skiena Stony Brook University (USA) Matt Stallmann North Carolina State University (USA) Cliff Stein Columbia University (USA) Thomas Steutzle IRIDIA, Universit´e Libre de Bruxelles (Belgium) Roberto Tamassia Brown University (USA) Stefan Voss University of Hamburg (Germany) Dorothea Wagner Universit¨at Karlsruhe (Germany) Referees Mohammad Abam Daniel Delling Allan Jorgensen Reinhard Bauer Paola Festa Alexis Kaporis Vincenzo Bonifaci Bob Fraser Marcus Krug Saverio Caminiti Marco Gaertler Veli Makinen Ioannis Caragiannis Mark Goldberg Caserta Marco Marco Chiarandini Robert Go¨rke Sascha Meinert Albert Choi Michael Hirsch Thomas Moelhave Razaul Alam Chowdhury David Johnson Alberto Moraglio VIII Organization Gabriel Moruz Franz Rendl Renato Werneck Pat Nicholson Peter Sanders Ke Yi Richard Peng Srinivasa Rao Satti Martin Zachariasen Giuseppe Persiano Frank Schwartz Christos Zaroliagis Rajeev Raman Silvia Schwarze Christoforos Raptopoulos Matthew Skala WEA Steering Committee Edoardo Amaldi Politecnico di Milano (Italy) David A. Bader Georgia Institute of Technology (USA) Josep Diaz T.U. of Catalonia (Spain) Guiseppe F. Italiano University of Rome “Tor Vergata” (Italy) David Johnson AT & T Labs (USA) Klaus Jansen Universita¨t Kiel (Germany) Kurt Mehlhorn Max-Plank-Institut fu¨r Informatik (Germany) Ian Munro University of Waterloo (Canada) Sotiris Nikoletseas University of Patras and CTI (Greece) Jose Rolim (Chair) University of Geneva (Switzerland) Pablos Spirakis University of Patras and CTI (Greece) Table of Contents Reducing Splaying by Taking Advantage of Working Sets ............. 1 Timo Aho, Tapio Elomaa, and Jussi Kujala Engineering Burstsort: Towards Fast In-Place String Sorting .......... 14 Ranjan Sinha and Anthony Wirth Comparing Integer Data Structures for 32 and 64 Bit Keys............ 28 Nicholas Nash and David Gregg A New Graph-Theoretical Model for k-Dimensional Guillotine-Cutting Problems ....................................................... 43 Franc¸ois Clautiaux, Antoine Jouglet, and Aziz Moukrim Layer-Free Upward Crossing Minimization .......................... 55 Markus Chimani, Carsten Gutwenger, Petra Mutzel, and Hoi-Ming Wong On the Efficiency of a Local Iterative Algorithm to Compute Delaunay Realizations..................................................... 69 Kevin M. Lillis and Sriram V. Pemmaraju Computing Branch Decomposition of Large Planar Graphs............ 87 Zhengbing Bian and Qian-Ping Gu Experimental Evaluation of an Exact Algorithm for the Orthogonal Art Gallery Problem ............................................. 101 Marcelo C. Couto, Cid C. de Souza, and Pedro J. de Rezende Computing Multiple Watchman Routes ............................. 114 Eli Packer Engineering Parallel In-Place Random Generation of Integer Permutations.................................................... 129 Jens Gustedt ParallelPartition Revisited........................................ 142 Leonor Frias and Jordi Petit BroadwordImplementation of Rank/Select Queries................... 154 Sebastiano Vigna Efficient Implementations of Heuristics for Routing and Wavelength Assignment ..................................................... 169 Thiago F. Noronha, Mauricio G.C. Resende, and Celso C. Ribeiro X Table of Contents Myopic Distributed Protocols for Singleton and Independent-Resource Congestion Games ............................................... 181 Dimitris Kalles, Alexis C. Kaporis, and Paul G. Spirakis When to Reap and When to Sow – Lowering PeakUsage with Realistic Batteries........................................................ 194 Amotz Bar-Noy, Yi Feng, Matthew P. Johnson, and Ou Liu Characterizing the Performance of Flash Memory Storage Devices and Its Impact on Algorithm Design ................................... 208 Deepak Ajwani, Itay Malinger, Ulrich Meyer, and Sivan Toledo Fast Local Search for the Maximum Independent Set Problem ......... 220 Diogo V. Andrade, Mauricio G.C. Resende, and Renato F. Werneck Optimal University Course Timetables and the Partial Transversal Polytope........................................................ 235 Gerald Lach and Marco E. Lu¨bbecke A Basic Toolbox for Constrained Quadratic 0/1 Optimization ......... 249 Christoph Buchheim, Frauke Liers, and Marcus Oswald EmpiricalInvestigationofSimplifiedStep-SizeControlinMetaheuristics with a View to Theory ........................................... 263 Jens J¨agersku¨pper and Mike Preuss Reconstructing Phylogenetic Networks with One Recombination ....... 275 Ernst Althaus and Rouven Naujoks Exact Algorithms for Cluster Editing: Evaluation and Experiments..... 289 Sebastian Bo¨cker, Sebastian Briesemeister, and Gunnar W. Klau Combining Hierarchical and Goal-Directed Speed-Up Techniques for Dijkstra’s Algorithm ............................................. 303 Reinhard Bauer, Daniel Delling, Peter Sanders, Dennis Schieferdecker, Dominik Schultes, and Dorothea Wagner Contraction Hierarchies: Faster and Simpler Hierarchical Routing in Road Networks .................................................. 319 Robert Geisberger, Peter Sanders, Dominik Schultes, and Daniel Delling Bidirectional A∗ Search for Time-Dependent Fast Paths .............. 334 Giacomo Nannicini, Daniel Delling, Leo Liberti, and Dominik Schultes Multi-criteria Shortest Paths in Time-Dependent Train Networks ...... 347 Yann Disser, Matthias Mu¨ller–Hannemann, and Mathias Schnee Author Index.................................................. 363 Reducing Splaying by Taking Advantage of Working Sets Timo Aho, Tapio Elomaa, and Jussi Kujala Department of Software Systems,Tampere Universityof Technology P.O. Box 553 (Korkeakoulunkatu1), FI-33101 Tampere, Finland {timo.aho,tapio.elomaa,jussi.kujala}@tut.fi Abstract. Access requests to keys stored into a data structure often exhibit locality of reference in practice. Such a regularity can be mod- eled, e.g., by working sets. In this paper we study to what extent can the existence of working sets be taken advantage of in splay trees. In order to reduce the number of costly splay operations we monitor for information on the current working set and its change. We introduce a simple algorithm which attempts to splay only when necessary. Under worst-case analysis the algorithm guarantees an amortized logarithmic bound. In empirical experiments it is 5% more efficient than random- ized splay trees and at most 10% more efficient than the original splay tree.Wealso brieflyanalyze theusefulness ofthecommonly-used Zipf’s distribution as a general model of locality of reference. 1 Introduction Manysearchtreesfacilitateefficientaccesstothestoreditemsbykeepingthetree in balance using rotations [1]. The balance invariant is maintained independent of the sequence of access requests observed. Splay trees [2], on the other hand, manage to do without any invariant, but need to splay in connection of each access and update. Splay trees lose the provably logarithmic worst-case bounds ofindividualoperations,butstillbehavewellunderamortizedanalysis.Theneed for (expensive) splaying can be reduced by randomizing the decision of whether to splay or not in connection of an operation [3,4] as well as by heuristic limit- splaying algorithms [2,5,6]. Several theoretical results indicate that splay trees should work particularly well when there is locality of reference in the request sequence [2]. However, some empirical studies [6,7,8] have indicated that they could be actually at their best in highly dynamic environments, where the focus of locality drifts over time. Moreover, despite careful implementation basic splay tree variations have empirically been observed to be less efficient than red-black trees (RBTs), standard binary search trees (BSTs), and hashing at least in some situations [6,7].Randomizedadaptivedatastructurescandobetter[4,6],butonlyheuristic limit-splayinghasbeencompetitiveinpractice[6].However,somerecentstudies [9,10]havedemonstratedthatinsomesettings splaytrees maybe moreefficient C.C.McGeoch(Ed.):WEA2008,LNCS5038,pp.1–13,2008. (cid:2)c Springer-VerlagBerlinHeidelberg2008 2 T. Aho,T. Elomaa, and J. Kujala than other BSTs. We hope that paying better attention to the properties of the input—splaying only when necessary and useful—would lead to more efficient performance. Randomized splay trees achieve some practical savings without giving in on asymptotic efficiency. Nevertheless, they still do not pay any attention to the properties of the request sequence. The best advantage of randomization has beenshownforfixedprobabilitydistributions,whilerequestsequenceswithhigh dynamic locality of reference benefit from randomization only slightly [4]. Our aim in this paper is to study whether the amount of splay operations could be reducedmoreefficiently.Inotherwords,weinvestigatehowlargesavings(ifany) can be achieved by monitoring the actual input that is seen. In particular, we examine access request sequences that exhibit locality of referenceinthe formofworking sets [11].Thismeansthat,atanytimeinterval, mostaccessesreferonly toa smallportionofallkeys—the currentworkingset. Real-worldsituationsoften conformwith this assumption.Ofcourse,we cannot afford to implement a too complicated request sequence monitoring method, becausethenwewouldbedestinedtoloseintimeconsumptiontothein-practice efficient (randomized) splay trees. Wewillintroduceandanalyzeaquitestraightforwardversionofthesplaytree which takes the existence of working sets in the request sequence into account. Thealgorithmmaintainsa(discounted)countertomonitorthe(average)depths ofrecentsearchesinthetree.Lowaveragesearchdepthindicatesthataworking set exists near the root of the tree and is being actively used. Occasional deep searches do not change the situation. Only when the searches are constantly deep, is there need to update the splay tree. The remainder of this paper is organized as follows. In Section 2 we briefly recapitulate splay trees and their relation to working sets. Section 3 presents the main idea of conditional adaptation of a binary search tree studied in this paper. The splay tree algorithm based on this idea is introduced in Section 4. An empirical evaluationof the algorithmis reported and analyzedin Sections 5 and 6. Finally, Section 7 gives the concluding remarks of the paper. 2 Adaptive Data Structures and Working Sets A splay tree is a BST with the keys in symmetric order. In it the accessed item iselevatedtotherootofthetreeusingsplayrotations[2].Theseoperationskeep the tree pretty well in balance. Because no other balancing is enforced, a splay treedoesnotcontainanyadditionalinformationand,thus,doesnotrequireextra storage space. Because of its strategy, a splay tree also keeps recently accessed items very near the root. Thus, it automatically handles also working sets quite efficiently. On the downside, the accessed key is splayed to the root even if it is accessedonly once during the whole access sequence. Also unnecessary splaying is executed even if the current working set is near the root and, thus, already efficiently accessible.