Optimal competitiveness for Symmetric Rectilinear Steiner Arborescence and related problems Supported in part by the Net-HD MAGNET Consortium.

We present optimal competitive algorithms for two interrelated known problems involving Steiner Arborescence. One is the continuous problem of the Symmetric Rectilinear Steiner Arborescence (), studied by Berman and Coulston as a symmetric version of the known Rectilinear Steiner Arborescence () problem.

A very related, but discrete problem (studied separately in the past) is the online Multimedia Content Delivery () problem on line networks, presented originally by Papadimitriu, Ramanathan, and Rangan. An efficient content delivery was modeled as a low cost Steiner arborescence in a grid of networktime they defined. We study here the version studied by Charikar, Halperin, and Motwani (who used the same problem definitions, but removed some constraints on the inputs).

The bounds on the competitive ratios introduced separately in the above papers are similar for the two problems: for the continuous problem and for the network problem, where was the number of terminals to serve, and was the size of the network. The lower bounds were and correspondingly. Berman and Coulston conjectured that both the upper bound and the lower bound could be improved.

We disprove this conjecture and close these quadratic gaps for both problems. We first present an deterministic competitive algorithm for on the line, matching the lower bound. We then translate this algorithm to become a competitive optimal algorithm for . Finally, we translate the latter back to solve problem, this time competitive optimally even in the case that the number of requests is small (that is, ). We also present a lower bound on the competitiveness of any randomized algorithm. Some of the techniques may be useful in other contexts. (For example, rather than comparing to the unknown optimum, we compared the costs of the online algorithm to the costs of an approximation offline algorithm).

Keywords: Online Algorithm, Approximation Algorithm, Video-on-Demand

1 Introduction

We present optimal online algorithms for two known interrelated problems involving Steiner Arborescences111Thee difference between a Steiner tree and a Steiner arborescence is that in the latter, directed edges are directed away from the origin.. Those were discussed in separate studies in the past. Yet, we managed to improve the solution of the continuous one ( [4], defined below) by solving first the discrete one. We then used this improved solution of the continuous problem, to improve further the solution of the discrete one. For the sake of clarity of the exposition and the motivation, let us start with the discrete problem.

The online Multimedia Content Delivery () problem on line networks was presented originally by Papadimitriu, Ramanathan, and Rangan [12], to capture the tradeoff between the storage and the delivery costs. They considered a movie residing initially at some origin node. Requests arrived at various nodes at various times. Serving a request meant delivering a copy to the requesting node. An algorithm could serve every request by delivering a copy from the origin at the time of the request, incurring a high delivery cost. Alternatively, a movie already delivered to some nodes, could be stored there, and delivered later from there. This could reduce delivery costs, but incur storage cost.

More formally, given an undirected line network, Papadimitriu et al. defined a grid of networktime. The full formal definitions of this this grid, the problem and the online model, appear in Section 2. Let us now describe the ideas. A request for a movie copy arriving at a network node at time was modeled as a request at a grid vertex . The storage at a node from time until was modeled as an edge directed away from a grid vertex to vertex . An algorithm had to serve the requests, in the order they arrived. Initially, only some origin node was served. That is, the origin had a copy of the movie at time . Suppose that the origin continued to store this copy indefinitely. This was modeled by an algorithm selecting the origin vertex as well as the directed path . The edge modeled the storage of a copy at the origin from time to time . Similarly, an algorithm could select some other (directed) storage edges, that is, edges of the type , representing the storage of a copy in from to . A delivery edge of the type modeled the delivery of a copy, at time , from network node to network node . As opposed to storage edges that had to be directed from to , a delivery edge could lead either from to or vice versa.

Serving a scenario (a list) of requests was modeled by an algorithm constructing a Steiner arborescence rooted at in which all the requests where terminal vertices in the grid networktime. An efficient solution was a Steiner tree with a minimum number of edges (whether directed or not). The reader can find an example of an offline approximation algorithm (Algorithm Triangle of Charikar et. al [5]) in Section 2.

In the online version of , when a request arrives for some network node and some time , the algorithm must have already served all previous requests (those with smaller times, as well as those that have the same time but appear earlier than in the input sequence). Moreover, the online algorithm must serve request from some vertex that is already on the solution Steiner arborescence at this point in the algorithm execution. Hence, to be able to serve later requests, the algorithm must already add some (directed) arcs from some grid vertices of the form to the corresponding grid vertices , since this cannot be performed later than the time all the requests for time are served. In the case of (but not of ), the algorithm knows when no additional requests for time will arrive, and can add such arcs at that point.

The continuous version of the above problem is the Symmetric Rectilinear Steiner Arborescence () problem studied by Berman and Coulston [4] in the context of Steiner arborescences. There, a request can arrive at any real point , provided that the coordinates are non decreasing. Instead of selecting edges to augment the Steiner tree solution (as in ), the algorithm may augment the Steiner arborescence by selecting either segments that is parallel to the axis, or segments that are parallel to the axis. Papadimitriu et al. assumed some constraints on the input. Those constraints were lifted in the paper of Charikar, Halperin, and Motwani. The upper bound (in Charikar et al.) on the competitive ratio was for the network problem (where was the size of the network) and the lower bound was . The bounds of Berman and Coulston for were very similar. The upper bound was , where was the number of terminals222In fact, the parameter they used was , the normalized size of the network. For simplicity, we present results for , the size of the network. However, an easy consequence of our Sections 4 and 5 is that we can show the same results for rather than for .. The lower bound was . Clearly, the upper bounds are quadratic in the lower bounds. Berman and Coulston conjectured that both the upper bound and the lower bound could be improved.

Our results

In this paper, we disprove the above conjecture and close these quadratic gaps for both problems. We first present an deterministic competitive algorithm for on the line. We then translate the online algorithm to become a competitive optimal algorithm for . The competitive ratio is . Finally, we translate back to solve the problem. This reverse translation improves the upper bound to . That is, this final algorithm is competitive optimal for even in the case that the number of requests is small. (Intuitively, the “reverse translation” gets rid of the dependance on the network size, using the fact that in the definition of , there is no network; this trick can be a useful twist on the common idea of a translation between continuous and discrete problems).

We also present a lower bound on the competitiveness of any randomized algorithm. Some parts of the techniques we used may be of interest. In particular, a common difficulty in computing a competitive ratio is, of course, the fact that one does not know the competing algorithm of the adversary. We go around this fact by comparing the costs of the online algorithm to the costs of a constant approximation offline algorithm (of Charikar, Halperin, and Motwani).

Some additional related work

As pointed out in [5], they were also motivated by their Dynamic Servers Problem. That is, is a variant of a problem that is useful for data structures for the maintenance of kinematic structures, with numerous applications. Of course, Steiner trees, in general, have many applications, see e.g. [8] for a rather early survey that already included hundreds of items. In particular, online Steiner arborescence problems are useful in modeling the time dimension in a process. Intuitively, as is the case in the motivation of Papadimitriu at al. explained above, directed edges represent the passing of time. Since there is no way to go back in time in such processes, all the directed edges are directed away from the initial state of the problem, hence, resulting in an arborescence. Additional examples given in the literature included processes in constructing a VLSI, optimization problems computed in iterations (where it was not feasible to return to results of earlier iterations), dynamic programming, and problems involving DNA, see, e.g. [4, 6, 9].

Berman and Coulston also presented online algorithms for the Rectilinear Steiner Arborescence (continuous) problem . There, each horizontal line segment in the Steiner arborescence was required to be directed from a low coordinate value to a high one. (In addition, as in , each vertical segment was required to be directed from a low coordinate value to a high one). The offline version of was studied e.g. by Rao, Sadayappan, Hwang, and Shor [15]. was attributed to [11] who gave an exponential integer programming solution and to [7] who gave an exponential time dynamic programming algorithm. A PTAS was presented by [10]. The results of [2] generalized the logarithmic upper bound of online to general networks.

Paper structure.

In Section 3, we provide an optimal upper bound on the competitive ratio for as a function of the network size. In Section 4, we use the above solution in order to solve the (continuous) problem. In Section 5 we use the solution of in order to improve the solution of (to be optimal also as a function of the number of Steiner points). Finally, the lower bound is given in Section 6.

2 Preliminaries

In this section, we present some of the definitions already given in the introduction, but in a somewhat more formal and detailed form. This allows us to introduce notations we use later.

The networktime grid

A line network is a network whose vertex set is and its edge set is . Given a line network , construct ”time-line” graph , intuitively, by “layering” multiple copies of , one per time unit. Connect each node in each copy to the same node in the next copy (see Fig. 1). When it is clear from the context, we may omit from and write just , for every . Formally, the node set contains a node replica (sometimes called just a replica) of every , for every time step . That is, . The set of edges contains horizontal edges , connecting network edges in every time step (round), and directed vertical edges, called arcs, , connecting different copies of . Notice that can be viewed geometrically as a square grid of by whose grid points are the replicas. Following Fig. 1, we consider the time as if it proceeds upward.

Figure 1: An example of a time-line graph . Each node in is represented by a circle; each horizontal edge in is represented by a horizontal segment (see, as an example, for an horizontal edge in the left marked rectangle); each arc in is represented by a horizontal arrow (see, as an example, for an arc in the right marked rectangle).

SRSA: formal definition The Symmetric Rectilinear Steiner Arborescence () problem is defined as follows. A path connecting two terminals is rectilinear if it traverses a number of line segments, where each line segment is either vertical or horizontal. This path is also -monotone if during the traversal, the coordinates of the successive points are never decreasing. The input is a set of requests , that is, a set of terminals (sometimes called points) in the positive quadrant of the plane. A feasible solution to the problem is a set of rectilinear segments connecting all the terminals to the origin (sometime called the root) in which each terminal can be reached from the origin by a rectilinear -monotone path. The goal is to find a feasible solution in which the sum of lengths of all the segments is the minimum possible.

The definition of is almost identical, except that it uses instead of the continuous quarter of the plane.

MCD: formal definition We are given a line network , an origin node and a set of requests . A feasible solution is a subset of edges that spans the set of requests . For convenience, the endpoints of edges in are also considered parts of the solution. For a given Algorithm , let be the solution of , and let , (the cost of an algorithm ), be . The goal is to find a minimum cost feasible solution. In our analysis, opt is the set of edges in some optimal solution whose cost is .

Online model

In the online versions of the problems, the algorithm receives as input a sequence of events. One type of events is a request in the (now ordered) set of requests . A second type of events is assumed in the case of only. Specifically, we also assume for a clock that tells the algorithm that time is ending, and also that time is starting. This allows the algorithm (for only) to know e.g. that no additional requests for time are about to arrive, or that there are no requests for some time at all.

When handling an event , the algorithm only knows the following: (a) all the previous requests ; and (b) the solution arborescence it constructed so far (originally containing only the origin). In the case of , it is also meaningful to say that (c) the algorithm knows the current time (even if no request arrives at time ). In each event (either a request arrival, or, in , a clock event), the algorithm may need to make decisions of two types, before seeing future requests:

  • If the event is the arrival of a request, then from which current (time ) cache (a point already in the solution arborescence when arrives) to serve by adding horizontal edges to . Note that, at time , the online algorithm cannot add nor delete any edge with an endpoint that corresponds to previous times.

  • Which segments to add from a point already in the solution arborescence to . As opposed to the case of , here both horizontal and vertical segments may be added. The segments added by the algorithm cannot include any point for , where is the time of .

  • At which nodes to store a movie copy for time , for future use. That is, select some replica (or replicas) already in the solution and add an edge directed from to to .

  • Similarly to the case: first, choosing some points of the form from the points already selected to be in the solution arborescence such that ; second, adding to a segment directed from to some later point . As opposed to the case for , here, is not necessarily , so that algorithm also must choose .

Similarly to [1, 2, 3, 12, 14, 13, 5], we assume that the online algorithm may replicate the movie for efficient delivery, but at least one copy of the movie must remain in the network at all times. Alternatively, the system (but not the algorithm) can have the option to delete the movie altogether, this decision is then made known to the online algorithm. This natural assumption is also necessary for having a competitive algorithm.

A tool: the offline algorithm Triangle of Charikar et. al

Consider a requests set such that . When Algorithm Triangle starts, the solution includes just (intuitively, a “pseudo request”). Then, Triangle handles, first, request , then request , etc… In handling a request , the algorithm may add some edges to the solution. (It never deletes any edge from the solution.) After handling , the solution is an arborescence rooted at that spans the request replicas . For each such request , Triangle performs the following (see Fig. 2).

  • Chose a replica s.t. is already in the solution and the distance from to is minimum (over the replicas already in the solution). Call the serving replica of .

  • Define the radius of as . Also define the base333The word “base” comes from the notation used in [5] for Algorithm Triangle. There, is the base of the triangle defined there (that triangle is illustrated in Fig. 2). of as the set of replicas at time of distance at most from . That is, . Similarly, the edge base of is .

  • Deliver a copy to a replica in . This is done by delivering a copy from to (meaning that node stores a copy from time to time ). More formally, add the arcs of to the solution.

  • Deliver a copy to all replicas in . This is done by adding all the edges of to the solution, except the one that closes a circle444 For convenience, of the analysis we want the solution to be a tree, so we do not add redundant edge. (if such exists).

It is easy to verify [5] that the cost of Triangle for serving the ’th request is at most. Denote by the feasible solution of Triangle, where and . Note that is an arborescence rooted at spanning the base replicas of . Rewording the theorem of [5], somewhat,

Theorem 2.1

[5] Triangle computes a -approximate solution. Also, .

Figure 2: An example of an execution of Triangle for requests set . The non-filled circles correspond to base replicas. The set of horizontal edges is the union of the bases of the triangles; The set of arcs is the union of the vertical paths from the serving replicas to the base replica (for ).

General definitions and notations.

Consider an interval and two integers , s.t. . Let (Fig. 3) be the “rectangle subgraph” of corresponding to vertex set and time interval . This rectangle consists of the replicas and edges of the nodes of corresponding to time interval . For a given subsets , and , denote by (1) replicas of corresponding to times . Define similarly (2) for horizontal edges of ; and (3) arcs of . (When , we may write , for .)

Figure 3: A subgraph rectangle , where .

Consider also two nodes s.t. . Let be the set of horizontal edges of the shortest path from to . That is, . Let be the set of arcs of the shortest path from to . That is, . Let be the distance from to . Formally, (if , otherwise, ).

3 Optimal online algorithm for MCD

Algorithm .

Like Algorithm Triangle, Algorithm , handles requests one by one, according to the order of arrival. However, in step (T3), Triangle may perform an operation that no online algorithm can perform (if ). Serving a request must be preformed from some replica that holds a copy at time in the execution of the online algorithm on . Thus (in addition to selecting from which nodes to deliver copies), algorithm at time had to also select the nodes that store copies for the consecutive time (so that mentioned above would be one of them). Let us start with some definitions.

Partitions of into intervals.

Define for some positive integer to be chosen later. For convenience, we assume that is a power of . (It is trivial to generalize it). Define levels of partitions of the interval . In level , partition into intervals, , ,…,, each of size (Fig. 4). , for every and every . Let be the set of all such intervals. Let be the level of an interval , i.e., . Denote by (for every node and every level ) the interval in level that contains . That is, (Fig. 6).

Figure 4: An example of a line network of size , where . There are partition levels. At level , the interval [1,96] partitions into intervals , each of size (see for example, level 3).

For a given interval , denote by , for (respectively, , for ) the neighbor interval of level that is on the right (resp., left) of (see Fig. 5). That is, and . Define that and . Let

We say that is the neighborhood of .

Figure 5: Neighbor intervals.
Figure 6: An example of the membership of node 69 in intervals in a network of size 96. Node 69 belongs to 5 intervals, and .

Active intervals.

An interval is called active at time , if a replica in is also in Base, i.e., (see Fig. 7). Intuitively, the pseudo online kept a movie copy in, at least, one of the nodes of , at least once, and “not to long” before time . We say that stays-active, intuitively, if is not “just about to stop being active”, that is, if .

Figure 7: Interval is stays-active at time ; interval is not active at time ; and interval is active, but not stays-active at time .

Denote by , the set of replicas corresponding to the nodes that store copies from time to time in a execution. Also, . We chose to leave a copy in always. To help us later in the analysis, we also added an auxiliary set . Initially, . For each time , consider first the case that there exists at least one request corresponding to time , i.e., . Then, for each request , simulates Triangle to find the radius and the set of base replicas of . Next, delivers a copy to every such base replica (this is called the “delivery phase”). That is, for each do:

  • chose a closest (to ) replica of time already in the solution;

  • add the path to the solution.

Let . (Note that is served from , after that, the path is added; and is served from , etc.) Clearly, the delivery phase of time ensures that (at least) the nodes of have copies at the end of that phase. It is left to decide which of the above copies to leave for time . That is (the “storage phase”), chooses the set . Initially, (as we chose to leave a copy at always). Then, for each level in an increasing order select as follows.

  • While there exists a level interval that is () stays-active at ; but () no replica has been selected in ’s neighborhood (i.e., ), then perform steps (S1.1-S1.3) below.

  • Add the tuple to the set commit (we say that commits at time ).

  • Select some replica such that (by Observation 3.1 below, such a replica does exist).

  • Add to and add the arc to the solution.

The pseudo code of and an example for an execution of are given in Fig. 9 and Fig. 8, respectively. The solution constructed by is denoted , where represents the horizontal edges added in the delivery phases and represents the arcs added in the storage phase. Before the main analysis, we make some easy to prove but crucial observations. Recall that the notation of active (including stays-active) refer to the fact the nodes of some base replicas belong to some interval in the past. Observations 3.1 and 3.2 state, intuitively, that leaves a copy in the neighborhood of as long as is active.

Observation 3.1

(“Well defined”). If an interval is stays-active at time , then there exists a replica such that .

Proof:  Consider some interval and a time . If is stays-active at , then either (caused by a new request) or and is also stays-active at time (and ); hence, . The observation follows.    

Moreover, a stays-active interval keeps a copy in its neighborhood longer.

Observation 3.2

(“An active interval has a near by copy”). If an interval is active at time , then, either (i) there is some base replica in ’s neighborhood at (), or (ii) at least one of the nodes of stores a copy for time ().

Proof:  Consider an interval that is active at time . If , then the observation follows. Assume that . Then, the fact that is active at , but not contain any base replica at time , implies also, that stays-active at time . Thus, either (i) commit at (at step (1)) which “cause” adding an additional replica to from ’s neighborhood; or () does not commit at , since has, already, a replica from ’s neighborhood.    

Observation 3.3

(“Bound from above on ”). .

Proof:  Let . Now we prove that . Every arc in (that add at step (S1.3)) corresponds to exactly one tuple of an interval that commits at time (in step (S1.1)); and every interval commits at most once in each time that corresponds to exactly one additional arc in . Thus, . The observation follows.    

Figure 8: Example of execution of on . The dashed segments show were “plans” (it may changes its plans, when some requests arrives) to stores copies. (a) handles request ; (b) delivery phase of for ; (c) storage phase of for ; (d) delivery and storage phases of for .

; and /* ; */ At time do: If , then letting and do: “Delivery phase” deliver a copy to every base replica in . “Simulate” Triangle and compute and . For to do: If , then chose a closest replica to ; step (D1), where . and . Otherwise, chose a closest replica to ; step (D1), where . and . . step (D2); add the path between and and the base edges of to the solution. “Storage phase” ; For each level to do: While there exists a level interval that is stays-active at and do: part of step (S1); /* */ part of step (S1.1); Select a replica such that . step (S1.2); . step (S1.3); step (S1.3); Store a copy in for the succussive time (for time ), for every . For every do: If keeps a copy, then delete the copy for time .

Figure 9: Algorithm . Comments (between /* */) contains auxiliary actions for the analysis.

3.1 Analysis of

We, actually, prove that

This implies the desired competitive ratio of by Theorem 2.1. Proving a competitive ratio by comparing an online algorithm to an approximation algorithm (rather then to the unknown adversary) may be a useful approach for other competitiveness proofs. We first show, that the number of horizontal edges in (“delivery cost”) is . Then, we show, that the the number of arcs in (“storage cost”) is . Optimizing , we get a competitiveness of .

Delivery cost analysis.

For each request , the delivery phase (step (D2)) adds to the solution. Define the online radius of as . Since , it follows that,


It remains to bound as a function of from above. Intuitively, includes the distance from some base replica to . That is, includes the distance from to and the time difference between and . Restating Observation 3.2 somewhat differently (Claim 3.4 below), we can use the distance and the time difference for bounding . That is, we show the has a copy at time (of ) at a distance at most from (of ). Since, , has a copy at distance at most from (of ).

Claim 3.4

Consider some base replica and some , such that, . Then, there exists a replica such that (Fig. 10).

Proof:  Assume that . Consider an integer . Let . Interval is active at time . Thus, by Observation 3.2, there exists some node in ’s neighborhood that keep a copy for time . That is, a replica does exists. The fact that implies that , which implies that . The claim follows, since .    

Figure 10: Interval is active at , since . Therefore, there exists a replica and in addition, .
Lemma 3.5


Proof: Recall that Triangle serves request from some base replica already include in the solution. That may correspond to some earlier time. That is, . In the case that , can serve from . Hence, . In the more interesting case (see Fig. 11), . By Claim 3.4 (substituting , , and ), there exists a replica such that . Recall that . Thus, by applying the triangle inequality, we get that, . Hence, as well.    

Figure 11: We have and by Claim 3.4, . Thus, .

The following corollary follows from the above lemma, Inequality (1), and Theorem 2.1.

Corollary 3.6


Storage cost analysis.

By Observation 3.3, it remains to bound the size of from above. Let if (otherwise 0). Hence, . We begin by bounding the number of commitments in made by level intervals.

Observation 3.7

Proof:  Consider some commitment , where interval is of level . Interval commit at time only if stays-active at (see step (S1) in ). This stays-active status at time