Approximate Shortest Path and Distance Queries in Networks Christian Sommer Bornon8March1983inZurich,Switzerland CitizenofWinterthur(ZH)andSumiswald(BE),Switzerland MasterofScienceETHZurich(2006) Submittedinpartialfulfilmentoftherequirements forthedegreeofDoctorofPhilosophy January2010 DepartmentofComputerScience GraduateSchoolofInformationScienceandTechnology TheUniversityofTokyo Abstract Computingshortestpathsingraphsisoneofthemostfundamentalandwell-studiedproblemsin combinatorial optimization. Numerous real-world applications have stimulated research investi- gations for more than 50 years. Finding routes in road and public transportation networks is a classical application motivating the study of the shortest path problem. Shortest paths are also soughtbyroutingschemesforcomputernetworks: thetransmissiontimeofmessagesislesswhen theyaresentthroughashortsequenceofrouters. Theproblemisalsorelevantforsocialnetworks: onemaymorelikelyobtainafavorfromastrangerbyestablishingcontactthroughpersonalcon- nections. This thesis investigates the problem of efficiently computing exact and approximate shortest pathsingraphs,withthemainfocusbeingonshortestpathqueryprocessing. Strategiesforcom- putinganswerstoshortestpathqueriesmayinvolvetheuseofpre-computeddatastructures(often calleddistanceoracles)inordertoimprovethequerytime. Designingashortestpathquerypro- cessing method raises questions such as: How can these data structures be computed efficiently? What amount of storage is necessary? How much improvement of the query time is possible? How good is the approximation quality of the query result? What are the tradeoffs between pre- computationtime,storage,querytime,andapproximationquality? Fordistanceoraclesapplicabletogeneralgraphs,thequantitativetradeoffbetweenthestorage requirement and the approximation quality is known up to constant factors. For distance oracles that take advantage of the properties of certain classes of graphs, however, the tradeoff is less wellunderstood: forsomeclassesofsparsegraphssuchasplanargraphs,therearedatastructures that enable query algorithms to efficiently compute distance estimates of much higher precision thanwhatthetradeoffforgeneralgraphswouldpredict. Thefirstmaincontributionofthisthesis is a proof that such data structures cannot exist for all sparse graphs. We prove a space lower bound implying that distance oracles with good precision and very low query costs require large amounts of space. A second contribution consists of space- and time-efficient data structures for a large family of complex networks. We prove that exploiting well-connected nodes yields effi- cientdistanceoraclesforscale-freegraphs. Athirdcontributionisapracticalmethodtocompute approximateshortestpaths. BymeansofrandomsamplingandgraphVoronoiduals, ourmethod successfullyaccommodatesbothhighlystructuredgraphsstemmingfromtransportationnetworks andlessstructuredgraphsstemmingfromcomplexnetworkssuchassocialnetworks. iii Acknowledgements IthankmyadvisorandpatronShinichiHonidenforthewonderfulJapaneseenvironmenthepro- vided,inwhichIlearnttheessentialsofJapanesestudentlifeandculture,forthefreedomhegave me, andforhisverygenerousfinancialsupport, whichallowedmetotraveltomanyconferences allaroundtheworld,andwhichalsoallowedmetoworkwithhigh-qualityequipment. I thank my co-advisor and mentor Michael E. Houle for the many fruitful and interesting discussionsaboutalgorithmsandeverythingelse,forannouncingtheshortestpathproject,forhis advice,guidance,andintelligentquestions,forhiseffortsasacollaborator,forteachingmehowto improve my writing, and, honestly, for him patiently insisting on important things I did not want tohearandbelieve. IamveryhonoredtohaveHiroshiImaiaschairandDavidM.Avis,TakeoIgarashi,Kunihiko Sadakane,andTetsuoShibuyaasmembersofthecommitteeformyPhDthesis. Manythanksfor investingtheirtimeinstudyingmyworkandforexaminingthisthesis. I profited and learned enormously from my co-authors I worked with on the results of this thesis. I am indebted to Wei Chen, who first told me about the connection between path queries and compact routing, Shang-Hua Teng, for empowering and inspiring me, Elad Verbin, for his fascinating questions and his great intuition (and the invitation to Tsinghua), Yajun Wang, for insistingandworkinghardonthesubtledifferencesbetweenrandomgraphmodels,MartinWolff, forhisprecioushelponbootstrappingmythesisandforhisimpressiveskillsasanon-nativeeditor, andWeiYu,forworkingonallthetediousandnastycalculations. I also profited from collaborating with Cyrille Artho, Hristo Djidjev, Stephan Eidenbenz, DaisukeFukuchi,NicolasW.Hengartner,Pierre-Lo¨ıcGaroche,ShivaKasiviswanathan,Ken-ichi Kawarabayashi, Yusuke Kobayashi, Martin Mevissen, Johan Nystro¨m, Yoshio Okamoto, David Roberts,SunilThulasidasan,andTakeakiUno. IgotpreciousadvicefromIttaiAbraham,ErikD. Demaine, Jittat Fakcharoenphol, Cyril Gavoille, Stephan Langermann, Xiang-Yang Li, Mikkel Thorup,andUriZwick. This thesis has improved substantially by the valuable comments of those who read parts of preliminaryversionsofit. IwouldliketothankMichaelE.Houle,CyrilleArtho,JacopoGrazzini, and Johan Nystro¨m for their helpful suggestions and proofreading. The remaining errors and omissionsareentirelytheauthorsresponsibility. I owe a big thanks to countless individuals who I was fortunate to meet and to spend time with in one way or the other — o-sewa ni nari mashita! in the Honiden laboratories: Miki Nak- agawa (and Family Nishida in Takatsuki), Kyoko Oda, Akiko Shimazu, Shuko Yamada, Ai To- bimatsu, Mizuki Inoue, Kenji Taguchi, Yasuyuki Tahara, Nobukazu Yoshioka, Fuyuki Ishikawa, Kenji Tei, Rihoko Inoue, Nik Nailah Binti Abdullah, Rey Abe, Hikari Aikawa, Yukino Baba, Valentina Baljak, Takuo Doi , Katsushige Hino, Satoshi Kataoka, Yojiro Kawamata, Kazutaka Matsuzaki, Hirotaka Moriguchi, Mohammad Reza Motallebi, Hiroyuki Nakagawa, Yoshiyuki Nakamura, Hikotoshi Nakazato, Eric Platon, Jose´ Ghislain Quenum, Yuichi Sei, Ryota Seike, Shunichiro Suenaga, Ryuichi Takahashi, Ryu Tatsumi, Susumu Toriumi, Eric Tschetter, Kayoko Yamamoto,AdrianKlein,MaximMakatchev,DanieleQuercia,andMartinRehak;atNII:Shigeko Tokuda, Michael Nett, Weihuan Shu, Nizar Grira, Sebastien Louis, Se´bastien Duval, Takeshi Ozawa, Yuzuru Sawato and all the other nice and friendly guards; at Microsoft Research Asia andinBeijing: KunChen,YukiArase,YasuyukiMatsushita,‘Tommy’,YuanZhou,JialinZhang, LolanSong,Peter&UrsiZu¨rcher,GabrielSchweizer,andJaimieHwang;attheLosAlamosNa- tionalLaboratoriesandinLosAlamos: UlrikeCampbell&Glenn,FamilyEidenbenz,DouglasD. Kautz, Jacopo Grazzini, Nicolas Jegou, Leticia Cuellar, Vishwanath Venkatesan, Guanhua Yan, Keren Tan, Lukas Kroc, Leonid Gurvits, Nandakishore Santhi, and Carrie Manore; on my trips v totheUSandaroundtheworld: AliciaAponte,JittatFakcharoenphol,DanieleQuercia,Thomas, Kati&LarsSpirig,andAndrewYao;aspecialthankstomyrunningmatesfromTokyo’sInterna- tionalRunningClub“NambanRengo”formanyenjoyablehoursoftraining,racing,andtravelling (andpartying): thanksGuillaumeBouvet,Gary&MamiChandler,KazuoChiba,ChadClark,Ed- ward Clease, Joachim Dirks, Jon Holmes, Jay Johannesen, Chika Kanai, Gordon Kanki Knight, DanielKershner,StephenLacey,ChristianeLange,BrettLarner,JasonLawrence,OmarMinami, Teruyuki Minegishi, Keren Miers, Satohi Numasawa, Paddy O’Connor, Rie Onodera, Bob Poul- son,GarethPughe,FabrizioRaponi,GerardRobb,DavidMotozoRubenstein,PhilipRyan,Daniel Seite, Yuka Shigihara, Mika Tokairin, Martin Verdier, Ju¨rgen Wittstock, Kiyonari Yoshida, and others; from the Swiss club in Japan: Jo¨rg Aschwanden, Daniel & Monika Hagemeier, Felix Mo¨sner, Hans Prisi, Christoph Saxer, Uwe Sievers, Martin Wenk, and Hermann Werner; Japan friends (tea ceremony & BBQ) Mitsuhiko & Yuko Kusuyama, Chikako, Tomoaki, & Noriaki Sawada, Machiko & Yoshinobu Nagura, Junichi ‘Andy’ Kimura, Hitomi Sakamoto, Tomoko Sawada, Toshiro ‘Joe’ Suzuki, Akemi Okado, Masae Ono, John & Yuki Mettraux; more friends in Japan: Ryudo Tsukizaki, Koichi Matsumoto, Filiz Gencer, Jumi Klaus, Cedric S. Rutishauser, JerryRay, myextremelypatientandlovelyJapaneseteacherChiekoOkamoto, KatsuroIshimasa ofIdaten,andKenYamagataofIrohaformakingthebesteelsushiintown. It was great to have friends visiting me in Japan; thanks to Samuel Burri, Adrian Doswald, Martin Halter, Roger Herzog, Julia Imhof, Tanja Isker, Moritz Isler, Hannes Schneebeli, Georg Troxler,andStefanWolf. Last but definitely not least, I wish to thank my wonderful family. None of this would ever havebeenpossiblewithouttheloveandthefantasticsupportofHansruedi,Hermine,andStefan. Theytaughtmethatshortestpathsarenotalwaysoptimalanddesirable,andthat“derWegistdas Ziel”. And I wish to thank my Japanese family in Miyazaki, Kayashima, and Tottori, especially mybelovedRie,foreverything. ChristianSommer,December2009 vi Table of Contents 1 Introduction 1 1.1 NetworksandGraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.1 TransportationNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.2 ComplexNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 ShortestPaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.1 ClassicalResults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.2 Point-to-PointShortestPathQueries . . . . . . . . . . . . . . . . . . . . 9 1.3 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2 Preliminaries 17 2.1 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1.1 GraphProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.2 GraphClasses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.3 SyntheticGraphModels . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2 GraphAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.2.1 ComputationalModels . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.2.2 ApproximationAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.3 CommonTechniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.3.1 SpannersandEmulators . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.3.2 DistanceLabelingsandMetricEmbeddings . . . . . . . . . . . . . . . . 29 2.3.3 PlanarGraphTechniques . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.4 Well-SeparatedPairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.4 ShortestPaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.4.1 SingleSourceShortestPath(SSSP)Algorithms . . . . . . . . . . . . . . 32 2.4.2 AllPairsShortestPath(APSP)Algorithms . . . . . . . . . . . . . . . . 35 2.4.3 ManyPairsShortestPath(MPSP)Algorithms . . . . . . . . . . . . . . . 37 2.4.4 ShortestPathandDistanceQueries . . . . . . . . . . . . . . . . . . . . 38 3 ReviewofShortPathQueryProcessing 39 3.1 Theoretical—DistanceOracles . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.1 LowerBounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.2 GeneralGraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.1.3 RestrictedGraphClasses . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.2 Practical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.2.1 HierarchicalApproaches . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.2.2 GraphAnnotationApproaches . . . . . . . . . . . . . . . . . . . . . . . 52 3.2.3 RoadNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.2.4 ComplexNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4 LowerBoundsforSparseGraphs 59 4.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.2.1 CommunicationComplexity . . . . . . . . . . . . . . . . . . . . . . . . 60 4.2.2 RegularGraphswithLargeGirth. . . . . . . . . . . . . . . . . . . . . . 64 vii Table of Contents 4.2.3 CountingPermutations . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.3 ReductionfromLopsidedSetDisjointness . . . . . . . . . . . . . . . . . . . . . 69 4.3.1 Intuition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.3.2 Reductionfromadatastructuretoacommunicationprotocol . . . . . . . 71 4.3.3 Communicationcomplexityimpliesspacecomplexity . . . . . . . . . . 73 4.3.4 CountingPaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4.3.5 Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.4 ConclusionandOpenProblems. . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5 DistanceOraclesforPower-lawGraphs 81 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 5.1.1 OverviewoftheResult . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.1.2 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.2.1 DistanceOracleofThorupandZwick . . . . . . . . . . . . . . . . . . . 83 5.2.2 PropertiesofRandomPower-lawGraphs . . . . . . . . . . . . . . . . . 84 5.3 TheAdaptedDistanceOracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.4 TimeandSpaceComplexities . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.4.1 CoreSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.4.2 BallSizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5.4.3 Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.5 ConclusionandOpenProblems. . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6 ApproximatingShortestPathsUsingVoronoiDuals 97 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.2.1 GraphVoronoiDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.3 TheVoronoiMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.4 ComputationalComplexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.5 StretchAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.6 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.6.1 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.6.2 DataSets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 6.6.3 ExperimentalSetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6.6.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6.7 ConclusionandOpenProblems. . . . . . . . . . . . . . . . . . . . . . . . . . . 118 7 Conclusion 121 viii 1 MILLEVIAEDUCUNTHOMINEM PERSAECULAROMAM. (AllroadsleadtoRome.) (Esfu¨hrenvieleWegenachRom.) AlanusdeInsulis intheLiberParabolarum 12thcenturyAD Introduction Imagine youwantedto travel fromcentralTokyoto visittheplacewhereIgrew up, whichisthe villageofOttenbachinSwitzerland. Whatisthefastestwaytogetthere? ImagineyouwantedtogetintouchwithNelsonMandelausingasequenceofpersonalintro- ductionsthroughfriendsandfriendsoffriends. Whatistheshortestsuchsequence? ImagineyouwantedtoaccessawebpageontheInternet. Whichroutersshouldbeusedsuch thatthenecessaryinformationisdownloadedtoyourcomputerfastest? These questions have something in common, in that their (optimal) solution is the shortest path between two points of a network: a transportation network, a social network, and a router network. AllroadsmayleadtoRome, butwewishtoarriveassoonaspossible. Theaimofthis thesisistoprovidemeanstoefficientlycomputeshortestpathsinnetworks. 1.1 Networks and Graphs Figure 1.1: The Ko¨nigsberg bridges as depicted by Leonhard Euler in his article “Solutio Prob- lematis ad Geometriam Situs Pertinentis” on page 129 in volume 8 of Commentarii Academiae ScientiarumPetropolitanaein1741. YoumayhaveheardofthesevenKo¨nigsbergbridgesandthequestionastowhetheronecan, in one walk, cross each bridge exactly once. Leonhard Euler resolved this question in 1735 by proving that there is no such walk. His proof works as follows. Consider the island denoted by the letter on the illustration in Figure 1.1. Euler made the following important observation: A although the island contains many buildings, streets, and paths, the relevant information is the 1 CHAPTER 1. INTRODUCTION island’sconnections(thebridges)totheotherpartsofthecity. Thisobservationledhimtocreate an abstract discrete structure, later termed a graph. He identified each landmass with a node and each bridge with an edge connecting the two corresponding nodes in the graph. A walk in Ko¨nigsberg corresponds to a walk in the graph; crossing a bridge is represented by traversing an edge. Euler then noted that the number of edges adjacent to a node is essential. Except for the endpointsofthewalk, allintermediatenodesmusthavean evennumberofadjacentedges, since any walk must leave the node exactly once for every time entering it. Since all of the four nodes haveanoddnumberofedges,therecannotbeanywalkthattraverseseachedgeexactlyonce. Modeling the bridges by the edges of a graph helped Euler to solve the problem of the Ko¨nigsberg bridges. Ever since, graphs have been used as an abstraction of structures in the realworld: Graphs are, of course, one of the prime objects of study in Discrete Mathemat- ics. However, graphs are among the most ubiquitous models of both natural and human-madestructures. Inthenaturalandsocialsciencestheymodelrelationsamong species, societies, companies, etc. In computer science, they represent networks of communication, data organization, computational devices as well as the flow of computation, and more. In mathematics, Cayley graphs are useful in Group Theory. Graphs carry a natural metric and are therefore useful in Geometry, and though they are “just” one-dimensional complexes, they are useful in certain parts of Topology, e.g. Knot Theory. In statistical physics, graphs can represent local connections be- tweeninteractingpartsofasystem,aswellasthedynamicsofaphysicalprocesson suchsystems. [HLW06] In a graph representing a road network, intersections and streets can be modeled by nodes and edges, respectively. Two nodes have an edge in between if there is a street connecting the two corresponding intersections. For a computer network, routers and the connecting network cables are mapped to nodes and edges, respectively. In a social network, the connections are not physical. Individuals can be modeled by nodes; two nodes are connected by an edge whenever the corresponding individuals are friends. In other social networks, an edge may also indicate a privateorprofessionalrelationshipotherthanfriendship. Different streets of a road network have different lengths. This is modeled by assigning each edge a number, called its edge weight. This cost can reflect real-world values such as distance, traveltime,transmissiontime,andlatency. Inagraphmodelingasocialnetwork,theedgeweight can also reflect the quality of a friendship, although this is arguably difficult to capture appropri- atelybyasinglenumber[XNR10]. In the remainder of this introduction, we first review various example structures, for which a graph serves as a suitable model. We then consider one central problem that can be solved using graphs: we investigate applications of the shortest path problem (Section 1.2), in particular con- temporary applications of the point-to-point shortest path problem (Section 1.2.2). We conclude thechapterbystatingthecontributionofthisthesis(Section1.3). 1.1.1 Transportation Networks Transportation networks are an integral part of the infrastructure in many countries. For this reason, the study of transportation networks is an important field of research. We give three examplesoftransportationnetworks: road,railway,andairlinenetworks. Amorerealisticmodel oftransportationwouldideallyintegratenetworksofallthreetypes[Fra08,DPW09,DPWZ09]. 2
Description: