1 Introduction

THE FERMAT-TORRICELLI PROBLEM IN THE LIGHT OF

CONVEX ANALYSIS

[2ex] Nguyen Mau Nam1

Abstract. In the early 17th century, Pierre de Fermat proposed the following problem: given three points in the plane, find a point such that the sum of its Euclidean distances to the three given points is minimal. This problem was solved by Evangelista Torricelli and was named the Fermat-Torricelli problem. A more general version of the Fermat-Torricelli problem asks for a point that minimizes the sum of the distances to a finite number of given points in . This is one of the main problems in location science. In this paper, we revisit the Fermat-Torricelli problem from both theoretical and numerical viewpoints using some ingredients of of convex analysis and optimization.

Key words. Fermat-Torricelli problem, Weiszfeld’s algorithm, Kuhn’s proof, convex analysis, subgradients

AMS subject classifications. 49J52, 49J53, 90C31.

## 1 Introduction

The Fermat-Torricelli problem asks for a point that minimizes the sum of the distances to three given points in the plane. This problem was proposed by Fermat and solved by Torricelli. Torricelli’s solution states as follows: If one of the angles of the triangle formed by the three given points is greater than or equal to , the corresponding vertex is the solution of the problem. Otherwise, the solution is a unique point inside of the triangle formed by the three points such that each side is seen at an angle of . The first numerical algorithm for solving the general Fermat-Torricelli problem was introduced by Weiszfeld in 1937 . The assumptions that guarantee the convergence along with the proof were given by Kuhn in 1972. Kuhn also pointed out an example in which the Weiszfeld’s algorithm fails to converge; see . The Fermat-Torricelli problem has attracted great attention from many researchers not only because of its mathematical beauty, but also because of its important applications to location science. Many generalized versions of the Fermat-Torricelli and several new algorithms have been introduced to deal with generalized Fermat-Torricelli problems as well as to improve the Weiszfeld’s algorithm; see, e.g., [2, 9, 10, 12, 16, 17]. The problem has also been revisited several times from different viewpoints; see, e.g., [4, 5, 13, 19] and the references therein. In this picture, our goal is not to produce any new result, but to provide easy access to the problem from both theoretical and numerical aspects using some tools of convex analysis. These tools are presented in the paper by elementary proofs that are understandable for students with basic background in introduction to analysis.

The paper is organized as follows. In Section 2, we proof the existence and uniqueness of the optimal solution. We also present the proofs of properties of the optimal solution as well as its its construction using convex subdifferential. The advantage of using convex analysis when solving the Fermat-Torricelli problem has been observed in many books on convex and nonsmooth analysis; see, e.g., [3, 7, 15] and the references therein. Section 3 is devoted to revisiting Kuhn’s proof of the convergence of the Weiszfeld’s algorithm. In this section we follow the theme to proof the convergence given by Kuhn , but we include some ingredients from convex analysis to replace for some technical tools in order to make the proof more clear.

Throughout the paper, denotes the closed unit ball of ; denotes the closed ball with center and radius .

## 2 Elements of Convex Analysis and Properties of Solutions

In this section, we review important concepts of convex analysis to study the classical Fermat-Torricelli problem as well as the problem in the general form. We also present element proofs for some properties of optimal solutions of the problem. More details of convex analysis can be found, for instance, in .

Let be the Euclidean norm in . Given a finite number of points for in , define

 φ(x):=m∑i=1∥x−ai∥. (2.1)

Then the mathematical model of the Fermat-Torricelli problem is

 \rm minimize φ(x)\rm subject to x∈Rn. (2.2)

The weighted version of the problem can be formulated and treated by a similar way.

Let be an real-valued function. The epigraph of is a subset of defined by

 epi f:={(x,α)∈Rn+1∣∣x∈Rn and α≥f(x)}.

The function is called convex if

 f(λx+(1−λ)y)≤λf(x)+(1−λ)f(y) % for all x,y∈Rn and λ∈(0,1).

If this equality becomes strict for , we say that is strictly convex. We can prove that is a convex function on if and only if its epigraph is a convex set in .

It is clear that the function given by (2.1) is a convex function.

###### Proposition 2.1

Let be a convex function. Then has a local minimum at if and only if has an absolute minimum at .

Proof: We only need to prove the implication since the converse is trivial. Suppose that has a local minimum at . Then there exists with

 f(u)≥f(¯x) for all u∈IB(¯x;δ).

For any , one has that . Thus, when is sufficiently large. It follows that

 f(¯x)≤f(xk)≤(1−1k)f(¯x)+1kf(x).

This implies

 1kf(¯x)≤1kf(x),

and hence . Therefore, has an absolute minimum at .

###### Proposition 2.2

The solution set of the Fermat-Torricelli problem (2.2) is nonempty.

Proof: Let . Then is a nonnegative real number. Let be a sequence such that

 limk→∞φ(xk)=m.

By definition, there exists satisfying

 ∥xk−a1∥≤φ(xk)≤m+1\rm for all k≥k0.

This implies . Thus, is a bounded sequence, so it has a subsequence that converges to . Since is a continuous function,

 φ(¯x)=limℓ→∞φ(xkℓ)=m.

Therefore, is an optimal solution of the problem.

For two different points , the line containing and is the following set:

 L(a,b):={ta+(1−t)b|t∈R}.
###### Proposition 2.3

Suppose that for do not lie on the same line (not collinear). Then the function given by (2.1) is strictly convex and the Fermat-Torricelli problem (2.2) has a unique solution.

Proof: Define for . Then . For any and , one has

 φi(λx+(1−λ)y)≤λφi(x)+(1−λ)φi(y)\rm for i=1,…,m.

This implies

 φ(λx+(1−λ)y)≤λφ(x)+(1−λ)φ(y). (2.3)

On the contrary, suppose is not strictly convex. It means that there exist with and for which (2.3) holds as equality. Then

 φi(λ¯x+(1−λ)¯y)=λφi(¯x)+(1−λ)φi(¯y)\rm for i=1,…,m.

Thus,

 ∥λ(¯x−ai)+(1−λ)(¯y−ai)∥=∥λ(¯x−ai)∥+∥(1−λ)(¯y−ai)∥\rm for i=1,…,m.

If and , then there exists such that

 tiλ(¯x−ai)=(1−λ)(¯y−ai).

Thus, , where . Since , one has , and

 ai=11−γ¯x−γ1−γ¯y∈L(¯x,¯y).

In the case where or , it is obvious that . We have proved that for , which is a contradiction.

An element is called a subgradient of a convex function at if it satisfies the inequality

 f(x)≥f(¯x)+⟨v,x−¯x⟩ for all x∈Rn,

where stands for the usual scalar product in . The set of all subgradients of at is called the subdifferential of the function at and is denoted by .

Directly from the definition, one has the following subdifferential Fermat rule:

 f has an absolute minimum at ¯x if and only if 0∈∂f(¯x). (2.4)

The proposition below shows that the subdifferential of a convex function at a given point reduces to the gradient at that point when the function is differentiable.

###### Proposition 2.4

Suppose that is convex and Fréchet differentiable at . Then

 ⟨∇f(¯x),x−¯x⟩≤f(x)−f(¯x) for all % x∈Rn. (2.5)

Moreover, .

Proof: Since is Fréchet differentiable at , by definition, for any , there exists such that

 −ϵ∥x−¯x∥≤f(x)−f(¯x)−⟨∇f(¯x),x−¯x⟩≤ϵ∥x−¯x∥\rm whenever ∥x−¯x∥<δ.

Define

 ψ(x)=f(x)−f(¯x)−⟨∇f(¯x),x−¯x⟩+ϵ∥x−¯x∥.

Then for all . Since is a convex function, for all . Thus,

 ⟨∇f(¯x),x−¯x⟩≤f(x)−f(¯x)+ϵ∥x−¯x∥for all x∈Rn.

Letting , one obtains (2.5).

Equality (2.5) implies that . Take any , one has

The Fréchet differentiability of also implies that for any , there exists such that

 ⟨v−∇f(¯x),x−¯x⟩≤ϵ∥x−¯x∥ % whenever ∥x−¯x∥<δ.

It follows that , which implies since is arbitrary. Therefore, .

The subdifferential formula for the norm function in the next example plays a crucial role in our subsequent analysis to solve the Fermat-Torricelli problem.

###### Example 2.5

Let , the Euclidean norm function on . Then

 ∂p(x)=⎧⎨⎩IBif x=0,{x∥x∥}otherwise.

Since the function is Fréchet differentiable with for , it suffices to prove the formula for . By definition, an element is a subgradient of at if and only if

 ⟨v,x⟩=⟨v,x−0⟩≤p(x)−p(0)=∥x∥\rm for all% x∈Rn.

For , one has . This implies or . Moreover, if , by the Cauchy-Schwarz inequality,

 ⟨v,x−0⟩=⟨v,x⟩≤∥v∥∥x∥≤∥x∥=p(x)−p(0)\rm for all x∈Rn.

It follows that . Therefore, .

Solving the Fermat-Torricelli problem involves using the following simplified subdifferential rule for the sum of a nondifferentiable function and a differentiable function. A more general formula holds true when all of the functions involved are nondifferentiable.

###### Proposition 2.6

Suppose that for are convex functions and is differentiable at . Then

 ∂(f1+f2)(¯x)=∂f1(¯x)+∇f2(¯x). (2.6)

Proof: Fix any . For any , one has

 ⟨v,x−¯x⟩≤f1(x)−f1(¯x)+f2(x)−f2(¯x)=f1(x)−f1(¯x)+⟨∇f2(¯x),x−¯x⟩+o(∥x−¯x∥).

For any , there exists such that

 0≤⟨∇f2(¯x)−v,x−¯x⟩+f1(x)−f1(¯x)+ϵ∥x−¯x∥\rm for x∈IB(¯x;δ).

The convexity of implies that this is true for all . Letting , one has

 0≤⟨∇f2(¯x)−v,x−¯x⟩+f1(x)−f1(¯x)\rm for x∈Rn.

By definition, , and hence We have proved the inclusion .

The opposite inclusion follows from the definition.

Let us now use subgradients of the norm function to derive Torricelli’s solution for the Fermat-Torricelli problem. Given two nonzero vectors and , define

 cos(u,v)=⟨u,v⟩∥u∥∥v∥.

For , let

 vi=¯x−ai∥¯x−ai∥,i=1,2,3.

Geometrically, is the unit vector pointing in the direction from the vertex to . Observe that the classical Fermat-Torricelli problem always has a unique solution even if three given points are on the same line. In the latter case, the middle point is the solution of the problem.

###### Proposition 2.7

Consider the Fermat-Torricelli problem given by three points .
(i) Suppose . Then is the solution of the problem if and only if

 cos(v1,v2)=cos(v2,v3)=cos(v3,v1)=−1/2.

(ii) Suppose , say . Then is the solution of the problem if and only if

 cos⟨v2,v3⟩≤−1/2.

Proof: (i) In this case, the function given by (2.1) is Fréchet differentiable at . Since is convex, is the solution of the Fermat-Torricelli problem if and only if

 ∇φ(¯x)=v1+v2+v3=0.

Since for , one has

 ⟨v1,v2⟩+⟨v1,v3⟩=−1 ⟨v2,v1⟩+⟨v2,v3⟩=−1 ⟨v3,v1⟩+⟨v3,v2⟩=−1.

Solving this system of equations yields

 ⟨vi,vj⟩=cos(vi,vj)=−1/2\rm for i≠j,i,j∈{1,2,3}.

Moreover, if for , , then

 ∥v1+v2+v3∥2=3∑i=1∥vi∥+3∑i,j=1,i≠j⟨vi,vj⟩=0.

It follows that .
(ii) By the subdifferential Fermat rule (2.4) and the subdifferential sum rule (2.6), is the solution of the Fermat-Torricelli problem if and only if

 0∈∂φ(a1)=IB+v2+v3.

This is equivalent to or . Since and are unit vectors, we obtain

 ⟨v2,v3⟩=cos(v2,v3)≤−1/2.

The proof is now complete.

###### Example 2.8

Let us discuss the construction of the solution of the Fermat-Torricelli problem in the plane. Consider the Fermat-Torricelli problem given by three points , , and as in the figure above. If one of the angles of the triangle is greater than or equal to , then the corresponding vertex is the solution of the problem by Proposition 2.7 (ii). Let us consider the case where non of the angles of the triangle is greater than or equal to . Construct two equilateral triangles and and let be the intersection of and as in the figure. Two quadrilaterals and are convex, and hence lies inside the triangle . It is clear that two triangles and are congruent (SAS). A rotation of about maps the triangle to the triangle . The rotation maps to , so . Let be the image of though this rotation. Then belongs to . It follows that . Moreover, , and hence . It is now clear that and . By Proposition 2.7 (i), the point is the solution of the problem. ## 3 The Weiszfeld’s Algorithm

In this section, we revisit Kuhn’s proof  of the convergence of the Weiszfeld’s algorithm  for solving the Fermat-Torricelli problem (2.2). With some additional ingredients of convex analysis, we are able to provide a more clear picture of Kuhn’s proof. Throughout this section, we assume that for are not collinear.

The gradient of the function given by (2.1) is

 ∇φ(x)=m∑i=1x−ai∥x−ai∥,x∉{a1,a2,…,am}.

Solving the equation gives

 x=∑mi=1ai∥x−ai∥∑mi=11∥x−ai∥=:F(x).

For continuity, define for .

Weiszfeld introduce the following algorithm: choose a starting point and define

 xk+1=F(xk)\rm for k∈IN.

He also claimed that if , where for are not collinear, then converges to the unique optimal solution of the problem. A correct statement and the proof of the convergence were given by Kuhn in 1972.

The proposition below guarantees that the function value decreases after each iteration; see [8, Subsection 3.1].

###### Proposition 3.1

If , then .

Proof: It is clear that is not a vertex, since otherwise, . Moreover, is the unique minimizer of the following strictly convex function:

 g(z)=m∑i=1∥z−ai∥2∥x−ai∥.

Since , one has .

Moreover,

 g(F(x)) =m∑i=1∥F(x)−ai∥2∥x−ai∥ =m∑i=1(∥x−ai∥+∥F(x)−ai∥−∥x−ai∥)2∥x−ai∥ =φ(x)+2(φ(F(x))−φ(x))+m∑i=1(∥F(x)−ai∥−∥x−ai∥)2∥x−ai∥.

It follows that

 2φ(F(x))+m∑i=1(∥F(x)−ai∥−∥x−ai∥)2∥x−ai∥<2φ(x).

Therefore, .

The next two propositions show the behavior of the algorithm mapping near a vertex and deal with the case where a vertex is the solution of the problem. Let us first present a necessary and sufficient condition for a vertex to be the optimal solution of the problem. It can be used to easily derive the result in [8, Subsection 2.1].

Define

 Rk:=m∑i=1,i≠kai−ak∥ai−ak∥.
###### Proposition 3.2

The vertex is the optimal solution of the problem if and only if

 ∥Rk∥≤1.

Proof: By the subdifferential Fermat rule (2.4) and the subdifferential sum rule from Proposition 2.6, the vertex is the optimal solution of the problem if and only if

 0∈∂φ(ak)=−Rk+IB(0,1).

This is equivalent to .

Proposition 3.2 allows us to simplify the proof of the following result in [8, Subsection 3.2].

###### Proposition 3.3

Suppose that is not the optimal solution. Then there exists such that implies that there exists a positive integer with

 ∥Fs(x)−ak∥>δ\rm and ∥Fs−1(x)−ak∥≤δ.

Proof: For any , which is not a vertex, one has

 F(x)=∑mi=1ai∥x−ai∥∑mi=11∥x−ai∥.

Then

 F(x)−ak=∑mi=1,i≠kai−ak∥x−ai∥∑mi=11∥x−ai∥.

Thus,

 limx→akF(x)−ak∥x−ak∥=∑mi=1,i≠kai−ak∥x−ai∥1+∑mi=1,i≠k∥x−ak∥∥x−ai∥=Rk.

By Proposition 3.2,

 limx→ak∥F(x)−ak∥∥x−ak∥=∥Rk∥>1.

Thus, there exist and such that

 ∥F(x)−ak∥∥x−ak∥>(1+ϵ)\rm whenever 0<∥x−ak∥<δ.

and for . The conclusion then follows easily.

We finally present Kuhn’s statement and proof for the convergence of the Weiszfeld’s algorithm; see [8, Subsection 3.4].

###### Theorem 3.4

Let be the sequence formed by the Weiszfeld’s algorithm. Suppose that for . Then converges to the optimal solution of the problem.

Proof: In the case where for some , one has that is a constant sequence for . Thus, it converges to . Since and is not a vertex, is the solution of the problem. So we can assume that for every . By Proposition 3.1, the sequence is nonnegative and decreasing, so it converges. It follows that

 limk→∞(φ(xk)−φ(xk+1))=0. (3.7)

By definition, for , , which is a compact set. Then has a convergent subsequence to a point . It suffices to prove that . By (3.7),

 limℓ→∞(φ(xkℓ)−φ(F(xkℓ))=0.

By the continuity, , which implies . If is not a vertex, one has is the solution of the problem, so . Let us consider the case where is a vertex, say . Suppose by contradiction that . Choose sufficiently small such that the property in Proposition 3.3 holds and does not contain and for . Since , we can assume without loss of generality that the sequence is contained in .

For , choose such that and . Choose an index and apply Proposition 3.3, we find such that and . Repeating this procedure, we find with and is not in this ball. Extracting a further subsequence, we can assume that . By the procedure that has been used, one has . If is not a vertex, then it is the solution, which is a contradiction because the solution is not in . Thus, is a vertex, which must be . Then

 limℓ→∞∥F(xqℓ)−a1∥∥xqℓ−a1∥=∞.

This is a contradiction according to Proposition 3.3.
Acknowledgement. The author would like to thank Prof. Joel Shapiro for giving comments that help improve the presentation of the paper.

### Footnotes

1. Fariborz Maseeh Department of Mathematics and Statistics, Portland State University, Portland, OR 97202, United States (mau.nam.nguyen@pdx.edu). The research of Nguyen Mau Nam was partially supported by the Simons Foundation under grant #208785.

### References

1. J. Brimberg, The Fermat Weber location problem revisited. Math. Program. 71 (1995), 71–76.
2. J. Brimberg, R. Chen, D. Chen, Accelerating convergence in the Fermat-Weber location problem. Oper. Res. Lett. 22 (1998), 151–157.
3. F.H. Clarke, Y.S. Ledyaev, R.J. Stern, P.R. Wolenski, Nonsmooth analysis and control theory. Graduate Texts in Mathematics, 178. Springer-Verlag, New York, 1998.
4. L. Cooper and I. Katz, The Weber problem revisited. Comput Math Appl 7 (1981), 225–234.
5. Drezner, On the convergence of the generalized Weiszfeld algorithm. Ann Oper Res 167 (2009), 327–336.
6. U. Eckhardt, Weber’s problem and Weiszfeld’s algorithm in general spaces, Math. Program. 18 (1980) 186–196.
7. F. Giannessi, Constrained Optimization and Image Space Analysis, Vol. 1. Separation of Sets and Optimality Conditions, Math. Concepts Methods Sci. Engrg. 49, Springer, New York (2005).
8. H.W. Kuhn, A note on Fermat-Torricelli problem, Math. Program. 4 (1973), 98–107.
9. B.S. Mordukhovich, N.M. Nam, Applications of variational analysis to a generalized Fermat-Torricelli problem. J. Optim. Theory Appl. 148 (2011), 431–454.
10. B. Mordukhovich, N.M. Nam, J. Salinas, Applications of variational analysis to a generalized Heron problem, Appl. Anal. 91 (2012), 1915–1942.
11. B. Mordukhovich and N.M. Nam, A Simple Path to Convex Analysis and Applications, to appear in Morgan & Claypool (Synthesis Lectures on Mathematics and Statistics: book series edited by S.G. Krantz).
12. J.G. Morris and W.A. Verdini, Minisum distance location problems solved via a perturbed problem and Weiszfeld’s algorithm, Operations Research 27 (1979), 1180–1188.
13. F. Plastria, The Weiszfeld algorithm: proof, amendments and extensions, H.A. Eiselt and V. Marianov (Eds.) Foundations of Location Analysis, International Series in Operations Research and Management Science, vol 155, Springer, 2011, 357-389.
14. R. T. Rockafellar, Convex Analysis, Princeton University Press, Princeton, NJ, 1970.
15. A. Ruszczyński, Nonlinear Optimization, Princeton University Press, Princeton, NJ, 2006.
16. H. ster and R.F. Love, The convergence of the Weiszfeld algorithm. Comput. Math. Appl. 40 (2000), 443451.
17. Y. Vardi and C-H. Zhang, A modified Weiszfeld algorithm for the Fermat-Weber location problem. Math. Program. 90 (2001), Ser. A, 559–566.
18. E. Weiszfeld, Sur le point pour lequel la somme des distances de points donnés est minimum, Thoku Mathematics Journal 43 (1937), 355–386.
19. E. Weiszfeld and F. Plastria, On the point for which the sum of the distances to n given points is minimum. Ann Oper Res 167 (2009), 7–41.
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   