since they were reachable in G. Allen and Cocke [AC72] give a different characterization of the sets. Dom(u) and observe that they are the unique maximal ...
Minimum Cost Disjoint Paths under Arc Dependences Algorithms for Practice
von Dipl.-Math. Martin Oellrich aus Essen
Fakult¨at II – Mathematik und Naturwissenschaften Technische Universtit¨at Berlin zur Erlangung des akademischen Grades Doktor der Naturwissenschaften – Dr. rer. nat. – von der Fakult¨at II genehmigte Dissertation
Promotionsausschuss: Vorsitzender: Prof. Dr. R. Schneider Gutachter: Prof. Dr. R. H. M¨ohring Gutachter: Prof. Dr. M. Skutella Tag der wissenschaftlichen Aussprache: 26.03.2008
Berlin 2008 D 83
Abstract In this thesis, we develop a unified algorithmic framework for Minimum Cost Disjoint Paths Problems. These problems arise in a variety of applied contexts, in particular telecommunication networks and automated vehicle routing. The main motivation typically is the desire to plan a structure which is safe in a certain way. In telecommunications, survivability of networks is a paramount issue. In guiding of cargo vehicles, it is prevention of collisions. We have taken the initial impulse for our research from a project with T-Systems Darmstadt. Planners needed a tool to support the pricing of so-called Virtual Private Networks. We developed a software called ODEA to aid their processes. It was also applied to realistic instances from a logistics project with Containerterminal Altenwerder at Hamburg harbour. Disjoint Paths Problems are posed in the form of a directed or undirected graph with nonnegative arc/edge costs and a set of node pairs in it. A feasible solution is a set of connecting paths, one for each node pair, such that two conditions are satisfied: 1. all paths are pairwise nonintersecting in a given sense, 2. the total cost of the solution is a minimum among all solutions. This problem is known to be NP -hard even in very restricted cases. Literature reports about special cases allowing polynomial time algorithms as well as heuristic approximation schemes. There is an apparent lack on exact approaches suitable for deployment in broad purpose software. Our work addresses this gap. We present an integer programming model flexible enough to accommodate several disjointness modes, yet practical enough to allow for efficient algorithmic treatment of real-world instances. We introduce a new modelling technique called arc dependences. It generalizes the traditional notion of disjointness which differentiates between arc-, edge- or node-disjointness only. With its help, planners can restrict their work to specially constructed abstractions of the input graph, comprising significantly less data without losing the essence needed for safety. While the main focus of this model lies on paths in the graph, we also investigate an alternative featuring so-called star flows. The main part of this book describes in detail the methods developed for encoding in our software. We devise a Branch-and-Bound scheme and fill in the contents for its functional ingredients: branching strategies, structural pruning, upper and lower cost bounds. This includes two novel ideas for strengthening the latter. Behind all these tasks, the combinatorial core engine of the solver is an assortment of specially adapted cheapest paths routines. We set up a representative testbed and perform extensive testing of our algorithms throughout all development stages. We conclude with a competition between ODEA and the commercial general purpose CPLEX MIP solver. Keywords: Survivable Network Design, Branch-and-Bound Algorithm Mathematics Subject Classification: (2000) 90C27, 90C35, 90C57, 90C90, 90B18
i
Zusammenfassung In der vorliegenden Dissertation entwickeln wir einen einheitlichen algorithmischen Rahmen f¨ur Disjunkte Pfadprobleme mit minimalen Kosten. Diese Probleme treten in vielf¨altigen angewandten Kontexten auf, insbesondere in der Telekommunikation und der automatischen Fahrzeugf¨uhrung. Die Hauptmotivation ist typischerweise das Erfordernis, eine Struktur zu planen, die in einem bestimmten Sinne sicher ist. In der Telekommunikaton ist Verf¨ugbarkeit ein Thema von h¨ochster Bedeutung, bei Fahrzeugen ist es Kollisionsfreiheit. Wir bekamen den Startimpuls f¨ur unsere Arbeit durch ein Projekt mit T-Systems Darmstadt. Dort brauchten Planer ein Werkzeug zur Unterst¨utzung der Bepreisung so genannter Virtueller Privater Netze. Wir entwickelten zu diesem Zweck eine Software namens ODEA, die sp¨ater auch auf realistische Instanzen eines Logistikprojektes mit dem Containerterminal Altenwerder am Hamburger Hafen angewandt wurde. Disjunkte Pfadprobleme sind gegeben in der Form eines gerichteten oder ungerichteten Graphen mit nichtnegativen Bogen-/Kantenkosten und einer Menge von Knotenpaaren. Eine zul¨assige L¨osung ist eine Menge mit je einem verbindenden Pfad pro Knotenpaar, die zwei Bedingungen erf¨ullt: 1. alle Pfade sind paarweise u¨ berschneidungsfrei in einem gegebenen Sinne, 2. die Gesamtkosten der L¨osung sind minimal unter allen L¨osungen. Dieses Problem ist bekanntermaßen NP -schwer schon in stark eingeschr¨ankten F¨allen. Die Literatur berichtet u¨ ber polynomial l¨osbare Spezialf¨alle und heuristische Approximationsm¨oglichkeiten. Exakte Ans¨atze fehlen, die zum Einsatz in Software f¨ur allgemeine Zwecke geeignet w¨aren. Unsere Arbeit befasst sich mit dieser L¨ucke. Wir stellen ein ganzzahliges Modell auf, das zum einen flexibel genug ist, um mehrere Disjunktheitsmodi abzubilden, zum anderen eine effiziente algorithmische Bearbeitung anwendungsnaher Instanzen erm¨oglicht. Wir f¨uhren eine neue Modellierungstechnik namens Bogenabh¨angigkeiten ein. Sie erlaubt eine Verallgemeinerung des klassischen Disjunktheitsbegiffs, der nur bogen-, kanten- und knotenbezogene Disjunktheit unterscheidet. Mit ihrer Hilfe k¨onnen Planer ihre Arbeit auf speziell konstruierte Abstraktionen des Eingabegraphen beschr¨anken, der erheblich weniger Daten enth¨alt ohne die f¨ur die Sicherheit ben¨otigten Informationen zu verlieren. Im Mittelpunkt dieses Modells stehen Pfade im Graphen. Wir untersuchen auch eine alternative Formulierung mittels so genannter Sternfl¨usse. Der Hauptteil dieses Buches beschreibt im Detail die Methoden, die wir f¨ur unsere Software entwikkelt haben. Wir entwerfen ein Branch-and-Bound-Schema und geben die Inhalte f¨ur seine funktionalen Teile an: Verzweigungsstrategien, strukturelle Ausschl¨usse, obere und untere Kostenschranken. Darunter sind zwei neuartige Ideen zur Verbesserung der unteren Schranken. Unterhalb all dieser Teilaufgaben stellen speziell angepasste kombinatorische Kernroutinen zur Berechnung billigster Pfade die Basis des Programms dar. Wir stellen ein repr¨asentatives Testbett zusammen und testen unsere Algorithmen durch alle Entwicklungsschritte hindurch. Wir schließen ab mit Vergleichen zwischen ODEA und dem ganzzahligen Solver des kommerziellen Tools CPLEX. ¨ Schlusselw¨ orter: ausfallsichere Netzwerkplanung, Branch-and-Bound Algorithmus Mathematics Subject Classification (2000): 90C27, 90C35, 90C57, 90C90, 90B18
ii
Preface “People do acquire a little brief authority by equipping themselves with jargon: they can pontificate and air a superficial expertise. But what we should ask of educated mathematicians is not what they can speechify about, nor even what they know about the existing corpus of mathematical knowledge, but rather what can they now do with their learning and whether they can actually solve mathematical problems arising in practice. In short, we look for deeds not words.” — John Hammersley [Ham68] Over the course of twelve and a half years, I was engaged in various industrially motivated telecommunications routing projects. This as part of my education, later as my regular job with Deutsche Telekom, and most recently as my PhD thesis subject. Concerned with mathematical programming, my task was to develop and implement algorithms applicable to problem instances of realistic sizes. An occupation I thoroughly enjoyed from the beginning and will further over time. Considering myself more as an algorithm engineer than as a theoretician, I love to see math at work before my eyes. Computer programming affords me fast and objective feedback for my ideas, being my natural method of study. So it is not surprising this thesis is centred around application oriented methods. The subtitle Algorithms for Practice says it and I mean it. The topic of Disjoint Paths came to me as the subject of my Diplomarbeit (German master’s thesis) at TU Berlin in 1995. Being a real project with industrial partner Deutsche Telekom, it had that handson “application feel” from the start. Very busy two years later, it earned me my degree as an applied mathematician. After graduation and being an employee with Deutsche Telekom, I continued on this theme for another year. I learned about dependences and incorporated their handling into my software. Also during this time, the actual name for both the project and the main solver emerged: ODEA, standing for Optimal Disjoint Embedding Algorithms. The final period, with equally much progress achieved than in the time before, started in spring of 2005 when I was a research assistant back at TU Berlin. I had an abundance of untried ideas around disjoint routing in my mind, foremost the stars approach (Chapter 12). So I picked up the topic again after six years full of other vocational activities and brought it to the present point. More applications for the solver arose along the way. This thesis gives a comprehensive account of all my thoughts and experiences with the Disjoint Paths Problem under Arc Dependences. May the reader join in my fascination for this very graphic and intuitive problem as well as efficient combinatorial algorithms for its solution. In order to set myself a controllable goal, I chose the well-known CPLEX 1 mixed integer solver as my benchmark. I wanted to design and implement a sophisticated software able to compete with it, maybe even overtake it in my special context of disjoint routing. This turned out to be a tough going when CPLEX was updated almost every year, improving its performance every time. On the positive side, it kept me motivated, as there obviously was a way to do better. Looking back, I feel my work was 1 trademark
of ILOG company
iii
PREFACE
iv worth the efforts and I can finally close this project at rest.
Acknowledgements I owe most thanks to my academic advisor Rolf H. M¨ohring who introduced me to challenging application oriented mathematical problems. He was the one who had already acquired the Disjoint Routing project when I came to ask for a subject to work on. It quickly enthused me and ultimately led to the career I had up to now. He also laid the foundation for my future, results from which are yet to come. Probably as much gratitude I owe to my former colleague Joachim von Puttkamer at Deutsche Telekom. He, a practitioner, was the one to acquaint me with the concept and purpose of dependences in the mathematical sense defined in Chapter 3. Without this intriguing research impulse in my mind, I would probably have taken another direction. My former industrial manager Ruth Kleinewillingh¨ofer-Kopp let me trustfully go my own ways in my research and development activities while granting continual and full support. These were clearly conditions under which I could best unfold my ideas. I want to sincerely thank her for five great years and hope the result is most of what she had in mind. My second referee, Martin Skutella, entered the stage exactly at the right moment. I am very grateful for his willingness to take on this job on short notice. He also supplied me with an implementation of a Network Simplex Algorithm as a benchmark to compare with my own procedure (Section 12.2.2). By far the most time for this work I spent on coding. This would not have been possible in the effective way it was without Ewgenij Gawrilow and his colleagues of the technical staff at our department. I never had to worry about the availability of fast and well-equipped computers. Working with graphs, most intuition flows from their graphical representations. Back in 1996, my former fellow student Olaf Jahn wrote an elaborate visualization tool especially suited for disjoint routing instances. It served me really well over all the time and I am the more grateful to him for leaving it to me. I don’t want to forget to thank my colleagues Gregor W¨unsch and Florian Zickfeld for their unwavering tendance of our group’s excellent coffee machine. It did not let me down a single time during the three years we have it. The LEO online dictionary was my lingual tool of choice in all cases of doubt. It always provided the answers I needed at lightning speed. The same holds true for the Google search engine for my extensive literature research. Is it odd to be glad about my aging CD player? It has kept me in good mood during long nights of deep involvement with my work. Martin Oellrich, Berlin, February 2008
This final version of my thesis was revised according to valuable recommendations from my referees. I also replaced the graph modelling of the Slab Restacking Problem by a stronger and more intuitive one. Martin Oellrich, Berlin, May 2008
Contents Abstract / Zusammenfassung
i
Preface
iii
Outline
viii
List of Symbols / General Remarks
ix
I
Disjoint Paths Problems
1
1
Introduction
2
1.1
Virtual Private Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.2
The Problem (MCDP)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.3
Example Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2
3
4
Theoretical Results
14
2.1
NP-Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.2
Feasibility Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.3
Existence of Feasible Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.4
Polynomial Time Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
Modelling Reality with Dependences
25
3.1
A Closer Look at Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
3.2
Prescribed Partial Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
3.3
NP -completeness of Disjoint Paths with Dependences . . . . . . . . . . . . . . . . . . .
30
IP Modelling
34
4.1
Multicommodity Flow Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
4.2
Unified Node-Arc Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
4.3
Integrating Dependences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
4.4
Covering the Dependency Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
4.5
Arc-Path Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
v
CONTENTS
vi 5 Feasibility Issues
51
5.1
Deciding Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
5.2
Adding Base Arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
5.3
Selecting Demands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
II Algorithmic Solution Techniques
57
6 Branch-and-Bound Solver
58
6.1
The General Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
6.2
Choosing Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
6.3
Branching Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
7 Structural Bounding
68
7.1
Probing Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
7.2
Probing Articulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
7.3
Computational Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
84
8 Base Graph Preprocessing
87
8.1
Redundant Arcs and Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
8.2
Canonical Embeddings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
8.3
Computational Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96
9 Upper Bounds Computation
101
9.1
Untwist Heuristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
9.2
Clique Heuristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9.3
Relax Heuristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.4
Constraint Based Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
9.5
Integrated Heuristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.6
Computational Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
10 Lower Bounds Computation
129
10.1 LP Relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 10.2 Lagrangian Relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 10.3 One Integral Demand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 10.4 Path Cost Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 10.5 Allowed Dependences Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 10.6 Computational Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
III Cheapest Paths Computation
171
11 Path Generation
172
11.1 Dijkstra Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
CONTENTS
vii
11.2 Respecting Cost Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 11.3 Respecting Forbidden Dependences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 11.4 Respecting Allowed Dependences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 12 Disjoint Stars Approach
205
12.1 Terminal Covers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 12.2 Cheapest Star Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 12.3 Comparison of Lower Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
IV Conclusion
225
13 Computational Competition
226
13.1 Pivoting Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 13.2 Confronting CPLEX MIPOPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 14 Achievements
237
15 Open Problems
239
V
Appendix
245
A Software Aspects
246
B Testbed
250
List of Figures
259
List of Tables
263
List of Algorithms
265
Bibliography
266
Index
278
Curriculum Vitae
284
Outline This thesis is a report of several years of practical work on the problem presented. It is divided into four parts reflecting different aspects of it. In the first part, the problem in question, the Minimum Cost Disjoint Paths Problem (MCDP) , is introduced, motivated, and reformulated in mathematical style. A survey of theoretical results on the topic, in particular its NP -completeness and the existence of polynomial time algorithms in special cases, is given in Chapter 2. The following Chapter 3 introduces a new complication to (MCDP) called edge dependences. This is necessary to make the modelling of Chapter 4 more realistic and give it higher application flexibility. Chapter 5 is concerned with issues of feasibility. Not all instances possess feasible solutions and we give hints how they can be handled. In the second part, we give a thorough description of the ingredients of our Branch-and-Bound solver named ODEA. It departs in Chapter 6 with an explanation of the high-level structure, in particular the choice of branching pivots. Once branched off, a subproblem is examined for feasibility in Chapter 7. The following Chapter 8 is an intermezzo standing in this place as its prerequisites are laid out in the preceding chapters. It presents a pre-start graph reduction technique able to effectively scale down the amount of instance data that have to be handled. Moving on with the B&B process, two numerical values, so-called upper and lower bounds, are computed and compared. They play the key roles in our optimization solver. Chapters 9 and 10 give the details. The basic engine of all bounding routines are high-performance cheapest paths algorithms, the topic of Part III. Reviewing the classical Dijkstra algorithm first, we develop variants of it that are especially adapted to handling the edge dependences (Chapter 11). These methods are being contrasted in Chapter 12 with the independent disjoint stars approach. It strives to attain partial disjointness between subsets of paths all within one single run. Chapter 13 opens the conclusional part IV. It presents the empirical experience we made with our ideas encoded in our software. In particular, here we describe the outcomes of the main competition between ODEA and the CPLEX 11.0 MIP solver. The achievements made in this work are summarized in Chapter 14 while we outline related open problems for future directions of research in Chapter 15. The appendix finally comprises a description of our software design (Appendix A) as well as an extensive collection of test instances (Appendix B). Starting on the very next page, we list the most important or frequently used terminology in an extra List of Symbols in order to avoid possible misunderstandings. We also give brief descriptions of general nature, for instance, concerning presentation style. We recommend reading it prior to all following material. The reader unfamiliar with the basic notions of graph theory or algorithmic complexity theory is referred to, for instance, [Jun87, Har69, Man89, Meh88, MS91] for a detailed introduction. More specific introductory literature is indicated where appropriate.
viii
List of Symbols / General Remarks General Mathematical Symbols N N0 R+ R∗
= { 1, 2, . . .}, set of natural numbers = N ∪ {0} set of nonnegative real numbers Euclidean real space with a dimension appropriate to the context
⌊x⌋ ⌈x⌉
:= max { z ∈ Z | z ≤ x }, the largest integer not exceeding x := min { z ∈ Z | z ≥ x }, the smallest integer not below x
∅ 2S S
the empty set power set of S, the set of all subsets of set S
k
⊆ 2S
:= { B ⊆ S | |B| = k }, the set of all k-subsets of set S
S+s S−s
shorthand for S ∪ {s} where s is of member type of set S shorthand for S \ {s} where s is of member type of set S
O(f)
Θ( f ) Ω( f )
the class of functions g with the asymptotic property of g ≤ c f , c > 0 constant the class of functions g with the asymptotic property of g ≈ c f , c > 0 constant the class of functions g with the asymptotic property of g ≥ c f , c > 0 constant
argmin f (x)
an arbitrary element of { x ∈ X | f (x) ≤ f (y) ∀ y ∈ X }
Only used when exist-
an arbitrary element of { x ∈ X | f (x) ≥ f (y) ∀ y ∈ X }
ence is guaranteed.
x∈X
argmax f (x) x∈X !
!
a ≤ b, a = b
a condition of a ≤ b or a = b that we demand to be satisfied
s. t. w. l. o. g. w. r. t.
subject to without loss of generality with respect to.
Graph-theoretical Symbols G = (V, A) G = (V, E) H = (T, D)
directed base (multi-)graph with node set V and arc set A undirected base (multi-)graph with node set V and edge set E demand (multi-)graph with terminal set T ⊆ V and demand set D
G + H = (V, A ∪ D) G + H = (V, E ∪ D)
directed superposition graph of G and H undirected superposition graph of G and H
{u, v} ∈ E
undirected edge ix
LIST OF SYMBOLS / GENERAL REMARKS
x (u, v) ∈ A
directed arc
(u, v)
= (v, u), arc with reverse orientation (opponent)
NG (u) ⊂ V NG+ (u) ⊂ V
set of all nodes adjacent to node u in G, excluding u (neighbourhood) set of all nodes v adjacent to node u in G by a forward arc (u, v) (forward neighbourhood) set of all nodes v adjacent to node u in G by a backward arc (v, u) (backward neighbourhood)
NG− (u) ⊂ V δG (U) ⊆ A/E δ+ G (U) ⊆ A δ− G (U) ⊆ A
set of cut arcs/edges between U ⊆ V and V \U set of cut forward edges U → V in G between U ⊆ V and V \U set of cut backward edges U ← V in G between U ⊆ V and V \U
degG (u) deg+ G (u) deg− G (u)
= |δG (u)|, degree of node u in G = |δ+ G (u)|, out-degree of node u in G = |δ− G (u)|, in-degree of node u in G
G[U], G[F] G − a, G − e, G − v
subgraph of G induced by U ⊆ V or F ⊆ E where a ∈ A, e ∈ E, v ∈ V : shorthands for G[A − a], G[E − e], G[V − v].
Optimization Related Symbols Π OPT (π)
the set of all Disjoint Paths instances for π ∈ Π: optimal objective value a feasible solution to π can attain
c : E/A → Q+ c(E ′ ) ∈ Q+
an edge/arc cost function associated with G := ∑e∈E ′ c(e), E ′ ⊆ E, the total cost of all edges in E ′ ; applies equally to arcs
distcG (s,t)
the cost of a cheapest s-t-path in G w. r. t. edge/arc cost function c.
General Remarks We like to point out some details where our terminology is intentionally very specific. • The symbols ‘⊆’ and ‘⊂’ are distinct, the latter excludes equality. • A maximal set w. r. t. some property cannot be extended by means of further inclusion without destroying that property. A maximum set w. r. t. a property is a maximal set of largest possible cardinality. Analogous dictions hold for minimal and minimum sets. • The terms efficacy and effective solely refer to the quality of some method (i. e., to the extent of its power) whereas efficiency and efficient always refer to the quantitative time consumption of an algorithmic performance. • The terms feasibility and feasible solely refer to the solvability of an instance in the sense whether the base graph supports any disjoint embedding of the demands. No cost function is taken into account. • We use the adjective binary for {0,1}-variables, binary trees, or for binary search. Whenever the evaluation of some condition results in either true or false, we use the term boolean.
xi • We differentiate between the cost and the length of a path in a graph. The former refers to an associated edge cost function while the latter means a simple count of the edges contained in the path. Accordingly, we use cheapest path or shortest path. • A problem is a general class of its instances. The former refers to the mathematical structure of the topic in question while the latter mainly denotes the concrete data that algorithms get to see.
Presentation of Algorithms • It is generally understood that algorithms take their input parameters by value unless explicitly stated otherwise. This is only in order to have a transparent variable usage. In practice, of course no graph would be taken in this way. • Several algorithms consist of a main body and one or more subroutines. The definitions of these routines are indicated by “subname( argument list )”, their calls by “subname( parameters )”. The input parameters of those algorithms are always global data, i. e., they are known and accessible within the subroutines as well. • All main steps in our algorithms carry parenthesized labels. These labels are being exclusively referred to within the text bodies belonging to the same sections, never elsewhere. • In the discussion of the labelled steps, we occasionally develop refinements thereof which are then expressed as code fragments with primed labels. These are meant to replace their respective original steps in the algorithms. • In algorithmic notation, the symbol ‘=’ means a test for identity while the symbol ‘:=’ denotes an assignment to the variable standing on the left hand side of it. In the text, the symbol ‘:=’ means a (new) semantic definition for the object on the left hand side. The reverse symbol ‘=:’ does the same for the object standing on the right, or the object on the left is being decomposed into the (newly introduced) parts on the right. • Our algorithms are often governed by working sets containing all objects still of interest to be handled. In each iteration, we choose out a member with some extremal property, mostly some minimum scalar cost value. These sets are implemented as priority queues with the required costs as key values. There is never any other property implied. • Algorithms perform differently between theory and practice. The asymptotic complexity is one measure and the actual effort, i. e., work done on some instances, another. We use these two notions for discussing these respective aspects. • Where we evaluate the performance of single subroutines, we use a Differential Method: in every call of the algorithm in question, we make an extra subcall to itself (avoiding recursion). We then compare the measured total time against one identical run less the extra subcall. The difference gives the net time spent by the routine. • Tables with running times were exclusively measured on LINUX workstations with 3.2 GHz clock rate under the SuSe 10.2 operating system.
xii
LIST OF SYMBOLS / GENERAL REMARKS
Part I
Disjoint Paths Problems
1
Chapter 1
Introduction We are living in the age of information and communication. All history of mankind has shown how much human beings long to communicate with each other and, in this effort, bridge longer and longer distances in both space and time. Milestones in this development were the inventions of book printing, the telegraph, the telephone, the television, and, most recently, the Internet. Nowadays, computers have sped up information exchange to an incredible rate, leaving any kind of human interaction far behind. And while people already feel an overflow of information, electronic data transfer is the driving force behind a continuing expansion in the communication sector. More and more companies operate their businesses on a fully computerized basis and call for increasing capacities of their internal links. Besides that, totally new concepts as, for instance, online services and mobile telephony, have appeared on this stage, promising a market of enormous dimensions. Reason enough for network providers to invest huge amounts of money into their hardware — competition is being tough. In the USA, the development of and supply with telecommunication services have always been in the hands of private industries, whereas European countries have taken a more controlled approach by means of state-owned monopolies. This holds no less true for Germany, where governmental administration has traditionally played a dominant role. In the outgoing 20th century, as access to such services was ensured for everyone and the spectrum of products had diversified, markets were liberalized. All aspects of hardware operation — maintenance of the infrastructure as well as marketing of services, which were formerly organized in conjunction — become separated and widely split among various competitors. But on the engineering side, there is more to do than accelerating transmission, packing more information on less wires or constructing safer encryption codes. Raising a large technological system typically shows an increasing risk of failure due to unforeseen influences, inherent inconsistencies, or lack of control despite all efforts. Keeping their networks stable and operable are the primary goals of all providers (besides maximizing their profits, that is). At the same time, safety measures are being called for by their customers. And here lies the origin of the problems this thesis is concerned with.
1.1 Virtual Private Networks The Deutsche Telekom AG, being the privatized legal successor of the Deutsche Bundespost in the telecommunication sector, is nowadays facing competition by several other providers. The company owns the vast majority of telephone lines within the country and is leasing them to firms offering some sort of dedicated management. The uses of subnetworks called Virtual Private Networks (VPN) include information services, backbone tasks, or multimedia offers, among others [Pau99, Scho99]. We consider one special type of contract between the Deutsche Telekom T and some other company C. It regulates the leasing of a list of distinct connections, each extending between a pair of specified locations. Provider T owns a physical network and is to route C’s requested connections through it, 2
1.1. VIRTUAL PRIVATE NETWORKS
3
eventually linking all given pairs to one another. For examples of such data, see Figures 1.1 and 1.2. In the latter one, the desired connections are marked by coloured lines.
Figure 1.1: A physical network
Figure 1.2: A virtual private network
Finding these connections through the network without further restrictions would not present a serious problem. On the technical level, it is no more than a capacity reservation. If we give all trunks some internal cost coefficient, we could easily think of computing each connection as a path of minimum cost. Figure 1.3 shows a possible result of such a computation on four of the connections from the example data above.
Figure 1.3: Minimum-cost paths in general tend to overlap. In this context, C’s additional request for reliability imposes difficulties in the planning process. Several notions of reliability exist in the literature. Gr¨otschel et al. [GMS95] for instance treat the design of subnetworks of a given network that satisfy certain connectivity properties. No routing is considered. Ball et al. [BCP95] attempt to measure the technical performance of the network in different
CHAPTER 1. INTRODUCTION
4
scenarios. A network is then said to be reliable if it meets the proposed measures to at least a given threshold (called Quality of Service (QoS) in the telecommunication industry). Our notion of reliability throughout this work is simpler and more strict. From C’s point of view, in his VPN all connections are distinct and function independently of each other. C will manage and utilize them under this assumption. In T’s physical network however, all connections are realized as possibly overlapping paths. So one single failure — depicted in Figure 1.3 as a digger — could take out several connections on C’s level, complicating any attempts of re-connecting the data flow within C’s control. Technically speaking, the failure probabilities of the affected connections are correlated. A straightforward consequence of this disadvantage is to forbid the simultaneous usage of network resources by more than one single connection. The result is a reliable routing of the connections through the network. Still, T and C may agree on one of two different sophistication modes: either only the trunks (consisting of wires or fibers) must be kept separate, or all hardware devices including the switching computers have to. Figures 1.4 and 1.5 show possible reliable routings for G, H from above. (They are rendered larger on p. 253.)
Figure 1.4: Reliable routing respecting trunks.
Figure 1.5: Reliable routing respecting all resources.
T now has to simultaneously accomplish two goals: reliability: cost:
T must route all connections reliably through the network G, depending on the mode C desires. T must calculate a reasonable price. So he strives to find a routing at the lowest possible internal cost.
Finding an optimum under these conditions was the initial goal that the Deutsche Telekom AG wanted our project to achieve, see [Wie96]. Besides that, they were in need of methods for quickly deciding whether C’s VPN can at all be reliably routed within their network. The following section explains this in more rigorous terms.
1.2. THE PROBLEM (MCDP)
5
1.2 The Problem (MCDP) From here on, we will describe and treat the colloquially motivated problem above from a mathematician’s point of view. This is in order to isolate the underlying structure and to focus on solution techniques. The problem to be defined comes in two basic, analogous versions as follows. Definition 1.1 (undirected case). Throughout this text, we will refer to the physical network as the base graph G = (V, E) with node set V and edge set E. G is an undirected multi-graph which may contain parallel edges, but no loops. In G, every edge is associated with a nonnegative cost coefficient c : E → R+ . We will always assume that G is connected (otherwise we consider the individual connected components). The requested connections are called the demand graph H = (T, D), T ⊆ V . An edge d = {s,t} ∈ D is called a demand where s,t ∈ T are its terminals. With respect to each other, s and t of the same demand are called partners. H, too, is a multi-graph without loops. A contiguous edge sequence connecting two nodes s,t ∈ V through G is called an s-t-path . All paths we are concerned with are simple, i. e., only consecutive edges may share a node, no repetitions are allowed along the sequence. For convenience, we define an open s-t-path P ⊆ V ∪ E to contain its edges and their inner intersection nodes, but not the end nodes s,t. A closed s-t-path contains its end nodes and is denoted by the symbol P := P ∪ {s,t}. If an s-t-path connects a demand d = {s,t}, we also call it an embedding of d. The cost of a path P is defined as c(P) := ∑e∈P c(e). Definition 1.2 (directed case). We also consider the physical network as a directed base graph G = (V, A) with node set V and arc set A. It is a multi-graph which may contain parallel arcs, but no loops. In G, every arc is associated with a nonnegative cost coefficient c : A → R+ . We will always assume that G is connected. The requested connections are called the demand graph H = (T, D), T ⊆ V . An arc d = (t, s) ∈ D is called a demand where s,t ∈ T are its terminals. With respect to each other, s and t of the same demand are called partners. H, too, is a multi-graph without loops. A contiguous arc sequence connecting two nodes s,t ∈ V through G is called an s-t-path . All arcs in P must be oriented from the same end node to the other. Paths are always simple. If an s-t-path connects a demand d = (t, s), the arcs must be oriented from s to t. The notions of open and closed s-t-path , respectively, are defined analogously to the undirected case. The cost of a path P is defined as c(P) := ∑a∈P c(a). Definition 1.3 (embedding). A given pair (G, H) is an instance of the problem in question. G and H have to be simultaneously directed or undirected. A routing of all demands of H through G is called an embedding of H into G. An embedding is said to be disjoint if all its paths are mutually disjoint (to be stated more precisely below). In this thesis, we will investigate in detail various mathematical aspects of the following problem: Minimum Cost Disjoint Paths Problem (MCDP) Given a base graph G with node set V and costs c, and a demand graph H = (T, D) with node set T ⊆ V . Find a disjoint embedding of H into G at minimum cost, i. e., for each demand d ∈ D specify a connecting path Pd such that min
∑ c(Pd )
d∈D d
′
s. t. P and Pd are disjoint for all d, d ′ ∈ D, d 6= d ′ .
CHAPTER 1. INTRODUCTION
6
For any instance (G, H), we will ask for only one optimal disjoint embedding and not require to produce all of them, in case there are more than one. This problem arises in three slightly different versions, making precise the mutual disjointness condition: ′
edge-disjoint: Pd ∩ Pd ∩ E = ∅ Only the edges in the paths are relevant. ′
arc-disjoint: Pd ∩ Pd ∩ A = ∅ Only the arcs in the paths are relevant. ′
node-disjoint: Pd ∩ Pd = ∅ Note that one path is closed, since the two paths may share common end nodes but no end node may be an inner node of another path. The former two cases correspond to the lower sophistication level of reliability, the latter to the higher. Indeed this case is stronger than the other two, since this condition involves the paths’ nodes in addition to the edges/arcs. Therefore node-disjointness implies edge-disjointness/arc-disjointness, respectively. The arc-disjoint case differs from the edge-disjoint case as can be seen when an undirected instance is equivalently transformed into a directed one by replacing the edges, cf. Figure 1.6: one edge becomes a small subgraph and is not equivalent to two antiparallel arcs. An edge may be contained in at most one path while the two arcs are distinct and may be respective parts of two arc-disjoint paths.
→
undirected
6⇔
directed
not equivalent!
Figure 1.6: Transformation of an undirected instance to a directed one.
Questions About Feasibility For a given (MCDP) instance, the case may arise that the demands cannot be disjointly embedded. Figure 1.7 shows such a case. t1
s1 a s2
t2
Figure 1.7: No disjoint routing exists, as the paths for both (coloured) demands had to share the arc a. Definition 1.4. We call all (MCDP) instances (G, H) permitting at least one disjoint embedding of H into G feasible, otherwise infeasible. The notion of (in)feasibility refers to structural properties of the two input graphs and is irrespective of a cost function.
1.3. EXAMPLE INSTANCES
7
Of course, most infeasible instances are not as obviously structured as the one above. So we will consider the infeasible case in Chapter 5 more closely and ask three questions: 1. Can we quickly decide whether an instance is feasible? 2. How can we add arcs and nodes to the base graph in order to achieve feasibility? 3. How can we take away demands from the demand graph so that a maximum number of remaining demands can be disjointly embedded (Maximum Disjoint Paths Problem)? In this thesis, we will investigate in detail the mathematical aspects of the problem (MCDP) in all four combined versions, directed and undirected, node-disjoint as well as edge-/arc-disjoint. On this way, we will find criteria for feasibility as well as develop algorithmic solution strategies for obtaining optimal solutions acceptably fast. In addition, we introduce the concept of dependences (Chapter 3) that allow us to model reality in more detail.
Topics Not Covered Several topics exists around the core problem of disjoint routing. So a word is in order as to what we do not treat is this work. • It is important that we specify the terminal set T ⊆ V of the demand graph in advance. The problem arising from omitting this information is called the Subgraph Homeomorphism Problem [LR78, Asa85]. It asks for finding a disjoint embedding of all demands “somewhere” in the base graph. This is a different line of research from ours. • Our work is about reliability, not robustness, i. e., “good” behaviour in case of failure. The latter could be easily achieved, for instance, by computing two mutually disjoint routes for each demand. Under any one trunk fault, the demands stay all connected. The expense, however, is the reservation of twice the capacity for each demand. • Large portions of the telecommunication network literature are concerned with the dimensioning of networks, i. e., the allocation of (costly) transmission capacity to individual trunks. In our context, the trunks all have given, fixed capacities at no cost. • An abundance of considerations has attracted the Restoration Problem which states how to reconnect logical network links in case of some (well-defined) failure scenarios. We do not reroute any traffic, but regard the underlying networks as operable. • Except for remarks on obvious opportunities we go no deeper into the aspects of parallel computation. This setting is surveyed in [GV95]. • Rather recently, several authors have taken up the topic of approximating disjoint paths in various settings. Since we are only interested in exact solution methods, we will leave them uncited altogether. The interested reader is referred to [Kle96, Kol98, KS98] for a good starting and [CEO03, CKS04, Kle05] for examples of current research. • Newer branches of research include online algorithms for Disjoint Paths Problems [KS04], i. e., a context where the demands are given over time and their (disjoint) routings are to be handled immediately without the option of waiting until all input data is at hand.
1.3 Example Instances We performed extensive experiments on a testbed from or close to real-world situations. It is presented with graphical images in Appendix B (p. 250). We will use some of them as illustrations throughout this text and as testing objects for all the algorithms we are introducing. The associated cost functions are not shown, but are chosen reasonably with respect to natural distances in the base graphs. The instances are given generic names of the type
CHAPTER 1. INTRODUCTION
8
[ne]
.
The letters ‘n’ or ‘e’ mean node-disjoint or edge-disjoint, respectively. Whenever we write an instance name with an ‘x’ instead, we refer to both disjointness modes.
Demonstration Instance There are is a small undirected toy instance that does not challenge our algorithms technically. It serves the sole purpose of illustrating them throughout our descriptions. Here it is: 19 nodes 37 edges
Figure 1.8: Toy instance demo37x3.
Telecommunication Instances Since our main motivation stems from telecommunication applications, we have a major instance family from this area. They are all undirected. All instances are defined on their own base graphs which occasionally happen to be identical. Examples include the instance tele354x19 from Figures 1.1 and 1.2. Figure 1.9 shows another.
Figure 1.9: Instance tele978x16 with parallel demands. We shall remark here that these instances also contain dependences which are to be introduced in Chapter 3 (p. 25).
1.3. EXAMPLE INSTANCES
9
Random Instances We also considered random instances of a certain class. The base graphs are undirected and almost planar, i. e., after deletion of a few over-crossing edges. As disjoint routing by tendency becomes more difficult in sparse graphs, we get good evaluations of our algorithms’ performances. Technically, the instances were generated by putting n random nodes into the real square [0, 1000]2 and computing a Delauney triangulation on them, delivering most edges. The resulting graphs were planar and thus contained at most 3n − 6 edges (after a theorem of Euler). We subsequently filled up to 3n by random, non-duplicating edges. All edges were assigned rounded Euclidean distances as their costs. Figures 1.10 and 1.11 show the typical random instance rand300e15 as input graphs and optimal feasible solution.
Figure 1.10: Instance rand300e15, input graphs.
Figure 1.11: Instance rand300e15, optimal feasible solution.
For each base graph, we designed two demand graphs, a large one rand*e* for the edge-disjoint case and a smaller one rand*n* for the node-disjoint case. This was necessary, when none of the large demand graphs turned out to be node-disjointly feasible. (They nevertheless serve as inputs for the Demand Selection Problem, Section 5.3.) The ‘*’ are again wildcards for digits indicating the numbers of edges and demands, respectively. As terminals we chose only nodes bordering the infinite outer region in order to force rather long paths and make disjoint routing nontrivial.
CHAPTER 1. INTRODUCTION
10
Stacking Instances Another application comes from the steel industry. Put in a nutshell, it comes from the following context. The end products of primary steel production are so-called slabs, slim massive cuboids containing several tons of steel each. After being rolled into shape and still hot, they are transferred to a slab yard and stacked up for cooling. When ready for transportation, not all of them are being demanded out of the yard, but often ones that lay somewhere inside some stacks. So a frequent operation during the work day is the restacking of slabs in order to free the ones that are needed. One forklift is assigned to this task which can only make one move after another. A special case is the following Slab Restacking Problem: Given:
a stack of k slabs numbered in some arbitrary order, three empty stacks. Wanted: a reordered stack where the slabs occur in ascending number order.
This apparently easy task is complicated by three restrictions: 1. all movements have to respect the stack property: only the uppermost slab on a stack may be moved. 2. only the given four stacks are available, two of which are the input and output stacks, respectively. 3. the total number of movements must be a minimum. Figure 1.12 illustrates on six slabs how we cast this problem into the disjoint paths instance named slab402n6. The four grid subgraphs model the four stacks: the left one is the input stack, the right one is the output stack, and the upper and lower ones represent the two buffer stacks. On the left hand side, each terminal corresponds to one slab in the input stack, following the given (arbitrary) order. Analogously, the terminals on the right hand side signify the reordered stack. As a matter of clear arrangement, the output stack is reversed. Each demand connects the position (terminal) of one slab before with the position (terminal) of the same slab after all movements. The diagonal array of nodes is intermediate in all physical movements between the stacks. They each signify one possible action of the forklift. All directed base arcs model the tick of time during the restacking process: crossing one arc increases time by one unit, i. e., the time needed to perform one elementary move. The undirected edges are understood as a pair of two antiparallel arcs. All arcs within the stacks mean no physical movement and carry zero costs while the arcs incident to the diagonal nodes all cost 0.5. So crossing one of these nodes in either manner costs one unit. A feasible solution is a node-disjoint embedding of all demands into the base graph. Every path in it describes the handling of its corresponding slab during the reordering process. An optimal solution also minimizes the usage of the middle nodes, i. e., the number of elementary movements between the stacks. Figure 1.13 shows an optimal solution to the input instance in Figure 1.12. The stacking instances come in three sizes of 6, 7, and 8 slabs. In order to make the instances more difficult, the lowest input slab is always one of the lowest output slabs. The other demands are assigned at random, not too trivially.
1.3. EXAMPLE INSTANCES
intermediate stack
11
output stack (reversed)
3 2 5 4 1 6 6 5 4 3 2 1 input stack intermediate stack Figure 1.12: Model graph for stacking instance slab402n6.
Figure 1.13: Optimal solution to instance slab402n6, objective value = 13. The circled nodes in their descending order indicate the elementary forklift movements.
CHAPTER 1. INTRODUCTION
12
Vehicle Routing Instances In modern harbour transshipment centres, goods are reloaded from incoming vessels to outgoing trains or lorries, or vice versa. Freight volumes have long exceeded a scale at which human workers can do this job. Typically, driverless automatic guided vehicles haul containers back and forth between quay and depot. They have to be scheduled such that the total throughput of the centre is maximized under the constraint that no two vehicles collide. This is a serious issue, as all vehicles are guided along specific tracks with a planar layout, see Figure 1.14.
Figure 1.14: Typical grid layout of guiding tracks. Vehicles are depicted as green rectangles with a blue head. Safety areas surrounding them are marked by yellow outlines. The relation to the Disjoint Paths Problem comes from the “no collision” constraint. While in motion, each vehicle reserves a safety area in front of it. No other vehicle may enter that area for a certain discrete time window. Modelled in a time expanded directed graph, the routes of all vehicles are static node-disjoint paths. Figure 1.15 shows a (very) small example.
time = 1
time = 0.5
time = 0 Figure 1.15: Time expanded 2x4 grid graph with two time layers (blue, red). The yellow nodes are for intermediate waiting. Our instance family vehi*n* represents such graphs from the context of a project with Container Terminal Altenwerder in Hamburg. They consist of different sizes of track meshes, time slots, and vehicle routes. These instances are by far the largest we have investigated. More on this topic can be found in [K¨uh08].
1.3. EXAMPLE INSTANCES
13
A Puzzle Instance As a fun aside, we noticed that disjoint paths problems have even become popular in the puzzle industry. Figure 1.16 gives one instance with node-disjoint solution.
c CrocoPuzzle
Figure 1.16: Node-disjoint puzzle instance puzz448x22 with solution. This instance is “large” among the ones available, since it is certainly challenging for a human mind. For our solvers it proved easy and solved in less than two seconds. So we did not work on with this instance family.
Chapter 2
Theoretical Results We do not go into detail at this point and defer the actual modelling to Chapter 4 (p. 34). In this chapter, we present results from the research literature. Most contributions treat the disjoint embedding problem as a decision problem, which we call the Edge-, Arc- and Node-Disjoint Paths Problems, respectively. Many of these results originate from the context of (planar) VLSI routing. Edge or arc costs and optimization play a minor role so far. The following notions and symbols are fundamental within this chapter: Definition 2.1 (undirected case). The superposition graph G + H is defined as (V, E ∪ D). Note that this is possible due to T ⊆ V . Like G and H, the superposition graph may contain parallel edges. In particular, parallel edges in E and D are not identified. ˜ = (T, D) ˜ the demand graph H where all parallel demands of D, i. e., those with both We denote by H terminals being identical, are replaced by one single demand for these terminals. All edges incident in G to u ∈ V form the incidence set δG (u) := { {u, v} ∈ E | v ∈ V } of u. The cardinality of this set is called the degree of u: degG (u) := |δG (u)|.
A graph G is called Eulerian if all of its nodes have an even degree, i. e., degG (u) mod 2 = 0 for all u ∈ V.
Definition 2.2 (directed case). The superposition graph G + H is defined as (V, A ∪ D). The superposition graph may contain parallel arcs. In particular, parallel arcs in A and D are not identified. ˜ = (T, D) ˜ the demand graph H where all parallel demands of D, i. e., those with same We denote by H terminals and orientation, are replaced by one single demand for these terminals. Antiparallel arcs (s,t) and (t, s) are not identified. All forward arcs incident in G to u ∈ V form the forward incidence set δ+ G (u) := { (u, v) ∈ A | v ∈ V } + of u. The cardinality of this set is called the out-degree ofu: degG (u) := |δ+ G (u)|. The notions of − backward incidence set δ− (u) and in-degree deg (u) are straightforward for backward arcs. G G A graph G is acyclic if it contains no nonempty directed path from some node back to itself. G is − called Eulerian if all of its nodes have the same in-degree as out-degree, i. e., deg+ G (u) = degG (u) for all u ∈ V. Definition 2.3 (distances). When edge or path costs c play a role, we call a path cheapest if it connects its end nodes at minimum cost among all such paths. We denote this minimum value by distcG (s,t). We call a path shortest if it has got a minimum number of edges/arcs, and write its length as distG (s,t).
2.1 NP-Completeness Theorem 2.4. The undirected Node-Disjoint Paths Problem as a decision problem is NP-complete 14
2.1. NP-COMPLETENESS a) b) c)
15
in general [Lyn74, Kar75], see also [GJ79] prob. ND40. even if G is a grid graph [KvL84, FW91]. even if G + H is planar [MP93]; this holds even if the maximum vertex degree in G + H is restricted by three.
Lynch, Karp, as well as Middendorf and Pfeiffer prove Theorem 2.4 a) and c) by reducing the wellknown problem 3SAT [GJ79] to the Node-Disjoint Paths Problem. A grid graph is a subgraph of a planar grid. Theorem 2.5. The undirected Edge-Disjoint Paths Problem as a decision problem is NP-complete a) b) c) d) e)
in general [Kar75]. ˜ = 2 [EIS76]. even if |D| ˜ ≤ 3 [Vyg93]. even if G + H is Eulerian and |D| even if G + H is planar [MP93]. even if G is a grid graph [KvL84].
Even, Itai, and Shamir reduce the problem SAT [GJ79] to the Edge-Disjoint Paths Problem, proving Theorem 2.5 b). Vygen refines in Theorem 2.5 c) an earlier result of Middendorf and Pfeiffer [MP93] by adding the second condition. He shows Theorem 2.7 c) first and concludes Theorem 2.5 c) via a lemma admitting to neglect the orientations. Middendorf and Pfeiffer deduce Theorem 2.5 d) directly from Theorem 2.4 c), based on the fact that the edge- as well as the node-disjoint planar problems coincide when the maximum vertex degree is restricted by three. Marx [Mar03] refines this result and shows NP -completeness even if G is a rectangular grid graph. Theorem 2.6. The directed Node-Disjoint Paths Problem as a decision problem is NP-complete a) b) c) d)
in general [Kar75]. even if |D| = 2 [FHW80]. ˜ = 2 [EIS76, LR78]. even if G is acyclic and |D| even if G + H is planar [Vyg93].
The result Theorem 2.6 b) is surprising, given that the corresponding undirected versions are polynomially solvable, cf. Section 2.4. Even, Itai, and Shamir show Theorem 2.7 c) first less the acyclic assumption, but constructed their reduction via an acyclic graph. Together with a result of LaPaugh and Rivest — stating that the arc-disjoint and node-disjoint cases are polynomially equivalent — Theorem 2.6 c) follows. Vygen derives Theorem 2.6 d) from Theorem 2.4 c) by transforming all undirected edges according to Figure 1.6 (p. 6), thereby preserving planarity. Theorem 2.7. The directed Edge-Disjoint Paths Problem as a decision problem is NP-complete a) b) c) d) e) f)
in general [Kar75]. even if |D| = 2 [FHW80, LR78]. ˜ = 2 [EIS76]. even if G is acyclic and |D| ˜ ≤ 3 [Vyg93]. even if G is planar, G + H is Eulerian and |D| even if G + H is planar [Vyg93]. even if G is planar and acyclic [Vyg93].
Fortune, Hopcroft, and Wyllie actually show Theorem 2.6 b) only. Together with the already mentioned result of LaPaugh and Rivest Theorem 2.7 b) follows. Vygen deduces Theorem 2.7 d) from Theorem 2.7 c) via a polynomial construction. He derives Theorem
CHAPTER 2. THEORETICAL RESULTS
16
2.7 e) from Theorem 2.5 d) by the same transformation as above, cf. Figure 1.6 (p. 6). In the proof of Theorem 2.7 f), he reduces the problem SAT [GJ79] to the proposed one. The NP -hardness of the optimization problem (MCDP) in all disjointness modes follows immediately from the above theorems. Theorem 2.8. The Edge-Disjoint Paths Problem as the optimization problem (MCDP) is NP-hard even if G is planar, G + H is Eulerian, all terminals lie on the boundary of one common region, the maximum node degree is restricted by four, and all edge costs are uniformly equal to one [BNW96]. Brandes, Neyer, and Wagner reduce 3SAT to the problem in question. Theorem 2.8 represents a case where the cost optimization of disjoint paths is NP -hard whereas the associated decision problem is of polynomial order, cf. Theorem 2.21 (p. 23) below. Eilam-Tzoreff [Eil98] considers the variant that all (disjoint) paths must be shortest paths with respect to some cost function. This problem is NP -hard in all disjointness modes, even so on planar graphs with unit edge costs. The theorems in this section strongly indicate that the problem (MCDP) is “hard” to solve even in very restricted situations. Hence, in the broad generality of our problem definition, we cannot expect to find polynomial time exact algorithms for it unless P = NP.
2.2 Feasibility Criteria There is another way of stating the Disjoint Paths Problem under consideration. When we are given a simple s-t-path P embedding some demand d = {s,t} ∈ D in G, we produce a simple cycle in G + H by adding the edge d to P, cf. Figure 2.1. G
s d t
Figure 2.1: Adding a demand {s,t} to an s-t-path closes a cycle. Let C D be the set of all cycles in G + H which contain exactly one edge from D. We now associate each such cycle C ⊆ E ∪ D with an incidence vector yC ∈ {−1, 0, 1}|E|+|D| of its edges: 1 yC (e) := −1 0
if e ∈ C ∩ E, if e ∈ C ∩ D, otherwise.
By arranging the vectors yC induced by all cycles C ∈ C D as column vectors, we obtain an integer matrix M ∈ {−1, 0, 1}(|E|+|D|)×|C D| . Furthermore, we define a vector b ∈ {−1, 1}|E|+|D| by ( 1 if e ∈ E, b(e) := −1 if e ∈ D.
2.2. FEASIBILITY CRITERIA
17
Then S ′ := { x ∈ {0, 1}|C D | | Mx ≤ b } is a superset of all feasible solutions for the Edge-Disjoint Paths Problem (note that multiple cycles Cid containing the same demand edge d are allowed if Cid ∩ E are mutually disjoint for all i). We enlarge this set further by relaxing integrality:
S := { x ≥ 0 | Mx ≤ b } ⊇ S ′ . Clearly, S ′ 6= ∅ only if S 6= ∅, so the latter is a necessary condition for the feasibility of our Edge-Disjoint Paths Problem. Lemma 2.9 (Farkas [Far02]). Exactly one of the two sets S and T := { w ≥ 0 | wM ≥ 0, wb < 0 } is empty. Evaluating T , we see, by the definitions of M and b, wM ≥ 0
⇔ ⇔
wb < 0
and thus
∑ w(e) yC (e) d
e∈Cd
≥ 0
∑
w(e) ≥ w(d) for any d ∈ D and all Cd ∈ C D : Cd ∩ D = {d}
∑
w(e) b(e) < 0
e∈Cd −d
⇔
e∈E∪D
⇔
e∈E
∑ w(e)
21 |V | log |V | which is not satisfied for any of our example instances. Parker and Ryan [PR94] give an exact Branch-and-Bound type algorithm for the general Bandwidth Packing Problem. (We expand more on their ideas in Section 6.3 (p. 62).) We have gone our own way here, as we wanted to refine the demand selection problem as follows.
CHAPTER 5. FEASIBILITY ISSUES
54
Definition 5.1. Let p : D → N be a function associated with the demands of H. We call p(d) the priority of d ∈ D. Priorities mean precedences of demands over each other: the higher the priority value, the higher the precedence. Priorities afford the planner some influence on the choice from the demands in the case when not all of them are simultaneously routeable. The problem to be solved now reads: Prioritized Demand Packing Problem (PDP) Given an instance (G, H) of the Disjoint Paths Problem where the demands carry priorities p. Find a largest possible subset Dmax ⊆ D such that 1. the instance (G, H[Dmax ]) possesses a feasible solution, and 2. no omitted demand d ′ ∈ D \ Dmax becomes embeddable if all demands with lower priorities are removed from Dmax , i. e., the instance (G, H[D′ ]) is infeasible where D′ := { d ∈ Dmax | p(d) ≥ p(d ′ ) } + d ′ . We adhere to our Unified Model (IPp) (p. 50) for the solution of this task. To this end, we modify the input graphs as described below.
Arc-Disjoint Case As in Section 5.1, we add the opponents of all demands to their respective base graphs and carry out the computations on the augmented instance (G + H, H). We assume w. l. o. g. that all occurring demand priorities lie contiguously in the range 1, . . . , m := maxd p(d), since only their order relations are significant. Let D p := { d ∈ D | p(d) = p } denote the set of demands with priority equal to p. Further let α ∈]0, 1[ be a constant attenuation factor. We want to assign to all demand opponents induced by D p identical costs of c p such that the added costs of all opponents with lower priorities are less than c p . This way, we ensure that the minimization process enforces the condition 2. of (PDP). So we stipulate the following: |D1 |c1 = α c2
|D2 |c2 + |D1 |c1 = α c3 ...
m−1
∑ |D p|c p
= α cm .
p=1
By resolution and insertion, these equations can be rewritten as α c2 c1 := |D1 | α c2 := c3 |D2 | + α ... α cm . cm−1 := |Dm−1 | + α The resulting values are computed recursively upwards, starting with the lowest one cm−1 . This leaves us the coefficient cm of the highest priority as a free parameter. We use this degree of freedom for two choices:
5.3. SELECTING DEMANDS
a)
b)
55
We can set the costs of the G-arcs uniformly to zero and cm := 1. This is a generalization of the situation in Section 5.1, where we had set c(d) = 1 for all d ∈ D. Implicitly, we had given all demands the same priority. We can leave the costs of the G-arcs as given and set cm := 1 for the recursion. Subsequently, we rescale all c p by the factor U/c1 where U is some valid upper cost bound. (This effectively sets c1 := U and all other c p larger.)
Choice a) retains the property that any positive lower bound indicates the infeasibility of the instance (G, H). We can terminate if we want to know only that. Carrying out the B&B optimization, the rising lower bound value L gradually reveals more information on the selectable demands. For instance, we know that ⌊L⌋ demands of the highest priority m cannot be feasibly embedded. This is due to the cost assignments: the optimal objective can only exceed a natural number k if at least k demands of highest priority must use their respective demand opponents with costs of one. So we can preset an appropriate upper bound in order to check whether a feasible solution with a certain priority structure exists. The drawback of a) is the same as in Section 5.1: the zero costs on the base arcs cause slow performance of the path generation routines. Alternative b) is less intuitive in the interpretation of the lower bounds L, but it affords us two advantages: it avoids the performance degradation of a), and we solve a combination of (PDP) and (MCDP) in the same run. We not only determine an optimal selection of demands, but also get their min-cost disjoint embedding. All we have to do as a follow-up is to drop the unembedded demands from the solution and subtract their respective costs c p from the objective.
Node-Disjoint Case In principle, there is no difference between the arc- and node-disjoint cases, since both are covered by our Uniform Model (IP). But concerning feasibility with priorities, there is one to be made. Recall that in Section 4.2.3 (p. 38), we eliminated the constraint
∑ ∑
(∗)
x(a) = deg− H (v) if v ∈ TH
d∈D a∈δ+d (v) G
by redefining the d-layers: if s was a common terminal of some demands Ds ⊆ DH but not of d ′ , we ′ ′ eliminated the copy sd from the layer Gd . The problem with this is: if none of the demands in Ds is embedded, their terminal s is no longer occupied and so must be again available to the other demands. Hence, we can no longer make this a priori elimination. In the sequel, we discuss how to handle this difficulty. The demand set D falls into three classes with respect to a terminal s: D+ s := { d ∈ D | d = (s,t) }
D− s := { d ∈ D | d = (t, s) } − D′s := D \ (D+ s ∪ Ds ) .
Consider the layered base graph G of the original base graph G. We leave the copies of s in all layers. In all layers of D′s , the node s is a non-terminal and we have a normal node-disjointness inequality: (5.1)
∑ ∑
d∈D′s a∈δ+d (s)
x(a) ≤ 1 .
G
+
If now any demand d + ∈ D+ s is embedded through its layer (i. e., not over the direct arc d ), then the + node s is occupied and we must capture this fact by enhancing the inequality by layer Gd : (5.2)
∑
∑
d∈D′s +d + a∈δ+d (s) G
x(a) ≤ 1 .
CHAPTER 5. FEASIBILITY ISSUES
56
Note that we are in G and the demand opponents have not yet been added as base arcs, so they are not contained in δ+ (s). Since the embeddings of the demands D+ s are necessarily not node-disjoint in s, we Gd + ′ cannot extend the d-sum to Ds ∪ Ds , but have to have one such inequality (5.2) per member d + ∈ D+ s . + + If demand d is embedded by its opponent d , then from the perspective of G , it is not present at all. + Thus, the arc d need not be included in any inequality. − The case of demands D− s is analogous: for each of its members d , we have an inequality of the form
∑
(5.3)
∑
d∈D′s +d − a∈δ−d (s)
x(a) ≤ 1 .
G
The only difference to (5.2) is the backward neighbourhood δ− instead of the forward neighbourhood δ+ . In contrast to the normal node-disjointness constraint — where one of the two was sufficient — we have − to differentiate here between them, because the demands in D+ s and Ds originate in s and thus use only one in- or out-arc, not one of each. − So resolving the availability of a terminal s amounts to inserting |D+ s ∪ Ds | many clique inequalities into the constraint family for every terminal node s. Equivalently, we can understand this as a splitting − of s into one copy sd per demand d ∈ D+ s ∪ Ds according to Figure 5.4. These new nodes are then connected by a directed path Ps in arbitrary order. The in-arcs of s go into the tail node of Ps , the out-arcs of s come out from the head node of Ps . This path is to be inserted into all layers of D′s .
G G1
G d1
u
d1
u G2
Ps
s d2
s1
v
d2 s2
v Gd d ∈ D′s
Figure 5.4: Splitting a common terminal in the node-disjoint case. The d-layers with d ∈ D+ s only get the new node sd as their copy of s. It is connected by out-arcs to the forward neighbourhood δ+ (s) (here the single node v). Analogously, the layers with d ∈ D− s are connected to the backward neighbourhood δ− (s) (node u) by in-arcs. Each node sd induces a nodedisjointness inequality on the corresponding neighbourhood and so we get back (5.2) and (5.3). Note that this works since the path Ps carries the combined x-flow of (5.1), left hand side, in all of its arcs. − How about the mutual disjointness of the embeddings of D+ s ∪ Ds ? Since they all occur in different inequalities, his may be an issue. But not much. Back in Section 4.2, we saw that arc-disjointness is implied by the node-disjointness if only one end node of an arc is non-terminal. The reason is that the arc inequality is dominated by the node inequalities of both end nodes. Yet, we had the rare case of Figure 4.4 (p. 40) where both end nodes were terminals of the same demand. There, we had to spend an additional arc inequality.
The same holds true in our setting here. We only have to take care of the arc-disjointness between the − embeddings of D+ s ∪ Ds if demands are parallel and their terminal partners are neighbours. Otherwise, the other end nodes u of the arcs (s, u) or (u, s) are nonterminals in the sense of (5.1) and carry at least the disjointness on D′u .
Part II
Algorithmic Solution Techniques
57
Chapter 6
Branch-and-Bound Solver In Chapter 4 (p. 34), we have presented the principal process for transforming the given input data — the base graph G = (V, A), the demand graph H = (T, D), and a dependence family A dep ⊆ 2A — into the layered base and demand graphs G , H , and a constraint family A . These output data then enter the Unified Model (IP) (p. 37) or its arc-path version, Model (IPp) (p. 50). This model is the basis for all our practical solution attempts. In particular, we now always mean the layered input graphs and do not mention this fact explicitly except where needed.
6.1 The General Scheme This section covers the high-level algorithmic description of our solution to the Unified Model. In general, a Branch-and-Bound approach is an implicit enumeration scheme in the form of a search tree. This tree is built up implicitly, the vertices of current interest are being maintained in a working set W . The goal is to identify a leaf satisfying a desired optimality property. Definition 6.1. Let Π denote the problem space under consideration, i. e., the set of all possible instances. For an instance π ∈ Π, the symbol X(π) means the state space, i. e., the set of all decision variables characterizing π. Every instance π is associated with an objective function c : X(π) → R+ . A state vector x ∈ X(π) may encode a feasible solution for π or not, in which case we call x feasible or infeasible, respectively. A testing function NC : Π → {true, false} accepts an instance π and returns whether some necessary criteria for feasibility of π are satisfied. An upper bound function UB : Π → R+ has the property that UB(π) ≥ c(x∗ ) for all optimal feasible solutions x∗ ∈ X(π). An upper bound function may also deliver a state vector xUB ∈ X(π) which may be feasible for π or not. If xUB is feasible, then UB(π) = c(xUB ). A lower bound function LB : Π → R+ has the property that LB(π) ≤ c(x∗ ) for all optimal feasible solutions x∗ ∈ X(π). A lower bound function may also deliver a state vector xLB ∈ X(π) which may be feasible for π or not. If xLB is feasible, then LB(π) = c(xLB ). Algorithm BranchBound exhibits the general scheme. We start with no results xS ,W,U about the given instance π. First, in step (Bd1) we check whether π is at all admissible, i. e., satisfies necessary criteria as well as LB(π) ≤ UB(π). If so, the empty working set W is initialized with π in step (11). Otherwise, W is left empty, the while loop is never entered, and the 0-state vector xS is immediately returned. We assume that the zero vector is infeasible for π. Otherwise, we choose some infeasible xS as initializer. If W was initialized, the loop iterates over W by choosing one member at a time according to some choosing strategy in step (Ch). The selected instance π′ is split up into a certain number of parts πi using 58
6.1. THE GENERAL SCHEME
BranchBound( π )
Algorithm 2 Input: Output:
59
general scheme, minimization version
instance π ∈ Π with objective function c optimal feasible solution to π or the 0-state vector if π is infeasible
initialize xS := 0 initialize W := ∅ initialize U := ∞ (Bd1) makeUpdates(π) (Ch)
while W 6= ∅ do choose π′ ∈ W, W := W − π′
(Br)
split π′ into n = n(π′ ) subproblems π1 , . . . , πn
(Bd2)
for i := 1 to n do makeUpdates(πi ) endfor
(Bd3)
W := { π′ ∈ W | LB(π′ ) < U } endwhile
{ no solution known } { no current instance } { current best upper bound } { initialize W } { choosing rule } { branching rule } { update W } { trim W }
return xS makeUpdates(π′ ) Input: an instance π′ ∈ Π with objective function c Output: xS , W , U possibly updated (1) (2) (3) (4) (5) (6)
if NC(π′ ) = true then compute LB(π′ ) with state vector xLB
{ π′ satisfies necessary criteria }
if LB(π′ ) < U then { otherwise π′ too costly } if xLB is feasible for π′ then U := LB(π′ ), xS := xLB { update U, xS } else compute C := UB( π′ , xLB ) with state vector xUB if U > C then if xUB is feasible for π′ then U := C, xS := xUB else U := C + ε endif endif
(7) (8) (9) (10)
W := W + π′
(11) endif endif endif
{ update U, xS } { update U only }
{ update W }
CHAPTER 6. BRANCH-AND-BOUND SOLVER
60
a branching strategy in step (Br). The πi partition the solution space of π in some way. It is crucial that all these parts be again instances of the same problem class Π, so we need only one fixed set of subalgorithms suited for handling them. After generation, the subinstances πi are individually tested for admissibility in step (Bd2) and added to W as the case may be. The algorithm performs the better the fewer πi pass this test. Inside the testing routine makeUpdates(), the global upper cost bound U was possibly updated, so we can also update W in step (Bd3) by reducing it to all its members π′ with lower bounds LB(π′ ) < U. This latter step, called trimming, can accelerate the performance significantly when only instances with LB(π′ ) ≥ L are left in W and eventually an optimal solution with objective value U = L is found. The working set W then totally empties and the algorithm terminates. Even when an optimal solution has been found, the procedure may still take considerable time completing the examination of all remaining elements of W . This work has to be carried out in order to establish the optimality proof of the current known best solution xS . If this takes us too long, we may waive this certificate at any stage and accept xS as an approximation. Its quality q at any time is given by (6.1)
q :=
U −1 L
where L := min LB(π′ ) . ′ π ∈W
The number L represents a valid global lower cost bound on π, i. e., L ≤ OPT(π). We may even preset a certain quality tolerance value q0 ≥ 0 and terminate when the condition (6.1) exceeds it no longer, i. e., q ≤ q0 . As can be seen in the main part of Algorithm BranchBound, the essential tasks in devising a Branchand-Bound Method are the tagged ones: (Ch) (Br) (Bd)
Choosing: Branching: Bounding:
How do we choose the next subinstance to be branched from? How do we divide the state space in a subinstance? How do we efficiently calculate NC, LB, UB for a subinstance?
We do not differentiate between (Bd1), (Bd2), (Bd3), since all three play the same role of bounding and rely on the same mechanism, the subroutine makeUpdates(). All of these tasks have to be carefully adapted to the problem at hand, see also [BG79b]. In the following sections of this chapter, we present our methods for filling in the semantics of (Ch) and (Br). The techniques for (Bd) are much more elaborate and justify their own chapters as announced above.
Assessing Admissibility The logic in subroutine makeUpdates() is as follows. In step (1), we check whether π′ satisfies some structural necessary criteria. In Section 2.2 (p. 16), we have discussed the theoretical aspects of such criteria and in Chapter 7 (p. 68), we will devise the algorithms behind the function NC. If this test fails, the routine immediately returns false. As the next step (2), we compute a lower bound LB(π′ ) on the optimal objective value of π′ . We devote the entire Chapter 10 (p. 129) to the task of providing strong lower bounds. If LB(π′ ) ≥ U, there is no need to proceed, since π′ possesses no feasible solution with less cost than the currently known best one. So if the condition in step (3) fails, false is returned. Otherwise, we check whether the state vector xLB also delivered by the lower bound function describes a feasible solution to π′ (step (4)). If so, it must be an optimal solution, since it is both a lower and upper bound at the same time. Consequently, we update the best known solution and upper bound in step (5). Note that the satisfied if-branch (4) leads to a false-return, since we know the optimal objective of π′ and there is no further need for investigation in the main routine.
6.2. CHOOSING STRATEGIES
61
In the case xLB is of no help, an upper bound maybe is. In step (6), we compute a valid upper bound C = UB( π′ , xLB ) on π′ . The methods for doing so are presented in detail in Chapter 9 (p. 101). If this value improves on the current best upper bound U (step (7)), we can update at least U (step (10)), maybe also xS (step (9)), depending on whether or not the state vector xUB from the bound calculation represents a feasible solution to π′ (step (8)). Note the addition of a small ε > 0 in step (10). This reflects the fact that the number C does not belong to a feasible solution we also have. So we have to leave some room for eventually detecting a solution with objective value C. After this block, π′ has passed all checks and is declared “admissible” by the return value true in step11. Practical Remark 6.2. The function UB can work more efficiently if it also gets the current upper bound U as an input value: (6′ )
compute C := UB( π′ , xLB , U ) with state vector xUB
The reasons will become clear in Section 9.5 (p. 123). The function LB can work more efficiently if it gets the same arguments as UB as input values: (2′ )
compute LB( π′ , xLB , U ) with old state vector xLB from its parent instance
The reasons are given in Remark 10.4 (p. 137).
Working Set Dominance The presentation up to here was abstract and is valid for all combinatorial minimization problems amenable to the Branch-and-Bound Method. Taking into account the special structure of our Disjoint Paths Problem, we refine the logical management of the working set W . It is possible that new subinstances π′ = (G ′ , H ′ , A ′ ) are inserted into W which are being dominated by older ones π′′ = (G ′′ , H ′′ , A ′′ ), or vice versa. This is the case when (6.2)
G ′ ⊆ G ′′ and H ′ = H
′′
and A ′ ⊆ A ′′ .
The last condition, A ′ ⊆ A ′′ , is meant in a somewhat broader sense: for every A′ ∈ A ′ there exists a set A′′ ∈ A ′′ with A′ ⊆ A′′ . So there might be even less, but larger, sets in A ′′ .
The lower bound functions LB we use in practice are isotonic in the base graph, i. e., LB(π′ ) ≥ LB(π′′ ) under Condition (6.2). Thus, the subinstance π′′ will be chosen from W before π′ when we order the elements lexicographically with the decreasing sizes of their base graphs as secondary values. But clearly, π′ represents again a subinstance of π′′ and will be represented in some way by the parts that π′′ is split into in step (Br). So π′ is irrelevant for the solution process. It rather makes it more time consuming without a compensating advantage. We have included a dominance checking mechanism into the W -insert operation. Each new memberto-be is examined against all current members of W for the Condition (6.2). If satisfied, the subinstance with the smaller base graph is not accepted, or exchanged for the other, respectively. In the case G ′ = G ′′ , both subinstances are equal and the new one is rejected.
6.2 Choosing Strategies Specifying a choosing rule is a design part of a Branch-and-Bound Method that determines the choice of subinstance to be taken from the working set W in step (Ch). Conceivable strategies are, for instance,
CHAPTER 6. BRANCH-AND-BOUND SOLVER
62 Breadth First:
take the elements in the order they were put in. This corresponds to realizing the set W as a First In First Out queue. There are two main disadvantages to this strategy. Firstly, the choice is “unintelligent”, as it goes by a formal scheme and ignores possible hints as to which elements might be “most promising”. Secondly, it tends to occupy huge amounts of memory for storing the branched subinstances, since in general none of them is taken next.
Depth First:
take the elements in reverse order they were put in. This corresponds to realizing the set W as a Last In First Out queue, or stack. This strategy avoids the demanding memory requirement of Breadth First and needs only so much storage space to hold one path down the search tree at any one time. Yet, it is equally “unintelligent” for obvious reasons, and tends to explore search subtrees extensively, whether they contain optimal solutions or lie far off them.
Best Bound First:
take an element with smallest lower bound value LB among all. This strategy is governed by a priority queue with the LB-values as keys. The idea is to choose a subinstance being most promising in the sense that it appears to leave most room for minimization. So it is sort of “intelligent” in that it considers the W -members individually.
Best Bound First represents an intermediate strategy between the two extremes Breadth First and Depth First. Its memory requirement grows moderately, yet still can be prohibitive when the bounds converge slowly. This is an acceptable expense for the sense of orientation in the search tree it provides. A further advantage: if a better feasible solution is found, the global upper bound U is lowered and W possibly diminished in step (Bd3) of Algorithm BranchBound. By definition, the LB-value of the element taken by Best Bound First always is a global lower bound on the optimal objective of the input instance π. Hence, no subinstances are chosen that would be eliminated anyway later due to a U-update. We have adopted the Best Bound First strategy as our method of choice.
6.3 Branching Strategies Branching means modifying a given instance π = (G , H , A ) in a systematic manner by fixing variables in the state space. The results are a number of subinstances πi = (G i , H i , A i ) whose base graphs are proper subgraphs of G and whose demand graphs may be copies of H or not. The goal of a good branching strategy is to restrict the possible combinatorics of the feasible solutions, thereby achieving better cost bounds. Ideally, a strategy does so with as few branches as possible. Also, it is desirable to disjointly partition the feasible solution set of π. This way, bounding is most effective in that it fathoms the entire solution set of a πi without there being some part of it repeated in another π j . For a concise presentation, we need the following definitions. Definition 6.3. An arc a ∈ AG being used in an embedding is indicated by a setting of its state variable to one: x(a) = 1. Then, according to constraint (ii) of the Unified Model (IP) (p. 37), no other arc a′ sharing some constraint with a can be present in the same embedding: for all A′ ∈ A : a ∈ A′ ⇒ x(a′ ) = 0 for all a′ ∈ A′ − a. We say, a occupies a′ . For any arc a ∈ AG , we let Aocc (a) :=
[ A′ ∈A : a∈A′
A′
6.3. BRANCHING STRATEGIES
63
denote the set of all arcs sharing some constraint with a, including a itself. Thus, Aocc (a) − a is the set of arcs occupied by a. For some subset S ⊆ AG , we extend this definition to Aocc (S) :=
[
Aocc (a)
a∈S
so that Aocc (S) \ S is the set of arcs being jointly occupied by the arcs of S. We have designed two main branching strategies based on different reduction ideas. Before motivating them, we comment on a strategy we did not employ.
6.3.1 Fractional Path Variables Parker and Ryan [PR94] give an exact Branch-and-Bound algorithm for the Bandwidth Packing Problem (cf. Section 5.3 (p. 53)). This problem is a generalization of the Disjoint Paths Problem, so in principle their method is portable to our setting. They use the arc-path version (IPp) of the Unified Model and obtain lower bounds from the LP Relaxation which they solve by Column Generation. In branching, they go the classical way and propose rounding of fractional path variables: Choose a demand d and one of its path variables x(P) with fractional optimal value. Set x(P) := 1 in the first branch. For each arc a ∈ P, generate a separate branch for which x(P′ ) := 0 for all P′ ∈ P d : a ∈ P′ . As the authors write, setting a path variable to one is a strong branch which diminishes the instance by one demand. The other branches, as many as arcs on the path, are comparatively weak ones, since they merely exclude a relatively small subset from the exponential-size path set P d , restricting the remaining choices from it less effectively. As an alternative, Park, Kang, and Park [PKP96] get by with only one 0-branch in setting x(P) := 0. This has the advantage of producing equally many strong and weak branches. In most cases, the weak ones will be selected next by the choosing rule (Ch) and branched further, so the majority of subinstances in W will have resulted from strong branches. In turn, the authors subsequently have to keep track of the chosen paths and to avoid their re-generation. Pinto da Cunha e Alvelos [Pin05] also proceeds along this line. We have not adopted this course of action for three reasons: • Branching on the arcs of a path generates too many weak subinstances. Parker and Ryan report prohibitive memory usage and running times, even if some branches can be fathomed by others from the same branching process. • 0-1-branching on one path variable needs a k-shortest-paths solver [Yen71, Epp98, GMLP01, HMS03] as the column generator. In addition, each subinstance must maintain a list for the forbidden paths whose variables were set to zero. As these lists grow, they use up memory space and the solver must work ever longer until it finds an allowed path. • Devising a k-shortest-paths algorithm is difficult in our context, since we want to accommodate further restrictions on routing as introduced in Section 4.5 (p. 48).
CHAPTER 6. BRANCH-AND-BOUND SOLVER
64
6.3.2 Constructive Branching Strategy Observation 6.4. Every demand d = (t, s) ∈ DH must be embedded using exactly one arc a ∈ δ+ (s), Gd − ′ i. e., incident to its terminal s. The same holds for some arc a ∈ δGd (t). In this observation lies the following rule: Constructive Branching Strategy: Choose a demand d ∈ D and one of its terminals, say the head node s. Also, select a subset B ⊆ δ+ (s) and generate one subinstance for every Gd arc a = (s, v) ∈ B by embedding it as a partial path for d and shifting the terminal to its neighbour v. If we choose the tail node t of d, we must analogously select B ⊆ δ− (t). Every individual branch is thus Gd characterized by the choices of d, s, a. The Constructive Branching Rule fixes the following variables in the Unified Model: (6.3)
x(a) := 1
(6.4)
(s) ∪ δ− (s) − a x(a′ ) := 0 for all a′ ∈ δ+ Gd Gd
(6.5)
x(a′ ) := 0 for all a′ ∈ Aocc (a) − a .
The rule is called constructive, as it prescribes parts of feasible solutions by constructing partial paths (Equation (6.3)). Due to this property, the branching is disjoint. Equation (6.4) sets to zero the variables on all other arcs incident to s within the d-layer, since the embedding path of demand d must not recur to the node s. Equation (6.5) assigns to all those arc variables a 0-value whose arcs are occupied by a. Together with Equation (6.3), this can be interpreted as eliminating Aocc (a) from the graph G . The demand graph H is only slightly modified by the terminal shift s → v and the constraint family A loses all members containing a. So by embedding arc a = (s, v) for its demand d = (t, s), we obtain a residual instance π′ = where
(G ′ , H ′ , A ′ )
(6.6)
G ′ := G − s − Aocc (a) H ′ := H − d + (t, v) A ′ := { A′ ∈ A | a ∈/ A′ } .
A ′ might be further reducible by all members A′ for which |A′ | ≤ 1 in G ′ due to the reduction. Figure 6.1
visualizes this reduction for the arc-disjoint case, i. e., Aocc (a) = { ad | d ∈ D } is the set of the a-copies in all layers. Given d, s, B, step (Br) of Algorithm BranchBound (p. 59) reads: i := 1 for a ∈ B do define πi := (G ′ , H ′ , A ′ ) according to Equation (6.6) i := i + 1 endfor We adopted two variants of the Constructive Branching Rule (formulated here in terms of the head terminal s): C1: select B := δ+ (s), i. e., branch on all forward-neighbours. Gd
6.3. BRANCHING STRATEGIES
G
b Gd
G′
t
d s
65
G′d
a
a embedded
v constraint Aocc (a)
Aocc (b)
t (t, v) v
branch
other
other
layers
layers A′occ (b)
Figure 6.1: Constructive Branching in the arc-disjoint case: the instance (G , H , A ) is reduced to ( G − s − Aocc (a), H − d + (t, v), { A′ ∈ A | a ∈ / A′ } ) after embedding arc a for demand d. C2: select B as a proper subset of the forward-neighbours and additionally generate an extra branch where no arc is embedded, but all arcs of B are forbidden, i. e., x(a) := 0 for all a ∈ B. The subinstance is of the form ( G − B, H , A ). The first variant exclusively produces strong branches at the cost of exhausting the neighbourhood, yielding rather many children. The second variant is more economical in producing subinstances at the expense of one weak branch. When branching according to this rule, every subinstance must keep record of the embedded arcs. Over the course of the algorithm’s execution, these arcs accumulate to longer partial or even complete paths for their respective demands. If the node reached by an embedded forward arc is not the sink terminal and has an out-degree of one, we add the out-arc also to the embedding and iterate. The analogous procedure applies to embedded backward arcs and an in-degree of one. Remark 6.5. Care has to be taken when parallel demands are present. Consider the following szenario. In the branching process, we generate deg+ (s) child subinstances with respect to chosen entities d, s. Gd In consecutive branchings on these children, we choose a demand d ′ parallel to d and always the same terminal s. Looking at the two embedded arcs of all respective grandchildren, we have possibly enumerated some or all arc pairs from δ+ (s) twice, in switched order. If the arc costs are independent of the Gd layer — which they are often in practice —, this represents a symmetric doubling of subinstances. This may amount to k! such repetitions if k demands are parallel. The branching routine has to recognize this situation and suppress branches accordingly. Another aspect are parallel arcs. An arc a with a parallel cheaper one a′ need not be branched on, as any path containing a can be made cheaper by exchanging it for a′ . In the presence of dependences, this holds only when Aocc (a) ⊇ Aocc (a′ ). At this point, we leave open the choices of demand d and terminal s, the pivoting strategies, for two reasons. Firstly, we can better motivate them after having discussed our LB-routines in Chapter 10 (p. 129). Secondly, we want to test them all in the context of the final competition with the CPLEX 11.0 MIP solver. So we state the missing details there in Section 13.1 (p. 226). For the time being, any random choices will do.
CHAPTER 6. BRANCH-AND-BOUND SOLVER
66
6.3.3 Destructive Branching Strategy Observation 6.6. An instance of the Disjoint Paths Problem is feasibly solved if all its constraints involve at most one path, i. e., the positive optimal state variables in each constraint belong to at most one demand. This observation suggests the following rule. Suppose we have received a state vector xLB from the lower bounding function LB when the subinstance to be branched was checked in makeUpdates(). Destructive Branching Strategy: Choose a constraint A′ ∈ A involving positive xLB -variables from more than one demand. Also, select a subset D′ ⊆ D and generate one subinstance for every conflicting demand by setting the xLB -variables of A′ in all other layers of D′ to zero. Note that positive variables from different demands within one constraint are necessarily fractional. Every individual branch is characterized by the choices of A′ , d, D′ . The Destructive Branching Rule fixes the following variables in the Unified Model: (6.7)
′
x(a) := 0 for all a ∈ A′ ∩ Ad , d ′ ∈ D′ − d .
No variable is assigned to one, but fixing some to zero destroys possible paths. Hence the name destructive. It is non-disjoint, as there may exist the same feasible solutions in several branches. Equation (6.7) can be interpreted as a base graph reduction with residual instance π′ = (G ′ , H ′ , A ′ ) where !
G ′ := G − A′ ∩ Ad d ′ ∈D′ −d H ′ := H A ′ := A . [
(6.8)
′
Every layer in D′ except the chosen one d is reduced by its arcs contained in the constraint A′ . The demand graph H remains unchanged. By tendency, this increases the chances that some branches are fathomed by the dominance checking upon W -insert (Condition (6.2)). Family A ′ might again be reducible by all members A′ for which |A′ | ≤ 1 in G ′ due to the reduction. Figure 6.2 depicts the destructive ′ reduction for the arc-disjoint case, i. e., A′ = { ad | d ′ ∈ D } is the set of the copies of some arc a in all layers. Given A′ , D′ , step (Br) of Algorithm BranchBound (p. 59) reads: ′
let D+ (A′ ) := { d ′ ∈ D | ∃ a ∈ A′ ∩ Ad : xLB (a) > 0 } i := 1 for d ∈ D+ (A′ ) do define πi := (G ′ , H ′ , A ′ ) according to Equation (6.8) i := i + 1 endfor We implemented two variants of the Destructive Branching Rule: D1: select D′ := D+ (A′ ), i. e., reduce the base graphs of the conflicting demands while all others remain unaltered. D2: select D′ := D and additionally generate an extra branch in which the layers of all conflicting de′ mands are reduced while all others remain unaltered, i. e., x(a) := 0 for all a ∈ A′ ∩ Ad , d ′ ∈ S ′ D+ (A′ ). The subinstance is of the form ( G − (A′ ∩ d ′ ∈D+ (A′ ) Ad ), H , A ).
6.3. BRANCHING STRATEGIES
G G1
G2
67
a1
x(a1 )
a2
constraint A′ = {a1 , a2 , ad }
>0
x(a2 ) > 0
Gd
ad
G′
branch G′2
other layers x(ad )
(a1 deleted)
G′1
G′d
a2 not fixed constraint now A′ = {a2 , ad } ad
other layers
=0
Figure 6.2: Destructive Branching in the arc-disjoint case: after resolving a conflict in constraint A′ in favour of d2 , (G , H , A ) is reduced to ( G − (A′ ∩ A1 ), H , A ). Both variants produce semi-weak branches which prescribe no part of the solution, but reduce several demands’ base graphs simultaneously. The first one addresses the conflicting demands only, yielding rather few branches. It leaves open the possibility of needing to branch again on the same constraint A′ when later in the process demands from D \ D+ (A′ ) conflict there. The second variant eliminates this vageness at the expense of one extra branch. When branching according to this rule, no partial embeddings need to be kept track of. Here, too, the pivoting strategies for constraint A′ in the rule remain open. While again any random choice will do, we defer a more elaborate one to Section 13.1 (p. 226).
Chapter 7
Structural Bounding In Algorithm BranchBound (p. 59), we have introduced a boolean testing function NC : Π → {true, false} that we use as a necessary checking means for feasibility of an instance or subinstance of the Disjoint Paths Problem. If NC(π) returns false, we can be certain that the input instance π is structurally infeasible, i. e., possesses no feasible solutions without regard to the objective function. Otherwise, we have no information at this point and further investigations are necessary, cf. subroutine isAdmissible() of Algorithm BranchBound. In Sections 2.2 and 2.3, we have discussed feasibility criteria for the Disjoint Paths Problem. We have seen that the existence of feasible solutions is almost always assured in terms of these criteria. The Distance Criterion hDC i (p. 17) essentially exploits the fact that feasibility is irrespective of any arc cost function w. It compares the trivial upper cost bound w(A) with the trivial lower cost bound ∑(t,s)∈D distwG (s,t) and stipulates that the former be always greater that the latter. Unfortunately, there are infinitely many such comparisons to make, besides the need for cheapest paths calculations. The Cut Criterion hCC i (p. 18), being a finite combinatorial specialization of hDC i, still comprises an exponential number of inequalities to check. For our purposes, we make exclusive use of hCC i as a necessary condition, and restrict ourselves to well-chosen cuts in the base graph. In fact, our function NC does even more. It identifies parts of the input graph G that can be eliminated without altering the solution space, and reduces G correspondingly. This can be regarded as a cleanup operation on G after it has been reduced by the branching. In this chapter, we describe the algorithmics behind this function.
7.1 Probing Terminals + The directed Cut Criterion reads: |δ− H (U)| ≤ |δG (U)| for all U ⊆ V , formulated in terms of the original + input graphs G = (V, A), H = (T, D). In particular, for any terminal s ∈ T , it implies |δ− H (s)| ≤ |δG (s)| − and |δ+ H (s)| ≤ |δG (s)| if we set U := {s} or U := V − s, respectively. Note that these conditions apply for the “pure” disjointness cases without dependences.
First, we have to transfer these conditions to our more general context of the Unified Model. Definition 7.1. Given an instance π = (G , H , A ) of the Disjoint Paths Problem. Fix some terminal node s ∈ TH . The environment of s in π, or s-environment for short, is the reduced instance (G s , H s , A s ) where the data are defined as follows. 68
7.1. PROBING TERMINALS
As :=
[ d∈δ+ H (s)
d δ− G (s ) ∪
69
[
d δ+ G (s )
d∈δ− H (s)
G s := G [As ] , Ds :=
[ d∈DH
d − d (δ+ H (s ) ∪ δH (s ))
H s := H [Ds ] , A s := { A′ ∩ As | A′ ∈ A : |A′ ∩ As | ≥ 2 } ∪ { Ad ∩ As | d ∈ Ds } . Note that G s and H s comprise only nodes and arcs from all d-layers of G or H for which the copy sd of s is a terminal, but no matter which layer s itself belongs to. Figure 7.1, middle part, shows the s-environment besides the original instance π (left). The set A s is primarily the reduction of the constraint family A to all sets that still represent meaningful constraints, i. e., those that contain at least two arcs of As . Additionally, we introduce new intra-layer constraint sets consisting of all arcs on each individual layer.
G H A
Gs Hs As
s1 G1
s1
t1 t2
s2 G2
Ds
a1 a2
a3 s2
a2
a3
a4
t1 t2
a4 other layers
a1
no other layers
Figure 7.1: The environment of a terminal s in G (middle) and its dependency graph D s (right). Blue and green arcs are demands of H or H s . Red double arrows signify constraints A or A s . The red lines in D s are the edges. We now consider one terminal s ∈ TH at a time and focus attention to its s-environment. In each d-layer of G s , we mentally connect the neighbourhood NGd (sd ) with the other end node t d of the demand arc by new artificial arcs of appropriate orientations. As a result, we obtain a starkly simplified (MCDP) instance πs with constraint family A s . If π possesses a feasible solution S, the so does πs — it is just the projection S ∩ As onto G s . This constitutes a necessary condition for the feasibility of π.
In order to evaluate the feasibility of πs , we observe that the dependency graph D s := (As , E s ) (see Definition 3.7 (p. 32) and Remark 4.3 (p. 37)) of G s w. r. t. A s reveals the local feasibility structure. See Figure 7.1, right part. The simplified instance πs is such that every single non-artificial arc in it induces a whole path embedding its demand. In addition, the intra-layer constraint sets Ad ∩ As ∈ A s limit the arcs used per layer to one. Hence, any stable set S in D is a set of arcs whose simultaneous usage in an embedding is allowed by the constraints. It corresponds to a disjoint embedding of |S| demands in πs .
CHAPTER 7. STRUCTURAL BOUNDING
70 ProbeTerm( π )
Algorithm 3 Input: Output:
by reference: instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem G reduced by arcs that cannot be part of a feasible solution false if no feasible solution can exist, true otherwise
initialize (1)
(∗)
X := TH
while X 6= ∅ do choose s ∈ X
let G s = (Vs , As ), H s = (Ts , Ds ), A s denote the s-environment in π let D s = (As , E s ) denote the dependency graph of G s w. r. t. A s let S denote the set of all stable sets in D s
{ bounding condition } (2) (3)
if maxS∈S |S| < |Ds | then return false endif
{ |Ds | = number of demands required }
{ update X } (4)
\
let B :=
S∈S : |S|=|Ds |
(Aocc (S) \ S)
{ set of arcs occupied by all solutions }
(5) (6) (7)
for s′ ∈ TH \ X do if As′ ∩ B 6= ∅ then X := X + s′ endif endfor
{ s′ -environment affected by update } { reassign s′ for processing }
(8)
X := X − s
{ s is processed }
{ reduce base graph } (9)
AG := AG \ B endwhile return true
We can thus conclude the existence of a feasible solution if we can exhibit a stable set S with |S| = |Ds |. In Figure 7.1, we have three stable sets of maximum cardinality |Ds | = 2: {a1 , a3 }, {a1 , a4 }, {a2 , a4 }.
Algorithm ProbeTerm Algorithm ProbeTerm uses these arguments and shows their application. As said, we consider each terminal s individually in step (1) by choosing it from a working set X one at a time. It suffices to enumerate only different terminals in the sense that no two in the sequence are copies of each other from different layers. This is due to the fact that we work with the s-environments which are identical for all copies of s. At the end of the loop, in step (8) the chosen terminal is processed and taken out of X. We postpone the generation of set S in step (∗) for a moment and discuss its use first. So suppose we have S at our hands. In step (2), we check the necessary condition set forth above. If it is not satisfied, we know there exists no feasible solution to π and return false in step (3). Otherwise, we can further
7.1. PROBING TERMINALS
71
exploit the information contained in S and possibly reduce the original set AG . Let S max := { S ∈ S | |S| = |Ds | } denote the set of stable sets in G that represent feasible solutions. The following ideas lead to elimination of arcs: 1. If an arc a ∈ AG lies in the occupation sets of all sets of S max , it is redundant and can be deleted: a∈
\ S∈S max
(Aocc (S) \ S) ⇒ ( G − a, H , A ) has same solution set as (G , H , A ).
2. If an arc a ∈ As lies in no set of S max , it is redundant and can be deleted: a ∈ As \
[ S∈S max
S ⇒ ( G − a, H , A ) has same solution set as(G , H , A ).
3. If an arc a ∈ As lies in all sets of S max , it can be embedded for its demand: a∈
S ⇒ ( G − Aocc (a), H − d(a), { A′ ∈ A | a ∈ / A′ } ) S∈S max has same solution set as (G , H , A ) if a is added again later. \
Idea 1 is incorporated into Algorithm ProbeTerm in step (4) where the set B of all G -arcs is formed that are occupied by all feasible solutions. Ultimately, AG is diminished by these arcs B in step (9). Figure 7.2 shows a simple example for the application of idea 1 in the arc-disjoint case.
Gs
s1
d1
feasible solution 1
feasible solution 2
G1 s2
d2 G2 other layer Gd , d ∈ / Ds
Figure 7.2: Idea 1 in the arc-disjoint case: both feasible solutions in G s occupy the same two arcs in a d-layer outside G s . Before that, we check through all terminals s′ that have been processed earlier and are not currently in the working set X (step (5)). In the case that B intersects their s′ -environment (step (6)), the latter will be changed in step (9). So it may be worth processing s′ again and it is re-entered into X in step (7). Idea 2 does not need to be handled separately, as it is a special case of idea 1. To see this, let S B′ := As \ S∈S max S and assume there exists an arc b ∈ B′ \ B. Pick any S0 ∈ S max which, as a feasible solution, must contain some arc b′ in the same layer as b. By definition, b ∈ B′ ⇒ b ∈ / S0 and thus b 6= b′ . Again by definition, b ∈ / B ⇒ b is independent to all arcs in S0 . Therefore, we can exchange b′ for b and obtain another feasible solution S1 := S0 − b′ + b ∈ S max , which is a contradiction to b ∈ / S for ′ ′ all S ∈ S max . Hence, the assumption B \ B 6= ∅ is false and B ⊆ B follows. Idea 3 is different from ideas 1 and 2 in that it actively embeds some arc. Yet, there is also no need to take care about it: if an arc a lies in all feasible solutions, then this is only possible if all other arcs on
CHAPTER 7. STRUCTURAL BOUNDING
72 d(a)
the same layer, As − a, occur in no feasible solution. This fact is forced by the intra-layer constraints we inserted. So after idea 1 is finished, either there is still a choice of arcs from every layer (and the prerequisite of idea 3 is not satisfied), or some arc on some layer is automatically element of all feasible solutions and thus necessarily embedded.
Algorithm MaxStable The generation of the stable sets family S in step (∗) deserves extra attention. This problem is PSPACE complete in general, since there are exponentially many objects to enumerate. Yet, determining the ifcondition in step (2) may be achieved earlier during the ongoing generation under the following aspects: (i) (ii) (iii)
(iv)
We can finish as soon as we find a stable set S with |S| = |Ds |. Is there an empty d-layer for some d ∈ Ds ? Then no feasible solution exists. S Compute A˜ s := d∈Ds Ads where all copies ad of the same G-arc a are being re-identified. If |A˜ s | < |Ds |, there is no feasible solution. This exploits the fact that in every Disjoint Paths Problem, we have at least arc-disjointness. Is there an arc a ∈ As which is independent to all other arcs, i. e., there is no A′ ∈ A s containing a ? If so, we can accept a for its demand d(a) and recurse on the instance diminished by that demand.
These points are applied in the recursive Algorithm MaxStable functioning as a stable set generator. It is called in step (2) of Algorithm ProbeTerm instead of the if-condition: (2′ ) if not MaxStable(G s , H s , A s ) then Step (i) of Algorithm MaxStable is indeed the same as point (i) above, since |S| = |Ds | is here achieved by demand-wise subtraction of demands from Ds , rendering |Ds | = 0 the criterion to check. Steps (ii)–(iv) are straightforward. The recursive call to MaxStable (step (1)) is wrapped in step (6) inside the macro recurse() in order not to repeat too much code in the main part. The call consists of diminishing all three parameters corresponding to the choice of arc a into the current stable set: G s loses a as well as all arcs occupied by it (cf. Definition 6.3 (p. 62)), the demand a represents is taken from H s , and A s is reduced to all constraints not containing a. Note that the return statement in step (7) effectively stands in the main part according to the macro mechanism. It does not terminate the macro itself. If control flow reaches step (2) of Algorithm MaxStable, we choose a demand d from the present ones according to some rule, for instance, one with smallest |Ads |. In step (3), we perform the typical backtracking fan-out over all arcs in the chosen d-layer. Unless the recursion terminates with true after finding a feasible solution, it returns false in step (5). Of course, even with all the bounding criteria, Algorithm MaxStable may consume exponential time. Incidentally, this does not appear to be a practical problem. On our example instances, we have observed no impediment by this fact. We are assured fast performance by the following aspects: • The graphs H s contain only those demands whose terminals include a copy of s. These are mostly rather few and the instances are small. • In the vast majority of cases, step (i) terminates the algorithm in the first search tree leaf.
• Infeasible cases are mostly characterized by “large” constraints, leading to substantial reductions in step (6) and rather low recursion depths.
• Just in case, we limit execution time by 0.01 · |Ds | seconds. Terminating prematurely (with truevalue) poses no problem due to the heuristic nature of function NC.
7.1. PROBING TERMINALS Algorithm 4 Input: Output:
73
MaxStable( G s , H s , A s ) s-environment G s = (Vs , As ), H s = (Ts , Ds ), A s of a (MCDP) instance true if a feasible solution is found, false otherwise
{ bounding conditions } if Ds = ∅ then return true endif
(i)
(ii), if ∃ d ∈ Ds : Ads = ∅ or |A˜ s | < |Ds | then (iii) return false endif
{ feasible solution found }
{ no feasible solution possible }
{ recursive enumeration } let B := As \
A′
[ A′ ∈A
s
(iv) if B 6= ∅ then choose an arc a ∈ B (1) recurse(a) else (2) choose a demand d ∈ Ds (3) for a ∈ Ads do (4) recurse(a) endfor endif (5)
{ random choice OK } { apply some sensible rule } { backtracking fan-out }
return false
recurse(a) (6) (7)
{ set of arcs independent w. r. t. A s }
{ macro, not proper function }
let d(a) be the demand whose layer a lies in / A′ } ) = true then if MaxStable( G s − Aocc (a), H s − d(a), { A′ ∈ A s | a ∈ return true { propagate termination } endif
Set of Occupied Arcs The evaluation of set B in step (4) of Algorithm ProbeTerm is still to be discussed. The set B of arcs being occupied by all feasible solutions can be computed iteratively along the stable set generation process: B′ := AG , B′ := B′ ∩ (Aocc (S) \ S) for all S ∈ S max . We can stop as soon as B′ = ∅. This is most often the case, yet not always fast. For a speedup, we use the fact that if MaxStable returns false, we can be certain there is no stable set of the desired cardinality. This holds also true if it was terminated due to time-out. We build up B by the following code fragment which tests all arcs a by embedding them and investigating the resulting residual instance:
CHAPTER 7. STRUCTURAL BOUNDING
74 initialize initialize
B := ∅ Y := Aocc (As )
while Y 6= ∅ do choose an arc a ∈ Y, Y := Y − a
if MaxStable( G s − Aocc (a), H s − d(a), { A′ ∈ A s | a ∈ / A′ } ) = false then B := B + a else Y := Y \ { feasible solution found } endif endwhile
If MaxStable() returns false, there is no feasible solution including a. We hence add a to B for later removal from AG in step (8). Note the loop range initialization Y := Aocc (As ): we need not test all arcs in AG , since those independent to As will generate residual instances of the form ( G s − Ad(a) , H s − d(a), A s ). These are at best easier to solve than (G s , H s , A s ) itself, i. e., they will yield the same return value that we have already computed in step (2). If MaxStable() returns true, we have a feasible solution S at hand. We subtract it from Y , since arcs in a solution are obviously not occupied by all solutions and need not be tested. Measuring the computational effort of the two Algorithms ProbeTerm and MaxStable is difficult in general. The former calls the latter at least once per s-environment in G s in step (2′ ), maybe more often due to X-inserts in step (7) or the computation of B in step (4) by the code fragment above. The latter is exponential in the worst case, yet very fast in practice and safeguarded by a time-out. We postpone computational experience to Section 7.3 (p. 84).
7.2 Probing Articulations Definition 7.2. Given a directed graph G = (V, A) and a node u ∈ V . A node v ∈ V is called reachable from u if there exists a directed u-v-path in G. We denote the set of all nodes reachable from u, including − u itself, by R+ G (u). Analogously, the set RG (u) ⊆ V comprises all nodes from where u is reachable.
Let P t,s denote the set of all directed simple s-t-paths in G according to Definition 4.7 (p. 49). We call a node v ∈ V s-t-connecting if there exists a path P ∈ P t,s with v ∈ P. By the above terms, the set t,s − of all s-t-connecting nodes satisfies RG ⊆ R+ G (s) ∩ RG (t). (Not ’=’ in general: there may be some nodes both reachable from s and t that lie on no simple s-t-path. We defer this detail to Figure 7.10 (p. 84).) The intersection t,s FG :=
\ P∈P t,s
P ⊆ V ∪A
is called the articulation set of s,t in G. (Recall that in Definition 1.2 (p. 5), we have formally defined a path P as the set of its inner nodes and arcs. Thus, s,t ∈ / FGt,s .) The nodes in FGt,s are dominators of t, and the arcs are bridges. FGt,s can be equivalently characterized as the set of nodes or arcs whose individual removal from G destroys all s-t-paths. We consider another application of the Cut Criterion hCC i. Let G = (V, A), H = (T, D) be an instance of the Disjoint Paths Problem without dependences. Pick a demand d = (t, s) ∈ D and suppose that FGd ∩ A 6= ∅, i. e., G contains at least one bridge b with respect to d. Remove b from G and let U := R+ / U and U is an s-t-cut. Figure 7.3 shows the situation. G−b (s). Since b is a bridge, t ∈
7.2. PROBING ARTICULATIONS
75
G U
s
v
t
b
Figure 7.3: The s-t-cut U = R+ G−b (s) induced by a bridge b. By definition, except b only backward arcs can exist between U and its complement.
b
Figure 7.4: The s-t-cut induced by a dominator v. Node splitting makes it a bridge: the internal arc b becomes the only crossing forward arc.
The Cut Criterion now says that (G, H) possesses a feasible solution only if !
+ 1 = |{d}| ≤ |δ− H (U)| ≤ |δG (U)| = |{b}| = 1 ,
i. e., the arc b is reserved for demand d and no other demand is allowed to cross the cut U. Equivalently, if deg− this fact is easily H (U) ≥ 2 then the reduced instance (G − b, H − d) has no feasible solution and ′ is not reachable from s′ and thus P d ′ = ∅. detectable: for every d ′ = (t ′ , s′ ) ∈ δ− (U), t H−d Remark 7.3. The same reasoning applies to dominators which are not end points of bridges. After node splitting, they become bridges, see Figure 7.4. Recall that our Unified Model (IP) (p. 37) is arc-based and we have captured node-disjointness without node splitting as a special type of clique inequality. So in our context, we need to transform the dominators to (small) arc sets. This is done in the following + way. Let v be a dominator and define the cut U := R+ G−v (s) + v. All crossing forward arcs δG (U) are then pseudo-bridges in G, i. e., not all, but exactly one of them must lie on any s-t-path. We always imply this replacement when we let articulation sets interact with arc sets in the node-disjoint case. In the arc-disjoint case, we simply neglect the dominators. Also in our setting with the layered input graphs and constraint family, dominators and bridges carry important information for the feasibility or data reduction of an instance. Computed on each individual d-layer, they represent graph elements that must be used by all d-connecting paths. In principle, they could be embedded for their respective demands d, i. e., reserved for d and removed from the graph. However, this could cause the problem of splitting demands into two, enlarging the demand and layered base graphs, see Figure 7.5. So we dispense with embedding them, but nevertheless we can delete all arcs they occupy. In addition, we get a by-product from the graph search for dominators: the set of all d-connecting nodes.
Algorithm ProbeArtic Algorithm ProbeArtic gives the details. Its structure is very similar to that of Algorithm ProbeTerm: same input and output interface, main loop over a working set that is mainly decreased and possibly increased, check of a necessary criterion, permanent reduction of the base graph by arcs identified to be redundant. We consider each demand d individually in step (1) by choosing it from a working set Y one at a time. At the end of the loop, in step (9) the chosen demand is processed and taken out of Y . Again, we postpone the computations of RdGd and FGdd in step (∗) and discuss their uses first. Clearly, if RdGd is
CHAPTER 7. STRUCTURAL BOUNDING
76
Gd d1
d
a t
s
s
d2
t
Figure 7.5: Splitting of a demand d into two d1 , d2 after embedding an arc a for its path. empty, there are no d-connecting paths and thus no feasible solution. We safely return false. Otherwise, we know that only the nodes in RdGd are relevant for d-connecting paths and we update the d-layer to the corresponding induced subgraph in step (3). As said, the dominators and bridges in set FGdd must be used in all feasible solutions. So in step (4), we define the set F of arcs occupied by them and diminish the base graph by it in step (8). Note Remark 7.3 which applies in particular to the forming of Aocc (FGdd ). Before that, we check through all demands d ′ that have been processed earlier and are not currently in the working set Y (step (5)). In the case that F intersects their d ′ -layer (step (6)), the latter will be changed in step (8). So it may be worth processing d ′ again and it is re-entered into Y in step (7).
Dominator Tree The main matter in Algorithm ProbeArtic is step (∗), the computations of the d-connecting and articulation sets, respectively. They are intimately related, as Figure 7.6 shows, and can be efficiently found t,s together. We always have Rt,s G ⊇ FG ∩V , i. e., containment except for bridges.
G Rt,s G
v1
FGt,s v2
s
t v3
Figure 7.6: The sets Rt,s G of s-t-connecting nodes (green and red, also on green paths), and FGt,s of articulations (red dominators and bridge), are strongly related. There may be more nodes (blue sets) that are either unreachable from s (upper right) or cannot reach t (lower left). We denote the set of all dominators of u ∈ V by Dom(u). This set always contains s and u if u is
7.2. PROBING ARTICULATIONS ProbeArtic( π )
Algorithm 5 Input: Output:
by reference: instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem G reduced by arcs that cannot be part of a feasible solution false if no feasible solution can exist, true otherwise
initialize (1)
77
Y := DH
while Y 6= ∅ do choose d ∈ Y let RdGd denote the d-connecting nodes in Gd
(∗)
let FGdd denote the articulation set w. r. t. d { check reachability } (2)
(3) (4)
if RdGd = ∅ then return false endif Gd := Gd [ RdGd ]
{ reduce layer to connecting subgraph }
let F := Aocc (FGdd ) \ FGdd
{ set of arcs occupied by articulations }
{ update Y }
for d ′ ∈ DH \Y do ′ if Ad ∩ F 6= ∅ then Y := Y + d ′ endif endfor
(5) (6) (7)
{ d ′ -layer affected by update } { reassign d ′ for processing }
{ reductions } AG := AG \ F Y := Y − d
(8) (9)
{ reduce base graph } { reduce working set }
endwhile return true
reachable from s, or is empty otherwise. In Figure 7.6, the dominators of t are Dom(t) = {s, v1 , v2 , v3 ,t}.
Publications on dominators date back as far as 1959 in the computer science literature when control flow in computer programs was first analyzed. Purdom and Moore [PM72] give the following O (|V ||A|) algorithm for building up the dominator sets. We assume here w. l. o. g. that all nodes V are reachable − from s, i. e., V = R+ G (s). All other nodes are irrelevant. Also, NG (s) = ∅, as backward neighbours of s have no effect on dominators. initialize
Dom(u) := {s} for all u ∈ V
for v ∈ V − s do compute R+ G−v (s) Dom(u) := Dom(u) + v for all u ∈ V endfor
\ R+ G−v (s)
{ Depth First Search, O (|A|) }
The update of Dom(u) is based on the fact that v dominates exactly the unreached nodes V \ R+ G−v (s),
CHAPTER 7. STRUCTURAL BOUNDING
78
since they were reachable in G. Allen and Cocke [AC72] give a different characterization of the sets Dom(u) and observe that they are the unique maximal solutions of the following equations:
(7.1)
Dom(u) =
\
v∈NG− (u)
Dom(v) + u for all u ∈ V .
They give the following Iterative Algorithm for solving them: initialize
Dom(u) := V for all u ∈ V
while there is a node u violating Equation (7.1) do update Dom(u) by Equation (7.1) endwhile This algorithm determines the sets Dom(u) from above by the idea that they initially, as full node sets, contain all dominators. Subsequently, they are diminished by Equation (7.1), ensuring that eventually all non-dominators are deleted. Note that the unique first node to violate (7.1) is always s. The sets Dom(u) may be represented computationally as bit sets in order to make the many intersection operations highly efficient [AU77]. The crucial step is the finding of u in the loop. The simplest way is to cycle through the node set, checking for violation until no such node is found in an entire cycle. Per full cycle, we get an amortized complexity of O (|A|) intersections at O (|V |) elementary operations each. As there may be at most |V | cycles to pass, the algorithm consumes O (|V |2 |A|) time in the worst case. This bound appears to be worse than that of the simple Purdom-Moore algorithm. In practice however, the estimate is hugely pessimistic and the Iterative Algorithm outperforms the former. Hecht and Ullman [HU75] improve this scheme and show that reverse postorder is advantageous as the cycle order, although not asymptotically. Their key observation is that the algorithm is essentially of the Dynamic Programming type. It would terminate after just one cycle if it were possible to accurately assign the sets Dom(u) for all backward neighbours NG− (u) first before processing u itself. This is indeed achievable for acyclic graphs after a topological sorting — which the reverse postorder provides. On general graphs with cycles, this is necessarily impossible, but the order still appears to be effort-reducing. Determining it requires a preliminary Depth First Search run on G which does not raise the asymptotic complexity. We did not implement any of the above variants. The reason is that, even with bit sets, the data structures for the dominator sets Dom(·) need O (|V |2 ) memory which must be initialized and updated. This amount is by a factor |V | off the necessary, as the following theorem (after the definition) proves. Definition 7.4. Given a directed graph G = (V, A) and a node s ∈ V . A node u is an immediate dominator idom(v) of node v if u dominates v and every other dominator of v dominates u also. The start node s does not have an immediate dominator. In Figure 7.6, node v3 is t’s immediate dominator, since v1 , v2 also dominate v3 , but not vice versa. Analogously, we have idom(v3 ) = v2 , idom(v2 ) = v1 , idom(v1 ) = s. Theorem 7.5 (Lowry and Medlock [LM69]). Given a directed graph G = (V, A) and a node s ∈ V . Every node v ∈ R+ G (s) − s possesses a unique immediate dominator idom(v). The edge set E := { {idom(v), v} | + v ∈ RG (s) − s } defines a tree T rooted at s with the dominator property that if u dominates v in G, u must be a proper ancestor of v in the tree. The tree T is called the dominator tree of G.
7.2. PROBING ARTICULATIONS
79
As a corollary of Theorem 7.5, we know that the dominator set Dom(u) contains exactly the nodes in the unique u-s-path in the dominator tree. Figure 7.7 illustrates this proposition on a directed version of our example graph demo3. Note that the dominator tree is not a subgraph of G. Also, the red dominator nodes need not be generally adjacent in G. 1
4 dominator tree of node 2
G 2
3
7
6
10
15
14
2
15
12 16
16 18
11
8
12 11
10
6
9 13
5
7
14
13 17
18
17
19 19
dominates
Figure 7.7: The dominator tree (right) of node 2 in graph demo3 (left). The green subgraph is reached from node 2, the red nodes are dominators for other nodes. Observation 7.6 (Tarjan [Tar74]). The dominator set Dom(u) need not be initialized as a full set V . It suffices to set it with any (smaller) superset of the u-s-path in the dominator tree. By the nature of dominators, they must lie in the respective u-s-paths of any spanning tree in G. Algorithmically, the insights from Theorem 7.5 and Observation 7.6 allow a compressed data structure of all dominator sets together as one tree T with size O (|V |). It is initialized with any spanning tree in G and subsequently updated locally by manipulating the parent pointers idom(·). We also mention T that the main formula v∈N − (u) Dom(v) reduces to finding the nearest common ancestor NCA(NG− (u)) G in T . The latter is the join node where the T -paths from s to the argument nodes diverge. Between s and the join, the sets of path nodes are necessarily identical and can be neglected. Figure 7.8 shows the situation. NCA(u,v)
u
T v
w x
s NCA(w,x,y)
NCA(x,y)
y
Figure 7.8: Nearest common ancestors in a rooted tree. Cooper, Harvey, and Kennedy [CHK01] discuss and test the Iterative Algorithm on a tree implementation. The tree is encoded as an array idom[·] that, at the end, represents the correct parent pointers in the dominator tree. Their algorithm takes the following sketched form:
CHAPTER 7. STRUCTURAL BOUNDING
80 Input: Output:
a directed graph G = (V, A), a node s ∈ V the dominator tree T of G idom[s] := s, idom[v] := nil for all v ∈ V − s
(b)
initialize
(e)
for u ∈ V − s in reverse postorder, cyclic do choose w ∈ NG− (u)
(f) (h)
x := w for v ∈ NG− (u) − w do x := NCA(v, x) endfor
(j)
idom[u] := x endfor
(o)
return tree T given by array idom[·]
{ repeated intersections } { update tree }
(The in-contiguous lettering is an anticipation of our adaptation of this algorithm where same letters mark the same steps.) The initial tree need not be a spanning one, step (b) initializes it as T := {s}. Throughout the algorithm, idom(u) = nil signifies u ∈ / T . Steps (e)–(h) serve the purpose of calculating T Dom(v) by repeated intersections. Nodes v with undefined idom[v] are skipped in step (h). The v resulting node x is then assigned to idom[u] in step (j). If this is the first assignment, it also means u ∈ T from then on. The main loop terminates when no changes in (j) occur in one full cycle.
Algorithm DominTree Our version of the Iterative Algorithm is presented as Algorithm DominTree. It details out some mechanisms and improves on performance. The two additional input parameters add flexibility needed later. The symbol σ stands for one of the signs ’+’ or ’−’ and is used for determining the neighbourhood direction NGσ (·) in steps (e) and (f). The array order[·] is the explicit interface for giving and using the postorder numbering of the G-nodes. Step (a) initializes the nodes except s as a list sorted in reverse order. The main loop cycles through this list, maintaining the order. The node u, first assigned in step (c), is the current one. Increment and termination of the loop are made explicit in steps (q) and (o), respectively. The condition “no change in one full cycle” is detected in step (n). There, u is compared to last which marks the node at which the last relevant assignment (j) was made. The logic of steps (k)–(m) determines the meaning of relevant: only those nodes u with new value idom(u) 6= s need to be tracked. If idom(u) = s, no further changes to this value can possibly occur and u is permanently removed from list, thereby shortening the cycle. In particular step (l) turned out to be a time-saver. In a majority of our example instances, the layers have very few dominators and thus idom(u) = s for most nodes u. The cycle shortenings are substantial. The subroutine NCA() is standard in the literature and listed for completeness only. It uses the ordervalues for orientation towards the root s in T . Note that, by definition of postorder, the tree nodes have decreasing values on every path in T starting at s. Algorithm DominTree is very fast in practice, even though its complexity is still O (|V |2 |A|). Cooper et al. [CHK01] make a strong point that it is even faster on realistic input sizes than the well-known algorithm by Lengauer and Tarjan [LT79] with a complexity of O (|A|α(|A|, |V |)). (α(m, n) is the inverse of Ackermann’s function. This factor originates from the employed path compression technique in the tree.) Georgiadis et al. [Geo05, GTW06] give a detailed overview of fast dominator algorithms, including the most recent and sophisticated linear time methods. They, too, conclude that the latter are rather of theoretical interest. For this reason, we have decided to stick with the comparatively simple Iterative Algorithm.
7.2. PROBING ARTICULATIONS DominTree( G, s, σ, order)
Algorithm 6 Input: Output:
list := V − s in decreasing order values idom[s] := s, idom[v] := nil for all v ∈ V − s u := first list entry last := nil
initialize initialize initialize initialize
(e)
while true do choose w ∈ NGσ (u)
(f) (g) (h)
our version of the Iterative Algorithm
a directed graph G = (V, A), a node s ∈ V , a sign σ ∈ {+, −} an injective array order : V → { 1, . . . , |V | } the dominator tree T rooted at s in direction of σ
(a) (b) (c) (d)
{ compute
81
T
v Dom(v)
{ tree T := ∅ }
}
x := w for v ∈ NGσ (u) − w do if idom[v] 6= nil then x := NCA(v, x) endif endfor
{ ⇔ v∈T } { repeated intersections }
{ update preliminary dominator tree } (i) (j) (k) (l) (m) (n) (o) (p) (q)
if idom[u] 6= x then idom[u] := x if x = s then remove u from list else last := u endif else if u = last then return tree T given by array idom[·] endif
{ a change occurs } { update tree } { no more change of idom[u] possible }
{ no change for full list cycle }
u := next list entry, maybe after circular wrap endwhile
NCA(x, y) Input: nodes x, y ∈ V Output: nearest common ancestor in current tree T given by idom[·] while x 6= y do while order[x] < order[y] do x := idom[x] endwhile while order[x] > order[y] do y := idom[y] endwhile endwhile return x
CHAPTER 7. STRUCTURAL BOUNDING
82
Algorithm ReachArtic After this preparation, we now turn to the computation of step (∗) in Algorithm ProbeArtic (p. 77). The sets RdGd and FGdd are returned by a call to Algorithm ReachArtic(Gd , d). It makes effective use of Depth First Search (DFS), solving two subtasks at the same time: assigning postorder numbers to all nodes and determining the reachable set (step (1)). In step (2), we trivially terminate if the partner terminal t is not reachable from s. For the articulation set, we need the dominators of t, so step (3) computes the dominator tree T + w. r. t. s by means of Algorithm DominTree. The unique s-t-path in T + immediately gives the desired dominators. The loop (5) enumerates the nodes less s on this path and we add them to F in step (6). The bridges are found also in loop (5), exploiting the fact that both end nodes of a bridge must be dominators. This is only a necessary condition, as Figure 7.9 shows where an arc connecting two dominators is not a bridge. We have to determine whether there is a subgraph “between” the two dominators u, w or not. The test consists of a search in the forward neighbourhood of w for another node v 6= u having the same immediate dominator as u, namely w. Only if there is no such node (step (7)), have we identified a bridge and add it accordingly in step (8). Step (4) is necessary, since from Algorithm DominTree, we have idom+ [s] = s. Otherwise, we could not identify bridges with one end node being s. v
G
s
t w
u
Figure 7.9: Testing an arc (w, u) between two dominators for being a bridge. Here it is not, as there is another node v ∈ N + (w) − u with idom[v] = idom[u] = w. The next paragraph in Algorithm ReachArtic is headed towards completing the computation of RdG . − From Definition 7.2 (p. 74), we know RdG ⊆ R+ G (s) ∩ RG (t). So the right hand side, computed in step (10), + is an approximation. As a prerequisite, we form RG (s) in step (9). Figure 7.10 shows an example where the intersection set is a proper superset of RdG . There may be arbitrarily many such side components whose nodes v are reachable from both s and t, but lie “behind” a common dominator w and thus on no simple s-t-path. So in completing the computation of RdG , we need a means of discriminating between nodes in a side component from those not. The key is the common dominator. Letting Dom+ (v) denote the dominators of v and Dom− (v) the nodes v dominates, the condition Dom+ (v) ∩ Dom− (v) ⊃ {v} decides the cases. Recall that always v ∈ Dom(v), hence the strict superset. The loop (12),(13) checks this for all candidate nodes R. Again as a prerequisite, we have Algorithm DominTree deliver the backward dominator tree T − w. r. t. t in step (11). Actually, we could give it G[R] instead of G as input, as the following for-loop iterates over R only. Steps (11)–(13) are actually not mandatory for the algorithm to work correctly. After step (10), we can decide to skip over them and terminate the routine in step (14). Two reasons may be valid for doing so. Firstly, the sole purpose of the return set RdG is the reduction of G to G[RdG ] in step (3) of Algorithm ProbeArtic. Any superset of all s-t-connecting nodes is acceptable here and we can save some effort. − Secondly, if G is acyclic, we know RdG = R+ G (s) ∩ RG (t) and steps (11)–(13) are redundant. This is obvious from Figure 7.10: in an acyclic graph, no side components can exist, since the paths between w-v and v-w necessarily form a cycle. So there is no need to check for them, or even initialize the data structure T − . Note that we do not have to know in advance whether G is acyclic or not. This is easily found out as a by-product of one of the two DFS runs (1),(9).
7.2. PROBING ARTICULATIONS
83
ReachArtic( G, d )
Algorithm 7
a directed graph G = (V, A), a node pair d = (t, s), the set RdG ⊆ V of all d-connecting nodes,
Input: Output:
the set FGd ⊆ V ∪ A of articulations in G w. r. t. d
{ compute reachable set R+ G (s) } (1)
run DFS on forward arcs of G starting at s, initialize with it: for all v ∈ V : order[v] := DFS postorder number of v set R+ G (s) of nodes reachable from s
(2)
if t ∈ / R+ G (s) then return RdG = ∅, FGd = ∅ endif
{ target node unreachable }
{ compute articulation set FGd } +
(3)
T
(4)
initialize initialize
(5) (6)
for u ∈ s-t-path in T − s do F := F + u
(7) (8)
abbreviate w := idom+ [u] if (w, u) ∈ A and 6 ∃ v ∈ N + (w) − u : idom+ [v] = w then F := F + (w, u) endif endfor
:= DominTree(G, s, −, order) F := ∅ idom+ [s] := nil
{ forward dominator tree w. r. t. s } { for bridges containing s }
{ compute reachable set R− G (t) } (9)
run DFS on backward arcs of G starting at t, initialize with it: for all v ∈ V : order[v] := DFS postorder number of v set R− G (t) of nodes reaching t
(10) initialize
− R := R+ G (s) ∩ RG (t)
{ compute d-connecting set RdG } (11) T
(12) (13)
−
:= DominTree(G,t, +, order)
{ backward dominator tree w. r. t. t }
for v ∈ R do let Dom+ (v) denote the nodes of the v-s-path in T let Dom− (v) denote the nodes of the v-t-path in T if Dom+ (v) ∩ Dom− (v) ⊃ {v} then R := R − v endif endfor
{ return final results } (14) return RdG = R, FGd = F − t
+ −
{ v on no simple s-t-path }
CHAPTER 7. STRUCTURAL BOUNDING
84
v − R+ G (s) ∩ RG (t)
Rt,s G
w
t s
Figure 7.10: Even if a node v is reachable from s and can reach t, it need not be s-t-connecting. Node v lies in a side component with a dominator w common to all s-v-paths and all v-t-paths.
7.3 Computational Experience The two Algorithms ProbeTerm (p. 70) and ProbeArtic (p. 77) from the previous sections are examples for the testing function NC : Π → {true, false} used in Algorithm BranchBound (p. 59). Each of them is based on a separate idea which cuts in the graph to consider and how to find redundant arcs to delete. Best results are to be expected from a combination of both. The simplest way is to call them one after the other. Or we could switch between them as long as further changes are made.
Algorithm NC In order to gain most efficacy, we decided to integrate both methods into one in the manner shown as Algorithm NC. We initialize both working sets at the beginning in step (A). The loops (C) and (E) are essentially the main loops of Algorithms ProbeTerm and ProbeArtic, respectively. They are encompassed by the loop (B) that terminates as soon as both working sets are empty. Note that Y is always empty in step (G) due to condition (E), so only X has to be checked. Any updates of the base graph in step (8) of one routine may influence the other one. So we update both working sets simultaneously in a subroutine updateXY(), called in steps (D) and (F) instead of the original steps (5)–(7) of either algorithm. The latter are moved to steps (H) and (I), respectively. Finally, we introduced one more efficiency in step (A). During the course of an entire solver run, the function NC gets to process all subinstances generated by the branching in step (Br) of Algorithm BranchBound. These subinstances differ rather little from their parent instances, most terminal environments and d-layers are unaltered by the branching. Thus, NC will neither lead to more feasibility information nor more graph reductions in these parts. We give a newly generated subinstance a yes/noflag with each demand d. It signifies whether the d-layer Ad of the input problem π was changed during the branching process. We initialize the working sets X,Y in Algorithm NC exclusively with all yesdemands and their respective terminals.
Computational Experience We evaluated our Algorithm NC over entire solver runs with the Differential Method, cf. List of Symbols (p. xi). Table 7.11 presents the differences between the measured total times, the numbers of NC-calls executed during the run, and the resultant average running times per call. We tested the instances with
7.3. COMPUTATIONAL EXPERIENCE
NC( π )
Algorithm 8 Input: Output:
85
integrated version of ProbeTerm and ProbeArtic
by reference: instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem G reduced by arcs that cannot be part of a feasible solution false if no feasible solution can exist, true otherwise
(A) initialize initialize
X := TH Y := DH
(B) repeat { process terminals } (C)
while X 6= ∅ do execute steps (1)–(4) of Algorithm ProbeTerm
(D)
{ B was computed in step (4) } updateXY(B) execute steps (8)–(9) of Algorithm ProbeTerm endwhile
{ process articulations } (E)
while Y 6= ∅ do execute steps (1)–(4) of Algorithm ProbeArtic
updateXY(F) { F was computed in step (4) } execute steps (8)–(9) of Algorithm ProbeArtic endwhile (G) until X = ∅ (F)
return true updateXY(A′ ) Input: a set A′ ⊆ AG Output: sets X,Y updated (H) for s′ ∈ TH \ X do if As′ ∩ A′ 6= ∅ then X := X + s′ endif endfor (I)
for d ′ ∈ DH \Y do ′ if Ad ∩ A′ 6= ∅ then Y := Y + d ′ endif endfor
{ s′ -environment affected by update } { reassign s′ for processing }
{ d ′ -layer affected by update } { reassign d ′ for processing }
CHAPTER 7. STRUCTURAL BOUNDING
86
the Constructive and the Destructive Branching Strategies (cf. Sections 6.3.2 (p. 64) and 6.3.3 (p. 66)). Also, we did not use the best available strategies within the classes constructive/destructive. We rather had longer runs, so the measurements were more accurate. The times show that execution times grow very moderately with the graph sizes. While on smaller instances they stay below one millisecond, the largest values of up to 14 ms on the vehi* family are still acceptable for their respective graph sizes. Most noticeable are the generally increased efforts with the constructive strategies. This is due to their altering of mostly all base graphs from a parent instance to its children, resulting in at least one call to Algorithm ProbeArtic each. The destructive strategies alter only the base graphs involved in a resolved conflict, which are significantly less. Summarizing, we can firmly state that the performance of Algorithm NC is not a bottleneck in the overall solution process. edge-disjoint diff [s] no. calls ave [µs]
node-disjoint diff [s] no. calls ave [µs]
Constructive tele354x19 tele978x16 tele1039x26 tele8072x20 rand600e21 rand900e27 rand1200e33 rand1500e36 slab402n6 slab520n7 slab596n8 vehi24940n10 vehi33000n16 vehi46980n20
3.0 10.0 8.7 32.2 4.7 4.6 18.2 16.3
5243 5256 2071 5795 6566 6543 5297 5736
572 1903 4201 5557 716 703 3436 2842
7.8 3.8 12.4 28.4
19558 1357 4982 5493
399 2800 2489 5170
10.7 10.4 9.3 20.8 30.8 37.3
167447 98593 87642 2321 2795 2556
64 105 106 8961 11019 14606
3.7 9.8 7.6 33.6
20910 3571 10440 34138
177 2744 728 977
21.3 9.2 18.6 8.3 11.9 19.1
85103 39128 42429 3421 3966 3275
250 235 438 2426 3001 5832
Destructive tele354x19 tele978x16 tele1039x26 tele8072x20 rand600e21 rand900e27 rand1200e33 rand1500e36 slab402n6 slab520n7 slab596n8 vehi24940n10 vehi33000n16 vehi46980n20
5.5 15.4 8.7 7.9 2.1 2.3 7.4 7.4
41220 32283 9820 10462 9105 10540 11355 15219
133 477 886 755 231 218 652 486
Table 7.11: Algorithm NC: average running times per call lie in a small millisecond band. Constructive strategies induce higher effort on all instances except the slab family.
Chapter 8
Base Graph Preprocessing In Section 4.2 (p. 35), we developed the Unified Model (IP), based on a splitting of the given base graph into a layered one with one copy per demand. In this chapter, we describe how we process the original input data (G, H, A dep ), how they get split and initialized to enter the model. Preprocessing means a reduction of instance data π ∈ Π to a possibly smaller instance π′ ∈ Π such that the following property holds. Property 8.1. 1. π′ possesses an optimal feasible solution if and only if π does, 2. the optimal objectives of both instances are equal: OPT(π) = OPT(π′ ), 3. from any optimal feasible solution S′ of π′ an optimal feasible solution S of π can be constructed in O (|A|) time. Algorithm Preprocess shows our course of action. In the first step (A), we compute the sets RdG of reachable nodes by means of Algorithm ReachArtic (p. 83) which was explained in detail in Section 7.2 (p. 74). If one of theses sets is empty, no solution exists. Subsequently, we define a new base graph Gall composed of the (non-disjoint) union of all induced subgraphs G[ RdG ] (step (B)). Gall represents the relevant subgraph of G: all arcs and nodes that can possibly lie on some path of some demand. Thus after step (A), all non-terminal nodes must have at least one in-arc and one out-arc incident to different neighbours. Steps (C) and (D) are the contents of the following two sections. In the call to EmbedCanonical, we initialize the layered graphs G and H . Subsequently in step (E), we accompany them with the constraint family A . The resulting layered instance π′ satisfies Property 8.1. Throughout our work, we have experimented with our example instances exclusively on preprocessed base graphs. All given tabular material on our examples has been measured under this reduction, except where explicitly stated otherwise. However, all the illustrations of our algorithms avoid preprocessing for the sake of clarity.
8.1 Redundant Arcs and Nodes Definition 8.2. Given an instance (G, H, A) of the Disjoint Paths Problem. Consider two adjacent nodes u, v ∈ V . We call a set of parallel arcs Par(u, v) := {(u, v) ∈ A} a (u, v)-bundle, or just bundle if the nodes are clear. We say, a (u, v)-bundle is internally dependent if every pair of distinct arcs a, a′ ∈ Par(u, v) occurs together in at least one dependence A′ ∈ A dep . They may all occur in the same dependence, i. e., A′ ⊇ Par(u, v). 87
CHAPTER 8. BASE GRAPH PREPROCESSING
88 Algorithm 9 Input: Output:
Preprocess( π ) by reference: instance π = (G, H, A dep ) of the Disjoint Paths Problem π transformed to π′ = (G , H , A ) with Property 8.1
(A) initialize (B) initialize
RdG := ReachArtic(G, d) for all d ∈ D S Gall := d∈D G[ RdG ]
(C) ElimRedundant(Gall , H, A dep ): eliminate or transform redundant arcs and nodes in Gall
{ cf. Algorithm ReachArtic } {relevant graph } { cf. Section 8.1 }
(D) (G , H ) := EmbedCanonical(Gall , H, A dep ): { cf. Section 8.2 } compute layered graphs G ,H in which canonical arcs are reserved and from which canonical paths and their demands are deleted (E)
define A from G , H , A dep
{ cf. Section 4.2 (p. 35) }
We say, an arc a ∈ Par(u, v) is externally dependent if there exists a dependence A′ ∈ A dep such that a ∈ A′ and A′ 6⊆ Par(u, v). In other words, a is dependent to another arc outside the same bundle. Certain arcs and nodes of G can be eliminated or transformed without losing all optimal feasible solutions. Observation 8.3. a)
b)
c)
Non-terminal nodes with exactly two neighbours and no parallel incident arcs define unique partial routings . Therefore, we can eliminate them and replace the routings with direct arcs. In the node-disjoint case, from any (u, v)-bundle the most expensive arc to be used in a min-cost solution is a cheapest one not externally dependent. All other parallel arcs with equal or higher cost can be eliminated. Dependences involving only parallel arcs can be freely removed or inserted. In the arc-disjoint case, from any internally dependent (u, v)-bundle the most expensive arc to be used in a min-cost solution is a cheapest one not externally dependent. All other parallel arcs with equal or higher cost can be eliminated.
Observation 8.3 a) comprises seven special cases leading to four reductions as shown in Figure 8.1. The red double arrows between arcs and the “outside” symbolize any dependences that these arcs are involved in, if any. Figure 8.1 (i) shows the cases that are reduced to one single arc. The pairs of antiparallel arcs (second and third rows) may or may not be mutually dependent. The dependences on any of the original arcs become aggregated to be dependences of the resulting arc. We can subsequently eliminate a dependence which is a subset of another. This might happen, for instance, if two original arcs are dependent to one and the same third arc. After step (i), both dependences are identical. The easiest case (ii) arises when the two incident arcs are dependent to each other: using both is impossible and the node is deleted without substitution. Part (iii) of Figure 8.1 depicts the one case where two pairs of antiparallel arcs are independent, though maybe externally dependent. The dependences between antiparallel arcs in part (iv) originate from undirected input edges that became substituted by two antiparallel arcs under a common dependence. In both cases, the involved dependences merge separately on the respective forward and backward arcs. Note that we have to exclude parallel incident arcs, since they make routing ambiguous and cannot
8.1. REDUNDANT ARCS AND NODES
89
(i)
c1
(ii)
(iv)
c2 (iii) c1
c2
c1
c2
c′1
c′2
c′1
c′2
c1 + c2 c1 + c2
c1 + c2 c′1 + c′2
c′1 + c′2
Figure 8.1: Observation 8.3 a): nodes (blue) with two neighbours and no parallel incident arcs can be eliminated and their incident arcs replaced by zero, one or two antiparallel arcs between both neighbours. Red double arrows indicate dependences. be uniquely replaced. However, the other two observations help in reducing bundles to possibly one arc, making a) applicable. Observation 8.3 b) applies to the node-disjoint case only. All parallel arcs share the same end nodes, thus at most one of them can be used in any feasible solution. Consider a bundle Par(u, v) of parallel arcs between two nodes u, v, as in Figure 8.2.
u Par(u, v)
u
4
a1
3
a2
3
a3
2
a4
3
a3
2
a4
4
a1
3
a3
2
a4
v
node-disjoint v arc-disjoint
u
v
Figure 8.2: Observation 8.3 b), c): A bundle of parallel arcs with dependences (red double arrows). The numbers indicate arc costs. Arc a2 is not needed for any mincost solution, arc a1 only in the node-disjoint case.
90
CHAPTER 8. BASE GRAPH PREPROCESSING
If there existed a min-cost feasible solution using arc a1 , we could replace a1 by a3 and save one cost unit. This is a contradiction to cost optimality, so a1 will never be used in a min-cost solution and we can safely eliminate it. Almost the same reasoning applies to a2 . We do not gain less cost than with a3 , but given the existence of a3 , a2 need never be used in a min-cost solution. Hence, a2 can also be eliminated. Care has to be taken regarding a3 and a4 . The latter arc is externally dependent, so it might be the case that it becomes occupied in all min-cost solutions. Therefore, we cannot know beforehand whether we need a3 or not. According to Observation 8.3 b), arc a3 is a cheapest one from the bundle which is not externally dependent, and all arcs of same or higher cost are redundant. Note that this applies to Par(u, v) and Par(v, u) separately, leaving at least one arc from each bundle. Insertion or removal of dependences involving only parallel arcs do not have any effect due to nodedisjointness. So we are free to add or delete such dependences in order to maximize dependence sizes or minimize their number in a cover, cf. Section 4.4 (p. 42). Observation 8.3 c) applies to the arc-disjoint case only. It is an analogue of b) with the restriction that it refers to internally dependent bundles only. The reason is that in principle, parallel arcs may be used simultaneously in a solution. Only if they are internally dependent, their usage is mutually exclusive and we have the node-disjoint setting. In Figure 8.2, a1 is not internally dependent and thus no longer redundant. Yet, a2 and a3 are, and one of them can be eliminated. If, say, a2 had strictly less cost than a3 , we had to choose a3 out.
Algorithm ElimRedundant Algorithm ElimRedundant gives the details, how Observation 8.3 translates into pseudocode. Let N(v) := NG+ (v) ∪ NG− (v) denote the entire neighbourhood in G of a node v ∈ V .
Two working sets X,Y are maintained. X is a set of nodes to which 8.3 a) applies, as shown in Figure 8.1. Subroutine updateX() codes the formal condition on a node v for membership in X in step (20). It must not be a terminal or a terminal copy (note the TH , not TH ), it must have exactly two neighbours and no parallel incident arcs. If this condition is satisfied, v is added to X. In steps (1) and (2), all nodes of G are checked and X is initialized. Set Y contains bundles of parallel arcs to whom 8.3 b) or c) applies, as shown in Figure 8.2. They are detected by condition (22) in subroutine updateY() and Y is updated accordingly. In the arc-disjoint case, the bundles are not necessarily maximal, as explained above. In case there is no internally dependent bundle containing the input arc a, the argmax in step (24) is empty and Y remains unchanged. The initialization of Y is completed in steps (1) and (3). The main loop (4)–(19) spans the processing of X-nodes (loop (5)–(14)) and that of Y -bundles (loop (15)–(18)). It terminates as soon as both sets are empty and nothing is left to do. Note that it suffices to test X = ∅ in step (19), since at that point Y = ∅ from condition (15). After choosing some node v from X, its neighbourhood is given names u, w (step (6)) and v itself is removed from the graph (step (7)). The handling according to Figure 8.1 (i) is laid out formally in step (9) for the resulting forward arc. If there is also a backward arc (condition (11)), it is cared for in step (12). Steps (10) and (13) can be very essential: the new arc(s) may enter a parallel bundle which is subsequently subject to further reductions. So we perform an update of set Y with them. The dependence family A must also be adapted to the new situation (step (14)). Handling parallel arc bundles starts with choosing one from Y after step (15). With the chosen bundle, we find an arc b′ which is not externally dependent and cost-minimal with this property (step (16)). According to Figure 8.2, b′ is the one to stay while all other arcs with at least the same cost are deleted in step (17). Here, also some dependences may vanish. The next step (18) can again be essential: the elimination of arcs has possibly caused one or both of the common end nodes u, v to be applicable to Observation 8.3 a).
8.1. REDUNDANT ARCS AND NODES
Algorithm 10
91
ElimRedundant( G, H, A dep )
Input: Output:
by reference: instance π = (G, H, A dep ) of the Disjoint Paths Problem G reduced by redundant arcs and nodes
(1) (2) (3)
initialize initialize initialize
(4)
repeat
X := ∅, Y := ∅ updateX(v) for all v ∈ V updateY(a) for all a ∈ A
{ X ⊆V } { Y ⊆ 2A }
{ process nodes → Figure 8.1 } (5)
while X 6= ∅ do choose v ∈ X, X := X − v
(6) (7)
{u, w} := N(v) G := G − v
{ well-defined by updateX() }
(8) (9)
if Figure 8.1 case (i) then G := G + (u, w) c(u, w) := c(u, v) + c(v, w)
{ have forward arc }
(10)
updateY(u, w) endif
(11) (12)
if Figure 8.1 cases (iii) or (iv) then G := G + (w, u) c(w, u) := c(w, v) + c(v, u)
{ have backward arc }
updateY(w, u)
(13) endif (14)
update A dep accordingly endwhile
{ process parallel arcs → Figure 8.2 } (15) (16)
while Y 6= ∅ do choose B ∈ Y, Y := Y − B b′ :=
argmin
c(b)
b∈B: b not externally dependent
(17) (18)
(19)
G := G \ { b ∈ B − b′ | c(b) ≥ c(b′ ) } updateX(u) updateX(v) endwhile until X = ∅
continued on next page →
{ B ⊆ Par(u, v) for nodes u, v }
CHAPTER 8. BASE GRAPH PREPROCESSING
92 Algorithm 10
ElimRedundant
continued
updateX(v) Input: node v Output: set X updated (20) if v ∈ / TH and |N(v)| = 2 and |Par(u, v)|, |Par(v, u)|, |Par(v, w)|, |Par(w, v)| ≤ 1 then (21) X := X + v endif
{ let N(v) =: {u, w} }
updateY(a) Input: arc a Output: set Y updated (22) if |Par(a)| > 1 then if node-disjoint case then (23) Y := Y + Par(a) else (24) Y := Y + argmax |B|
{ arc-disjoint case }
B⊆Par(a): a∈B internally dependent
endif endif
Figure 8.3 shows a sample trajectory of Algorithm ElimRedundant, to be read row-wise. Eliminations taking place give rise to further ones, yielding a substantial reduction of the base graph. First, the path with inner nodes a, b is reduced to the single new arc c with cumulated cost of the three arcs. Next, node d is eliminated, producing the new arc e with added cost. Arc e is dependent to arc f at less cost, and is hence deleted. Subsequently, node g is replaced by the new arc h which is, in turn, no match for arc i dependent to it. In the arc-disjoint case, we get the resulting graph in the second row, far right. Otherwise, we can go on and remove arc i for parallel arc j with less cost. Finally, node k gives way to new arc l which is then rendered redundant. In the node-disjoint case, we are left with arc m alone. Analyzing the complexity of Algorithm ElimRedundant, we first define two numbers in order to give better estimates: β := max |Par(a)| a∈A
γ := max |{ A′ ∈ A dep | a ∈ A′ }| . a∈A
Clearly, β ≤ |A|, and we can assume β ≪ |A| in the vast majority of encountered cases. Analogously, we have γ ≤ |A dep | and γ ≪ |A dep | for practical purposes.
One call to subroutine updateX() needs O (1) for both steps (20) and (21). One call to updateY() takes O (1) for condition (22) and O (β) for the assignment to Y . The initializations of X,Y (steps (1)–(3)) call |V | times updateX() and |A| times updateY(). A closer look at Y shows that the added set is the same for all updateY()-calls on its own members. So only one call per distinct set is needed, yielding an amortized O (|A|) for the Y -init. One iteration of loop (5) uses ten actions at O (1) each, plus two calls to updateY() and one update of A dep . This adds up to O (β + γ). The loop can be called at most |V | times, as every time one node is deleted. One iteration of loop (15) accumulates two constant operations, steps (16) and (17) with O (β) each, and two updates of X. The total time for this is O (β). This loop not necessarily eliminates any arcs,
8.1. REDUNDANT ARCS AND NODES
t m s
s
3
t
t
s
1 s
g
G
1
f
s
2
j
1
k
2
1
1
t
a
b
1
s
d
h
2
l
i
c
3
2
3
t
s
m
2
result node-disjoint
result arc-disjoint
s t
s t
e
f
2
i
2
4
1
j
t
t
93
Figure 8.3: Sample trajectory of Algorithm ElimRedundant on the base graph G in the upper left. Red double arrows signify dependences. Blue arcs are products or remainders from the respective previous steps.
CHAPTER 8. BASE GRAPH PREPROCESSING
94
but can be called at most once for any arc, including the new ones generated in the X-loop. The latter introduces at most two arcs per iteration, hence the Y -loop may be executed at most |A| + 2|V | times. Concluding, we have established the following estimates: initialization: X-loop: Y -loop: total:
O (|V | + |A|) O (|V |(β + γ)) O ((|A| + |V |)β) O ((β + γ)|V | + β|A|)
Given that β, γ tend to be small in practice, we have a pseudo-linear algorithm. Section 8.3 presents our computational experience.
8.2 Canonical Embeddings Under certain conditions, it is possible to assign a partial or entire path to a demand, even though this path is not the only one available. Proposition 8.4. Given a directed instance π = (G, H, A dep ) of the Disjoint Paths Problem. Let d = (t, s) ∈ D. Suppose there exist two adjacent dominators u, v ∈ Dom(t) w. r. t. s. Suppose further that arc a = (u, v) is not externally dependent and represents a cheapest u-v-path. Then if π possesses a feasible solution, there exists an optimal feasible solution containing arc a in the embedding of demand d. In the arc-disjoint case, we have to additionally assume that dependences are not of the allowed type. This proposition provides us with a means for permanently assigning arcs to specific demands. We call an arc satisfying the assumptions canonical for d. We can reserve canonical arcs for their demands and forbid them for all others, thereby diminishing the state space of the instance. (For the notion of allowed dependence, cf. Definition 3.4 (p. 27).) Proof. (i) Node-disjoint case, u 6= s or v 6= t or |Par(d)| = 1. Let w. l. o. g. v 6= t. Then v must be a non-terminal, otherwise it were “private” for another demand, but must use v due to the dominator property. Thus, π were infeasible. So v is in fact “private” for demand d and the arc (u, v) also, i. e., fixing a for d does not take away any resource from other demands. If u = s and v = t, this same setting is assured by |Par(d)| = 1.
Consider some optimal feasible solution S for π. If a 6∈ S, we know that its end nodes u, v lie on the path Pd embedding d, see Figure 8.4. Exchanging a for the partial path Puv ⊆ Pd between u and v, we cannot increase the objective, since a is a cheapest u-v-path. Hence, Qd := (Pd \ Puv ) + a also is part of an optimal feasible solution. This only works under the assumption that a not be externally dependent. If it were, a could be possibly occupied from “outside”, making it unavailable for the exchange argument. (ii) Node-disjoint case, u = s and v = t and |Par(d)| > 1. In this case, the “private” argument no longer holds and exactly the demands in Par(d) = { d1 , . . . , dk } compete for the arc a = (s,t). Since node-disjointness implies arc-disjointness (cf. Section 4.2.3 (p. 38)), at most one of these demands can use a. As parallels, they are indistinguishable, so we assign a w. l. o. g. to demand d1 which becomes completely embedded. We diminish the instance to π′ := ( G − a, H − d1 , A dep ) and inductively continue until the assumptions of Proposition 8.4 no longer hold.
(iii) Arc-disjoint case. Dependences are not of the allowed type. Suppose there exists an optimal feasible solution S and a 6∈ S. Then the node-disjoint argument holds. If a ∈ S, but for another demand d ′ 6= d, we have the situation shown in Figure 8.5. Consider the path
8.2. CANONICAL EMBEDDINGS
95
Puv
Pd
s
s
Puv
Pd
t
t u
a
v
s′
Qd
s
s
u
a
v
d′
P
Qd
t′
t
t u
a
v
s′
Figure 8.4: Exchange argument in the node-disjoint case.
u
a
v
d′
Q
t′
Figure 8.5: Exchange argument in the arcdisjoint case.
Pd embedding d. We have u, v ∈ Pd due to the dominator property. Let Puv ⊆ Pd denote the partial path between u and v. Now define ′
Qd := (Pd \ Puv ) + a
′
Qd := (Pd − a) ∪ Puv . ′
′
and exchange Pd , Pd for Qd , Qd , respectively, in the solution S. Since the arc set in S stays unaltered, we retain an optimal solution where a is embedded for demand d as required. s
t
G u
v a
s′
t′
Figure 8.6: Proposition 8.4 arc-disjoint is in general not applicable if dependences are of the allowed type (red double arrow). The assumption about allowed dependences is important, as Figure 8.6 shows. Even though arc a satisfies all requirements w. r. t. demand d = (t, s), there is a unique feasible solution where a is not embedded for d. The reason is the allowed dependence that prohibits the exchange argument. A forbidden dependence (or none) would not cause this. There may be the case that Proposition 8.4 is applicable to one arc a, but several demands. We assign a to one demand d and diminish the instance, possibly by splitting d into two new demands, cf. Figure 7.5 (p. 76). Like in the proof (ii), we iterate on the new instance. Corollary 8.5. Given an instance π of the Disjoint Paths Problem, let d = (t, s) ∈ D. Suppose all nodes on a cheapest s-t-path P are dominators of t and all its arcs are not externally dependent. If π possesses a feasible solution, then there exists a min-cost feasible solution in which P embeds demand d.
96
CHAPTER 8. BASE GRAPH PREPROCESSING
Proof. Proposition 8.4 applies to all arcs on P, so we can assign them all to demand d which becomes completely embedded by P. According to this corollary, we can diminish the instance by a demand that becomes completely embedded.
Algorithm ElimCanonical Our algorithmic employment of Proposition 8.4 and Corollary 8.5 is given as Algorithm EmbedCanonical. Its correctness is guaranteed unless the dependences in an arc-disjoint instance are of the allowed type (step (2)). As we have seen, we might exclude all optimal feasible solutions. So in this case, we terminate already after the initialization step (1). Step (3) assigns the working set X to comprise all layered demands. In every iteration of loop (4), one demand d is chosen in whose layer we compute the dominator tree (step (5)). The latter is coded as an array of parent pointers idom[·] in a dominator tree, produced by our Algorithm DominTree (p. 81). If DominTree does not return anything, we know t is not reachable from s and the instance π is infeasible. We follow the path through the tree from terminal t back to terminal s with a current node v controlled by steps (6), (7), (14). We tentatively define an arc a = (idom[v], v) in step (8) which may or may not exist in the d-layer Gd . If it does, i. e., a ∈ Ad , we go on checking the assumptions of Proposition 8.4 in step (9): a must represent a cheapest path between its end nodes and it must not be externally dependent. The latter condition is evaluated on Gd w. r. t. A dep . If a passes these tests, we reserve it for demand d. This is accomplished in steps (10)–(12): we iterate over all other demands d ′ and diminish their layers ′ by their copies ad of arc a. The if clause (11) would not be necessary for step (12) alone, but we need to update the working set X for all altered layers, and those only (step (13)). Should the reservation process lead to an s-t-path for d, i. e., a complete embedding, we diminish the demand graph H by d in steps (15) and (16). Such a path may be accumulated over two or more while iterations (4) with demand d. A realistic complexity for Algorithm EmbedCanonical is hard to give. Several operation counts can only be very roughly estimated. Firstly, as we saw in the discussion of Algorithm DominTree, its worst case of O (|V |2 |A|) is far too high in practice. Secondly, the while loop (7) performs O (|V |) iterations that in most cases are just rather few. Thirdly, the loop (4) may do more iterations than |DH | due to X-updates in step (13). Yet, the obvious upper bound of |A| on this number will hardly be got close. Fourthly, the speed to check condition (15) depends on the data structure used for recognizing entire paths that might have been accumulated arc-wise over several updates. So we refer the reader to an empirical evaluation in the next section.
8.3 Computational Experience Applied to our example problems, Algorithm Preprocess provides considerable graph reductions while consuming acceptably low execution time in all cases. Table 8.7 presents the graph sizes before and after preprocessing. In four instances, canonical arcs were found and embedded. These arcs often, yet not always, constitute entire paths, hence the decrease of |D| and a slightly over-proportional running time in those cases. All times were averaged over 1000 identical runs. Figures 8.8 and 8.9 show two preprocessed base graphs from the telecommunications series. We did not test the rand* instance family, as they do not get reduced by Algorithm Preprocess.
8.3. COMPUTATIONAL EXPERIENCE
EmbedCanonical( G, H, A dep )
Algorithm 11 Input: Output:
97
by reference: instance π = (G, H, A dep ) of the Disjoint Paths Problem layered graphs (G , H ) for π with reserved arcs or paths
G , H from G, H according to Definition 4.1 (p. 35)
(1)
initialize
(2)
if arc-disjoint and dependences are allowed then return (G , H ) endif
(3)
initialize
(4)
while X 6= ∅ do choose d = (t, s) ∈ X X := X − d
(5)
X := DH
idom[·] := DominTree(Gd , s, −, rev. DFS postorder )
{ cf. DominTree (p. 81)}
{ follow t-s-path in tree } (6) (7) (8)
v := t while v 6= s do w := idom[v], a := (w, v) d
if a ∈ Ad and cd (a) = distcGd (w, v) and a not externally dependent then
(9)
{ a is canonical arc }
{ reserve arc a for demand d }
for d ′ ∈ DH − d do ′ ′ if ad ∈ Ad then ′ ′ ′ Gd := Gd − ad X := X + d ′ endif endfor
(10) (11) (12) (13)
{ diminish other layers } { update X }
endif (14)
v := w endwhile
{ update demand graph } (15) (16)
if reserved arcs for d form an s-t-path then H := H − d endif endwhile return (G , H )
{ d completely embedded } { diminish demand graph }
CHAPTER 8. BASE GRAPH PREPROCESSING
98
instance tele354e19 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n19 tele368n73 tele978n16 tele1039n26 tele8072n20 slab402n6 slab520n7 slab596n8 vehi24940n10 vehi33000n16 vehi46980n20
|V |
185 164 434 617 676 6894 185 164 434 617 6894 211 272 311 5460 6260 7229
original |A| |D|
354 368 978 1039 1107 8072 354 368 978 1039 8072 402 520 596 24940 33000 46980
18 73 16 26 117 20 18 73 16 26 20 6 7 8 10 16 20
|A dep |
58 83 268 300 0 334 58 0 268 300 334 46 50 54 – – –
|V |
164 134 347 317 295 832 163 133 343 306 669 188 248 273 4234 5296 6454
preprocessed |A| |D| |A dep |
332 337 891 715 657 1832 328 328 872 672 1352 365 481 531 17242 24316 36610
18 57 15 26 74 20 18 61 16 26 20 6 7 8 10 16 20
55 82 260 241 0 74 55 0 241 210 47 46 50 54 – – –
canon.
time [ms]
0 16 1 0 50 0 0 22 0 0 0 0 0 0 0 0 0
10 180 40 60 1260 840 10 40 30 50 860 10 10 10 540 1150 2170
Table 8.7: Algorithm Preprocess: base graph reductions. The columns numeralize the sizes of G, H, A dep before and after preprocessing. The second last column contains numbers of canonical arcs that were embedded. Rightmost column: running times.
8.3. COMPUTATIONAL EXPERIENCE
1107 edges 657
676 nodes 295
99
Figure 8.8: Preprocessed base graph of tele1107e117
CHAPTER 8. BASE GRAPH PREPROCESSING
100
617
1039
nodes
edges
306
672
Figure 8.9: Preprocessed base graph of tele1039n26
Chapter 9
Upper Bounds Computation The third essential ingredient in Algorithm BranchBound (p. 59) is the employment of strong upper bounds UB(π′ , xLB ) in the bounding steps (6)–(10), cf. Definition 6.1 (p. 58). There are two major sources for deriving such bounds. Firstly, if an instance is feasible, any of its solutions S provides the bound given by its objective value c(S). Secondly, considerations about the desired disjointness lead to bounds that are valid for all feasible solutions. These are especially suited for infeasible instances where they represent the only upper bounds available. In this chapter, we present our work concerning this field. In the first four sections, we develop heuristics of different sophistication for constructing feasible solutions by guided chance. The last three sections are devoted to absolute bounds without feasible solutions. Definition 9.1. Given an instance π = (G , H , A ) ∈ Π. In this chapter, we often have some partial feasible solution S = { Pd | d ∈ D′ ⊆ D } consisting of one path for each demand in some subset D′ of D. The residual instance π − S = (G ′ , H ′ , A ′ ) is defined as follows:
G ′ := G − Aocc (S) H ′ := H − { d ∈ DH | ∃ Pd ∈ S } A ′ := { A′ ∈ A | |A′ \ Aocc (S)| ≥ 2 } . Recall that Aocc (S) ⊆ AG is the union of the arcs of S with all arcs occupied by S, according to Definition 6.3 (p. 62). The residual base graph G ′ is the original one less the embedded or occupied arcs while the residual demand graph H ′ contains all demands not embedded by S. The residual constraint family A ′ consists of those constraint sets A′ ∈ A that contain at least two arcs more than the ones embedded or occupied by Pd . Otherwise, they are redundant. π−S represents the remainder of all data of π after embedding the paths of S. Any feasible solution S′ to π − S is readily enhanced to a feasible solution S ∪ S′ of π. If S contains just one path Pd , we also write π − Pd instead.
In Section 4.2 (p. 35), we have refined the original Disjoint Paths Problem by letting each d-layer in G have its own cost function cd : Ad → R+ . In order not to lose this detail, we define the shorthand notation c(S) for its objective value as c(S) :=
∑ cd (Pd ) .
Pd ∈S
Since every path “knows” the demand it embeds, there is no ambiguity in writing c(Pd ) for cd (Pd ). In Algorithm BranchBound, we called the upper bounds function by the term UB(π′ , xLB ) where xLB is a state vector returned by the lower bound computation called before. We will see in Chapter 10 101
CHAPTER 9. UPPER BOUNDS COMPUTATION
102
(p. 129) how to compose such vectors. For the purposes there, it does not make a difference whether xLB denotes the states given by the Unified Model (IP) in the node-arc version (p. 37) or its arc-path relative (IPp) (p. 50). In using these states for upper bounds however, it is more convenient to assume the states are entire paths. We are only interested in those paths P whose state variables are strictly positive. We gather all paths of some demand d in the set (9.1)
P d (x) := { P is a path embedding demand d | x(P) > 0 } .
This implies an important difference in this chapter between a path family P = (P d (xLB ))d∈D and the sets P d in the Unified Model (IPp) : not all possible paths are members, but the selection produced by LB(π′ ) through its output state vector. Concentrating on these paths has got two advantages: • they have already played a role and appear “significant” for the instance π′ ,
• they are mostly not too many and thus amenable for practicable heuristic treatment.
Put in other words, we use restricted path sets as an approximation to the Model (IPp) with unrestricted sets. Consequently, the output state vectors xUB of function UB also correspond to path sets: either no solution is found and the zero vector is returned, or for each demand d there is exactly one embedding path Pd ∈ P d (xUB ), i. e., xUB (Pd ) = 1, and the rest are zeroes. Note that this convention does not necessarily mean feasible solutions, i. e., disjoint paths.
9.1 Untwist Heuristic Algorithm HeurChoose We start our presentation with a simple and basic heuristic, Algorithm HeurChoose. It starts with the zero vector in step (1) and checks in step (2) whether all path sets P d = P d (xLB ) are nonempty. Only in that case there may be a feasible solution. Then, it singles out one path P′ from each set by lexicographically optimizing two criteria: first, the state value xLB (P′ ) is maximal (step (4)), and second, among all those paths, the cost c(P) is minimal (step (5)). The rationale behind this is that paths with a high state value appear more “important” than the others. The costs merely break ties. Finally, in step (6) the chosen path is represented by a state value of one and the entire vector returned in step (7). Algorithm HeurChoose in practice very rarely finds feasible solutions. Its strength is high speed:
O (|P |) which is clearly the best achievable, given the input of P . And observably, it does a good job
when the state vector xLB is near integral. This often happens for instances π′ which have been brought close to integral LP optimality by the branching process. In these cases, many demands, if not all, are already embedded by one single path. Then, the set P ′d assigned in step (4) clearly is a singleton and yields the path P′ in step (5) immediately. This happens by tendency more frequently towards the end of the Branch-and-Bound process when the bounds LB(π′ ) and U are already close to each other. So letting HeurChoose work throughout the solver run is not costly, but ensures that near-optimal solutions are detected. Step (4) of Algorithm BranchBound (p. 59) tests xLB for “full” feasibility which is still negative here. Besides this observation, we use Algorithm HeurChoose as an initializer in Algorithm HeurUntwist (p. 106).
Algorithm HeurCheapest The next heuristic, Algorithm HeurCheapest, is not to be called from BranchBound. It is a subtask routine for call from other upper bound heuristics. This purpose is visible in the parameter list, where the
9.1. UNTWIST HEURISTIC HeurChoose( π, xLB )
Algorithm 12 Input: Output:
103
instance π = (G , H , A ) ∈ Π with objective function c state vector xLB of a path family P = (P d (xLB ))d according to Equation (9.1) state vector xUB for π representing a solution, or the zero vector if none was found
(1)
initialize
xUB := 0
(2) (3) (4)
if P d = 6 ∅ for all d ∈ D then for d ∈ D do P ′d := argmax xLB (P) P∈P d
P′ := argmin c(P)
(5)
P∈P ′d
{ otherwise no feasible solution } { assign entire set } { assign one path }
xUB (P′ ) := 1 endfor
(6) endif (7)
return xUB
state vector xLB is absent. HeurCheapest tries to compute a feasible solution by recursively embedding cheapest paths in different demand orders. In principle, it starts with an empty current best solution Sbest (step (1)), builds up feasible solutions path by path from scratch in backtrack() (step (2)), and returns the cheapest one found in step (3). The main effort lies in the subroutine that accepts an instance π of the Disjoint Paths Problem and a partial solution S with embedding paths for all demands not in π. Clearly, if H = ∅ (step (4)), all demands are not in π and thus S represents a feasible solution. By the bounding logic in step (13), this situation is only encountered if c(S) improves on the current upper cost bound of C. So no further checking is necessary and we update Sbest and C in step (5). Right there, we might even be able to identify an optimal solution. To this end, HeurCheapest has got the parameter L which serves as a lower cost bound . Comparing it to the new upper bound of C, condition (6) detects optimality, in which case we immediately terminate HeurCheapest. Meaningful L-values are available in the context of Algorithm BranchBound. Step (7) serves two purposes. Firstly, it checks the necessary criteria described in Chapter 7 (p. 68) on π. This may lead to a false answer and we terminate backtrack(), as there is no feasible solution to π. Secondly, function NC possibly reduces the base graph G of π by structural arguments, which is a practical advantage in the ensuing calculations of loop (8). All three objects of steps (9)–(11) — Pd , π′ (d), Ld — are needed in the next paragraph, loop (12). Path Pd is an embedding path for demand d with minimal cost, delivered by, for instance, Dijkstra’s Algorithm. Step (10) defines the subinstance π′ (d) = π − Pd reduced by embedding this path for its demand. The scalar number Ld finally represents a trivial lower cost bound on π′ (d). It sums up the cost of Pd itself plus the minimum costs incurred by all paths for the remaining demands d ′ ∈ DH ′ (d) . We now sort the demands d ∈ DH into increasing order of their Ld values. In this order, loop (12) takes one demand at a time and checks whether the global lower cost bound of c(S) + Ld equals or exceeds the current best upper bound C. The term c(S) must be added, since the subinstance π′ (d) is oblivious to S by construction. If condition (13) is satisfied, neither the current d nor any successor of it can improve the best known solution and backtrack() terminates. Otherwise, we recursively call backtrack() on π′ (d) with S enhanced by the embedded path Pd (step (14)). By the recursion, Algorithm HeurCheapest is not a polynomial one. It might enumerate all possible
CHAPTER 9. UPPER BOUNDS COMPUTATION
104
HeurCheapest( π, L, C )
Algorithm 13 Input: Output:
instance π = (G , H , A ) ∈ Π with objective function c lower cost bound L, upper cost bound C state vector xUB for π representing a feasible solution, or the zero vector if none was found { current best solution }
Sbest := ∅
(1)
initialize
(2)
backtrack(π, ∅)
(3)
return state vector of Sbest
backtrack(π, S) Input: instance π = (G , H , A ) ∈ Π, disjoint embedding S for all demands 6∈ DH Output: Sbest possibly updated { end recursion } (4) (5) (6)
if H = ∅ then Sbest := S, C := c(S) if C = L then goto (3) endif
{ feasible solution found } { update best solution } { Sbest is optimal } { terminate prematurely }
return endif (7)
{ π is infeasible }
if NC(π) = false then return endif
{ compute lower cost bounds } (8) for d = (t, s) ∈ DH do (9) let Pd := a cheapest s-t-path w. r. t. c in Gd (10) let π′ (d) = (G ′ (d), H ′ (d), A ′ (d)) := π − Pd (11) let Ld := c(Pd ) + distcG ′ (d) (s′ ,t ′ ) ∑ endfor
d ′ =(t ′ ,s′ )∈DH ′ (d)
{ residual instance } { trivial lower bound }
{ embed paths recursively } (12) for d ∈ DH in increasing Ld order do (13) if c(S) + Ld ≥ C then return else (14) backtrack( π′ (d), S + Pd ) endif endfor
{ remaining paths Pd too costly } { recursive call }
9.2. CLIQUE HEURISTIC
105
sequences of demands and thus generate an entire permutation tree. All we can say is that each call to backtrack() is polynomial if the implementation of NC is. Execution has to be safeguarded by a time p limit in proportion to the instance size. We chose 0.001 · |DH | |AG | in seconds.
Algorithm HeurUntwist As said, HeurCheapest is a building block for other heuristics. One of them is Algorithm HeurUntwist. It combines the capabilities of the former and HeurChoose with the following idea. In the input state vector xLB , there often occur paths disjoint from all other paths. These appear to be good candidates for fixation while the demands of the other, conflicting, paths are heuristically rerouted. Figure 9.1 shows the implied partitioning of an infeasible solution into a disjoint and a conflicting part.
G
S
Figure 9.1: Algorithm HeurUntwist: an infeasible solution is partitioned into its disjoint (green) and conflicting (red) paths. The latter are re-embedded heuristically. Selecting the disjoint paths is done in steps (1)–(4) of Algorithm HeurUntwist. First, HeurChoose selects one path per demand from xLB . Clearly, if no such selection is found, there is no need to proceed (step (2)). Otherwise, we denote the chosen path for demand d as Pd in step (3). The set S subsequently comprises those paths disjoint to all respective others (step (4)). The now regard the paths of S as fixed and define the residual instance π′ = π − S in step (5). For the intended call to HeurCheapest in step (8), we need a lower and an upper cost bound. These are assigned in steps (6) and (7) in the appropriate way. We assume here that the local lower bound LB(π) either is computable from the argument xLB or accessible from outside as a context value. After the subcall, the state vector x′ returned may or may not represent a feasible solution to π′ . If so, the superposition of x and x′ describes a feasible solution to π and is returned in step (10). Otherwise, we fail and return zero. In both cases, we implicitly extend the dimension of x′ to that of x by filling up with zeroes. Holmberg and Yuan [HY00] treat a problem in Capacitated Network Design related to the Disjoint Paths Problem. It allows arbitrary positive integral demand values and arc capacities. The combinatorial structures embedding the demands are general flows. The authors devise a heuristic specializing to Algorithm HeurUntwist in our special case: they sort the demands in some favourable order and embed them successively by min-cost flow computations.
9.2 Clique Heuristic Given an instance π = (G , H , A ) ∈ Π. In the formulation of Model (IPp) (p. 50), the Disjoint Paths Problem can be interpreted as the problem of finding a clique with specific properties. To see this, we
CHAPTER 9. UPPER BOUNDS COMPUTATION
106 HeurUntwist( π, xLB , C )
Algorithm 14 Input:
Output:
instance π = (G , H , A ) ∈ Π with objective function c state vector xLB of a path family P = (P d (xLB ))d upper cost bound C state vector xUB for π representing a feasible solution, or the zero vector if none was found
{ define set S of disjoint paths } (1) (2)
x := HeurChoose( π, xLB ) if x = 0 then return x endif
(3) (4)
let Pd := the one path P for demand d with x(P) = 1, for all d ∈ DH ′ let S := { Pd | Aocc (Pd ) ∩ Pd = ∅ for all d ′ 6= d } { all disjoint paths }
{ choice of one path per demand } { no feasible solution }
{ define subinstance less S } (5) (6) (7)
let π′ := π − S let L′ := LB(π) − c(S) let C′ := C − c(S)
{ embed remaining paths } (8)
x′ := HeurCheapest( π′ , L′ , C′ )
if x′ = 0 then return x′ else (10) return x + x′ endif (9)
{ no feasible solution } { state vector of S and feasible rest }
construct an undirected auxiliary graph Aux = Aux(π) = (V , E ) as follows: (9.2)
V :=
Pd
[
P d = all paths of demand d, cf. Definition 4.7 (p. 49)
d∈DH d
d′
E := { {P , P } ∈
V
2
′
| d 6= d ′ and Aocc (Pd ) ∩ Pd = ∅ } .
All paths in the model together constitute the vertices V which we distinguish from the nodes of G . Two vertices are adjacent if and only if their represented paths embed different demands and are mutually disjoint. Figure 9.2 illustrates this construction on our example graph demo37n3. Each clique S ⊆ V in Aux is a feasible partial solution S = {Pd }d to π. Feasible full solutions map onto cliques of size |DH |. These are obviously the largest possible ones due to the adjacency condition d 6= d ′ . An optimal feasible solution to π is a clique S of size |S| = |DH | with minimum cost.
In principle, we could model the Disjoint Paths Problem entirely in terms of Aux and solve it by means of a suitable search algorithm. Yet two strong disadvantages let us refrain from this approach. Firstly, there are exponentially many paths in the model. Their generation alone is prohibitive in time and memory. The edges E would have to be coded implicitly, leaving a certain linear time overhead for adjacency tests. Secondly, Maximum Clique is already NP -hard without costs. So there is very little hope for a polynomial time algorithm, unless P = NP. Any known algorithm would waste vast amounts
9.2. CLIQUE HEURISTIC
107
1
4
G 8
3
9
7
2
13 5
14
12
6 11
10
17
16
15
18
Available paths:
19 6–2–12–8–9
6–2–1–4–8–9 2
3–7–12–16
6–7–12–8–9
3–1–2–12–16
6–7–4–8–9
3–1–4–8–12–16
6–2–1–8–9
3–1–8–12–16
6–2–1–4–9 6–7–4–9 6–7–1–8–9
△
13–17–19–18–15
6–2–12–19–17–14–9
13–12–19–18–15
6–7–12–19–17–14–9
9
Aux(π)
9 △
8
2
11
7 5
5
6
6
7
7
7
8
9
11
12
Figure 9.2: Construction of the auxiliary graph Aux on demo37n3. The shapes signify different demands, the numbers are path costs.
CHAPTER 9. UPPER BOUNDS COMPUTATION
108 of time handling the flood of cliques in Aux.
But nevertheless, this idea is useful in “small” cases. We again use the restricted path sets P d (xLB ) according to Equation (9.1) (p. 102) as an approximation to the Model (IPp). On them, we define the auxiliary graph and search for large cliques of low cost. The following definition makes the notions used more precise. Definition 9.2. Given the graph Aux = (V , E ) and a clique S ⊆ V . We say S is maximal (by inclusion) if S cannot be enlarged, i. e., there exists no vertex u ∈ V \ S : NAux (u) ⊇ S. We call S maximum if it is maximal and of largest possible cardinality among all maximal cliques. We further call S full if |S| = |DH |, in which case S corresponds to a feasible solution to π.
Which algorithm is best for this task? Pardalos and Xue [PX94] as well as Bomze et al. [BBPP99] give good general surveys over the Maximum Clique Problem . Several authors propose enumerative algorithms for determining the size of a maximum clique, thereby giving a witness by returning one such clique [CP90, MS94, BX96, GR96]. In designing a clique based heuristic, generating one maximum clique may be not enough for finding a better upper bound than the current best one. So we resort to algorithms for enumerating all maximal ¨ ¨ cliques of a graph. Arioshi et al. [AIOT77] and Osterg˚ ard [Ost02] present Dynamic Programming type methods that gradually build up a growing (and maybe prohibitively large) structure, delivering the desired cliques at the end of their algorithm’s execution. This characteristic is unfortunate for us, since a heuristic must be fast and not necessarily exhaustive. A backtracking type approach is better suited to our needs, as it tends to produce its first outputs fast and thus execution may be limited by a (tight) time budget. Eppstein [Epp05] devises such an algorithm, showing that it is highly efficient on some density restricted graphs classes. Unfortunately, our auxiliary graphs do not fall in any of these classes in general. Sorting out suitable maximal clique algorithms, we finally came to use the ideas of Bron and Kerbosch [BK73], who developed a fast backtracking scheme reading as follows. (The in-contiguous lettering is an anticipation of our adaptation of this algorithm where same letters mark the same steps.) MaxClique( S, F, V ) Input: current vertex set S forming a clique current forbidden vertex set F current candidate vertex set V Output: all maximal cliques (f)
(q)
if F = V = ∅ then handle S return endif
{ S is maximal clique }
u := argmin |V \ N(v)|
{ prefer F-minimizer if tie }
for v ∈ V \ N(u) do MaxClique( S + v, F ∩ N(v), V ∩ N(v) ) F := F + v, V := V − v endfor
{ enumerate max. cliques ⊇ S + v } { update F and V }
v∈F∪V
(r) (s) (t)
{ end recursion }
Their procedure is initially called as MaxClique( ∅, ∅, V ). It delivers large maximal cliques fast and by tendency as its early outputs. During the course of a run, all maximal cliques are recognized exactly once in step (f) where they can be handled in any way. The basic idea of the algorithm is to
9.2. CLIQUE HEURISTIC
109
tentatively add one vertex v at a time to the current clique S and recursively complete S to all maximal cliques containing the nodes hitherto present (steps (r) and (s)). Figure 9.3 shows a possible trajectory of maxClique() on the auxiliary graph of Figure 9.2. The entire search tree is to be read in a Depth First manner, always beginning with the leftmost child. The subgraphs in the tree are the residual graphs at the respective stages. The vertices chosen in each step (r) are shown circled together with the shapes of the demands they embed. Down the tree, only the neighbours of these vertices remain. For clarity, eliminated vertices are left as isolated dots. The current clique S in any tree node consists of all circled vertices on the path up to the root. Graphs framed in red are the maximal cliques being output in step (f). Red circled vertices lie in the forbidden set F, cliques containing them are maximal but were output earlier. This straightforward approach has the disadvantage of generating every maximal clique of size k in all k! sequences possible. In order to break these high symmetries, the authors introduce a set F of forbidden vertices. F accumulates all vertices v after the enumeration of the maximal cliques containing S + v as subsets. The maximality of some set S in step (f) is now recognized not if V = ∅ (no more extension possible), but only if additionally F = ∅. This condition ensures there is no vertex 6∈ S adjacent to all of S, since this would contradict maximality. The choice of u in step (q) serves fan-out minimization in loop (r).
Algorithm HeurClique We added more bounding criteria to the search and enhanced the clique construction process with Algorithm HeurCheapest (p. 104). Our heuristic, based on the ideas of MaxClique, is called HeurClique. First, we initialize the auxiliary graph Aux = Aux(π) and the empty solution-to-be Sbest in steps (a) and (b). The entire work is deferred to the subcall of maxClique() in step (c) before we return Sbest , now possibly containing a feasible solution (step (d)). The most important object in the body of maxClique() is the residual instance π′ defined in step (e). The handling of a maximal clique S is made explicit in steps (f)–(k). Upon recognition in step (f), we try to heuristically complete the embedding S by calling Algorithm HeurCheapest on the residual instance π′ in step (g). Note that not necessarily all demands are being embedded in S, since S may not be maximum. If indeed S is maximum, then H ′ = ∅ and HeurCheapest must return x′ = 0. Hence the ‘or’ in condition (h). If HeurCheapest is given a nontrivial π′ and is able to find a feasible solution x′ for it, we join its paths to those of S (step (i)) and get a feasible solution S′ for π. By the bounding logic of step (o) and inside HeurCheapest, using the local upper bound C − c(S), we know that c(S′ ) < C. Consequently, we update Sbest and C in step (j). If even condition (k) holds, we know Sbest is optimal and terminate HeurClique immediately. The next paragraph (l)–(o) is concerned with bounding criteria. The approach to bounding is analogous to steps (7)–(11) and (13) of Algorithm HeurCheapest. In step (l), we check whether the residual instance is at all structurally feasible and possibly reduce its data. If no structural bound occurs, we proceed to compute a lower cost bound for π′ , consisting of the two sums in step (n). The first one scans through the paths available in the current vertex set V . Their corresponding demands are subsumed in the set D defined in step (m). For every demand present in D, we seek out a path with minimal cost. The second sum cares for all remaining demands DH ′ \D that have lost their entire path sets Pd in the process. Here, we add up the cost of a cheapest path each. The comparison to the upper bound C (step (o)) is the same as in step (13) of HeurCheapest. If π′ is not ruled out up to here, we call a special routine Reduce in step (p), being discussed next. It possibly diminishes the current vertex set V in such a way that no full clique with minimal cost is lost. With this reduced set V , we enter the remaining steps (q)–(t) known from Algorithm MaxClique. By the generally exponential number of cliques to enumerate, Algorithm HeurClique is not polynomial. We operate it under a time limit of 5 · 10−5 |P |2 .
CHAPTER 9. UPPER BOUNDS COMPUTATION
forb
3-cliques
2-clique 2-clique
Aux
forb
2-clique
1-cliques
forb
2-cliques
110
Figure 9.3: Sample trajectory of Algorithm MaxClique on the auxiliary graph of demo37n3, cf. Figure 9.2. The shapes signify the different demands of H. Tree nodes framed in red are maximal cliques. Vertices circled in red are members of the forbidden set F.
9.2. CLIQUE HEURISTIC HeurClique( π, xLB , C )
Algorithm 15 Input: Output:
111 our adaptation of Algorithm MaxClique
instance π = (G , H , A ) ∈ Π with objective function c state vector xLB of a path family P = (P d (xLB ))d , upper cost bound C state vector xUB for π representing a feasible solution, or the zero vector if none was found Aux(π) =: (V , E ) from P according to Definition 9.2 Sbest := ∅
(a) (b)
initialize initialize
(c)
maxClique( ∅, ∅, V )
(d)
return state vector of Sbest
maxClique( S, F, V ) Input: vertex sets S forming a clique, forbidden set F, candidate set V Output: Sbest possibly updated (e)
let π′ = (G ′ , H ′ , A ′ ) := π − S
{ residual instance less S }
{ handle maximal clique } (f) (g)
if F = V = ∅ then x′ := HeurCheapest( π′ , LB(π) − c(S), C − c(S) )
(h) (i) (j) (k)
if H ′ = ∅ or x′ 6= 0 then S′ := S ∪ { paths coded in x′ } Sbest := S′ , C := c(S′ ) if C = LB(π) then goto (d) endif endif
{ update best solution } { Sbest is optimal } { terminate prematurely }
return
{ end recursion }
endif { check bounding criteria } (l)
{ S is maximal clique } { solve residual instance }
{ π′ is infeasible }
if NC(π′ ) = false then return endif
(m) let V =: {P ′d }d∈DH ′ , D := { d ∈ DH ′ | P ′d 6= ∅ } min ∑ P∈ P
c(P) +
(n)
let L :=
(o)
if L + c(S) ≥ C then return endif
d∈D
′d
{ feasible solution found }
∑
distcG ′ (s,t)
d=(t,s)∈DH ′ \D
{ lower cost bound } { embedding S too costly }
{ recursively extend clique S } (p)
Reduce(V )
{ diminish vertex set }
(q)
u := argmin |V \ N(v)|
{ prefer F-minimizer if tie }
for v ∈ V \ N(u) do maxClique( S + v, F ∩ N(v), V ∩ N(v) ) F := F + v, V := V − v endfor
{ all max. cliques ⊇ S + v } { update F and V }
v∈F∪V
(r) (s) (t)
CHAPTER 9. UPPER BOUNDS COMPUTATION
112
Vertex Set Reduction When enumerating all maximal cliques with Algorithm HeurClique, we generate many more objects than are actually needed. We are really interested in “large” cliques of “low” cost only. So we want to control the enumeration process more strongly and try to avoid generating “too small” or “too expensive” cliques. This can be achieved by taking advantage of the special multipartite structure of the graph Aux. In this subsection, we devise a procedure for diminishing its vertex set V with respect to this goal. First, we make precise what we mean by “large size” and “low cost”. Maximal cliques S come in different sizes |S|. If S is not full, one or more demands are not represented in it by a path. For these cases, we have incorporated Algorithm HeurCheapest into Algorithm HeurClique in step (g), as the latter heuristic is not bound to the given paths V . It may be able to complete S to a full clique. Yet, we have to take care that HeurCheapest does not have too much work to do. Definition 9.3. We call a clique S large if it satisfies |S| ≥ |D H | − κ for some fixed parameter κ ∈ N . Largeness is thus an absolute size measure. We call a clique S cheapest if c(S) =
min
S′ clique in Aux: |S′ |=|S|
c(S′ ) .
Cheapness is a cost measure relative to the size class of a clique. We now develop criteria allowing us to eliminate a vertex if it cannot lie in a large or cheapest clique. Definition 9.4. Let u ∈ V be a vertex. Let further d ∈ DH be a demand and P d ⊆ V its associated path list/vertex set in Aux according to Equation (9.2) (p. 106). If P d ∩ N(u) 6= ∅, we call d a friend of u. We denote by
D (u) := { d ∈ D | P d ∩ N(u) 6= ∅ } the set of all friends of u. Note that D (u) never contains the demand embedded by the path u itself, thus |D (u)| ≤ |DH | − 1 for all u ∈ V .
In Figure 9.2, consider the leftmost vertex u in the bottom partition demand P . It has got one neighbour in the partition P △ and none in the third one, P 2 . Hence, according to Definition 9.4, demand is a friend of u while demand 2 is not: D (u) = { }. Proposition 9.5 (Friend Criterion hFC i). Given the graph Aux = (V , E ). If there exists a vertex u ∈ V : |D (u)| < |DH | − κ − 1 , then u lies in no large clique.
Proof. By the multipartite structure of Aux, vertex u ∈ V is contained in a maximal clique S of size |S| ≤ |D (u)| + 1. If u satisfies the assumption, we have |S| < |DH | − κ. Hence, removal of u will not destroy a large clique. The Friend Criterion hFC i states we can safely eliminate all vertices whose friends number below a certain threshold. Practicable choices are κ ∈ {0, 1, 2, 3}. Proposition 9.6 (Exchange Criterion hEC i). Let u, v ∈ V be nonadjacent vertices and c(u) > c(v). If N(u) ⊆ N(v) then u lies in no cheapest clique.
9.2. CLIQUE HEURISTIC
113
Proof. Consider a maximal clique S containing vertex u. By neighbourhood containment, there is another clique S′ := S − u + v of same size and cost c(S′ ) = c(S) − c(u) + c(v) < c(S). Hence, removal of u will not destroy a cheapest clique. The Exchange Criterion hEC i asserts we can diminish the vertex set by all vertices satisfying a certain local condition, namely neighbourhood containment and cost comparison. Note that short paths tend to have low cost and few disjointness conflicts at the same time. So there is a tendency that short paths satisfy both conditions, promising good applicability of hEC i.
Example 9.7. As an illustrated example, Figure 9.4 depicts the effects of the two criteria hFC i, hEC i on the auxiliary graph of demo37n3 (cf. Figure 9.2). In the first iteration, only the Friend Criterion is at work. We set κ = 0, i. e., we want full cliques with cardinality three only. hFC i eliminates the circled vertices from the start graph. All of them have neighbours in one partition only. For clarity, eliminated vertices remain as hollow dots. The numbers mean path costs c(u). In the second iteration, the Exchange Criterion deletes the circled vertices from the middle graph. Each of them can be exchanged by cheaper vertex in the same partition. The resulting reduced graph is considerably smaller.
Algorithm Reduce Both the Friend and the Exchange Criteria represent the key ideas for the iterative reduction scheme Algorithm Reduce of our graph Aux. The working set X is initialized with all vertices in step (1). During the execution of loop (2), hFC i is checked first on the current vertex u (step (3)). If it is satisfied, we update V and X in function update. It means that vertex u is redundant and thus removed from V (step (10)), thereby altering the graph. There may now be more vertices for which one criterion is satisfied. If any, they must lie in N(u), as both criteria have to do with neighbourhoods. Only there changes can occur. So X is updated by N(u) in step (11). If hFC i is not satisfied, we check on hEC i in steps (6) and (8). Here we need the loop (5), as hEC i always compares two vertices. We scan over all non-neighbours of u according to Proposition 9.6. If we find the Exchange Criterion satisfied for any pair u, v, we call the corresponding update (steps (7) and (9)). Note that the neighbourhoods N(u), N(v) always mean the current ones, i. e., after reductions of V . The routine terminates as soon as no more changes occur and X runs empty. The complexity of Algorithm Reduce amounts to: • O (1) for evaluating hFC i. We use an array data structure storing the number of friends for each vertex which is simultaneously updated in the V -reduction (10). Initialization of this array costs a one-time O (|V |2 ).
• O (|V |) computations of hEC i in loop (5) involving an O (|V |) inclusion test each. We use bit sets with a small O -constant. • an amortized O (|V | + |E |) number of iterations, since eliminations and the number of while iterations are connected: every vertex is reinserted into the queue only if it has lost a neighbour. Therefore, we have at most |V | eliminations and |E | insertions. Summing up, Algorithm Reduce is of order O (|V |2 (|V | + |E |)). This appears to be very costly, yet in practice we have observed that most often vertices are already in X upon reinsertion when we use a queue data structure. Also, it has proven beneficial to precede the exchange test N(v) ⊆ N(u) by a check of the obvious necessary condition |N(v)| ≤ |N(u)|, where the cardinalities are maintained in a separate array.
CHAPTER 9. UPPER BOUNDS COMPUTATION
114
Aux △ 2
Friend Criterion
9
9 △
2 7 5
6
7
7
7
8 Exchange Criterion
2
△
full clique with cost 20 full clique with cost 23
Figure 9.4: Effects of the criteria hFC i and hEC i on the auxiliary graph of Figure 9.2 (p. 107). The respective circled vertices are deleted. The digits in the middle part mean vertex costs.
9.3. RELAX HEURISTIC Reduce( V )
Algorithm 16 Input: Output:
by reference: vertex set V = {P d }d∈D of a |D|-partite graph V possibly reduced X := V
(1)
initialize
(2)
while X 6= ∅ do choose u ∈ X, X := X − u
(3) (4) (5) (6) (7) (8) (9)
115
if |D (u)| < |D| − κ − 1 or update(u) else for v ∈ V \ N(u) do if c(v) < c(u) and N(v) ⊇ N(u) then update(u) else if c(v) > c(u) and N(v) ⊆ N(u) then update(v) endif endfor endif endwhile
{ Friend Criterion hFC i }
{ Exchange Crit. hEC i } { Exchange Crit. hEC i }
update(u) Input: vertex u ∈ V Output: sets V , X updated (10) V := V − u (11) X := X ∪ N(u)
{ reduce V } { update X }
9.3 Relax Heuristic The two heuristics HeurUntwist and HeurClique are meant for processing arbitrary state vectors xLB . They both strive to produce feasible solutions from infeasible data. In contrast, our next Algorithm Relax accepts only feasible solutions xUB as inputs and possibly improves on them. The basic observation underlying Relax is the following. Let π be a (MCDP) instance and S = {Pd }d a feasible solution for it. Fix one particular demand d and its embedding path Pd ∈ S. Regard all other paths as fixed and form the residual instance π′ := π − (S − Pd ) less them. In π′ = (G ′ , H ′ , A ′ ), only the one demand d is to be routed, clearly by a cheapest path. If now Pd is not cheapest in π′ , i. e., c(Pd ) > distcG′ (d), there is room for improvement. Algorithm Relax finds such paths in a systematical manner and “relaxes” them. In our imagination, we compare the path Pd to a rubber band let loose and relieving its tension by taking on its shortest possible length. We again use a working set of central objects, here entire feasible solutions. It is initialized in step (1) with the solution Sbest given as the state vector xUB . The loop (2) chooses one such solution S at a time and iterates over all its paths (loop (3)). For every path Pd , the residual instance π′ is constructed and the demand d routed through its base graph by a cheapest path P′d (steps (4) and (5)). If the latter path improves on cost in step (6), we form a new feasible solution S′ by exchanging Pd for P′d and update X with it (steps (7) and (8)). Steps (9)–(11) keep the current best solution Sbest up-to-date, including immediate termination if it is provably optimal. Finally, Sbest is reinterpreted back as to a state vector and returned in step (12).
CHAPTER 9. UPPER BOUNDS COMPUTATION
116 HeurRelax( π, xUB , L )
Algorithm 17 Input:
Output:
instance π = (G , H , A ) ∈ Π with objective function c state vector xUB of a feasible solution Sbest = {Pd }d lower cost bound L xUB possibly improved X := { Sbest }
(1)
initialize
(2)
while X 6= ∅ do choose feasible solution S ∈ X, X := X − S
(3) (4) (5) (6) (7) (8)
for Pd ∈ S do let π′ = (G ′ , H ′ , A ′ ) := π − (S − Pd ) { residual instance } ′d ′ let P be a cheapest path in G w. r. t. c for demand d if c(P′d ) < c(Pd ) then let S′ := S − Pd + P′d X := X + S′ if c(S′ ) < c(Sbest ) then Sbest := S′
(9) (10)
if c(Sbest ) = L then goto (12) endif
(11)
{ improvement found } { new solution } { update X } { improvement found } { update Sbest } { Sbest is optimal } { terminate prematurely }
endif endif endfor endwhile (12) return state vector of Sbest
The reinsertions of solutions S′ into X after just one update are due to the fact that relaxing paths is sequence sensitive. Processing one path before another, or vice versa, may yield very different results. So we treat each new feasible solution as a separate candidate for improvement. Note that X, as a set, does not accept double entries. In the case that S′ was generated in some earlier iteration and is still present in X, step (8) has no effect. Each iteration of loop (2) is dominated by the |DH | computations of a cheapest path (step (5)). Their complexity differs with the dependence mode being allowed or forbidden, cf. Definition 3.4 (p. 27) and Chapter 11 (p. 172). Still, this course of action may lead to an unclear number of iterations through a cascading effect: one change may give way to another several times. Though in practice this extremely rarely happens — in fact, mostly the first iteration does not lead to any improvement — we have safeguarded the routine with an adaptive time limit of 0.01 · |DH | in seconds.
9.4 Constraint Based Bounds Another type of upper cost bound is needed for infeasible instances. Due to their nature, heuristics based on feasible solutions are useless. Fortunately, in the context of disjointness such bounds exist. We always have at least arc-disjointness, so in any feasible solution S ⊆ AG each arc of the original base graph G is used at most once. Hence, we have c(S) ≤ c(AG ) as a trivial upper bound.
9.4. CONSTRAINT BASED BOUNDS
117
But clearly, c(AG ) is the largest possible such bound and too crude for practical purposes. In this section, we develop refinements based on our generalized notion of disjointness, the Unified Model (IP) (p. 37). In Section 7.1 (p. 68), we have presented the Algorithm ProbeTerm. It is used for deciding feasibility of an instance π by checking the Cut Criterion hCC i (p. 18) on terminal cuts. The key notions in doing this were the s-environment (cf. Definition 7.1 (p. 68)) and stable sets in it with respect to the constraint family A . A more general notion is the following. Definition 9.8. Given an instance π = (G , H , A ) of the Disjoint Paths Problem. Fix some arbitrary node v ∈ VG . The environment of v in π, or v-environment for short, is the reduced instance (G v , H v , A v ) where the data are defined as follows. − d if vd ∈ TH and d ∈ δ+ δ (v ) H (v) [ G − + d Av := δG (v ) if vd ∈ TH and d ∈ δH (v) d∈DH + d d d d { (u, w) | (u, vd ) ∈ δ− G (v ), (v , w) ∈ δG (v ) \ Aocc (u, v ) } otherwise (∗)
G v := G [Av ] ,
Dv :=
[ d∈DH
− d d (δ+ H (v ) ∪ δH (v ))
H v := H [Dv ] , A v := { A′ ∩ Av | A′ ∈ A : |A′ ∩ Av | ≥ 2 } where new arcs (∗) replace their constituent ones ∪ { Ad ∩ Av | d ∈ Dv } ∪
[
d∈DH \Dv
{ new arcs (∗) on layer d } .
This definition coincides with the s-environment for layers where v is a terminal. For all other d-layers, we introduce new arcs for all pairs of in- and out-arcs of vd if they are not mutually constrained. The incident arcs from these d-layers are not taken over, i. e., we have Ad ∩ Av = ∅. Note that the arc set Av is always the same, irrespective of the exact layer the index node v lies in. The demand graph H v is defined like before in the s-environment. It may now be empty if none of v’s copies is a terminal. The set A v is primarily the reduction of the constraint family A to all sets that still represent meaningful constraints, i. e., those that contain at least two arcs of Av . In all constraints where discarded old arcs (u, vd ) occur, we replace each of them by all new arcs (u, w) incident to the same tail node u. Analogously with arcs (vd , w) and the same head node w. Additionally, we introduce new intra-layer sets mutually constraining all arcs within the same layers. Figure 9.5, middle part, shows the v-environment besides the original instance π (left). In the upper two layers, the v-copies v1 , v2 are terminals, so their subgraph is identical to Figure 7.1 (p. 69). In the lowest d-layer, the copy vd is not present, instead its backward neighbour u is directly adjacent to both of its forward neighbours. The original constraint {a3 , a} ∈ A is enlarged to {a3 , a5 , a6 } ∈ A v according to the replacement of a by all new arcs incident to u (drawn as the two red arrows between a3 and a5 , a6 , respectively). The constraint {a2 , a6 } ∈ A v is constructed analogously. The new constraint {a5 , a6 } is added in the last part of the definition of A v as the set of all new arcs on the lowest layer. (It is actually redundant here, for it is a subset of {a3 , a5 , a6 }. But this is only due to the arcs a5 , a6 both originating in node u. If there were more tail nodes, the new constraint were larger and not necessarily a subset of another enlarged constraint.) We now consider one node v ∈ VG at a time and focus attention to its v-environment. As we observed in Section 7.1, the dependency graph D v := (Av , E v ) (see Definition 3.7 (p. 32) and Remark 4.3 (p. 37)) reveals the local disjointness structure. See Figure 9.5, right part. In any feasible solution S to π, the arcs S ∩ Av must form a feasible stable set in D v . Examples are {a1 , a3 } or {a2 , a4 , a5 }.
CHAPTER 9. UPPER BOUNDS COMPUTATION
118
G H A
Gv Hv Av
v1 G1 v2
a1
a2
v1 a2
t1 a3
Dv
a1
a3
t2
v2
t1 t2
a3
a4
a4
G2 other layers
u
a5
u
a
other layers
a6 a5
vd
Gd
a6
Figure 9.5: The environment of a node v in G (middle) and its dependency graph D v (right). Blue and green arcs are demands of H or H v . Red double arrows signify constraints A or A v . The red lines in D v are the edges. Definition 9.9. Given a node v ∈ VG and the dependency graph D v of its v-environment. Consider a stable set R in D v . We call R feasible if it contains a node from every Dv -layer, i. e., those layers whose v-copies are terminals. In Section 7.1 (p. 68), we dealt with such stable sets only, yet there was no need to define this notion, as there were no other layers. In order to determine the cost c(R) = ∑a∈R c(a) of a stable set, we define the cost of a new arc (u, w) ∈ Av as the cost sum of the two old arcs (u, vd ), (vd , w) ∈ AG it originates from: c(u, w) := c(u, vd ) + c(vd , w) . The set R is said to be maximum cost if c(R) ≥ c(R′ ) for all stable sets R′ in D v . A feasible stable set must contain one arc for every Dv -demand, i. e., those demands d whose copy vd is a terminal. It may moreover support passing paths, i. e., paths containing a v-copy as an inner node. The latter naturally occupy exactly one in- and one out-arc from the same layer. We model this fact by introducing the new direct arcs (∗). With these notions and for any feasible solution S, the cost c(S ∩ Av ) can be estimated from above by c(R) where R is a max-cost feasible stable set. We now get an upper bound UB as follows: (9.3)
c(S) =
1 1 c(S ∩ Av ) ≤ ∑ ∑ 2 v∈VG 2 v∈V G
max c(R) =: UB .
R feasible stable set in D v
The fraction 12 comes from a double counting argument: every arc of S is cost-counted in both end nodes. The hard part is the computation of max over the set of feasible stable sets in D v . This problem is PSPACE -complete in general, since there are exponentially many objects to enumerate. Yet, determining the max may be achieved earlier during the ongoing generation by carrying along dynamic lower and upper cost bounds. The former is the current largest cost of a feasible stable set hitherto found. The latter limits the cost of any stable set still to be generated.
9.4. CONSTRAINT BASED BOUNDS
119
Algorithm UboundConstr Algorithm UboundConstr gives the details. The main part (without line numbers) straightforwardly carries out Equation (9.3). The actual work is deferred to the recursive subroutine maxCostStable(). It works on the given v-environment directly without forming the dependency graph D v . It is closely related to Algorithm MaxStable (p. 73), as it generalizes it to a certain extent. In fact, the bounding conditions (ii),(iii) are identical. We refer the reader to their explanations on p. 72. Condition (2) is almost the same as (i) in MaxStable: we terminate not after embedding the last demand, but go on until no arcs are left to choose. Note the different return values: in step (2), no costs arise due to an empty base graph while in (ii), we have evidence that no feasible solution exists. The latter condition is signalled by the negative value of -1 which is checked in step (11). The recursive enumeration follows a backtracking scheme exploiting the optimal substructure property of the Maximum Cost Stable Set Problem . First, the arc set B for the branching is assigned (steps (3)–(5)). Since we have to make sure the generated stable sets are feasible, we take the terminal layers if there are any in step (4). Otherwise, all demands d with terminal vd are processed and there is no preference among the arcs present (step (5)). The loop (6) extends over all chosen arcs a and for each one we form the base graph G v′ reduced from the given one by a (step (7)). On G v′ , we calculate a simple upper bound value upper as an estimate how costly at best a stable set in the reduced environment can be. It consists of the cost of the fixed arc a plus the maximum arc cost from every layer in G v′ . Note that due to the reduction, the layer d(a), the one a itself lies in, is no longer present in G v′ . Only if there is potential for improvement, do we recursively call maxCostStable() on the reduced environment in step (10). It may be the case that H v does not contain d(a), as the original v-environment consists of only those demands d for which some copy vd is a terminal of π. Subtracting a demand from a non-terminal layers does not induce any change. In step (11), we first check whether a feasible stable set was at all found in the subcall (10). If not, we have cost = −1 and skip the update step (12). Otherwise, cost is the maximum value of a feasible stable set in G v′ and we tentatively extend this set by the chosen arc a. The resulting cost value of c(a) + cost is then compared to lower and this variable is possibly updated. As the final step (13) in loop (6), we remove a from the base graph in order to break symmetry in the different choosing orders for the arcs of any stable set. Practical Remark 9.10. Algorithm UboundConstr can be heuristically accelerated by enumerating the contents of set B in loop (6) in non-increasing cost order. This has got two advantages. Firstly, we choose the most costly arcs early and find high lower values fast. Secondly, the upper values tend to decrease rather soon due to the deletions in step (13). Fortunately, it is not necessary to sort B in every (recursive) execution of the loop. In the data structure, we keep the entire set Av as one-time sorted permanent adjacency lists of all v-copies. Every set B is a subset, inheriting the order relation. As another aspect, Algorithm UboundConstr represents the worst case upper bound, being no lower than the most costly feasible solution. If the instance π is feasible, the bound produced will most likely be larger than the objectives of the solutions found by some heuristic. So as soon as one feasible solution is found, execution of UboundConstr should be switched off. Or, the summation in the main loop should be terminated when sum exceeds the current best bound. Figure 9.6 shows a sample trajectory of subroutine maxCostStable() on the v-environment of Figure 9.5. The process is depicted on the dependency graph for clarity, although the algorithm itself works on the environment graph G v directly. The upper row contains the transformation of the weighted arcs of G v into the weighted graph D v . In the backtracking tree, every step down is labelled with the bound values lower and upper. Solid boxes indicate new or better feasible solutions found, dashed boxes intermediate or bounded subgraphs. The arcs a chosen follow the enumeration rule of Remark 9.10.
CHAPTER 9. UPPER BOUNDS COMPUTATION
120 UboundConstr( π )
Algorithm 18 Input: Output:
instance π = (G , H , A ) ∈ Π with objective function c upper cost bound for π according to Equation (9.3)
initialize
sum := 0
for v ∈ VG do let (G v , H v , A v ) denote the v-environment in π sum := sum + maxCostStable( G v , H v , A v ) endfor return sum/2 maxCostStable( G v , H v , A v ) Input: v-environment G v = (Vv , Av ), H v = (Tv , Dv ), A v of a (MCDP) instance Output: maximal cost of a feasible stable set in D v (1)
initialize
{ current best cost }
lower := 0
{ bounding conditions } (2)
if Av = ∅ then return 0 endif
{ nothing to do }
(ii), if ∃ d ∈ Dv : Adv = ∅ or |A˜ v | < |Dv | then (iii) return -1 endif
{ no feasible solution possible }
{ recursive enumeration } (3) (4) (5) (6) (7) (8) (9) (10) (11) (12)
if Dv 6= ∅ then S B := d∈Dv Adv else B := Av endif
{ take all arcs }
for a ∈ B do let G v′ = (Vv′ , A′v ) := G v − Aocc (a) upper := c(a) +
∑
max c(a′ )
′ ′d d∈DH a ∈Av
{ backtracking fan-out } { upper bound on reduced graph }
if upper > lower then { improvement possible } let d(a) be the demand whose layer a lies in / A′ } ) cost := maxCostStable( G v′ , H v − d(a), { A′ ∈ A v | a ∈ if cost ≥ 0 and lower < c(a) + cost then lower := c(a) + cost endif endif
{ diminish base graph } (13)
{ take arcs of terminal layers }
Av := Av − a endfor
(14) return lower
9.4. CONSTRAINT BASED BOUNDS
Gv
121
2 1
2
Dv
1
1
1 1
1 3 1
3 2 1
2
2 lower = 6 upper = 5
lower = 0 upper = 6 2
chosen a
1
chosen a
1
1
1
G v′
G v′ 2
3 lower = 0 upper = 3
3 lower = 3 upper = 6
2
bounded
2
1
1
chosen a
chosen a
G v′
G v′
(empty) feasible stable set found with lower = 3
lower = 3 upper = 6 2
chosen a
2 lower = 6 upper = 5 2
1
feasible stable set found with lower = 6
3
1 bounded
3
2
Figure 9.6: Sample trajectory of maxCostStable() on the v-environment of Figure 9.5 (p. 118) (upper left, original arcs of lowest layer shown in yellow). The tree is to be read in Depth First manner, branching left to right. In every step down the tree, one node a of D v is chosen and all nodes constrained with it deleted. The remaining unchosen nodes constitute the local reduced graph G v′ .
CHAPTER 9. UPPER BOUNDS COMPUTATION
122
Computational Experience Algorithm UboundConstr must not be operated with a time limit. If it were, a max-cost stable set might not be found and the lower value were still an estimate from below. This could spoil the asserted upper bound property of the result. In order to give a realistic impression of the result quality and speed of our method, we provide the measurements of Table 9.7. The execution times were measured by averaging over 10.000 identical runs.
tele354e19 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n19 tele368n73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi24940n10 vehi33000n16 vehi46980n20
c(A) 20806.0 245610.0 456553.0 533548.0 1279754.5 48513.0 20418.0 239265.0 448542.0 502166.0 40247.0 46681.0 64413.0 73917.0 90781.0 97579.0 48688.0 61119.0 75780.0 87190.0 38.5 42.0 46.0 43699.0 80975.5 199899.0
UboundConstr 19381.5 230670.0 430378.5 503417.0 1277310.5 43789.5 13827.5 151598.5 242040.0 311658.5 26320.5 45501.0 62318.5 71618.5 88246.5 94735.5 25383.5 32264.5 40447.0 47170.0 25.0 27.0 29.0 8192.5 13548.5 24034.0
time [µs] 64 228 682 559 153 720 79 82 330 283 406 54 107 161 216 275 59 114 172 232 155 190 207 3996 5729 8396
Table 9.7: Algorithm UboundConstr: constraint based upper cost bounds. The third column contrasts the result values with the trivial upper bounds of c(A) (second column). Execution times are almost negligible. The differences in the c(A)-values between the disjointness modes originate from the preprocessing, cf. Table 8.7 (p. 98). The preprocessed base graphs have differing numbers of arcs. The node-disjoint upper bounds are generally lower than the arc-disjoint ones due to the stronger constraints on nonterminal nodes. The difference between c(A) and the edge-disjoint bounds comes from an additional idea concerning parities (note that our edge-disjoint example instances are all undirected): Definition 9.11. We call a node v ∈ VG odd if (degG (v) − degH (v)) mod 2 = 1 . Oddness refers to the number of “free” edges incident to v. We may assume that degG (v) ≥ degH (v), otherwise the instance is infeasible by the Cut Criterion hCC i (p. 18), applied to the neighbourhood of v.
9.5. INTEGRATED HEURISTIC
123
In every v-environment where v is an odd node, at most degG (v) − degH (v) − 1 incident edges are “free” to be used by passing paths, i. e., those not terminating in v. If they pass through v, they use two edges each, leaving in total at least one edge unused. This induces an additional constraint of the form (9.4)
∑
e∈δG (v)
x(e) ≤ degG (v) − 1 .
9.5 Integrated Heuristic We integrate all five major algorithms of this chapter into one routine, Algorithm UB, which is always called from Algorithm BranchBound. It is given an estimate C for the upper cost bound value which is to be possibly lowered, cf. Remark 6.2 (p. 61). In the first steps (1)–(3), C is checked against the bound provided by Algorithm UboundConstr. Subsequently, the procedure selects a suitable one from HeurClique, HeurUntwist, or HeurChoose, depending on the current global solution quality q (step (4)), cf. Equation (6.1) (p. 60). The needed global lower bound value L is known right outside UB, we assume UB can access its context variables. If q > ε1 for some ε1 > 0, we decide the quality is yet too large and needs most help to improve. So we call the most sumptuous heuristic, HeurClique, in step (5). If ε1 ≥ q > ε2 for some ε2 > 0, we decide for the intermediate level HeurUntwist (step (6)). Otherwise, the bounds are so close that near-optimal solutions are likely and the simple HeurChoose should suffice (step (7)). The latter is so fast that we always call it by default if the others two did not produce anything useful. If the chosen heuristic is unsuccessful, we have xUB = 0. This value represents no feasible solution and is returned in step (11) after skipping steps (8)–(10). Otherwise, we additionally try to improve the found feasible solution further by HeurRelax in step (9). Like with Algorithm HeurUntwist, we assume that the local lower bound LB(π), given as parameter to the latter subroutine, is either computable from the argument xLB or accessible from outside as a context value. The estimate C is possibly updated as well (step (10)). Note the calls in steps (5) and (6) with an upper bound of (1 + ε3 )C for some ε3 > 0. It has proven beneficial to increase the bound somewhat. This way, feasible solutions with cost > C might be found, but HeurRelax is given better chance to improve them. Otherwise, no feasible solutions may be found at all. The constants were chosen by practical tests and finally fixed as ε1 = 0.01, ε2 = 0.005, ε3 = 0.05.
9.6 Computational Experience Computational experience with the primal heuristics developed above is to be assessed carefully for a variety of reasons: • They are highly reactive to their input state vectors xLB , i. e., they are intimately correlated with the lower bounding routine LB used. Changing it may alter the heuristic’s behaviour significantly. • They are secured by (instance specific) time limits, so their success of work depends on the machine’s clock rate. The faster it runs, the more a heuristic may achieve within the time frame allotted. • The events of improving the global upper bound are very rare during a solver trajectory. Since they are the sole reason for deploying a heuristic, it is a computational burden almost all the time. So the lengths of trajectories also plays a role.
CHAPTER 9. UPPER BOUNDS COMPUTATION
124
UB( π, xLB , C )
Algorithm 19 Input:
Output:
integrated version of all upper bound algorithms
instance π = (G , H , A ) ∈ Π with objective function c state vector xLB of a path family P = (P d )d scalar estimate C for upper cost bound scalar upper cost bound on π possibly improving C state vector xUB for π representing a solution, or the zero vector if none was found
{ check C against constraint based bound } (1)
let U := UboundConstr(π)
(2) (3)
if C > U then C := U endif
{ update C }
{ call appropriate heuristic } (4)
(5) (6)
(7)
C −1 L xUB := 0 let q :=
if q > ε1 then xUB := HeurClique( π, xLB , (1 + ε3 )C ) else if q > ε2 then xUB := HeurUntwist( π, xLB , (1 + ε3 )C ) endif if xUB = 0 then xUB := HeurChoose( π, xLB ) endif
{ global solution quality, Eq. (6.1) }
{ no solution known }
{ no solution found }
{ improve solution if possible } (8) (9)
if xUB represents feasible solution then xUB := HeurRelax( π, xUB , LB(π) ) if C > c(xUB ) then C := c(xUB ) endif
(10)
endif (11) return (C, xUB )
{ improve solution } { update C }
9.6. COMPUTATIONAL EXPERIENCE
125
• The possible upper bound values are limited from below by the optimum. The stronger the bounds from a heuristic, the smaller is the room left for further strengthening, maybe none. So effective control of a heuristic should involve a switch-off point, another parameter. The bottom line is: the time saving potential of a sophisticated heuristic is limited. We nevertheless try to capture the “typical” characteristics of our heuristics in Tables 9.8 and 9.9. For each instance listed there, we fixed one Destructive Branching strategy and let the solver run ten times with varying settings of heuristics and time limits. The former were set to one of the following: HeurChoose alone, HeurUntwist with HeurChoose as a default HeurClique with HeurChoose as a default UB as presented. Algorithm HeurChoose is the simplest heuristic and extremely fast, yet rarely successful. Its main purpose is to identify a feasible solution when the LP optimum given in xLB is integral. This must happen sooner or later, as the branching proceeds towards feasibility. We let HeurChoose always work as a default like in step (7) of Algorithm UB. This way, we are sure not to miss such solutions even in the case when the other routines were cut short by their time limits. A switch-off point comes in through UB where we suppress executions of Untwist or HeurClique according to the current solution quality q. Algorithm HeurRelax is a corrector routine, working only if one of the four heuristics has found a feasible solution. So it is called rather rarely. Also, we observed that it found no better solution in the vast majority of cases. Since this involves only one iteration of the loop, its average time expense is negligible and in no considerable proportion to that of HeurUntwist, HeurClique, or UB. We always had Algorithm HeurRelax do its job. We extended the tests over variable time limits inporder to appreciate their influence: Algorithm HeurUntwist was operated with a limit of 0.001 · γ |D| |A| where |D| is the number of demands to be routed, |A| the arc-size of the original base graph, and γ a testing parameter. We let γ = 0.05, 0.20, 1.00. Algorithm HeurClique was limited to 5 · 10−5 · γ |P |2 . These limits were kept when the routines were called from UB. Algorithm HeurChoose is independent of γ. The tables contain two values from every run performed: the percentage of successful heuristic calls and the total trajectory time. The former figure is the quotient of calls during which the heuristic found a feasible solution over their total number. By far the most of these solutions were not better than the current global one, but these values show the efficacy of the procedures. The results show two expected main effects with some exceptions. First of all, generally the success rates as well as the running times rise with more time allotment (increasing γ). Secondly, HeurChoose alone is mostly more or less clearly the winner. On these instances, the other heurstics consume too much time over the entire run even if their success (of finding any feasible solution) is high. One of the exceptions is tele354x60. The lower bound is from the beginning very close to optimal. The bottleneck time-wise is the finding of the optimum by the heuristic. HeurChoose apparently gets offered poor state vectors xLB in that respect and needs longest. HeurUntwist is able to construct the optimum after some shorter time in all γ-cases. Given most time (γ = 1.00), the trajectory is shortened so much that the success percentage drops down. (On rand1500e36, the same effect takes place.) HeurClique is more successful at a certain time toll when γ is low, but is able to find the optimum in the third search tree vertex. Here, sophistication plus enough time amortize extremely well. A less dramatic exception is rand300n10. Algorithm UB is the soonest to cut short the trajectory after 1375 tree vertices by finding the optimum when the lower bound is already close to optimal. HeurChoose alone needs 2252 vertices for the same, but is so fast that it needs only 1.4 s more.
CHAPTER 9. UPPER BOUNDS COMPUTATION
126
tele 354n18
tele 354n19
tele 354n60
tele 368e73
tele 978n16
tele 1039n26
tele 8072n20
rand 900e27
rand 1200e33
rand 1500e36
HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB
solutions found [%] γ = 0.05 0.20 1.00 2.0 3.0 3.3 3.3 16.9 22.4 24.1 8.8 11.3 13.2 2.9 32.1 37.7 37.7 20.9 44.4 57.4 3.1 3.1 3.9 0.0 1.9 1.9 1.3 2.6 52.0 100.0 2.6 52.0 100.0 0.1 52.8 54.1 54.1 97.9 100.0 100.0 2.9 4.1 4.1 0.7 69.4 90.4 98.7 91.5 100.0 100.0 1.1 1.6 2.0 0.7 21.4 39.3 39.3 33.8 62.2 85.0 3.5 10.0 13.5 1.6 3.4 5.1 5.1 10.3 18.4 19.2 5.6 13.6 14.4 0.2 61.7 100.0 100.0 82.1 97.9 100.0 0.4 0.4 0.4 0.4 5.9 59.8 61.3 52.5 78.4 95.8 4.9 20.6 24.6 0.6 4.4 100.0 99.3 76.0 94.3 98.4 1.3 1.3 1.3
total running time [s] γ = 0.05 0.20 1.00 16.0 16.9 19.5 23.1 20.1 27.2 28.1 17.9 22.6 24.1 7.1 7.8 8.0 8.0 14.3 24.1 27.1 7.6 7.7 8.0 352.6 4.1 6.7 9.2 16.9 28.3 1.2 16.9 28.2 1.2 23.6 30.7 31.0 31.0 59.5 59.9 59.9 24.4 25.3 25.3 8.1 11.2 18.1 33.2 10.4 10.7 10.8 8.3 8.4 9.6 15.5 16.3 17.8 21.9 22.2 30.9 51.0 18.4 17.8 23.7 7.8 8.8 9.7 10.4 9.9 13.3 16.4 9.5 12.3 15.3 47.1 53.2 60.4 62.9 66.9 84.3 90.6 47.3 47.3 47.3 28.2 33.7 45.7 102.5 35.9 48.4 73.6 29.7 34.3 55.2 36.5 39.5 45.9 76.3 43.6 50.9 60.8 36.7 36.7 36.7
Table 9.8: Results of our primal heuristics. For each instance, the percentage of successful calls and total trajectory running times are given, over varying time limits parameterized by γ. The values for HeurChoose are independent of γ. The bold figures mark the respective best times.
9.6. COMPUTATIONAL EXPERIENCE
rand 300n10
rand 600n8
rand 900n6
rand 1200n4
slab 402n6
slab 520n7
slab 596n8
vehi 13200n10
vehi 24940n10
vehi 33000n16
vehi 46980n20
HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB HeurChoose HeurUntwist HeurClique UB
solutions found [%] γ = 0.05 0.20 1.00 0.2 12.7 15.7 15.7 16.2 18.0 18.0 7.6 9.2 9.2 0.1 4.3 5.4 5.4 15.0 19.6 19.6 6.7 8.8 8.8 0.0 57.1 71.7 71.7 21.2 34.1 35.5 9.4 17.7 18.3 0.2 65.9 88.2 88.2 76.3 86.7 87.0 27.9 34.0 33.9 0.1 6.1 6.6 6.6 9.9 10.2 10.6 9.7 10.1 10.6 0.1 3.8 4.1 4.2 6.5 6.6 6.7 6.4 6.5 6.7 0.1 4.9 5.2 5.3 8.0 9.2 9.5 7.9 9.0 9.4 0.0 94.1 95.3 95.3 81.7 98.0 98.1 89.0 95.3 95.3 0.0 51.4 93.8 93.8 78.9 94.4 95.5 50.6 93.7 93.7 0.0 43.9 91.8 92.2 95.0 99.8 99.8 0.1 1.3 1.3 0.2 0.2 37.4 95.5 22.9 98.9 99.5 5.0 19.3 36.6
127
total running time [s] γ = 0.05 0.20 1.00 20.2 20.3 22.2 22.6 19.4 19.7 19.7 18.8 19.6 19.6 36.5 39.9 40.3 40.3 38.0 38.1 38.1 38.0 38.4 38.4 70.2 103.5 123.5 123.5 79.9 82.2 82.2 73.4 79.4 79.8 8.9 10.9 11.2 11.2 9.8 9.8 9.8 9.4 9.4 9.5 13.2 16.3 16.4 16.4 14.8 14.8 14.9 14.9 14.9 15.1 18.9 21.2 21.7 21.8 19.8 19.8 20.0 20.0 20.0 20.4 21.7 25.3 25.6 25.6 23.0 23.0 23.1 23.2 23.2 23.6 278.2 515.8 955.4 2000.5 326.9 341.0 343.4 429.0 662.4 1268.8 947.1 341.8 567.5 1224.6 244.3 253.1 256.6 341.3 559.6 1214.2 868.4 3373.1 2774.4 7031.2 1567.4 1698.4 1728.4 1326.9 1358.0 1521.2 73.7 162.0 303.7 1153.3 95.8 116.9 123.1 129.0 168.6 442.9
Table 9.9: Results of our primal heuristics continued. See caption of Table 9.8.
CHAPTER 9. UPPER BOUNDS COMPUTATION
128
On instance vehi24940n10, all trajectories except HeurChoose’s are equally 4195 vertices long. HeurClique with least time is the one to deliver the optimal bound soonest. UB is not as fast — although it starts out with calling HeurClique —, since the first upper bound lowers the quality below 1%, switching it off and delegating to HeurUntwist instead. The success rates and times of UB and HeurUntwist clearly reflect this. Figure 9.10 shows sketches of four representative results from Tables 9.8 and 9.9. The span of running times are normalized to the same y-intervals over logarithmic γ on the x-axis. The four curves in each diagram correspond to the four heuristics tested. All curves are clearly monotonic, mostly order preserving and the one of Algorithm HeurChoose is mostly the lowest. Only in b) and d) there is a crossover and in d) Algorithm HeurClique is almost constantly faster than HeurChoose by a factor of 3.88. Other than that, the performance order between the heuristics varies with no clear dominance. a)
28
b) 100
time [s] HeurClique UB
24 20
75
HeurUntwist HeurChoose
16
HeurUntwist HeurClique
50
UB HeurChoose
25 0.05
c) 124
time [s]
0.20 1.00 tele354n18
γ
0.05
d) 1200
time [s] HeurUntwist
106
0.20 1.00 rand1200e33
γ
time [s] HeurChoose
900 UB
88
HeurClique HeurChoose
70 0.05
0.20 rand900n6
1.00
HeurUntwist UB
600
γ
HeurClique
300 0.05
0.20 1.00 vehi24940n10
γ
Figure 9.10: Results of Tables 9.8 and 9.9: time consumption of entire solver runs over the time allotment parameterized by γ. The relations among the heuristics are not clearly decided. Mostly, HeurChoose is fastest, but not always. Concluding, we state that Algorithm HeurChoose should be used alone when attacking a new instance. When it becomes evident that the lower bounds seem to stagnate for too long, most of the trajectory may be waited for the eventual detection of an optimal upper bound. A parallel start of another process with one of the other heuristics switched on may be in order. In this case, a time allotment is necessary, i. e., a setting for γ. There is no clear answer to the best value, except that it is not 0.20. The other two both may have their advantages.
Chapter 10
Lower Bounds Computation The task of computing lower cost bounds lies at the heart of any Branch-and-Bound solver for a minimumcost problem. Its performance relies heavily on the efficacy and efficiency of the lower bounds routine LB, cf. Definition 6.1 (p. 58). The challenge lies in approximating the optimal objective value from below where no feasible solutions lie. The basic source for lower bounds is some sort of relaxation. Some constraint is renounced such that the set of feasible solutions is enlarged while retaining the ones sought for. This way, the optimal objective value of the relaxed problem cannot exceed the value of the original optimum, thus yielding a lower bound. The relaxation applied must admit a fast algorithmic optimization and deliver bounds as tight as possible to the desired integer optimum. This for two purposes: bounding subinstances, i. e., fathoming the search tree, and estimating the quality q of feasible solutions at hand, cf. Equation (6.1) (p. 60). There are two well-studied relaxations of linear models for obtaining lower bounds:
Linear Programming (LP) Relaxation: the integrality of some or all integral variables is renounced. The resulting model is usually amenable to a linear programming solver. Advantages:
Disadvantages:
• • • •
straightforward and simple to make, fast codes are available, for instance, CPLEX, LP solutions deliver primal and dual information for further use. the LP optimum is determined, be it strong or weak, no improvement possible within the model.
Lagrangian Relaxation: a subset of the (in)equality constraints is renounced and introduced into the objective function with a penalty factor λ, representing a new free parameter in the model. Advantages:
Disadvantages:
• model remains of combinatorial nature, is often solvable by special purpose code without (expensive) LP solver, • the optimum varies with λ, can possibly choose λ in “good” way. • no primal information given, • must choose λ sensibly, takes cleverness and effort.
Many researchers have discussed the properties of diverse lower bounding methods for Multicommodity Flow Problems, see [Ass78, GC94, Wan03] for surveys. In the following sections, we discuss the pros and cons of both approaches in our context of the Disjoint Paths Problem. 129
CHAPTER 10. LOWER BOUNDS COMPUTATION
130
10.1 LP Relaxation Suppose we are given an instance π = (G , H , A ) of the Disjoint Paths Problem. In our Unified Model (IP), the decision variables are all binary. Relaxing their integrality is best done by allowing them in the nonnegative range only, otherwise the optimum were −∞. The LP-relaxed Unified Model thus reads as follows:
Model (LP)
min s. t. (i) (ii) (iii)
∑ ∑ c(a) x(a)
d∈D a∈Ad
M d xd = 1s − 1t
∑ x(a)
a∈A′
≤ 1 d|
xd ∈ (R+ )|A
for all d = (t, s) ∈ D for all A′ ∈ A for all d ∈ D.
Note that by the constraints (ii) no restriction on x from above is necessary. This model describes again the traditional Min-Cost Multicommodity Flow Problem we started out with in Section 4.1 (p. 34). As said, we can readily input it to an LP solver. Its drawback is the kind of variables. Our ultimate goal is to optimize a path routing problem, so the natural entities of thought are entire paths. This model focuses on individual arcs which makes it intricate to interpret their fractional optimal values, say, for heuristic purposes. The demand flows in any feasible (LP) solution decompose into paths and cycles by the popular flow decomposition theorem (cf. [AMO93], pp. 80f). So in principle, we can always construct them back from the arc flows. Yet, this is an unnecessary overhead in the light of the alternative we have already prepared: the LP Relaxation of the arc-path Model (IPp).
Model (LPp)
min s. t. (i) (ii) (iii)
∑ ∑
c(P) x(P)
d∈D P∈P d
∑
x(P) = 1
P∈P d
∑ ∑
d∈D
P∈P d : P∩A′ 6=∅
x(P) ≤ 1
x(P) ≥ 0
for all d ∈ D for all A′ ∈ A [ d for all P ∈ P := P . d∈D
It possesses the same optimal value as Model (LP), but offers the solutions as ready-to-use path flows x(P). In addition, as motivated in Section 4.5 (p. 48), we can impose routing restrictions on the paths by redefining the sets P d , i. e., without adding more constraints to the model itself.
10.1.1 Column Generation The obvious drawback is the number of variables: in theory, exponentially many per demand. This difficulty has lead to Column Generation Methods that produce explicit new variables as needed. They are extensively treated in the literature, cf. [Wil01, DDS05] for general introductions. Other authors discuss their uses in the special setting of multicommodity flow: [Tom66, Bar93, BHJS95, HY03] and [AMO93], pp. 665–671. Indeed, Column Generation is especially suited for our type of problem, since the new columns can be generated in low-order polynomial time. At the start, we do not know any paths. And by principle, we
10.1. LP RELAXATION
131
cannot, as the instance might be infeasible because one or more demands are not routeable. In order to have an initialization which is always workable, we operate not on the given instance π = (G , H , A ), but on the augmented instance π = (G + H , H , A ) with all demand opponents (cf. List of Symbols (p. ix)) added to the base graph. We used a similar technique in Section 5.1 (p. 51) where we dealt with infeasible instances. The principal process for solving Model (LPp) by Column Generation is shown in Figure 10.1. We first initialize the restricted path set P ′ with all the demand opponents, regarded as one-arc paths for their respective demands. Over this set instead of P , we solve the restricted problem (LPp′ ) to optimality, yielding an upper bound upper for the desired unrestricted LP optimum. The solver also returns the optimal dual variables σ(d) of constraint (i) and λ(A′ ) of (ii). We use the λ-values to evaluate the LP dual of Model (LPp) on unrestricted path sets, thereby obtaining a local lower bound L. A global bound lower is the largest local one which we maintain by iterative maximization. Comparing both bounds, we terminate if they are close enough to accept lower as the output value. Otherwise, in preparation of the usual simplex pivot step, we enhance the set P ′ by more paths with negative reduced costs. These must exist due to the precondition.
initialize P ′ := { d | d ∈ D } initialize lower := 0
upper := OPT (LPp′ ) over P ′ enhance P ′
set optimal dual variables σ(d), λ(A′ )
no upper − lower ≤ ε ?
L := dual (LPp) using λ(A′ ) lower := max ( lower, L )
yes return lower
Figure 10.1: Scheme of a Column Generation Method for the Disjoint Paths Problem. The restricted path set P ′ is initialized with all demand opponents as one-arc paths and enhanced by generating paths with negative reduced cost. The dashed arrow means that the dual variables influence the enhancement, no algorithmic control flow. All details are to come below with the formal description of Algorithm ColumnGen. For now, we associate the H -arcs with uniform costs of c(d) := M ≫ 0. Concerning the choice of M, we have the following proposition. Proposition 10.1. Given an instance π = (G , H , A ) of Model (LPp). The associated augmented instance π = (G + H , H , A ) has got three important properties: a)
It is feasible: there is always the solution consisting of all H-arcs with objective value equal to |D| · M.
CHAPTER 10. LOWER BOUNDS COMPUTATION
132
The feasible solutions to π coincide with those feasible solutions x to π using none of the H -arcs, i. e., x(d) = 0 for all d ∈ D. If π is feasible, M can be chosen such that the optimal feasible solutions to π are feasible and optimal for π.
b) c)
Proposition 10.1 connects the feasible solution sets S of π and S of π with each other: a) S 6= ∅, b) S ⊆ S , and c) argminS∈S c(S) ⊆ S if π is feasible and M chosen well. This strongly suggests that we carry out the lower bound computations on π instead of π. In algorithmic terms, a) means we then never have a feasibility problem, b) describes how we can detect infeasibility of π, and c) affords us to find an optimal feasible solution to π by optimizing π. Proof. Items a) and b) are obvious. To understand c), assume π is feasible. Consider an arbitrary feasible solution S to π using at least one H -arc, i. e., ∑d∈D x(d) > 0 where x is the state vector of S. 1. Given S, we define a parameterized instance πr on the given data (G , H , A ) of π by modifying the constraint (i) in Model (LPp) to the following one: (i)r
∑
P∈P d
x(P) = 1 − r x(d) for all d ∈ D .
The parameter r is to vary in the interval [0, 1]. Instance π1 has the least total flow value of this family while π0 = π has the largest one. We note that πr , as a sort of “subinstance” of π, is feasible for all r. What happens with OPT (πr ) when we decrease r from value 1? We consider the state vector xr = (xrd )d∈D of an optimal feasible solution to πr . We define a new state vector x1 = (x1d )d∈D by α(d) :=
1 − x(d) , 1 − r x(d)
x1d := α(d) xrd for all d ∈ D and observe that, by construction, x1 is feasible for π1 . We have
OPT(π1 ) ≤ c(x1 ) =
∑ c(x1d )
d∈D
≤
∑
c(xrd )
d∈D
by optimality =
c(xrd ) ∑ α(d) |{z}
d∈D
by definition
≤1
= c(xr )
= OPT(πr )
by assumption.
So OPT (πr ) increases from OPT (π1 ). 2. We can estimate this increase from above. Let S1 be an optimal feasible solution for π1 with state vector x1 . By assumption, S uses at least one H -arc, say d ′ with x(d ′ ) > 0. Thus, the demand d ′ in S1 has a total flow value of ∑P∈P d′ x1 (P) = 1 − x(d ′ ) < 1.
Setting r < 1, we push (1 − r) x(d ′ ) additional flow units of demand d ′ through the base graph of π1 . They can possibly displace as many units per flow carrying path of every other demand in S1 , necessitating their re-routing. Figure 10.2 shows a simple case where this happens. In more complex situations, flow paths may indirectly shift other paths through immediate displacements of paths that in turn move again others. Let n(d) denote the number of flow carrying paths of demand d in S1 . The above argument says, all n(d) paths of demand d may each lose (1 − r) x(d ′ ) units of flow that might be rerouted over a most
10.1. LP RELAXATION
133
flow = 21 + 12
flow =
1 2
a) 5 2
2
1
1 1
1
1
1
1
1
1
1 flow =
1 2
increase red flow by flow = 1
1 2
flow = 1
b) 5 3
3
1
1
1
1
1
1 flow = 1
Figure 10.2: a) Multicommodity flow with three demands of values 1 (blue) and 21 (green, red). Terminals are circled. Both blue paths and the green one are cheapest paths. Numbers at arcs are costs. All arc capacities are equal to 1. b) Displacement of flow by an increase of 12 for the red demand. This much flow on every path of every other demand must be rerouted from a cheapest to a most costly path. costly path. Of course, at most the total flow value of 1 − x(d) can be possibly rerouted. In addition, the new flow for demand d ′ has to be routed, in the worst case over a most costly path. Altogether, we have: ′
∆c(x1d ) ≤ (1 − r) x(d ′ ) max′ c(P) + P∈P d
≤ (1 − r) x(d ′ )
c(P) − min c(P)) ∑ min [ n(d) (1 − r) x(d ′), 1 − x(d) ] ·(max P∈P P∈P
d∈D |
max c(P) . ∑ |P d | P∈ P
≤ |P d |(1−r) x(d ′ )
d
d∈D
|
{z
}
=: K
d
d
} |
{z
{z
≤ maxP c(P)
The factor |P d | absorbs the extra summand in front. The total increase of cost then amounts to (10.1)
OPT(πr ) − OPT(π1 ) =
∑ ∆c(x1 ) d′
d ′ ∈D
≤ (1 − r)
∑ x(d ′)
d ′ ∈D
!
K.
}
CHAPTER 10. LOWER BOUNDS COMPUTATION
134
3. Given πr , we define the instance πr by the same constraints as πr plus the constant flows r x(d) over the H -arcs. Instance πr has got the following properties: (10.2)
π1 = π
(10.3)
π0 = π0 = π
(10.4)
OPT(πr ) = OPT(πr ) +
∑ r x(d) M .
d∈D
Equation (10.2) implies that S (defined at the beginning of the proof) is feasible for π1 . Equation (10.3) is obvious by construction. These two settings indicate that πr is meant to continuously interpolate between π and π. Clearly, the only freedom for optimization in πr coincides with the instance πr , since the flows over the H -arcs are fixed. Hence, Equation (10.4) holds. Remember that M is the cost coefficient on all H -arcs. Comparing optimal values of πr , we find: (10.4)
OPT(π1 ) − OPT(πr ) =
OPT(π1 ) +
∑ 1 x(d) M
d∈D
= (OPT(π1 ) − OPT(πr )) + (10.1)
≥ −(1 − r)
∑ x(d ′ )
d ′ ∈D
= (1 − r) (M − K)
!
!
− OPT(πr ) +
∑ r x(d) M
d∈D
!
∑ (1 − r) x(d) M
d∈D
K + (1 − r) M
∑ x(d)
d∈D
∑ x(d)
d∈D
> 0.
(10.5)
The last line follows from three facts: r < 1 by intended decrease, ∑d∈D x(d) > 0 by assumption on S, and we can freely choose M > K, since K is independent of r. 4. Concluding, we get the following (in)equality chain: (10.2)
(10.5)
(10.3)
c(S) ≥ OPT(π1 ) > OPT(π0 ) = OPT(π) . This means, given we choose M suitably, any feasible solution S to π using some H -arc cannot be optimal for π. This because there exists a feasible optimal solution with strictly better value OPT (π) which is also feasible for π. Hence, any optimal feasible solution to π has no flow over H -arcs and is both feasible and optimal for π. This proves Proposition 10.1 c). Practical Remark 10.2. In order to choose a sufficiently large value for M, we cannot compute the theoretical value of K = ∑d∈D |P d | maxP∈Pd c(P). Both factors in the sum are large and hard to calculate. Even if we could, the result were highly over-estimating and would lead to numerical difficulties when using it with the LP solver. For practical purposes, we use the value M = UboundConstr(π), cf. Algorithm UboundConstr (p. 120). In the rare cases where the LP optimum contains flow over an H -arc, we reassign c(d) := 10 M and re-optimize. Either we then find a feasible solution less any demand opponent, or costs have visibly risen by roughly 9 M ∑d∈D x(d), indicating infeasibility. Algorithm ColumnGen We now turn to the more detailed description of our Column Generation Method stated as Algorithm ColumnGen. The initialization in step (1) is as discussed above. Loop (2) takes a form slightly different
10.1. LP RELAXATION ColumnGen( π )
Algorithm 20 Input: Output:
(1) (2)
135 Column Generation variant of LB
instance π = (G , H , A ) ∈ Π of the Paths Problem with cost function c scalar lower cost bound on π state vector xLB for π representing a feasible fractional solution
initialize initialize
P ′ := { d | d ∈ D } with uniform costs of c(d) := M lower := 0
repeat
{ compute internal upper bound } (3) (4)
solve (LPp′ ) on P ′ to optimality with solution xLB upper := c(xLB )
{ optimal restricted obj. }
{ compute local lower bound L, enhance P ′ } (5) (6) (7)
let σ(d), d ∈ D denote the optimal dual variables of constraint (i) let λ(A′ ), A′ ∈ A denote the optimal dual variables of constraint (ii) L := upper
(8) (9)
for d = (t, s) ∈ D do let Pd denote a cheapest s-t-path in G w. r. t. cλ
(10) (11) (12)
if cλ (Pd ) < σ(d) then P ′ := P ′ + Pd L := L + cλ (Pd ) − σ(d) endif endfor
{ Equation (10.6) } { enhance P ′ } { add up local bound }
{ evaluate termination criterion } if lower < L then lower := L endif (14) until upper − lower ≤ ε
{ maximize local bounds }
(13)
(15) return ( lower, xLB )
from Figure 10.1, as the L-computation and the P -enhancement can be done in the same loop (8), placing the enhancement before the termination criterion. The computation of upper in steps (3) and (4) remains prior to these, since the optimal dual variables (steps (5) and (6)) have to be established first. The paths Pd ∈ P d added in step (11) are those with minimal (negative) reduced cost, w. r. t. the unrestricted Model (LPp), of cred (Pd ) = c(Pd ) + (10.6)
cλ (P) := c(P) +
∑ λ(A′) − σ(d)
A′ ∈A : A′ ∩Pd 6=∅
∑
= cλ (Pd ) − σ(d)
where we abbreviate
λ(A′ ) .
A′ ∈A : A′ ∩P6=∅
The constant −σ(d) is not part of cλ , as it does not influence the path computation in step (9). The constituents c(P) and λ(A′ ) are nonnegative, so we have cλ ≥ 0 and can employ Dijkstra’s Algorithm or some variant of it for finding the cheapest paths. The details of this aspect are deferred to Chapter 11
CHAPTER 10. LOWER BOUNDS COMPUTATION
136 (p. 172).
Condition (10) ensures that indeed cred (Pd ) < 0, in which case Pd is a good candidate for a simplex basis change. Otherwise, no path for demand d has got negative reduced cost. The calculation of the lower bound L is an algebraic trick. In principle, we evaluate the unrestricted dual objective of Model (LPp), reading as follows: max λ(A′ ) ∑ σ(d) − ∑ d∈D A′ ∈A s. t. (i) σ(d) − ∑ λ(A′ ) ≤ c(P) A′ ∈A : A′ ∩P6=∅ (ii) λ ∈ (R+ )|A |
Model (LPpd)
for all d ∈ D, P ∈ P d for all d ∈ D.
As is well-known from LP duality theory, the objective of any dual feasible solution represents a lower bound on the optimal primal objective value OPT (LPp) . We fix the λ-values as obtained from step (6) and optimize Model (LPpd) over the σ-variables only. This is an easy task, as (LPpd) decomposes into |D| optimization problems of the form max σ(d) λ d s. t. σ(d) ≤ c (P) for all P ∈ P , one for each demand. The result is, for d = (t, s) ∈ D: λ
σopt (d) = distcG (s,t) = cλ (Pd ) where Pd is the path computed in step (9). The dual objective then evaluates to L =
∑ σopt (d) − ∑
λ(A′ )
∑c
λ(A′ )
d∈D
(10.7)
=
λ
d∈D
(∗)
=
d
(P ) −
∑
A′ ∈A
∑ σ(d) − ∑
A′ ∈A
d∈D
(10.8)
A′ ∈A
= upper +
∑ (c
d∈D
λ
!
λ(A′ ) +
∑ cλ (Pd ) − ∑ σ(d)
d∈D
d∈D
!
(P ) − σ(d)) . d
In line (∗), we add zero as two terms ∑d∈D σ(d) with opposite signs. The numbers σ(d) are the ones from step (5). Again by LP duality on the restricted instance (LPp′ ), we know that upper = OPT(LPp′ ) = OPT(LPpd′ ) =
∑ σ(d) − ∑
d∈D
λ(A′ )
A′ ∈A
which is the term in the first large parenthesis of line (∗). The term in line (10.8) is the one effectively summed up in steps (7) and (12). Maximization of the local lower bounds L, termination criterion and return value complete Algorithm ColumnGen (steps (13)–(15)). In our software, we set ε = 10−5 in order to avoid numeric errors in the vicinity of zero. Remark 10.3. In step (9) of Algorithm ColumnGen, for each demand we compute a cheapest path embedding it. It is commonly suggested in the network planning literature that the demands be aggregated, i. e., collected to groups. Within each group, all demands share one common terminal. Computing
10.1. LP RELAXATION
137
cheapest paths may then be executed simultaneously for all demands in one group by starting the routing algorithm from the common terminal. We like to point out that this idea is certainly suitable in capacity planning, but not in disjoint routing with the Unified Model. The reason is that we operate on the layered demand graph H where DH is a set of isolated arcs, cf. Definition 4.1 (p. 35). So firstly, there are no common terminals. Secondly, even if we identify all layer copies sd , d ∈ D of some original terminal s ∈ TH , we still must route each demand through its own d-layer. No two layers need be equal. And thirdly, we allow all layers to have their own arc or path cost functions. We take up this line of thought again in Chapter 12 (p. 205). Practical Remark 10.4. Algorithm ColumnGen iteratively approximates the LP optimum by means of internal upper and lower bounds. In the context of a Branch-and-Bound framework, we do not necessarily need the exact optimal value, as can be seen in Algorithm BranchBound (p. 59), subroutine isAdmissible(). The main usage of the result value is the boolean decision LB(π′ ) < U in step (3). So if the internal lower bound matches or exceeds the constant value U, the outcome is clear and we can terminate prematurely, as the subinstance under consideration is subsequently discarded. Also, we could experience a significant performance speedup when we supplied Algorithm ColumnGen with the result state vector xLB of its parent instance in the Branch-and-Bound tree. It uses the basic paths given in xLB as initialization for P instead of step (1) as a “warm start”. In some instances, the resulting lower value is the same as that of its parent instance. Also independently, it often happens that the upper value assumes the optimum earlier than lower. If both circumstances come together, we find the old lower equal to the current upper and terminate, thereby saving one or more iterations. For these reasons, in our software we give Algorithm ColumnGen the values xLB and U as additional input parameters, cf. Remark 6.2 (p. 61). The same holds true for the Lagrangian bound routines described in the next section. Researchers have applied the Column Generation technique to various optimization problems. Many have reported how the dual variables needed in the generation process oscillate in magnitude. This is consistent with the fact that the L-values are not necessarily monotone (in contrast to the upper values which must converge non-increasingly towards the optimum). Tests have indicated that attenuating these oscillations can lead to better convergence [MVDH99, RGF07]. In our experience, this is unnecessary in the context of the Disjoint Paths Problem. Convergence is acceptably fast and proves almost indifferent to attenuation tests, rendering their additional effort needless.
10.1.2 Other LP Approaches Barnhart [Bar88] develops a Primal-Dual Algorithm for optimizing Model (MCF) (p. 34), Wang [Wan03] refines it. From a high-level view, it can be regarded as the dual oriented counterpart of the primal based Column Generation Method. Both are similar in that they iteratively solve LPs over restricted path sets. The difference is in the lead role of these sets versus the dual variables: in Column Generation, we always maintain an explicit path set and calculate dual variables for its update, whereas in Primal-Dual, we control the dual variables and define the path sets implicitly by them. In exchange for this slight difficulty, the LPs to be solved are of simple primal feasibility type. We laid out in Section 5.1 (p. 51) how they look like. Barnhart and Sheffi [BS93], Farvoleden et al. [FPL93], as well as Goldberg et al. [GOPS98] present efficient combinatorial approximation algorithms for feasible solutions to the Multicommodity Flow LP. Garg and K¨onemann [GK98] give a strongly polynomial framework for this task. Their ideas might be of interest in our context when the number of demands is large (several hundred or more). Yet, the result of their calculations is a near-optimal feasible solution whose objective value is an upper bound on the LP optimum. So it cannot be guaranteed to be a lower bound on the corresponding IP optimum which
CHAPTER 10. LOWER BOUNDS COMPUTATION
138
is what we need. An approximative method APP is only useful if we have a certified ratio ρ and could use the value APP(π)/ρ as a lower bound. We did not proceed along this line of action, as our instances are comparatively small (at most 117 demands) and Algorithm ColumnGen provided us with very fast bounds, see Section 10.6 (p. 167). Kleinberg [Kle96] introduces the notion of unsplittable flow. This is a multicommodity flow (of arbitrary flow value) restricted to use exactly one path per commodity. We could alternatively formulate the Disjoint Paths Problem by relaxing integrality of the path variables and instead stipulate unsplittability. Our flow values are uniformly equal to one, so the resulting model were essentially the same. Skutella et al. [MS04, BKS05] generalize this problem and introduce the notion of k-splittable flows. Every commodity may be split into at most k different, not necessarily disjoint paths. Following this idea, we could strengthen our LP Relaxation (LPp) by restricting every demand to use at most k paths. How severe is this restriction? By linear algebra, no more basic variables can be positive than the number of constraints, |D| + |A |. This imposes a natural limit on the number of flow carrying paths in any feasible A| solution. We always have at least arc-disjointness, so |A | ≥ |AG |, and thus there are |D|+| ≥ 1 + |A|D|G | |D| paths available per demand on average. It follows that k should be chosen less than this value in order to possibly make a difference. In our experience, however, seldom more than four paths carry flow in the optimal feasible LP solutions to our instances. This means, we have to set k ≤ 3 for an expectable improvement. On the other hand, the authors prove NP -hardness of the k-Splittable Flow Problem even for one commodity. So we cannot reduce complexity compared to the unsplittable formulation, rendering this lower bounding approach impractical. This can already be seen in the constraints (ib),(ic) capturing the splittability: x(P) = 1 for all d ∈ D (ia) ∑d P∈ P (ib) x(P) ≤ y(P) for all P ∈ P (ic) for all d ∈ D ∑ d y(P) ≤ k P∈P (iii) x(P) ≥ 0, y(P) ∈ {0, 1} for all P ∈ P . The binary variables y(P) can be regarded as capacity assignments to individual paths, making them available for positive flow x(P). This MIP is NP -hard. But if we again resort to its LP Relaxation, we could simply set y(P) := x(P) and render constraint (ic) insubstantial. We would effectively end up with Model (LPp) and gain nothing.
10.2 Lagrangian Relaxation As said, the goal of constraint relaxation is to achieve an efficiently solvable problem yielding strong bounds. To start the discussion, we restate the Unified Model (IPp) (p. 50) for convenience:
Model (IPp)
min s. t. (i) (ii) (iii)
∑ ∑
c(P) x(P)
d∈D P∈P d
∑
x(P) = 1
P∈P d
∑ ∑
d∈D
P∈P d : P∩A′ 6=∅
x(P) ≤ 1
x(P) ∈ {0, 1}
for all d ∈ D for all A′ ∈ A [ for all P ∈ P d . d∈D
10.2. LAGRANGIAN RELAXATION
139
Relaxing constraint (i) implies we can use any number of paths for embedding each demand. The objective function is modified by a penalty term to
∑ ∑
d∈D P∈P d
c(P) x(P) −
∑ σ(d) ∑
d∈D
P∈P d
x(P) − 1
!
=
∑ ∑ (c(P) − σ(d)) x(P) + ∑ σ(d)
d∈D P∈P d
d∈D
where σ(d) is the sign-unrestricted Lagrangian multiplier of constraint (i) for the particular demand d. The minimization still takes place over the path variables only while the σ-values are constants. Our first observation: any path P ∈ P d with c(P) ≥ σ(d) implies x(P) = 0, i. e., will never be chosen. This is clear from the objective function, placing a nonnegative cost on these paths. In other words, the value σ(d) controls the available subset of paths from P d . The larger σ(d), the more paths may be possibly chosen, only restricted by constraint (ii). Unfortunately, there is no clear way of doing so, as the latter may be arbitrarily complex. In essence, a Disjoint Paths Problem with variable integral demand values remains to be solved over cost restricted path sets. This cannot be done efficiently in general. We can apply the same idea to the node-arc Model (LP) (p. 130) and relax the flow conservation constraint (i). The Lagrangian objective function is
∑ cd x d − ∑
d∈D
d=(t,s)∈D
σ(d)(M d xd − 1s + 1t ) =
∑ (cd −σ(d)Md )xd )+ ∑
d∈D
(σ(d)s −σ(d)t )
d=(t,s)∈D
where σ(d) this time is a vector of dimension |V d |, the node set of the d-layer in G . This objective is to be minimized over the set of arcs a = (u, w) with negative cost coefficients of c(a) −
d ∑ σ(d)v Mv,a
v∈V d
= c(a) + σ(d)u − σ(d)w
while satisfying the capacity constraints (ii). This amounts to finding a maximum cost stable set w. r. t. to the negated cost function in a subgraph of the dependency graph D (G , A ) (cf. Definition 3.7 (p. 32)). This task is in general not easier than the one discussed above. One exception is the “pure” arc- or node-disjoint case where A is a pairwise disjoint family of arc sets. Here, the minimization decomposes into the choice of one min-cost arc from every set A′ ∈ A , or none if all arcs have nonnegative cost coefficients. As a practicable alternative, we relax constraint (ii):
Model (LRp)
L(λ) := min s. t. (i) (iiia) (iiib)
′ λ(A ) x(P) − 1 c(P) x(P) + ∑ ∑ ∑ ∑ ∑ d∈D P∈P d : d∈D P∈P d A′ ∈A P∩A′ 6=∅ ∑ d x(P) = 1 for all d ∈ D P∈P [ x(P) ∈ {0, 1} for all P ∈ P d. d∈D λ(A′ ) ≥ 0 for all A′ ∈ A .
The function L(λ) is called Lagrangian dual. The remaining constraint (i) simply means we have to choose exactly one path out of every set P d such that the objective is minimized. So in this case, as we already noted in Section 4.1 (p. 34), the problem separates into |D| uncorrelated Cheapest Path Problems . The price of this advantage is the number |A | of multipliers λ(A′ ) we have to control.
CHAPTER 10. LOWER BOUNDS COMPUTATION
140 The objective function can be rewritten as
∑ ∑
d∈D P∈P
(10.9)
=
d
c(P) + |
A′ ∈A : A′ ∩P6=∅
{z
= cλ (P)
∑ cλ (Pd ) − ∑
d∈D
∑
λ(A′ ) x(P) −
λ(A′ )
∑
λ(A′ )
A′ ∈A
}
A′ ∈A
where cλ is the cost function defined in Equation (10.6) (p. 135) and Pd is a cheapest path for demand d w. r. t. cλ . By linear programming theory, we know
OPT(LPp) ≤ max L(λ) ≤ OPT(IPp) , λ≥0
meaning it is worthwhile to investigate maximization algorithms for L(λ). Also, we know
OPT(LPp) = max L(λ) λ≥0
for problems satisfying the integrality property, i. e., they possess an integral feasible solution irrespective of the (linear) objective function. The Min-Cost Multicommodity Flow Problem does not in general have this property, yet One-Demand Min-Cost Flow Problems do, cf. [AMO93], p. 318. This holds in particular true for the Cheapest Paths Subproblems solved in L(λ). So there is a strong presumption that the identity above may often be met, which Gendron and Crainic [GC94] indeed prove. This fact has got two consequences. Firstly, it implies that the optimal bound maxλ≥0 L(λ) is computable in polynomial time as a linear program [Kha79, Kar84]. Secondly, as we cannot get better than the LP Relaxation, it reinforces the emphasis on high-quality maximization methods.
10.2.1 Subgradient Optimization The most basic and popular algorithm for maximizing Model (LRp) is the Subgradient Optimization procedure. The following discussion reflects the most important arguments from literature [HWC74, CFM75, BG79a, BS99, CFG01] and adapts them to our specific needs. For notational convenience, we regard the primal and Lagrangian Models (LPp) and (LRp) to be given in the following abstract form:
Model (LPp)
Model (LRp)
min s. t.
cx (ii) A x ≤ b (i),(iii) x ∈ X
L(λ) := min s. t.
relax
→
c x + λ (A x − b) x ∈ X.
The constraint A x ≤ b represents the disjointness constraint (ii) of Model (LPp), the set X combines the other two constraints into one entity with the meaning: “choose exactly one path P ∈ Pd for every d ∈ D and assign it x(P) := 1.” L(λ), as the minimum of finitely many hyperplanes, is a continuous, concave, and piecewise linear function with non-differentiable breakpoints. Because of these breakpoints, maximization methods employing derivatives are ruled out. Instead, L(λ) is subdifferentiable everywhere.
10.2. LAGRANGIAN RELAXATION
141
Definition 10.5. A vector g is called a subgradient of L at λ if it satisfies L(λ + h) − L(λ) ≤ h g for all h ∈ R∗ . (R∗ denotes an Euclidean space with the appropriate dimension, cf. List of Symbols (p. ix).) The function L is accordingly called subdifferentiable at λ if it possesses a subgradient g there. Note that g, if existent, need not be unique. Let λ ≥ 0 be some argument to L and x∗ := argminx∈X (c x + λ (A x − b)) an optimal feasible solution to (LRp). We obtain a subgradient g to L(λ) as follows: L(λ + h) − L(λ) = min (c x + (λ + h)(A x − b)) − L(λ) x∈X
≤ (c x∗ + (λ + h)(A x∗ − b)) − (c x∗ + λ(A x∗ − b)) = h (A x∗ − b) =: h g .
This fact is the key ingredient in designing an iterative procedure for maximizing the Lagrangian dual function: since evaluating L(λ) involves a minimization over x (with optimal solution x∗ ), we are automatically given a step direction g with it. If x∗ is primal feasible, we may be able to establish the simultaneous optimalities of λ and x∗ by the complementary slackness condition λ g = 0. In our experience, however, this is too rarely the case so as to justify the effort for checking this condition. Moving along g with a suitably chosen step length α > 0 subsequently gives us the next point. The resulting algorithm is an iterative one, so all variables receive a counting index k: (10.10) choose λ0 ∈ R+ ,
λk+1 := λk + αk gk (k ≥ 0) .
If we have to maintain λk ≥ 0 at all times, we simply add the projection step (10.11) λk+1 := max ( λk+1 , 0 ) after the assignment in Equation (10.10). Equation (10.11) is to be read component-wise. The step length sequence (αk )k is almost arbitrary, except that its limit properties are subject to the following lemma. Lemma 10.6 (Polyak [Pol67]). Let (αk )k be a sequence with the following properties: 1. αk ∈ R+ for all k ≥ 0 ,
2. lim αk = 0 , k→∞
∞
3.
∑ αk = ∞ .
n=0
Then for any initial vector λ0 , the iterates λk converge to the optimum of the Lagrangian dual. C Feasible sequences in the sense of Lemma 10.6 are, for instance, ( Ck )k , ( √Ck )k , or ( k log k )k , where C > 0 is an arbitrary constant. Note that, apart from assuring global convergence, nothing is said about its monotonicity or its rate. Indeed, empirical tests have shown Subgradient Optimization to suffer from both indecisive zig-zagging at the beginning and slow convergence towards the end. For this reason, computation is usually aborted after a predefined number MaxNiter of iterations.
The general method as stated in Equation (10.10) is sketched in Figure 10.3. It leaves two degrees of freedom available for addressing these two shortcomings: the step sizes αk and the update directions gk . We give brief accounts of their treatment in the following subsections. Choice of Step Sizes There is a heuristic approach to designing a suitable step size sequence. We pretend to know the optimal value L∗ := maxλ≥0 L(λ) of (LRp) in advance. We fix an argument vector λk and an associated optimal
CHAPTER 10. LOWER BOUNDS COMPUTATION
142
initialize k := 0, λ0
L(λk ) := OPT (LRp) with opt. sol. xk
k = MaxNiter ?
yes
return maxk L(λk )
no choose step size αk , direction gk
λk+1 := λk + αk gk , k := k + 1
Figure 10.3: Scheme of a Subgradient Optimization Method. The iteration is simple, yet not adaptive to the trajectory. ˜ feasible solution xk∗ with subgradient gk of L(λk ). We now consider the linear approximation L(µ) := ∗ c xk + µ gk to L at λk . As we cannot directly find a value λk+1 with the desired property L(λk+1 ) = L∗ , we impose this condition instead on L˜ and solve for the step length αk : ! ˜ k+1 ) L∗ = L(λ
= c xk∗ + λk+1 gk
(10.10)
⇔
= c xk∗ + (λk + αk gk )gk = (c xk∗ + λk gk ) +αk kgk k2 | {z } = L(λk ) L∗ − L(λk ) αk = . kgk k2
(k · k denotes the Euclidean norm in R∗ .) This is actually one step of Newton’s Method which is known to possess locally quadratic convergence. Therefore, αk as defined above appears to be a promising step size. There are, however, two major drawbacks in this approach. Firstly, L(λ) is not differentiable everywhere, unlike Newton’s Method assumes. Secondly, we do not know the value of L∗ . Nevertheless, several researchers have worked on this idea and developed a modification: (10.12) αk = θk
L − L(λk ) . kgk k2
The value L is an upper bound on L∗ , possibly delivered by a suitable primal heuristic or other considerations. The sequence (θk )k is initialized by θ0 and halved whenever L(λk ) has failed to improve for HalfNiter iterations. A step size sequence according to Equation (10.12) does not guarantee global convergence, since halving θk every once in a while in principle violates condition 3. of Lemma 10.6. Therefore, the constant HalfNiter must be carefully chosen. If it is too small, the method converges too soon to a suboptimal value; if it is too large, convergence is rather slow.
10.2. LAGRANGIAN RELAXATION
143
Choice of Update Direction In order to stabilize convergence of a Subgradient Optimization Method, empiricists have found it beneficial to add to the “pure” gradient direction fractions of the previous direction: (10.13) gk+1 := (A xk − b) + µk gk . The resulting direction gk+1 is called a deflected gradient. The simplest rule is to set (10.14) µk ≡ µ ∈ ]0, 1[ . k−i−1 (A x − b). This way, every direction is an exponential series of all previous gradients: gk = ∑k−1 i i=0 µ In our experience, this linear-cost modification already does a good job towards smooth convergence. Its disadvantage is that in general gk+1 := µ gk 6= 0 if the gradient vanishes for the first time. So the method does not become stationary, as it should, when an optimal point is found.
Camerini et al. [CFM75] give an adaptive rule for assigning µk : ( kA x −bk k if (A xk − b) gk < 0 kgk k (10.15) µk := 0 otherwise. The two cases ensure that the gradient A xk − b is altered if the previous direction stands to it at an obtuse angle. The geometric idea is that in this case of a turn exceeding 90 degrees, the new gradient might be off target and a correction towards the old direction seems in order. Note that under rule (10.15), both summands in Equation (10.13) always have the same norm, i. e., geometric length. So the resulting direction gk+1 always forms at most a right angle to its predecessor: either directly by case in Equation (10.15), or we have gk+1 gk = (A xk − b) gk + kA xk − bk kgk k ≥ 0 by Cauchy-Schwarz’s inequality . Using this rule “restarts” the sequence of directions every once in a while when µk := 0 is assigned, it then forgets all previous directions that were added in. Primal Feasibility A drawback of Subgradient Optimization is its focus on the dual variables and thus the lack of available primal information. Sherali and Choi [SC96] prove a general theorem stating that under certain conditions — mildly restricted choices of the sort in Lemma 10.6 — a sequence of convex combinations of the vectors xk converges to a primal feasible solution, given the sequence (λk )k follows Equation (10.10) with gk being the gradient or satisfying Equation (10.15). In particular, two earlier results follow: Corollary 10.7. Let (λk )k be a sequence of Lagrangian multipliers generated according to Equation (10.10). Let further the sequence x(k) := ∑ki=1 βki xi be defined by the optimal solutions xk to L(λk ) and vectors (βki )i of convex combination coefficients. Then limk→∞ x(k) exists and is a primal feasible optimal solution if (βki )i are assigned under either of the following conditions: a) b)
(αk )k obeys the conditions of Lemma 10.6 and βki := αi / ∑kj=1 α j , i = 1, . . . , k [Sho85]. r 1 (αk )k = for r, s,t > 0 and βki := , i = 1, . . . , k [LL89]. sk + t k
Barahona and Anbil [BA00] devise another assignment scheme for the convex combination coefficients βkj which they call the Volume Algorithm. It is based on certain high-dimensional volumes underneath the affine hyperplanes of the Lagrangian Relaxation. They make use of the step size update in Equation (10.12), fix some γ ∈ [0, 1], and generate a sequence (x(k) )k of the form
CHAPTER 10. LOWER BOUNDS COMPUTATION
144 x(0)
:= x0
i. e.,
βk0
:= (1 − γ)k
βkj := γ(1 − γ)k− j for all j = 1, . . . , k . x(k+1) := γ xk + (1 − γ)x(k) , All of these approaches approximate primal feasible solutions without a guarantee that any of the finite iterates x(k) is actually feasible. But only in this case is their objective value c x(k) a useful upper bound on the desired optimum. Algorithm SubgradOpt Plugging the concrete Model (LRp) into the abstract model used for the discussion, we obtain a subgradient gk ∈ R|A | to our specific function L(λ) with optimal solution xk as follows: (10.16) gk (A′ ) = (A xk − b)(A′ ) =
∑ ∑
d∈D
P∈P d : P∩A′ 6=∅
xk (P) − 1 = |{ d ∈ D | Pd ∩ A′ 6= ∅ }| − 1 .
In the last identity, we exploit the fact that xk encodes exactly one path Pd for every demand d ∈ D.
Algorithm SubgradOpt gives all the details. Since the sequences αk , λk , θk , gk are continued recurring at most by one iterate, we do not write iteration indices und assign or update variables α, λ, θ, g, glast instead. In step (1), we initialize the λ- and θ-variables which are being adjusted later. The first value for λ need not be 0, in fact we mostly initialize it with the last λ-vector from the parent of π in the Branch-and-Bound tree (“warm start”). The lower variable is to eventually hold the result value found by maximization over the course of the run. Variable glast keeps the update direction of the respective previous iteration which we initially do not have. The counter klast marks the currently last iteration where a bound improvement or θ-update occurred. Equation (10.12) demands that we supply an upper bound L to the optimum, but does not specify whether this value is a constant or not. We assume so, initializing it once in step (2) with a call to Algorithm UboundConstr (p. 120), as we are sure this value is a valid upper cost bound to π, cf. Section 9.4 (p. 116). The path multi-set P ′ serves a special purpose in our context. We want to return a state vector xLB at the end which should carry some primal meaning, so the heuristics of Chapter 9 can work with it. As the last subsection, Primal Feasibility, shows, there is no canonical way of obtaining primal feasible information from the iterates in Algorithm SubgradOpt. So we did not pursue any of the concrete proposals there, but took up the central idea of convex combining optimal solutions of the L(λ) subproblems in our own way. After all, no more than a heuristic assignment to xLB is needed. We start out with an empty set P ′ (step (3)) and add every cheapest path generated in step (7) to it in step (9), possibly multiple times if it is being re-generated. Let P ′ (P) ⊆ P ′ denote the set of identical copies of P within P ′ . In step (18), we assign xLB such that the value associated with any path in P ′ is its relative frequency of occurrence, i. e., the relation of the number |P ′ (P)| of its copies to the total, |P ′ |. The rationale behind this setting is that numerously re-generated paths appear more “important” than less present ones. The resulting vector represents a convex combination of the single-path state vectors, though these never appear explicitly. The main loop (4) comprises the evaluation of L(λ) and all variable updates. Loop (6) makes the demand-wise optimization underlying Model (LRp) explicit. Steps (5) and (8) effectively constitute Equation (10.9). After the d-loop, we have L = L(λ). If L is better than the current best bound lower (step (10)), we update the latter and also the counter klast keeping track of this action. Its use can be seen in step (11). In the case it has not been updated for more than HalfNiter iterations, we decide lower has stagnated too long and decrease θ by half, thereby also keeping the current iteration count k in klast . Steps (12)–(15) care for the handling of search directions. We first calculate the “pure” gradient of L(λ) at the current point λ. Then we fix the update factor µ according to one of the rules discussed and add the scaled glast to g in step (14). Subsequently, glast keeps this new direction in step (15).
10.2. LAGRANGIAN RELAXATION
SubgradOpt( π )
Algorithm 21 Input: Output:
145
Subgradient Optimization variant of LB
instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem with cost function c scalar lower cost bound on π state vector xLB for π, not necessarily primal feasible λ := glast := 0 , klast := 0 , lower := 0 , θ := θ0 L := UboundConstr(π) P ′ := ∅
(1) (2) (3)
initialize initialize initialize
(4)
for k := 1 to MaxNiter do
{ multi-set for paths }
{ optimize Model (LRp) } (5) (6) (7) (8) (9)
∑
L := −
λ(A′ )
A′ ∈A
for d = (t, s) ∈ D do let Pd denote a cheapest s-t-path in G w. r. t. cλ L := L + cλ (Pd ) P ′ := P ′ + Pd endfor
{ Eq. (10.9), right term }
{ Eq. (10.9), left term }
{ update lower, θ } (10) (11)
if lower < L then lower := L , klast := k else if k − klast > HalfNiter then θ := θ/2 , klast := k endif
{ L = L(λ) } { too long no improvem. }
{ set g, update glast } (12) (13) (14) (15)
g(A′ ) := |{ d ∈ D | Pd ∩ A′ 6= ∅ }| − 1 for all A′ ∈ A
set update factor µ g := g + µ glast glast := g
{ update α, λ } L−L kgk2 (17) λ := max ( 0, λ + α g ) endfor (16)
α := θ
{ Equation (10.16) }
{ Eq. (10.14) or (10.15) } { Equation (10.13) } { keep this direction }
{ Equation (10.12) } { Eqs. (10.10), (10.11) }
{ set state vector }
′
for all P ∈ P ′ (18) xLB (P) := |P|P(P)| ′| (19) return ( lower, xLB )
{ compose xLB }
CHAPTER 10. LOWER BOUNDS COMPUTATION
146
The actual forward move in λ-space is carried out in steps (16) and (17): α according to the heuristic update and λ by projection of the update step to the nonnegative orthant. Returning the bound lower and the heuristic state vector xLB in step (19) finish Algorithm SubgradOpt. Practical Remark 10.8. We added one more refinement to Algorithm SubgradOpt: the iteration is terminated prematurely if L has failed to improve by at least a preset tolerance of εImp > 0 for a certain number ImproveIter of iterations. This termination condition mostly stops the procedure. We chose the constant parameters as follows: MaxNiter = 150, HalfNiter = 8, ImproveIter = 15, θ0 = 0.5 in “warm start” mode. For the very first run on Model (LPp), we set MaxNiter = 300, θ0 = 2. We assigned the improvement tolerance εImp = 0.5 in normal (integer) cost mode and εImp = 0.01 in feasibility mode where all path costs are zero except for the demand opponents (cf. Section 5.1 (p. 51)).
Choice of factor µ In order to find out which of the rules (10.14) or (10.15) fits best, we conducted test runs over their variations. We tried five values for a constant factor µ as well as the adaptive assignment of Equation (10.15). Table 10.4 gives the lower bounds produced. As expected, the overall picture is diverse. No single instance gives good hints for choosing a setting for µ. We applied the following simple evaluation scheme: in each row of Table 10.4, we marked the best and near-best entries in bold face. Subsequently, we counted these entries column-wise. The resulting numbers are given in the last table row. They can provide a rough orientation in which relative fraction of instances the setting of a column performed excellently. In this respect, a constant setting of µ := 0.65 is a best choice in expectation. A note about the adaptive rule, rightmost column. It meets the eye how its LB-values mostly go parallel with µ = 0.00, the “pure” subgradient direction. On mere 5 out of 30 instances, it delivers slightly different values. We found this phenomenon to originate from the two cases in Equation (10.15). If the second case is active, the method sets µk := 0 and thus joins the trajectory of a “pure” sequence. Empirically, the first cases occur rather rarely. So by and large, this rule does not differ much from the basic subgradient procedure, except for the iterated computations of (A xk − b) gk . In Table 10.5, we give the corresponding computation times, averaged over five identical runs each. The bold figures follow the same idea, here we marked the (near-)longest runs. We did not pick the shortest ones, as those runs often correspond to inferior bounds due to early termination. By tendency, the best bounds need most time. Fortunately, comparing the last rows in both tables reveals no apparent correlation. So the setting µ := 0.65 is not even a worst one time-wise. After these results, we adopted this constant setting permanently into our Algorithm SubgradOpt. The simplicity of Algorithm SubgradOpt comes at a delicate price: there are no less than five constant parameters to adjust, plus the need for L. Every instance reacts differently to them, turning their effective choices into an art form. We strongly confirm what several other researchers also report: finetuning the parameters takes a severe toll on the practical development time for the routine. Attempts of implementing more complex algorithms able to deliver good bounds “by themselves” are well worth the effort. A note on the complexity of Algorithm SubgradOpt is in order. The total number of iterations is limited by MaxNiter due to the lack of reliable better termination criteria . In every iteration, |D| cheapest paths computations have to be solved. Their effort varies with the presence of dependences in Model (IPp) and is investigated in detail in Chapter 11 (p. 172). Only in the “pure” disjointness cases, we can be sure to incur the usual polynomial complexity of Dijkstra’s Algorithm.
10.2. LAGRANGIAN RELAXATION
LB-value 0.00 tele354e18 tele354e19 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354n19 tele368n73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20 number of best:
147
Equation (10.14): µ = 0.25 0.50 0.65
0.80
equation (10.15)
7328.5 7677.5 95948.8 53405.0 112831.1 10559.0 7305.6 7668.7 8302.7 98081.8 57451.1 125753.8 7716.1 15028.7 20241.3 26625.3 30230.0 32399.6 12417.4 6100.0 6555.0 3003.0 6.0 7.0 8.0 160.0 100.0 114.0 208.0 280.0
7326.7 7687.7 95932.1 55049.4 112831.1 10559.0 7321.3 7673.8 8295.0 98146.0 57464.2 125897.9 7721.1 15023.5 20247.6 26649.4 30391.5 32398.5 12416.5 6307.7 6639.7 3003.0 6.0 7.0 8.0 160.0 100.0 114.0 208.0 280.0
7324.1 7685.0 95915.8 55353.9 112825.5 10559.0 7316.0 7674.1 8298.4 98140.8 57475.6 126103.6 7722.6 15024.6 20240.4 26650.0 30391.3 32426.2 12416.1 6308.7 6645.2 3005.1 6.0 7.0 8.0 175.2 100.0 114.0 208.0 280.0
7328.0 7686.6 95946.6 55305.0 112830.7 10559.0 7323.5 7667.6 8292.6 98146.0 57486.5 125982.4 7722.0 15028.0 20241.2 26649.3 30399.1 32428.1 12416.4 6302.2 6636.2 3004.7 6.0 7.0 8.0 171.4 100.0 114.0 208.0 280.0
7318.3 7662.9 95923.5 55057.3 112768.3 10559.0 7321.9 7675.0 8291.8 98145.8 56600.0 126099.7 7723.8 15022.6 20249.0 26612.3 30398.4 32423.9 12415.0 6300.2 6623.1 3004.3 6.0 7.0 8.0 160.0 100.0 114.2 208.2 280.0
7328.5 7677.5 95948.8 53405.0 112831.1 10559.0 7305.6 7664.5 8264.5 98097.4 57451.1 125753.8 7716.1 15028.7 20241.3 26625.3 30230.0 32399.6 12347.1 6100.0 6555.0 3003.0 6.0 7.0 8.0 160.0 100.0 114.0 208.0 280.0
15
17
19
22
16
13
Table 10.4: Resulting bound values by variating the update factor µ in Algorithm SubgradOpt. Middle five columns: constant settings, right column: adaptive setting. Bold figures indicate best or near-best bounds in a row. They are counted columnwise.
CHAPTER 10. LOWER BOUNDS COMPUTATION
148
time [ms] tele354e18 tele354e19 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354n19 tele368n73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20 number of longest:
Equation (10.14): µ = 0.00 0.25 0.50 0.65
0.80
equation (10.15)
123 101 225 89 276 160 346 199 138 28 565 533 387 107 276 628 1437 1933 112 28 43 23 6 7 8 247 225 454 989 1600
81 118 152 195 261 180 652 196 126 32 479 460 367 74 232 782 1582 1616 125 116 94 23 6 7 8 252 233 447 999 1641
84 99 110 489 217 168 540 166 125 20 423 557 432 68 206 753 1040 1453 90 112 150 32 6 7 8 715 231 444 996 1605
118 126 189 221 257 186 678 113 83 24 588 615 438 80 249 714 1333 1607 106 81 71 29 6 7 8 399 220 438 988 1573
61 47 118 117 164 166 370 152 71 21 114 574 434 33 324 503 1349 1386 86 50 38 18 6 7 8 283 218 437 978 1568
124 100 227 89 277 154 347 131 136 31 567 532 388 107 275 624 1434 1932 100 28 43 23 6 8 10 251 227 450 990 1604
14
16
12
11
7
12
Table 10.5: Results running times by variating the update factor µ in Algorithm SubgradOpt. Middle five columns: constant settings, right column: adaptive setting. Bold figures indicate longest or near-longest runs in a row. They are counted column-wise.
10.2. LAGRANGIAN RELAXATION
149
10.2.2 Bundle Methods Bundle Methods are a class of methods stemming from nonlinear optimization, see [Kiw89, Lem89] for a general introduction. The goal is to globally minimize a convex (or maximize a concave) function f over a convex domain X. The characteristic activity of a Bundle Method is to build up a first order cutting plane model f˜k of f consisting of k tangent planes on f at several distinct points xi , called a bundle: f˜k (x) := max ( f (xi ) + (x − xi )∂ f (xi ) ) i=1,...,k
where ∂ f (xi ) is a subgradient to f at xi . The sequence (xk )k is generated as follows:
(a)
initialize k := 1 choose x1 ∈ X
(b) (c)
while true do xk+1 := argmin f˜k (x) x∈X
(d) (e) (f) (g)
if mini=1,...,k+1 f (xi ) − f˜k (xk+1 ) ≤ ε then return ( xk+1 , f (xk+1 ) ) endif f˜k+1 (x) := max ( f˜k (x), f (xk+1 ) + (x − xk+1 )∂ f (xk+1 ) ) k := k + 1 endwhile
The first sample point x1 is chosen arbitrarily while all others are found by minimizing f˜k in place of f (step (c)). The smallest f -value mini f (xi ) over all known points represents an upper bound to the optimum minx∈X f (x) while the newly computed value f˜k (xk+1 ) marks a lower one. Note that by construction, these values are nondecreasing in k. In step (d), we check whether both bounds have converged close enough for termination and return the last point with its f -value as the case may be. Otherwise, we enhance the model to f˜k+1 (x) by adding the new tangent plane at xk+1 in step (f). This method suffers from two severe drawbacks: firstly, if we have too few planes in the bundle, the argmin in step (c) is undefined. Secondly, the iterates xi tend to oscillate vastly within X, they lack what is called the locality property. Tests have indicated that this tendency is a major obstacle to smooth convergence. A widely accepted remedy for both problems is to include a quadratic penalty term into the cutting plane model: 1 f k (x) := f˜k (x) + kx − xk k2 . 2tk It ensures limkxk→∞ f k (x) = ∞, so the argmin in step (c), now over f k (x), is always finite. Plus, by controlling tk , the point xk+1 is more or less close to xk . The price to pay is threefold: • we need a quadratic programming solver,
• we must sensibly adjust tk , • the lower bound f˜k (xk+1 ) to minx∈X f (x) behaves no longer monotonic in k. All these facts amount to the insight that a Bundle Method is just a variant of iterative search direction methods, cf. Equation (10.10) (p. 141). Its special features are the choices of direction and step size for which every concrete Bundle Method has its own recipe. While search directions gk are mostly taken from argminx∈X f k (x) and maybe deflected (cf. Equation (10.13) (p. 143)), step sizes αk are calculated from a broad range of subalgorithms, for instance, line search and trust region methods.
150
CHAPTER 10. LOWER BOUNDS COMPUTATION
Carresi, Frangioni, and Nonato [CFN96] develop an adapted framework of Bundle Methods for polyhedral functions like Lagrangian duals. Frangioni and Gallo [FG96] work out a detailed Bundle Method for Min-Cost Multicommodity Flow Problems . Babonneau [Bab06] continues along this line, designing a Bundle Method based on the Analytic Center Cutting Plane Method (ACCPM) by Goffin et al. [GGSV96]. Crainic et al. [CFG01] compare Subgradient and Bundle Methods experimentally on instances of the Fixed Charge Network Design Problem, generalizing the Multicommodity Flow Problem by variable capacity assignments. According to them, the essential differences between both principles are, when applied to Lagrangian duals L(λ): • Subgradient Methods are oblivious to the sequence history, they behave at every point λk as if it were the first one. Bundle Methods accumulate more information about L(λ) by enhancing their cutting plane model. • As a consequence, Bundle approaches need not move the current point λk in every iteration, as they can as well “learn” from an unfavourable search direction. They are usually designed to update the current point to λk+1 only if L(λk+1 ) > L(λk ) + ε, i. e., they attain an ascent property. • Subgradient Methods do not necessarily converge, as there is no general assurance mechanism. In contrast, Bundle Methods converge in a finite number of iterations, providing a proof of εoptimality upon termination. • Subgradient Methods mostly return only dual information about the relaxed model while Bundle Methods also offer useful primal information. • Subgradient Methods are easy to implement, but rely sensitively on several parameters to control the intrinsically unstable sequence. Bundle Methods are more sophisticated, yet converge more smoothly using less parameters to gauge. In particular, step (c) becomes increasingly tedious with growing bundle sizes, so there is need for a bundle deflation strategy. We did not develop a Bundle Method ourselves but adopted the Conic Bundle library cblib.a courtesy of Christoph Helmberg1 . Our corresponding LB-function is presented as Algorithm ConicBund. Its structure is straightforward, returning the same convex combination xLB of intermediate solutions as does Algorithm SubgradOpt. We set ε = 10−5 , MaxNiter = 300, and limited the bundle size to at most 25. Running time measurements are given in Section 10.6 (p. 167).
10.2.3 Other Lagrangian Approaches Lagrangian Decomposition Guignard and Kim [GK87] formally introduce the Lagrangian Decomposition principle, based on an idea first published by Glover et al. roughly a decade earlier. Instead of relaxing one set of original constraints, as is one in Lagrangian Relaxation, they add a trivial extra set of constraints and relax that as follows: cx min min c x s. t. A x ≥ b x ∈ X relax add → s. t. A x ≥ b x ∈ X → C y ≥ d y ∈ Y Cx ≥ d x ∈ X y = x y ∈Y 1 Available
at http://www-user.tu-chemnitz.de/˜helmberg/ConicBundle/. No printed or digital text reference published.
10.2. LAGRANGIAN RELAXATION ConicBund( π )
Algorithm 22 Input: Output:
151 Bundle Method variant of LB, using cb library
instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem with cost function c scalar lower cost bound on π state vector xLB for π, not necessarily primal feasible
(1) (2)
initialize initialize
(3)
repeat
λ := 0
P ′ := ∅
{ multi-set for paths }
{ optimize Model (LRp) }
λ := make ascent step(L, λ) with solution x∗ add the paths coded in x∗ to P ′
(4) (5)
{ library function }
{ check termination } (6)
until termination criterion(λ, ε) or number of L-evaluations ≥ MaxNiter
{ library function }
{ set state vector } (7) (8)
′
for all P ∈ P ′ xLB (P) := |P|P(P)| ′| return ( L(λ), xLB )
{ compose xLB }
endwhile
Model (LD)
LLD (µ) := min c x + µ (y − x) s. t. Ax ≥ b x ∈ X C y ≥ d y ∈ Y.
The sets X and Y are assumed to be compact and, most importantly, Y ⊇ X. Model (LD) decomposes into two separate ones: min min (c − µ) x µy + LLD (µ) = s. t. C y ≥ d y ∈ Y. s. t. A x ≥ b x ∈ X
OPT (LD) is found as the sum of the two optimal objective values. The authors point out the advantage of Model (LD) : one does not have to relax, i. e., lose, one set of original constraints, as all such sets are retained. They further compare the Lagrangian Decomposition Model (LD) to conventional Lagrangian Relaxation (LR) and prove max∗ LLD (µ) ≥ max L(λ) . µ∈R
λ≥0
They also characterize the cases unter which the inequality is strict. Wu and Ierapetritou [WI06] propose Lagrangian Decomposition for large scale linear programs of general type. They investigate the Lagrangian multiplier update by means of the Nelder-Mead Heuristic [NM65], a simplex based direct search method. According to their report, their procedure outperforms pure subgradient optimization when the heuristic, being highly sensitive to initial conditions, is started with the result of the former after its convergence has become too poor.
CHAPTER 10. LOWER BOUNDS COMPUTATION
152
However, when applying (LD) to our Unified Model, the advantage of retaining all constraint sets turns into the disadvantage of not getting rid of the hard constraint (ii). In Section 10.2, we have already ruled out an efficient solution of a problem enforcing (ii).
Dual Ascent Methods Another class of maximization algorithms for Lagrangian duals are Dual Ascent Methods. They focus on the idea of altering just one component of the multiplier vector λ at a time so as to attain an increase in the resulting value L(λ). The general scheme of the Dual Ascent approach is as follows: λ := 0 I suitably
(a) (b)
initialize initialize
(c) (d) (e) (f) (g)
while true do repeat choose a component λi , i ∈ I calculate a change ∆ for λi I := I − i
(h)
(i) (j) (k)
if I = ∅ then return L(λ) endif until L(λ + ∆1i ) > L(λ) λi := λi + ∆ update I accordingly endwhile
{ index set for candidate components }
{ no candidates left } { ascent achieved } { update λ }
Step (a) is the canonical beginning at the origin. Step (b), and later step (k), are somewhat involved, as they must assert that the candidate set I only contains indices of those λ-components possibly leading to an objective gain. Recall that L(λ) = min (c x + λ (A x − b)) x∈X
in the abstract notation of Model (LRp) (p. 140). Given a vector λ and an optimal solution x∗ to the argmin, components i eligible for I are thus characterized by one of two possible conditions: (10.17) (A x∗ − b)i > 0 ⇒ increasing λi by ∆ > 0 may increase L(λ), or
(10.18) (A x∗ − b)i < 0 and λi > 0 ⇒ decreasing λi by ∆ < 0 may increase L(λ) . In both cases, the product ∆ (A x − b)i is positive. There is no guarantee of actual ascent, however, as the maximal possible |∆| effecting an increase of L(λ) may be zero. This is the motivation for loop (d): we must repeatedly choose another candidate λi as long as we find no ∆ admitting strict growth of L(λ) (step (i)). In this way, the set I eventually runs of members (step (g)), leading to termination in step (h). This behaviour is due to the fact that we are maximizing and any maximum reached does not allow further ascent. Yet other, non-maximizing arguments λ may have this property and we come out with a submaximal return value. If indeed a suitable pair (λi , ∆) is found, we leave loop (d) downward to steps (j) and (k), updating λi and I accordingly. Subsequently, the next iteration of loop (c) ensues.
10.3. ONE INTEGRAL DEMAND
153
Guignard and Rosenwein [GR89] give general hints how to design Dual Ascent algorithms for Lagrangian Relaxations. Barnhart [Bar93] develops such a method specifically for Min-Cost Multicommodity Flow Problems . Other combinatorial applications of Dual Ascent Methods, showing their spirit, appear in [GO90, Tse91, BMM94, PLL98, Gen02]. The core difficulties of any such method are steps (e) and (f). The conditions (10.17), (10.18) defining the candidate set I are subject to frequent change, as with every update of λ in step (j) we have a shift of x∗ . Then, given I, we have to pivotize a promising candidate λi allowing for a large |∆| with actual objective increase. Several pivot rules are conceivable which can only be benchmarked empirically. Foreseeably, many tentative L-evaluations may be needed before an acceptable pair (λi , ∆) is found. Typically, after some successful iterations, but still well away from the optimum, the algorithm runs into a major obstacle: there is no single candidate λi left whose alteration leads to strict ascent. In this situation, we have no choice but to accept a degenerate step, i. e., one with |∆| > 0 yet L(λ + ∆1i ) = L(λ). The subsequent I-update may possibly produce a better candidate. It may also lead to a long chain of degenerate iterations where the first such candidate is re-found, thus necessitating an anti-cycling strategy. And even if we install such measures, on the trajectory towards the optimum there is almost always a situation where we must alter two or more multipliers simultaneously in order to gain an Lincrease. This again brings up the difficulty of pivotizing appropriate groups of candidates. Summarizing, the design of a Dual Ascent Method poses three challenges:
• making the I-initialization and updates efficient (steps (b) and (k)), • quickly finding “good” pairs (λi , ∆) (steps (e) and (f)), • dealing with situations where one-component alterations no longer suffice to achieve ascent. We decided not to implement a Dual Ascent variant of LB in our software. The intricacies necessary did not appear to outweigh the possible benefits.
Quadratic Extension Larsson and Yuan [LY04] formulate the Lagrangian Relaxation with a quadratic extension term and treat it as a nonlinear optimization problem using a Projected Gradient Method. They emphasize this method were especially suited for very large scale instances. Schneur and Orlin [SO98] also employ a quadratic extension term, but algorithmically solve the problem as a series of cycle cancelling and scaling phases.
10.3 One Integral Demand Naturally, there is often a duality gap between the IP optimum and the optimal LP or LR lower bound. Tightening this gap mostly leads to significant improvements in the main Branch-and-Bound algorithm. In this section, we highlight one technique we developed for this task. The LP Relaxation (LPp) of the Unified Model (IPp) is a canonical way of obtaining a lower bound. Instead of relaxing integrality on all demands, we retain it on one specially chosen demand. Notice constraint (iiib):
CHAPTER 10. LOWER BOUNDS COMPUTATION
154
Model (LPp/d0 )
min s. t. (i) (ii) (iiia) (iiib)
∑ ∑
c(P) x(P)
d∈D P∈P d
∑
x(P) = 1
P∈P d
∑ ∑
d∈D
P∈P d : P∩A′ 6=∅
x(P) ≤ 1
x(P) ≥ 0 x(P) ∈ {0, 1}
for all d ∈ D ′ for all A ∈ A for all P ∈ P d , d 6= d0 for all P ∈ P d0 .
Model (LPp/d0 ) relaxes less constraints than the “pure” LP Relaxation, so the relation
OPT(LPp) ≤ OPT(LPp/d0 ) ≤ OPT(IPp) holds for any demand d0 . In order to calculate the optimum, we have to do two things: select d0 and use a suitable optimization algorithm. We discuss these aspects in reverse order. Since we set out to tackle the Disjoint Paths Problem without the aid of a MIP solver, we devise the following Branch-and-Bound type Algorithm LboundLess. (The name refers to the one demand less relaxed.) It is a special case of Algorithm BranchBound (p. 59) with specialized choosing (cf. Section 6.2 (p. 61)) and constructive branching strategies (cf. Section 6.3.2 (p. 64)). Also, it specifies Algorithm ColumnGen as its underlying LB-variant. We begin in step (1) with a primal call to Algorithm ColumnGen, computing L := OPT(LPp) and its associated state vector x. In the (rare) case this solution is already all integral, we have even found OPT (IPp) and return both results immediately (step (2)).Otherwise, there is at least one fractionally routed demand d0 we can choose in step (∗). We defer its semantics for a moment and go through with the logic of LboundLess first. Initializing xLB , upper with the usual “no-information” default values and W with the given instance π closes the initialization phase, steps (3)–(5). The working set W consists of pairs (π′ , P0′ ) where P0′ ⊆ AdG0 \ AG ′ is a partial path for d0 in π′ = (G ′ , H ′ , A ′ ). At the start, we have not embedded any arcs yet, so the empty set accompanies π here. The Branch-and-Bound paragraph (6)–(9) mostly follows Algorithm BranchBound which is indicated by the non-digit line labels. We use the following specializations. We choose a member of W in step (Ch) according to the Best Bound First strategy of Section 6.2 (p. 61). The values L(π) refer to the lower bounds computed for each π prior to insertion into W . We store them along with every respective instance in the priority queue data structure. The following unlabelled line serves the notational definitions of G ′ , H ′ , A ′ , x′ and terminal s only. Vector x′ was also saved from the lower bound computation on π′ . Note that s always means the current in-terminal of the chosen demand d0 in π′ which is subject to shift by the branching rule, cf. Figure 6.1 (p. 65). The branching comprises steps (7)–(Bd2). We collect in set B all out-arcs of s that carry positive flow in the current state vector x′ . The rationale is that the LP Relaxation, through its flow paths, hints at these arcs while unused ones appear less interesting. Subsequently, loop (8) defines one subinstance πa for each such arc a in step (Br1), according to the constructive rule, cf. Equation (6.6) (p. 64). The bounding is carried out in the subcall of step (Bd1). Note the second argument P0′ + a which encodes the new embedding of arc a for demand d0 . Subroutine makeUpdates() in step (Bd1) evaluates its argument π′ by calling Algorithm NC (p. 85) and ColumnGen on it (steps (10) and (11)). The term c(P0′ ) has to added, since P0′ counts as a part of the desired solution. If π′ passes both tests in steps (10) and (12), we look whether d0 is routed integrally in step (13), our ultimate goal. If so, we know L′ = OPT(π′ ) and update the data upper, xLB of the best known solution accordingly. The vector xP0′ means the state vector equivalent of the partial path P0′ for demand d0 . Thus, the assigned xLB represents a feasible state vector for Model (LPp/d0 ). If otherwise π′
10.3. ONE INTEGRAL DEMAND
Algorithm 23 Input: Output:
155
LboundLess( π )
(LPp/d0 ) variant of LB instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem with cost function c scalar lower cost bound L on π state vector xLB for π, not necessarily primal feasible
(1) (2)
compute L := ColumnGen(π) with state vector x if x is all integral then return ( L, x ) endif
(∗)
choose one fractionally routed demand d0 ∈ D
(3) (4) (5)
initialize xLB := 0 initialize W := { ( π, ∅ ) } initialize upper := ∞
{ IP optimum found }
{ no solution known } { the current instance } { current best upper bound }
{ Branch-and-Bound } (6) while W 6= ∅ do (Ch) let (π′ , P0′ ) := argmin L(π), W := W − (π′ , P0′ ) (π,P0 )∈W
let π′ = (G ′ , H ′ , A ′ ) with state vector x′ and d0 = (t, s) ∈ DH ′
(7) (8) (Br1) (Bd1)
′ let B := { a ∈ δ+ G ′ (s) | x (a) > 0 } for a = (s, v) ∈ B do { branch on adj. arcs with flow } ′ ′ let πa := ( G − s − Aocc (a), H − d0 + (t, v), { A′ ∈ A ′ | a ∈ / A′ } ) ′ makeUpdates( πa , P0 + a ) { update W } endfor
(Br2) (Bd2)
let πB := ( G ′ − Aocc (B), H ′ , A ′ ) makeUpdates( πB , P0′ )
(Bd3)
W := { (π, P0 ) ∈ W | L(π) < upper } endwhile
(9)
return ( upper, xLB )
{ branch without flow arcs } { update W } { trim W }
makeUpdates( π′ , P0′ ) Input: an instance π′ ∈ Π with objective function c partial embedding P0′ of demand d0 Output: xLB , W , upper possibly updated (10) (11)
if NC(π′ ) = true then compute L′ := c(P0′ ) + ColumnGen(π′ ) with state vector x′
(12) (13) (14) (15) (16)
if L′ < upper then if d0 is routed integrally in x′ then upper := L′ , xLB := x′ + xP0′ else if π′ is not dominated by W then W := W + ( π′ , P0′ ) endif endif endif
{ optimal solution to π′ found } { update upper, xLB } { update W }
CHAPTER 10. LOWER BOUNDS COMPUTATION
156
is not dominated by W , we insert it into W (steps (15) and (16)). The notion of dominance here refers to Condition (6.2) (p. 61). Returning to the main part of Algorithm LboundLess, we branch out an extra subinstance πB capturing the remaining cases left open by loop (8). We have thus far only branched on the out-arcs incident to s carrying positive flow. Instead of prescribing one of them, we now delete them all, not altering d0 this time (steps (Br2) and (Bd2)). The next step (Bd3) is equivalent to the same one in Algorithm BranchBound. Returning the current best solution as the optimal one concludes the procedure.
Choice of Integral Demand Still open is the way of choosing the demand d0 in step (∗). Two ways seem to be reasonable: 1. choose d0 just once in the very first call to Algorithm LboundLess and stick to this choice ever after, 2. choose d0 adaptively in every call of LboundLess. If we set d0 once in the beginning, we can expend some effort into this choice. One possibility is to pick d0 := argmax OPT(LPp/d ) d∈D
with the idea to start out with the largest bound achievable with this method. Since the branching process only reduces the base graphs and never enlarges them, all lower bounds being optimal values for their relaxed model cannot decrease down the Branch-and-Bound tree. (Unlike, for instance, bounds from Algorithm SubgradOpt which are only approximations. They may drop down upon branching due to poor convergence.) So a head start with a smallest possible duality gap appears promising. One drawback of a fixed choice occurs when demand d0 turns out to be integrally routed in step (1). This is, by choice, never the case in the very first call to LboundLess, but may occur in subsequent ones. Another disadvantage is the time needed to compute the argmax over the entire set of demands. In our experience, computation times for LboundLess do not necessarily correlate positively with the final bound values. Figure 10.6 gives an example: On instance tele354n18, we computed lower bounds with Algorithm LboundLess (blue columns) where every demand was chosen once for d0 . The red line on top indicates the IP optimal value. The smallest columns correspond to demands that were routed integrally in the first place (step (1)). The effort for these calculations is expressed as the numbers of subcalls to Algorithm ColumnGen needed in steps (1) and (11) together (yellow columns). A faster heuristic choice might be better suited. To this end, we look more closely into the structure of the optimal LP solution in step (1). Each demand d is routed by n(d) paths in it. We might choose d0 := argmaxd∈D n(d) with the idea that a most diversified flow might well increase the bound when integralized to one path. In our experience, however, this is no strong correlation, especially when maxd n(d) ≤ 4, as we often found. We refine this choice by also regarding the amounts of flow x(P) on every path P: (10.19) d0 := argmin d∈D: n(d)≥2
∑
P∈P d : x(P)>0
|x(P) −
1 |. n(d)
The heuristic idea here is to pick a demand whose path flows lie most closely to a uniform distribution, possibly making “much” of a difference when forced together. Other approaches might consider the costs c(P) as well. Equation (10.19) may be applied in every call to Algorithm LboundLess, answering affirmatively to alternative 2. We give comparative time measurements in Section 10.6 (p. 167).
10.4. PATH COST RESTRICTIONS
157
OPT (IPp)
7900
OPT (LPp/d0 ) 7700
OPT (LPp) 7500 5 15 25
number of ColumnGen calls
Figure 10.6: Example tele354n18: comparison of LboundLess-bounds (blue) and number of ColumnGen subcalls (yellow) for all demands. Better bounds not necessarily need longer. Global Perspective Applying Algorithm LboundLess in our master Branch-and-Bound framework may be viewed as selectively leaving its “pure” choosing rule. In every lower bound calculation using LboundLess, we restrict ourselves to branching on one particular demand and a given one of its current terminals. So we selectively go more into the depth of the Branch-and-Bound tree than the master algorithm would go until the final bound is determined. Practical Remark 10.9. We do not keep track of the subinstances thereby generated, as they appear to be too special for the master. Also, since this sort of bound strengthening is essentially a heuristic idea, we safeguard Algorithm LboundLess with a time limit. Most often, it is not worth waiting for the exact optimal objective of Model (LPp/d0 ). This may be as time-consuming as the master B&B itself. Seen from the perspective of an entire Branch-and-Bound solver run, the idea of one demand less relaxed is most effective in the beginning where the fractional flows in the LP solution are most diverse. Towards the end, when more and more demands are integrally routed as a consequence of branching, its potential diminishes.
10.4 Path Cost Restrictions Another way of possibly raising lower bounds makes use of the global upper cost bound U we always have in the context of Branch-and-Bound. We restrict the Model (LPp) focussing on its path sets P d . Hitherto, they were unrestricted, containing all combinatorially possible embedding paths for their respective demands. If we now impose a limiting condition on them, we reduce their pool, i. e., the grounds for optimization. Consequently, the resulting bound may rise. We postpone the issue of efficiently accommodating the bounds U d in the path generation to Chapter 11 (p. 172). The kind of limiting condition we investigate is a cost restriction. It redefines the path sets P d for
CHAPTER 10. LOWER BOUNDS COMPUTATION
158 demands d = (t, s) as follows: (10.20) P d := { P is an s-t-path | c(P) ≤ U d } .
The scalar values U d play the key role here. In principle, we would be best off setting U d := c(Pd ) where {Pd }d is a set of optimal paths for Model (IPp). All more costly paths are obviously unneeded. Any setting satisfying U d ≥ c(Pd ) will also do, and the closer both values are the better. In the presence of many optimal feasible IP solutions {P1d }d , . . . , {Pnd }d , this approach is necessarily limited to U d ≥ maxi c(Pid ) for every demand d. We generally cannot distinguish between different optimal solutions while searching for them, so we may not reach the best possible values for U d with respect to any individual one of them. How can we give estimates U d high enough not to cut away any optimal path, yet low enough to be effective in strengthening the lower bound? At this point, the global upper bound U comes into play. Starting from Model (IPp), we define
Model (IPp−d0 )
min s. t. (i) (ii) (iii)
∑
∑
d ∈ D − d0
∑
P∈P
x(P) = 1 d
∑ ∑
d∈D
c(P) x(P)
P∈P d
P∈P d : P∩A′ 6=∅
x(P) ≤ 1
x(P) ∈ {0, 1}
for all d ∈ D ′ for all A ∈ A [ d for all P ∈ P := P . d∈D
The only difference to Model (IPp) is the subscript of the first sum in the objective function. In this model, one fixed demand d0 does not enter the objective. Still, it must be embedded by some path. Define (LPp−d0 ) to be the LP Relaxation of Model (IPp−d0 ). Let OPT(IPp)(π) denote the integral optimal value of instance π ∈ Π with solution S := { Pd | d ∈ D }. With the above notations, we see: U ≥ OPT(IPp)(π) (10.21) (10.22) (10.23)
= c(Pd0 ) + OPT(IPp)(π − Pd0 )
≥ c(Pd0 ) + min OPT(IPp)(π − P) P∈P d0
d0
= c(P ) + OPT(IPp−d0 )(π)
≥ c(Pd0 ) + OPT(LPp−d0 )(π)
(10.24)
⇒ c(Pd0 ) ≤ U − OPT(LPp−d0 )(π) =: Ud .
This (in)equality chain reflects the following reasoning. Starting with the defining relation of an upper bound U, we separate out the demand d0 and its optimal path Pd0 from the objective. Optimizing the residual instance π − Pd0 (for this syntax cf. Definition 9.1 (p. 101)) leads to the optimal value of OPT(IPp)(π) − c(Pd0 ): on the one hand, it cannot be larger, as there obviously exists the solution S − Pd0 with this value. On the other hand, it cannot be lower, as this would lead to a contradiction to the optimality of S. This establishes (10.21). The latter optimum may at best decrease if we free the subtracted path from being the optimal one Pd0 and minimize over its choice. The resulting expression in Equation (10.22) means that we optimize over a Disjoint Paths Problem in which one variable path P embedding demand d0 is deleted from the instance.
10.4. PATH COST RESTRICTIONS
159
It is the same task than to route this path as a part of the problem, but not score any costs for it. This precisely describes Model (IPp−d0 ) and Equation (10.23) follows. The last inequality is the standard LP Relaxation. Rearranging, we get the desired estimate (10.24). We note that it is not necessary to exactly optimize Model (LPp−d0 ), any lower bound LBd0 (π) to it is also valid. Practical Remark 10.10. In order to carry out the path cost restrictions in every node of the Branch-andBound tree, we store an array with the values LBd0 (π′ ) for all d0 ∈ D with each subinstance π′ . The saved values are being used when a subinstance is chosen out of W and branched: we then set the initial upper bounds to U d := U − LBd (π′ ). It is not practical to store the U d -values explictly, as the upper bound U may have decreased in the meantime. Fortunately, the Model (LPp−d0 ) is so very similar to our LP Model (LPp) that we do not need to develop any new techniques for solving it. We can use any of those developed in this chapter. The price to pay is having to solve or approximate the optimum for all demands. We now investigate how to best achieve either of these two tasks. Calculating the Optima Observation 10.11. a)
b)
We can compute OPT (LPp−d0 ) (π) under the same cost restrictions on P d that we are just computing. There is an inherent positive feedback mechanism, possibly leading to even better bounds. When computing the optima for d = d1 , d2 , . . . , d|D| in this order, we only have U d1 , . . . ,U di−1 available for calculation when we are at demand di .
In the light of Observation 10.11, we devised a round-robin scheme for calculating all desired optima. It acknowledges the fact of having limited information at any time and continues updating the tentative optimal values until no changes occur in one whole round. Algorithm LboundRound gives the details. The notation π − cd means the instance π with the objective function of Model (LPp−d ) (which is effectively c − cd ).
We again start with a primal call to Algorithm ColumnGen for obtaining OPT (LPp) (π) and its optimal state vector x (step (1)). We chose ColumnGen for this task, since it computes the exact optimum. There are no upper bounds yet (step (2), in subsequent calls to LboundRound initialized with the last ones) and copy x into tentative state vectors xd of all demands (step (3)). (Attention: for uniformity reasons, we here consciously override the definition of xd as an incidence vector of Ad . This definition is valid throughout this work except in this subsection.) Iteration begins with the demand being the first in some arbitrary order, which the end marker last is also set to (step (4)). Within the round-robin loop (5), we optimize Model (LPp−d ) under the current path cost bounds U d according to Observation 10.11 a). Step (6) is made efficient by “warm starting” the computation with the current state vector xd . In the first round, xd = x for all demands by initialization which proved a good head start due to the intimate relationship between Models (LPp) and (LPp−d0 ). In later rounds, ColumnGen essentially re-optimizes the optimal solution of its last call on the same subinstance. The ′ necessity of any calculations is easily recognized when at this point c(P) > U d for any optimal flow path ′ P ∈ P d coded in xd . This condition is typically dissatisfied in most consecutive calls of step (6), causing virtually no effort. The state vector x′ at this point may be infeasible, i. e., x′ = 0. This happens when the upper bounds U d have been updated in such a way that U d < distcG (s,t) for one or more demands d = (t, s). Upon detecting this condition in step (7), we propagate this result to the outside. If otherwise an update is possible (step (8)), we perform it and mark the current demand by last (step (9)). Updating xd and d itself finish loop (5) which is left through step (12) after no update occurred in one whole round.
CHAPTER 10. LOWER BOUNDS COMPUTATION
160 LboundRound( π )
Algorithm 24 Input: Output:
(LPp−d0 ) optimizing variant of LB
instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem with cost function c scalar lower cost bound L on π state vector xLB for π, not necessarily primal feasible
(1)
compute L := ColumnGen(π) with state vector x
(2) (3) (4)
initialize initialize initialize
U d := ∞ for all d ∈ D { current upper bounds } xd := x for all d ∈ D { current state vectors } last := d := first demand in D according to some order
{ round-robin } (5) (6) (7) (8) (9)
repeat compute L := ColumnGen(π − cd ) with state vector x′ under cost bounds U d using xd as “warm start” if x′ = 0 then return ( ∞, 0 ) else if U d > U − L then U d := U − L , last := d endif
(10) xd := x′ (11) d := next demand in D according to the order (12) until d = last
{ π − cd infeasible } { propagate infeasibility } { improvement made } { update variables } { update with optimal vector } { no change in one round }
{ recompute global bound } (13) compute L := ColumnGen(π) with state vector xLB under cost bounds U d using x as “warm start” (14) return ( L, xLB )
After the round-robin phase, we know the found bounds U d to be optimal in the sense of Equation (10.24). A final re-optimization of π itself under the resulting U d -values yields the return values (steps (13) and (14)).
Approximating the Optima
If we do not demand to find the exact values OPT (LPp−d0 ) (π), we can exploit the close relationship to Model (LPp) for efficient approximation. Figure 10.1 (p. 131) shows the generic scheme of Algorithm ColumnGen. If we were to optimize Model (LPp−d0 ) with it, we would have exactly the same diagram, the altered objective function c − cd0 , with zero costs for demand d0 , hidden inside. In particular, we would calculate the local lower bound value of LBd0 = dual(LPp−d0 ) according to Equation (10.7) (p. 136) as
10.4. PATH COST RESTRICTIONS
LBd0 :=
∑ (c − cd )λ(Pd ) − ∑ 0
d∈D λ
∑
= distG (s0 ,t0 ) +
d∈D−d0
(10.25)
161
|
λ(A′ )
A′ ∈A
cλ (Pd ) − {z
∑
A′ ∈A
= L−cλ (Pd0 )
= L − cλ (Pd0 ) + distλG (s0 ,t0 )
λ(A′ ) }
where d0 = (t0 , s0 ) and L is the local lower bound value computed in Algorithm ColumnGen, cf. Equation (10.7) (p. 136). As a path cost function for dist, λ is defined as λ(P) :=
∑ λ(A′ ) .
A′ ∈A : A′ ∩P6=∅
This is consistent with the definition of cλ where c = 0. So the only new information required is the third summand in Equation (10.25). We compute it with one extra cheapest paths computation per demand. Figure 10.7 shows the flow chart of the new Algorithm LboundEnpass. While the name LboundRound reflects the focus of this algorithm on the (optimal) LBd -calculations, LboundEnpass refers to their approximation along the way, en passant in French.
initialize P ′ := { d | d ∈ D } initialize lower := 0 enhance P ′ respecting (LBd )d
LBd := dual (LPp−d ) using λ(A′ )
upper := OPT (LPp′ ) over P ′
set optimal dual variables σ(d), λ(A′ )
no upper − lower ≤ ε ?
L := dual (LPp) using λ(A′ ) lower := max ( lower, L )
yes return lower
Figure 10.7: Scheme of Column Generation based Algorithm LboundEnpass with approximative calculation of OPT (LPp−d0 ) by dual (LPp−d0 ) for cost-restricting the path set P ′ . The red box is the only difference to Figure 10.1 (p. 131). Note how bounds from Equation (10.25) indeed give mere approximations to OPT (LPp−d0 ) , since the input variables λ are optimal for the different Model (LPp′ ). The generated sequence of the lower bounds array (LBd )d generally does not converge to the optima we rather had. Fortunately, in our experience the values achieved are very acceptable. The pseudocode of Algorithm LboundEnpass emphasizes the differences to Algorithm ColumnGen by quoting the identical steps with ellipses. The sequence of LBd -values is not monotonic, so we have
CHAPTER 10. LOWER BOUNDS COMPUTATION
162 LboundEnpass( π )
Algorithm 25 Input: Output:
(1) (2)
(LPp−d0 ) approximating variant of LB
instance π = (G , H , A ) ∈ Π of the Disjoint Paths Problem with cost function c scalar lower cost bound L on π state vector xLB for π, not necessarily primal feasible
... initialize
LBd := 0 for all d ∈ D
while true do
{ identical to ColumnGen } { now endless loop }
{ compute internal upper bound } (3),(4)
...
{ compute local lower bound L, enhance P ′ } (5)–(7)
...
(8) for d = (t, s) ∈ D do { unchanged, for clarity } (9) let Pd denote a cheapest s-t-path in G w. r. t. cλ and c(Pd ) ≤ U − LBd (10)–(12) ... endfor { evaluate termination criterion } (13)
...
(14) (15)
if upper − lower ≤ ε then return ( lower, xLB ) endif
{ now inside loop (2) }
{ calculate LBd , trim P ′ } (16) (17) (18)
for d = (t, s) ∈ D do LBd := max ( LBd , L − cλ (Pd ) + distλG (s,t) ) P ′d := { P ∈ P ′d | c(P) ≤ U − LBd } endfor endwhile
{ Equation (10.25) } { remove too costly paths }
to maximize over it (steps (1) and (17)). The repeat loop (2) has changed to an infinite one, as there is the new loop (16) after the termination criterion . The latter is unchanged, yet newly formulated as an if condition in step (14). In step (9), the cheapest path computation must now respect the cost limit of U − LBd . We refer the reader to Section 11.2 (p. 179) for algorithmic details.
Calculation of the LBd -values is the task carried out in loop (16). The update in step (17) follows Equation (10.25), the path Pd used here means the one generated in step (9). Subsequently, there may be some paths in the restricted set P ′ that do not obey the tightened upper bound of U − LBd . They are removed from P ′ with the exception of the one-arc path d with c(d) = M. The notation P ′d ⊆ P ′ in step (18) denotes the subset of paths embedding demand d. Practical Remark 10.12. The path cost bounds U d in Algorithm LboundEnpass depend on the sequence of λ-vectors coming from the optimization of Model (LPp). Typically, as with the main iteration, the bounds become better towards the end of LboundEnpass’s execution. This again is a prerequisite for the cost restriction idea to show effect. The feedback mechanism mentioned in Observation 10.11 a) tends to kick in rather late. So it is advisable to start the extra cheapest paths computations for LBd no earlier
10.4. PATH COST RESTRICTIONS
163
than upper − lower ≤ εLB · upper, i. e., when the main procedure has sufficiently converged. Effects of Path Cost Restriction Figure 10.8 shows the effects of employing path cost limits for a varying global upper bound U (horizontal axis). The vertical dimension plots the resulting lower bounds computed by the algorithms LboundEnpass, LboundRound, and a hybrid one combining LboundRound with the one-integral-demand idea of Algorithm LboundLess. Inside LboundLess, it calls LboundRound as the lower bounds routine instead of ColumnGen. The diagrams are to be read from right to left, as upper bounds tend to decrease during the Branchand-Bound process. They demonstrate on two example instances how we can expect the lower bounds to strengthen. The diagonal lines mark the identity. On tele354n18, even the strongest method does not attain the optimal bound value. As discussed in the beginning of this subsection 10.4, this is due to the approximative nature of Equation (10.24) (p. 158). tele1039x26 is an instance where the lower bound reaches the optimal value even before U does.
OPT (IPp)
OPT (IPp) + LboundLess
LboundRound + LboundLess LboundEnpass
LboundEnpass ColumnGen LboundRound 7500
7700 7900 tele354n18
ColumnGen 126500
127500 tele1039n26
128500
Figure 10.8: Correlation between upper and lower bounds under different path cost respecting algorithms. B&B tree / time tele354n18 tele1039x26
ColumnGen 992 10.3 s 1697 26.5 s
LboundEnpass 959 9.5 s 1531 26.9 s
LboundRound 338 23.7 s 67 15.6 s
+ LboundLess 15 26.3 s 1 5.7 s
Table 10.9: Performance of path cost restricted lower bounds on the instances of Figure 10.8 over an entire solver run. The second and fourth rows mean numbers of nodes in the Branch-and-Bound tree, the third and fifth rows running times. Table 10.9 documents the resulting execution times of entire solver runs. (We chose rather poor branching strategies in order to stress the effects.) They vary in the employed lower bound provider: “pure” ColumnGen without path cost restriction versus the three discussed above. As expected, the number of tree nodes diminishes with the strength of the lower bounds. On the flip side, the reduction effect may be more than compensated by the computational burden. This is clearly the case with tele354n18, yet not with tele1039x26. On the former, Algorithm LboundEnpass outperforms the
CHAPTER 10. LOWER BOUNDS COMPUTATION
164
others with just a slight head start before no path cost limits, whereas on the latter, the roles are reversed. Unfortunately, there is no clear means of determining this behaviour in advance, rendering application of the U d -idea a chance and a risk at the same time. The efficacy of cost restrictions on the path sets essentially relies on strong global upper bounds U. Seen from the perspective of an entire Branch-and-Bound trajectory, applying this idea is most effective towards the end where U is close to the lower bounds produced. It may be worth switching on path cost restriction mode when the gap decreases below a certain threshold. Remark 10.13. Once we have useful individual upper bounds U d at our hands, we can use them for two more purposes. Firstly, when a subinstance π′ is taken out of the working set W in Algorithm BranchBound (p. 59) step (Ch), the global bound U may be lower than at the time of its insertion into W , cf. Remark 10.10 (p. 159). Its lower bound LB(π′ ) has been calculated just prior to the update step (11) and thus under the bound strengthening possible by the old U-value. Maybe under the new U-value, π′ can be bounded due to strengthening. So we re-optimize π′ first before the branching step (Br). Secondly, restricted path sets mean restricted relevant base graphs. Every time U d is lowered for some demand d = (t, s), we can scan the nodes of the current d-layer Gd = (V d , Ad ) for the following cost condition: for v ∈ V d do if distcGd (s, v) + distcGd (v,t) > U d then Gd := Gd − v endif endfor
{ all paths containing v are too costly } { v is redundant }
In addition to the obvious impact, we can also expect further graph reductions through the calls to Algorithm NC (p. 85). By tendency, smaller graphs have more “bottlenecks” which are detected and removed in NC. An increased structural bounding rate may result. The practical effort for the dist calculations is very low. We only need one forward shortest distance labels computation in Gd from s and a backward one from t. Moreover, due to the nature of the reduction, we never have to recompute them, no matter how small Gd is made. In Chapter 11 (p. 172), we will even more strongly motivate why we want to have such label sets along with every base graph layer.
10.5 Allowed Dependences Revisited We reconsider the case of allowed dependences (cf. Definition 3.4 (p. 27)). In Section 4.3 (p. 40), we have seen that they do not straightforwardly translate into simple constraints, i. e., one clique inequality each. Even worse, the number of inequalities needed for describing them grows with the size of the dependence as well as the number of demands. See Figure 4.7 to recall the situation. The more inequalities an IP needs for its description, usually the weaker lower bounds from the corresponding LP are. In this context, we make an important observation. Observation 10.14. Given an original instance (G, H, A dep ) of the Disjoint Paths Problem. In constraint (ii) of the Unified Model (IP) (p. 37), we can get by with just one inequality per allowed dependence if we are willing to accept a slight deviation from linearity: (iia) ∑ max x(ad ) ≤ 1 for all Adep ∈ A dep . a∈Adep d∈D
Switching the a-sum in the forbidden-dependence constraint (iif) (p. 40) to a max allows all variables x(ad ) for the same demand d to simultaneously attain a one-value. This is exactly what there is to
10.5. ALLOWED DEPENDENCES REVISITED
165
an allowed dependence. So we neglect the clique covers we developed in Section 4.4 (p. 42) for allowed dependences and construct the constraint family A from the original dependences A dep just like the one for forbidden dependences. In the model, we then resort to the inequalities (iia) shown above instead of (iif). Concerning the arc-path Model (IPp), we need no changes. In the discussion following its introduction (p. 50), we reacted to forbiddenness of dependences by adopting a restricted definition of the layer path sets P d . With allowed dependences, we retain the same constraint (ii) and leave the path sets unrestricted. The only change is the redefinition of A . Observation 10.14 has got three important consequences. Firstly, in the Lagrangian Relaxation we need only one multiplier per allowed demand, as with the forbidden ones. Secondly, we obtain a stronger (LP) bound, as we show below. But thirdly, this imposes that we are able to efficiently carry out the cheapest paths calculations in the Models (LP) and (LR) on a nonlinear objective function. We defer this last issue to Section 11.4 (p. 190). Table 10.10 documents the bound strengthening resulting from Observation 10.14. For all feasible instances with given dependences, we have computed the optima of Model (LPp) in the old and new formulations. Figure 10.11 visualizes these results: the strengthened bounds are depicted as normalized fractions of the gap between the old bounds and the IP optimum. The picture is expectedly diverse, but in any case significant. Interestingly, there is no improvement on instance tele8072n20 (node-disjoint) while we get 100% gap closure on virtually the same instance tele8072e20 (edge-disjoint). During the trajectory, the bounds are slightly better, as the tree sizes demonstrate. The impact of raised bounds can be better appreciated over entire solver runs. We give node numbers of search trees in the lower half of Table 10.10. The strategy chosen was rather a poor one in order to contrast the better bounds against the old ones. We set U := OPT(IPp) in all cases in order to measure solely the lower bounding work. We employed this strengthening idea throughout our empirical work.
CHAPTER 10. LOWER BOUNDS COMPUTATION
166
OPT (LPp)
Observation 10.14
OPT (IPp)
demo37n3 tele354n18 tele368e73 tele978n16 tele1039n26 tele8072e20 tele8072n20 nodes B&B tree
21.5 7503.0 95246.5 57477.0 125744.8 7321.0 7729.0
23.0 7678.0 95949.0 57498.5 126051.3 7325.0 7729.0
23.0 7964.0 96598.0 57571.0 126896.0 7325.0 7990.0
demo37n3 tele354n18 tele368e73 tele978n16 tele1039n26 tele8072e20 tele8072n20
3 4894 291 46 410 111 16529
3 938 146 38 315 1 15881
LB-values
= 100 % = 19.2 % = 50.2 % = 82.6 % = 76.8 % = 0.9 % = 96.1 %
Table 10.10: LB-values and sizes of B&B trees in the case of allowed dependences strengthened by Observation 10.14 (third column). The second column shows the mode with old LP optima, the fourth one IP optima for comparison.
tele8072n20
tele8072e20
tele978n16
tele368e73
tele354n18
demo37n3
Observation 10.14
tele1039n26
OPT (IPp)
OPT (LPp)
Figure 10.11: Normalized LB-values in the case of allowed dependences strengthened by Observation 10.14. The green line marks the old LP optimum, the red one the IP optimum. Each column represents one instance of Table 10.10.
10.6. COMPUTATIONAL EXPERIENCE
167
10.6 Computational Experience In this section, we compare five LB-variants against each other:
CPLEX : none of our LB-routines, this is the CPLEX 11.0 LP solver, ColumnGen: (p. 135) Column Generation LP optimizer with ε = 10−5 in the termination criterion , SubgradOpt: (p. 145) Subgradient Optimization algorithm with MaxNiter = 300, HalfNiter = 8, ImproveIter = 15, θ0 = 2, εImp = 0.5, ConicBund: (p. 151) Conic Bundle algorithm with ε = 10−5 , MaxNiter = 300, maximal bundle size 25, LboundLess: (p. 155) Column Generation optimizer of stronger Model (LPp/d0 ) (p. 153) with choice of an integrally routed demand d0 . We computed a lower bound for each feasible example instance, see Table 10.12. Dependences are assumed to be of forbidden type. The results for allowed dependences are very similar. The times given in Table 10.13 were measured as averages over 10 identical runs with a “cold start.” We ran Algorithm LboundLess once with every d0 ∈ D and put the best achieved bound into the table in order to show the potential of this concept. Note the associated running times, they reveal the price which is mostly too high for practical purposes. Algorithms LboundRound and LboundEnpass are not suited for a comparison like this one. They show their strength only when an upper bound is also given. In our experience, even the optimal IP objective values as such bounds hardly make a difference. The case of Figure 10.8 (p. 163) (left) seems to arise most of the time. So testing these two is only sensible over entire solver runs, see Chapter 13 (p. 226). We did not further employ the hybrid algorithm introduced in Figure 10.8 and Table 10.9 (p. 163). It combines the ideas of integrally routing one demand and restricting the path sets by upper cost bounds. Its result values are fairly good, but its computation times are continually disproportionate. The comparative results of the middle four columns in both tables give a clear answer to the quality/efficiency question. Algorithm ColumnGen always attains the best bound at the lowest effort. The CPLEX LP solver naturally delivers the same bounds, needing between 3–100+ times the time for them. Algorithm ConicBund is also a good choice bound-wise, yet needing approx. 3–20 times as long as ColumnGen. The simplest Algorithm SubgradOpt performs in between, outputting suboptimal bounds in openly superoptimal time. This is no acceptable return for the additional burden of setting so many parameters for it. Overall, Algorithm ColumnGen performs consistently best in values and times. What cannot be seen from these tables: when used in “warm start” mode, ColumnGen mostly expends mere 2–5 iterations and is favourably fast for practice. Also, its state vectors can be stored as entire paths and given to primal heuristics without transformation. We selected it as the unique lower bound supplier for all applied work with our software.
CHAPTER 10. LOWER BOUNDS COMPUTATION
168
LB-values demo37e3 demo37n3 tele354e18 tele354e19 tele354e60 tele354e74 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354n19 tele354n60 tele354n74 tele368n73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20
OPT (IPp) 21 24 7329 7688 16 28 96598 55360 112834 11303 7325 7964 8462 20 31 98146 57571 127864 7990 15030 20263 26654 30496 32441 13074 6572 6817 3118 13 14 15 192 104 117 211 284
CPLEX LP solver 20.0 23.0 7329.0 7688.0 15.00 27.50 95949.0 55360.0 112834.0 11303.0 7325.0 7678.0 8303.5 19.64 31.00 98146.0 57498.5 126166.8 7729.0 15030.0 20250.7 26653.0 30406.0 32432.0 12418.7 6309.4 6646.2 3005.6 6.0 7.0 8.0 176.4 100.0 114.3 208.6 281.5
Column Gen 21.0 23.0 7329.0 7688.0 15.00 27.50 95949.0 55360.0 112834.0 11303.0 7325.0 7678.0 8303.5 19.64 31.00 98146.0 57498.5 126241.7 7729.0 15030.0 20250.7 26653.0 30406.0 32432.0 12418.7 6309.4 6646.2 3005.6 6.0 7.0 8.0 176.4 100.0 114.3 208.6 281.5
Subgrad Opt 20.5 22.0 7328.0 7686.6 14.85 27.45 95946.6 55305.0 112830.7 10559.0 7323.5 7667.6 8292.6 19.61 30.93 98146.0 57486.5 125982.4 7722.0 15028.0 20241.2 26649.3 30399.1 32428.1 12416.4 6302.2 6636.2 3004.7 6.0 7.0 8.0 171.4 100.0 114.0 208.0 280.0
Conic Bund 21.0 23.0 7329.0 7688.0 14.92 27.46 95948.8 55359.5 112833.2 11303.0 7325.0 7678.0 8303.5 19.62 31.00 98146.0 57498.1 126173.2 7728.5 15030.0 20250.5 26652.8 30402.1 32424.6 12418.6 6309.4 6646.1 3005.6 6.0 7.0 8.0 176.2 100.0 114.3 208.6 281.5
Lbound Less 21.0 24.0 7329.0 7688.0 15.50 27.75 96598.0 55360.0 112834.0 11303.0 7325.0 7940.0 8462.0 20.00 31.00 98146.0 57564.5 127753.5 7956.1 15030.0 20263.0 26654.0 30468.8 32441.0 12856.0 6572.0 6744.2 3118.0 11.0 12.0 14.0 184.0 101.3 115.3 209.6 282.2
Table 10.12: Lower bounds: comparison of bound values computed by the five routines. Bold figures indicate optimal bound values.
10.6. COMPUTATIONAL EXPERIENCE
time [ms] demo37e3 demo37n3 tele354e18 tele354e19 tele354e60 tele354e74 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354n19 tele354n60 tele354n74 tele368n73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20
CPLEX LP solver 2 0 118 129 13665 29426 250 387 406 544 1036 146 156 9725 2552 33 1077 1170 2992 90 490 1907 2996 11112 72 108 154 60 45 65 91 23917 1267 3186 17441 57937
169
Column Gen 1 1 12 18 238 315 13 42 38 11 74 40 31 81 67 4 79 119 130 11 47 264 382 871 25 15 15 4 23 44 82 325 74 128 438 511
Subgrad Opt 2 0 118 126 760 996 189 221 257 186 678 113 83 522 316 24 588 615 438 80 249 714 1333 1607 106 81 71 29 6 7 8 399 220 438 988 1573
Conic Bund 5 1 73 78 1276 1832 196 164 158 83 712 200 206 900 593 18 963 974 1434 25 692 1125 2258 2802 178 52 62 10 6 16 65 2585 174 688 6868 10145
Lbound Less 0 2 9 10 634 2577 26 27 20 6 37 1111 269 2991 66 4 410 661 7213 5 113 1126 94520 7525 2252 15021 7132 1152 428 1204 393 55171 2256 35017 14639 5328
Table 10.13: Lower bounds: comparison of computation times for the five routines. Algorithm ColumnGen clearly is the fastest.
170
CHAPTER 10. LOWER BOUNDS COMPUTATION
Part III
Cheapest Paths Computation
171
Chapter 11
Path Generation Finding cheapest paths, or at least their costs, with respect to various cost functions is a key ingredient in all the high-level methods described so far. Especially the algorithms of Chapter 10 (p. 129) strongly rely on efficient path generators as their most important subroutines, querying several such paths in every internal iteration. Therefore, we have to make sure they are calculated as fast as possible. In this chapter, we give an overview of the algorithms used inside ODEA. These include foremost the classical Dijkstra Algorithm and its pareto variants. Literature provides ample background information about shortest paths in theory and practice, for instance, [Joh77, GP88, Gol01]. Here, we draw from this knowledge and describe how we put it to work. We prefer to distinguish between shortest and cheapest paths: short refers to the number of arcs |P| in a path P while cheap means the accumulated arc costs c(P). Algorithmically, these two are equivalent. A note about the input data for path generation. All our algorithms of Part II are based on the Unified Models (IP) and (IPp) and thus accept layered base and demand graphs G , H as their inputs. Since all d-layers of G are disjoint, any path in G lies completely within one of these layers Gd . So finding paths naturally concentrates on one plain directed graph given as parameter G. The demand d = (t, s) to be connected need no longer be seen as an arc of H , as only its terminals are relevant. We supply them explicitly in the argument lists. The linear cost functions to be minimized are assumed to be implicitly given with the base graphs. We denote them by c′ in order to distinguish them from the original function c given with the instance data. By far the most calls to a path generator are with respect to c′ = cλ ≥ c, cf. Equation (10.6) (p. 135). Since generally c ≥ 0 and λ ≥ 0, we rely on c′ ≥ 0.
Some authors devise fast shortest paths algorithms for road networks, using hierarchical [Ert98] or decomposition approaches [KMS05], or by means of so-called landmarks [GH05]. In their setting, the graphs are very large and the task is to efficiently support repeated queries for distances between arbitrary node pairs with respect to a constant cost function. This is in contrast to our need for repeated calculations on relatively moderate graphs, but between always the same node pair and with respect to varying cost functions. Only two techniques from the road context are transferable, we take them up in the following section.
11.1 Dijkstra Algorithms The most basic of our algorithms for constructing cheapest paths is the Dijkstra’s famous algorithm [Dij59], presented as Algorithm DijkPlain. It computes an unrestricted cheapest s-t-path and its cost in O (|A| log|V |) time.
Algorithm DijkPlain maintains two arrays cost[·] and pred[·] both of which are indexed by nodes. The value pred[v] represents the current predecessor of node v in the cheapest paths tree under construction 172
11.1. DIJKSTRA ALGORITHMS DijkPlain( G, s, t )
Algorithm 26 Input: Output:
173 original variant of Dijkstra’s algorithm
base graph G = (V, A) with cost function c′ ≥ 0, distinct nodes s,t ∈ V either a cheapest s-t-path w. r. t. c′ or an error message if s and t are not connected cost[s] := 0, cost[v] := ∞ for all v ∈ V − s pred[s] := nil W := {s}
(1) (2) (3)
initialize initialize initialize
(4) (5)
while W 6= ∅ do v := argmin cost[w], W := W − v w∈W
{ termination criterion } (6)
if v = t then return the s-t-path given by pred[·] endif
{ scan node v } (7) (8) (9) (10) (11)
for a = (v, u) ∈ δ+ G (v) do if cost[u] > cost[v] + c′ (a) then cost[u] := cost[v] + c′ (a) pred[u] := v W := W + u endif endfor
{ update tentative cost } { update cheapest paths tree } { update working set }
endwhile (12) return “s,t are not connected”
′
while cost[v] is the tentative cost of the (unique) s-v-path through this tree, i. e., cost[v] ≥ distcG (s, v). They are initialized in a generic way in steps (1) and (2). The central dynamic data structure is the working set W . At any time, it contains those nodes that have been reached by the search and whose cost-values are not yet permanent. In every iteration of loop (4), we select one node v from W with smallest cost (step (5)), knowing from the principle of ′ optimal substructure that cost[v] = distcG (s, v) and the value is permanently correct. If v equals the target ′ terminal t, we have successfully found the desired value of distcG (s,t) and terminate in step (6). The cheapest s-t-path is determined by the pred data followed backwards from t to s. Otherwise, we continue the search in a process commonly called scanning of the node v, loop (7). We visit all forward neighbours u of v and check in step (8) whether the s-u-path via v yields a cheaper cost than the current one, cost[u]. If so, we update all data with this information in steps (9)–(11), otherwise there is nothing to do. Note that the instruction in step (11) may insert nodes into W which are already present, making no difference. In most cases, Algorithm DijkPlain terminates due to condition (6). If t is unreachable from s, the search will run out of nodes and end due to the loop condition (4). The clarifying output message is then returned in step (12). Several data structures for the working set W are validated by Cherkassky et al. [CGR96]. They
CHAPTER 11. PATH GENERATION
174
conclude that the density of the graph G primarily influences their efficiency. For complete or dense graphs, an individual search per iteration over an array is best while for sparse graphs, the nature of the cost function decides. For integral c, variants of bucket structures outperform all others, whereas for general c, tree heaps are favourable. The asymptotically better Fibonacci heaps (O (|A| + |V | log |V |)) are reported to suffer from too high administrative overhead on practical instance sizes. Our setting in all test instances is that of sparse graphs with general costs functions, so we have investigated on k-heap implementations for k = 2, 3, 4. Running times turned out to be almost insensitive to the choice of k. We fixed k := 4. The algorithm as presented is the forward variant, since it searches in forward arc direction starting at s. We can equivalently carry out a backward version starting at t and enumerating a = (u, v) ∈ δ− G (v) in step (6). The following three techniques for acceleration proved most effective.
11.1.1 Targeted Search Every node v ∈ V is associated with a label ℓ[v] satisfying two conditions: ′
ℓ[v] ≤ distcG (v,t) ′
ℓ[v] ≤ c (v, u) + ℓ(u)
lower bound property, consistency.
The former one affords us to estimate the remaining distance from a reached node to the target. The latter one allows us to modify the given cost function c′ to c′ (v, u) − ℓ[v] + ℓ[u] without losing nonnegativity. Three steps in Algorithm DijkPlain have to be altered, they are shown primed in Algorithm DijkTarget. All identical steps are quoted by ellipses. Its performance obviously depends on the quality of the ℓ-values. As stated, we know c ≤ c′ , therefore ′ we have distcG (v,t) ≤ distcG (v,t) for all nodes. In our software, we supplement every input graph G with a constant array of labels ℓ[v] := distcG (v,t) for all v ∈ V , satisfying both conditions. They are computed by one single backward run from t with Algorithm DijkPlain and stored together with G as long as needed. In the context of Branch-and-Bound, the base graphs of the subinstances newly generated by the branching are assigned from previously known base graphs by small reductions. Hence, it were possible to locally update the label arrays ℓ[·] instead of computing them from scratch every time. Pape [Pap74] describes an efficient scheme for this task. Its apparent disadvantage is the need for storing the entire cheapest paths tree with the labels. Since we exclusively make use of the labels and never the tree, this overhead is impractical. Especially so, as a Branch-and-Bound Method tends to be demanding on memory.
11.1.2 Bidirectional Search The search process begins with s and t simultaneously as described in Algorithm DijkBidir1. It constructs one cheapest paths tree Ts rooted at s and another Tt rooted at t. The initializations in steps (1), (3), and (5) are straightforward extensions of the ones in DijkPlain. Additionally, we need three more variables, preset in steps (2) and (4). • An array mark[·] representing node membership in one of the trees: 1 if v ∈ Ts mark[v] := −1 if v ∈ Tt 0 otherwise.
Membership is granted when the cost-label of a node is accepted as permanent, i. e., upon choosing it in step (7). No node will ever be in both trees.
11.1. DIJKSTRA ALGORITHMS DijkTarget( G, s, t )
Algorithm 27 Input:
Output:
targeted variant of Algorithm DijkPlain
base graph G = (V, A) with cost function c′ ≥ 0 and node labels ℓ[v] = distcG (v,t), distinct nodes s,t ∈ V either a cheapest s-t-path w. r. t. c′ or an error message if s and t are not connected
(1′ ) initialize (2),(3) ... (4) (5)
175
cost[s] := ℓ[s] { same as in DijkPlain }
while W 6= ∅ do ...
{ termination criterion } (6)
...
{ scan node v } (7) (8′ ) (9′ ) (10),(11)
for a = (v, u) ∈ δ+ G (v) do if cost[u] > cost[v] + c′ (a) − ℓ[v] + ℓ[u] then cost[u] := cost[v] + c′ (a) − ℓ[v] + ℓ[u] ... endif endfor
endwhile (12) . . .
′
• A bound upper ≥ distcG (s,t). This is necessary, since the two growing trees meet “somewhere in the middle” and termination is no longer indicated by reaching any specific node. The value upper is tentative until termination where it represents the optimal cost. • An arc b, called a bridge, connecting a node in Ts with another in Tt . Arc b is the one where the current upper is achieved, i. e., upper = cost[u] + c′ (b) + cost[v]. Keeping b is necessary only if the cheapest path is to be constructed later. Figure 11.1 gives a sketch of the situation.
b s t Ts
Tt
Figure 11.1: Construction of a cheapest path after termination of Algorithm DijkBidir1. The data available are the bridge b (red) and the pred[·] array, containing the directed arcs of both trees (green, blue). The path is found by following both end nodes of b back to s and t, respectively. The node v drawn from W in step (7) determines which of the two trees is extended by it. Node v
CHAPTER 11. PATH GENERATION
176
DijkBidir1( G, s, t )
Algorithm 28 Input: Output:
bidirectional variant of Dijkstra’s Algorithm, one set W
base graph G = (V, A) with cost function c′ ≥ 0, distinct nodes s,t ∈ V either a cheapest s-t-path w. r. t. c′ or an error message if s and t are not connected cost[s] := cost[t] := 0, cost[v] := ∞ for all v ∈ V \ {s,t} mark[s] := 1, mark[t] := −1, mark[v] := 0 for all v ∈ V \ {s,t} pred[s] := s, pred[t] := t upper := ∞, b := nil W := {s,t}
(1) (2) (3) (4) (5)
initialize initialize initialize initialize initialize
(6) (7)
while W 6= ∅ do v := argmin cost[w], W := W − v w∈W
(8)
mark[v] := mark[ pred[v] ]
{ add v to tree of predecessor }
{ termination criterion } (9)
if cost[v] ≥ upper/2 then return the s-t-path given by pred[·] and b endif
{ scan node v } (10) (11)
mark[v]
(v) do for a = {u, v} ∈ δG if mark[u] = −mark[v] then
{ a is a bridge }
if upper > cost[u] + c′ (a) + cost[v] then upper := cost[u] + c′ (a) + cost[v] { update upper bound } b := a { keep closing bridge } endif
(12) (13) (14)
else if mark[u] = 0 then
(15)
if cost[u] > cost[v] + c′ (a) then cost[u] := cost[v] + c′ (a) pred[u] := v W := W + u endif
(16) (17) (18) (19) endif endfor endwhile
(20) return “s,t are not connected”
{ update tentative cost } { update cheapest paths tree } { update working set }
11.1. DIJKSTRA ALGORITHMS
177
itself does not have a marking at this point, but it must have a predecessor, since pred[v] was assigned when v was inserted into W in steps (18) and (19). For the terminals s,t, this was the case in steps (3) and (5). If mark[ pred[v] ] = 1, v extends Ts , otherwise Tt . We mark this new membership in step (8). The termination criterion (9) is seen as follows. In the moment we choose v from W , we know ′ cost[v] = distcG (s, v). Let w. l. o. g. v be added to Ts . Since v was not reached earlier from t, we know it ′ must be found later. At that time, we would have cost[v] = distcG (v,t). Seen over the trajectory of Algo′ ′ rithm DijkBidir1, the cost-values of the chosen nodes are nondecreasing, thus distcG (s, v) ≤ distcG (v,t). By choosing v, we implicitly consider all s-t-paths P containing v. For all such paths, trivially c′ (P) ≥ ′ ′ distcG (s, v) + distcG (v,t) holds, as the two terms estimate the costs of both partial paths from below. We note that v is only interesting if c′ (P) < upper, otherwise we already know a better path. Putting together, we want (11.1)
′
′
′
upper > c′ (P) ≥ distcG (s, v) + distcG (v,t) ≥ 2 · distcG (s, v) = 2 · cost[v] .
As soon as Condition (11.1) is dissatisfied, it will hold never again, so we terminate. Depending on which tree node v actually extends, we have to scan it over its forward or backward neighbourhood. If it is Ts , we have mark[v] = 1 and need δ+ G (v), otherwise both with opposite sign. We mark[v] denote this choice by δG (v). The incident arcs are directed, yet we do not in general know whether v is their head or tail node. The notation {u, v} is intended to mean (v, u) in case of a forward arc and (u, v) otherwise. In step (11), we first test a for the bridge property, i. e., if it connects both trees. This is the case when both end nodes are labelled with 1 and -1, respectively. At this point, a concrete s-t-path is found with cost of cost[u] + c′ (a) + cost[v], cf. Figure 11.1. We can possibly update the upper bound upper and bridge keeper b accordingly (steps (12)–(14)). No further updates of the trees or the working set W are needed. If otherwise u is unmarked (step (15)), there is potential for the usual cost update. Steps (16)–(20) are equivalent to steps (7)–(11) of DijkPlain. This specific variant DijkBidir1 of the bidirectional search algorithm gets by with one working set W for both trees at the same time. This is no necessity, we could equally well use one separate set per tree and define some switching scheme between them. The easiest such scheme is to alternate. We call it DijkBidir2, the ’2’ standing for the two working sets. We compare the variants below in the (unnumbered) computational experience subsection. Note that the termination criterion (11.1) is merely ′ ′ partly valid, since the inequality distcG (s, v) ≤ distcG (v,t) is not guaranteed. We must use (11.2)
′
′
upper > distcG (s, v) + distcG (v,t) ≥ min cost[u] + min cost[u] u∈Ws
u∈Wt
instead where Ws ,Wt are the two working sets. The min-values can be queried in constant time as top operations from the priority queue data structures. Remark 11.1. Some authors report on combining the targeted and bidirectional searches. They all conclude that no improvement over them was achieved. We reinforce this result from own experience. The reason seems to be an apparent weakness of the available termination criteria, either (11.3) (11.4)
cost[v] ≥ upper
or
min cost[u] − ℓs [v] + min cost[u] − ℓt [v] ≥ upper .
u∈Ws
u∈Wt
′
′
In Condition (11.4), ℓs [v] ≤ distcG (s, v) and ℓt [v] ≤ distcG (v,t) denote the two label arrays. Condition (11.3) takes no advantage of bidirectionality, it applies to both search directions individually (v is the node last chosen from one of the two working sets). The other criterion exploits both directions, but must subtract the ℓ-labels from the cost-values containing them to be valid, rendering (11.4) effectively the same condition as (11.2). To our knowledge, no simple criterion integrating all advantages has been hitherto found. In addition, the two label arrays ℓs [·], ℓt [·] have to be computed for every base graph,
178
CHAPTER 11. PATH GENERATION
imposing an overhead hardly compensated for. We did not pursue this idea further than the comparative measurements in Table 11.3 below where we call it DijkCombi2. The ’2’ again stands for two alternating working sets.
11.1.3 Bivalent Cost Labels Working with instances involving given arc costs c, both acceleration methods described above show their advantages. In contrast, in feasibility mode (cf. Section 5.3 (p. 53)), we have c = 0 for all base arcs plus some small λ-values from the LP dual. Most of the latter are commonly also equal to zero. In this case, ℓ[v] = distcG (v,t) = 0 for all v ∈ V , yielding no advantage any more. Also, the bidirectional variant shows somewhat irregular behaviour, since the generated cost-labels do not vary much. The argmin choice of node v normally provokes a more or less balanced switching between the two trees. In the presence of many indistinguishable equal values, this is no longer the case, especially when they all belong to one of the trees. In this situation, two ideas come to help. Firstly, an alternating switching scheme between the trees, as mentioned above. Secondly, a lexicographical cost function c(a) := ( c′ (a), 1 ). The cost-values then become the bivalent labels cost[v] = ( c′ (P), |P| ) where P is the s-v-path through the tree defined by the pred[·] sequence. The secondary values give the argmin a means of differentiation between (many) labels with equal primary values. As a consequence, the search attains more of a sense of progress.
11.1.4 Computational Experience The three Dijkstra variants discussed above can only be fairly compared by tests over entire solver runs. This is no trivial activity, since they need not generate the same cheapest paths. Thus, the solver’s trajectory depends on the variant used and they are not interchangeable. Table 11.2 shows the results of straightforward comparisons without respect to this circumstance. We switched off the upper bound heuristics which would otherwise cause severe differences in cheapest paths subcalls. Instead, we set the global upper bound upper := OPT(π). The cost functions c = cλ were all univalent and we ran the solver in normal cost mode. We used the same branching strategy throughout. The results are hardly useful for comparative performance assessment. In order to obtain a fair comparison, we let the solver run with one and the same trajectory in every respective test, using the differential technique, cf. List of Symbols (p. xi). Table 11.3 shows only the net algorithm times, along with the total numbers of subcalls and the numbers of ℓ[·]-label computations. The latter only occurred for DijkTarget and DijkCombi2 (cf. Remark 11.1 (p. 177)). The results are presented graphically in Figure 11.4. They essentially prove what was to be expected. Basic Algorithm DijkPlain performs mostly worst of all and DijkTarget best. The latter outperforms DijkPlain in all example instances by a factor of 1.2–2.7 and the two DijkBidir’s by 1.0–3.4 . The two bidirectional variants come out roughly equal with a slight advantage for the second one with alternating sets. On larger instances, the DijkBidir’s need even longer than Algorithm DijkPlain. The variant DijkCombi2, combining the ideas of DijkTarget and DijkBidir2, is by tendency worse than both except where they differ considerably. On those large instances, it lies between the combined methods with a strong edge to DijkBidir2. Remark 11.2. So performance-wise, Algorithm DijkTarget is the clear winner. Its average computation times per call range between 25 µs on tele354n18 and 670 µs on vehi33000n16. This may be called excellent. Thinking back to Table 11.2, however, the efficiencies cannot always be realized. The chance that DijkTarget effectuates a short or long trajectory appears to be random and we cannot know its behaviour in advance. So we used it throughout our practical work nevertheless.
11.2. RESPECTING COST RESTRICTIONS
tele354n18 tele1039n26 tele8072n20 rand900e27 rand1200e33 rand1500e36 rand600n8 rand900n6 slab520n7 slab596n8 vehi13200n10 vehi33000n16 vehi46980n20
size of B&B tree Dijk Dijk Dijk Plain Target Bidir1 1314 1274 1292 483 483 483 216 240 260 726 604 621 143 108 142 569 78 177 1574 1455 1677 13107 12847 12876 31996 21101 44233 3211 8581 4330 11496 8566 6093 174 126 137 2170 519 3385
179 number of calls Dijk Dijk Dijk Plain Target Bidir1 110807 101468 106169 47548 47278 46322 19707 22851 23973 66208 57811 59134 9150 12947 8655 72875 14481 25495 41955 38931 45239 214522 212059 212060 644641 447456 866007 118394 299543 155824 191420 145079 107511 5879 4946 4408 108945 25805 178450
Table 11.2: Comparison of three Dijkstra variants over entire solver runs oblivious to the trajectories. The results display differences, since the cheapest paths are not always the same.
11.2 Respecting Cost Restrictions In Section 4.5 (p. 48), we opened the perspective of imposing side constraints on the routing, giving examples. In Section 10.4 (p. 157), a natural such constraint occurred, cf. Equation (10.20) (p. 158):
P d = { P is an s-t-path | c(P) ≤ U d } . If we now want to compute a cheapest path w. r. t. cλ under this restriction, we need a method capable of taking it into account. The routing problem in presence of side constraints is known in the literature as the Constrained Shortest Path Problem, cf. [HZ80, AAN83, RM86, DDSS95, MZ00]. This problem is known to be NP -hard by reduction to a Knapsack Problem, even for linear objective function and one linear side constraint. Several ideas have been developed to solve it, foremost Dynamic Programming, multi-label methods, or Lagrangian Relaxation. Ziegelmann [Zie01] gives a good survey. In our setting, we want to solve a rather specialized problem: argmin P∈P
c′ (P) .
d : c(P)≤U d
Furthermore, we know that c and c′ are closely correlated, affording us to use the same array ℓ[·] of labels for lower bounding both c and c′ simultaneously. Often the optimal path is an unrestricted one. We did not implement any highly sophisticated method, since the results for a simple one were already very acceptable (to follow below).
11.2.1 Pareto Dijkstra Approach From here on, we drop the superscript ‘d ’. We give a brief introduction to the underlying theory as far as our setting requires.
CHAPTER 11. PATH GENERATION
180
tele354n18 tele1039n26 tele8072n20 rand900e27 rand1200e33 rand1500e36 rand600n8 rand900n6 slab520n7 slab596n8 vehi13200n10 vehi33000n16 vehi46980n20
number of calls
number of labels
Dijk Plain
101468 47278 22851 57811 12947 14481 38931 212059 447456 299543 145079 4946 25805
1068 707 188 430 99 90 1204 6634 27915 19253 3039 129 396
3.8 3.3 3.2 7.6 2.2 2.9 2.9 33.7 16.2 16.8 68.0 6.6 44.9
algorithm time [s] Dijk Dijk Dijk Target Bidir1 Bidir2 2.6 2.0 2.2 5.3 1.2 1.9 1.6 19.4 12.7 13.8 25.1 3.4 21.2
3.2 2.3 2.6 5.3 1.4 2.0 2.0 25.4 12.9 17.2 85.1 8.9 67.8
2.9 2.0 2.3 5.2 1.3 1.9 2.1 24.3 13.8 16.5 61.5 6.5 48.9
Dijk Combi2 3.2 2.5 2.7 6.4 1.4 2.2 2.3 23.8 13.1 17.8 52.7 7.0 43.9
Table 11.3: Comparison of five Dijkstra variants over entire solver runs, forced to same trajectory. The intrinsic efficiencies of DijkTarget over DijkBidir1/2 over DijkPlain can be clearly seen.
tele
rand
slab
vehi
Figure 11.4: Results of Table 11.3. The columns of each instance are normalized to the respective time of Algorithm DijkPlain (upper bar). Red: DijkTarget, green: DijkBidir1, blue: DijkBidir2, yellow: DijkCombi2
11.2. RESPECTING COST RESTRICTIONS
181
Definition 11.3. Let P, P′ be two u-v-paths with cost values c(P), c′ (P) and c(P′ ), c′ (P′ ). We say P dominates P′ if both values of P are at most as large as the respective ones of P′ . In symbols: P P′
:⇔
c(P) ≤ c(P′ ) and c′ (P) < c′ (P′ ) or vice versa.
Dominance is a strict order relation: irreflexive, antisymmetric, and transitive. It induces a strict partial order on the set of all u-v-paths. We call a path P pareto optimal if there exists no other path dominating it. Pareto optimal paths represent extreme paths in the dominance order. The connection to our task of computing cheapest cost restricted paths is expressed by the following proposition. Proposition 11.4. Let P denote the set of all s-t-paths in a graph G. a) There exists a cheapest cost restricted path in P which is pareto optimal. b) Optimal substructure: any partial path of a pareto optimal path in P is also pareto optimal. Proof. a) Let P∗ ∈ P be a cheapest cost restricted path, i. e., c′ (P∗ ) ≤ (P) for all P ∈ P and c(P∗ ) ≤ U. If P∗ is not pareto optimal, there is a dominating path P′ P∗ with the properties c(P′ ) < c(P∗ ) and c′ (P′ ) ≤ c′ (P∗ ). These two cannot be valid vice versa, otherwise we get a contradiction to the optimality of P∗ . We then have c′ (P∗ ) ≤ c′ (P′ ) ≤ c′ (P∗ ) , c(P′ ) < c(P∗ ) ≤ U
and thus P′ also is a cheapest cost restricted path. If P′ still is not pareto optimal, we continue in this way finding a dominating path which must also be cheapest cost restricted. Since P is finite, we eventually terminate this sequence of paths with a pareto optimal one. Note that this path is lexicographically smallest w. r. t. (c′ , c) by construction. b) Consider the situation in Figure 11.5. P := P1 ∪P2 ∪P3 is an s-t-path and Q2 is a u-v-path w. l. o. g. disjoint to P except at u, v. If Q2 intersected P, we would consider a disjoint partial path of it with end nodes on P. P1
P2
u
P3 t
s
v Q2
Figure 11.5: Substructure of pareto optimality. Let Q := P1 ∪ Q2 ∪ P3 and Q2 P2 , i. e., c(Q2 ) ≤ c(P2 ) and c′ (Q2 ) ≤ c′ (P2 ) with a strict ‘ cλ (P ∪ Q2 ), so the value L(P) need not be a proper lower bound. A constellation like this is not detectable from the knowledge of P alone, i. e., when Algorithm DijkAllow scans node u. As can also be seen from this deduction, there are no factors γ(A′ ) > 0 such that the definition c(a) := c′ (a) +
∑
γ(A′ ) λ(A′ )
A′ ∈A 2 : a∈A′
would always induce a true lower bound. Only γ(A′ ) = 0 for all A′ ∈ A is safe, meaning we cannot strengthen the lower bounds by the λ-information from A 2 .
11.4.4 Set of Relevant Dependences The key point for good or bad performance of Algorithm DijkAllow is the dominance criterion, Equation (11.16) (p. 192): P P′ ⇔ cλ (P) < cλ (P′ ) − λ(A (P′ ) \ A (P)) . If we had no dependences, it would reduce to the usual Dijkstra update condition, cf. Algorithm DijkPlain (p. 173) step (8). The more dependences are present in the base graph and the larger their λ-values are in relation to the c′ -values on the arcs, the weaker dominance becomes. As a consequence, the more labels remain to be scanned and performance degrades. In this context, we make an important observation. Observation 11.9. A dependence A′ ⊆ AG is only relevant for domination if a) b) c)
at least two of its (anti-/parallel-free) arcs lie in the graph: |A˜ ′ ∩ AG | ≥ 2, and the λ-value it carries is positive: λ(A′ ) > 0, and all cheapest s-t-paths P contain at least two arcs of it: |P ∩ A′ | ≥ 2.
11.4. RESPECTING ALLOWED DEPENDENCES
197
If any of these conditions are not met, we can regard λ(A′ ) as a linear summand on the costs of its member arcs. In other words, we can move A′ from A 2 to A 1 (cf. Equation (11.11) (p. 192)) and neglect it in the dominance criterion. As the branching rule diminishes the base graphs, Algorithm DijkAllow may well be called with a G containing at most one (anti-/parallel-free) arc from some dependences. Their λ-values can be possibly added at most once, hence Observation 11.9 a). Aspect b) is immediately obvious from the dominance criterion. It is nevertheless worth noting, since the λ-vector usually represents optimal dual variables of some LP solution from Algorithm ColumnGen. (It is our favourite lower bound routine, see the discussion in Chapter 10 (p. 129).) They can only attain a positive value if, by complementary slackness, the primal flow through the corresponding dependence is equal to one. This usually is the case on rather few of them. To see Observation 11.9 c), we define the cost function (11.18) c(a) := c′ (a) +
∑
λ(A′ )
A′ ∈A 2 : a∈A′
which is similar to (11.10) (p. 191), but not identical: in Equation (11.18), the term c′ (a) includes the λ-values from A 1 whereas in the latter, the first term c(a) does not contain any λ-values. Clearly, c(P) ≥ cλ (P) for all paths in G, with equality if and only if |P ∩ A′ | ≤ 1 for all A′ ∈ A 2 with λ(A′ ) > 0. In the case a cheapest path w. r. t. cλ has got this property, we could have as well computed it as a cheapest path w. r. t. linear function c. Conversely, we only need to consider a dependence as relevant if there exits no cheapest path w. r. t. cλ with this property, implying c). This observation allows us to establish a set A rel ⊆ A 2 of relevant dependences by testing out the members of A 2 for fulfilment of the three conditions. The first one is readily checked with a complexity of O (|A′ |) for each A′ ∈ A 2 , the second in O (1). Condition c) is harder in general. We restrict ourselves to the special case of |A˜ ′ | = 2 for all A′ ∈ A 2 , a case we have on hand with our example instances. (For A˜ ′ cf. Equation (11.11) (p. 192).) Our approach is heuristical, fixing some dependence A′ satisfying conditions a) and b). We do not attempt to find out whether all cheapest paths intersect at least twice with A′ , but if none possibly can. This is clearly sufficient for exclusion from A rel . We make use of the lower bound labels ℓ[·] and estimate the cost of any path P ⊇ A′ from below. If the resulting value exceeds a valid upper bound C ≥ minP′ ∈P cλ (P′ ), we have the decision “irrelevant.” Otherwise, we cannot safely exclude A′ from A rel and consider it relevant. Figure 11.14 shows the two principal ways an s-t-path can pass through A′ in the case |A′ | = |A˜ ′ | = 2, i. e., with two directed dependent arcs. The case |A′ | > 2 follows straightforward by symmetry. The minimum cλ -cost of any path following the green way is bounded from below by ′
(11.19) L1 := distcG (s, u) + c′ (a) +
∑
′
′
λ(A) + distcG (v, x) + c′ (b) + distcG (y,t) .
A∈A ({a,b})
We not only include λ(A′ ) into the sum, but all dependences containing arcs a or b. (For A ({a, b}) cf. Equation (11.12) (p. 192)). This is correct, since the c′ -values do not contain any λ-values of dependences from A 2 and every such value is added exactly once. The three dist-terms are not all exactly known. This is no real obstacle, as they are estimates from below themselves. In order to obtain a reasonable L1 -value fast, we further estimate them in terms of the ℓ-labels: ′
distcG (s, u) ≥ |ℓ[s] − ℓ[u]| ′
distcG (v, x) ≥ |ℓ[v] − ℓ[x]| ′
distcG (y,t) ≥ ℓ[y] .
CHAPTER 11. PATH GENERATION
198
u
G
a
v
A′
s
x
b
t
y
Figure 11.14: Two basic ways (green, blue) for a simple s-t-path to pass through two dependent arcs a, b (red double arrow). Any path must cost at least as much as the smaller of the two estimates from below. ′
The latter inequality is immediate from the labels ℓ = distcG we use, the same holding true if the labels are the weaker ones ℓ = distcG . The former two inequalities follow from the inverse triangle inequality satisfied by the labels: ′
′
′
distcG (s, u) ≥ | distcG (s,t) − distcG (u,t)| = |ℓ[s] − ℓ[u]| ′ distcG (s, u)
≥
distcG (s, u)
≥
| distcG (s,t) − distcG (u,t)|
or = |ℓ[s] − ℓ[u]| .
So we can calculate an estimate L1′ for L1 according to Equation (11.19) in constant time. The blue way with an estimate of L2′ is handled analogously. Dependence A′ passes the test if L1′ ≤ C or L2′ ≤ C. Putting together, the routine for checking relevant dependences reads as follows: isRelevant( A′ , C ) Input: dependence A′ ∈ A 2 with value λ(A′ ) ≥ 0 upper cost bound C ≥ minP′ ∈P cλ (P′ ) from context: graph G = (V, A) with labels ℓ[·] Output: false if A′ is irrelevant according to Observation 11.9 true otherwise (A) if |A˜ ′ ∩ A| ≥ 2 and λ(A′ ) > 0 then (B) let A′ =: { (u, v), (x, y) } (C) let C′ := C − c′ (u, v) − ∑A∈A ({a,b}) λ(A) − c′ (x, y) if C′ ≥ 0 then if C′ ≥ |ℓ[s] − ℓ[u]| + |ℓ[v] − ℓ[x]| + ℓ[y] or C′ ≥ |ℓ[s] − ℓ[x]| + |ℓ[y] − ℓ[u]| + ℓ[v] then return true endif endif
(D) (E)
{ Observation 11.9 a), b) } { assign names to nodes }
{ Observation 11.9 c) }
endif return false Observation 11.9 a), b) are encoded in step (A). Step (B) assigns the names u, v, x, y in the manner of Figure 11.14 for subsequent use. We compute a reduced upper bound C′ in step (C), composed of the given one C minus those parts of Equation (11.19) occurring as partial sums of both lower bounds L1′ , L2′ . The query for C′ ≥ 0 in step (D) is logically unnecessary, since the condition (E), corresponding to Observation 11.9 c) in the estimated version, would detect it anyway. It stands there for practical reasons:
11.4. RESPECTING ALLOWED DEPENDENCES
199
condition (E) is of the or form and if indeed C′ < 0, all inequalities in it must be evaluated with a foreseeable false result. This effort can be saved by (D), especially in the (originally undirected) case |A′ | = 4 where (E) consists of eight inequalities.
At initialization of Algorithm DijkAllow, we have no upper cost bound C available. So we can at first only assign
A rel := { A′ ∈ A 2 | |A˜ ′ ∩ A| ≥ 2 and λ(A′ ) > 0 } . The cost bound test must be deferred to the main loop where we start performing it as soon as the first s-t-path P is found, delivering the needed C := cλ (P). We make the test once for each dependence when we meet one of its arcs in the scanning loop (5) for the first time. Practical Remark 11.10. This way, we gain another advantage: possibly not all dependences are actually met. In fact, our tests have revealed that typically between 60–80% of the dependences in A rel (after the above initialization) get checked. We call this the dynamic form of the relevant set management. Caveat: No Strengthening by Current Cost Labels It might be enticing to take one more advantage of dynamic management: if we perform the relevance ′ test upon first reaching a dependent arc, we should no longer need an estimate for distcG (s, u), but have a cheapest s-u-path P at hand in the label we are currently scanning. Using cλ (P) instead of |ℓ[s] − ℓ[u]| appears to be a welcome strengthening of the relevance criterion. Example 11.11. Consider the situation shown in Figure 11.15. Algorithm DijkAllow performs the following steps. The labels have the form (P, cλ (P), A (P)). We are given an upper bound of C = 7. Initially, A rel = {A′ , B′ }. c′ (a1 ) = 1 c′ (a2 ) = 2 c′ (a3 ) = 1 c′ (a4 ) = 1
A′
a1 a3
s a2
u
a4 v
λ(A′ ) = 3 λ(B′ ) = 1
t
B′
Figure 11.15: Deceptive idea to use cλ ({a2 }) as stronger value of distcG (s, u) in testing relevance. ′
1. Scan node s, assign two labels ( {a1 }, 4, {A′ } ), ( {a2 }, 2, ∅ ) to the label list of node u. Both labels do not dominate each other according to Equation (11.16) (p. 192). Scanning reaches dependence A′ for the first time, the relevance check results in 7 ≤ 7 in favour of relevance.
2. Take unscanned label ( {a2 }, 2, ∅ ) as the one with smallest cost, scan node u with it. We reach dependence B′ and check: 8 ≤ 7 against relevance. We drop B′ from A rel . Insert new label ( {a2 , a3 }, 4, {B′ } ) into list of node v.
3. Take unscanned label ( {a1 }, 4, {A′ } ) and scan node u with it. Insert new label ( {a1 , a3 }, 6, {A′ , B′ } ) into list of node v. Both labels do not dominate each other. 4. Take unscanned label ( {a2 , a3 }, 4, {B′ } ) as the one with smallest cost, scan node v with it. Respect the alleged irrelevance of B′ and add its cost again together with c′ (a3 ) = 1. Calculate the new cost of the s-t-path {a2 , a3 , a4 } as 9 and discard it due to 9 > 7.
5. Take unscanned label ( {a1 , a3 }, 6, {A′ , B′ } ) and scan node v with it. Respect the alleged irrelevance of B′ and calculate the new cost of path {a1 , a3 , a4 } as 8 and discard it due to 8 > 7.
CHAPTER 11. PATH GENERATION
200
So we come out with no path at all. Yet in reality, cλ ({a1 , a3 , a4 }) = 7 and the last path should have been the solution. The error happens in the second step when we identified B′ as irrelevant, based on the assumption ′ that cλ ({a2 }) = 2 correctly strengthens the term distcG (s, u) = 1 in Equation (11.19). This is wrong, as there is the s-u-path {a1 } attaining this dist-value. The deception lies in the minimum cost property of the choice of label to scan: it minimizes cλ , not c′ . So it is possible that we reach B′ first with the partial path {a2 } having non-minimal c′ -value.
A possible resolution of this circumstance is to make a change in Equation (11.19). Instead of the λ-sum, we merely add λ(A′ ). Then we can accept the minimal value cλ (P) upon first reaching A′ with ′ path P, since the resulting sum is basically the normal lower bound of cλ (P) + distcG (u,t), strengthened only with terms not maybe incorrectly doubling later (as with λ(B′ ) above).
11.4.5 A Priori Cost Bounds We have seen how it could be of help to know a good upper cost bound as early as possible. We can compute such a bound C and a global lower one L simultaneously by one call of Algorithm DijkTarget (p. 175) w. r. t. cost function c, cf. Equation (11.17) (p. 195). By definition, c(P) ≤ cλ (P) for all s-tpaths P in G, hence L := minP∈P c(P) ≤ minP∈P cλ (P). On the other hand, we also get the cheapest path P∗ := argminP∈P c(P) from this computation, yielding C := cλ (P∗ ) as an upper bound. Having such bounds L,C facilitates three things: • we immediately terminate with P∗ as output if L = C.
• we can carry out the relevance test on A 2 and fully initialize A rel before the main loop (called the static form of management). If A rel = ∅, we can call Algorithm DijkTarget (p. 175) w. r. t. function c (cf. Equation (11.18) (p. 197)) instead of entering the main loop. • through stronger cost-bounding, we have by tendency less pareto optimal labels in the graph nodes. In the former two cases, we expose an optimal s-t-path without having to execute the main loop of Algorithm DijkAllow at all. The price to pay for these advantages, besides the relatively costly call to DijkTarget, must also be mentioned. The initial complete relevance tests handle more dependences than are later reached, cf. Remark 11.10. Also, we cannot re-check dependences when the upper bound C is lowered during the course of the algorithm. With dynamic management, we have the chance to meet some dependences after a C-update and have a tighter relevance condition. ′
If we want to use the stronger lower cost labels ℓ = distcG , we must additionally compute them. As a by-product, we get a cheapest paths tree T w. r. t. c′ rooted at t. This tree can serve us to find a good upper bound C in the following way, cf. Figure 11.16. From the start node s, we step out one adjacent forward arc a and follow the (unique) cheapest path PT (v) in T from the neighbour node v back to t. Doing this for all adjacent arcs, we can form a minimum over these paths: C :=
min+
(s,v)∈δG (s)
cλ (PT (v) + (s, v)) .
If s ∈ PT (v), i. e., some ancestor of v in T is s itself, we ignore this path.
11.4.6 Computational Experience We tested Algorithm DijkAllow on our example instances with dependences. On each one, we differently combined the three possible improvement techniques:
11.4. RESPECTING ALLOWED DEPENDENCES
ignore
201
paths in tree T
δ+ G (s) PT (v) s
t
v
Figure 11.16: Using a cheapest paths tree T with root t for calculating an upper bound C. From every forward-neighbour v of s, we concat the arc (s, v) with the v-t-path PT (v) ⊆ T and mostly obtain an s-t-path. relevant set management: a priori bounds: stronger ℓ-labels:
none, dynamic or static, none or one call to DijkTarget w. r. t. c none or one call to DijkPlain w. r. t. c′ .
Accordingly, Table 11.18 is composed of two major parts. The upper one shows the statistics of runs with the weak lower bound labels w. r. t. function c. We keep static label arrays ℓ[v] = distcG (v,t) with all occurring pairs (G,t) in our solver, so these values come for free relative to our local focus on cheapest path generation. On the infeasible instances tele354n19,60,74, we have c = 0 and no labels at all. We let the solver run 4 times over entire trajectories with identical branching strategies in each row, forcing them to the same trajectory and measuring the times by the differential method (cf. Section (p. xi)). The horizontal groups in Table 11.18 contain the following figures: column 2: columns 3–8: columns 9–12: columns 13–18:
quantity of calls to DijkAllow during the run, average number of the cost labels generated in all reached nodes according to Equation (11.5) (p. 184), percentage of all calls in which the main loop was not entered after the initialization exposed an optimal path, differential running times spent exclusively in DijkAllow.
Columns 3, 9, 13 represent the unmodified algorithm as presented in the pseudocode. Comparing the modifications against it, we can see the following. The numbers in parentheses mean column indices. • Static relevant set (5) shows no changes to (3). This is to be expected, since there is no s-t-path known at initialization, thus no upper cost bound to reduce the set. Dynamic relevant set (4) is better, since the relevance checking partly occurs after the first path has been found and more dependences are deleted from the set. • The percentage of exposed optimal paths in (9) is due to occasional absence of relevant dependences in the base graphs. This happens by graph reductions in the branching or by having λ = 0 on all dependences present. Static relevant set (10) hardly improves this, as good upper bounds still lack. Rarely, there is an s-t-path from some previous iteration for an upper bound. Dynamic relevant set must have the same figure as none (9), as the dynamics apply no earlier than in the main loop. We need no separate column here. • Concerning running time, static relevant set (15) is virtually no better than none (13). Typically, it just adds a slight overhead for the relevance checking. If it appears better, it is well comparable to none, the difference possibly due to the error in imprecise measurements. Dynamic relevant set (14) is also mostly comparable to none, yet demonstrates improvement by 6–18% on the three infeasible instances.
CHAPTER 11. PATH GENERATION
202
• Introducing the upper and lower bounds calculation significantly changes the picture. A portion of optimal paths is found when both bounds L,U coincide, proven by the increases of (11) over (9). Also, we find contra-intuitive increases in (6) over (3) whose origin is not entirely clear. We conjecture that the paths now exposed in the initialization are “easy” to find, after all they were produced by a normal DijkPlain run with a label ratio of one. Since the average calculation extends over all executions of the main loop only, the resulting values tend to rise. Also, due to the better orientation towards the target node t, less nodes are visited during the search. This possibly decreases the set of reached nodes over-proportionally. Yet, the advantages are over-compensated by the cost of the extra call to Algorithm DijkTarget, as can be clearly seen in the increase of (16) over (13). • The relations of static and dynamic relevant set to none within the with-bounds groups (6)–(8), (11)–(12), (16)–(18) are basically the same as the ones within the no-bounds groups standing on their respective left sides. One exception is (12) to (11) where we have a trend to higher raises than between (10) and (9). The reason are the stronger initializations of the relevant sets facilitated by the upper bounds. This way, the set is rendered empty more often, exposing an optimal path from a simple DijkTarget call. The lower part of Table 11.18 shows in principle the same tests as the upper one, this time with ′ stronger lower bounds of ℓ = distcG . They have to be computed in every call to Algorithm DijkAllow as part of the initialization. Most striking are the significant improvements in the percentages of exposed paths, columns 9–12. They are due to the stronger relevance checking heavily relying on the ℓ-bounds, cf. Section 11.4.4. Other than that, the relations are the same as described above for the upper part. Figure 11.19 presents the relations in Table 11.18 graphically. Note the differences in calling numbers between both parts in column 2: they are caused by variations between the label modes in the cheapest paths returned. The trajectory of the solver depends on them, so the Differential Method cannot avoid it. In order to achieve an overall decision which mode of operation is generally best, we normalized the best algorithm time from each row of Table 11.18 by the number of calls during that time. The results are the average execution times per call displayed in Table 11.17. Surprisingly, the strong ℓ-bounds w. r. t. function c′ are at a loss. With one mere exception, their computations do not amortize.
tele354n18 tele354n19 tele354n60 tele354n74 tele978n16 tele1039n26 tele8072n20
ave. time per call [µs] dist w. r. t. c dist w. r. t. c′ 95 115 200 175 65 78 55 65 124 181 81 143 136 359
Table 11.17: Normalized algorithm times of Table 11.18. With only one exception, the calculations of stronger distance labels w. r. t. function c′ do not pay off. The gap widens as instance sizes grow.
average number of labels no initial bounds with init. bounds relevant set relevant set none dyn. stat. none dyn. stat.
finished after init. [%] no init. bds. with bounds relevant set relevant set none stat. none stat.
algorithm time [s] no initial bounds with init. bounds relevant set relevant set none dyn. stat. none dyn. stat.
dist-labels w. r. t. c
tele 354n18 354n19 354n60 354n74 978n16 1039n26 8072n20 tele
68580 142937 297830 102130 63543 127894 267560
1.57 2.02 1.36 1.49 1.13 1.16 1.03
1.54 1.75 1.30 1.40 1.13 1.16 1.02
1.57 2.02 1.36 1.49 1.13 1.16 1.03
1.64 2.10 1.46 1.66 1.15 1.21 1.03
1.59 1.80 1.37 1.52 1.14 1.20 1.02
1.63 2.06 1.46 1.66 1.14 1.21 1.03
0.0 0.0 8.8 11.4 0.0 0.0 6.4 6.5 3.4 3.4 21.0 21.0 11.3 11.3 26.9 26.9 4.9 5.9 15.9 19.6 3.6 3.6 18.7 24.1 29.9 29.9 39.4 39.4 dist-labels w. r. t. c′
6.5 35.0 20.5 6.0 7.9 10.3 36.4
6.5 28.6 19.3 5.6 8.1 10.3 36.6
6.6 35.5 20.8 6.2 8.0 10.2 36.6
7.9 39.7 25.4 6.7 10.8 12.3 39.1
7.9 33.4 24.2 6.2 10.9 12.5 39.0
8.2 40.1 25.9 7.0 10.9 12.4 39.4
354n18 354n19 354n60 354n74 978n16 1039n26 8072n20
77310 132392 172492 98910 70832 132106 299360
1.63 1.95 1.25 1.28 1.13 1.15 1.00
1.53 1.60 1.19 1.21 1.04 1.13 1.00
1.63 1.95 1.24 1.28 1.13 1.15 1.00
1.66 2.02 1.28 1.32 1.14 1.18 1.00
1.55 1.63 1.21 1.23 1.04 1.15 1.00
1.63 1.84 1.25 1.30 1.05 1.17 1.00
10.9 6.7 27.8 33.2 19.6 22.8 45.1
10.9 6.7 27.8 33.2 21.3 22.8 45.1
13.5 10.3 30.7 35.6 22.7 26.3 45.7
20.9 11.1 31.1 35.9 32.3 33.5 47.3
9.0 29.2 13.6 6.4 12.8 18.9 108.0
8.9 23.2 13.7 6.5 12.9 19.1 107.8
9.2 29.3 13.4 7.1 13.0 19.2 107.4
12.2 35.1 18.0 8.7 18.9 26.9 136.8
12.0 28.8 17.9 8.5 19.0 27.1 136.3
12.5 32.8 18.6 8.8 20.0 28.6 141.3
columns:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
11.4. RESPECTING ALLOWED DEPENDENCES
number of calls
Table 11.18: Comparative results of six modifications of Algorithm DijkAllow. The bold values mark the best times in their rows, with tolerances within expected measurement error. Significant: initial bounds computation never pays off and dynamic relevant set determination claims a best time in all instances. 203
CHAPTER 11. PATH GENERATION
dist w. r. t. c′
354n18
dist w. r. t. c
354n19
354n60
354n74
978n16
1039n26
8072n20
204
Figure 11.19: Results of Table 11.18. The columns show the relative computation times of Algorithm DijkAllow normalized to the ones in column 18 (upper bar), being mostly the respective largest. The green columns correspond to columns 13–15, the blue ones to 16–17.
Chapter 12
Disjoint Stars Approach In our context of the Disjoint Paths Problem, we make the following observation. Observation 12.1. Given a base graph G = (V, A) with arc capacities cap(a) and node demand values dem(v). Further let there exist one node s with dem(s) < 0 and dem(v) ≥ 0 for all v ∈ V − s. We define a demand graph H = (T, D) by D := { (ti , s) | ti ∈ V : dem(ti ) > 0 } with demand strength values of str(ti , s) := dem(ti ). a) b)
The Minimum Cost Multicommodity Flow Problem on (G, H) coincides with the SingleCommodity Problem obtained by neglecting the distinctness of the demands. If str(d) = 1 for all d ∈ D and cap(a) = 1 for all a ∈ A, then there exists an optimal feasible solution consisting of disjoint paths.
Observation 12.1 a) means, if H attains the special form of a star, we need not distinguish between the different demands and can solve the original Multicommodity Flow Problem as a single-commodity one. This follows immediately from the flow decomposition theorem (cf. [AMO93], pp. 80f): having an optimal single-commodity min-cost flow at hand, we associate each of its decomposing s-ti -paths with the respective (unique) demands (ti , s) and obtain a multicommodity solution with the same objective value. This assures optimality. Moreover, Observation 12.1 b) guarantees feasibility under our even more special settings concerning capacities and demand values. This again follows from the integrality property of flows with integral input data. In essence, the Disjoint Paths Problem reduces to an “easy” Min-Cost Single-Commodity Flow Problem when the demand graph is a star. This fact suggests that we decompose a more general demand graph into stars. In the sequel, we solely consider the problem without dependences or cost constraints to respect. This induces no restriction on dependences of the forbidden type. Algorithm DestrForbid (p. 189), our deliverer of cheapest paths under forbidden dependences, exclusively relies on Algorithm DijkTarget (p. 175), the method for cheapest paths without dependences. The Branch-and-Bound Method used in DestrForbid remains valid for the technique presented in this chapter, so Algorithm DijkStar — developed in Section 12.2 (p. 213) — straightforwardly leads to an analogous Algorithm DestrStar. Furthermore, we assume that all demand strength values are equal to one and all cost coefficients of the different copies of same original arcs in the d-layers also. If they are not, the approach is still possible, yet with more stars, weakening the benefits. So in order to investigate the most possible advantages, we leave out such circumstances. 205
CHAPTER 12. DISJOINT STARS APPROACH
206
12.1 Terminal Covers 12.1.1 Partitioning the Demand Graph Definition 12.2. Given a demand graph H = (T, D). Let T + := {t ∈ T | δ+ H (t) 6= ∅ }
T − := {t ∈ T | δ− H (t) 6= ∅ } .
T := T + ∪ T − .
The set T + comprises those terminals of H that are tail nodes for at least one demand containing them. Equivalently, all terminals being head nodes constitute T − . The terminals t ∈ T + ∩ T − play a double role. We implicitly split the latter into two copies t + ,t − in the definition of T where we join both sets disjointly together. This way, we obtain a bipartite graph (T , D), see Figure 12.1 a) and b).
a)
t1
t2−
b) t1
t2−
c) t1 D(t1 )
T+ t2
t3
t2+
T−
D(t3− ) t3−
t3−
t2+ D(t4 )
t4
t3+
t4
t3+
C = {t1 ,t3− ,t4 } t4
Figure 12.1: Construction of a partitioned demand graph: a) given demand graph H = (T, D), . b) bipartite intermediate graph (T , D) with T = T + ∪ T − after terminal splitting, c) graph H = (T , D) with partitioned demand set D = { D(s) | s ∈ C }. The circled nodes belong to the node cover C. Fix any node cover of T , i. e., a set C ⊆ T with the property that {s,t} ∩C 6= ∅ for all d = (t, s) ∈ D. We call C the set of centres. We now partition the demands D such that the members of every subset share a common centre: ( { (s,t − ) ∈ D } if s ∈ C ∩ T + D(s) :⊆ { (t + , s) ∈ D } if s ∈ C ∩ T − with D(s) ∩ D(s′ ) = ∅ for all s′ ∈ C − s .
The set D(s), called the arm set of s, need not be uniquely determined by C, as can be seen in Figure 12.1 c). Since {t1 ,t3− } ⊆ C, The demand (t1 ,t3− ) might as well be contained in D(t1 ) instead of D(t3− ). If we have such a partition, we call C a terminal cover. With its centres, we define the star set D := { D(s) | s ∈ C } . The resulting graph H = (T , D) is a partitioned demand graph. Note that in H, we no longer have the original demands, i. e., terminal pairs. In their place, we have the arm sets, or stars, of the terminal cover as entities. So the distinctness of the demands within each
12.1. TERMINAL COVERS
207
arm set is dropped, according to Observation 12.1 a). The Disjoint Paths Problem on (G, H) is thus transformed into a Disjoint Stars Problem on (G, H). Our Unified Model (IPp) (p. 50) readily carries over to this approach by two replacements: layered base graph: G no longer consists of one layer Gd per demand d ∈ D, but of one layer Gs per arm set D(s), S ∈ S s . path sets: the P d , d ∈ D, turn into sets of star flows S s , s ∈ C. Each star flow S ∈ S s embeds its corresponding arm set D(s) by disjoint s-ti - or ti -s-paths, depending on the orientation from or towards the centre s. As a consequence, almost all our algorithms adapt to this formulation without semantic change. Where we call for a cheapest path, we now query a cheapest star flow. Two questions remain to be treated in this place: how to construct a terminal cover and how to compute a cheapest star flow.
12.1.2 Computing Minimum Node Covers The remainder of this section is devoted to the algorithmic construction of terminal covers. Every such cover induces a partitioned demand graph, no additional properties are required. So in principle there are no guidelines which covers to prefer. We will briefly return to this issue in Section 12.3 (p. 218) where we have an impartial means of evaluating them against each other. For now, we follow the intuition that a minimum terminal cover seems most effective, since it forces the demands into as few arm sets as possible. If we could get by with the extreme of one arm set only, we would get back the polynomial case of a star demand graph. Figure 12.2 shows examples of minimum terminal covers on two of our test instances.
tele354x19 19 demands 5 stars
tele354x60 60 demands 17 stars
Figure 12.2: Minimal terminal covers on the demand graphs of tele354x19 and tele354x60. The topic of finding a minimum node cover in the graph H = (T , D) is to locate a subset C ⊆ T satisfying three conditions: 6 ∅ for all (u, v) ∈ A, (i) it covers all arcs: C ∩ {u, v} = (ii) it is inclusion-minimal with this property: no subset U ⊂ C satisfies condition (i), (iii) it has got minimal cardinality with this property: no set U ⊆ T : |U| < |C| satisfies condition (i).
CHAPTER 12. DISJOINT STARS APPROACH
208
This problem is NP -hard in general [GJ79]. Yet fortunately, we are working with a bipartite demand graph for which K¨onig’s theorem holds: Theorem 12.3 (K¨onig [K¨on31]). For a bipartite graph, the cardinalities of a maximum matching and a minimum node cover coincide. The proof (omitted here) is constructive and shows how to form a minimum node cover from a maximum matching M: iteratively choose a node where an M-alternating path ends and remove it from the graph. This procedure ends after |M| passes, since every time exactly one matching edge is removed. Hopcroft and Karp [HK73] devise an O (|D| log |T |) algorithm for finding a maximum matching in the bipartite graph H. On the brink of implementing a maximum matching method, we paused to think about the undirected case of the Disjoint Paths Problem. For setting up the Unified Model defined for directed inputs, we orient undirected demand graphs arbitrarily, cf. Section 4.2.2 (p. 37). But this unnecessarily discards exploitable information. Leaving H unpartitioned for a moment, we can compute a minimum node cover C for it first and orient the demands afterwards along with the demand partitioning such that the centres are all head or tail nodes for their respective arm sets. This possibly yields smaller bipartitions for H and thus smaller minimum node covers. Yet on generally non-bipartite graphs H, we are back in the NP -hard setting. One possible option is to approximate a minimum node cover. For instance, we can take the node set of any maximal (not necessarily maximum) matching M in H. Clearly, all demands are covered by this set, otherwise an uncovered one would expose the matching to be submaximal. On the other hand, we must pick at least one node from every matching edge, otherwise it would stay uncovered: |C| ≥ |M| holds for every cover C. The approximation ratio is the size relation of the chosen cover to a minimum one C∗ . For this simple scheme, we see 2|M| 2|M| ≤ = 2. |C∗ | |M| Finding a maximal matching is easy: iteratively choose an edge according to some rule and remove both of its end nodes from the graph. This works in O (|T | + R) time where R is the complexity of the choosing. We can keep R ∈ O (|D|), for instance, by focusing on node degrees.
Another well-known greedy heuristic iteratively chooses a node with highest degree into the cover and removes it from the graph, a time expense of O (|T | + |D|). Although similarly simplistic as the matching method, Johnson[Joh74] exhibits a graph family Gk = (Vk , Ek ) of size |Vk | ∈ Θ(k log k) with a nonconstant approximation ratio in Ω(log k). We found our demand graphs, the ones at hand as well as those we had in mind, to be suitably small to go through with an exact approach. Our Algorithm TermCover is a generalization of the latter greedy heuristic. On every level i of its search tree, we have a current node cover Ci and extend it by one node vi . The recursive subcall then generates all node covers containing Ci + vi as a subset. After return to level i, we exclude vi from the cover and recur with some other node. The choice of a node is carried out greedily according to highest degree among all candidate nodes in a working set.
Lemma 12.4. Let H = (T, D) be an undirected demand graph, C ⊆ T a minimum node cover of H, and t ∈ C. Then the following assertions hold: (i) (ii) (iii) (iv) (v)
dH (t) ≥ 1. If degH (t) = 1 and NH (t) = {s} with degH (s) = 1, then s ∈ / C. ′ If degH (t) = 1 and NH (t) = {s} with dH (s) ≥ 2, then C := C − t + s is another minimum node cover of H. If degH (s) ≥ 2 for all s ∈ T then |C| ≥ 2. For any node s 6∈ C we have NH (s) ⊆ C.
12.1. TERMINAL COVERS
209
Proof. (i) Clearly, t is not isolated, otherwise we could remove t from C, contradicting its minimality. (ii) If t is a terminal of an isolated demand, its partner terminal s is redundant in C. (iii) If t is a “leaf” of H, its partner s cannot also lie in C, for then we could dispense with t contradicting again minimality. Hence, |C′ | = |C| and C′ also is a minimum node cover of H.
(iv) We suppose |C| = 1: this is only possible if H is a star. So in particular, H must be a tree and possesses at least one leaf s, i. e., degH (s) = 1. (v) If there were some u ∈ NH (s) \C, the demand {u, s} would remain uncovered by C contradicting its cover property.
Lemma 12.4 gives the key to designing a backtracking type method when applied to all subproblems being defined by the recursion. We only need to recur on those candidates s not characterized by the cases (i)–(iii), i. e., those satisfying degH (s) ≥ 2. Item (iv) comes in handy for a termination criterion . And according to (v), excluding some candidate s from the current partial cover implies accepting its entire neighbourhood NH (s) into it. Without loss of generality, we describe Algorithm TermCover in terms of H. The arguments C,W of subroutine extend() represent the current partial cover and candidate sets, respectively. They are understood to be variables local to their specific instances of extend(). Algorithm TermCover starts with a full set Cmin as the currently known best cover and delegates the work in step (1) to subroutine extend(), consisting entirely of loop (2). Every iteration of it falls into three phases reflected by the paragraphs: treatment of all nodes with degrees of one or less (steps (3)–(10)), check for termination (steps (11)–(13)), and the actual recursion (steps (14)–(16)). At all times, extend() maintains the following invariants: • Cmin stores the current best known node cover, being successively updated to a minimum one. • C represents an approximation to a node cover from below, i. e., C generally does not cover all demands of H. • W is a set of candidate nodes whose status with respect to the current C (‘include’ or ‘exclude’) is still undetermined. Clearly, always C ∩ W = ∅. The set C functions as a container for nodes eventually forming a node cover. Algorithm TermCover initially calls for extension of an empty set C with all terminal nodes T as candidates. In every subcall to extend(), C is extended by one node, besides being possibly enlarged in step (8) before. The infinite loop has got its termination point in the middle. Eventual termination is ensured by step (16) where W is diminished by at least one node s, so W = ∅ in step (11) must qualify sometime. It might do so earlier due to the eliminations in steps (8) and (10). In the first paragraph of loop (2), the graph H[W ] is diminished by all nodes s ∈ S with the property degH[W ] (s) ≤ 1. Since elimination of nodes alters the degrees of other nodes, this is an iterative process. We govern it by using an auxiliary set S (steps (3) and (4)) of all nodes with this property. Lemma 12.4 (i) allows us to remove isolated nodes right away, they are merely excluded from S and W in step (10). If v has a degree of one (step (6)), we may also safely remove it from W . But its neighbour w must enter the node cover C under construction (step (8)), according to Lemma 12.4 (iii). This also follows from (ii) where we have w. l. o. g. decided to cover the isolated edge {s, w} by w. Completing this case, S is updated in a twofold way: w is deleted, for its status is now decided, and all neighbours of w are added whose degrees have dropped below two as a consequence of w being removed from W . As soon as S has been completely processed, H[W ] satisfies the assumption of Lemma 12.4 (iv): degH[W ] (v) ≥ 2 for all v ∈ W . If W = ∅ at this point (step (11)), C cannot be further extended and
CHAPTER 12. DISJOINT STARS APPROACH
210
TermCover( H )
Algorithm 33 Input: Output:
demand graph H = (T, D) a minimum node cover Cmin ⊆ T of H
initialize (1)
Cmin := T
extend( ∅, T ) return Cmin
extend(C, W ) Input: partial node cover C, working set W ⊆ T Output: minimum node cover of W added to C, Cmin possibly updated (2)
while true do
{ eliminate nodes of degree at most one } (3)
let S := { s ∈ W | degH[W ] (s) ≤ 1 }
(4) (5)
while S 6= ∅ do choose s ∈ S
if degH[W ] (s) = 1 then let {w} := NH[W ] (s) C := C + w , W := W − w { add w permanently to C } S := (S − w) ∪ { u ∈ NH[W ] (w) | degH[W ] (u) ≤ 1 } endif
(6) (7) (8) (9) (10)
{ random choice OK }
S := S − s , W := W − s endwhile
{ diminish sets }
{ termination criterion } (11) (12)
(13)
if W = ∅ then if |Cmin | > |C| then Cmin := C endif
{ better cover found } { update current best }
return else if |C| + 2 ≥ |Cmin | then return endif
{ Lemma 12.4 (iv) }
{ recursive subcall } (14)
s := argmax degH[W ] (u) u∈W
(15)
extend( C + s, W − s )
(16)
C := C ∪ NH[W ] (s) W := W \ (NH[W ] (s) + s) endwhile
{ greedy choice }
{ Lemma 12.4 (v) } { update working set }
12.1. TERMINAL COVERS
211
represents a minimal node cover. We test whether |C| improves on |Cmin | and update Cmin as the case may be in step (12), followed by termination of the current instance of extend(). Even if W is not yet empty, we can possibly finish execution here with the aid of Lemma 12.4 (iv) in step (13). Since as said, degH[W ] (v) ≥ 2 for all v ∈ W , we know any node cover in it to comprise at least two nodes. Thus, |C| + 2 is the minimal cardinality of any H-cover containing the current C as a subset. If we have at our disposal a current Cmin of at most this cardinality, we cannot possibly diminish it further and quit. Remark 12.5. The value of two is just a handy lower bound for the cardinality of any node cover in the current graph H[W ]. We could obtain better bounds by using some matching heuristic or degree counting scheme. We did not care for refinement here, since performance of TermCover was already excellent for our purposes. The last paragraph describes the actual backtracking. Since we do not know which candidate nodes from the current W would form a minimum node cover of H[W ], we implicitly enumerate all possibilities by applying the greedy idea of largest degree. We pick one such node s in step (14) and add it tentatively to C in the recursive subcall of step (15). This subinstance will then construct all node covers of H[W −s], thereby possibly finding a globally smaller one for update of Cmin . Step (16) is important: upon return from extend(), we apply Lemma 12.4 (v) and join NH[W ] (v) to C, as we now implicitly exclude v by not including it. At the same time, we remove NH[W ] (s) + s from W in order to remain consistent with the invariant property of W . Example 12.6. As an illustrated example, Figure 12.3 depicts a possible trajectory of Algorithm TermCover on the demand graph of tele354x19. The vertices of the tree are the residual graphs at the respective stages. The nodes chosen in each step are shown circled. We deliberately deviated from the strict greedy choice of step (14) in the upper three rows in order to show the mechanisms of TermCover. Obeying the argmax, we would get a cover of size 5 immediately. For clarity, eliminated nodes remain as hollow dots. The current set C in any tree vertex is marked green. The black graph is H[w] and the red nodes are being excluded from W in the respective steps. The arrows indicate the proceeding and carry the executed step numbers. The entire tree is to be read in a Depth First manner, i. e., down before right at every bifurcation.
12.1.3 Computational Experience We exhibit the results of Algorithm TermCover on our example graphs in Table 12.4. The numbers listed under the “cover size” and “tree size” headings mean the sizes of the node covers produced and the numbers of vertices in the search tree, respectively. Although TermCover is meant for application on demand graphs only, we let it operate on some base graphs as well in order to see its performance on fairly large inputs. We did not test the slab* and vehi* families, as they have isolated demands where a minimum node cover is trivial. We did not attempt do measure the running times on the demand graphs, as they all lied underneath timer resolution of 10 ms. The greedy covers are already optimal in most instances and Algorithm TermCover was mostly unable to improve them. Interestingly, if it did then so in very short time after the greedy solution. The long times on the base graphs were spent solely on the optimality proof. So we set a tight limit of 0.01 · |D| in seconds, leaving just enough time to find the next improvement, yet waiving the optimality certificate. The base graphs of the other instances all had running times well above 1000 seconds.
CHAPTER 12. DISJOINT STARS APPROACH
212
tree root (1)
(16)
(14)
(8)
(8)
(10)
(10)
(12) update:
(15) C,W (14)
(16)
(13) terminate: |C| + 2 ≥ 6 = |Cmin | |Cmin | = 5 found optimal
(15) C,W (14)
(16)
(8)
(11) no update: |C| = 6 ≥ 6 = |Cmin |
(10)
(15) C,W (14)
(16)
(8)
(8)
(10)
(10)
(11) no update: |C| = 8 > 6 = |Cmin |
(15) C,W (12) update:
|Cmin | = 6 found Figure 12.3: Sample trajectory of Algorithm TermCover on the demand graph of tele354x19. The tree develops Depth First and the cover of cardinality 6 is found first (lower right). While backtracking, the extend() instances on the fourth through second rows get bounded without a better cover. The optimum with size 5 is found last (upper right).
12.2. CHEAPEST STAR FLOWS
213
number nodes
cover size Greedy TermCover
tree size Greedy
demand graphs tele354x19 tele354x60 tele354x74 tele978x16 tele1039n26 tele1107e117 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36
9 31 31 6 15 81 10 12 13 12 16 18
5 17 19 4 8 45 7 6 7 7 9 11
5 17 19 4 8 44 5 6 7 7 9 11
3 5 8 4 4 13 6 2 2 4 4 5
base graphs tele354x* rand300e15 slab402n6
TermCover tree size 3 8 14 4 5 217 6 2 2 4 5 8 time
185 100 211
108 67 101
106 66 101
36 39 25
11.6 s 0.6 s 5.3 s
Table 12.4: Node covers of our example instances. The running times were negligible in all cases on demand graphs. The base graphs are only intended to demonstrate the differences between Greedy and Algorithm TermCover on large instances. Bold figures mark cover sizes where the latter improves over the former.
12.2 Cheapest Star Flows The Minimum Cost Single-Commodity Flow Problem is posable as a polynomial size linear program and is therefore solvable in polynomial time [Kha79, Kar84]. This is one core topic of the well-known book by Ahu, Magnanti, and Orlin [AMO93], and we refer the interested reader to it for an in-depth discussion. Several researchers have investigated and refined particular methods for this problem since Dantzig introduced his Simplex Method in 1951. Helgason and Kennington [HK95] give a survey on primal Simplex Methods for Min-Cost Flow Problems. Today, a wide range of well-developed specialized algorithms is available for this task. While [AMO93] reflects the state of its time, Orlin [Orl97] gives a new polynomial primal simplex algorithm for the Min-Cost Flow Problem running in O (|A||V |2 min(logC|V |, |A| log|V |)) time where C is the largest arc cost coefficient. Vygen [Vyg02] presents a Dual Simplex Algorithm running in O (|A| log|A|(|A| + |V | log |V |)) time, working directly on the network.
12.2.1 Successive Shortest Paths Algorithm Since we have a very special type of Min-Cost Flow Problem to solve, we found the Successive Shortest Paths algorithm to be best suited. (The reason will become clear after its formal description below.) It was contemporaneously developed by Iri [Iri60], and Busacker and Gowen [BG61]. Suurballe [Suu74], apparently unaware of their publications, gives a specialization of their method to the topic of k disjoint s-t-paths at minimum cost. His algorithm is readily applicable to our case of star flows by introducing into the base graph a super-sink t connected to all non-shared terminals of an arm set, see Figure 12.5.
CHAPTER 12. DISJOINT STARS APPROACH
214
t1
D(s)
t s
tk Figure 12.5: Transformation of an arm set D(s) to a set of parallel demands, resulting in a k Disjoint s-t-Paths Problem. The Successive Shortest Paths algorithm is a dual-based one, maintaining a dual optimal solution, a pseudo-flow, at all times and driving it towards primal feasibility. We do not discuss the general method here, a detailed presentation is given in [AMO93], pp. 320ff. Also, we concentrate on the arc-disjoint case, the node-disjoint one is identical after node-splitting. We directly devise its adaptation to our setting as Algorithm DijkStar. The algorithm works with two primary data structures: the arc set A and a vector of dual variables µ associated with the nodes, also known as node potentials in the literature. They are initialized to zero (step (1)) unless we have better a priori information. The arc set S, initially empty, is a container for the solution-to-be constructed. The set A is given with the graph G at start and encodes the current residual graph G[A] at all times. Unlike in the setting with general arc capacities, we cannot have an arc a and its opponent a (cf. List of Symbols (p. ix)) simultaneously in the graph. Due to unity capacities and unit flows, either a or a is present at any time. So we will make updates to A by reversing orientations of some arcs. The resulting graph is no longer a subgraph of G in a rigid sense, but we nevertheless use the notation G[A], as its meaning is always unique. The main body of DijkStar is loop (4) with its termination point in the middle. In every iteration i, the demand (s,ti ) ∈ D is being routed through the current residual graph in step (5) w. r. t. to the reduced cost function cred . It ensures that the path satisfies the dual optimality property so as to maintain the algorithm’s primary invariant. Subsequently, the resulting path P is added to the current partial solution S. This is done in step (7) by the union S ∪ P and the exclusion of the opponent sets S, P, see Figure 12.6. The latter is necessary, since the members of (S ∪ P) ∩ (S ∪ P) are arcs having flows in both directions, cancelling out. Step (7) in expanded pseudocode reads as follows: addToSolution( P, S ) Input: Output:
path P ⊆ A, partial solution S ⊆ A (S ∪ P) \ (S ∪ P)
for a ∈ P do if a ∈ S S := S − a else S := S + a endif endfor
{ remove a, not insert a } { nothing to remove, insert a }
The first paragraph of steps (5)–(7) is to be executed once for each of the |D| arms. The update operations need not be carried out after the last path is found, so we terminate here in step (8). Otherwise, we enter the third paragraph (9)–(13) and update the variables for the next iteration.
12.2. CHEAPEST STAR FLOWS DijkStar( G, D )
Algorithm 34 Input: Output:
215 Successive Shortest Paths for star flows
base graph G = (V, A) with cost function c′ ≥ 0 arm set D of demands { (s,ti ) | i = 1, . . . , |D| } cheapest star flow S w. r. t. c′ , i. e., a min-cost embedding of D as arc-disjoint paths µ[v] := 0 for all v ∈ V S := ∅ i := 0
(1) (2) (3)
initialize initialize initialize
(4)
while true do i := i + 1
{ dual variables } { solution-to-be } { demand counter }
{ compute cheapest path for ith arm } (5) (6) (7)
let P := DijkPlain( G[A], ti , s ) w. r. t. cred (u, v) := c′ (u, v) + µ[v] − µ[u] for all (u, v) ∈ A let P := { a | a ∈ P } { opponent path } S := (S ∪ P) \ (S ∪ P) { add P to solution }
{ terminate when all |D| paths computed } (8)
if i = |D| then return S endif
{ update variables } { new residual graph }
(9)
A := (A \ P) ∪ P
(10) (11) (12) (13)
let Vperm ⊆ V denote the set of nodes permanently labelled during DijkPlain let cred [v] denote the cheapest cost assigned to nodes v ∈ Vperm during DijkPlain for v ∈ Vperm do µ[v] := µ[v] − cred [v] + cred [s] { new dual variables } endfor endwhile
Augmenting one unit of flow along path P saturates all of its arcs and introduces their opponents into the graph. Thus, the current arc set A must be altered by switching P for P in step (9). For the changes to µ, some extra notation is needed, given in steps (10) and (11). The characteristic activity of a Dijkstra type algorithm is its scanning of nodes, i. e., tentative prolongations of s-v-paths by one incident arc from δ+ G (v). Every node v scanned is already reached by a cheapest s-v-path and is permanently labelled with its cost cred [v]. We let Vperm denote the subset of such nodes. For all of them, loop (12) adjusts their µ-values by the difference between their own cheapest cost and the one of an entire s-t-path, cred [s] (step (13)). We may correctly do so by two tricks. Originally, the Successive Shortest Paths algorithm demands that we compute cheapest cost labels cred [·] for all nodes in the graph and update µ[v] := µ[v] − cred [v] for all v ∈ V . But since it augments flow only on one cheapest path to the designated sink node s, we can terminate as soon as we find it. This is what DijkPlain does. The optimality conditions continue being valid if we replace cred [v] by cred [s] in the update for all v ∈ Vperm . Dijkstra’s Algorithm guarantees nondecreasing cheapest costs labels during its execution, so cred [s] is a lower bound on the theoretical final cred -value of
CHAPTER 12. DISJOINT STARS APPROACH
216
A s
P1 t
\
A′ s
s
P2 t
\
P1 t
∪
∪
s
s
P2 t
∪
=
t
=
P1 ∪ P2 t
\
s
t
s
t
A′′ := (A′ \ P2 ) ∪ P2
=
P1 ∪ P2
s A′ := (A \ P1 ) ∪ P1
∪
s
=
s
t
S t
=
s
t
Figure 12.6: Path updates during Algorithm DijkStar. Upper row: the initial arc set A, a path P1 with its opponent P1 and the update of step (9) to A′ . Middle row: next iteration starting with A′ , paths P2 , P2 and again step (9). There is no s-t-path left in A′′ . Lower row: addition of P1 , P2 to S according to step (7). all nodes not labelled permanently at termination. Thus, the update becomes ( cred [v] for v ∈ Vperm (12.1) µ[v] := µ[v] − cred [s] otherwise. The second trick is possible due to the structure of the reduced cost function, cred (u, v) := c′ (u, v) + µ[v] − µ[u]. Adding any constant to the entire µ-vector does not change cred for any arc. So we add cred [s], saving the lower case in the update. Lemma 12.7. The cost functions cred are always nonnegative, allowing the deployment of Dijkstra’s Algorithm. Proof. Initially, we have µ = 0 and c′ ≥ 0, hence cred ≥ 0.
Denoting by µ′ the dual vector after the update (12.1) and by c′red its induced cost function, we have to show c′red (u, v) = c′ (u, v) + µ′ [v] − µ′ [u] ≥ 0 for all (u, v) ∈ A .
Fixing an arc (u, v), three cases may arise. (i) Both nodes u, v 6∈ Vperm . Then both µ-values did not change and inductively c′red (u, v) = cred (u, v) ≥ 0 . (ii) Both nodes u, v ∈ Vperm . The labels cred [v] computed in DijkPlain by construction satisfy the cheapest cost optimality conditions: (12.2)
cred [v] ≤ cred [u] + cred (u, v) .
12.2. CHEAPEST STAR FLOWS
217
Hence, we have c′red (u, v) = c′ (u, v) + µ′ [v] − µ′ [u] (12.1) ′
= c (u, v) + (µ[v] − cred [v] + cred [s]) − (µ[u] − cred [u] + cred [s])
= cred (u, v) + cred [u] − cred [v]
(12.2)
≥ 0.
(iii) Exactly one node of u, v is permanently labelled. The arc is directed from u to v, implying cred [u] ≤ cred [v] by the label assignment mechanism inside DijkPlain. Since nodes are permanently labelled in nondecreasing cred order and s was the last such node, the relation (12.3)
cred [u] ≤ cred [s] ≤ cred [v]
must hold and so u is the one node permanently labelled and v is the other. Plugging the corresponding updates into c′red , we have c′red (u, v) = c′ (u, v) + µ′ [v] − µ′ [u] (12.1) ′
= c (u, v) + µ[v] − (µ[u] − cred [u] + cred [s])
= cred (u, v) + cred [u] − cred [s]
(12.3)
≥ cred (u, v) + cred [u] − cred [v]
(12.2)
≥ 0.
Remark 12.8. Lemma 12.7 again proves that at all times the reduced cost optimality property holds, the primary invariant of the algorithm. The proof also works if we initialize the µ-vector with some other values inducing a function cred satisfying these conditions. One example are cost labels ℓ = distcG where c is the original objective function. In Chapter 11, we have seen how using these labels can speed up calculations. This is the case here also. Another aspect is the cost function cred . Its values tend to be small, possibly close to zero. We accompanied it with a lexicographically secondary objective value of the path length, counted in numbers of arcs. It gives the search a sense of increment when the primary cost values are equal. So Algorithm DijkStar actually minimizes (cred (P), |P|) for all paths P originating at the source node s. Concerning complexity, for an arm set with k demands, we have to find k cheapest paths plus make
O (k|V |) updates of variables in between. The former task is not accomplishable within the latter’s asymptotic characteristic, since its easiest form, Breadth First Search, already consumes O (|V | + |A|) time.
Hence, path computing always asymptotically dominates the updates. (In our software, we use a 4-heap inside Dijkstra’s Algorithm, yielding O (|A| log|V |) per path.) This is the best we can hope for, since in our first approach — the main part of this work, with one individual cheapest path per demand —, we had to do basically the same. So we gain disjointness between the embedding paths of an arm set at the small expense of the dual updates. This is so “straight to the case” that we think it is hard to improve by another min-cost flow algorithm.
12.2.2 Computational Experience We let our Algorithm DijkStar compete with an implementation of the primal Network Simplex Algorithm courtesy of Martin Skutella. Both operated on the same cover delivered by Algorithm TermCover. We applied the differential measuring technique to entire solver runs, cf. List of Symbols (p. xi). Table 12.7 gives the results. As said in Section 12.1.3 (p. 211), the slab* and vehi* instance families do not profit
CHAPTER 12. DISJOINT STARS APPROACH
218
tele354n18 tele354n19 tele354n60 tele354n74 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4
number of calls 35998 202001 35371 30982 18303 111200 9662 7003 9351 8039 15364 179522 15511 12496 115296 9094
algorithm time [s] DijkStar NetwSimp 12.0 37.5 25.0 97.0 11.4 27.5 8.0 20.0 8.9 55.1 47.2 222.0 7.2 81.4 4.2 23.1 5.9 36.2 5.2 21.9 8.8 62.0 100.2 740.4 3.0 10.6 2.4 24.1 30.6 456.0 2.1 44.9
time per call [µs] DijkStar NetwSimp 333 1042 124 480 322 777 258 646 486 3010 424 1996 745 8424 600 3299 631 3871 647 2724 573 4035 558 4124 193 683 192 1929 265 3955 231 4937
Table 12.7: Comparative results of Algorithm Dijkstar and a Network Simplex method. The former is strongly superior on all instances. from the stars approach. We excluded them from the testing. The tele*-instances with dependences were run in forbidden mode. We mentioned on p. 205 how this is possible with DijkStar alone. Algorithm DijkStar proves by far superior to the Network Simplex with speedup factors between 3.2– 21.4. The executions times per call, averaged over the diverse arm sets and cost functions during entire solver runs, range all well below one millisecond. DijkStar’s particular strength compared to the other procedure is small demand graphs. The fewer demands, the more likely it is they are isolated, rendering the cover a matching. In these cases, DijkStar specializes to one simple cheapest paths computation from DijkPlain w. r. t. cred . By our initialization of µ := ℓ = distcG , this is equivalent to one call to Algorithm DijkTarget, the best performer of our cheapest paths methods. Table 12.7 best reflects this favourable property in the average times of the rand*n* group, whose base graphs are growing in size while the demand graphs become smaller. Algorithm DijkStar balances out these tendencies fairly well whereas NetwSimp ’s effort manifestly rises with the base graph sizes.
12.3 Comparison of Lower Bounds In this section, we compare Algorithm DijkStar qualitatively as a deliverer of lower bounds, either directly or indirectly through the LB-routines of Chapter 10.
12.3.1 Simple Bounds Figure 12.8 illustrates the difference between paths and stars. A trivial lower bound for the objective c of the Unified Model (IPp) is clearly given by Lpath :=
∑
d=(t,s)∈D
c( DijkTarget( G, s, t ) ) .
12.3. COMPARISON OF LOWER BOUNDS
219
When using star flows, this sum changes to Lstar :=
∑ c( DijkStar( G, D(s) ) ) s∈C
where C ⊆ T is the centre set. In this example, Lpath = 6400 and Lstar = 6964 while the LP optimum lies at 7678. Thus, Lstar closes the gap by 44.1%. The corresponding paths and star flows are drawn into the respective base graphs. While the former have 18 conflicts, i. e., pairs of intersecting paths, the latter are significantly “more disjoint” with only 6 conflicts.
cheapest paths
18 conflicts cost = 6400
cheapest stars
6 conflicts cost = 6964
Figure 12.8: Routing with paths and star flows in instance tele354n18. On the left side, every of the 18 demands is embedded by a cheapest path. On the right, the partitioned demand set (cf. Figure 12.2 (p. 207) left) is embedded by 5 cheapest star flows. The total costs differ significantly. In Table 12.9, we state the analogous results for the other example instances. In all cases, we used the minimum terminal covers delivered by Algorithm TermCover (p. 210), cf. Table 12.4 (p. 213). Additionally, we evaluated the lower bound Lall :=
1 ∑ c( DijkStar( G, δH (s) ) ) 2 s∈T
which is valid for undirected cases like our instances. It follows the intuition that stars comprising all the demands δH (s) intersecting in a common terminal s must lead to the highest partial disjointness and thus strong lower bounds. So we take every terminal s once as the centre of its H-neighbourhood and compute the cheapest with respect to s. ∗ := { Pd | d ∈ D } to Model For the correctness of Lall , consider an optimal feasible solution S∗ = SD (IPp) and some terminal s ∈ T . If we restrict the Disjoint Paths Problem to the subset δH (s) ⊆ D, the call Ss := DijkStar( G, δH (s) ) delivers an optimal feasible solution Ss to it. Thus, c(Ss ) ≤ c(Sδ∗H (s) ). Doing so for all terminals, we route every demand twice and obtain
CHAPTER 12. DISJOINT STARS APPROACH
220
1 1 ≤ ∑ c(Sδ∗H (s) ) ∑ c(Ss) 2 s∈T 2 s∈T 1 = ∑ ∑ c(Pd ) = ∑ c(Pd ) 2 s∈T d∈δ (s) d∈D
Lall =
H
= c(S∗ ) . The algorithm times were measured over 1000 identical calls each. Figure 12.10 shows the comparative results. The improvements of Lpath over Lstar are not in all instances as significant as in the figure example above. Although the number of cheapest paths computations is equal between both, there is a major difference how many of all graph nodes are scanned each time. Since Algorithm DijkStar minimizes the reduced costs cred which are usually close to zero, the search typically visits wide portions of the base graph. This and the node potential updates account for increased running times. Note the infeasible instances tele354x60 and tele354x74: they feature the highest time increases, but also excellent bound values. While individual cheapest paths alone do hardly detect any infeasibility (Lpath ≤ 2), the star flow approach well does with values ranging at roughly half the LP optima.
tele354e18 tele354e19 tele354e60 tele354e74 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354x19 tele354n60 tele354n74 tele368x73 tele978n16 tele1039n26 tele8072n20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4
Lpath 6352 6918 0 0 88969 53405 104293 10478 6814 6400 6966 0 2 89601 53507 105108 6841 14701 19876 25148 28971 31178 11298 6100 6555 3003
lower bound values Lstar Lall OPT (LPp) 6888 6890.0 7329.0 7220 7327.0 7688.0 8 11.0 15.0 14 20.5 27.5 90808 90283.5 95949.0 54397 54684.5 55360.0 105320 106508.5 112834.0 10855 10941.5 11303.0 6893 7084.0 7325.0 6964 6954.5 7678.0 7486 7482.5 8303.5 11 14.0 19.6 18 23.5 31.0 91667 92136.0 98146.0 54677 55449.0 57498.5 105665 107248.5 126241.7 6929 7195.0 7729.0 14921 14876.5 15030.0 19987 19991.0 20250.7 25929 25684.5 26653.0 29148 29171.0 30406.0 31322 31520.5 32399.2 11427 11446.5 12418.7 6105 6132.0 6309.4 6565 6560.0 6646.2 3003 3003.0 3005.6
algorithm time [ms] Lpath Lstar Lall 0.6 5.3 8.6 0.6 1.0 2.1 1.0 7.2 15.7 1.3 9.4 17.6 0.5 1.2 2.3 1.8 3.1 7.1 2.0 3.9 6.3 1.1 2.8 5.8 19.8 30.3 480.9 0.5 3.4 8.4 0.6 1.8 3.9 0.8 5.0 12.6 1.1 6.6 20.0 0.3 1.1 2.0 1.7 5.5 10.0 1.9 5.9 10.2 19.4 56.3 192.2 0.6 0.7 1.4 1.6 1.6 3.6 3.1 4.2 7.4 4.6 5.0 11.8 6.1 7.5 14.7 0.4 0.7 1.6 0.5 1.2 2.9 0.8 2.2 4.3 0.4 1.1 2.2
Table 12.9: Bound quality and running times of three simple bound values, compared to the respective LP optima. The algorithm times mostly lie in the expected ranges with a few outliers. The bold figures mark the best bounds. Time consumption of Lall is partly over-proportionally high.
12.3. COMPARISON OF LOWER BOUNDS
221
LP optimum
tele*e* LP optimum
Lstar Lall
tele*n* LP optimum
rand*e*
rand*n*
Figure 12.10: Results of Table 12.9: star flow based lower bounds between Lpath and OPT (LPp) . The columns of each instance are normalized to these respective intervals (lower and upper bars). Green: Lstar , blue: Lall . The weak values on the rand*n* family are due to small demand graphs. Their decline over the growing ones of the rand*e* family appears to be by chance. Lall does not improve on Lstar in all cases. As the latter routes every demand twice, its running times are expectably roughly the double of the former. In a few singular cases, it is yet more than three times this much. Note again the infeasible instances: the bounds are real improvements at only twice the time. So using Lall appears to be promising in infeasible cases only. Yet, it delivers a mere value, no corresponding solution, rendering it useless for calls from one of the LB-routines of Chapter 10. The variations in Lstar -values may serve as a means for evaluating the qualities of different terminal covers. Some discrimination criterion might be needed for choosing “best” such covers. We did, however, not pursue this course for the reason to be seen after the next measurements: the whole star approach is at a loss against the pure path based method. We do not think that a more areful choice of terminal cover than one of minimum size with random demands partitioning would be able to save it.
12.3.2 LP Relaxation Bounds In this subsection, we compare the two Algorithms DijkTarget and DijkStar by the quality of lower bounds they induce when used as subroutines of Algorithm ColumnGen (p. 135). The latter computes the optimal objective value OPT (LPp) of the LP Relaxation of our Unified Model (IPp) (p. 50). It encodes the iterative Column Generation approach, cf. Figure 10.1 (p. 131). It alternately calls an LP solver and a combinatorial cheapest object method for supplying it with new columns. When the objects are paths, it calls DijkTarget, otherwise DijkStar for (disjoint) star flows. Table 12.11 shows the results. The four column pairs each contain another aspect of the algorithm duo. First pair: LP optima. Second pair: number of iterations inside ColumnGen = number of calls to the LP solver. Third pair: total number of cheapest paths computations, i. e., either directly with DijkTarget or indirectly to Algorithm DijkPlain within DijkStar. Fourth pair: running times averaged over 100
CHAPTER 12. DISJOINT STARS APPROACH
222
tele354e18 tele354e19 tele354e60 tele354e74 tele368e73 tele978e16 tele1039e26 tele1107e117 tele8072e20 tele354n18 tele354n19 tele354n60 tele354n74 tele368n73 tele978n16 tele1039n26 tele8072x20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4
lower bound values paths stars 7329.0 7329.0 7688.0 7688.0 15.0 15.0 27.5 27.5 95949.0 95949.0 55360.0 55360.0 112834.0 112834.0 11303.0 11303.0 7325.0 7325.0 7678.0 7678.0 8303.5 8303.5 19.6 19.6 31.0 31.0 98146.0 98146.0 57498.5 57498.5 126241.7 126286.4 7729.0 7729.0 15030.0 15030.0 20250.7 20250.7 26653.0 26653.0 30406.0 30406.0 32399.2 32399.2 12418.7 12418.7 6309.4 6309.4 6646.2 6646.2 3005.6 3005.6
number LP optimizations paths stars 11 21 12 22 17 31 20 40 8 11 15 19 13 25 5 10 15 44 24 59 21 59 20 50 15 46 6 9 24 46 29 64 29 93 8 5 12 29 29 139 27 127 35 116 21 50 14 25 11 17 4 4
cheapest paths computations paths stars 198 378 228 418 1020 1860 1480 2960 584 803 240 288 338 650 585 1170 300 880 432 1062 399 1121 1200 3000 1110 3404 438 657 384 736 754 1664 580 1860 120 75 252 609 783 3753 891 4191 1260 4176 210 500 112 200 66 102 16 16
algorithm time [ms] paths stars 16 149 18 43 238 806 315 1034 15 31 47 89 55 218 15 58 464 3254 57 476 46 230 81 586 66 488 6 16 86 453 211 1410 1062 9760 8 6 46 113 370 2615 456 2802 864 4181 26 94 14 43 17 49 4 6
Table 12.11: Bound quality and running times of Algorithms DijkTarget and DijkStar as subroutines of Algorithm ColumnGen. Also shown are the number of LP optimizations inside ColumnGen and the numbers of cheapest paths subcalls. The one bold value is the only bound improvement of DijkStar over DijkTarget.
identical calls. In the light of Table 12.9, these figures are surprising. Although the simple lower bounds Lpath , Lstar differ visibly, we get virtually no such effect on the LP optima. Moreover, the effort put into computing them is significantly increased with respect to both iterations and path computations. The running times are discouraging for the star approach. It takes between 2–8 times as long, achieving no improvement over the pure paths based method.
12.3.3 Trajectory Running Times The results of the last subsection are a clear indicator against the star approach. Yet, we have only measured the LP solutions in the root vertices of the respective search trees. There is still a chance that the lower bound routines based on Algorithm DijkStar perform better on entire B&B trajectories. This for two possible reasons:
12.3. COMPARISON OF LOWER BOUNDS
223
• Only the first lower bound is calculated as a cold start. All subsequent ones are warm starts, using as additional inputs the optimal path/star flow sets from their parent instances. • The bounds delivered may improve more over the paths based ones when the base graphs are diminished due to the branching. In order to validate both methods with respect to solver runs, we again used the differential method, cf. List of Symbols (p. xi).
tele354n18 tele354n19 tele354n60 tele354n74 tele978n16 tele1039n26 tele8072n20 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4
number calls
number better
118 7987 102 212 26 555 138 25447 81 61 847 2457 10402 6581 2000
7 733 23 0 0 86 0 3448 0 0 0 0 0 0 0
cheapest paths comp. paths stars 10926 323463 21060 68544 2304 55484 17920 310191 7344 8184 120816 98960 264384 118656 16128
36360 562059 80444 177152 4736 147186 67960 304399 30591 45078 587124 178030 323832 170382 16164
algor. time [ms] paths stars 1.9 31.4 3.1 4.9 0.6 11.0 5.4 45.7 3.1 4.3 88.4 16.0 41.4 33.5 3.7
16.1 59.1 19.7 20.4 1.9 74.2 35.2 52.6 25.0 56.1 981.2 34.9 67.9 57.1 4.3
Table 12.12: Comparative results of Algorithms DijkTarget and DijkStar as driving subroutines in Algorithm ColumnGen. Occasionally, DijkStar delivered better bounds, yet consistently needed more paths computations and ran significantly longer on average. Times were measured over entire identical solver runs. Table 12.12 gives the final results. For each instance, it shows the total number of calls to ColumnGen and the number of those where the star based method delivered a (slightly) better bound than the paths based one. The values in the fourth and fifth columns represent the numbers of cheapest paths subcalls consumed in both approaches, followed by the net algorithm times. We did not test the tele*e* family, for they solve too fast due to small or zero duality gaps. The same applies to tele368n73 und rand300e15. Algorithm DijkStar does not excel in this test either. Even under warm starting conditions, it delivers slightly better bounds only in some of the feasible instances, and at most to a percentage of 13.5% of all calls (rand600e21). In infeasible instance tele354n60, we observe 22.5% better bounds which is consistent with our finding in Table 12.9 where the simple lower bounds were starkly better than the paths based ones. Yet, the also infeasible instance tele354n74 is here not outstanding whatsoever. The computational efforts spent vary highly. Generally, DijkStar induces significantly increased quantities of cheapest paths subcalls. The ratios of these values lie in a range of up to 5.5 (rand1200e33) while the ratios of corresponding running times amplify this effect, amounting to as much as 13 (same instance). Instances rand600e21 and rand1200n4 especially underline the general inferiority of DijkStar under DijkTarget: even though the paths computations are almost equal, the running times are in favour of the latter.
224
CHAPTER 12. DISJOINT STARS APPROACH
Part IV
Conclusion
225
Chapter 13
Computational Competition The Unified Model (IP) (p. 37) captures all the structure of a Disjoint Paths Problem. Moreover, it is polynomial in size. We can encode given instance data in an appropriate format and feed them into a standard integer programming solver. In a final competition, we let our solver ODEA run against the CPLEX 11.0 MIP optimizer. This commercial tool has acquired itself a high reputation for solving general mixed integer programs fast. The Disjoint Paths Problem is a rather special purpose, admitting to exploit the underlying graph structures and properties which this thesis is all about. The confrontation at this point serves as a feedback for us to what extent we were able to capture the specifics of the problem into software. We gave our paths based routines exclusive access to the competition, as we have closed our study of the star approach for poor performance, cf. Section 12.3 (p. 218). It is also unsuited for instances with allowed dependences.
13.1 Pivoting Strategies The branching carried out in step (Br) of Algorithm BranchBound (p. 59) is an own procedure consisting of three ingredients: 1. the branching strategy, 2. the evaluation function, 3. the choice principle. The functional principles of our two branching strategies were laid out in Section 6.3 (p. 62). There, we had not prepared sufficient prerequisites in order to fully explain all of these ingredients. We now complete their presentations, i. e., nos. 2. and 3. These two constitute the pivoting strategies. Pivoting means the choice of one branching entity from all eligible ones according to 1. Given a subinstance π = (G , H , A ) for branching, we consider two modes for the branching process: Cheapest Paths: takes the instance π without any other information about it and computes one cheapest path for every demand. The pattern of these paths is the basis for all actions to follow. State Vectors: respects the fact that π comes into the branching after having been evaluated by a lower bound function LB. All of our LB-functions deliver a primal state vector xLB and maintain dual variables λ(A′ ) for all constraints A′ ∈ A . Both data are taken into account. 226
13.1. PIVOTING STRATEGIES
227
13.1.1 Constructive Branching Given a subinstance π = (G , H , A ), the Constructive Strategy chooses as its entity one demand d = (t, s) ∈ DH and one of its terminals, say s. It subsequently generates one branch for every arc a = (s, v) ∈ B where B ⊆ δ+ (s) is a well-chosen subset of the forward neighbours of s. The same works analogously Gd with the tail terminal t and a subset of its backward neighbourhood. The two sub-strategies we considered were described in Section 6.3.2 (p. 64). We restate them here for convenience: C1: select B := δ+ (s), i. e., branch on all forward-neighbours. Gd C2: select B as a proper subset of the forward-neighbours and additionally generate an extra branch where no arc is embedded, but all arcs of B are forbidden, i. e., x(a) := 0 for all a ∈ B. The subinstance is of the form ( G − B, H , A ). While C1 is uniquely determined, C2 needs a choice of set B. In Cheapest Paths mode, we have one such path for demand d which is incident with terminal s in exactly one arc a ∈ δ+ (s). We set B := {a} Gd (s) | xLB (a) > 0 } and abbreviate this sub-strategy by C2P. In State Vectors mode, we set B := { a ∈ δ+ Gd and write C2V. The rationale is that the positive arc states give hints to their respective variables. We already introduced and applied this idea in step (7) of Algorithm LboundLess (p. 155).
13.1.2 Destructive Branching Given a subinstance π = (G , H , A ), the Destructive Strategy chooses as its entity one constraint A′ in which state variables from more than one demand are positive. They represent a conflict that is to be cleared. The strategy also chooses a subset D′ ⊆ D of demands whose layers are to be affected by the branching. It subsequently generates one branch for every demand in D+ (A′ ) where ′
D+ (A′ ) = { d ′ ∈ D | ∃ a ∈ A′ ∩ Ad : xLB (a) > 0 } is the set of demands with positive arc flows. The two sub-strategies we considered were described in Section 6.3.3 (p. 66): D1: select D′ := D+ (A′ ), i. e., reduce the base graphs of the conflicting demands while all others remain unaltered. D2: select D′ := D and additionally generate an extra branch in which the layers of all conflicting de′ mands are reduced while all others remain unaltered, i. e., x(a) := 0 for all a ∈ A′ ∩ Ad , d ′ ∈ S ′ D+ (A′ ). The subinstance is of the form ( G − (A′ ∩ d ′ ∈D+ (A′ ) Ad ), H , A ). D1 and D2 are uniquely determined, but respect the state vector xLB from the LB-routine only in State Vectors mode. In Cheapest Paths mode, we let xLB represent the cheapest paths.
13.1.3 Evaluation Functions Depending on the mode, we consider distinct evaluation functions. In Cheapest Paths mode, we first calculate the cost sum of all cheapest paths in π w. r. t. the given cost function c. Then we let the branching modify the base graph to a new instance π′ = (G ′ , H ′ , A ′ ). We again calculate cheapest paths for all demands in π′ and add their costs. The differences between the two sums are added over all children the branching produces.
CHAPTER 13. COMPUTATIONAL COMPETITION
228
Expressed in formulas, this means for the constructive strategies: evalC1P ( π, d ′ , s′ ) :=
∑
∑
c(a) +
a∈B
distcG ′ (s,t) −
d=(t,s)∈DH ′
∑
distcG (s,t)
d=(t,s)∈DH
!
evalC2P ( π, d ′ , s′ ) := evalC1P ( π, d ′ , s′ ) + distcG −B (s′ ,t ′ ) − distcG (s′ ,t ′ ) where d ′ = (t ′ , s′ ) is the chosen demand and B the set of branching arcs. Note the additional term c(a) corresponding to the embedded arc in the function evalC1P . The cheapest paths in G ′ do not take it into account. For the destructive strategies, we have the chosen constraint A′ and the set of affected demands D′ :
∑
evalD1P ( π, A′ , D′ ) :=
∑
( distcG ′ (s,t) − distcG (s,t) )
d ′ ∈D+ (A′ ) d=(t,s)∈D′ −d ′
= (|D+ (A′ )| − 1) ·
∑
d=(t,s)∈D+ (A′ )
∑
evalD2P ( π, A′ , D′ ) := evalD1P ( π, A′ , D′ ) + = |D+ (A′ )| ·
( distcG ′ (s,t) − distcG (s,t) ) ( distcG ′ (s,t) − distcG (s,t) )
d=(t,s)∈D+ (A′ )
∑
( distcG ′ (s,t) − distcG (s,t) ) .
d=(t,s)∈D+ (A′ )
Note how the sum over D′ effectively reduces to D+ (A′ ), since by construction of D+ (A′ ), all demands in D′ \ D+ (A′ ) are not involved in A′ . So their dist-differences are zero and they can be left out in the summation. Practical Remark 13.1. In practice, many of the cheapest paths in π and π′ are identical. This is always the case when some d-layer is not affected by the branching or at least the cheapest path in it stays undisturbed. So the two corresponding terms indexed by d in the subtracted sums cancel out. When evaluating all possible entities, we test for these conditions before calling the cheapest paths routine. Also, the terms distcG (s,t) actually subtracted are constant with respect to the branching and only computed once. In State Vectors Mode, the formulas rely on the dual information λ returned from the lower bound call LB(π′ ). For the constructive strategies and forbidden dependences, the functions are defined as follows: evalC1V ( π, d ′ , s′ ) :=
∑ ∑
a∈B
λ(A′ )
A′ ∈A : a∈A′
evalC2V ( π, d ′ , s′ ) := evalC1V ( π, d ′ , s′ ) +
1 ∑ |δG (s′ ) \ B| a∈δ+ (s′ )\B +
G
∑
λ(A′ ) .
A′ ∈A : a∈A′
evalC1V adds the λ-values of all constraints the branching arcs B are involved in. For the extra child in the C2-strategy, we add the average of the λ-values over all incident non-branching arcs. We take the average so they do not gain too much weight. In the case of allowed dependences, we must also respect the partial solution S already embedded in the parent instance π. S may involve some constraints whose λ-values are to count only once, even if two or more of their arcs are embedded. This is the logic of allowed dependences, cf. Section 11.4 (p. 190). The sums over domain A′ ∈ A : a ∈ A′ then reduce to domain A′ ∈ A : a ∈ A′ , A′ ∩ S = ∅. For the destructive strategies, the evaluations are simplest, as the constraints carrying them are the immediate branching entities: evalD1V ( π, A′ , D′ ) := λ(A′ ) evalD2V ( π, A′ , D′ ) := evalD1V ( π, A′ , D′ ) .
13.1. PIVOTING STRATEGIES
229
When the λ-vector comes from Algorithm ColumnGen (p. 135), it represents the optimal dual variables of Model (IPp) (p. 50). They obey the complementary slackness property stating that λ(A′ ) > 0 only if the constraint A′ is tight, i. e., ∑a∈A′ xLB (a) = 1. From LP sensitivity analysis, we know that the value is the larger the wider the optimal objective function would vary when the capacity of 1 were locally perturbed. Put in more intuitive words: when the graph were a pipe system and the optimal fractional flows consisted of liquid streams in it, then λ(A′ ) could be interpreted as the physical pressure in the pipe A′ . So if λ(A′ ) is high, it hints at A′ to have most effect when branched on. This perception is strongly affirmed by our results to be presented in Section 13.1.5 below.
13.1.4 Choice Principles In order to choose one entity for branching, we enumerate all eligible ones, evaluate them by the appropriate function, and pick out an extremal one corresponding to one of the following three Choice Principles: Fewest Children: pick one with the least number of generated children. The idea is to keep the fan-out low. Break ties in favour of larger eval value. Most Children: pick one with the largest number of generated children. The search space is divided into many subspaces which tend to be “small”. Break ties in favour of larger eval value. Largest Evaluation: pick one with the largest eval value. It promises “good” increases in LB-values later. Break ties in favour of fewer children. For a C-strategy, all eligible entities (d ′ , s′ ) of π are readily enumerated by a loop over the present demands and their two terminals each. Their number is 2|DH | with a falling tendency. By the constructiveness, the demands sooner or later become embedded by entire paths, letting the H graphs shrink. For a D-strategy, we must look at all constraints A′ ∈ A and consider only those which contain positive state variables from more than one demand. Their number is |A | also with a falling tendency, as by destructiveness, more and more constraints become cleared. Yet, the numbers of constraints which are actually evaluated varies with the instances π. They empirically decrease over time, with a value of zero representing feasible solutions. We denote the principle applied to an instance by a letter F, M, L, respectively.
13.1.5 Computational Experience Before entering the direct competition with CPLEX, we conducted a pre-contest among the branching strategies. With all their combinations there are 24 of them. We compiled a list of our example instances featuring a duality gap in order to have Branch-and-Bound trajectories extending over more than the root vertex. Table 13.1 gives the data. We let ODEA run on each of them with all 24 strategies under standard parameters. These are: • the UB-function is Algorithm HeurChoose (p. 103) alone,
• the LB-function is Algorithm ColumnGen (p. 135) without strengthening,
• the path generator is Algorithm DijkTarget (p. 175) and gets lower bound labels ℓ[·] = distcG (·,t). Tables 13.2 and 13.3 show the results. We give only the number of generated Branch-and-Bound tree vertices, as these are accurate and not subject to measurement error. The elapsed running times are strongly correlated to them. The processing times per vertex are slightly different between the constructive and destructive strategies, since the latter diminish the demand graphs. (For example instance
CHAPTER 13. COMPUTATIONAL COMPETITION
230
tele354n18 tele354n18 tele354n19 tele354n60 tele354n60 tele354e60 tele354n74 tele354e74 tele368e73 tele978n16 tele978n16 tele1039n26 tele1039n26 tele8072n20 tele8072n20 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20
OPT (IP) 7964 7964 8462 20 20 16 31 28 96598 57571 57571 126896 127864 7990 7990 20263 26654 30496 32441 13074 6572 6817 3118 13 14 15 192 104 117 211 284
OPT (LP) 7678.0 7678.0 8303.5 18.00 19.64 15.00 29.75 27.50 95949.0 57498.5 57498.5 126051.3 126241.7 7729.0 7729.0 20250.7 26653.0 30406.0 32432.0 12418.7 6309.4 6646.2 3005.6 6.0 7.0 8.0 176.4 100.0 114.3 208.6 281.5
gap [%] 3.72 3.72 1.91 11.11 1.82 6.67 4.20 1.81 0.67 0.13 0.13 0.67 1.29 3.38 3.38 0.06 0.00 0.30 0.03 5.28 4.16 2.57 3.74 116.67 100.00 87.50 8.84 4.00 2.36 1.15 0.89
comment allowed dep. forbidden dep. without dep. allowed dep. forbidden dep. forbidden dep. allowed dep. forbidden dep. forbidden dep. allowed dep. forbidden dep. allowed dep. forbidden dep. allowed dep. forbidden dep.
forbidden dep. forbidden dep. forbidden dep.
Table 13.1: Optimal values of our integer and LP relaxed instances with positive duality gaps. The sizes of these gaps are not always a good estimate for computational effort.
tele354n18: 13.4 ms constructive, 19.0 ms destructive.) These deviations are largely compensated by the significantly higher number of vertices in all cases except one. On instance vehi33000n16, the relation is the exact opposite: strategy C1PL yields the fastest run (231.3 s) despite more than twice the vertex numbers of D1VF (589.9 s). In the slots marked ‘–’, the strategy was not able to terminate with an optimal solution before the technical memory limit of 1.000.000 kByte for the priority queue was exhausted. In all these cases, the computation times were never better compared to other strategies ending successfully. In order to evaluate the best performing strategies, we mark the fastest ones on each instance with a bold table figure. Respecting measurement errors, we generally allow an absolute ε = 0.5 s more to still count as “best.” On larger instances, we allow up to a relative ε = 2% more. The absolute best performers among them are marked by underlines. We then score in each table column the number of bold entries, extending over both tables.
13.2. CONFRONTING CPLEX MIPOPT
231
Instance tele354n74 with allowed dependences is special in that it solved in the first B&B tree vertex, despite the duality gap. So no strategy came to bear. Algorithm HeurChoose immediately found an optimal solution which was proven so by the lower bound 0.5 less and the knowledge that the optimum must be integral. In the overall picture, the destructive strategies D1V* and D2V* clearly outperform the constructive ones with scores of 40 against 18-. Among them, the internal distribution is as follows: D1V F M L 15 8 17
D2V F M L 15 9 16
So the two M-variants are the weakest while the other four are equally strong. They are the best candidates to try on new instances.
13.2 Confronting CPLEX MIPOPT The final runs were carried out, as were all runs in this work, on LINUX workstations with 3.2 GHz clock rate under the SuSe 10.2 operating system. The CPLEX MIP solver was fed the Unified Node-Arc Model (IP) (p. 37) as given by the original input data (G, H, A dep ). We supplied no aids nor induced any handicaps. We let CPLEX run for three times on each instance to ensure that its behaviour had got no random aspects. The computation times were equal within expected measurement error in all cases. The times given in the tables are their respective averages. The example instances used in the competition are again only those featuring a duality gap, cf. Table 13.1. The competition is organized in two rounds which are the subjects of the following subsections.
13.2.1 First Round In the first round, we had ODEA operate with standard parameters, see Section 13.1.5. We have tested our branching strategies of Section 13.1 under these conditions in the first place, so we could pick the best performing strategies (underlined figures) from the Tables 13.2 and 13.3. Table 13.4 gives the results. Under these conditions, ODEA was able to outperform CPLEX on 23 of 31 instances. With the two exceptions of rand900n6 and vehi13200n10, the margins over each other are highly significant either way. The speedup ratios range between 3.1–5900 in favour of ODEA. As said above, instance tele354n74 with a factor of 11000+ is special. CPLEX does not seem to take advantage of the simple structure we exploited there.
13.2.2 Second Round When CPLEX is faster, the time ratios range from moderate 0.95 downwards on instances rand900n6 and vehi13200n10. Other six were not solvable within the memory limit, so no precise ratio can be given. We attended to these instances in the second round of the competition where we resorted to nonstandard parameter settings in order to achieve better results. The figures of Table 13.5 give an account of our trials. We strengthened the initial lower bound of tele354e60 by applying Algorithm LboundLess (p. 155) to demand 18. It thereby attained a value of 15.5, so that finding the optimum of 16 by Algorithm HeurUntwist (p. 106) terminated the run. Instance tele354e74 was even “easier”, as the LP lower bound of 27.5 lies 0.5 below the optimum. In the first round with only Algorithm HeurChoose (p. 103) on, ODEA did not find any feasible solution. Here, Algorithm HeurUntwist again settled the case.
CHAPTER 13. COMPUTATIONAL COMPETITION
232
choice tele F 354n18 M all. dep. L tele F 354n18 M forb. dep. L tele F 354n19 M without dep. L tele F 354n60 M all. dep. L tele F 354n60 M forb. dep. L tele F 354n74 M all. dep. L tele F 368e73 M forb. dep. L tele F 978n16 M all. dep. L tele F 978n16 M forb. dep. L tele F 1039n26 M all. dep. L tele F 1039n26 M forb. dep. L tele F 8072n20 M all. dep. L tele F 8072n20 M forb. dep. L
Constructive Strategy C1P C2P C1V C2V 8397 2164 7960 29404 31632 2009 12689 274 5466 2009 1183 234 7273 1472 8005 32719 24331 1413 10927 212 6367 1413 2748 346 992 56 408 505 563 55 1370 37 144 55 289 64 429 710 278 19 187 2128 105 84 56 2181 410 45 604 510 351 197 580 479 229 36 8 2980 134 49 1 1 1 1 1 1 1 1 1 1 1 1 4636 339 806 19439 7092 339 – 4 1688 339 6 4 684 1151 728 3810 2966 783 13988 16 8648 771 7636 160 684 1153 728 3655 2966 785 13940 22 12056 773 7331 259 147 170 87 1947 1546 279 2533 22 499 279 394 43 1182 178 478 5774 4494 353 2392 169 975 353 474 53 – – – – – – – – – – – – – – – – – – – – – – – –
Destructive Strategy D1P D2P D1V D2V 1019 904 249 181 1049 1000 224 144 923 776 227 177 971 781 211 145 1422 925 218 156 999 712 164 145 107 19 39 34 118 97 43 36 90 43 42 34 820 526 17 126 13066 105 235 107 – 3306 17 126 – 5129 11 45 561 675 593 222 – 2717 11 52 1 1 1 1 1 1 1 1 1 1 1 1 7605 773 15 7 120 57 15 7 146 193 15 7 663 126 23 25 44 34 12 10 38 36 13 13 923 116 13 16 44 34 14 10 38 36 13 16 1736 520 11 13 434 97 7 9 263 105 12 13 2224 690 17 22 839 217 163 252 413 174 17 23 – – 255 184 – – 2755 1866 35564 15851 287 201 – – 255 220 – – 1942 1815 34154 15110 241 217
Table 13.2: Detailed comparison of branching strategies combined with the choice principles. The bold figures mark those with best performance within an appropriate ε-interval. The underlined ones are the strategies with absolute best running times.
13.2. CONFRONTING CPLEX MIPOPT
rand 600e21 rand 900e27 rand 1200e33 rand 1500e36 rand 300n10 rand 600n8 rand 900n6 rand 1200n4 slab 402n6 forb. dep. slab 520n7 forb. dep. slab 596n8 forb. dep.
233
Constructive Strategy C2P C1V C2V 395 532 195981 345 149 9 345 73 20 990 7687 – 993 – 25 993 1118 35862 – 4683 – – 1073 65 – 282 91 5322 18779 – 5270 – 93276 5270 – – 2183 1273 288979 4591 27786 1228 4793 5154 1503 122177 35192 – 131583 – 1635 131540 2082 7012 – – – – – – – 726595 – 186252 233452 – – – 45870 – 4368 – 392407 – 338657 1230159 759658 324582 395631 – 333961 497155 – 2142661 2611147 1073945 975242 499102 – 2282872 1082798 – – 774961 – – 1082844 – –
Destructive Strategy D1P D2P D1V 31 23 7 35 49 8 13 22 7 – – 1097 21599 6876 721 70529 4030 1109 – 481 74 – – 18997 – 500 76 – 23302 275 15219 373 345 3518 337 275 64542 24018 359 30219 23007 158511 2940 3147 350 103926 44718 11893 9757 6156 13139 12898 6585 1419 65875 – 12583 71158 – – 65212 – 12192 1937 18017 2021 1961 18561 2021 1961 18468 2021 – – – – – – – – – – – – – – – – – – – – – – – – – – –
D2V 9 10 9 472 190 449 65 1656 65 145 362 129 388 26152 463 3976 8979 1380 – – – 20572 20572 20572 – – – – – – – – –
choice F M L F M L F M L F M L F M L F M L F M L F M L F M L F M L F M L
C1P 318 829 417 2682 2741 3690 48222 180601 3305 5641 – – 3524 106387 63671 86603 – – – – – 65372 – – – 625300 – – 1072123 –
F M L F M L F M L
– – 86674 – – 4441 – – –
193510 199717 193510 38055 38653 37903 30699 32757 30699
– – – – – – – – –
– – – – – – – – –
553792 393972 546774 221235 259877 221240 – – –
– – – – – – – – –
40647 – 41594 – – – 2185 – 3339
47080 – 41373 – – – – 21759 –
6
6
5
18
16
12
40
40
vehi 13200n10 vehi 24940n10 vehi 46980n20
number of best
1023201 –
Table 13.3: Detailed comparison of strategies continued. See caption of Table 13.2.
CHAPTER 13. COMPUTATIONAL COMPETITION
234
tele354n18 tele354n18 tele354n19 tele354n60 tele354n60 tele354e60 tele354n74 tele354e74 tele368e73 tele978n16 tele978n16 tele1039n26 tele1039n26 tele8072n20 tele8072n20 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20
optimum 7964 7964 8462 20 20 16 31 28 96598 57571 57571 126896 127864 7990 7990 20263 26654 30496 32441 13074 6572 6817 3118 13 14 15 192 104 117 211 284
total time [s] CPLEX ODEA 66.2 2.8 13.1 1.7 0.9 0.2 5314.6 0.9 11.7 0.4 102.7 – 1105.4 0.1 1111.3 – 5.6 0.2 11.9 0.3 8.6 0.2 53.7 0.4 34.8 0.6 475.5 8.4 365.6 7.8 2.6 0.1 4.3 1.4 25.7 4.4 62.4 18.7 15.5 2.5 41.6 6.1 66.8 69.9 17.5 4.4 51.1 501.3 2021.7 1131.9 131.9 5176.5 52315.4 – 167.6 231.3 252.7 31.2 2618.7 – 10342.4 206.3
strategy D2VM D2VL D2PF D2PL C1PL
speedup ratio 23.6 7.7 4.5 5905.1 29.3
any
11054.0
D2VL D2VL D2VM D2VM D2PL D2VF D2VL D2VL C2VM D2PM D2VL D2PL D2PL D2PL D1PL C2VM C2PF C2PM
28.0 39.7 43.0 134.3 58.0 56.6 46.9 26.0 3.1 5.8 3.3 6.2 6.8 0.96 1.7 0.10 1.79 0.03
C1PL C1PL
0.72 8.1
D2PF
50.1
Table 13.4: First round of competition ODEA vs. CPLEX MIPOPT. Bold figures mark the smaller time of both per row. ODEA is the faster one on 23 instances, CPLEX on 8. An entry ‘–’ signifies that none of our strategies was able to get by with the memory limit of 1.000.000 kBytes.
13.2. CONFRONTING CPLEX MIPOPT
tele354e60 tele354e74 rand900n6 slab402n6 (slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi33000n16
optimum 16 28 6817 13 14 15 192 104 211
235 total time [s] CPLEX ODEA 102.7 70.9 1111.3 477.0 66.8 69.9 51.1 109.9 2021.7 201.9 131.9 113.3 52315.4 – 167.6 231.3 2618.7 187.2
strategy C1VL C1PL D2PL C2VF C2PF C2PF C1PL D1VL
speedup ratio 1.45 2.33 0.96 0.46 10.01) 1.16 0.72 13.99
Table 13.5: Second round of competition ODEA vs. CPLEX MIPOPT. ODEA with special parameter settings solved 4 of the remaining 8 instances faster than CPLEX. The italic entries are the same as in Table 13.3, as they could not be improved on. ODEA outperformed CPLEX on slab520n7 before, but solved another 5.6 times faster with special settings. The instances rand900n6 and vehi13200n10 could not be improved on. On these, it was a matter of closing the duality gap from below. The strengthening techniques of algorithms LboundLess, LboundRound, and LboundEnpass were effective, but at a time cost higher than without them. We restate the times from Table 13.3 in italic. Yet in view of the other speedup ratios, we deem these two times rather comparable to the respective ones of CPLEX. They do not indicate a severe loss of ODEA. The two instances slab402n6 and slab596n8 became less elusive with special settings: the former was solved about five times faster with Algorithm LboundLess applied to demand 6, yet not faster than CPLEX. ODEA however did take over leadership on slab596n8 with integral demand 7 and Algorithm HeurClique (p. 111), yielding a relative speedup of 45.7 over standard settings. All slab instances appeared to be best tractable with C2F strategies when using Algorithm LboundLess. So we measured slab520n7 again under these settings with integral demand 6, even though ODEA had outperformed CPLEX before. We achieved another factor 5.6 relative speedup, totalling at 10.01 over CPLEX. We think the main difficulty with these instances is that they consist of grid parts, cf. Figures 1.12 (p. 11) and B.12 (p. 258). There is an abundance of paths with equal costs in grids, see Figure 13.6. When branching deletes some node, the path set takes only a minor reduction, necessitating many branches to effectively raise lower bounds. CPLEX apparently copes better with this situation. Alternatively, we could think of some way to reduce the available paths to the canonical U-shapes, cf. Figure 13.7. These are all the paths really needed: the entire path set connecting identical end nodes at the same cost can be reduced to such unique ones, since every feasible solution can be modified to use only those. One possibility to achieve this could be the introduction of more dependences into the model. The key observation in doing so is simple: prohibit the paths from taking a right turn. If they can only make left turns, a U-shape follows automatically. The red double arrows in Figure 13.7 show which forbidden dependences would do this job. All of them are three-arc subsets of the global arc set where the vertical edges count as pairs of antiparallel arcs. Another possible approach is to represent all the U-shaped paths in the lower graph segment as single arcs between their respective end nodes in the uppermost row. Figure 13.8 depicts the scheme: the resulting arcs are made dependent of forbidden type if the original paths intersect. This way, a constructive branching embeds an entire partial path when picking up an arc, or a destructive branching eliminates conflicts without leaving much room for their individual reoccurence. Further research on best modelling the Slab Restacking Problem is beyond the scope of this work.
236
CHAPTER 13. COMPUTATIONAL COMPETITION
Figure 13.6: Lower grid part in a slab instance: there are large numbers of paths with zero cost. Shown are just four paths between the black nodes. By the horizontal arc orientations from left to right, all of them must be monotonic towards the right end node.
Figure 13.7: Examples of canonical U-shaped paths between the same nodes as in Figure 13.6. The red double arrows signify forbidden dependence which would prohibit paths from taking right turns.
Figure 13.8: Representing entire U-shaped paths as single arcs. The arcs are made dependent if the corresponding paths intersect. vehi33000n16 was a success when employing Algorithm LboundLess on demand 8 and Algorithm UB. The smallest vehi instance, vehi7800n20, appears to be intrinsically hard. CPLEX needed no less than 14.5 hours to optimize it. ODEA closed well on the gap when using LboundLess on demand 2 plus UB as the heuristic. It failed when storage became exhausted after approx. 5 hours. The lower bound reached at that time had a value of 189.6 (gap = 1.3%) with 191 to be reached, one below the optimum. Given enough memory, ODEA might have been faster.
Chapter 14
Achievements In this thesis, we treated Disjoint Paths Problems arising from applied contexts in industry. Their abstract structure can be expressed in the language of graph theory: given is a directed or undirected graph with nonnegative arc/edge costs and a list of node pairs from it, called demands. The task is to connect every demand by a simple path through the graph such that the set of these paths satisfies two conditions: 1. all paths are disjoint in a given sense, 2. the total cost sum of their contained arcs/edges is a minimum. This problem is known to be NP -hard even in very restricted cases. In addition to the classical arc-, edge-, and node-disjointness modes, we considered so-called dependences. These are arbitrary subsets of the arcs or nodes, declaring them to be “shared resources” which must be used disjointly by the paths. This introduces the very general notion of dependence-disjointness. As a first major step, we showed how all disjointness modes can be integrated into one Unified Model. Its core is a layered base graph with one distinct copy of the original graph for each demand. These initially identical graphs can subsequently be made different in the solution process. As an aside, we showed how problems of feasibility with priorities can be reduced to the same type of optimization problem. The main part of our work extended over practical solution methods for the Unified Model. An effective such method is the well-known Branch-and-Bound scheme. It is comprehensive of many types of combinatorial optimization problems and thus must be made specific for any special purpose. Its essential ingredients are the following: branching strategies: we developed two principal such strategies with 12 variants each. bounding criteria: we devised three different general bounding procedures with a total of 12 subforms. We gave an in-depth presentation of all the algorithms and their subroutines constituting our software solver ODEA. We extensively tested their performances on a representative testbed. Most notable among them is the intuitive Disjoint Stars approach. It clusters together demands sharing one common node to a star. The set of all demands then falls into a disjoint partition of such stars. Routing a star through the graph results in a star flow composed of disjoint paths for the associated demands. This way, we can achieve a partially disjoint solution at polynomial effort when applying a suitable minimum cost flow solver. Unfortunately, in practice this appealing idea proved inferior to the paths based algorithms by clear evidence, yet short of a theory. Also due to other inherent limitations of applicability, we had to discontinue this line of activity. We finally let ODEA as an entity compete with the commercial integer programming tool CPLEX, version 11.0. Most of the 31 test instances were solved significantly faster by ODEA even under standard parameter settings. On three of the remaining instances, we could apply special settings to stay below 237
CHAPTER 14. ACHIEVEMENTS
238
the benchmark. Only five instances were decided in favour of CPLEX, offering more opportunity for research on improvement possibilities. Summarizing, we have achieved two most important things: 1. the unification of disjointness modes and dependences into one general model, 2. its handling by an efficient Branch-and-Bound procedure of mostly combinatorial nature, able to stand strong against the general-purpose CPLEX MIP solver to a large extent. Over twelve years’ time, the hard instances of the beginning, say tele354x19 (Figures B.5 (p. 252) and B.6 (p. 253)), became the “toys” of today. When at the start there was a simple model just for undirected graphs and edge-disjointness alone, we can now accommodate directed instances as well as respect dependences and thus apply our solver to a much wider range of applications. From no realistic concept of how to attack infeasible instances, we can solve the demand choice problem to optimality while respecting demand priorities. Moreover, the branching and bounding algorithms perform such that we saw an up-scaling of solvable instance sizes by a rough factor of ten. We were largely able to keep up with the improvements of CPLEX up to version 11.0 over the same period. Wagner and Weihe [WW95] developed a linear time algorithm for finding a feasible solution to the Disjoint Paths Problem in the setting of Theorem 2.13 a) (Okamura and Seymour, p. 20). For instance, it were now possible to empirically evaluate the approximative properties of their algorithm towards the cost minimum. We conclude this thesis in the next chapter with a list of open problems for future work. They were either left over due to task prioritization or arose anew along our line of research.
Chapter 15
Open Problems Since every research generates more interesting questions and ideas, also our work leaves some fields for further exploration and refinement. Here is a certainly incomplete listing.
15.1 Prescribed Partial Routing In Section 3.2 (p. 27), we presented the forbidden dependences as a means of introducing prescribed partial routings into a Disjoint Paths Problem instance. We have yet focused on the handling of the resulting instances and did not carry out network planning with this idea. Now that our solver is available, there is opportunity for gaining experience with partial routings as a planning/modelling tool.
15.2 Mixed Branching As mentioned in Remark 3.5 (p. 29), we never intermixed the constructive and destructive branching strategies. We have seen in Section 13.1.3 (p. 227) how our pivot strategy for branching was based on a maximization process over certain rate values. So in principle, it were possible to handle constructive and destructive branching strategies simultaneously by extending the rating and maximization over both domains. The argmax picked would then decide about the strategy applied. We have not attempted to do so yet, as the rating values between both principles turned out to be on very different scales. For example, on our telecommunication instances, the constructive rates usually lied in the range [0, 10000] while the constructive ones congregated in [0, 50]. Unfortunately, we observed no consistence, the values tended to lie somewhere in these intervals. So we could not find a generic scaling of the latter values in order to make them compatible to the former. Maybe there exists some sensible rule that would make it possible to combine the branching strengths of both principles.
15.3 Other Primal Heuristics Our heuristics sometimes tend to consume much time in return for little. In particular, Algorithm HeurUntwist (p. 106) may be too simplistic while Algorithm HeurClique (p. 111) is likely too sophisticated. There may exist a heuristic idea in between, balancing cleverness and complexity more efficiently. One such idea might be OCTANE, a heuristic proposed by Balas et al. [BCDMP01].
15.4 Perfect Matching Upper Bounds Another kind of upper cost bound can be derived on the original base graph G in the undirected arcdisjoint case. Recall Definition 9.11 (p. 122) of odd nodes. We can improve on the parity idea as follows. 239
CHAPTER 15. OPEN PROBLEMS
240
Observation 15.1. Consider a feasible solution S to an instance and fix an odd node v in G. By the combinatorial nature of paths, not all edges incident to v can be used in S. An unused edge can be removed without disturbing S, thereby inducing a degree loss in its other end node w ∈ N(v). If w was not odd before, it is now and the same logic applies again. This process inductively continues as long as removals give rise to odd nodes. Hence, any feasible solution leaves unused edges permitting edge disjoint paths between the odd nodes of G. Each odd node is the end node of exactly one such path. A good example of this situation can be seen in Figure B.4 (p. 251): observe the pattern formed by the unused black edges. This idea can be put to work in two ways. Let Vodd := { v ∈ V odd }. It is well-known that this set must have an even cardinality. Dependences given as input data are irrelevant, as Observation 15.1 solely relies on the properties of individual paths, not their mutual exclusiveness. UboundMatching( π ) Input: instance π = (G, H) ∈ Π with objective function c Output: upper cost bound for all feasible solutions to π, if any define the complete graph Kodd on the node set Vodd let c′ (u, v) := distcG (u, v) for all {u, v} ∈ Vodd 2
compute a minimum cost perfect matching M in Kodd w. r. t. c′
{ edge costs in Kodd }
return c(E) − c′ (M) The c-distances between all odd pairs can be computed in O (|Vodd |(|E|+|V | log |V |)) using Dijkstra’s Algorithm. The min-cost perfect matching M can be computed in O (|Vodd | (|Eodd | + |Vodd | log |Vodd |)) = O (|Vodd |3 ) with the algorithm of Gabow [Gab90]. The cost c′ (M) of the matching is a lower bound on the cost sum of all unused edges in G, hence c(E) − c′ (M) is an upper bound on c(S) for any feasible solution S to π. The demand graph H is indirectly needed to define Vodd . It is possible to achieve a tighter bound as follows, using our own modelling of the Disjoint Paths Problem: UboundDisjoint( π ) Input: instance π = (G, H) ∈ Π with objective function c Output: upper cost bound for all feasible solutions to π, if any let s,t be new terminal nodes let V ′ := V ∪ {s,t} let E ′ := E ∪ { {s, v} | v ∈ Vodd } ∪ { {v,t} | v ∈ Vodd } set c(e) := 0 for all e ∈ E ′ \ E let H ′ be the set of |Vodd |/2 parallel demands {s,t} ′ := { {{s, v}, {v,t}} | v ∈ V let A dep odd } ′ ′ ′ ′ ) define new instance π := (G , H , A dep return c(E) − LB(π′ ) The essential idea is to define the new (MCDP) instance π′ shown in Figure 15.1 a). It connects all odd nodes (circled) with the two new terminals s,t (dashed lines) and wants |Vodd |/2 demands (red) between them to be edge-disjointly routed. In order to prohibit the paths from taking the form s-v-t, every pair of edges {s, v}, {v,t} is made dependent of the forbidden type. The resulting instance π′ may be arbitrarily bounded from below, even optimally solved if time permits.
241
b)
a) π
π′ s
t
c)
s
t
s
t
d)
s
t
Figure 15.1: Upper bounds from the new instance π′ . a) Construction of the new instance π′ in function UboundDisjoint(). Only the red demand is active. b) Costly solution to π (green, blue) allowing for the min-cost solution to π′ (red) only. c) Solution to π leaves black edges unused. d) Cheap solution to π allows for costly solution to π′ . Figure 15.1 b) shows a solution demonstrating that indeed at most OPT (π′ ) is acceptable as the subtrahend of c(E): all edges except the direct one between the odd nodes are used in the solution. Subtracting more than its cost would not allow for this solution. Figure 15.1 c) shows how edges may be left over: the solution to π force a unique red path and the black edges, necessarily forming a cycle (in general a union thereof), are lost for bound computation. So a solution S′ to π′ need not fill the gap, i. e., c(E) − (c(S′ ) + OPT(π)) > 0 may be significantly large.
Finally, in Figure 15.1 d) the solution to π is sparse and the red path is long. One could think that we are better off with a lower bound to the maximum cost solution to π′ in order to get a tighter upper bound for the minimum cost solution to π. Yet, this example is a coincidence and not valid in general. The elimination of a max-cost solution to π′ from G could possibly inhibit all feasible solutions to π. The example demonstrates nevertheless that we could do best if we were able to maximize the objective of π′ under the side constraint that the demands of π stay disjointly routeable. It is open how to transfer the approach of Observation 15.1 to the node-disjoint case and to directed instances in a uniform way.
15.5 Choice of Integral Demand In Section 10.3 (p. 153), we have heuristically chosen one demand for integral routing in order to strengthen the LP lower bound. There may be more clever ideas how to do this and obtain stronger bounds. Also, Algorithm LboundLess (p. 155) may be faster if implemented with a destructive branching
CHAPTER 15. OPEN PROBLEMS
242 strategy instead of a constructive one as devised.
15.6 Warm Start with Integral Demand We usually keep the optimal solutions of individual B&B subinstances with them so that their branching children, after being taken from the priority queue, can be bounded from below using warm start mechanism. This works very well for normal Column Generation, but is untried for bounding using Algorithm LboundLess (p. 155). Maybe the one optimal path found for the demand d0 is of good use here.
15.7 Shared Path Cost Constraints In Section 10.4 (p. 157), we have seen how to compute upper bounds on the path costs of individual demands. Executing the path generation under cost constraints could improve the resulting lower bounds LB. The LP to solve was the LP Relaxation of Model (IPp−d0 ) (p. 158) which differs from the Unified Model (LPp) only in the set of cost coefficients for the arcs in layer Gd0 . It is easy to extend this idea to more than one demand. Choosing a subset D′ ⊆ D, we simply set S c(a) := 0 for all a ∈ d∈D′ Ad and obtain accumulated upper cost bounds for the embedding paths of all D′ -demands together. It is open how to apply these bounds to the cost restricted routing algorithm and whether they provide tighter means of restriction than Model (LPp−d0 ). If so, a good choosing strategy for D′ is also interesting.
15.8 Adding Valid Inequalities A common way of advancing lower bounds in combinatorial optimization is to add inequalities to the LP model that are valid for the IP model. This is a very broad field we could have written half of this work about. In the undirected edge-disjoint case, we have commented on (9.4), inducing a constraint of the form ∑e∈δG (v) x(e) ≤ degG (v) − 1 for all odd nodes v ∈ VG , cf. Definition 9.11 (p. 122). How does this idea carry over to the remaining cases? Another approach could be via the Distance Criterion hDC i (p. 17). In theory, it is possible to separate violated hDC i-inequalities polynomially by optimizing an LP in the weight vectors w. How would this look like algorithmically? And would it be effective? Barnhart et al. [BHV00] and Geffard [Gef01] strengthen the lower bounds in their general multicommodity flow models by valid knapsack cover inequalities . For a good treatment see [NW88], pp. 459ff. These relate to model inequalities ∑a∈A′ b(a) x(a) ≤ w(A′ ) with general constants b(a), w(A′ ) ∈ R+ and stipulate ∑a∈B x(a) ≤ |B| − 1 where B ⊆ A′ is an arc set with ∑a∈B b(a) > w(A′ ). This technique yields no stronger constraints in our case of the Unified Model, since we have b(a), w(A′ ) = 1 for all coefficients. Hoffman and Villa [HV06], again in the general multicommodity flow context, improve these inequalities further by lifting. Guignard [Gui98] separates cuts violated by the current optimal Lagrangian solution and dualizes them. She further investigates the conditions under which this technique actually improves the Lagrangian bounds. It is open whether here are grounds for better bounds for Disjoint Paths Problems.
15.9 Routing Constraints As outlined in Section 4.5 (p. 48), we can easily integrate weight constraints of knapsack type into the routing of disjoint paths. We have not tried out all of the constraints listed there, as some were not in question for our example instances. It might be worthwhile to study the performance of our solver when
243 respecting constraints from hop limits, backbone usage, technology switch, or diversity requirements. Only new min-cost routing routines have to be coded, the high-level algorithms stay the same.
15.10 Other Variant of Cheapest Paths with Allowed Dependences Algorithm DijkForbid (p. 187) is a Dijkstra type method for computing a cheapest path under forbidden dependences. As an alternative, we designed Algorithm DestrForbid for the same task which uses a destructive form of Branch-and-Bound. The latter has proven faster than the former. For cheapest paths with allowed dependences, we have devised Algorithm DijkAllow (p. 194), also a Dijkstra type. It remains open whether there exists an efficient analogous procedure DestrAllow for this problem. Also for Algorithm DijkAllow, we have developed criteria for a set of relevant dependences, cf. Observation 11.9 (p. 196). For the third condition c), we gave a method restricted to the case of |A′ | = 2 for all dependences obeying the first two conditions, cf. p. 197. It may be interesting to generalize this method for larger dependences at best possible complexity.
15.11 Stronger Lower Bounds in Algorithm DestrForbid Our Algorithm DestrForbid (p. 189) solves the cheapest paths problem under forbidden dependences. It does so with a simple branching technique and simple but fast lower cost bounds. In the case of base graphs containing many dependences, this approach maybe become too slow. A stronger lower bounding is then called for. Lagrangian relaxation of the dependences may prove to be a good approach.
15.12 Complexity Status of Cheapest Paths with Dependences We noted in Section 11.3 (p. 184) that the Cheapest Paths Problem under forbidden dependences is a variant of the Constrained Shortest Path Problem with simultaneous linear side constraints, one per dependence. In general, this problem is NP -hard. We developed the pareto Dijkstra Algorithm DijkForbid (p. 187) relying on the dominance relation 11.7: P P′ :⇔
( c′ (P) < c′ (P′ ) and A (P) ⊆ A (P′ ) )
or ( c′ (P) ≤ c′ (P′ ) and A (P) ⊂ A (P′ ) ) . In the case of c′ = 0, it reduces to P P′ ⇔ A (P) ⊂ A (P′ ) which leads to exponentially many pareto optimal labels in the graph nodes. This might be a hint at NP -hardness. Yet, the side constraints are of the special form |P ∩ A′ | ≤ 1 for all A′ ∈ A dep where P is an s-t-path and A dep is the input dependence family. All occurring coefficients are equal to one. Without a rigorous proof as of now, the complexity may be polynomial and there is another algorithm besides the two we have devised. The same holds for the Cheapest Paths Problem under allowed dependences. There is no side constraint, but the dominance relation 11.16, P P′ :⇔ cλ (P) < cλ (P′ ) − λ(A (P′ ) \ A (P)) ,
is weaker than the one of Dijkstra’s Algorithm, P P′ ⇔ cλ (P) < cλ (P′ ). The former specializes to the latter if no relevant dependences are present, cf. Observation 11.9 (p. 196). Again when cλ = 0, we have P P′ ⇔ 0 < −λ(A (P′ ) \ A (P)) which is never satisfied due to λ ≥ 0. Even if we strengthen the dominance to ‘≤’ — which is usual in practice — we see P P′ ⇔ 0 ≤ −λ(A (P′ ) \ A (P)) ⇔ A (P′ ) \ A (P) = ∅ ⇔ A (P′ ) ⊆ A (P) .
244
CHAPTER 15. OPEN PROBLEMS
So Algorithm DijkAllow would also generate exponentially many labels. Its actual complexity status is undecided as of this writing.
15.13 Choice of Terminal Cover In Section 12 (p. 205), we showed how to gain partial disjointness between subsets of paths in the case of none or forbidden dependences at merely linear extra effort. The central notion in this context was the terminal cover, i. e., essentially the choice of centre nodes and their arms. There is still some degree of freedom in choosing the latter. Our tests have given evidence that a minimum terminal cover, i. e., one with the fewest number of centres, does not necessarily perform best. As of now, it is unclear which properties a “good” cover should have.
15.14 Allowed Dependences with Disjoint Stars The disjoint stars approach as presented is not able to support dependences of the allowed type. The reason is that the applied min-cost flow method, Algorithm DijkStar (p. 215), cannot differentiate between the paths it manages. Allowed dependences must be respected hard between different paths and require a special sort of dominance within any of them. We have no idea as of yet how to do this.
15.15 Theoretical Foundation for LP Optima Using Star Flows In Section 12.3.2 (p. 221), we have empirically computed the LP optima of the Unified Model using disjoint star flows as the supporting combinatorial objects. We have seen that Algorithm ColumnGen (p. 135) needs considerably more subcalls to Algorithm DijkStar (p. 215) as it does when calling Algorithm DijkTarget (p. 175) in a pure path based approach. Apparently, optimal feasible solutions to Model (LPp) generally require more basic star flows than basic paths. We are not aware of a theory framing this evidence as “expected.”
15.16 Star Approach for Demand Aggregation Our Unified Model (IP) does not lend itself to the well-known technique of demand aggregation, as said in Remark 10.3 (p. 136). This is due to the generally differing layers on which we did not want to incur any restrictions. A closer look leads to the following idea. The Constructive Branching Strategy (cf. Section 6.3.2 (p. 64)) makes no difference between the layers. Concerning base arcs, it embeds one of them for some demand and removes it with all its copies from the layered base graph. So in principle, we can aggregate the demands by means of Algorithm TermCover (p. 210) and generate cheapest paths for all demands in a star simultaneously. One call of Algorithm DijkPlain (p. 173) does the job, starting with the star centre and running until all outer terminals have been scanned. A clear advantage is, like with disjoint stars, its relatively lower memory usage. Yet, there is a tradeoff to be observed. We cannot use lower bound labels ℓ[·] any more, as we now have multiple target nodes. Alternatively, we can use such labels when we reverse the search direction and compute the cheapest paths from the outer terminals towards the centre. We then would need one separate call of Algorithm DijkPlain for each demand, but could save on label computations, as they are shared. Like with disjoint stars, this approach is generally restrained to the case of forbidden dependences. In this particular case, also to Constructive Branching which is mostly less effective than the Destructive one, cf. Chapter 13 (p. 226). Given this setting, aggregation may improve the former’s performance up to a level where it is competitive with the latter.
Part V
Appendix
245
Appendix A
Software Aspects This thesis is focused on a mathematical description of solution techniques for the Disjoint Paths Problem. Our software ODEA, written in the C programming language, comprising 147 source files with 64.000+ lines of code, has also got non-mathematical aspects to it.
General Concept The software provides an extendible framework for optimizing Disjoint Paths Problems. The source text is divided into one basic library libodea and several separate programs linking this library. The latter provides a complete work bench: reading input data, initializing global data structures, providing the algorithms NC (p. 85), UB (p. 124), and LB (p. 135) with their subroutines, as well as procedures for debugging and output. From the separate programs built on top, the most prominent is the Branch-and-Bound solver. It manages the priority queue, the pivoting and branching. Other programs include stand-alone heuristics for quickly finding feasible solutions without quality estimates, or testing input data for consistence. In addition, three imported libraries are used: • libset providing bit sets for compact representations of graphs, own authorship, • libcplex with the CPLEX 11.0 package used as LP solving subroutine in the Column Generation lower bounding procedure, cf. Section 10.1.1 (p. 130), • libcb with the Conic Bundle package courtesy of Christoph Helmberg used for the testing of lower bounds from his Bundle Method, cf. Section 10.2 (p. 138).
Data Interface All data, input or output, are read from or written to ASCII files, respectively. They follow their own formatting rules. Upon start, the solver reads three files describing the input data: parameters: file path, names of all input and output files, quality tolerance value q0 (cf. text below Equation (6.1) (p. 60)), base graph: nodes with names and geographical coordinates, arcs and edges with names, end nodes, cost coefficients, capacity values, dependences as arc or edge sets one per line, 246
247 demand graph: demands with names, end nodes, priorities, flow and strength values (cf. first refinement below Remark 4.2 (p. 36)). During execution, three human readable files are written: log: course of trajectory with input data names, instance sizes, objective values of feasible solutions found, run time statistics, result: latest feasible solution found, is optimal if solver terminated normally, costs: list of partial objective values for all paths in result.
Option Control In order to keep the calling interface flexible, we have coded all parameters and strategic variants into command line options. The most important options are: • disjointness modes: arc-/edge- or node-disjoint case,
• dependence modes: none, allowed, forbidden,
• feasibility mode: all arc costs set to zero, demand opponents added to graph, cf. Section 5.1 (p. 51),
• upper bounds: choice of heuristic,
• lower bounds: choice of method or variant,
• branching strategies: constructive or destructive, cf. Section 6.3 (p. 62).
• pivoting strategies: choice of branching entity, cf. Chapter 13 (p. 226), • debugging modes: different levels of invariant checking, • logging modes: different verbosity levels.
Inter-process Communication Often we noted how the solving progress of our software heavily relies on the parameters and options given. Some runs are fast on every individual subinstance generated, but make little improvements in bounds. Others invest more into thorough computations of bounds, but complete fewer subinstances per time. A natural idea is to combine varying strengths through parallel processing with different settings. Now parallelization closely uses the features of specific machines. We did not work out a sophisticated scheme in order to keep our software portable. No part of it forks out a child, yet different parallel processes can exchange information about the current best upper cost bound and its status as optimal. For this purpose, when the solver finds a better upper bound, it writes out a short control file containing the objective value and whether it could prove optimality. This file is queried by all processes working in parallel on the same input data every 5–10 seconds. Upon reading a better upper bound than the process itself knows, it is internally updated. If even optimality status was reported, all other processes terminate after detection. Note that the processes working in parallel may be distributed over a computer network as long as all machines involved can access the control file. Also, not all of the processes need to be copies of the main solver. It can be beneficial to have one or more stand-alone heuristics run along.
APPENDIX A. SOFTWARE ASPECTS
248
The advantages of this approach is that every process is independent of the others. They can be individually started at any time, i. e., added later, or terminated without interrupting the overall solution process. This secures a tolerance towards machine or network failures. On the disadvantage side, every process maintains its own global data structures, which so are copied several times.
Handling of Queue Data During the course of a Branch-and-Bound run, high numbers of subinstances may accumulate in the priority queue. For each of them, we have to store its base and demand graphs, plus embedded arcs when applying Constructive Branching. In addition, it is sensible to keep the optimal LP solution for warm-starting their children subinstances later. All this means a high demand on the computer’s storage. We have seen in Section 13.1.5 (p. 229) how memory can become the limiting factor for the deployment of such a method. Not for every instance is there a branching strategy “sparse” enough to respect such a physical limit. In order to utilize least possible storage, we implemented the following three techniques. data compression: after base graph preprocessing (cf. Chapter 8 (p. 87)), typically many nodes, arcs, and dependences are eliminated. They leave unused gaps in their respective internal indexings. We compress these by reorganizing the the indexing in a compact way (Figure A.1). This way, the bit sets representing the base graphs are shortest possible. 0
1
2
3
4
5
6
7
8
9
10
11
12
0
1
2
3
4
5
6
7
8
9
13
14
15
Figure A.1: Data compression: making the iternal array indexings compact after preprocessing. Shaded boxes represent eliminated array numbers. sharing of same data: upon branching out on some instance, only few of its base graphs become altered, depending on the branching strategy. So many of them have to be merely copied. We keep all of them in a hash table with the effect that every occurring subgraph of the base graph is present in memory exactly once at any time. The subinstances merely link them as references (Figure A.2). In the same fashion, the paths in the optimal LP solutions are shared in a separate hash table. early pivoting: the main purpose of keeping the optimal LP data is twofold: enable pivoting of a branching entity (at least in the highly successful State Vectors Mode, cf. Section 13.1 (p. 226)), and warm starting the lower bounding procedure of the children instances. The latter can be done no earlier than in the branching step of Algorithm BranchBound (p. 59), but is not essential, while pivoting is indispensable. We provide an option to shift the pivoting step immediately after the lower bounding. We then discard all LP data (several kBytes) in exchange for the chosen pivot (max. 100 Bytes)
249
branching parent
child
references base graphs
Figure A.2: Data sharing: same data are represented just once and merely referenced where needed. Here, the blue demand in the child instance gets another base graph while the other demands reference the same ones as their parent. While data compression and data sharing are always very fast and memory-saving without influencing the trajectory, the early pivoting comes at a trade-off. It saves significant amounts of storage and may sometimes be the only way to avoid premature termination. But firstly, it slows down the lower bounding due to the all-cold starts. It may thus influence the trajectory, when the latter depends on the optimal LP solutions generated. These mostly differ between warm and cold starting modes. So secondly, the early pivoting may turn out to the better or worse, maybe compensating the memory advantage.
Missing Parts A useful software product of course not only consists of a sophisticated mathematical solver. An actual user is little likely to be a mathematician knowledgeable about its interiors. Usage has to be made simple and comfortable in order to achieve acceptance. In particular, not part of our project was to implement • a tool for instance generation and editing, • a GUI for intuitive program operation, • a data base for instance housekeeping. Here are job openings for interested persons.
Appendix B
Testbed The following table and figures present our collection of example instances with base graphs G = (V, A), demand graphs H = (T, D), and dependence pairs A dep . The instance families demo*, tele*, and rand* are undirected, here |A| means the number of edges. The remaining instances slab* and vehi* are directed. All dependences are arc/edge pairs. instance demo37x3 demo37x9 tele354x18 tele354x19 tele354x60 tele354x74 tele368e73 tele368n73 tele978x16 tele1039x26 tele1107e117 tele8072x20 rand300e15 rand600e21 rand900e27 rand1200e33 rand1500e36 rand300n10 rand600n8 rand900n6 rand1200n4 slab402n6 slab520n7 slab596n8 vehi7800n20 vehi13200n10 vehi24940n10 vehi33000n16 vehi46980n20
|V | 19 19 185 185 185 185 164 164 434 617 676 6894 100 200 300 400 500 100 200 300 400 211 272 311 1408 2858 5460 6260 7229
number of |A| |T | |D| 37 6 3 37 10 9 354 9 19 354 9 19 354 31 60 354 31 74 368 38 73 368 38 73 978 6 16 1039 15 26 1107 81 117 8072 10 20 300 12 15 600 13 21 900 12 27 1200 16 33 1500 18 36 300 8 10 600 9 8 900 10 6 1200 6 4 402 12 6 520 14 7 596 16 8 7800 30 20 13200 20 10 24940 20 10 33000 32 16 46980 40 20
|A dep | 4 4 58 0 58 58 83 0 268 300 0 334
feasible – (–) – –
B.2 (p. 251) B.3 (p. 251) B.5 (p. 252) B.8 (p. 255)
(–)
(-n)
1.9 (p. 8) B.9 (p. 256) 8.8 (p. 99) 1.10 (p. 9) B.10 (p. 257)
46 50 54
Table B.1: Parameters of the example problem instances. 250
see figure
1.12 (p. 11) B.12 (p. 258)
251
19 nodes 37 edges
Figure B.2: Feasible demonstration instance demo37x3. The 4 dependences are shown as double arrows.
19 nodes 37 edges
Figure B.3: Infeasible demonstration instance demo37x9. The 4 dependences are shown as double arrows.
19 nodes 37 edges
Figure B.4: Optimal feasible solution to instance demo37e9. Only 8 of the 9 demands are routeable.
252
APPENDIX B. TESTBED
Figure B.5: Instance tele354x19 is feasible without dependences.
253
Figure B.6: Optimal feasible solutions to instance tele354x19 without dependences: edgedisjoint (lower) and node-disjoint (upper).
APPENDIX B. TESTBED
254
In practice, dependence information of the allowed type, i. e., knowledge about common cable ducts or the like, is hard to gather. Too long have the builders of the network not thought of monitoring such aspects. So we could not get real-life data from our project partner. In order to test out our algorithms, we have inserted two-arc dependences more or less randomly into most of our telecommunication base graphs. They serve as allowed or forbidden dependences. Note that instances tele354x19 and tele368n73 are infeasible when dependences must be respected, but feasible when they are ignored. The base graph of tele1107e117 does not contain dependences, the analogous node-disjoint instance tele1107n117 is inherently infeasible. The vehi* instance family is too dense to give interesting pictures.
Figure B.7: Dependent edge pairs in base graph tele354*.
255
Figure B.8: Infeasible instance tele354x60.
256
APPENDIX B. TESTBED
Figure B.9: Optimal feasible solution to instance tele1039n26.
257
Figure B.10: Optimal feasible solution to instance rand600e21.
258
APPENDIX B. TESTBED
Figure B.11: Forbidden dependences in slab402n6 (red double arrows). They are not necessary, but represent additional inequalities for lower bound strengthening.
Figure B.12: Feasible solution to instance slab596n8.
List of Figures 1.1
A physical network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2
A virtual private network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.3
Minimum-cost paths in general tend to overlap. . . . . . . . . . . . . . . . . . . . . .
3
1.4
Reliable routing respecting trunks. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.5
Reliable routing respecting all resources. . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.6
Transformation of an undirected instance to a directed one. . . . . . . . . . . . . . . .
6
1.7
No disjoint routing exists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.8
Toy instance demo37x3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
1.9
Instance tele978x16 with parallel demands. . . . . . . . . . . . . . . . . . . . . . .
8
1.10
Instance rand300e15, input graphs. . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.11
Instance rand300e15, optimal feasible solution. . . . . . . . . . . . . . . . . . . . .
9
1.12
Model graph for stacking instance slab402n6. . . . . . . . . . . . . . . . . . . . . .
11
1.13
Optimal solution to instance slab402n6 . . . . . . . . . . . . . . . . . . . . . . . .
11
1.14
Layout of the tracks at Hamburg harbour . . . . . . . . . . . . . . . . . . . . . . . . .
12
1.15
Time expanded 2x4 grid graph with two time layers . . . . . . . . . . . . . . . . . . .
12
1.16
Node-disjoint puzzle instance puzz448x22 . . . . . . . . . . . . . . . . . . . . . . .
13
2.1
Adding a demand to an s-t-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.2
Example: hCC i is not sufficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
Example: the Cut Criterion hCC i is weak in the node-disjoint case . . . . . . . . . . .
19
Example: hCC i does not imply hDC i . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
Forbidden subgraphs of H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
2.6
Example: problem with forbidden H . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
3.1
Two trunks in a common duct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
3.2
Does a node at the merging point solve the problem? . . . . . . . . . . . . . . . . . . .
26
3.3
The merging node v “allows” a new, but impossible routing. . . . . . . . . . . . . . . .
26
3.4
Routing over x-v-z would not be disjoint. . . . . . . . . . . . . . . . . . . . . . . . . .
26
3.5
The common physical duct as a logical dependence. . . . . . . . . . . . . . . . . . . .
28
3.6
Dependence of base edges is not transitive. . . . . . . . . . . . . . . . . . . . . . . . .
28
3.7
Node dependences are arc dependences. . . . . . . . . . . . . . . . . . . . . . . . . .
28
3.8
A simple multiplexer in the network. . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
2.3 2.4 2.5
259
260
LIST OF FIGURES
3.9
Chord-disjointness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
3.10
A graph with prescribed routings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
3.11
Abstraction of the physical network and planning on the higher level. . . . . . . . . . .
31
3.12
Construction of a high-level graph from an intermediate-level one. . . . . . . . . . . .
32
3.13
Reduction of the Disjoint Paths Problem to the Menger Problem with dependences . . .
32
4.1
The base graph is split up into one layer per demand . . . . . . . . . . . . . . . . . . .
35
4.2
Base and dependency graphs in the arc-disjoint case. . . . . . . . . . . . . . . . . . . .
38
4.3
Base and dependency graphs in the edge-disjoint case. . . . . . . . . . . . . . . . . . .
39
4.4
A rare case where disjointness is lost. . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
4.5
A new node subdivides the arc a into two arcs. . . . . . . . . . . . . . . . . . . . . . .
40
4.6
Enhancing the dependence when making the base graph directed. . . . . . . . . . . . .
41
4.7
Local constraint structure for an allowed dependence. . . . . . . . . . . . . . . . . . .
41
4.8
Process for generating data for the Unified Model. . . . . . . . . . . . . . . . . . . . .
42
4.9
Minimum clique covers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
4.11
Comparison of Algorithm DependCover to optimal and greedy values. . . . . . . . . .
46
4.12
A path may run through the backbone only once. . . . . . . . . . . . . . . . . . . . . .
49
5.1
Extending an instance by artificial parallel arcs . . . . . . . . . . . . . . . . . . . . . .
52
5.2
Dependence constraint weakened by independent artificial arcs. . . . . . . . . . . . . .
53
5.3
Augmenting the dependence family A when adding parallel arcs. . . . . . . . . . . . .
53
5.4
Splitting a common terminal in the node-disjoint case. . . . . . . . . . . . . . . . . . .
56
6.1
Constructive Branching: residual instance . . . . . . . . . . . . . . . . . . . . . . . .
65
6.2
Destructive Branching: residual instance . . . . . . . . . . . . . . . . . . . . . . . . .
67
7.1
The environment of a terminal in G and its dependency graph. . . . . . . . . . . . . . .
69
7.2
Idea 1 in the arc-disjoint case: feasible solutions occupy the same arcs . . . . . . . . .
71
7.3
An s-t-cut induced by a bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
7.4
An s-t-cut induced by a dominator . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
7.5
Splitting of a demand into two after embedding an arc . . . . . . . . . . . . . . . . . .
76
7.6
The sets of s-t-connecting nodes and articulations are strongly related . . . . . . . . . .
76
7.7
Example of a dominator tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79
7.8
Nearest common ancestors in a rooted tree. . . . . . . . . . . . . . . . . . . . . . . . .
79
7.9
Testing an arc between two dominators for being a bridge. . . . . . . . . . . . . . . . .
82
7.10
Reachability from s and to t is not sufficient for being s-t-connecting . . . . . . . . . .
84
8.1
Nodes with two neighbours can be eliminated . . . . . . . . . . . . . . . . . . . . . .
89
8.2
A bundle of parallel arcs with dependences . . . . . . . . . . . . . . . . . . . . . . . .
89
8.3
Sample trajectory of Algorithm ElimRedundant . . . . . . . . . . . . . . . . . . . . .
93
8.4
Exchange argument in the node-disjoint case. . . . . . . . . . . . . . . . . . . . . . .
95
8.5
Exchange argument in the arc-disjoint case. . . . . . . . . . . . . . . . . . . . . . . .
95
LIST OF FIGURES
261
8.6
Proposition 8.4 arc-disjoint is in general not applicable . . . . . . . . . . . . . . . . . .
95
8.8
Preprocessed base graph of tele1107e117 . . . . . . . . . . . . . . . . . . . . . .
99
8.9
Preprocessed base graph of tele1039n26 . . . . . . . . . . . . . . . . . . . . . . . 100
9.1
Algorithm HeurUntwist: an infeasible solution is partitioned . . . . . . . . . . . . . . 105
9.2
Construction of the auxiliary graph Aux . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.3
Sample trajectory of Algorithm MaxClique . . . . . . . . . . . . . . . . . . . . . . . . 110
9.4
Effects of the criteria hFC i and hEC i . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
9.5
The environment of a node in G and its dependency graph. . . . . . . . . . . . . . . . 118
9.6
Sample trajectory of maxCostStable() . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
9.10
Results of Tables 9.8 and 9.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
10.1
Scheme of a Column Generation Method . . . . . . . . . . . . . . . . . . . . . . . . . 131
10.2
Displacement of flow by increase for one demand. . . . . . . . . . . . . . . . . . . . . 133
10.3
Scheme of a Subgradient Optimization Method . . . . . . . . . . . . . . . . . . . . . . 142
10.6
Example tele354n18: comparison of LboundLess-bounds . . . . . . . . . . . . . . 157
10.7
Approximative calculation of OPT (LPp−d0 ) . . . . . . . . . . . . . . . . . . . . . . . 161
10.8
Correlation between upper and lower bounds . . . . . . . . . . . . . . . . . . . . . . . 163
10.11 Normalized LB-values in the case of allowed dependences . . . . . . . . . . . . . . . . 166 11.1
Construction of a cheapest path after termination of Algorithm DijkBidir1 . . . . . . . 175
11.4
Results of Table 11.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
11.5
Substructure of pareto optimality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
11.7
Results of Table 11.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
11.8
Local constraint structure for a forbidden dependence . . . . . . . . . . . . . . . . . . 186
11.11 Results of Table 11.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 11.12 Nonlinear cost function with allowed dependences . . . . . . . . . . . . . . . . . . . . 192 11.13 Situation with false lower bound value . . . . . . . . . . . . . . . . . . . . . . . . . . 196 11.14 Two ways for a simple s-t-path to pass through two dependent arcs . . . . . . . . . . . 198 11.15 Deceptive idea for strengthening the relevance test . . . . . . . . . . . . . . . . . . . . 199 11.16 Using a cheapest paths tree for calculating an upper bound . . . . . . . . . . . . . . . . 201 11.19 Results of Table 11.18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 12.1
Construction of a partition graph from a given demand graph . . . . . . . . . . . . . . 206
12.2
Minimal terminal covers on two example demand graphs . . . . . . . . . . . . . . . . 207
12.3
Sample trajectory of Algorithm TermCover . . . . . . . . . . . . . . . . . . . . . . . . 212
12.5
Transformation of an arm set to a set of parallel demands . . . . . . . . . . . . . . . . 214
12.6
Path updates during Algorithm DijkStar . . . . . . . . . . . . . . . . . . . . . . . . . 216
12.8
Routing with paths and star flows in instance tele354n18 . . . . . . . . . . . . . . . 219
12.10 Results of Table 12.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 13.6
Grid part in a slab instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
262
LIST OF FIGURES
13.7
Canonical U-shaped path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
13.8
Representing entire U-shaped paths as single arcs. . . . . . . . . . . . . . . . . . . . . 236
15.1
Upper bounds from the new instance π′ . . . . . . . . . . . . . . . . . . . . . . . . . . 241
A.1
Data compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
A.2
Data sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
B.2
Feasible instance demo37x3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
B.3
Infeasible instance demo37x9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
B.4
Optimal feasible solution to instance demo37e9 . . . . . . . . . . . . . . . . . . . . 251
B.5
Feasible instance tele354x19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
B.6
Optimal feasible solutions to instance tele354x19 . . . . . . . . . . . . . . . . . . 253
B.7
Dependent edge pairs in base graph tele354* . . . . . . . . . . . . . . . . . . . . . 254
B.8
Infeasible instance tele354x60. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
B.9
Optimal feasible solution to instance tele1039n26. . . . . . . . . . . . . . . . . . . 256
B.10 Optimal feasible solution to instance rand600e21. . . . . . . . . . . . . . . . . . . . 257 B.11 Forbidden dependences in slab402n6. . . . . . . . . . . . . . . . . . . . . . . . . . 258 B.12 Feasible solution to instance slab596n8. . . . . . . . . . . . . . . . . . . . . . . . . 258
List of Tables 4.10
Sizes of local clique covers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
7.11
Algorithm NC: average running times per call . . . . . . . . . . . . . . . . . . . . . .
86
8.7
Algorithm Preprocess: base graph reductions . . . . . . . . . . . . . . . . . . . . . . .
98
9.7
Algorithm UboundConstr: constraint based upper cost bounds . . . . . . . . . . . . . 122
9.8
Results of our primal heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
9.9
Results of our primal heuristics continued . . . . . . . . . . . . . . . . . . . . . . . . 127
10.4
Resulting bound values for Algorithm SubgradOpt . . . . . . . . . . . . . . . . . . . . 147
10.5
Results of variating the update factor µ . . . . . . . . . . . . . . . . . . . . . . . . . . 148
10.9
Performance of path cost restricted lower bounds . . . . . . . . . . . . . . . . . . . . . 163
10.10 LB-values in the case of allowed dependences . . . . . . . . . . . . . . . . . . . . . . 166 10.12 Lower bounds: comparison of bound values . . . . . . . . . . . . . . . . . . . . . . . 168 10.13 Lower bounds: comparison of computation times . . . . . . . . . . . . . . . . . . . . 169 11.2
Comparison of three Dijkstra variants: oblivious to trajectory . . . . . . . . . . . . . . 179
11.3
Comparison of five Dijkstra variants: respecting trajectory . . . . . . . . . . . . . . . . 180
11.6
Comparative results of Algorithms DijkConstr and DijkTarget . . . . . . . . . . . . . . 185
11.9
Comparative results of Algorithm DijkForbid with two settings for ℓ[·] . . . . . . . . . 188
11.10 Comparative results of Algorithms DijkForbid and DestrForbid . . . . . . . . . . . . . 190 11.17 Normalized algorithm times of Table 11.18 . . . . . . . . . . . . . . . . . . . . . . . . 202 11.18 Comparative results of six modifications of Algorithm DijkAllow . . . . . . . . . . . . 203 12.4
Node covers of our example instances . . . . . . . . . . . . . . . . . . . . . . . . . . 213
12.7
Comparative results of Algorithm Dijkstar and a Network Simplex method . . . . . . . 218
12.9
Bound quality and running times of three simple bound values . . . . . . . . . . . . . . 220
12.11 Bound quality and running times of Algorithms DijkTarget and DijkStar . . . . . . . . 222 12.12 Comparative results of Algorithms DijkTarget and DijkStar . . . . . . . . . . . . . . . 223 13.1
Optimal values of our integer and LP relaxed instances . . . . . . . . . . . . . . . . . . 230
13.2
Detailed comparison of branching strategies . . . . . . . . . . . . . . . . . . . . . . . 232
13.3
Detailed comparison of branching strategies continued . . . . . . . . . . . . . . . . . . 233 263
LIST OF TABLES
264 13.4
First round of competition
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
13.5
Second round of competition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
B.1
Parameters of the example problem instances. . . . . . . . . . . . . . . . . . . . . . . 250
List of Algorithms 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
DependCover . . BranchBound . . ProbeTerm . . . . MaxStable . . . . ProbeArtic . . . . DominTree . . . ReachArtic . . . NC . . . . . . . . Preprocess . . . . ElimRedundant . EmbedCanonical HeurChoose . . . HeurCheapest . . HeurUntwist . . . HeurClique . . . Reduce . . . . . . HeurRelax . . . . UboundConstr . UB . . . . . . . . ColumnGen . . . SubgradOpt . . . ConicBund . . . LboundLess . . . LboundRound . . LboundEnpass . . DijkPlain . . . . DijkTarget . . . . DijkBidir1 . . . . DijkConstr . . . DijkForbid . . . . DestrForbid . . . DijkAllow . . . . TermCover . . . DijkStar . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
265
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45 59 70 73 77 81 83 85 88 91 97 103 104 106 111 115 116 120 124 135 145 151 155 160 162 173 175 176 183 187 189 194 210 215
Bibliography [AAN83]
Y. P. Aneja, V. Aggarval, and K. K. Nair: Shortest chain subject to side constraints, Networks 13 (1983), 295–302.
[AC72]
F. E. Allen and J. Cocke: Graph-theoretic constructs for program control flow analysis, IBM Research Report No. 3923, Watson Research Center (1972).
[AIOT77]
H. Ariyoshi, M. Ide, H. Ozaki, and S. Tsukiyama: A New Algorithm for Generating All the Maximal Independent Sets, SIAM Journal on Computing 6 (1977), 505–517.
[AMO93]
R. K. Ahuja, T. L. Magnanti, and J. B. Orlin: Network Flows, Prentice Hall (1993).
[Asa85]
T. Asano: An approach to the subgraph homeomorphism problem, Theoretical Computer Science 38 (1985), 249–267.
[Ass78]
A. A. Assad: Multicommodity network flows — a survey, Networks 8 (1978), 37–91.
[AU77]
A. V. Aho and J. D. Ullman: Principles of Compiler Design, Addison-Wesley (1977).
[BA00]
F. Barahona and R. Anbil: The Volume Algorithm — producing primal solutions with a subgradient method, Mathematical Programming 87 (2000), 385–399.
[Bab06]
F. Babonneau: Solving the multicommodity flow problem with the analytic center cutting plane method, PhD thesis, Universit´e de Gen`eve (2006).
[Bar88]
C. Barnhart: A network-based primal-dual solution methodology for the multicommodity network flow problem, PhD thesis, Massachusetts Institute of Technology (1988).
[Bar93]
C. Barnhart: Dual-ascent methods for large-scale multicommodity flow problems, Naval Research Logistics 40 (1993), 305–324.
[BBPP99]
I. Bomze, M. Budinich, P. M. Pardalos, M. Pelillo: The maximum clique problem, in D.-Z. Zu and P. M. Pardalos (eds.): Handbook of Combinatorial Optimization, Vol. 4, Kluwer Academic Publishers (1999), 1–74.
[BCDMP01]
E. Balas, S. Ceria, M. Dawande, F. Margot, and G. Pataki: OCTANE, a new heuristic for pure 0-1 programs, Operations Research 49 (2001), 207–225.
[BCP95]
M. O. Ball, C. J. Colbourn, and J. S. Provan: Network Reliability, in [BMMN95a], 673– 762.
[BFSU96]
A. Z. Broder, Alan M. Frieze, S. Suen, and E. Upfal: An Efficient Algorithm for the Vertex-Disjoint Paths Problem in Random Graphs, Proceedings of the 7th ACM-SIAM Symposium on Discrete Algorithms (1996), 261–268.
[BG61]
R. G. Busacker and P. J. Gowen: A procedure for determining a family of minimum-cost network flow patterns, Operational Research Office Technical Report 15 (1961), Johns Hopkins University, Baltimore, MD. 266
BIBLIOGRAPHY
267
[BG79a]
M. S. Bazaraa and J. J. Goode: A Survey of Various Tactics for Generating Lagrangian Multipliers in the Context of Lagrangian Duality, European Journal of Operational Research 3, 322–328.
[BG79b]
E. Balas and M. G. Guignard: Branch and Bound / Implicit Enumeration, Annals of Discrete Mathematics 5 (1979), 185–191.
[BHJS95]
C. Barnhart, C. Hane, E. Johnson, and G. Sigismondi: A Column Generation and Partitioning Approach for Multi-Commodity Flow Problems, Telecommunication Systems 3 (1995), 239–258.
[BHV00]
C. Barnhart, C. A. Hane, and P. H. Vance: Using branch-and-price-and-cut to solve origin-destination integer multicommodity flow problems, Operations Research 48 (2000), 318–326.
[BK06]
G. Borradaile and P. Klein: An O (n log n) algorithm for maximum st-flow in a directed planar graph, Proceedings of the 17th ACM-SIAM Symposium on Discrete Algorithms (2006), 524–533.
[BK73]
C. Bron and J. Kerbosch: Finding All Cliques of an Undirected Graph, Communications of the ACM 16 (1973), 575–577.
[BKS05]
G. Baier, E. K¨ohler, and M. Skutella: The k-Splittable Flow Problem, Algorithmica 42 (2005), 213–248.
[BM86]
M. Becker and K. Mehlhorn: Algorithms for Routing in Planar Graphs, Acta Informatica 23 (1986), 163–176.
[BMM94]
A. Balakrishnan, T. L. Magnanti, and P. Mirchandani: A dual-based algorithm for multilevel network design, Management Science 40 (1994), 567–581.
[BMMN95a] M. O. Ball, T. L. Magnanti, C. L. Monma, and G. L. Nemhauser (eds.): Network Models, Handbooks in Operations Research and Management Science, Vol. 7, Elsevier (1995). [BMMN95b] M. O. Ball, T. L. Magnanti, C. L. Monma, and G. L. Nemhauser (eds.): Network Routing, Handbooks in Operations Research and Management Science, Vol. 8, Elsevier (1995). [BNW96]
U. Brandes, G. Neyer, and D. Wagner: Edge-Disjoint Paths in Planar Graphs with Short Total Length, Konstanzer Schriften in Mathematik und Informatik 19 (1996), Universit¨at Konstanz.
[Bol79]
B. Bollob´as: Graph Theory, Springer (1979).
[BS93]
C. Barnhart and Y. Sheffi: A network-based primal-dual heuristic for the solution of multicommodity network flow problems, Transportation Science 27 (1993), 102–117.
[BS99]
B. M. Baker and J. Sheasby: Accelerating the convergence of subgradient optimization, European Journal of Operational Research 117 (1999), 336–144.
[BW97]
U. Brandes and D. Wagner: A Linear Time Algorithm for the Arc Disjoint Menger Problem in Planar Directed Graphs, Proceedings of the 5th European Symposium on Algorithms (1997), 64–77.
[BX96]
E. Balas and J. Xue: Weighted and unweighted maximum clique algorithms with upper bounds from fractional coloring, Algorithmica 15 (1996), 397–412.
268
BIBLIOGRAPHY
[CEO03]
P. Carmi, T. Erlebach, and Y. Okamoto: Greedy edge-disjoint paths in complete graphs, TIK-Report 155 (2003), Computer Engineering and Networks Laboratory (TIK), ETH Z¨urich.
[CFG01]
T. G. Crainic, A. Frangioni, and B. Gendron: Bundle-based relaxation methods for multicommodity capacitated fixed charge network design, Discrete Applied Mathematics 112 (2001), 73–99.
[CFM75]
P. M. Camerini, L. Fratta, and F. Maffioli: On Improving Relaxation Methods by Modified Gradient Techniques, Mathematical Programming Studies 3 (1975), 26–34.
[CFN96]
P. Carresi, A. Frangioni, and M. Nonato: Applying Bundle Methods to Optimization of Polyhedral Functions: An Applications-Oriented Development, Ricerca Operativa 25 (1996), 5–49.
[CGR96]
B. V. Cherkassky, A. V. Goldberg, and T. Radzik: Shortest Paths Algorithms: Theory and Experimental Evaluation, Mathematical Programming 73 A (1996), 129–174.
[Chi96]
J. W. Chinneck: Localizing and diagnosing infeasibilities in networks, ORSA Journal on Computing 8 (1996), 55–62.
[CHK01]
K. D. Cooper, T. J. Harvey, and K. Kennedy: A Simple, Fast Dominance Algorithm, Software — Practice and Experience 4 (2001), 1–28.
[CHY00]
S. Chaudhuri, G. Hj´almt´ysson, and J. Yates: Control of Lightpaths in an Optical Network, IETF Internet draft OIF2000.04, Optical Internetworking Forum (2000) http://www.tools.ietf.org/html/draft-chaudhuri-ip-olxc-control-00
[CKS04]
C. Chekuri, S. Khanna, and F. B. Shepherd: Edge-Disjoint Paths in Planar Graphs, Proceedings of the 45th IEEE Symposium on Foundations of Computer Science (2004), 71– 80.
[CP90]
R. Carraghan and P. M. Pardalos: An exact algorithm for the maximum clique problem, Operations Research Letters 9 (1990), 375–382.
[DDS05]
G. Desaulniers, J. Desrosiers, and M. M. Solomon (eds.): Column Generation, Springer (2005).
[DDSS95]
J. Desrosiers, Y. Dumas, M. M. Solomon, and F. Soumis: Time Constrained Routing and Scheduling, in [BMMN95b], 35–139.
[Dij59]
E. Dijkstra: Two Problems in Connexion with Graphs, Numerische Mathematik 1 (1959), 269–271.
[DK79]
E. A. Dinits and A. V. Karzanov: On the Problem of Existing Two Integral Flows of Value One, Combinatorial Methods for Flow Problems, Institute for System Studies, Moscow (1979), 127–137, in Russian.
[DSS92]
G. Ding, A. Schrijver, and P. D. Seymour: Disjoint Paths in a Planar Graph — A General Theorem, SIAM Journal of Discrete Mathematics 5 (1992), 112–116.
[EG02]
M. Ehrgott and X. Gandibleux (eds.): Multiple Criteria Optimization — State of the Art Annotated Bibliographic Surveys, International Series in Operations Research and Management Science, Vol. 52, Kluwer Academic Publishers (2002)
[Eil98]
Tali Eilam-Tzoreff: The disjoint shortest paths problem, Discrete Applied Mathematics 85 (1998), 113–138.
BIBLIOGRAPHY
269
[EIS76]
S. Even, A. Itai, and A. Shamir: On the Complexity of Timetable and Multicommodity Flow Problems, SIAM Journal of Computing 5 (1976), 691–703.
[Epp05]
D. Eppstein: All maximal independent sets and dynamic dominance for sparse graphs, Proceedings of the 16th ACM-SIAM Symposium on Discrete Algorithms (2005), 451–459.
[Epp98]
D. Eppstein: Finding the k Shortest Paths, SIAM Journal on Computing 28 (1998), 652– 673.
[Ert98]
G. Ertl: Shortest path calculation in large road networks, OR Spektrum 20 (1998), 15–20.
[Far02]
J. Farkas: Theorie der einfachen Ungleichungen, Journal f¨ur die reine und angewandte Mathematik 124 (1902), 1–27.
[FG96]
A. Frangioni and G. Gallo: A bundle-type dual ascent approach to linear multicommodity min-cost flow problems, Technical Report TR-96-01, Universit`a di Pisa (1996).
[FH86]
T. A. Feo and D. S. Hochbaum: Lagrangian Relaxation for Testing Infeasibility in VLSI Routing, Operations Research 34 (1986), 819–831.
[FHW80]
S. Fortune, J. Hopcroft, and J. Wyllie: The directed subgraph homeomorphism problem, Theoretical Computer Science 10 (1980), 111–121.
[FPL93]
J. M. Farvoleden, W. B. Powell, and I. J. Lustig: A primal solution for the arc-chain formulation of a multicommodity network flow problem, Operations Research 41 (1993), 669–693.
[Fra85]
A. Frank: Edge Disjoint Graphs in Planar Graphs, Journal of Combinatorial Theory B 39 (1985), 164–178.
[Fra90a]
A. Frank: Packing Paths, Circuits and Cuts — a Survey, in [KLPS90], 47–100.
[Fra90b]
A. Frank: Packing Paths in Planar Graphs, Combinatorica 10 (1990), 325–331.
[FS90]
A. Frank and A. Schrijver: Vertex-disjoint simple paths of given homotopy in a planar graph, DIMACS Series in Discrete Mathematics and Theoretical Computer Science 1 (1990), 139–161.
[FW91]
M. Formann and F. Wagner: The VLSI Layout Problem in Various Embedding Models, in R. H. M¨ohring (ed.): Graph-Theoretic Concepts in Computer Science, Lecture Notes in Computer Science, Vol. 484, Springer (1991), 130–139.
[Gab90]
H. N. Gabow: Data structures for weighted matching and nearest common ancestors, Proceedings of the 1st ACM-SIAM Symposium on Discrete Algorithms (1990), 434–443.
[GC94]
B. Gendron and T. G. Crainic: Relaxations for multicommodity capacitated network design problems, Report CRT-965, Universit´e de Montr´eal (1994).
[GC99]
O. Guieu and J. W. Chinneck: Analyzing infeasible mixed-integer and integer linear programs, ORSA Journal on Computing 11 (1999), 63–77.
[Gef01]
J. Geffard: A solving method for singly routing traffic demand in telecommunication networks, Annals of Telecommunications 56 (2001), 140–149.
[Gen02]
B. Gendron: A note on “A dual-ascent approach to the fixed-charge capacitated network design problem”, European Journal of Operational Research 138 (2002), 671–675.
270
BIBLIOGRAPHY
[Geo05]
L. Georgiadis: Linear-Time Algorithms for Dominators and Related Problems, PhD thesis, Princeton University (2005).
[GGSV96]
J.-L. Goffin, J. Gondzio, R. Sarkissian, and J. P. Vial: Solving nonlinear multicommodity flow problems by the analytic center cutting plane method, Mathematical Programming 76 (1996), 131–154.
[GH05]
A. V. Goldberg and C. Harrelson: Computing the Shortest Path: A∗ Search Meets Graph Theory, Proceedings of the 16th ACM-SIAM Symposium on Discrete Algorithms (2005), 156–165.
[GJ79]
M. R. Garey and D. S. Johnson: Computers and Intractability, W. H. Freeman & Co. (1979).
[GK87]
M. Guignard and S. Kim: Lagrangean Decomposition — A model yielding stronger Lagrangian bounds, Mathematical Programming 39 (1987), 215–228.
[GK98]
N. Garg and J. K¨onemann: Faster and simpler algorithms for multicommodity flow and other fractional packing problems, Proceedings of the 39th IEEE Symposium on the Foundations of Computer Science (1998), 300–309.
[GMLP01]
F. Guerriero, R. Musmanno, V. Lacagnina, and A. Pecorella: A class of label-correcting methods for the k shortest paths problem, Operations Research 49 (2001), 423–429.
[GMS95]
M. Gr¨otschel, C. L. Monma, and M. Stoer: Design of survivable networks, in [BMMN95a], 617–672.
[GO90]
M. Guignard and K. Opaswongkarn: Lagrangean dual ascent algorithms for computing bounds in capacitated plant location problems, European Journal of Operational Research 46 (1990), 73–83.
[Gol01]
A. V. Goldberg: Shortest Path Algorithms — Engineering Aspects, in P. Eades, T. Takaoka (eds.): ISAAC 2001, Lecture Notes in Computer Science, Vol. 2223, Springer (2001), 502–513.
[GOPS98]
A. V. Goldberg, J. D. Oldham, S. Plotkin, and C. Stein: An Implementation of a Combinatorial Approximation Algorithm for Minimum-Cost Multicommodity Flow, in R. E. Bixby, E. A. Boyd, and R. Z. R´ıos-Mercado (eds.): IPCO VI, Lecture Notes in Computer Science, Vol. 1412, Springer (1998), 338–352.
[GP88]
G. Gallo and S. Pallotini: Shortest Paths Algorithms, Annals of Operations Research 13 (1988), 3–79.
[GR89]
M. Guignard and M. B. Rosenwein: An Application-oriented Guide for Designing Lagrangean Dual Ascent Algorithms, European Journal of Operational Research 43 (1989), 197–205.
[GR96]
M. K. Goldberg and R. D. Rivenburgh: Constructing Cliques Using Restricted Backtracking, in [JT96], 89–99.
[GTW06]
L. Georgiadis, R. E. Tarjan, and R. F. Werneck: Finding dominators in practice, Journal of Graph Algorithms and Applications 10 (2006), 69–94.
[Gui98]
M. Guignard: Efficient cuts in Lagrangean ‘relax-and-cut’ schemes, European Journal of Operational Research 105 (1998), 216–223.
BIBLIOGRAPHY
271
[GV95]
A. Grama and V. Kumar: Parallel search algorithms for discrete optimization problems, ORSA Journal on Computing 7 (1995), 365–385.
[Ham68]
J. M. Hammersley: On the enfeeblement of mathematical skills by ‘Modern Mathematics’ and by similar soft intellectual trash in schools and universities, Bulletin of the Institute of Mathematics and its Applications 4 (1968), 66–85. Found in L. Graham, D. E. Knuth, and O. Patashnik: Concrete Mathematics, Addison-Wesley (1989).
[Har69]
F. Harary: Graph Theory, Addison-Wesley (1969).
[HK73]
J. E. Hopcroft and R. M. Karp: An O (n2.5 ) algorithm for maximum matchings in bipartite graphs, SIAM Journal on Computing 2 (1973), 225–231.
[HK95]
R. V. Helgason and J. L. Kennington: Primal Simplex Algorithms for Minimum Cost Network Flows, in [BMMN95a], 85–133.
[HMS03]
J. Hershberger, M. Maxel, and S. Suri: Finding the k Shortest Simple Paths: A New Algorithm and Its Implementation, Proceedings of the 5th international workshop on Algorithm Engineering and Experimentation (2003), 26–36.
[HSW99]
C. J. Hoelting, D. A. Schoenefeld, and R. L. Wainwright: Analysis of fault location in a network, Annals of Operations Research 86 (1999), 161–177.
[Hu63]
T. C. Hu: Multicommodity Network Flows, Operations Research 11 (1963), 344–360.
[HU75]
M. S. Hecht and J. D. Ullman: A simple algorithm for global data flow analysis problems, SIAM Journal on Computing 4 (1975), 519–532.
[HV06]
K. Hoffman and C. Villa: A Column-Generation and Branch-and-Cut Approach to the Bandwidth-Packing Problem, Journal of Research of the NIST 111 (2006), 161–185.
[HWC74]
M. Held, P. Wolfe, and H. Crowder: Validation of Subgradient Optimization, Mathematical Programming 6 (1974), 62–88.
[HY00]
K. Holmberg and D. Yuan: A Lagrangian heuristic based branch-and-bound approach for the capacitated network design problem, Operations Research 48 (2000), 461–481.
[HY03]
K. Holmberg and D. Yuan: A Multicommodity Network-Flow Problem with Side Constraints on Paths Solved by Column Generation, Informs Journal on Computing 15 (2003), 42–57.
[HZ80]
G. Y. Handler and I. Zang: A dual algorithm for the constrained shortest path problem, Networks 10 (1980), 293–310.
[IP91]
T. Ibaraki and S. Poljak: Weak Three-Linking in Eulerian Digraphs, SIAM Journal on Discrete Mathematics 4 (1991), 84–98.
[Iri60]
M. Iri: A new method for solving transportation network problems, Journal of the Operations Research Society Japan 3 (1960), 27–87.
[Iri70]
M. Iri: On an Extension of the Maximum-Flow Minimum-Cut Theorem to Multicommodity Flows, Journal of the Operations Research Society Japan 13 (1970), 129–135.
[Joh74]
D. S. Johnson: Approximation Algorithms for Combinatorial Problems, Journal of Computer Systems Science 9 (1974), 256–278.
[Joh77]
D. B. Johnson: Efficient Algorithms for Shortest Paths in Sparse Networks, Journal of the ACM 24 (1977), 1–13.
272
BIBLIOGRAPHY
[JT96]
D. S. Johnson and M. A. Trick (eds.): Cliques, Coloring and Satisfiability, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, Vol. 26, American Mathematical Society (1996).
[Jun87]
D. Jungnickel: Graphen, Netzwerke und Algorithmen, BI Wissenschaftsverlag (1987), in German.
[Kar75]
R. M. Karp: On the Complexity of Combinatorial Problems, Networks 5 (1975), 45–68.
[Kar84]
N. Karmarkar: A New Polynomial-Time Algorithm for Linear Programming, Combinatorica 4 (1984), 373–395.
[Kar87]
A. V. Karzanov: Half-Integral Five-Terminus-Flows, Discrete Applied Mathematics 18 (1987), 263–278.
[Kar94]
A. V. Karzanov: Paths and Metrics in a Planar Graph with Three Holes I and II, Journal of Combinatorial Theory B 60 (1994), 1–35.
[Ken78]
J. L. Kennington: A Survey of Linear Cost Multicommodity Network Flows, Operations Research 26 (1978), 209–236.
[Kha79]
L. G. Khachian: A Polynomial Algorithm for Linear Programming, Doklady Akad. Nauk USSR 244 (1979), 1093–1096, in Russian.
[Kiw89]
K. C. Kiwiel: A Survey of Bundle Methods for Nondifferentiable Optimization, in M. Iri and K. Tanabe (eds.): Mathematical Programming and its Applications, KTK Scientific Publishers (1989).
[Kle05]
J. M. Kleinberg: An Approximation Algorithm for the Disjoint Paths Problem in EvenDegree Planar Graphs, Proceedings of the 46th IEEE Symposium on Foundations of Computer Science (2005), 627–636.
[Kle96]
J. M. Kleinberg: Approximation algorithms for disjoint paths problems, PhD thesis, Massachusetts Institute of Technology (1996).
[KLPS90]
B. Korte, L. Lov´asz, H. J. Pr¨omel, and A. Schrijver (eds.): Paths, Flows, and VLSILayout, Springer (1990).
[KM90]
M. Kaufmann and K. Mehlhorn: Routing Problems in Grid Graphs, in [KLPS90], 165– 184.
[KMS05]
E. K¨ohler, R. H. M¨ohring, and H. Schilling: Acceleration of Shortest Path and Constrained Shortest Path Computation, Proceedings of the 4th International Workshop on Experimental and Efficient Algorithms, Lecture Notes in Computer Science, Vol. 3503, Spinger (2005), 126–138.
[Kol98]
S. G. Kolliopoulos: Exact and approximation algorithms for network flow and disjointpaths problems, PhD thesis, Dartmouth College (1998).
[K¨on31]
D. K¨onig: Graphs and Matrices, Mat. Fiz. Lapok 38 (1931), 116–119, in Hungarian.
[KS04]
P. Kolman and C. Scheideler: Simple On-Line Algorithms for the Maximum Disjoint Paths Problem, Algorithmica 39 (2004), 209–233.
[KS98]
S. G. Kalliopoulos and C. Stein: Approximating disjoint-path problems using greedy algorithms and packing integer programs, Integer Programs and Combinatorial Optimization, Lecture Notes in Computer Science, Vol. 1412, Springer (1998), 153–168.
BIBLIOGRAPHY
273
[K¨uh08]
M. K¨uhne: Algorithmen f¨ur dynamische disjunkte Wege, unpublished Diplomarbeit, Fakult¨at Mathematik und Naturwissenschaften, Technische Universit¨at Berlin (2008), in German. See also http://www.math.tu-berlin.de/coga/projects/traffic/agvrouting
[KvL84]
M. R. Kramer and J. van Leeuwen: The Complexity of Wire-Routing and Finding the Minimum Area Layouts for Arbitrary VLSI Circuits, in F. P. Preparata (ed.): Advances in Computing Research 2: VLSI Theory, JAI Press, London (1984), 129–146.
[Lem89]
C. Lemar´echal: Nondifferentiable Optimization, in (G. L. Nemhauser, A. H. G. Rinnoy Kan, and M. J. Todd (eds.): Handbooks in Operations Research and Management Science, Vol. 1, North-Holland (1989).
[Len90]
T. Lengauer: Combinatorial Algorithms for Integrated Circuit Layout, Wiley-Teubner (1990).
[LG93]
M. Laguna and F. Glover: Bandwidth packing — A tabu search approach, Management Science 39 (1993), 492–500.
[LL89]
T. Larsson and Z. Liu: A primal convergence result for dual subgradient optimization with application to multicommodity network flows, Research Report 89-24, Dept. of Math., Linkøping Institute of Technology (1989).
[LM69]
E. S. Lowry and C. W. Medlock: Object Code Optimization, Communications of the ACM 12 (1969), 13–22.
[Lom79]
M. V. Lomonosov: Multiflow Feasibility Depending on Cuts, Graph Theory Newsletter 9 (1979), 4.
[LR78]
A. S. LaPaugh and R. L. Rivest: The Subgraph Homeomorphism Problem, Proceedings of the 10th ACM Symposium on Theory of Computation (1978), 40–50.
[LT79]
T. Lengauer and R. E. Tarjan: A fast algorithm for finding dominators in a flow graph, Transactions on Programming Languages and Systems I (1979), 121–141.
[LY04]
T. Larsson and D. Yuan: An augmented Lagrangian algorithm for large scale multicommodity routing, Computational Optimization and Applications 27 (2004), 187–215.
[Lyn74]
J. F. Lynch: Efficient Algorithm for the Partitioning of Trees, IBM Journal of Research and Development 18 (1974), 217–222.
[Man89]
U. Manber: Introduction to Algorithms: A Creative Approach, Addison-Wesley (1989).
[Mar03]
D. Marx: Eulerian disjoint paths problem in grid graphs is NP -complete, Discrete Applied Mathematics 142 (2004), 336–341.
[Meh88]
K. Mehlhorn: Datenstrukturen und effiziente Algorithmen, Band 2: Graphenalgorithmen und NP-Vollst¨andigkeit, B. G. Teubner (1988), in German.
[Men27]
K. Menger: Zur allgemeinen Kurventheorie, Fundamenta Mathematica 10 (1927), 96– 115, in German.
[MM98]
S. Mathies, P. Mevert: A hybrid algorithm for solving network flow problems with side constraints, Computers and Operations Research 25 (1998), pp. 745–756.
[MP93]
M. Middendorf and F. Pfeiffer: On the Complexity of the Disjoint Paths Problem, Combinatorica 13 (1993), 97–107.
274
BIBLIOGRAPHY
[MS91]
B. M. E. Moret and H. D. Shapiro: Algorithms from P to NP, Vol. 1: Design and Efficiency, Benjamin/Cummings (1991).
[MS04]
M. Martens and M. Skutella: Flows in Few Paths: Algorithms and Lower Bounds, Proceedings of the 12th European Symposium on Algorithms, Lecture Notes in Computer Science, Vol. 3221, Spinger (2004), 520–531.
[MS94]
C. Mannino and A. Sassano: An exact algorithm for the maximum stable set problem, Computational Optimization and Applications 3 (1994), 243–258.
[MVDH99]
O. du Merle, D. Villeneuve, J. Desrosiers, and P. Hansen: Stabilized Column Generation, Discrete Mathematics 194 (1999), 229–237.
[MZ00]
K. Mehlhorn and M. Ziegelmann: Resource constrained shortest paths, Proceedings of the 8th European Symposium on Algorithms, Lecture Notes in Computer Science, Vol. 1879, Spinger (2000), 326–337.
[Nas69]
C. S. J. A. Nash-Williams: Well-balanced orientations of finite graphs and unobtrusive odd-vertex-pairings, in W. Tutte (ed.): Recent Progress in Combinatorics, Academic Press (1969), 133–149.
[NM65]
J. A. Nelder and R. Mead: A Simplex method for function minimization, Computer Journal 7 (1965), 308–313.
[NW88]
G. L. Nemhauser and L. A. Wolsey: Integer and Combinatorial Optimization, John Wiley & Sons (1988).
[OK71]
K. Onaga and O. Kakusho: On Feasibility Conditions of Multicommodity Flows in Networks, IEEE Transactions on Circuit Theory 18 (1971), 425–429.
[Oka83]
H. Okamura: Multicommodity Flows in Graphs, Discrete Applied Mathematics 6 (1983), 55–62.
[Orl97]
J. B. Orlin: A polynomial time primal network simplex algorithms for minimum cost flows, Mathematical Programming 78 (1997), 109–129.
¨ [Ost02]
¨ P. R. Osterg˚ ard: A fast algorithm for the maximum clique problem, Discrete Applied Mathematics 120 (2002), 197–207.
[OS81]
H. Okamura and P. D. Seymour: Multicommodity Flows in Planar Graphs, Journal of Combinatorial Theory B 31 (1981), 75–81.
[Pap74]
U. Pape: Netzwerk-Ver¨anderungen und Korrektur k¨urzester Wegl¨angen von einer Wurzelmenge zu allen anderen Knoten, Computing 12 (1974), 357–362.
[Pap76]
B. A. Papernov: Feasibility of Multicommodity Flows, in A. A. Friedman (ed.): Studies in Discrete Optimization, Nauka, Moscow, 230–261, in Russian.
[Pau99]
H. Pauler: Virtuelle Private Netzwerke, Funkschau 18 (1999), 44–46, in German.
[Pin05]
F. P. Pinto da Cunha e Alvelos: Branch-and-Price and multicommodity flows, PhD thesis, Universidade do Minho (2005).
[PKP96]
K. Park, S. Kang, and S. Park: An integer programming approach to the bandwidth packing problem, Management Science 42 (1996), 1277–1291.
[PLL98]
J. S. Park, B. H. Lim, and Y. Lee: A Lagrangian dual-based branch-and-bound algorithm for the generalized multi-assignment problem, Management Science 44 (1998), 271–282.
BIBLIOGRAPHY
275
[PM72]
P. W. Purdom and E. F. Moore: Immediate Predominators in a Directed Graph, Communications of the ACM 15 (1972), 777–778.
[Pol67]
B. T. Polyak: A General Method for Solving Extremum Problems, Soviet Mathematics Doklady 8 (1967), 593–597.
[PR94]
M. Parker and J. Ryan: A column generation algorithm for bandwidth packing, Telecommunication Systems 2 (1994), 185–195.
[PS78]
Y. Perl and Y. Shiloach: Finding two disjoint paths between two pairs of vertices in a graph, Journal of the ACM 25 (1978), 1–9.
[PX94]
P. M. Pardalos and J. Xue: The Maximum Clique Problem, Journal of Global Optimization 4 (1994), 301–328.
[RGF07]
L.-M. Rousseau, M. Gendreau, and D. Feillet: Interior Point Stabilization for Column Generation, Operations Research Letters 35 (2007), 660–668.
[RM86]
C. C. Ribeiro and M. Minoux: Solving hard constrained shortest paths problems by Lagrangian relaxation and branch and bound algorithms, Methods of Operations Research 53 (1986), 303–316.
[RRSS93]
B. Reed, N. Robertson, A. Schrijver, and P. D. Seymour: Finding Disjoint Trees in Planar Graphs in Linear Time, Proceedings of the AMS-IMS-SIAM summer conference on graph minors 1991, American Mathematical Society (1993).
[RS84]
N. Robertson and P. D. Seymour: Graph Minors V. Excluding a Planar Graph, Journal of Combinatorial Theory B 36 (1984), 49–64.
[RS86]
N. Robertson and P. D. Seymour: Graph Minors VI. Disjoint Paths across a Disc, Journal of Combinatorial Theory B 41 (1986), 115–138.
[RS90]
N. Robertson and P. D. Seymour: An Outline of a Disjoint Path Algorithm, in [KLPS90], 267–292.
[RS93]
N. Robertson and P. D. Seymour: Graph Minors XXII. Irrelevant Vertices in Linkage Problems, Preprint (1993).
[RS95]
N. Robertson and P. D. Seymour: Graph Minors XIII. The Disjoint Paths Problem, Journal of Combinatorial Theory B 63 (1995), 65–110.
[RW66]
B. Rothschild and A. Whinston: Feasibility of Two-Commodity Network Flows, Operations Research 14 (1966), 1121–1129.
[RWW93a]
H. Ripphausen-Lipa, D. Wagner, and K. Weihe: The vertex-disjoint menger problem in planar graphs, Proceedings of the 4th annual ACM-SIAM Symposium on Discrete Algorithms (1993), 112–119.
[RWW93b]
H. Ripphausen-Lipa, D. Wagner, and K. Weihe: Linear Time Algorithms for Disjoint Two-Face Paths Problems in Planar Graphs, Proceedings of the 4th International Symposium on Algorithms and Computation, Lecture Notes in Computer Science, Vol. 762, Springer (1993), 343–352.
[RWW95]
H. Ripphausen-Lipa, D. Wagner, and K. Weihe: Efficient Algorithms for Disjoint Paths in Planar Graphs, in W. Cook, L. Lov´asz, and P. D. Seymour (eds.): Combinatorial Optimization, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, Vol. 20, American Mathematical Society (1995), 295–354.
BIBLIOGRAPHY
276 [SC96]
H. D. Sherali, G. Choi: Recovery of primal solutions when using subgradient optimization methods to solve Lagrangian duals of linear programs, Operations Research Letters 19 (1996), 105–113.
[Sche88]
P. Scheffler: Linear-time Algorithms for Graphs of Bounded Tree-Width, Dresdener Reihe Forschung 5 (1988), 49–52.
[Sche94]
P. Scheffler: A Practical Linear Time Algorithm for Disjoint Paths in Graphs with Bounded Tree-Width, Technical Report No. 396/1994, Fachbereich Mathematik, Technische Universit¨at Berlin (1994).
[Scho99]
R. Schoblick: Virtuelles Privates Netzwerk als Dienstleistung, Funkschau 25 (1999), 64– 69, in German.
[Schr89]
A. Schrijver: The Klein Bottle and Multicommodity Flows, Combinatorica 9 (1989), 375–384.
[Schr90]
A. Schrijver: Homotopic Routing Methods, in [KLPS90], 329–371.
[Schr94]
A. Schrijver: Finding k disjoint paths in a directed planar graph, SIAM Journal on Computing 23 (1994), 780–788.
[Schu96]
A. S. Schulz: personal communication (1996).
[Seb88]
A. Seb¨o: Integer Plane Multicommodity Flows with a Bounded Number of Demands, Report No. 88534-OR, Forschungsinstitut f¨ur Diskrete Mathematik, Rheinische FriedrichWilhelms-Universit¨at Bonn (1988).
[Sey80a]
P. D. Seymour: Four-Terminus Flows, Networks 10 (1980), 79–86.
[Sey80b]
P. D. Seymour: Disjoint Paths in Graphs, Discrete Mathematics 29 (1980), 293–309.
[Sey81a]
P. D. Seymour: Matroids and Multicommodity Flows, European Journal of Combinatorics 2 (1981), 257–290.
[Sey81b]
P. D. Seymour: On Odd Cuts and planar Multicommodity Flows, Proceedings of the London Mathematical Society III 42 (1981), 178–192.
[Shi79]
Y. Shiloach: Edge-disjoint branchings in directed multigraphs, Information Processing Letters 8 (1979), 24–27.
[Shi80]
Y. Shiloach: A Polynomial Solution to the Undirected Disjoint Paths Problem, Journal of the ACM 27 (1980), 445-456.
[Sho85]
N. Z. Shor: Minimization Methods for Nondifferentiable Functions, Springer (1985), p 116–120.
[SO98]
R. R. Schneur and J. B. Orlin: A scaling algorithm for multicommodity flow problems, Operations Research 46 (1998), 231–246.
[Suu74]
J. W. Suurballe: Disjoint Paths in a Network, Networks 4 (1974), 125–145.
[SYHG01]
P. Sebos, J. Yates, G. Hj´almt´ysson, and A. Greenberg: Auto-discovery of shared risk link groups, Proceedings of the Optical Fiber Communication Conference 3 (2001), WDD3-1 – WDD3-3.
[Tar74]
R. E. Tarjan: Finding dominators in directed graphs, SIAM Journal on Computing 3 (1974), 62–89.
BIBLIOGRAPHY
277
[Tho05]
T. Tholey: Finding Disjoint Paths on Directed Acyclic Graphs, in D. Kratsch (ed.): Graph-Theoretic Concepts in Computer Science, Lecture Notes in Computer Science , Vol. 3787, Springer (2005), 319–330.
[Tho80]
C. Thomassen: 2-linked graphs, European Journal of Combinatorics 1 (1980), 371–378.
[Tom66]
J. A. Tomlin: Minimum-cost multicommodity network flows, Operations Research 14 (1966), 45–51.
[Tse91]
P. Tseng: Relaxation method for large scale linear programming using decomposition, Mathematics of Operations Research 16 (1991), 859–880.
[Vyg02]
J. Vygen: On dual minimum cost flow algorithms, Mathematical Methods of Operations Research 56 (2002), 101–126.
[Vyg93]
J. Vygen: Disjoint Paths, Report No. 93805, Forschungsinstitut f¨ur Diskrete Mathematik, Rheinische Friedrich-Wilhelms-Universit¨at Bonn (1993).
[Vyg94]
J. Vygen: Disjoint Paths, Report No. 94816, Forschungsinstitut f¨ur Diskrete Mathematik, Rheinische Friedrich-Wilhelms-Universit¨at Bonn (1994). Published later as: NPcompleteness of some edge-disjoint paths problems, Discrete Applied Mathematics 61 (1995), 83–90.
[Wag37]
¨ K. Wagner: Uber eine Eigenschaft der ebenen Komplexe, Mathematische Annalen 114 (1937), 570–590, in German.
[Wan03]
I. Wang: Shortest Paths and Multicommodity network flows, PhD thesis, Georgia Institute of Technology (2003).
[Wei97]
K. Weihe: Edge-Disjoint (s,t)-Paths in Undirected Planar Graphs in Linear Time, Journal of Algorithms 23, 121–138.
[WI06]
D. Wu and M. Ierapetritou: Lagrangean decomposition using an improved Nelder-Mead approach for Lagrangean multiplier update, Computers and Chemical Engineering 30 (2006), 778–789.
[Wie96]
W. Wieser: Planning of Survivable Network Platforms, Deutsche Telekom AG, Preprint (1996).
[Wil01]
W. E. Wilhelm: A Technical Review of Column Generation in Integer Programming, Optimization and Engineering 2 (2001), 159–200.
[WW95]
D. Wagner and K. Weihe: A Linear-Time Algorithm for Edge-Disjoint Paths in Planar Graphs, Combinatorica 15 (1995), 135–150.
[XP04]
G. Xiao and X. Pan: Heuristic for the maximum disjoint paths problem in wavelengthrouted networks with shared-risk link groups, Journal of Optical Networking 3, 38–49.
[Yen71]
J. Y. Yen: Finding the k shortest loopless paths in a network, Management Science 17 (1971), 712–716.
[Zie01]
M. Ziegelmann: Constrained Shortest Paths and Related Problems, PhD thesis, Universit¨at des Saarlandes (2001).
Index algorithm trivial lower, 68, 218 k shortest paths, 63 trivial upper, 68 backtracking type, 108, 209 upper, 96, 131 Branch-and-Bound type, 53, 154, 188 upper – on cost, 101, 116, 123, 175, 239 Breadth First Search, 22, 217 upper – on demand number, 18 Conic Bundle, 150, 167, 246 valid upper, 55 Depth First Search, 78, 82 worst case upper, 119 Dijkstra type, 188, 215 branch strong, 63, 65 Dijkstra’s, 103, 135, 146, 172, 215–217, 240, 243 weak, 63, 65 Dynamic Programming type, 78 bridge, 74, 76, 82, 175 Iterative –, 78 bundle, 149 Network Simplex, 49, 217 – constraint, 34 pareto Dijkstra, 179, 194, 243 – method, 149 Purdom-Moore, 77 internally dependent, 87 routing –, 137 of parallel arcs, 87 Successive Shortest Paths, 213 Choice Principles, 229 arc clique, 37 artificial, 52, 69 cheapest, 112 canonical, 88, 94 full, 108 dependent to one another, 26, 41, 71 large, 112 embedded, 65, 73, 95, 96, 101, 154 maximal, 108 externally dependent, 88, 94 maximum, 108 occupied, 62, 75, 90, 94, 101 combination redundant, 71, 88, 90 convex, 143, 150 weighted, 119 of (PDP) and (MCDP), 55 bound complexity, 23, 45, 78, 80, 92, 96, 113, 116, 138, accumulated upper –, 242 146, 182, 197, 208, 217, 243 current best, 103 constraint global lower, 60, 62, 123 – conflict, 188 global upper, 60, 62, 178 – family, 37, 53, 56, 58, 64, 69, 75, 87, 117, local lower, 105, 123 165, 191 local upper, 109 bundle –, 34 lower – on cred , 215 dependence –, 36, 41, 52, 184, 188 lower – on cardinality, 211 disjointness –, 36, 56, 140, 184 flow conservation –, 34, 37, 50, 139 lower – on cost, 103, 129, 195, 242 lower – on time, 182 intra-layer –, 69, 72 positive lower, 52, 55 knapsack type –, 184, 242 quality of lower, 221 redundant, 101 simple upper, 119 residual – family, 101 278
INDEX routing –, 27 side –, 48, 179, 241, 243 cost – coefficient, 5 – restriction, 179 of path, 5 reduced, 131, 135, 214, 220 cover clique –, 42 local, 43 minimum, 207, 219 node –, 206 partial, 209 terminal –, 206, 244 CPLEX competition with, 231 LP solver, 167, 246 MIP solver, 65, 226 criterion bounding –, 72, 109 Cut –, 18, 68, 74, 117, 122 discrimination –, 221 Distance –, 17, 68 dominance –, 195, 196 Exchange –, 112 for termination, 135, 146, 162, 167, 177, 209 Friend –, 112 relevance –, 199 Separator –, 18
279 “pure”, 68, 146 local – structure, 41, 117 notion of –, 27 partial, 219, 244 violated, 30, 52 dominance – checking mechanism, 61, 66 between inequalities, 43 between paths, 181, 184, 194, 243 on working set, 61 with allowed dependences, 192 with forbidden dependences, 186 dominator, 74, 76, 80, 82, 94 duality gap, 153, 156, 223 embedding, 5 canonical, 94 disjoint, 5, 10, 14, 27, 29, 31, 55, 56, 69 feasible, 55 minimum cost, 52 partial, 67 environment of node v, 117 of terminal s, 68, 117
feasibility, 6, 75, 102, 205 – criteria, 16, 58, 68 – information, 84 – mode, 51, 146, 178, 247 – structure, 69 – with priorities, 55 d-layer, 35, 39, 43, 48, 50, 55, 64, 69, 72, 75, 84, condition for –, 19, 21 96, 101, 117, 137, 139, 164, 172, 192 deciding –, 51, 117 dependence, 26, 88 primal, 143, 214 – family, 27, 30, 40, 41, 58, 90, 184, 194, 243 flow – modes, 116, 218, 247 k-splittable, 138 allowed, 27, 41, 94, 164, 190, 228, 243 – chart, 161 conflicting, 190 – decomposition, see theorem emergence of –, 29 – theory, 22 forbidden, 27, 40, 50, 167, 184, 188, 205, 228, – value, 34, 132 240 control –, 72, 77 relevant, 196, 243 data –, 4 disjoint diversified, 156 A -, 27 fractional, 157 chord-, 29 integral, 205 dependence-, 27 multicommodity –, 34, 130 disjointness path –, 130, 156, 159 – condition, 6 positive, 154 – conflict, 113 primal, 197 – entity, 41 – family, 41 pseudo-, 214 – modes, 8, 16, 18, 22, 27, 30, 40, 42, 122, 247 star –, 207, 213, 219, 221, 244
INDEX
280 through arcs, 38 through nodes, 38 unit –, 214 unsplittable, 138 function arc cost –, 36, 68, 184 constant, 172 convex, 149 cost –, 6, 101, 137, 140, 172 evaluation –, 227 inverse Ackermann’s –, 80 Lagrangian dual, 139, 141, 152 lexicographical cost –, 178 linear, 140, 179, 195, 197 lower bound – LB, 58, 150 nonlinear, 165, 192 objective –, 58, 68, 139, 140, 158, 160, 191 path cost –, 161 polyhedral, 150 reduced cost – cred , 214 subdifferentiable, 141 testing – NC, 58, 68, 84, 103 upper bound – UB, 58, 101
superposition –, 14 heuristic cheapest paths –, 102 choosing –, 102 Clique –, 109 for upper bound, 178 greedy for clique cover, 44 greedy for node cover, 208 Integrated –, 123 matching –, 211 primal, 142, 167, 239 Relax –, 115 Untwist –, 105
inequality Cauchy-Schwarz’s –, 143 clique –, 37, 41, 56, 75, 164, 184 dependence –, 40 disjointness –, 55 inverse triangle –, 198 knapsack cover –, 242 instance – data, 87, 172, 187 – family, 8, 12, 96, 184, 217 graph augmented, 51, 54, 131 – preprocessing, 87, 122 example –, 7, 29, 53, 72, 80, 163, 167, 178, – reduction, 84, 96, 164, 201 197, 200, 207, 219, 229, 239, 242, 250 acyclic, 14, 15, 78, 82 feasible, 6, 52, 101, 119, 165 auxiliary –, 106, 109, 113 infeasible, 6, 51, 96, 101, 116, 131, 201, 220 base –, 5 layered, 87 bipartite, 48, 206, 208 parameterized, 132 complete, 21, 37, 240 parent –, 61, 84, 137, 223, 228 connected, 43 reduced, 68, 117 demand –, 5 residual –, 64, 66, 73, 101, 105, 109, 115, 158 dependency –, 32, 37, 42, 69, 117, 119, 139, restricted, 136 184 structurally infeasible, 68 Eulerian, 14 undirected, 6, 21, 40 example –, 29, 211 invariant, 188, 209, 214, 247 high-/low-level, 29 induced sub-, 33, 76, 87 labels layered, 75 – setting algorithm, 181 layered base –, 35, 42, 55, 88, 184, 207 active, 182 layered demand –, 36, 88 bivalent, 178 line –, 18, 23 cheapest cost – cred [·], 215 minor, 21 lower cost – ℓ[·], 174, 177, 179, 182, 187, 195, partitioned demand –, 206 197, 200, 217, 244 planar, 9, 16, 23 pareto optimal, 184, 187, 200, 243 residual –, 109, 211, 214 permanent, 174 residual base –, 101 shortest distance –, 164 residual demand –, 101 sparse, 9, 174 maximum matching, 208
INDEX method Branch-and-Bound, 58, 60, 61, 174, 205, 243 Bundle –, 149 Column Generation, 130 Differential –, xi, 84, 190, 201, 202, 223 Dijkstra type, 243 Dual Ascent, 152 Newton’s, 142 path based, 221, 223 star based, 223 Subgradient Optimization, 140, 143, 150, 167 model IP, 37 IPp, 50, 138 IPp−d0 , 158 LD, 151 LP, 130 LPp, 130, 140 LPp/d0 , 154 LPpd, 136 LRp, 139, 140 MCF, 34 Unified – on Star Flows, 207 Unified Arc-Path –, 50 Unified Node-Arc –, 37 nearest common ancestor, 79 network – planning, 239 reliable, 4 Virtual Private –, 2 node s-t-connecting, 74 – splitting, 27, 53, 75, 214 degree, 14 immediate dominator, 78 odd, 122, 239 partners, 5, 56, 82, 209 reachable, 74, 77 reached, 190 redundant, 88 terminal, 5 unreachable, 82, 96, 173 opponent, 51, 54, 56, 131, 134, 146, 214, 215 parity, 122, 239 path, 5 – cost, 50, 113 – cost restriction, 157, 242 – generation, 172 basic, 137
281 canonical, 88 cheapest, 14, 17, 68, 94, 103, 115, 140, 172, 205, 215, 217 cheapest restricted, 182 cheapest, allowed dependences, 190, 243 cheapest, forbidden dependences, 184, 205, 243 closed, 5 connecting, 5 dominating, 181 embedding, 103, 115, 217, 242 flow carrying, 132, 138 open, 5 pareto optimal, 181, 181, 182, 193 partial, 64, 65, 94, 154, 177, 181, 188, 192, 193, 195 passing, 118, 123 restricted cheapest, 179 shortest, 14 simple, 5, 25 priority – queue, 62, 154, 177, 182, 248 of demand, 54 Problem k-Splittable Flow, 138 Bandwidth Packing, 53, 63 Cheapest Path, 139, 190, 191 Constrained Shortest Path, 179, 243 Disjoint Paths, 14, 51 Disjoint Stars, 207 Maximum Bipartite Matching, 208 Maximum Clique, 108 Maximum Cost Stable Set, 119 Maximum Disjoint Paths, 7 Menger, 30 Minimum Cost Disjoint Paths, 5 Minimum Cost Multicommodity Flow, 130, 140, 150, 153, 205 Minimum Cost Single-Commodity Flow, 213 Minimum Set Cover, 44 Multicommodity Flow, 18, 34, 129 Prioritized Demand Packing, 54 Slab Restacking, 10, 235 problem instance, 5, 7, 250 space Π, 58 property ascent –, 150 bridge –, 177 cover –, 209 dependence –, 27 dominator –, 78, 94
INDEX
282 dual optimality –, 214 integrality –, 140, 205 locality –, 149 lower bound –, 174 minimum cost –, 200 optimal substructure –, 119, 173, 181, 193 optimality –, 58 reduced cost optimality –, 217 stack –, 10 upper bound –, 122 relaxation Lagrangian –, 129, 138, 179, 191 LP –, 63, 129, 130, 138, 140, 221, 242 reverse postorder, 78 routing – mode, 29, 190 – pattern, 26, 29 ambiguous, 88 cheapest paths –, 184 disjoint, 7, 9, 22, 24, 25, 137, 242 integral, 167, 241 logical, 26 partial, 27, 88 prescribed partial, 29, 239 reliable, 4 vehicle –, 12 separator, 18 set bit –, 45, 186, 246 constraint –, 69, 101, 152 of arcs A, 5 of arms D(s), 206, 213, 217 of articulations, 74 of centres C, 206 of dominators, 76, 79 of edges E, 5 of incident edges δG (u), 14 of nodes V , 5 of occupied arcs Aocc , 27, 63, 71, 73, 101 of paths P d , 49, 102, 207 of reachable nodes, 82, 87 of relevant dependences, 197 restricted path –, 108, 131, 137 stable, 33, 69, 117, 118, 139 Shared Risk Link Group, 26 solution – process, 36, 61, 86 – space, 60, 68 – technique, 5, 35
current best, 60, 103, 156, 190 dual feasible, 136 dual optimal, 214 feasible, 17, 19, 50, 51, 58, 68, 101, 102, 115, 129, 240 global quality of, 60, 123, 129 greedy –, 211 half-integer, 21 infeasible, 105 integral, 140, 154 near-optimal, 102, 123, 137 optimal feasible, 9, 58, 87, 94, 132, 158, 205, 244, 251 optimal Lagrangian, 242 partial, 101, 103, 106, 214 primal feasible, 143 unique maximal, 78 speedup, 73, 137, 218, 231 start cold, 167, 223, 249 warm, 137, 144, 159, 167, 223, 242, 248 state – space, 58, 60, 62, 94 – value, 102 – variable, 66, 102 vector, see vector, state strategy anti-cycling –, 153 Best Bound First, 62, 154 branching –, 60 Breadth First, 62 bundle deflation –, 150 choosing –, 58, 242 Constructive Branching, 64, 86, 188, 227, 239, 244, 248 Depth First, 62, 211 Destructive Branching, 66, 86, 188, 227, 239 pivoting –, 65, 67, 226, 239 trial-and-error –, 53 subgradient, 141 theorem Euler’s, 9 flow decomposition –, 130, 205 Hu’s, 21 K¨onig’s, 208 Lowry and Medlock’s, 78 Menger’s, 19 Wagner’s, 21 tree Branch-and-Bound –, 58, 137, 144, 156, 229
INDEX cheapest paths –, 172, 174, 187, 195, 200 dominator –, 78, 82, 96 search –, 109, 129, 208, 222 spanning –, 79 U-cut, 17 variable basic, 138 binary, 138 decision –, 34, 58, 130 dual, 137, 143, 184, 214, 226 fixing of, 62, 64, 66 fractional path –, 63 indicator –, 184 integral, 129 optimal, 66 optimal dual –, 131, 135, 197 path –, 138 state –, 62 vector dual –, 216 incidence –, 16, 18, 36, 159 multiplier –, 152 state –, 58, 60, 66, 101, 105, 115, 123, 132, 137, 144, 154, 159, 167, 226 unit –, 34 weight –, 17, 242 zero –, 58, 102
283
Curriculum Vitae
Martin Oellrich born 13 August 1966 in Essen
1972–1976
Hatzper-Grundschule Essen-Haarzopf
1976–1985
Goethe-Gymnasium Essen-Bredeney graduation with Abitur
1986–1987
Zivildienst at Evangelisches Altenkrankenheim Essen-Steele
1987–1997
study of mathematics: 1987–1995 Rheinische Friedrich-Wilhelms-Universit¨at Bonn 1991–1992 University of Wisconsin-Madison 1995–1997 Technische Universit¨at Berlin graduation with Diplom
1997–2003
Employee with T-Systems: 1997–2002 Technologiezentrum Darmstadt 2002–2003 Entwicklungszentrum Berlin
2003–2007
research assistant in department Combinatorial Optimizitaion and Graph Algorithms at Technische Universit¨at Berlin
284