The 1-Center and 1-Highway problem

The 1-Center and 1-Highway problem

José Miguel Díaz-Báñez J.M. D.-B., P. P.-L. and I. V. were partially supported by project FEDER MEC MTM2009-08652. J.M. D.-B., M.K and I. V. were partially supported by ESF EUROCORES programme EuroGIGA, CRP ComPoSe: grant EUI-EURC-2011-4306. Departamento de Matemática Aplicada II, Universidad de Sevilla, Spain. {dbanez,iventura} Universitat Politècnica de Catalunya (UPC), Barcelona. Escuela de Ingeniería Civil en Informática, Universidad de Valparaíso, Chile.    Matias Korman Partially supported by the support of the Secretary for Universities and Research of the Ministry of Economy and Knowledge of the Government of Catalonia and the European Union. Departamento de Matemática Aplicada II, Universidad de Sevilla, Spain. {dbanez,iventura} Universitat Politècnica de Catalunya (UPC), Barcelona. Escuela de Ingeniería Civil en Informática, Universidad de Valparaíso, Chile.    Pablo Pérez-Lantero Partially supported by grant FONDECYT 11110069. Departamento de Matemática Aplicada II, Universidad de Sevilla, Spain. {dbanez,iventura} Universitat Politècnica de Catalunya (UPC), Barcelona. Escuela de Ingeniería Civil en Informática, Universidad de Valparaíso, Chile.    Inmaculada Ventura Departamento de Matemática Aplicada II, Universidad de Sevilla, Spain. {dbanez,iventura} Universitat Politècnica de Catalunya (UPC), Barcelona. Escuela de Ingeniería Civil en Informática, Universidad de Valparaíso, Chile.

We study a variation of the -center problem in which, in addition to a single supply facility, we are allowed to locate a highway. This highway increases the transportation speed between any demand point and the facility. That is, given a set of points and , we are interested in locating the facility point and the highway that minimize the expression , where is the time needed to travel between and . We consider two types of highways (freeways and turnpikes) and study the cases in which the highway’s length is fixed by the user (or can be modified to further decrease the transportation time).

Keywords: Geometric optimization; Facility location; Time metric.

1 Introduction

The optimal location of a facility modeled as a geometric object is a well-studied problem both in operations research and computational geometry. An overview on continuous location is given in [16]. Particularly, the geometrical nature of problems under the minmax criterion has led to fruitful interaction between both fields [10, 17]. On the other hand, models dealing with alternative transportation systems have been suggested in location theory [14].

Although the metric given by a real urban transportation system is often quite complicated, simplified mathematical models have been widely studied in order to investigate basic geometric properties of urban transportation systems. Abellanas et. al. [1] considered a geometric modeling of this environment: represent highways as line segments in the plane, giving each line segment an associated speed. Then, the travel time between two points gives a metric called the city distance. Recently, there has been an interest in facility location problems derived from urban modeling. In many cases we are interested in locating a highway that optimizes some given function that depends on the distance between elements of a given pointset (see for example [6, 13]).

In a recent paper, Espejo and Chía [11] introduced a variant of the problem in which we are given a set of clients (represented by a set of points ) located in a city and one is interested in locating a service facility and a highway simultaneously in a way that the average supply time between the clients and the supply point is minimized. The state of the art and applications of this problem can be found in their paper and the references therein. Unfortunately, it was shown that their algorithm could give an incorrect solution in some cases and a new corrected algorithm is given in [7]. In this paper we study a variation of this problem in which, instead of the average travel time, we want to minimize the largest travel time between the clients and the facility.

1.1 Definitions and notation

Let be the set of client points, be the service facility point, be the highway, represented by a segment whose endpoints are and . Given a point of the plane, let and denote respectively the and coordinates of . For simplicity in the explanation, we assume that no two point of share an or coordinate, but we note that our algorithms work for a the case in which points do not have this general position assumption. Also, let be the length of , and be its speed.

Figure 1: The distance model using both turnpikes (left, denoted by a thin segment and its two endpoints) and freeways (right, denoted by a thick segment); in the first case uses the turnpike from to in order to reach faster. The turnpike does not speed up transportation between and , hence is not used by . Demand point however, can either walk or use the turnpike to reach , and will need the same time in both cases. In the right we have the exact same instance, but the highway is now a freeway. Observe that in this case, point will take profit from the freeway.

Two different types of highways have been considered in the literature: freeways [3, 13] and turnpikes [6, 4]. The difference between a freeway and a turnpike is that we can only enter or exit from a turnpike at its endpoints, while we can enter and exit from a highway from any point on it. We will use the term highway to refer to either type.

Fixed the location of the facility and the endpoints of the turnpike, the distance from a demand point to is defined as , where represents the distance between two points. That is, the minimum time between either walking, using the highway in one direction or using it in the reverse direction. When the highway is a freeway, the distance is expressed as instead, see Figure 1. Whenever , we say that uses the highway to reach . Otherwise, we say that walks (or does not use ) to reach the facility.

The problem we study can be formulated as the

The 1-Center and 1-Highway problem (1C1H problem): Given a set of points and a fixed speed , locate a point (facility) and a segment highway of any orientation whose endpoints are and such that the function is minimized.

We consider the variants in which the highway’s length is fixed (and we call it the fixed length problem) or the highway can have any length (variable length). We will also consider the cases in which the highway to locate can be either a turnpike or a freeway. Thus, in total we have four variants of the problem which we denote by FL-1C1F (fixed length 1-center 1-freeway problem), VL-1C1T (variable length 1-center 1-turnpike problem), and so on. In this paper we propose efficient algorithms to solve the four variants of the problem.

2 Locating a Turnpike

In this section, we give a general algorithm to solve both variants of the 1C1H problem. We will then propose an improved method for the VL-1C1H problem.

It is easy to see that, when locating a turnpike, the highway will only be used in one direction. By using similar arguments to those given in  [11] (Lemma 2.1) we can prove that there always exists an optimal location in which one of the turnpike endpoints coincides with the facility. Therefore, throughout this section we assume that thus the distance from a demand point to is now .

Using the standard transformation from to , we solve the problem using instead. Let and be an optimal solution of a given problem instance. Let be the endpoint of other than and let . Let be the maximum of among all points not using , and be the maximum of among all points that use . Let denote the ball of center and radius with respect to the -metric. Note that is covered by the balls and , and is satisfied. Furthermore, either or can be increased, without affecting the value of the solution, so that . From these observations, the following statement can be obtained: The 1C1H problem is equivalent to finding two balls, and , such that is minimum and covers .

We partition the pointset into two sets and as follows: set contains the points whose distance to is at most . The set contains the points that must use the highway to reach in or less units of time.

Observe that we cannot have , since by reversing the positions of and we would obtain a better solution. Notice that the set can be empty (for example, if we are forced to locate an extremely long highway). However, this case can be easily detected and treated, since is the solution of the rectilinear 1-center problem [9] (which can be computed in linear time). Hence, from now on we assume that neither nor is empty.

We consider the next problem called the basic problem: Given a partition of , find the smallest value (called the radius of the partition) and the coordinates of and such that and . When we consider the fixed-length variation of the problem, we also add the constraint that and must satisfy . Since and are optimal, it is easy to see that they are the solution of the basic problem for the partition . Moreover, the radius of any other partition of will have equal or higher radius than .

Our algorithm works as follows: we consider different partitions of and solve the basic problem associated to each partition. We identify as the partition whose radius is smallest. A naive method would be to guess the partition among the candidates. In the following we reduce the search space to one of polynomial size:

Figure 2: Relative positions of the balls and . For each of the cases the sets (marked in grey) can be split from with either an axis-aligned line or an upper-left quadrant.
Lemma 1

For any set , the partition can be found among candidates


Without loss of generality we can assume that is above and to the left of . It is then easy to see that there are three possible relative positions of the two balls. In each of these cases the two sets can be split by either an axis-aligned line ( cases (a) and (b) in Figure 2) or an upper left quadrant (case (c) in Figure 2). Each possible partition is uniquely determined by the points belonging to the closed left (resp. North-West) halfplane (resp. quadrant) and the remaining points. Since there are different cases, hence the Lemma is shown. ∎

Given a set of points, let be the set containing the points with highest and lowest and coordinate of (this set is called the set of extreme points of ). We define as one half of the largest distance between any two points of . That is, the minimum radius needed so that all points of can be included in some ball. Observe that and that . For any real number , let be the locus of the centers of the axis-parallel squares of radius (i.e., balls) that cover . A similar definition can be seen in [12].

Lemma 2

For any set of points the following properties hold:

  • can be empty, a point, an axis-parallel segment, or a rectangle.

  • if and only if .

  • .

  • For any and , . Moreover, the separation between the boundaries of and is .

All these properties are easy to prove from the definition of and linearity of , thus we omit them. With these observations we can now solve the basic problem efficiently:

Lemma 3

Let be a partition of . If we are given the extreme sets and , then the basic problem can be solved in constant time (for both fixed-length and variable-length cases).


We start by giving the algorithm for the case in which the distance between and is fixed. Observe that the radius of the partition will always satisfy (otherwise an extreme point of either or will not be able to reach in units of time). If there exist two points and such that we are done.

Unfortunately, this does not always happen. In general, we must find two values such that: , there are points and satisfying , and is minimized. The values and can be found in constant time as follows:

First, set and . That is, we either increase the radius of to or increase the radius of to . By increasing the smallest radius we are ensuring that condition is satisfied. We now look for the smallest value of such that there are points and satisfying . Observe that this problem is of constant size and can be computed in time.

The variable-length variant of the problem is slightly simpler. The main difference is that and must now minimize the expression , where denotes the smallest Euclidean distance between points and a point . As before, this problem has constant size and thus can be solved in time. ∎

By combining the above results we obtain a method to solve both problems:

Theorem 2.1

Both variants of the 1C1T problem can be solved in time and space.


Recall that, by Lemma 1, we can split into sets and by either a vertical line or an upper-left quadrant. We start by considering first the case in which there is a vertical splitting line, cases (a) and (b) in Figure 2. Sort the points of in increasing value of coordinates; let be the obtained order. For any , let and be the smallest bounding axis-aligned rectangle containing points and , respectively. By scanning from left to right, we can compute and store the extreme points of for all in time. Analogously we sweep from right to left and compute in linear time as well. Then we solve the basic problem for each pair for all values using Lemma 3. The computationally speaking most expensive part of the algorithm is computing the initial sorting of the points of , which needs time.

To complete the proof it remains to show how case (c) in Figure 2 can be solved in time and space. Let be the points of sorted in decreasing order of coordinates. For any , let and be the smallest bounding rectangles of the sets and , respectively. For any fixed we can proceed as in the previous case. That is, sweep twice the pointset (downwards and upwards) and compute the set of extreme points for all . Once the bounding rectangles are known, we can solve the basic problem instances in constant time each. We repeat this algorithm for all values of and find the optimal partition in quadratic time. Observe that this method never uses more than memory, since once a column has been scanned we need only store the best partition found. ∎

2.1 Locating a turnpike of variable length

Using Theorem 2.1 we have an algorithm that runs in time for both the fixed-length and variable-length variants of the problem. The bottleneck of the algorithm is case (c) of Lemma 1. In the following we show how to treat this case more efficiently for the variable-length case.

Given , let and be the points with highest and lowest -coordinate, respectively. Analogously, and are defined with respect to the -coordinates. Without loss of generality, we assume that (that is, the width of is larger than its height).

Lemma 4

If in every optimal solution of the VL-1C1T problem each ball contains a corner of the other one, there exists an optimal solution of radius of the VL-1C1T problem in which the extreme points are in the boundary of .


Observe that if any of the balls contains both and (or and ), the sets and can be split by either a horizontal or vertical line. Since we assumed that this is not possible, the ball that contains cannot contain (analogously, the ball that contains cannot contain ). Without loss of generality, we assume that and . Observe that this implies that , and (that is, the highway and the abscissa form an angle between and ).

Assume that point is not on the boundary of . In the following we will show how to do a local perturbation to the solution so that we obtain on the boundary. We translate downwards continuously while keeping unchanged until reaches the top boundary. Observe that, since initially has higher coordinate than , the translation will reduce the distance between and until both points share the same coordinate. However, observe that this cannot happen, since otherwise we can split and with a vertical line. Moreover, no point of can leave the ball before reaches the top boundary, hence optimality is preserved through this translation operation. Analogously we can do the same operation on the other extreme points and obtain that either all extreme points are in the boundary of or find a way to split both and with a vertical or horizontal line. ∎

With this observation we can speed up the algorithm for the variable length variant of the problem:

Theorem 2.2

The VL-1C1T problem can be solved in time and space.


By Lemma 4 either there exists an axis-parallel line that splits the sets and or all extreme points are in the boundary of . The first case can be treated in time using the same approach as in Theorem 2.1, hence we focus on the latter case.

Without loss of generality, we assume that , and . In particular, this implies that and . Denote by the top-left corner of the smallest enclosing axis-aligned rectangle of . By Lemma 4 this point must also be the top-left corner of . Let be the elements of sorted in increasing distance to . Then now apply the same approach as used in cases (a) and (b) using the new ordering instead. The result thus follows. ∎

3 Freeway location

In this section we consider the case in which the highway to locate is a freeway (instead of a turnpike). Now, the travel time between a demand point and the service facility , denoted by , is equal to:

Figure 3: Illustration of the first step of the proof of Lemma 5
Lemma 5

In both variants(fixed and variable length) of the 1C1F problem there exists an optimal solution in which the facility point is located on the highway.


Let be an optimal solution and assume that does not pass through . Let be the line that passes through and has the same orientation as . Translate horizontally until it passes through , let be the obtained highway. In the following we show that the distance between any point cannot have increased in the translation process: if does not use highway , clearly we have . Otherwise enters highway at point (and leaves at ). Observe that the length of the path is the sum of lengths of the vectors , and , where the first and last vectors are measured with the metric (and the second one is inside the freeway). Note, however that the same path can be done on (see Figure 3), hence the travel time is unaffected.

If we are done, otherwise, translate along the line until it hits (let be the new highway). Analogously to the previous case, we have , hence this second location is also optimal and the result thus follows.∎

From this point forward we consider that the facility point is in . Given a potential solution , let be the lower leftmost endpoint of (and be the other endpoint). In the following we will characterize the shortest paths from any point to . Let be the shortest path connecting and . It is easy to see that if enters the freeway, it will not leave it until it reaches . Let be the point in which the paths enters the freeway (if the highway is not used in we simply define ). Observe that .

Let always denote the non-negative angle of the highway with respect to the positive direction of the -axis. Unless otherwise specified, we assume . Observe that if we can, by properties of and metrics, modify the coordinate system so that angle satisfies . For any point let be the intersection point between and the vertical line passing through (if it exists). This point is called the vertical projection of . Analogously we define as the horizontal projection. We say that a point is above if it is above the line passing through . Notice from the assumption that given and a demand point , is the nearest point to on under the metric.

The next lemma characterizes the way in which demand points move optimally to the facility. A detailed proof is given in [8] for the case in which the length is a variable. The proof can be easily adapted for the fixed length case. Let . Since we have .

Lemma 6

[8] If , the shortest path between and satisfies one of the following:

  1. If , .

  2. If , .

  3. Otherwise, .

Otherwise, and the shortest path satisfies:

  1. if and , .

  2. if and , .

  3. if and is above , .

  4. if and is below , .

  5. if and is above , .

  6. if and is below , .

  7. if and , .

  8. if and , .

Corollary 1

For any optimal solution in which and , the ball (with respect to the metric ) of radius centered at is a convex polygon with at most eight faces.

Figure 4: Shortest path map of . Case corresponds to the case in which (and when ). In each of the cases, the space has been partitioned into regions such that the shortest path of any two points in the same region is equivalent. Region corresponds to the case in which the -th rule of Lemma 6 is used, respectively. The dashed lines in (a) depict the refinement needed so as to certify that the distance function to is bivariate linear in each region.

Figure 4 illustrates Lemma 6. Observe that if , the distance between and a point in a fixed region () is a bivariate linear function whose coefficients of this function only only depend on and the slope of . However, the same result does not occur when . This is due to the fact that the partition into regions does not distinguish between the cases in which is above/below or to the left/right of . For simplicity in the explanation, from now on we further refine the three regions into eight regions so that the distance in each sub-region also is a bivariate piecewise linear function. This can be done by adding a vertical line passing through and two horizontal rays emanating outwards from and , see Figure 4(a).

That is, in either case, the plane can be partitioned into eight regions such that, for any , the distance between and a point in is a bivariate linear function. Given a slope and , let be and coefficients of the distance function between the points in region and . Also, let be the additive term of the distance function (that is, for all ).

We extend these functions to the plane and say that is the -th extreme point if maximizes among all points of (pick any arbitrarily if many exist). We also define as the set of -extremes (for all ). Observe that . In general we need not have that the -th extreme belongs to the region . However, we will show that we can ignore non-extreme points:

Figure 5: Proof of Lemma 7: point cannot be contained in the interior of ball (depicted in gray) and in the halfplane (dashed).
Lemma 7

Let be an optimal solution of the 1C1F-problem for a set of points, and let be the slope of . The location of and only depends on .


For any , let denote the ball (with respect to the metric induced with highway ) centered at of radius . In the following we show that if for some , we also have . Thus, if we know the orientation of beforehand we can disregard all non-extreme points of . Let be a non-extreme point, be the region in which belongs to, and be the -th extreme of . Assume that there exists some such that but . By definition we have , so we increase the radius of the ball until is on the boundary. As a result, must be in the interior of . Let be the value such that the line passes through . We also define as the halfplane containing the points on or below , and as the opposite halfplane. Without loss of generality, we can assume that is in . Observe that, since is the extreme point with respect to and , we have (otherwise would be extreme instead).

By Corollary 1, the ball is convex. More importantly, since , the line tangent to at must be line . In particular, the ball is contained in the halfplane . However, we have a contradiction, since cannot be an interior point to and on (see Figure 5).∎

The above observation gives us a method to locate a freeway efficiently:

Theorem 3.1

Both variants of the 1C1F problem can be solved in time and space.


We will solve the problem using a variation of the rotating calipers technique. This technique was already used in highway location problems in [2]. Although the metric considered was slightly simpler, the details are analogous. For simplicity in the explanation, we first consider the fixed length variant.

If the orientation of is known, we can compute the set and use Lemma 7. Once this set is known, the problem can be solved in constant time. Since we not know the orientation of , we will use rotating calipers. That is, we start with (i.e., a horizontal line), rotate the line and keep track of the changes of the set .

Let be an interval of orientations in which set of does not change (i.e., , for any ). For any such interval, the problem is of constant size, hence can be solved in constant time. In the following, we will show that the region can be partitioned into a small number of intervals in which the set does not change.

Observe that, as goes from to , the associated coefficients and either remain constant (such as in regions and ) or are monotone. In particular, a point of can only be extreme with respect to the -th region in an interval of orientations. That is, any single point of can generate a constant number of events in which the set changes, hence the region will be split into at most intervals. The most expensive part of the algorithm (computationally speaking) is computing the convex hull, which takes time.

Finally we comment the case in which we are allowed to locate a freeway of variable length. Since increasing the length of the freeway can only decrease the travel time between two points, we can also assume that the highway has infinite length (i.e., we are locating a line instead of a segment). Thus, we simply fix a sufficiently large value and then execute the algorithm for the fixed length. ∎

Corollary 2

If the highway’s orientation is fixed, both variants of the Free-1C1F problem can be solved in time and space.

We complete the problem by giving a matching lower bound:

Theorem 3.2

In the algebraic decision tree model both variants of the 1C1F need time.


Proof of this claim follows from the fact that, in the particular case in which , the solution to either variant is equivalent to finding the strip of minimum width that contains a given set of points. Since this problem is known to need time [15], the same fact holds for the 1C1F problem. ∎

Turnpike fixed
Freeway fixed

4 Concluding Remarks

In this paper we have considered several variants of the facility location problem introduced in [11]. Two models for the minmax criterion have been addressed, the turnpike case, in which we only allow entering and leaving the highway at its endpoints, and the freeway case, in which one is allowed to enter and leave at any point. All our results are summarized in Table 1.

The main open problem is to know whether or not the FL-1C1T variant can be solved in time. One would think that this problem is similar to Rectilinear 2-center [5, 9]. Unfortunately, the crucial property for solving the Rectilinear 2-center in linear time (both covering boxes are contained in the smallest enclosing axis-parallel rectangle of the points) is not always true in our case. Refer to Figure 6. A similar example can be done to show that the FL-1C1T-problem is not of LP-Type.

Figure 6: Neither of the two squares is contained in the smallest enclosing axis-parallel rectangle, and no extreme point lies on the boundary of their union.


  • [1] M. Abellanas, F. Hurtado, C. Icking, R. Klein, E. Langetepe, L. Ma, B. Palop, and V. Sacristán. Voronoi diagram for services neighboring a highway. Inf. Process. Lett., 86:283–288, 2003.
  • [2] H-K. Ahn, H. Alt, T. Asano, S. W. Bae, P. Brass, O. Cheong, C. Knauer, H-S. Na, C-S. Shin, and A. Wolff. Constructing optimal highways. Int. J. Found. Comput. Sci., 20(1):3–23, 2009.
  • [3] O. Aichholzer, F. Aurenhammer, and B. Palop. Quickest paths, straight skeletons, and the city Voronoi diagram. Discrete Comput. Geom., 31(1):17–35, 2004.
  • [4] S. W. Bae, M. Korman, and T. Tokuyama. All farthest neighbors in the presence of highways and obstacles. In Proc. of the 3rd Inter. Workshop on Algorithms and Computation, WALCOM’09, pages 71–82, Heidelberg, 2009.
  • [5] S. Bespamyatnikh and M. Segal. Rectilinear static and dynamic discrete 2-center problems. In Proc. of the 6th Inter. Workshop on Algorithms and Data Structures, WADS ’99, pages 276–287, London, 1999.
  • [6] J. Cardinal, S. Collette, F. Hurtado, S. Langerman, and B. Palop. Optimal location of transportation devices. Comput. Geom. Theory Appl., 41:219–229, 2008.
  • [7] J. M. Díaz-Báñez, M. Korman, P. Pérez-Lantero, and I. Ventura. Locating a service facility and a rapid transit line. In Proc. of the 14th Spanish Meeting on Computational Geometry, pages 189–192, 2011.
  • [8] José Miguel Díaz-Báñez, Matias Korman, Pablo Pérez-Lantero, and Inmaculada Ventura. Locating a single facility and a high-speed line. CoRR, abs/1205.1556, 2011.
  • [9] Z. Drezner. On the rectangular -center problem. Naval Research Logistics (NRL), 34(2):229–234, 1987.
  • [10] Z. Drezner and H. W. Hamacher. Facility location – applications and theory. Springer, 2002.
  • [11] I. Espejo and A. M. Rodríguez-Chía. Simultaneous location of a service facility and a rapid transit line. Comput. Oper. Res., 38:525–538, 2011.
  • [12] P-H. Huang, Y. T. Tsai, and C. Y. Tang. A fast algorithm for the alpha-connected two-center decision problem. Inf. Process. Lett., 85:205–210, 2003.
  • [13] M. Korman and T. Tokuyama. Optimal insertion of a segment highway in a city metric. In Proc. of the 14th Inter. Conference on Computing and Combinatorics (COCOON’08), LNCS, pages 611–620, 2008.
  • [14] J. A. Laporte, G. Mesa and F. A. Ortega. Optimization methods for the planning of rapid transit systems. European Journal of Operational Research, 122:1–10, 2000.
  • [15] D. T. Lee and Y. Wu. Geometric complexity of some location problems. Algorithmica, 1:193–211, 1986. 10.1007/BF01840442.
  • [16] F. Plastria. Continuous location problems. In Z. Drezner, editor, Facility location: A survey of applications and methods, pages 225–262. Springer, 1995.
  • [17] J.-M. Robert and G. Toussaint. Computational geometry and facility location. In Proc. Inter. Conference on Operations Research and Management Science, pages 11–15, 1990.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description