Performance of a greedy algorithm for edge covering by cliques in interval graphs
Gabrio Caimi, Holger Flier, Martin Fuchsberger, Marc Nunkesser
aa r X i v : . [ c s . D M ] D ec Performance of a greedy algorithm for edgecovering by cliques in interval graphs
Gabrio Caimi, Martin FuchsbergerInstitute for Operations Research, ETH ZurichCH-8092 Z¨urichHolger Flier, Marc NunkesserInstitute of Theoretical Computer Science, ETH ZurichCH-8092 Z¨urichNovember 15, 2018
Abstract
In this paper a greedy algorithm to detect conflict cliques in intervalgraphs and circular-arc graphs is analysed. In a graph, a stable set re-quires that at most one vertex is chosen for each edge. It is equivalentto requiring that at most one vertex for each maximal clique is chosen.We show that this algorithm finds all maximal cliques for interval graphs,i.e. it can compute the convex hull of the stable set polytope. In caseof circular-arc graphs, the algorithm is not able to detect all maximalcliques, yet remaining correct. This problem occurs in the context of rail-way scheduling. A train requests the allocation of a railway infrastructureresource for a specific time interval. As one is looking for conflict-free trainschedules, the used resource allocation intervals in a schedule must notoverlap. The conflict-free choices of used intervals for each resource cor-respond to stable sets in the interval graph associated to the allocationtime intervals.
One important aspect of railway optimization is scheduling trains in a mainstation area [6, 2]. In such an area the track topology is complex, and manydifferent routes to travel between the area entrances (called portals) and plat-forms exist. Here, an appropriate assignment of exactly one of these routes toeach train is crucial. The choice of these routes has to be conflict-free, i.e. eachinfrastructure resource can be occupied by at most one train at the same time.Hence, the allocation time intervals at each resource belonging to the chosen1rain routes can not overlap ([9]). These restrictions over the concurrent al-location time intervals at each resource transforms into finding stable sets incorresponding interval graphs. The stable set problem itself can be modeled byformulating an integer linear program (ILP) and solving it using a commercialsolver, once an objective has been formulated. Since a good ILP formulationhas a strong relaxation which speeds up the solution process, we look for anefficient ILP description of the stable set problem in an interval graph.
Let consider the track topology, consisting in a set of resources, as describedin [7]. Each route/time assignment for a train allocates the used resourcesover certain time intervals, depending on signal positions, train dynamics, tracktopology, and additional safety regulations. A feasible train schedule assigns aroute and times to each train such that no resource is allocated at the sametime, thereby guaranteeing a conflict-free schedule.Several approaches exist in the literature for modeling conflicting allocationsover resources. The conflict modeling in the conflict graph approach of [10] issimple: each available route/time assignment of a train corresponds to a nodein the conflict graph. Each time two nodes of distinct trains would allocate aresource at the same time, a conflict edge between these nodes is introducedinto the graph. Additionally, the fact that a train is only allowed to have oneroute/time assignment is modeled by interconnecting all nodes of the same trainby edges thereby forming a clique. A solution of the train routing problem inthis model is a stable set with cardinality equal to the number of trains n = | T | ,where each chosen vertex assigns a route/time to the corresponding train. Asit is a stable set of cardinality n , this assignment is guaranteed to be conflict-free and each train gets exactly one route/time assigned. We can illustrate thisconflict modeling concept by drawing all the allocation time intervals of a singleresource during a period of time (see later Figure 1). This leads to the followingILP formulation for all the stable sets (feasible solutions) of the conflict graph G ,where the variable x ij correspond to the node ij ∈ G , meaning the route/timeassignment j for train i : m ( i ) X j =1 x ij = 1 for all i = 1 , . . . , n (1) x ik + x jl ≤ r i k = r j l (2) x ij ∈ { , } (3)where r i k = r j l means that assignment k of train i is in conflict with assignment l of train j .Let ST AB G ) := { x | x ≥ , x satisfies (1) , (2) }
2e the polytope of the non-negative vectors x satisfying (1) and (2). It is easyto see that integral solutions fulfilling (1), (2), and (3) are exactly the incidencevectors of stable sets of nodes of G .Let denote with ST AB ( G ) := conv { x S ∈ { , } V | S ⊆ V is stable set } the convex hull of the incidence vectors of all stable sets of nodes of G. Clearly, ST AB ( G ) ⊆ ST AB G ) and the integer points contained in both sets are thesame. The two polytopes are equal if and only if the graph G is bipartite andhas no isolated nodes [5]. This is in general not the case when looking at trainscheduling problems. Hence, we have to improve on the ST AB G ) formulation. In the following we restrict our view to a single resource of the track topol-ogy, consisting in a set of topology elements [7]. Instead of looking at pairs ofoverlapping allocation time intervals like in the conflict graph approach, [4, 1]introduces a more sophisticated attempt which gather them into groups of con-flicting intervals. All possible assignments using the resource at the same timeare grouped in a conflict clique, and at most one of these can use the resource(see later Figure 2).Let the graph G = ( V, E ) denote the induced interval graph from the alloca-tion time intervals for this resource, which is built as follows: for each allocationtime interval a vertex v ∈ V is created and two vertices are connected with anedge e ∈ E if the two intervals intersect. On the other hand, in periodic schedul-ing we deal with circular time axes and the induced intersection graph G is called circular-arc graph . The set of allocation time intervals is called arc model .A feasible solution of the train scheduling problem should be conflict-free ineach resource. It means that the set of chosen assignments represent a stable setin the interval graph of each resource. The conflict graph formulation describesthe set of all stable sets in the graph G using the incidence vectors and (integer)linear constraints avoiding the choice of two adjacent nodes. Ideally, one wouldbe able to describe efficiently the convex hull of the incidence vectors of all stablesets in G as a polytope. Since the polytope is naturally integer it induces anefficiently solvable ILP formulation. Chv´atal [3] proved that one can describeefficiently this convex hull. This description imposes that the amount of stableset vertices over each maximal clique of the interval graph should be at mostone.Section 2 explains the greedy algorithm to detect the conflict cliques andin Section 3 we prove that this algorithm finds all maximal cliques for intervalgraphs (i.e. describes the convex hull). 3 A greedy algorithm for grouping conflicts intocliques
In this section we explain the algorithm introduced by [4, 1] for detecting con-flicts and grouping them into cliques.
For an easier understanding of the algorithm we first introduce a graphicalrepresentation of resource allocations called Allocation Schema (AS). We createfor each resource an AS, which is a representation of the resource allocationintervals by the potential assignments over time. We chart the allocations ofthe different assignments by a horizontal line with the start of the allocation asthe offset and the allocation duration as the length of the line. An example ofAS is given in Figure 1.Figure 1: In the Allocation Schema (AS) the allocations of a resource by trainassignments are represented by horizontal lines.
To find all conflict cliques we suggest an algorithm which operates on the ASand not on the intersection graph directly. Algorithm 1 basically consists of twomajor steps:1. Sort the start and end times of the allocation time intervals according totime.2. Walk through the times, keep track of the currently open intervals in a listand construct the set of conflict cliques among the currently open intervalsat the end times.Note that we do not have to form a clique at the end time of each interval, butonly at end times where a new interval has been opened since the last iteration.Additionally, we avoid adding a clique if it just consists of one interval since itwould not be a necessary constraint. A result of Algorithm 1 is illustrated inFigure 2. 4 lgorithm 1
Conflict Cliques
Input:
Set of all allocation time intervals (cid:8) [ s ( i ) , f ( i )] (cid:9) i =1 ,...,n of a resource r Output:
Set C r of conflict cliques Create a list L of 2 n tupels ( time ∈ R + , identifier ∈ { , . . . , n } , boolean is endtime ) Sort L according to the first key time , for same time starttimes before end-times Initialize list of currently open intervals O := ∅ Initialize new starttime := F ALSE for i = 1 to 2 n do if is endtime i = F ALSE then O := O ∪ { identifier i } new starttime := T RU E else if ( new starttime = T RU E ) && ( | O | > then C r := C r ∪ O new starttime := F ALSE O = O \ { identifier i } return C r ti Time T r a i n pa t h Figure 2: Several train itineraries allocate a resource during different time in-tervals (horizontal bars). The dashed vertical bars illustrate conflict sets amongthe allocation intervals formed by Algorithm 1.
Algorithm 1 runs in O ( n log n ) where n is the number of allocation intervals.In a first step we have to sort the allocation intervals according to time whichtakes O ( n log n ) time [8]. We then loop 2 n times where the steps inside the looptake O (1) time which results in a running time complexity of O ( n ) for the loopand O ( n log n ) for the whole algorithm.For non-periodic railway scheduling problems the described algorithm is op-timal, i.e. it finds all maximal cliques in the corresponding interval graph andthereby also the convex hull of the stable set incidence vectors. The proof fol-lows in Section 3. In periodic railway scheduling problems, the allocations of aresource reoccur after a fixed period length and hence allocation intervals mayoverlap the period length. To deal with these overlaps of the period length, we5an use the modulo function to draw overlapping intervals by two horizontallines. The first line starts at time 0 and ends at the original end time of theallocation modulo the period length. The second line starts at the original starttime and ends at the period length.There are two drawbacks in this periodic setting: the first is the unknownquality of the polytope described by the maximal clique. For instance, in thechordless odd cycles K k +1 for k ≥ is an extremal point of the polytope described bythe maximal cliques, making it in general not the convex hull for the incidencevectors of a stable set. It is unclear how one can find efficiently the convexhull of the stable set incidence vectors in the periodic setting and how good themaximal clique description approximates this convex hull.The second problem is, that the current greedy algorithm fails to detect allmaximal conflict cliques. For instance, in the example of Figure 3 the describedmethod fails to detect a conflict clique: Typically, in practice the length ofa period is one hour and the allocation time intervals are not longer than 3minutes. Hence these special cases where a conflict clique is not detected by thealgorithm most likely will not occur.Figure 3: Special case, where the three clique consisting of the intervals A,B,and C is not detected In this section we present a proof that the greedy algorithm is optimal in caseof non-periodic scheduling.
Definition 3.1.
For a time interval i of a resource r , denote its starting andfinishing time by s ( i ) and f ( i ) , respectively. An interval i is called active attime t iff s ( i ) ≤ t ≤ f ( i ) . roperty 3.2. A subset J C of all allocation intervals I r of a resource r formsa clique C J of the associated interval graph G r , iff there exists a time segment T C = (cid:20) s ( J C ) := max i ∈ J C { s ( i ) } , f ( J C ) := min i ∈ J C { f ( i ) } (cid:21) during which all intervals i ∈ J C are active. Furthermore, for any t < s ( J C ) or t > f ( J C ) , at least one of the intervals i ∈ J C is not active. Theorem 3.3.
Algorithm 1 computes a minimum edge clique cover for theinterval graph G r associated with the allocation intervals I r . Each clique of theedge clique cover is maximal.Proof. Clearly, C r computed by Algorithm 1 is an edge clique cover. Further-more, every clique C ∈ C r is maximal. Suppose some C ∈ C r was not. Then,there would exist an interval a J C , conflicting with every interval b ∈ J C .But because the clique C , which was added to C r in line 11 of Algorithm 1,is equal to the set O C of all open (i.e., active) intervals at time t = f ( J C ),and a O C , it must hold that either s ( a ) > f ( J C ) or f ( a ) < s ( J C ), where s ( J C ) = s (identifier i ), the starting time of interval identifier i defined in line 7of the algorithm. By Property 3.2, both cases contradict the assumption that a conflicts with every interval b ∈ J C . Finally, to show that ℓ := | C r | is minimum, it suffices to identify a subset S of the conflicts that requires at least ℓ cliques to be covered. This subset canbe constructed inductively as follows. Denote by C i , 1 ≤ i ≤ ℓ the cliques of C r in the order in which they are found by the algorithm. For every clique C i ,denote by s i , f i intervals for which s ( C i ) = s ( s i ) and f ( C i ) = f ( f i ), respectively.Let c i be the conflict between s i and f i , if s i = f i , or an arbitrary but fixedconflict between s i = f i and another interval a ∈ C i . In either case, for any i < j , conflicts c i and c j cannot be covered by the same clique, since f ( f i )
Algorithm 1 finds all maximal cliques in the interval graph G r .Proof. Suppose there exists a maximal clique M C r . Clearly, M can neitherbe a superset nor a subset of any C ∈ C r . Hence, M can only contain subsetsof intervals of two consecutive cliques C i , C i +1 ∈ C r , i.e., M = C ′ i ∪ C ′ i +1 , withnonempty subsets C ′ i ⊂ C i and C ′ i +1 ⊂ C i +1 . Now, M C i can only hold ifthere is an interval a in C ′ i +1 that is not in C ′ i . M is only a clique, if a is inconflict with every b ∈ C ′ i . But if this is the case, then M ⊂ C i +1 , since allintervals that are open at s ( a ) are, by Algorithm 1, in C i +1 . In the algorithm, a suitable tie break should be chosen, so that for intervals i , j with f ( i ) = s ( j ), the starting time of j is considered before the finishing time of i . eferences [1] G. Caimi, F. Chudak, M. Fuchsberger, and M. Laumanns. Solving thetrain scheduling problem in a main station area via a resource constrainedspace-time integer multi-commodity flow. Technical report, Institute forOperations Research, ETH Zurich, 2008.[2] A. Caprara, L. Kroon, M. Monaci, M. Peeters, and P. Toth. Passengerrailway optimization. Technical Report TR-0035, ARRIVAL Report, 2006.[3] V. Chv´atal. On certain polytopes associated with graphs. Journal of com-binatorial theory (B) , 18:138–154, 1975.[4] M. Fuchsberger. Solving the train scheduling problem in a main stationarea via a resource constrained space-time integer multi-commodity flow.Master’s thesis, ETH Zurich, 2007.[5] M. Gr¨otschel, L. Lov´asz, and A. Schrijver.
Geometric Algorithms and Com-binatorial Optimization . Springer, 1993.[6] D. Huisman, L.G. Kroon, R.M. Lentink, and M.J.C.M. Vro-mans. Operations Research in Passenger Railway Transportation.In
Statistica Neerlandica , volume 59, pages 467–497. Erasmus Re-search Institute of Management (ERIM), April 2005. available athttp://ideas.repec.org/p/dgr/eureri/30002129.html.[7] M. Montigel. Representation of track topologies with double vertex graphs.In T.K.S. Murthy, F.E. Young, S. Lehmann, and W.R. Smith, editors,
Computers in Railway , volume 2 of
Computational Mechanics Publications ,Washington D.C., 1992.[8] T. Ottmann and P. Widmayer.
Algorithmen und Datenstrukturen . Spek-trum, 2002. In German.[9] J. Pachl.
Railway Operation and Control . VTD Rail Publishing, MountlakeTerrace (USA), 2002. ISBN 0-9719915-1-0.[10] P. J. Zwaneveld, L. G. Kroon, H. E. Romeijn, M. Salomon, S. Dauz`ere-P´er`es, S. P. M. Van Hoesel, and H. W. Ambergen. Routing Trains throughRailway Stations: Model Formulation and Algorithms.