# Noniterative Solution of Some Fermat-Weber Location Problems

Authors: Reuven Chen
Journal: Advances in Operations Research
 (2011)

---

## Abstract

The Fermat-Weber problem of optimally locating a service facility in the Euclidean continuous two-dimensional space is usually solved by the iterative process first suggested by Weiszfeld or by later versions thereof. The methods are usually rather efficient, but exceptional problems are described in the literature in which the iterative solution is exceedingly long. These problems are such that the solution either coincides with one of the demand points or nearly coincides with it. We describe a noniterative direct alternative, based on the insight that the gradient components of the individual demand points can be considered as pooling forces with respect to the solution point. It is demonstrated that symmetrical problems can thus be optimally solved with no iterations, in analogy to finding the equilibrium point in statics. These include a well-known ill-conditioned problem and its variants, which can now be easily solved to optimality using geometrical considerations.


---

## Body

## 1. Introduction

The modern problem of finding the optimal location of a service facility with respect to a given set of demand points has emerged from an old geometrical problem. According to Kuhn [1], it was first posed by Fermat early in the 17th century. Torriceli was the first to suggest a geometrical construction for the solution (see Krarup and Vajda [2]), and apparently Steiner solved it again in the 19th century. The problem states: given three noncollinear points, find a point such that the sum of distances to the given points is minimal. The solution is that if all the angles in the triangle formed by the three given points are smaller than 120°, the optimal location is the point from which lines, drawn radially to each demand point, form three 120° angles. Geometrical methods for finding this point were given in the literature (see, e.g., the Georg Pick Mathematical Appendix to the book by Weber [3], Wesolowsky [4], and Martini [5]). If the triangle contains an angle greater than or equal to 120°, then the optimal location is at that vertex. When more than 3 demand points are involved and when different demand points may have different weights, the problem is to minimize the cost function(1.1)f(x,y)=∑i=1mwiri(x,y),
where m is the number of given points, wi is the weight of the ith point, and ri(x,y)=[(x-xi)2+(y-yi)2]1/2, the Euclidean distance between the ith point with coordinates (xi,yi) and the point to be located (x,y). The problem is often termed the Weber problem, following an important work by Weber [3].In order to study the properties of the solution, one can write the first derivatives of (1.1), namely,(1.2)∂f∂x=∑i=1mwi(x-xi)ri,∂f∂y=∑i=1mwi(y-yi)ri.
A necessary condition for a point (x,y) to be a solution is that the sums in (1.2) be equal to zero. Moreover, since the cost function (1.1) is known to be convex (see, e.g., [6]), if there is a local minimum, it must be a global one. Thus, the main aim is to find a point in which ∂f/dx=∂f/dy=0, which will be the optimal solution of the problem.Setting (1.2) to zero yields(1.3)x=∑i=1m[wixi/ri(x,y)]∑i=1m[wi/ri(x,y)],y=∑i=1m[wiyi/ri(x,y)]∑i=1m[wi/ri(x,y)].
These equations cannot be solved in closed form, and Weiszfeld [7] suggested an iterative process based on (1.3) (see also the English translation, Weiszfeld and Plastria [8]). Weiszfeld described the iteration scheme as(1.4)xN+1=∑i=1m[wixi/ri(xN,yN)]∑i=1m[wi/ri(xN,yN)],yN+1=∑i=1m[wiyi/ri(xN,yN)]∑i=1m[wi/ri(xN,yN)].
Different suggestions for the first guess for (x0,y0) have been given, the “center of gravity” being quite popular. Ostresh [9] and others (see, e.g., [10, 11]) have pointed out that, in fact, Weiszfeld’s method is a steepest descent method, namely, going in the direction given by (1.2), when the step size is determined by the denominator in (1.4). Ostresh has also shown that in many cases, doubling the step size expedites the iterative procedure. Special cases in which the Weiszfeld method does not converge efficiently to the optimal solution have been reported [1, 12–16]). These included cases in which the solution coincided or nearly coincided with one of the demand points. Katz [13] has shown that in cases where the optimal solution coincides with a demand point, the convergence may be sublinear; in some cases, this may result in an extremely slow convergence of the Weiszfeld process, as described in the third example below. Some remedies have been suggested to improve the convergence (e.g., [17–19]).In some cases, the iterative procedure lands on a demand point which is not the optimum, and since the function is not differentiable at such point, the process cannot proceed. It should be pointed out that Ostresh [9] showed that this problem can be solved in most cases by identifying that the demand point where the solution point is stuck is not the optimal solution, moving away from it and continuing the Weiszfeld iterations. In this context, let us mention a conjecture by Chandrasekaran and Tamir [20] stating that “if the convex hull of the set of vertices is of full dimension, then the set of initial points for which the sequence generated by the Weiszfeld algorithm lands in a vertex is denumerable.” Brimberg [21] has attempted to resolve the open question of Chandrasekaran and Tamir by an analysis of the Jacobian matrix of the iteration function. He concludes that having a convex hull of full dimension is both a necessary and sufficient condition for the set to be denumerable. Cánovas et al. [16] refuted this result by providing counter examples. In a later work, Brimberg [22] resolves the problem. He shows that when the convex hull of the fixed points is contained in an affine subspace of Rn, the set of starting points that terminate the Weiszfeld algorithm prematurely at a fixed point is nondenumerable under these general conditions. However, when the convex hull has full dimension n, this set is guaranteed to be denumerable. Thus, the open question posed by Chandrasekaran and Tamir [20] is reclosed.Note that several authors (e.g., [7]) showed that a demand point k is the optimal minimum location if and only if its weight is larger than the norm of the vector sum of the individual gradient elements of the other demand points at the location of point k,(1.5)[(∑i=1,i≠kmwi(xi-xk)ri(xk,yk))2+(∑i=1,i≠kmwi(yi-yk)ri(xk,yk))2]1/2≤wk.
As pointed out by Chen [23], one may consider the mechanical analog in which f(x,y) in (1.1) is looked upon as a scalar field analogous to the potential in a gravitational or an electric field. The first derivatives in (1.2) can be regarded as the x and y components of the resultant force acting on the service point which is to be located optimally. From the “physical” point of view, an object is placed in a force field having m attracting points distributed in the two-dimensional space. The object is attracted to each of the given points, the attraction toward the ith point being proportional to the weight of the point wi. The direction of the force component is along the line connecting the particle and the i-th point. As mentioned by Chen [23] and Wesolowsky [4], the strength of this force element is not dependent on the distance between the particle and the demand point. The problem is that of finding a stationary point for the particle in this field. As opposed to the cases of electrical and gravitational fields where no such stationary point exists, a minimum point always exists under the present circumstances.It has been mentioned that one of the possibilities is that the solution coincides with one of the demand points. Since the cost function is not differentiable at a demand point, this may cause difficulty if the iterative process steps into a demand point, be it the optimum or not. The possibility of a coincidence of the solution with a demand point has been discussed by Katz [12], Kuhn [1], and others. Katz suggested to first check each demand point for optimality using (1.5) before proceeding with the iterations, and only if none of the demand points is found to be the optimum, should the iterative process be started.In the next section, we briefly describe the mechanical analog to the Weber problem and then proceed to the class of problems which can be solved noniteratively, using the concept of the attractive force and a specific symmetry of the problem.


## 2. The Mechanical Analog

In the Mathematical Appendix to the book by Weber [3], Pick describes an analog device previously invented by Varignon to solve the Weber problem (see also Wesolowsky [4]). His approach was mainly intuitive, but the rationale behind it was practically the same as that mentioned above of the potential field and the force concepts. A map of the area in question is placed on a board, and holes are drilled in the points where the demand locations are. Strings are passed through the holes, and weights proportional to the economic “weights” are hung on them. The other edges of the strings are tied together. It is quite obvious that the stationary situation reached after possibly a few oscillations is the equilibrium point, namely, the solution of the minimization problem. Obviously, the accuracy of the method is limited by the friction of the strings in the holes, and, in fact, it looks quite primitive when the alternative of an efficient numerical procedure is available. However, the mechanical analog gives an insight to the properties of the solution.As explained, the force elements due to each of the demand points are radial in direction, but independent of the distance between the demand point and the location of the service facility. An interesting implication of this fact is that once the location of the solution is known, it is in fact also the solution of other problems in which each demand point can be anywhere along the ray connecting the service facility point and the demand point, and without changing its weight (see [4, 23]). Of course, this does not help in solving the problem, but it does give some understanding of the sensitivity of the solution to changes in the location of the demand point.


## 3. Noniterative Solution of Some Weber Problems

As pointed out above, one kind of Weber problem that can be solved noniteratively is the scenario where the solution coincides with a demand point. In the present context, this takes place when the weightwk of a demand point at (xk,yk) is larger than the resultant of all the other forces (for all i≠k) at (xk,yk) (see, e.g., [10, 23–25]). In the present work, we concentrate on direct solutions in which the service point does not coincide with a demand point. Obviously, this is an equilibrium point where the sum of the pulling forces is nil. The considerations made are very similar to those made in mechanical statics.The first example is a problem given by Kuhn [1] to demonstrate the possibility that the Weiszfeld method does not converge at all to the optimal solution. The problem with four vertices in the plane is shown in Figure 1. Two demand points with weights w1=w2=5 are on the x-axis at A1(20,0) and A2(59,0), and two other demand points with w3=w4=13 are at A3(-20,-48) and A4(-20,48). Kuhn [1] shows that if the starting point for the iterations is (x0,y0)=(44,0), the Weiszfeld step takes us to the demand point A1, which is not the optimum, and gets “stuck” there. As pointed out by Kuhn, the optimal solution is at the origin, (0,0). Let us show that by the use of the force concept, this result can be easily reached. From the symmetry of the problem, it is quite obvious that the solution is on the x-axis. It is also obvious that it cannot be to the right of A2 since all the weights are pulling it to the left. Considering points between A1 and A2, we can readily see that the forces of these demand points counterbalance each other, but A3 and A4 have force components that pull to the left. It is thus obvious that the solution must be between −20 and 20, at a point denoted (X,0). The force exerted by A3 is of 13 units along the line connecting it to (X,0), and it has a horizontal component of 13cosα to the left, and the same is true for A4. The solution point should be, as stated above, an equilibrium point where the resultant force is nil. With the given weights the components of the forces along the x-axis must be balanced, namely, (3.1)2⋅13⋅cos⁡α=2⋅5,
which yields cosα=5/13. From the lower triangle, it is clear that tanα=48/(X+20). From a basic trigonometric identity, tanα=sinα/cosα=1-cos2α/cosα=1-(5/13)2/(5/13)=12/5. Thus, we get 48/(X+20)=12/5, which immediately yields X=0, namely, the solution is at the origin.Figure 1The second example has a similar symmetry, but it seems to give a deeper insight into the possibilities of getting the solution noniteratively for symmetric problems. As shown in Figure2, two equal-weight (w) demand points are located at A1(0,a) and A2(0,-a). Two other demand points are located on the x-axis, at A3(a,0) and A4(-a,0), with weights of w3 and w4, respectively. Without loss of generality, we can assume that w4>w3. Due to the symmetry, the optimal solution is expected to be on the positive side of the x-axis, and we are looking for the solution (X,0), the location of the solution on the x-axis. The pulling force of A1 is w, and its component along the x-axis is w·cosα to the left.Figure 2The same is true for A2, so together, they exert a force of 2w·cosα to the left whereas the two y-components cancel each other. The resultant force of the two weights on the x-axis is w4-w3. Therefore, the equilibrium condition is(3.2)2wcos⁡α=w4-w3.
From the lower triangle, it is evident that(3.3)cos⁡α=XX2+a2,
and from (3.2) and (3.3), we can write by eliminating cosα(3.4)XX2+a2=w4-w32w.
By simple algebra,(3.5)X=a(w4-w3)2/4w21-(w4-w3)2/4w2.
Obviously, if w and w3 are kept constant and w4 is increased, the solution point moves to the right. The value of X=a is reached when the expression under the square root equals one, which occurs when(3.6)w=w4-w32.
According to the previous discussion, for larger values of w4, the solution point remains at A4(a,0).Similar considerations apply for other problems, where, for example, A1 and A2 are on the y-axis in a symmetric manner. Also for given values of w3 and w4, the demand points A3 and A4 can be moved along the x-axis (provided A3 is still on the negative side and A4 on the positive side), and the solution does not change. The only difference may relate to the end point associated with (3.6). When w4-w3 gets larger, the solution point “gets stuck” at A4. If A4 is located farther to the right, using (3.5), we can see, for example, that the condition for the solution to coincide with A4 located at (2a,0) is(3.7)w=54(w4-w3).
Since 5/4 is smaller than 1/2, w4-w3 should get larger for a given w before the solution lands at w4.Similar considerations can be made for problems with more demand points along thex-axis and more pairs of points placed symmetrically with respect to the x-axis.We turn now to a problem presented by Drezner [14, 17] which is extremely difficult for the Weiszfeld algorithm. This is shown (not to scale) in Figure 3. It consists of five demand points, four located at the four corners of a unit square, (0,0), (0,1), (1,0), and (1,1) with weight of 1 each and a fifth point located at (100,100) with weight of 4. The solution is known to coincide with the latter demand point, but the Weiszfeld procedure requires millions of iterations to get within 0.001 of the optimum. Methods for improving this have been suggested, but we would like to show here that using the forces concept and the symmetry, for this problem and some interesting variants, the solution can be found noniteratively.Figure 3From the symmetry, it is evident that the solution should be along the diagonal. If we consider points on the diagonal close to the point at(100,100), the latter exerts a force of 4 units upward along the diagonal. The weights at (0,0) and (1,1) exert a unity force downwards along the diagonal. Each of the other points, at (0,1) and (1,0), exerts a force of unity along the line connecting it with (100,100), and its component along the diagonal is slightly smaller than unity. Thus, no matter how close we are to (100,100), the total force downwards along the diagonal is slightly smaller than 4, and the solution point is pulled towards (100,100) and it ends up at this point.Let us consider now what happens in cases where the weight at(100,100) is slightly smaller than 4. One can imagine that from a certain weight down, the solution will be somewhere along the diagonal, between (1,1) and (100,100). Let us denote any point along the diagonal by (a,a) where 1<a<100. Consider the angle θ shown in Figure 3. It is easily seen that(3.8)tanθ=2/2a2-2/2=12a-1.
Using the trigonometric identity(3.9)1cos⁡2⁡θ=1+tan2⁡θ,
we get(3.10)cos⁡θ=2a-14a2-4a+2.
The components of the weights at (1,0) and (0,1) along the diagonal are (1+1)cosθ, and therefore, we can write their contribution to the force downward along the diagonal as(3.11)F(a)=2cos⁡θ=2(2a-1)4a2-4a+2.
For a=100, we get F(100)=1.99997475 (the angle here is denoted by θ100 in Figure 3). Note that the total pulling force downward along the diagonal is 3.9999475 due to the additional unity weights at (0,0) and (1,1). Since θ gets larger for decreasing a, F(a) is a slowly increasing function (for larger a, θ gets smaller and 2cosθ gets larger). If w(100,100) is less than 3.99997475, there will be a point of equilibrium on the diagonal for a<100. In order to find this point for a given value of the weight w(100,100), let us invert the function F(a). For F(a)=k, where k=w(100,100), let us find a(k). This will be the point (a,a) along the diagonal where the forces of all the demand points balance. Starting from(3.12)k=2(2a-1)4a2-4a+2,
we readily get(3.13)a=1+k1/(4-k2)2.
By insertion, we get, for example, a(1.999)=16.3; a(1.9999)=50.5; a(1.9999747)=99.9. These, of course, are related to weights of 3.999, 3.9999, and 3.9999747, respectively at (100,100). To conclude this example, if the weight of the demand point at (100,100) is larger than 3.99997475, this point is the optimum. If the weight at (100,100) is slightly less than 3.99997475 (k slightly less than 1.99997475), the solution is on the diagonal, between (1,1) and (100,100), a can be determined by (3.13), and no iterations are required. Note that for the solution to be at (1,1), that is, a=1, one gets k=2; therefore, for a weight of 2+2 or lower, down to 2 at (100,100), the solution coincides with the demand point at (1,1). For a weight smaller than 2 at (100,100), the solution point is pulled further down along the diagonal. For a weight of zero at (100,100), the solution will be at (0.5,0.5).


## 4. Conclusion

By the use of the concept of virtual forces, the components of the gradient of the objective function in the Fermat-Weber problem, some problems of this kind can be solved directly, with no iterations. A number of examples in which the demand points are distributed symmetrically with respect to some axis are shown. This includes problems for which the known iterative procedures perform poorly. In particular, the problem given in Figure3 is of interest. Here, due to the special geometry of the problem, very minute changes in the weight of the demand point at (100,100) cause large changes in the optimal location on the diagonal. This special property seems to be associated with the exceedingly large number of iterations needed to reach the minimum by using the Weiszfeld method.



---

*Source: 379505-2011-07-18.xml*