A Dual Algorithm for the Weighted Euclidean Distance Min

Clemson University
TigerPrints
All Theses
5-2009
A Dual Algorithm for the Weighted Euclidean
Distance Min-Max Location Problem in R^2 and
R^3
Andrea Smith
Clemson University, [email protected]
Follow this and additional works at: http://tigerprints.clemson.edu/all_theses
Part of the Applied Mathematics Commons
Recommended Citation
Smith, Andrea, "A Dual Algorithm for the Weighted Euclidean Distance Min-Max Location Problem in R^2 and R^3" (2009). All
Theses. Paper 544.
This Thesis is brought to you for free and open access by the Theses at TigerPrints. It has been accepted for inclusion in All Theses by an authorized
administrator of TigerPrints. For more information, please contact [email protected].
Theses
A DUAL ALGORITHM FOR THE WEIGHTED
EUCLIDEAN DISTANCE MIN-MAX LOCATION
PROBLEM IN R2 AND R3
A Master’s Thesis
Presented to
the Graduate School of
Clemson University
In Partial Fulfillment
of the Requirements for the Degree
Master of Science
Mathematical Sciences
by
Andrea Marie Smith
May 2009
Accepted by:
Dr. Perino M. Dearing, Committee Chair
Dr. Douglas R. Shier
Dr. Mark E. Cawood
Abstract
A dual approach algorithm is given for the solution of the weighted minmax location problem
with Euclidean distance in R2 and R3 . Each subproblem is solved using a directional search procedure
and by taking advantage of its geometric structure. An algebraic replacement rule is employed to
update the subproblem.
ii
Dedication
This paper is dedicated to my wonderful husband, Ethan Smith, who encouraged me to
pursue mathematics.
iii
Acknowledgments
I would like to thank my advisor, Dr. P.M. Dearing, for his excellent support and guidance.
I am also grateful to my committee members, Dr. Douglas Shier and Dr. Mark Cawood.
iv
Table of Contents
Title Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
Dedication
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Acknowledgments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
List of Figures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
3
2 Approach . . . . .
2.1 Method . . . . .
2.2 Updating S . . .
2.3 Solving M(S 0 ) . .
4
4
5
9
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
3 The Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2 Computational Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4 Conclusions and Discussion
Appendix
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Bibliography
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
v
List of Tables
3.1
3.2
pi ∈ [0, 10] × [0, 10] × [0, 10], wi ∈ [0, 10] . . . . . . . . . . . . . . . . . . . . . . . . .
pi ∈ [0, 100] × [0, 100] × [0, 100], wi ∈ [0, 100] . . . . . . . . . . . . . . . . . . . . . . .
vi
47
47
List of Figures
2.1
2.2
Circle bisectors intersecting in a plane . . . . . . . . . . . . . . . . . . . . . . . . . .
Theorem 2.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
21
3.1
3.2
3.3
3.4
3.5
3.6
3.7
Initial solution . . . . . . . . . . . . . . . . . . . . .
Arc formed by B1,2 ∩ aff (S) . . . . . . . . . . . . . .
S = {p1 , p2 , p3 } and x = (6.6648, 2.7578, 0)T . . . .
Arc formed by B1,2 ∩ B1,3 . . . . . . . . . . . . . . .
S = {p1 , p2 , p3 , p5 } and facet FS,1 is intersected first
Optimal solution, x = (6.7273, 3.2727, 6.5455)T . . .
Minimum covering ball . . . . . . . . . . . . . . . . .
29
31
35
38
42
45
46
vii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Chapter 1
Introduction
1.1
The Problem
Suppose we are given a set of m distinct points in Rn , P = {p1 , p2 , . . . , pm }, and cor-
responding positive weights, wi ∈ R, for i = 1, 2, . . . , m. Our goal is to find a point x ∈ Rn that
minimizes the maximum weighted Euclidean distance, wi ||pi −x||, between x and pi for i = 1, . . . , m.
In other words, we are interested in solving the problem, denoted M(P), which is stated as:
M(P ) :
min
x∈Rn
max wi ||pi − x||,
i=1,...,m
or equivalently as the constrained problem:
M(P ) :
min z
s.t.
z ≥ wi ||pi − x||
i = 1, . . . , m.
This problem is often known as the weighted one facility min-max location problem or the
one-center location problem. In the case where all of the associated weights are equal and the points
are in R2 , the problem simplifies to determining the center x of a circle of minimum radius z that
contains all the points pi for i = 1, . . . , m. In this case, M(P) is referred to as the minimum covering
circle problem or the un-weighted one facility min-max location problem. In R3 with equal weights,
M(P) is known as the minimum covering sphere problem. In Rn with equal weights, M(P) is known
as the minimum covering ball problem.
1
Applications include optimally choosing the location of emergency or industrial services in
order to minimize the distance to the farthest customer. The idea of facility location is naturally
extended to the weighted case where associated weights can be given to customer locations in order
to prioritize their locations by importance or need for the service offered. For example, consider
choosing the location of a community hospital. We would want the distance from the hospital to
the locations it serves to be minimized. However, some places may have higher priority than others
(due to higher population or greater need of service); hence, these places would have greater weights
associated with them.
This paper will present a dual approach to solving the weighted Euclidean distance min-max
problem specifically when the points are in Rn for n ≤ 3. We will describe both the theory and the
computations needed to solve the R3 case in detail. We also point out the simplifications obtained
for the case R2 over R3 . Dearing and Zeck [3] developed a dual algorithm to solve the unweighted
Euclidean distance min-max problem in Rn . This paper extends their work to include a weight
corresponding to each point in R3 .
1.2
Literature
Sylvester [10] first explored the minimum covering circle problem in 1857. Sylvester [11]
utilized a geometric, primal approach to solving the problem. In other words, he started with a
covering circle of all points and then minimized the radius of this circle. Sylvester [11] attributed
this geometric approach to Pierce [11].
Since then, there have been a variety of approaches to solving both the weighted and unweighted one facility min-max location problem. Both computational geometry and Voronoi diagrams have been used to solve the problem [1]. Megiddo’s algorithm solves the unweighted problem
in O(m) time in R2 and R3 [9]. He also provides an O(n log2 n) algorithm for the weighted problem
in R2 . Both primal and dual approach algorithms for both the weighted and unweighted problems
are analyzed by Hearn and Vijay in [8] along with a computational study of their solution times.
They found their dual algorithm to perform the best [8]. Elzinga and Hearn present the dual algorithm for the unweighted problem in [6]. More comprehensive reviews of the literature may be
found in Hearn and Vijay [8], Drezner [5], and Drezner and Hamacher [4].
2
Chapter 2
Approach
2.1
Method
The approach taken to solve M(P ) is closely related to that taken by Dearing and Zeck [3].
The main differences, caused by the weights associated with the points, are described in detail in
Section 2.3. In this section we outline the approach to be taken in solving M(P ).
It is well known [8] that the optimal solution x ∈ Rn to problem M(P ) is unique, that at
most n + 1 points are needed to determine x, and that x lies in the convex hull of the given set of
points. For example, in R3 , x is determined by either 2, 3, or 4 points, and the optimal objective
function value, z, equals the weighted distance to the respective 2, 3, or 4 points. However, z may
equal the weighted distance to more than 4 points.
We will now describe the dual approach to solving M(P ) when all of the points lie in R3 .
This approach involves solving a sequence of subproblems of the following form:
M (S) :
min
x∈R3
max wi ||pi − x||,
pi ∈S
where S is a subset of P consisting of at most four affinely independent points. We begin by choosing
any two distinct points, say pi and pj , and letting S = {pi ,pj }, which is an affinely independent
set. The solution to M(S) is x =
wi pi +wj pj
wi +wj
with z = wi ||pi − xi ||. Then we continue to update S
and solve M(S) until optimality is reached.
At each iteration an optimal point x is found for M(S) and its corresponding objective
3
function value z is computed as the maximum distance from x to the points in S. Since S is a
subset of P , M(S) is a relaxation of M(P ), so that z is a lower bound for the optimal solution z ∗ of
M(P ).
Let (x, z) be the optimal solution to M(S). We then test whether this solution is feasible
to M(P ). If z ≥ wi ||pi − x|| for all i = 1, . . . , m, then our current solution (x, z) is feasible to M(P )
and hence optimal to M(P ). If there exists a point pi such that z < wi ||pi − xi ||, then point pi
is chosen to enter set S. The set S must contain at most four points and be affinely independent.
Thus a point may need to be deleted from S before adding pi to S. The method used to choose the
deleted point and to guarantee that the new set S will be affinely independent is explained in the
next section.
2.2
Updating S
In this section we describe an algebraic replacement rule that is utilized to update the set S
in a manner so that the points in the new set will always be affinely independent. This replacement
rule was derived from results in Dearing and Thipwiwatpotjana [2]. The development is for R3 ,
although the argument applies to Rn as well. The method employed to update the set S when the
points all have equal weights is given in [3]. Only a few adaptions are needed to employ this method
when the points are weighted. Denote the current set by S and the updated set by S 0 .
Let S = {pi1 , . . . , pis }, where s = |S|, be the current set of affinely independent points in
R3 , let conv (S) denote the convex hull of S, and let ri (S) denote the relative interior of S. Assume
that pi∗ is the entering point where wi∗ k x − pi∗ k> z. We must now update S.
The updated set S 0 must contain pi∗ and is constructed to satisfy the following two conditions, which lead to a solution of M(S 0 ).
The points in S 0 are affinely independent.
(2.1)
The solution x to M(S) lies in conv(S 0 ).
(2.2)
If the points in S ∪ {pi∗ } are affinely independent, then set S 0 = S ∪ {pi∗ }. In this case,
|S| < n + 1. Conditions 2.1 and 2.2 are clearly satisfied.
4
If, however, the points in S ∪ {pi∗ } are affinely dependent, we must choose a point, pil ∈ S,
and set S 0 = S \ {pil } ∪ {pi∗ }. We determine pil by solving the following linear systems.
Let (πi1 , . . . , πis ) be a solution to the (n + 1) × s linear system

1









 πis = 
 π i2 + · · · + 

 π i1 + 
0
wis (pis − x)
wi2 (pi2 − x)
wi1 (pi1 − x)







1
1
1
and let (di1 , . . . , dis ) be a solution to the (n + 1) × s linear system


1


wi1 (pi1 − x)



 d i1 + 

1
wi2 (pi2 − x)



 di2 +· · ·+ 

1
wis (pis − x)



 dis = − 

1
wi∗ (pi∗ − x)

.
Since the points in S are affinely independent and since x is in ri (S), the first system must
have a unique solution (πi1 , . . . , πis ) with each πij > 0 for j = 1, . . . , s. Also, the second system
must have a solution (di1 , . . . , dis ) since the points in S ∪ {pi∗ } are affinely dependent, that is, the
column vectors and the right hand side vector are linearly dependent. Also the first and second
equation imply that dij < 0 for some j = 1, . . . , s.
Choose the index of the leaving point, il , so that
min
j=1,...,s
π ij
: dij < 0
−dij
=
π il
.
−dil
Then the replacement rule procedure is to replace pil with pi∗ ; i.e., we set S 0 = S \ {pil } ∪ {pi∗ }.
Theorem 2.2.1 The replacement rule yields a set S 0 that fulfills conditions 2.1 and 2.2.
Proof : Solving the problem M(P ) is equivalent to solving the following distance squared version:
M2 (P ):
min ẑ
s.t.
ẑ ≥ wi k pi − x k2 , pi ∈ P.
The Karush-Kuhn-Tucker conditions for M2 (P ) state that (x, ẑ) is an optimal solution to M2 (P ) if
5
and only if there exists a vector (π1 , . . . , πm ) such that
ẑ ≥ wi (pi − x)T (pi − x)
m
X
i=1
m
X
i=1
i = 1, . . . , m
(2.3)
πi = 1
(2.4)
wi (pi − x)πi = 0
(2.5)
πi ≥ 0
i = 1, . . . , m
(2.6)
(ẑ − wi (pi − x)T (pi − x))πi = 0
i = 1, . . . , m.
(2.7)
Similar to the unweighted case given in [3], we have that conditions (2.4), (2.5) and (2.6) are
a linear system with n + 1 equations and m nonnegative variables πi and columns [1, wi (pi − x)]T
for i = 1, . . . , m. From a linear programming view, note that for a set S consisting of affinely independent points, pij , with the point x ∈ conv (S), the columns [1, wi (pi − x)]T i ∈ S, form a feasible
basis for the system (2.4), (2.5), (2.6) and conversely. Also, the entering point, pi∗ , corresponds to
an entering column [1, wi∗ (pi∗ − x)]T for the basis. Thus, the replacement rule used to update the
set S is actually the minimum ratio rule of linear programming which guarantees that the columns
of the new basis, corresponding to S 0 = S ∪ {pi∗ } \ {pil }, are linearly independent and that the new
basis is feasible to the Karush-Kuhn-Tucker conditions. Hence the new set S 0 is affinely independent
and the point x lies in conv (S 0 ), thus satisfying conditions 2.1 and 2.2.
2.3
Solving M(S 0 )
Similar to [3], we employ a directional search procedure starting at x, the solution to the pre-
vious subproblem. We begin by noting that by construction, the set S 0 consists of s affinely independent points, which generate an (s−1) dimensional subspace: sub(S 0 )=span(pi1 −pis , . . . , pis−1 −pis ).
Note that sub(S 0 ) can also be represented by the intersection of hyperplanes, i.e.,
sub(S 0 ) = {x ∈ R3 : vk · x = 0, k = 1, . . . , n − s + 1},
6

T
T
−
p
p
is 
 i1


.
.
..
where the vectors vk , k = 1, . . . , n − s + 1 form a basis for the null space of 




pTis−1 − pTis
The set S 0 generates an affine set, denoted aff (S 0 ), where aff (S 0 ) = pj + sub(S 0 ) and pj

is any point in S 0 . Thus we see that aff (S 0 ) is the translate of sub(S 0 ) by pj . Note that in the R3
case, s can equal 2, 3, or 4. The convex hull of S 0 , conv (S 0 ), has s facets in aff (S 0 ), each of which
is an (s − 2) dimensional simplex. Each facet will be denoted FS 0 ,ij with
FS 0 ,ij = {x ∈ aff (S 0 ) : uk · x = uk · pil , k = 1, . . . , n − s + 2}
where l 6= j and the vectors uk , k = 1, . . . n − s + 2, form a basis for the null space of the matrix with
s − 2 linearly independent rows pTiα − pTiβ for some fixed piβ ∈ S\{pij } and for piα ∈ S 0 \{pij , piβ }.
For each pair pij , pik ∈ S 0 , the set of all points that are of equal weighted distance between
two points pij and pik , with weights wij and wik , is called the bisector of pij and pik , and is denoted
Bij ,ik , where
Bij ,ik = {x : wik ||pik − x|| = wij ||pij − x||}.
Bisectors come in two different forms. If wij = wik , then Bij ,ik is the hyperplane that bisects and is
orthogonal to the line segment between pij and pik . In this case, Bij ,ik can be expressed as follows:
Bij ,ik =
x : (pik − pij )x =
1
(pik − pij ) · (pik + pij ) .
2
However, if wij 6= wik , then Bij ,ik is a sphere which can be described by its center and
radius:
cij ,ik =
wi2j pij − wi2j pik
wi2j
−
wi2k
and rij ,ik =
wij wik ||pij − pik ||
.
|wi2j − wi2k |
It is well known [7] that an optimal solution x0 for M(S 0 ) must occur on at least one bisector
Bij ,ik , for some pij , pik ∈ S 0 . Dearing and Zeck [3] note that if a solution x0 to M(S 0 ) is in ri (S 0 ),
then x0 occurs at the intersection of all bisectors Bij ,ik for all pairs pij , pik ∈ S 0 . In other words,
\
x0 = aff (S 0 )∩(
Bij ,ik ). Otherwise, x0 occurs on some facet of S 0 . Let S̄ be the unique subset
pij ,pik ∈S 0
of S 0 such that x0 ∈ ri (S̄). Thus the optimal solution for M(S 0 ) is x0 = aff (S̄) ∩ (
\
Bij ,ik ).
pij ,pik ∈S̄
Recall that S denotes the set of points before the update and S 0 denotes the current set of points
7
after the update. Recall that either S 0 = S ∪ {pi∗ } or S 0 = S\{pil } ∪ {pi∗ } where pil is the leaving
point. Let x be the solution to M(S), where S is the set of points before the update. Then


\
x = aff (S) ∩ 
Bij ,ik  .
pij ,pik ∈S
By Theorem 2.2.1, x lies in conv (S 0 ):


\
x ∈ aff (S 0 ) ∩ 
Bij ,ik  .
pij ,pik ∈S 0 \{pi∗ }
From this we see that x lies on all of the bisectors determined by the points in S 0 \{pi∗ }.
Our approach to solving M(S 0 ) is to start at the previous solution x and travel along a path
which is either a ray or an arc, as specified below, until either reaching the point of intersection of
all of the bisectors or a point of intersection with a facet, FS 0 ,ij . Each path is constructed to be a
subset of the bisectors Bij ,ik , for all pij ,pik ∈ S 0 \{pi∗ }, to be a subset of aff (S 0 ), and to be oriented
in such a way that the distance to pi∗ decreases when traveling along the path from x. If the point
of intersection of all of the bisectors is reached first, then that intersection point is the solution to
M(S 0 ). If a facet, FS 0 ,ij , is intersected first, then pij is deleted from S 0 , and we proceed to solve
M(S 0 ) again where S 0 := S 0 \{pij }.
Dearing and Zeck [3] describe the unweighted case, i.e., for all pij , pik ∈ S 0 , wij = wik . In
this case, the path starts at x and travels along the ray {x + αd : α ≥ 0}. This direction d is the
solution to the following system:
vk · d = 0
k = 1, . . . , n − s + 1
(2.8)
(pij − pik ) · d = 0
pij ∈ S 0 \{pi∗ , pik }
(2.9)
(pi∗ − pik ) · d = 1
(2.10)
where pik is any point in S 0 \{pi∗ }. Equation (2.8) ensures that d is in sub(S 0 ) because the vectors vk
form a basis for the null space of sub(S 0 ). Recall that each bisector is orthogonal to pij − pik . Thus
equation (2.9) ensures that d is parallel to the bisectors Bij ,ik , and d is orthogonal to the facet, FS 0 ,i∗ .
Equation (2.10) makes sure that d points in the direction of pi∗ so that the distance to pi∗ decreases
8
when starting at x and traveling along the ray {x+αd : α ≥ 0}. We know that the above system has
a unique solution d because the points in S 0 are affinely independent, and
the basis of the null space

\
is linearly independent. Note that the ray {x + αd : α ≥ 0} ⊂ aff(S 0 ) ∩ 
Bij ,ik .
pij ,pik ∈S 0 \{pi∗ }
0
However, if for some pij , pik ∈ S , wij 6= wik , then the path starts at x and travels along the
arc of a circle lying in a plane in R3 . The motivation for this is that in R3 two intersecting spheres
form a circle, and a plane intersecting a sphere creates a circle. A circle in a plane in R3 is described
by {c + u cos(α) + v sin(α) : 0 ≤ α ≤ 2π}, where the plane is parallel to the subspace spanned by u
and v, and c is the center of the circle. The arc is given by {c + u cos(α) + v sin(α) : α ≥ 0}, and is
constructed so that x corresponds to the point with α = 0.
Now, we describe how to calculate the arc of a circle in R3 that is the intersection of
two spherical bisectors, Bij ,ik and Bij ,il , with centers cij ,ik and cij ,il and radii rij ,ik and rij ,il ,
respectively. See Figure 2.1. The circle lies in a plane that is calculated as follows: The bisectors
are given by:
Bij ,il = {x : ||x − cij ,il ||2 = ri2j ,il },
Bij ,ik = {x : ||x − cij ,ik ||2 = ri2j ,ik }.
Expanding each equation and subtracting the second equation from the first yields:
||cij ,il ||2 − ||cij ,ik ||2 + 2(cij ,ik − cij ,il )x = ri2j ,il − ri2j ,ik .
Simplifying we obtain the plane:
(cij ,ik − cij ,il ) · x =
1 2
[r
− ri2j ,ik + ||cij ,ik ||2 − ||cij ,il ||2 ].
2 ij ,il
Thus the circle lies in the plane, n·x = a, where n = cij ,ik −cij ,il and a = 21 (ri2j ,il −ri2j ,ik +||cij ,ik ||2 −
||cij ,il ||2 ). The center of the resulting circle, cjkl , can be found as follows. Let l =
1
||n|| (a − n · cij ,il ).
n
. We
Note that l is the distance between the center of the circle and cij ,il . Then cjkl = cij ,il + l ||n||
now find the vectors u and v that span the plane containing the arc.
Let u = x − cjkl and note that the radius of the circle (and the arc) is ||u||. The vector v
9
rij ,il
rij ,ik
cij ,ik
cjkl
cij ,il
Figure 2.1: Circle bisectors intersecting in a plane
is calculated by solving the following system:
(cij ,ik − cij ,il ) · v = 0
(2.11)
u·v =0
(2.12)
(pi∗ − cjkl ) · v = 1
(2.13)
Then v := v ||u||
||v|| so that ||u|| = ||v||. Equations (2.11) and (2.12) ensure that v lies in the plane
parallel to the circle. The vectors u and v are orthogonal by (2.12), and v points in the direction of
the half-plane containing pi∗ by (2.13).
If however we are calculating Bij ,ik ∩Bij ,il , where Bij ,ik is a sphere and Bij ,il is a plane of the
form (b·x = b), the center of the resulting circle can be calculated as follows. Let l =
b
b
||b|| − ||b|| ·cij ,ik .
b
Then we have that the center of the circle defining the arc is cjkl = cij ,ik + l ||b||
.
We now find the vectors u and v that span the plane containing the arc. Let u = x − cjkl .
Note that the radius of our arc is again ||u||. We calculate v by solving the following system:
b·v =0
(2.14)
u·v =0
(2.15)
(pi∗ − cjkl ) · v = 1
(2.16)
10
Then v := v ||u||
||v|| so that ||u|| = ||v||. Equation (2.14) ensures that v lies in the plane containing the
circle. We have that u and v are orthogonal by (2.15), and v points in the direction of the half-plane
containing pi∗ by (2.16).
If wij = wik for some pij , pik ∈ S 0 , then we begin at x and travel along the ray {x + αd :
α ≥ 0}. If however wij 6= wik for some pij , pik ∈ S 0 , then we begin at x and travel along the arc
{cjkl + u sin(α) + v cos(α) : α ≥ 0}. Let us begin by describing the former case.
Suppose that in R3 , we begin at x and travel along the ray {x + αd : α ≥ 0} until either
reaching the point of intersection of all the bisectors or reaching a facet. Let αij ,i∗ denote the stepsize
α needed to reach the point of intersection of the bisectors, i.e., Bij ,i∗ ∩ (x + αd) = x + αij ,i∗ d.
Dearing and Zeck [3] observe that it suffices to determine αij ,i∗ for only one pij ∈ S 0 since all Bij ,i∗
have a common intersection point. If Bij ,i∗ is a hyperplane, then Bij ,i∗ = {x ∈ R : b · x = b} where
b = pik − pi∗ and b =
1
∗
2 (pi
− pij ) · (pi∗ + pij ). Then the point of intersection with all of the
bisectors can be computed by solving: b · (x + αd) = b for α. This yields α =
b−b·x
b·d .
If however we
are traveling along the ray {x + αd : α ≥ 0}, then there are possibly two points of intersection with
a spherical bisector. Consider Bij ,i∗ to be a spherical bisector with center cij ,i∗ and radius rij ,i∗ .
Hence Bij ,i∗ can be expressed as ||x − cij ,i∗ ||2 = ri2j ,i∗ . We solve the equation
||(x + αd) − cij ,i∗ ||2 = ri2j ,i∗
for α. Expanding and collecting like terms, we have
||d||2 α2 + 2d · (x − cij ,i∗ )α + ||x − cij ,i∗ ||2 − ri2j ,i∗ = 0.
(2.17)
From this we see that the two points of intersection can be found by solving the quadratic
equation (2.17) in α. Let α1 and α2 be the two solutions to the quadratic equation (2.17). Then
αij ,i∗ = min{αi : αi > 0, i = 1, 2}. If both αi < 0, then we set αij ,i∗ = ∞ meaning that we do not
intersect the bisectors as we move along the ray {x + αd : α > 0} as α increases.
In traveling along the ray {x + αd : α ≥ 0} we may intersect with a facet, FS 0 ,ij , represented
by fS 0 ,ij x = fS 0 ,ij . Let αS 0 ,ij denote the value of α that yields the intersection point of FS 0 ,ij ∩ (x +
αd) = x + αS 0 ,ij d. This αS 0 ,ij can be found by solving the equation fS 0 ,ij · (x + αd) = fS 0 ,ij for α.
Thus in traveling along the ray {x + αd : α ≥ 0} we have shown how to calculate the values
11
of α that yield that point of intersection of all the bisectors and the point(s) of intersection with the
facets. Now we will consider the case where we are traveling along an arc rather than a line.
Consider starting at x and traveling along the arc {cjkl + u sin(α) + v cos(α) : α ≥ 0} until
either intersecting all of the other bisectors or a facet. In the unequally weighted case, the bisectors
all intersect at two points, however only one can be interior to conv(S 0 ). As in the unweighted case,
it suffices to calculate the intersection of the arc and only one bisector, Bij ,i∗ . By construction of
u and v, if one starts at x and travels along the arc in a positive direction with respect to v, then
the first point of intersection with the bisectors that is encountered is the correct one, i.e., it is the
point that could potentially be interior to conv (S 0 ). Let αij ,i∗ be the value of α that yields the
intersection Bij ,i∗ ∩ (cjkl + u sin(α) + v cos(α)) that is in conv (S 0 ).
We will first consider the case where Bij ,i∗ is a sphere of the form ||x − cij ,i∗ ||2 = ri2j ,i∗ . We
calculate
[||x − cij ,i∗ ||2 = ri2j ,i∗ ] ∩ [cjkl + u cos(α) + v sin(α)].
Thus we solve the equation
||cjkl + u cos(α) + v sin(α) − cij ,i∗ ||2 = ri2j ,i∗ .
Expanding and collecting like terms, we get
||cjkl − cij ,i∗ ||2 + ||u||2 cos2 (α) + ||v||2 sin2 (α) + 2(cjkl − cij ,i∗ ) · u cos(α)
+2(cjkl − cij ,i∗ ) · v sin(α) + 2u · v cos(α) sin(α) = ri2j ,i∗ .
Recalling that ||u|| = ||v||, sin2 (α) + cos2 (α) = 1 and u · v = 0, we get
||cjkl − cij ,i∗ ||2 + ||u||2 + 2(cjkl − cij ,i∗ ) · u cos(α) + 2(cjkl − cij ,i∗ ) · v sin(α) = ri2j ,i∗ .
Thus we need to solve the following generic equation in α:
a cos(α) + b sin(α) = c
(2.18)
where a = 2(cjkl − cij ,i∗ ) · u, b = 2(cjkl − cij ,i∗ ) · v, and c = ri2j ,i∗ − ||cjkl − cij ,i∗ ||2 − ||u||2 . The
12
two solutions to equation (2.18) are computed as follows:

 −a ca+√a2 b2 +b4 −b2 c2
) c
(
+
2
2
b(a +b )
b
;
√
α1 = arctan 
2 2
4
2 2
ca+ a b +b −b c
a2 +b2

 −a ca−√a2 b2 +b4 −b2 c2
(
) c
+b
b(a2 +b2 )
.
√
α2 = arctan 
2 2
4
2 2
ca− a b +b −b c
a2 +b2
Then αij ,i∗ = min{αi : αi > 0, i = 1, 2}. If both αi < 0 or if a2 + b2 − c2 < 0, then we set αij ,i∗ = ∞
meaning that we do not intersect the bisectors as we move along the path in a decreasing direction
with respect to pi∗ .
If instead wij = wi∗ , then Bij ,i∗ is a plane, i.e., Bij ,i∗ = {x ∈ R : b · x = b}. We will need
to compute Bij ,i∗ ∩ (cjkl + u sin(α) + v cos(α)), which yields the equation
b · [cjkl + u sin(α) + v cos(α)] = b,
or
b · u cos(α) + b · v sin(α) = b − b · cjkl .
So again we need to solve the following equation in α:
a cos(α) + b sin(α) = c
where in this case a = b · u, b = b · v, and c = b − b · cjkl . We compute α1 and α2 as before and set
αij ,i∗ = min{αi : αi ≥ 0, i = 1, 2}. If both α1 , α2 < 0 or if a2 + b2 − c2 < 0, then we set αij ,i∗ = ∞.
We must also consider that the arc {cjkl + u sin(α) + v cos(α) : α ≥ 0} may intersect with
a facet FS 0 ,ij represented by fS 0 ,ij x = fS 0 ,ij . Let αS 0 ,ij denote the desired value of α resulting from
this intersection, i.e., FS 0 ,ij ∩ [cjkl + u sin(α) + v cos(α)] = cjkl + u sin(αS 0 ,ij ) + v cos(αS 0 ,ij ). In
precisely the same manner as intersecting the arc with a planar bisector, this intersection simplifies
to solving the following equation in α:
a cos(α) + b sin(α) = c,
where a = fS 0 ,ij · u, b = fS 0 ,ij · v, and c = fS 0 ,ij − fS 0 ,ij · cjkl .
13
Again two values α1 and α2 are obtained, and αS 0 ,ij = min{αi : αi ≥ 0, i = 1, 2}. If both
α1 , α2 < 0 or if a2 + b2 − c2 < 0, then we set αij ,i∗ = ∞, i.e., the arc does not intersect the facet.
Let α∗ = min{αij ,i∗ , αS 0 ,ij : for all pij ∈ S 0 \{pi∗ }}. If α∗ = αij ,i∗ for some pij ∈ S 0 \{pi∗ },
then starting at x and traveling along the path we first hit the point of intersection of all the bisectors
before hitting a facet. This means that our solution, x0 = cjkl +u sin(α∗ )+v cos(α∗ ) or x0 = x+α∗ d,
is in ri (S 0 ). Thus x0 is the optimal solution to M(S 0 ).
If, however, α∗ = αS 0 ,ij for some pij ∈ S 0 \{pi∗ }, then we have hit a facet first. In this case
the solution to M(S 0 ) must lie on FS 0 ,ij . The point pij is deleted from S 0 and the process is repeated
starting at x0 . In other words we proceed to solve M(S 0 ) where S 0 := S 0 \{pij }.
We see that in each iteration of solving M(S 0 ), we either reach an optimal solution or we
determine that the solution lies in the relative interior of a subset of S 0 , i.e., S 0 \ {pij }. Such a point
pij is then removed from S 0 and the dimension of aff (S 0 ) is decreased by 1.
Theorem 2.3.1 The objective function value z 0 of M(S 0 ) is strictly greater than the objective function value z of the previous subproblem M(S).
Proof: Dearing and Zeck [3] prove the unweighted case, i.e., when the path is the ray
{x + αd : α > 0}. We will prove the case for the arc {cjkl + u sin(α) + v cos(α) : α ≥ 0}.
First note that since ||u|| = ||v|| and u · v = 0 we get
||pi∗ − (cjkl + u sin(α) + v cos(α))||2 = (pi∗ − cjkl ) · [(pi∗ − cjkl ) − 2u cos(α) − 2v sin(α)] + u2 .
Taking the derivative with respect to α and setting it equal to zero, we get
d
(||pi∗ − (cjkl + u sin(α) + v cos(α))||2 ) = (pi∗ − cjkl ) · (2u sin(α) − 2v cos(α)) = 0.
dα
(2.19)
Consider Figure 2.2. The line through pi∗ and cjkl intersects the circle {cjkl + u sin(α) + v cos(α) :
0 ≤ α ≤ 2π} at the points d1 and d2 , where d1 is the point closest to pi∗ and d2 is the point farthest
from pi∗ .
14
cjkl + u sin(α) + v cos(α)
p i∗
d1
~u
cjkl
~v
d2
Figure 2.2: Theorem 2.3.1
Choose u = d1 − cjkl . Since v is always chosen to be orthogonal to u, we obtain 2(pi∗ −
15
cjkl ) · v cos(α) = 0. So equation (2.19) simplifies to
2(pi∗ − cjkl ) · u sin(α) = 0.
Note that 2(pi∗ − cjkl ) · u > 0, leaving us with sin(α) = 0. Thus when α = 0, x = cjkl + u cos(α) +
v sin(α) = cjkl + u. Starting at α = 0 and moving in a counterclockwise direction, we see that
||pi∗ − (cjkl + u sin(α) + v cos(α))||2 is minimized at α = 0, maximized at α = π, strictly increasing
on [0, π], and strictly decreasing on [π, 2π].
From this we see that ||pij −(cjkl +u sin(α) + v cos(α)||2 is strictly increasing for 0 ≤ α ≤ π.
Thus we have
z 0 = wi∗ ||pi∗ − (cjkl + u sin(αi∗ ) + v cos(αi∗ )||2
= wij ||pij − (cjkl + u sin(αi∗ ) + v cos(αi∗ )||2
> wij ||pij − (cjkl + u sin(0) + v cos(0)||2
= wij ||pij − x||2 = z,
since wi > 0 ∀i = 1, . . . , m.
Since P is finite, there are a finite number of subproblems M(S 0 ) that need to be solved.
Since the objective function value is strictly increasing, we will never resolve the same M(S 0 ). Thus
we conclude that the algorithm must terminate in a finite number of steps.
16
Chapter 3
The Algorithm
Input: A set of points in R3 , P = {p1 , p2 , . . . , pm }, with corresponding weights, {w1 , w2 , . . . , wm }.
Output: The solution (x, z) to M(P ).
1. Initialization:
Choose any two points pi1 , pi2 ∈ P and let S = {pi1 , pi2 }. Then
x=
wi1 pi1 + wi2 pi2
, and z = wi1 ||x − pi1 ||.
w i1 + w i2
Proceed to step 2.
2. Optimality Check:
If wi ||x − pi || ≤ z for all i = 1, . . . , m, then (x, z) is optimal. STOP. Else, choose some pi∗
with wi∗ ||x − pi∗ || > z to enter the set S.
Proceed to step 3.
3. Update S.
If pi∗ ∈ aff (S), then apply the Replacement Rule to determine the leaving point pil ∈ S and
set S = S\{pil } ∪ {pi∗ }. Else set S = S ∪ {pi∗ }.
Proceed to step 4.
4. Solve M(S)
17
(a) Determine the path.
i. If |S| = 3:
A. If wi1 6= wi2 :
The path is an arc
{ci1 ,i2 + u cos(α) + v sin(α) : α > 0}
formed by intersecting Bi1 ,i2 with aff (S). The vectors u and v are calculated as
follows:
u = x − cjkl .
v is the scaled solution to the system:
f ·v =0
u·v =0
(pi∗ − ci1 ,i2 ) · v = 1.
where f is a normal
vectorto

 aff (S). The vector f can be found by computing a
T
T
pi − pi1 
basis for null  2
.
pTi∗ − pTi1
Set
||u||
v=v
.
||v||
B. Else wi1 = wi2 :
The path is a ray
{x + αd : α > 0}
formed by intersecting Bi1 ,i2 with aff (S). The direction, d, is the solution to the
18
system:
v1 · d = 0
(pi2 − pi1 ) · d = 0
(pi∗ − pi1 ) · d = 1
where v1 is a normal
toaff (S). The vector v1 can be found by computing
 vector 
T
T
pi − pi1 
a basis for null  2
.
pTi∗ − pTi1
ii. If |S| = 4
A. If wi1 6= wi2 and wi1 6= wi3 :
The path is the arc
{c123 + u cos(α) + v sin(α) : α > 0}
formed by Bi1 ,i2 ∩ Bi1 ,i3 where u, v, and c123 are calculated as follows:
c123 = ci1 ,i3 − l
where n = ci1 ,i3 − ci1 ,i2 , a =
n
||n|| ci1 ,i2
−
1 2
2 (ri1 ,i2
n
||n||
− ri21 ,i3 + ||ci1 ,i3 ||2 − ||ci1 ,i2 ||2 ), and l =
a
||n|| .
u = x − c123 .
v is the solution to system:
(ci1 ,i2 − ci1 ,i3 ) · v = 0
u·v =0
(pi∗ − c123 ) · v = 1
Set
v=v
19
||u||
.
||v||
B. If wi1 6= wi2 and wi1 = wi3 , this implies that wi2 6= wi3 :
The path is the arc
{c123 + u cos(α) + v sin(α) : α > 0}
formed by the intersection of Bi1 ,i2 , a sphere, and Bi1 ,i3 , a plane where c123 , u,
and v are calculated the same as above replacing ci1 ,i3 with ci2 ,i3 .
C. If wi1 = wi2 and wi1 = wi3 :
The path is a ray
{x + αd : α > 0}
formed by Bi1 ,i2 ∩ Bi1 ,i3 . The direction, d, is the solution to the system:
(pi3 − pi1 ) · d = 0
(pi2 − pi1 ) · d = 0
(pi∗ − pi1 ) · d = 1
D. If wi1 = wi2 and wi1 6= wi3 :
The path is the arc
{c123 + u cos(α) + v sin(α) : α > 0}
formed by the intersection of Bi1 ,i2 , a plane, and Bi1 ,i3 , a sphere. The vectors u,
v, and c123 are calculated as follows:
c123 = ci1 ,i3 − l
where Bi1 ,i2 is the plane b · x = b and l =
b
||b||
b
||b|| ci1 ,i2
u = x − c123 .
20
−
b
||b|| .
v is the scaled solution to the system:
b·v =0
u·v =0
(pi∗ − c123 ) · v = 1.
Set
v=v
||u||
.
||v||
(b) Find the stepsize, αij ,i∗ , resulting from the intersection of Bij ,i∗ with the path where
pij ∈ S\{pi∗ }.
Find the stepsize, αS,ij , resulting from the intersection of FS,ij with the path for each
pij ∈ S\{pi∗ } such that the intersection exists with αS,ij > 0.
Let the stepsize be α∗ := min{αij ,i∗ , αS,ij : pij ∈ S\{pi∗ }}.
(c) Set x = x + α∗ d or x = cjkl + u cos(α∗ ) + v sin(α∗ ) depending on the path being traveled.
If α∗ = αij ,i∗ , the solution, x, is optimal to M(S). Proceed to step 2.
Else α∗ = αS,ij for some pij ∈ S\{pi∗ }. Set S = S\{pij } and repeat step 4.
3.1
An Example
We now present the following example in R3 . Let P = {p1 , p2 , . . . , p6 } with
 
 
 
 
 
 
0
10
8
6
4
18
 
 
 
 
 
 

 
 
 
 
 
p1 = 
0 , p2 =  0  , p3 = 8 , p4 = 4 , p5 =  6  , p6 =  6  ,
 
 
 
 
 
 
0
0
8
12
21
0
and let w = {w1 , w2 , . . . , w6 } with w1 = 1.5, w2 = 2.5, w3 = 2, w4 = 1, w5 = 3, w6 = 1.
Initialization: We begin by setting S = {p1 , p2 }. Our initial solution is


6.25




w1 p1 + w2 p2

x=
= 0 
 with z = w1 ||p1 − x|| = 9.3750.
w1 + w2


0
21
20
p6
15
p5
10
p4
5
p1
x
0
p2
5
0
-0.4
1.6 3.6
10
p3
15
5.6
7.6
Figure 3.1: Initial solution
Figure 3.1 shows the points in P and the current solution x.
Optimality Test: We find w3 ||p3 − x|| = 16.3783 > z. Thus p3 must enter S.
Update S: First we check if p3 ∈ aff (S). Note that null[pT2 − pT1 ] = null[10, 0, 0]T whose
null space has a basis {(0, 1, 0)T , (0, 0, 1)T }. Thus




0
aff (S) = x ∈ R3 : 


0
1
0


0
0
x = 
1
0
 


0
0
 p1 =   .

1
0 

1
0
Hence we have that p3 ∈
/ aff (S). Set S = S ∪ {p3 } = {p1 , p2 , p3 }.
Solve M(S): Since w1 6= w2 , B1,2 is a sphere. We must find the arc formed by intersecting
22
B1,2 with aff (S). The center and radius of B1,2 are
c1,2 =
w1 w2 ||p1 − p2 ||
w12 p1 − w22 p2
= (15.625, 0, 0)T and r1,2 =
= 9.375.
w12 − w22
|w12 − w22 |
The center of the arc is c1,2 . Now we compute the null space



T
T
10
p2 − p1 
null 
 = null 
8
pT3 − pT1

0
0

8 0
which has basis {(0, 0, 1)T }. Let n = (0, 0, 1)T . Set
u = x − c1,2 = (−9.375, 0, 0)T .
v can be determined by
n · v = (0, 0, 1)T · v = 0
u · v = (−9.375, 0, 0)T · v = 0
(pT3 − c1,2T ) · v = (−7.625, 8, 0)T · v = 1.
This yields v = (0, 0.125, 0)T . Set v :=
v
||v|| ||u||
= (0, 9.375, 0)T .
Thus we will travel along the arc





 



 15.625
0
−9.375






 







 






{c1,2 + u cos α + v sin α : α > 0} =  0  +  0  cos α + 9.375 sin α : α > 0 .







 







0
0
0
Figure 3.2 shows the arc formed by intersection B1,2 and aff (S).
23
p6
p5
p4
x
p2
p1
p3
Figure 3.2: Arc formed by B1,2 ∩ aff (S)
We will compute the stepsize needed to intersect bisector B1,3 . Recall that we need only
find the stepsize to reach one bisector as they will all share that common intersection point. Since
w1 6= w3 , we calculate the center and radius of B1,3 to be
c1,3 = (18.2857, 18.2857, 0)T and r1,3 = 19.3949.
We will now solve the system a cos α + b sin α = c where
24
a = 2(c1,2 − c1,3 ) · u = 24.9442,
b = 2(c1,2 − c1,3 ) · v = −171.4286,
2
c = r1,3
− ||c1,2 − c1,3 ||2 − ||u||2 = −26.5871.
Solving a cos α + b sin α = c, we obtain:

 −a ca+√a2 b2 +b4 −b2 c2
(
) c
+b
b(a2 +b2 )
 = 0.2986,
√
α1 = arctan 
2 2
4
2 2
ca+ a b +b −b c
a2 +b2

 −a ca−√a2 b2 +b4 −b2 c2
) c
(
+
b(a2 +b2 )
b
 = 3.132.
√
α2 = arctan 
2 2
4
2 2
ca− a b +b −b c
a2 +b2
We then take α1,3 = min{0.2986, 3.132} = 0.2986.
In order to find αS,1 , first compute a basis for the null space
null([pT3 − pT2 ]) = null([−2, 8, 0]T )
which yields {(4, 1, 0)T , (0, 0, 1)T }. This gives
FS,1




4
= x ∈ conv (S) : 


0
1
0


0
4
x = 
1
0
 


0
40
 p3 =   .

1
0 

1
0
Compute the constants a, b, and c needed to find the stepsize by the following:
a = (4, 1, 0) · u = −37.5,
b = (4, 1, 0) · v = 9.375,
c = 40 − (4, 1, 0) · c1,2 = −22.5.
This yields
α1 = 0.7045, and α2 = −1.1945.
We then take αS,1 = min{0.7045} = 0.7045.
25
In order to find αS,2 , first compute a basis for the null space
null([pT3 − pT1 ]) = null([8, 8, 0]T )
which yields {(−1, 1, 0)T , (0, 0, 1)T }. This gives
FS,2




−1
= x ∈ conv (S) : 


0


1 0
−1
x = 
0
0 1
 



1 0
0
 p3 =   .

0 
0 1
Compute the constants a, b, and c needed to find the stepsize by the following:
a = (−1, 1, 0) · u = 9.375,
b = (−1, 1, 0) · v = 9.375,
c = 0 − (−1, 1, 0) · c1,2 = 15.625.
Since a2 + b2 − c2 < 0,





 




0
−9.375
15.625






 






 

 0  +  0  cos α + 9.375 sin α : α > 0 ∩ FS,2 = ∅,



 








 







0
0
0
i.e., the arc never intersects the facet. Set αS,2 = ∞.
Take α∗ = min{0.2986, 0.7045} = 0.2986. Thus our solution to M(S) is

 





15.625 −9.375
 0 
6.6648

 





 





x=
 0  +  0  cos(0.2986) + 9.375 sin(0.2986) = 2.7578

 





0
0
0
0
with z = w1 ||p1 − x|| = 10.8192.
Figure 3.3 shows the current set S, the arc being traveled along, and the new solution x.
26
p1
x
p2
xnew
p3
Figure 3.3: S = {p1 , p2 , p3 } and x = (6.6648, 2.7578, 0)T
Optimality Test: We find w5 ||p5 − x|| = 38.1382 > z. Thus p5 must enter S.
Update S: Note that




T
T
p2 − p1 ]
10 0 0
null 
 = null 

pT3 − pT1 ]
8 8 0
which has basis {(0, 0, 1)T }. Thus
aff (S) = x ∈ R3 : (0, 0, 1)x = (0, 0, 1)p1 = 0 .
Hence we have p5 ∈
/ aff (S). Set S = S ∪ {p5 }.
27
Solve M(S): Since w1 6= w2 and w1 6= w3 , both B1,2 and B1,3 are spheres. We must find
the arc formed by B1,2 ∩ B1,3 . The center and radius of B1,3 are
c1,3 =
w12 p1 − w32 p2
w1 w3 ||p1 − p3 ||
= (18.2857, 18.2857, 0)T and r1,3 =
= 19.3949.
w12 − w32
|w12 − w32 |
Recall that we calculated the center and radius of B1,2 in the previous iteration. We will now
calculate the center of the arc, c123 . We compute
n = c1,3 − c1,2 = (2.6607, 18.2857, 0)T ,
1 2
2
(r − r1,3
+ ||c1,3 ||2 − ||c1,2 ||2 ) = 68.1607,
2 1,2
a
n
c1,2 −
= −1.4388,
l=
||n||
||n||
a=
n
yielding c123 = c1,3 − l ||n||
= (15.8322, 1.4238, 0)T .
We now calculate the vectors u and v:
u = x − c123 = (−9.1674, 1.3339, 0)T .
v can be determined from
(c1,2 − c1,3 ) · v = (−2.6607, 18.2857, 0)T · v = 0
u · v = (−9.1674, 1.3339, 0)T · v = 0
(pT3 − c123 ) · v = (−11.8322, 4.5762, 12)T · v = 1.
This yields v = (0, 0, 0.0833)T . Set v :=
v
||v|| ||u||
= (0, 0, 9.2639)T .
Thus we will travel along the arc


 





 15.8322

−9.1674
0



 







 









{c1,2 + u cos α + v sin α : α > 0} =  1.4238  +  1.3339  cos α +  0  sin α : α > 0 .





 









0
0
9.2639
Figure 3.4 shows the arc formed by B1,2 ∩ B1,3 .
28
p2
p3
p1
Figure 3.4: Arc formed by B1,2 ∩ B1,3
We will compute the stepsize needed to intersect bisector B1,5 . Since w1 6= w5 , we calculate
the center and radius of B1,5 to be
c1,5 = (5.3333, 8, 16)T and r1,5 = 9.3333.
We must now solve the system a cos α + b sin α = c where
29
a = 2(c123 − c1,5 ) · u = −105.0191,
b = 2(c123 − c1,5 ) · v = −48.2229,
2
c = r1,5
− ||c123 − c1,5 ||2 − ||u||2 = −204.0905.
Since a2 + b2 − c2 < 0, the arc does not intersect B1,5 . Set α1,5 = ∞.
We will now compute the stepsizes needed to reach the facets. First we compute αS,1 . The
null space



T
T
p5 − p2 
2
null 
 = null 
6
pT5 − pT3

−8
0 

−12
−6
has basis {(2.6667, 0.6667, 1)T }. This gives
FS,1 = {x ∈ conv (S) : (2.6667, 0.6667, 1)x = (2.6667, 0.6667, 1)p5 = 26.6667} .
Compute the constants a, b, and c needed to find the stepsize by the following:
a = (2.6667, 0.6667, 1) · u = −23.5571,
b = (2.6667, 0.6667, 1) · v = 9.2639,
c = 26.6667 − (2.6667, 0.6667, 1) · c123 = −16.5017.
This yields
α1 = 0.486 and α2 = −1.2354.
We then take αS,1 = min{0.486} = 0.486.
Now we compute αS,2 . The null space



T
T
p
−
p
1 
4 2
 5
null 
 = null 
pT5 − pT3
8 8
30

−12

0
has basis {(6, −6, 1)T }. This gives
FS,2 = {x ∈ conv (S) : (6, −6, 1)x = (6, −6, 1)p5 = 0} .
Compute the constants a, b, and c needed to find the stepsize by the following:
a = (6, −6, 1) · u = −63.0079,
b = (6, −6, 1) · v = 9.2639,
c = 0 − (6, −6, 1) · c123 = −86.4501.
Since a2 + b2 − c2 < 0, the arc does not intersect FS,2 . Set αS,2 = ∞.
Finally, we compute αS,3 . The null space



T
T
p
−
p
1 
 4
 5
null 
 = null 
−6
pT5 − pT2
6
6

12

12
has basis {(0, −2, 1)T }. This gives
FS,3 = {x ∈ conv (S) : (0, −2, 1)x = (0, −2, 1)p5 = 0} .
Compute the constants a, b, and c needed to find the stepsize by the following:
a = (0, −2, 1) · u = −2.6679,
b = (0, −2, 1) · v = 9.2639,
c = 0 − (0, −2, 1) · c123 = 2.8477.
This yields
α1 = 0.5803, and α2 = 3.1221.
We then take αS,3 = min{0.5803, 3.1221} = 0.5803.
Take α∗ = min{0.486, 0.5803} = 0.486. We have hit facet FS,1 .
Figure 3.5 shows the current set S and the arc being traveled along until hitting FS,1 .
31
p1
p3
p2
p5
Figure 3.5: S = {p1 , p2 , p3 , p5 } and facet FS,1 is intersected first
Thus p1 must be removed from S. Set S = S\{p1 } = {p2 , p3 , p5 }.
Solve M(S): Intersecting spherical bisector B2,3 with aff (S) yields:
c2,3 = (15.5556, −14.222, 0)T ,
r2,3 = 18.3249,
u = (−5.8291, 16.8255, 4.3273)T ,
v = (−4.766, −5.938, 16.6681)T .
32
So the arc is





 




−4.766
−5.8291
15.5556






 






 

−14.222 +  16.8255  cos α +  −5.938  sin α : α > 0 .



 








 







16.6681
4.3273
0
Intersecting with the spherical bisector B3,5 where c3,5 = (0.8, 4.4, 21.6)T and r3,5 = 15.3675
yields:
a = −481.1528,
b = −310.2458,
c = −537.8469.
This gives α1 = 0.223, and α2 = 0.9224. Set α3,5 = 0.223.
We compute
FS,2

 


1 0
4
x =   .

24 
0 1




−0.5
= x ∈ conv (S) : 


3
Intersecting the arc with FS,2 yields:
a = 19.7401,
b = −3.555,
c = 25.
Since a2 + b2 − c2 < 0, set αS,2 = ∞.
Now we compute
FS,3




1
= x ∈ conv (S) : 


2
33
1
0

 


0
10
x =   .

1
20 
Intersecting the arc with FS,3 yields:
a = 10.9964,
b = −10.7041,
c = 10.6667.
This gives α1 = 0.0303 and α2 = −1.5742. Hence αS,3 = 0.0303.
Thus α∗ = 0.0303. We have hit facet FS,3 . Set S = {p2 , p5 }.
Solve M(S): Computing our solution as the weighted midpoint of p2 and p5 , we obtain

6.7273




w2 p2 + w5 p5

x=
= 3.2727
 with z = w2 ||p2 − x|| = 20.0413.
w2 + w5


6.5455

Since wi ||pi − x|| ≤ z ∀pi ∈ P , the current solution is optimal.
Figure 3.6 shows optimal solution, x.
34
p6
p5
p4
x
p1
p2
p3
Figure 3.6: Optimal solution, x = (6.7273, 3.2727, 6.5455)T
Figure 3.7 shows the optimal solution, x, and the minimum covering ball.
35
p6
p5
p4
x
p1
p2
p3
Figure 3.7: Minimum covering ball
3.2
Computational Results
The following computing environment was used to perform computational tests of the algo-
rithm.
MATLAB, version 7.6.0
Dell Inspiron 1525
Intel(R) Celeron(R) CPU
550 @ 2.00GHz
1.24GHz, 1.99GB of RAM
Microsoft Windows XP Home Edition
36
The algorithm was tested using m points that were uniformly distributed in [0, 10]×[0, 10]×
[0, 10] ⊂ R3 and in [0, 100] × [0, 100] × [0, 100] ⊂ R3 . The m weights were uniformly distributed on
[0, 10] ⊂ R and [0, 100] ⊂ R respectively. The algorithm was tested for m = 100, 1000, 10000. For
each problem we compute the number of iterations, the number of times that x is updated, and the
running time of the algorithm. Note the the number of updates of x is always greater than or equal
to the number of iterations. This is because whenever a facet is hit before a point of intersection
of the bisectors, then x will be updated more than once per subproblem (iteration). Ten sample
problems of each type were generated and then solved using the MATLAB code given Appendix 4.
Tables 3.1 and 3.2 give the ranges of the number of iterations, the number of updates of x, and the
computational running times for the ten sample problems.
Table 3.1: pi ∈ [0, 10] × [0, 10] × [0, 10], wi ∈ [0, 10]
m
iterations updates of x running time in seconds
100
12-35
17-50
0.032438-0.237625
1,000
23-48
32-60
0.077610-0.342823
10,000
40-58
52-98
0.303253-0.510228
Table 3.2: pi ∈ [0, 100] × [0, 100] × [0, 100], wi ∈ [0, 100]
m
iterations updates of x running time in seconds
100
18-32
22-42
0.069744-0.298838
1,000
19-44
23-55
0.069212-0.27341
10,000
35-87
25-64
0.200305-0.454915
37
Chapter 4
Conclusions and Discussion
This master’s thesis presents a dual algorithm for solving the weighted Euclidean min-max
location problem in R2 and R3 . Advantage was taken of the geometric structure of the problem.
Section 3.2 shows that the algorithm does appear to be quite efficient in practice. Improvements
can be made to this algorithm through certain preprocessing steps. For example, to initialize the
algorithm, we simply pick any two points. It would seem that if we chose two points that were a large
weighted distance from each other that this could potentially decrease the number of iterations. Also,
greater care can be taken in choosing the entering point, pi∗ , to the set S. In this implementation,
we choose the first point that was found to break optimality to be the entering point. However,
locating the point that is the greatest weighted distance from the solution could reduce the number
of iterations needed to solve the problem.
Future work can be done to extend this algorithm to higher dimensions, i.e., solving the
problem when the points lie in Rn where n ≥ 4. For example when each pi ∈ R4 , a particular hurdle
is determining the center of a sphere formed by intersecting two hyperspheres.
38
Appendix
MATLAB code
R3algorithm is the main code used to solve the weighted location problem in R3 . A is
the matrix containing the points, w is the vector containing their respective weights, S is the set of
points being used in the subproblem.
R3algorithm:
global A w S s tol inf
A=[0,0,0;10,0,0;8,8,0;6,4,8;4,6,12;18,6,21];
w=[1.5;2.5;2;1;3;1];
inf=10000000;
tol=0.0001;
% tolerance
iteration=1;
S=[1,2];
% Initialize our set S to points p1 and p2.
s=2;
% The size of S is s.
x=(w(1)*A(1,:)+w(2)*A(2,:))/(w(1)+w(2));
z= w(1)*norm(x-A(1,:));
% We will now test this initial solution for optimality.
[opt t]=optimalitytest(x,z);
if opt == 0
% We must update S since the current solution is not optimal.
39
[S]=update_subproblem(3,x,t,S);
end
while opt == 0
%Continue iterating until an optimal solution x is found.
if (s==2) && (opt==0)
% S consists of two points.
iteration=iteration+1;
x=(w(S(1))*A(S(1),:)+w(S(2))*A(S(2),:))/(w(S(1))+w(S(2)));
z=w(S(1))*norm(x-A(S(1),:));
[opt t]=optimalitytest(x,z);
% t is the entering point.
if opt==0
[S]=update_subproblem(3,x,t,S);
end
end
if (s==3) && (opt==0)
% S consists of 3 points.
iteration=iteration+1;
minalpha=inf;
if w(S(1))~=w(S(2))
%B12 is a sphere.
%Obtain the arc to be traveled along.
[C12 r12] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(2),:), w(S(2)));
Bmat=[A(S(1),:)-A(S(2),:);A(S(1),:)-A(S(3),:)];
N1=null(Bmat,’r’).’;
N=N1/norm(N1);
% N is the normal vector to aff(S).
[U V]=uv_sphereplane(x, C12, N, A(S(3),:));
R=norm(U);
% Intersect this arc with either sphere B13 or sphere B23.
if w(S(1))~=w(S(3))
%B13 is a sphere.
[C13 r13] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(3),:), w(S(3)));
[a1 b1 c1]=sphericalbisectors_abc(C12, R, C13,r13, U, V);
40
else
%B23 is a sphere
[C23 r23] = sphericalbisectorinfo(A(S(2),:), w(S(2)), A(S(3),:), w(S(3)));
[a1 b1 c1]=sphericalbisectors_abc(C12, R, C23,r23, U, V);
end
% Compute the stepsize needed to reach the point of intersection of the bisectors.
[alpha1 x1]=alpha_sphericalbisector(a1,b1,c1,U,V,C12);
if (alpha1>0) && (alpha1<minalpha)
minalpha=alpha1;
x=x1;
end
% Compute the stepsizes required to intersect the facets.
minat=0;
for j=1:s-1
[F f]=facet(j,3);
if abs(dot(U,F(1,:))) > tol
[a b c]=sphericalbisectorsintersectPlane_abc(C12,F(1,:),f(1), U, V);
else
[a b c]=sphericalbisectorsintersectPlane_abc(C12,F(2,:),f(2), U, V);
end
[alpha x2]=alpha_sphericalbisector(a,b,c,U,V,C12);
if (alpha>0) && (alpha<minalpha)
x=x2;
minalpha=alpha;
minat=j;
end
end
if minat>0
% A facet has been reached before the bisectors.
S(minat)=S(s-1);
S(s-1)=S(s);
41
s=s-1; % The size of S is decreased by 1 and p_minat is removed.
end
else
%B12 is a plane.
Compute the ray, d, to be traveled along.
[d]=direction(3);
%Intersect x+alpha*d with bisector B13.
if w(S(1))~=w(S(3))
%B13 is a sphere.
[C13 r13] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(3),:), w(S(3)));
[alpha1 x1]=alpha_lineintersectspherical(d,C13,r13,x);
else
%B13 is a plane.
[B,b]=bisector(1,3); % B13 is of the form Bx=b.
alpha1=intersect2(B,b,d,x);
end
if (alpha1>0) && (alpha1<minalpha)
minalpha=alpha1;
end
% Compute the stepsizes required to intersect the facets.
minat=0;
for j=1:s-1
% in this case j=1:2
[F f]=facet(j,3);
[alpha2]=intersect2(F,f,d,x);
if (alpha2>0) && (alpha2<minalpha)
minalpha=alpha2;
minat=j;
end
end
42
if minat>0
% A facet has been reached before the bisectors.
S(minat)=S(s-1);
S(s-1)=S(s);
s=s-1; % The size of S is decreased by 1 and p_minat is removed.
end
x=x+minalpha*d.’;
end
z= w(S(1))*norm(x-A(S(1),:));
if minalpha == alpha1 %The solution occurred at the intersection of the bisectors.
[opt t]=optimalitytest(x,z);
if opt==0
% The solution is not optimal.
[S]=update_subproblem(3,x,t,S);
end
end
end
if (s==4) && (opt==0)
% S consists of 4 points.
iteration=iteration+1;
minalpha=inf;
if w(S(1))~=w(S(2))
% Bisector B12 is a sphere.
[C12 r12] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(2),:), w(S(2)));
%Compute the arc to be traveled along.
if w(S(1))~=w(S(3))
% Bisector B13 is sphere
[C13 r13] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(3),:), w(S(3)));
[C]=circlecenter(C12, C13, r12, r13);
[U V]=uv(x, C, C12, C13, A(S(4),:));
else
% B23 must be a sphere.
[C23 r23] = sphericalbisectorinfo(A(S(2),:), w(S(2)), A(S(3),:), w(S(3)));
[C]=circlecenter(C12, C23, r12, r23);
43
[U V]=uv(x, C, C12, C23, A(S(4),:));
end
R=norm(U);
%Intersect the arc with B14.
if w(S(1))~=w(S(4))
%B14 is a sphere.
[C14 r14] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(4),:), w(S(4)));
[a1 b1 c1]=sphericalbisectors_abc(C, R, C14,r14, U, V);
[alpha1 x1]=alpha_sphericalbisector(a1,b1,c1,U,V,C);
else
%B14 is a plane
[B14 b14]=bisector(1,4);
[a1 b1 c1]=sphericalbisectorsintersectPlane_abc(C,B14,b14, U, V);
[alpha1 x1]=alpha_sphericalbisector(a1,b1,c1,U,V,C);
end
if (alpha1>0) && (alpha1<minalpha)
minalpha=alpha1;
x=x1;
end
% Compute the stepsizes required to intersect the facets.
minat=0;
for i=1:s-1
[F,f]=facet(i,3);
if abs(dot(U,F(1,:))) > tol
[a b c]=sphericalbisectorsintersectPlane_abc(C,F(1,:),f(1), U, V);
else
[a b c]=sphericalbisectorsintersectPlane_abc(C,F(2,:),f(2), U, V);
end
[alpha2 x2]=alpha_sphericalbisector(a,b,c,U,V,C);
if (alpha2>0)&&(alpha2<minalpha)
44
x=x2;
minalpha=alpha2;
minat=i;
end
end
if minat>0
% A facet has been reached before the bisectors.
S(minat)=S(s-1);
S(s-1)=S(s);
s=s-1; % The size of S is decreased by 1 and p_minat is removed.
end
else
%Bisector B12 is a plane
if w(S(1))==w(S(3))
% B13 is a plane.
% Compute the ray, d, to be traveled along.
[d]=direction(3);
%Intersect x+alpha*d with bisector B13.
if w(S(1))==w(S(4))
%B14 is a plane.
[B b]=bisector(1,4);
[alpha1]=intersect2(B,b,d,x);
x1=x+alpha1*d.’;
else
%B14 is a sphere.
[C14 r14] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(4),:), w(S(4)));
[alpha1 x1]=alpha_lineintersectspherical(d,C14,r14,x);
end
if (alpha1>0) && (alpha1<minalpha)
minalpha=alpha1;
end
45
% Compute the stepsizes required to intersect the facets.
minat=0;
for i=1:s-1
[F,f]=facet(i,3);
[alpha2]=intersect2(F,f,d,x);
x2=x+alpha2*d.’;
if (alpha2>0)&&(alpha2<minalpha)
x=x2;
minalpha=alpha2;
minat=i;
end
end
if minalpha==alpha1
% Solution occured at the intersection of the bisectors.
x=x1;
end
if minat>0
% A facet has been reached before the bisectors.
S(minat)=S(s-1);
S(s-1)=S(s);
s=s-1; % The size of S is decreased by 1 and p_minat is removed.
end
else
%
B13 is a sphere.
%Compute the arc to be traveled along.
[C13 r13] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(4),:), w(S(4)));
[B12 b12]=bisector(1,2);
[C] = circlecenter_planeandsphere(B12,b12,C13);
[U V]=uv_sphereplane(x, C, B12, A(S(4),:));
R=norm(U);
46
%Compute the stepsize needed to reach the intersection of the bisectors.
if w(S(1))~=w(S(4))
%B14 is a sphere.
[C14 r14] = sphericalbisectorinfo(A(S(1),:), w(S(1)), A(S(4),:), w(S(4)));
[a1 b1 c1]=sphericalbisectors_abc(C, R, C14,r14, U, V);
[alpha1 x1]=alpha_sphericalbisector(a1,b1,c1,U,V,C);
else
%B14 is a plane
[B14 b14]=bisector(1,4);
[a1 b1 c1]=sphericalbisectorsintersectPlane_abc(C,B14,b14, U, V);
[alpha1 x1]=alpha_sphericalbisector(a1,b1,c1,U,V,C);
end
if (alpha1>0) && (alpha1<minalpha)
minalpha=alpha1;
x=x1;
end
% Compute the stepsizes required to intersect the facets.
minat=0;
for i=1:s-1
[F,f]=facet(i,3);
[a b c]=sphericalbisectorsintersectPlane_abc(C,F,f, U, V);
[alpha2 x2]=alpha_sphericalbisector(a,b,c,U,V,C);
if (alpha2>0)&&(alpha2<minalpha)
x=x2;
minalpha=alpha2;
minat=i;
end
end
if minat>0
% A facet has been reached before the bisectors.
S(minat)=S(s-1);
47
S(s-1)=S(s);
s=s-1;
% The size of S is decreased by 1 and p_minat is removed.
end
end
end
z= w(S(1))*norm(x-A(S(1),:));
if minalpha == alpha1
% The solution occurred at the intersection of the bisectors.
[opt t]=optimalitytest(x,z);
if opt==0
% The solution is not optimal.
[S]=update_subproblem(3,x,t,S);
end
end
end
end
% We have found the optimal solution.
for i=1:s
set(i)=S(i);
end
iteration
% Gives the number of iterations needed to solve the problem.
set
% Gives our final set S.
x
% This is the optimal solution.
z
% This is the optimal objective function value.
alpha lineintersectspherical is called when the the path being traveled is a ray, and it
intersects with a spherical bisector. This function then returns the stepsize alpha required to find
the point of intersection of the bisectors.
function [alpha x]=alpha_lineintersectspherical(d,C13,r13,x)
global inf
vec=x-C13;
48
a=norm(d)^2;
b=2*dot(d,vec);
c=-r13^2+norm(vec)^2;
if b^2-4*a*c >= 0
alpha1 = (-b+sqrt(b^2 - 4*a*c))/(2*a);
alpha2 = (-b-sqrt(b^2 - 4*a*c))/(2*a);
if (alpha1 >= 0) && (alpha2>=0)
alpha = min([alpha1,alpha2]);
end
if (alpha1 >= 0) && (alpha2<0)
alpha = alpha1;
end
if (alpha1 < 0) && (alpha2>=0)
alpha = alpha2;
end
if (alpha1 < 0) && (alpha2 < 0)
alpha=inf;
end
else
alpha = inf;
end
x=x+alpha*d.’;
end
alpha sphericalbisector is called when the the path being traveled is an arc, and it
intersects with a spherical bisector. This function then returns the stepsize alpha required to find
the point of intersection of the bisectors.
function [alpha x]=alpha_sphericalbisector(a,b,c,U,V,C)
global inf tol
49
if a^2+b^2-c^2 >= 0
a=a+tol;
b=b+tol;
c=c+tol;
beta1 = atan2(((-a*(c*a+(a^2*b^2+b^4-b^2*c^2)^(1/2))/(a^2+b^2)+c)/b),
((c*a+(a^2*b^2+b^4-b^2*c^2)^(1/2))/(a^2+b^2)));
beta2 = atan2(((-a*(c*a-(a^2*b^2+b^4-b^2*c^2)^(1/2))/(a^2+b^2)+c)/b),
((c*a-(a^2*b^2+b^4-b^2*c^2)^(1/2))/(a^2+b^2)));
x1 = C + U.’*cos(beta1) + V.’*sin(beta1);
%These are the two intersection points.
x2 = C + U.’*cos(beta2) + V.’*sin(beta2);
if (beta1>0) && (beta2>0)
% Choose the minimum positive alpha to be our potential solution.
alpha=min([beta1, beta2]);
if alpha==beta1
x=x1;
else
x=x2;
end
elseif (beta1>0) && (beta2<0)
alpha=beta1;
x=x1;
elseif (beta1<0) && (beta2>0)
alpha=beta2;
x=x2;
else
alpha=inf;
x=[inf,inf];
end
else
50
alpha=inf;
x=[inf,inf];
end
bisector [12, p. 34] computes B and b so that Bij , ik = {x ∈ R3 : Bx = b}.
function [B,b]=bisector(j,k)
global A S
B=A(S(j),:)-A(S(k),:);
midpoint=(A(S(j),:)+A(S(k),:))/2;
b=B*midpoint.’;
circlecenter computes the center of the circle formed by intersecting two spherical bisectors.
function [C]=circlecenter(C12, C13, r12, r13)
N=C13-C12;
% Compute the normal vector to the plane in which the circle lies.
a=0.5*(r12^2-r13^2+norm(C13)^2-norm(C12)^2);
l=dot((N/norm(N)),C12) - a/norm(N);
% Compute the distance from C12 to the plane.
C = C12-l*N/norm(N);
circlecenter planeandsphere computes the center of the circle formed by intersecting a
plane and a sphere.
function [C] = circlecenter_planeandsphere(F,f,C_sphere)
%Fx=f is the equation of the plane bisector.
% l is the distance from the center of the sphere to the plane.
l = dot((F/norm(F)),C_sphere)-f/norm(F);
C=C_sphere-l*F/norm(F);
51
compute V(n) [12, p. 33] computes the matrix V that consists of the vectors vk that
determine sub(S).
function [W]=compute_W(n)
global A S s
W=[];
for j=1:s-1
u=A(S(j),:)-A(S(s),:);
for l=1:n
U(j,l)=u(l);
end
end
W=null(U,’r’);
direction(n) [12, p. 35] computes computes the direction vector, d.
function [d]=direction(n)
global A S s
[W]=compute_W(n);
C=[];
C=W.’;
k=n-s+1;
for i=2:s
c=A(S(i),:)-A(S(1),:);
k=k+1;
for j=1:n
C(k,j)=c(j);
end
52
end
b=[];
for i=1:n-1
b(i)=0;
end
b(n)=1;
d=C\(b.’);
facet [12, p. 34] computes computes F and f such that facet FS,ij = {x : F x = f }.
function [F,f]=facet(j,n)
global S A s
rows=0;
for l=1:s-2
rows=rows+1;
a=A(S(mod(j,s)+1),:)-A(S(mod(j+l,s)+1),:);
for k=1:n
B(rows,k)=a(k);
end
end
F=null(B,’r’);
F=F.’;
A(S(mod(j,s)+1),:).’;
f=F*A(S(mod(j,s)+1),:).’;
intersect2 [12, p. 34] computes the stepsize required in traveling along a ray until intersecting a planar bisector or a facet of the form F x = f .
function [alpha]=intersect2(F,f,d,x)
53
alpha=F*d\(f-F*x.’);
end
optimalitytest checks if the current solution (x, z) is optimal. If the solution is not optimal,
it returns the index of the new entering point.
function [opt t]=optimalitytest(x,z)
global A w tol
opt = 1;
% If optimal, opt will stay at 1.
i=3; t=0;
n=size(A,1);
while i<=n && opt==1
if w(i)*norm(x-A(i,:))-tol > z
opt = 0; % The current solution is not optimal.
t = i;
% Point t will be our entering point.
else
i=i+1;
end
end
ReplacementRule [12, p. 32] determines the leaving point in S, deletes it, and adds the
entering point.
function [S]=ReplacementRule(n,t,x,S)
global A s w
for i=1:s;
B(1,i)=1;
end
54
for i=2:n+1
for j=1:s
B(i,j)= w(S(j))*(A(S(j),i-1)-x(i-1));
end
end
a(1)=1;
for i=2:n+1
a(i)=0;
end
a=a.’;
%compute pi
pi=B\a;
b(1)=-1;
for i=2:n+1
b(i)=x(i-1)-A(t,i-1);
end
b=b.’;
%compute d
d=B\b;
%minimum ratio rule
minratio=10000000000;
for i=1:s
if (d(i)<0) && (minratio>pi(i)/(-d(i)))
minratio=pi(i)/(-d(i));
j=i;
%index of leaving point.
end
end
55
S(j)=S(s);
S(s)=t;
%Place the old last entry of S to be in the position of j the leaving point.
%The last point in S will be the newly entered one.
sphericalbisectorinfo computes the center and radius of a spherical bisector.
function [C12 r12] = sphericalbisectorinfo(P1, w1, P2, w2)
C12 = (w1^2*P1-w2^2*P2)/(w1^2-w2^2);
% center of the bisector
r12=(w1*w2*norm(P1-P2))/(abs(w1^2-w2^2));
% radius of the bisector
sphericalbisectors abc computes the constants a, b, c needed to find the stepsize when
traveling along an arc and intersecting with a spherical bisector.
function [a b c]=sphericalbisectors_abc(C, R, C14,r14, U, V)
%C and R are the center and radius of the arc (circle) being traveled
%along until intersecting with sphere B14.
%U and V span the plane containing the circle.
d2=(C(1)-C14(1))^2+(C(2)-C14(2))^2+(C(3)-C14(3))^2;
C1=C-C14;
a=dot(C1,U);
b=dot(C1, V);
c=0.5*(r14^2-d2-R^2);
sphericalbisectors abc computes the constants a, b, c needed to find the stepsize when
traveling along an arc and intersecting with a planar bisector.
function [a b c]=sphericalbisectorsintersectPlane_abc(C,N,s, U, V)
%C and R are the center and radius of the arc (circle) being traveled
%along until intersecting with plane B14 which is of the form N.(x,y,z)=s.
%U and V span the plane containing the circle.
56
a=dot(N(1,:),U);
b=dot(N(1,:),V);
c=s-dot(N(1,:),C);
update subproblem [12, p. 33] determines whether the vectors created by the points
in S are affinely independent. If so, update subproblem adds the new point to S. If not, update subproblem calls ReplacementRule and updates S.
function [S]=update_subproblem(n,x,t,S)
global A s
if s==n+1
[S]=ReplacementRule(3,t,x,S);
else
%We must test that if the vectors are affinely independent or not.
[W]=compute_W(n).’;
enteringpointinA=1;
% If this stays 1, then the vectors are affinely dependent.
for i=1:n-s+1
for j=1:n
w(j)=W(i,j);
end
if abs(dot(w,A(t,:)-x))>0
s=s+1;
%increases the size of S by 1.
S(s)=t; % assigns the entering point to the last position in S.
enteringpointinA=0;
break
end
end
if enteringpointinA==1
% The vectors are affinely dependent.
[S]=ReplacementRule(3,t,x,S);
end
57
So a point must leave S.
end
end
uv computes the vectors u and v that determine the arc cjkl + u cos α + v sin α that is
created by the intersection of two spheres.
function [U V]=uv(xold, C, C12, C13, P4)
% B12 and B13 are intersected to form the arc to be traveled along.
% P4 is the most recently entered point.
% xold is the current solution.
% C is the center of the arc.
Ubar=(xold-C);
Cprime=C13-C12;
Pprime=P4-C;
mat = [Cprime;Ubar;Pprime];
rhs=[0;0;1];
Vbar=mat \ rhs;
U=Ubar.’;
V=(Vbar/norm(Vbar))*norm(U).’;
uv sphereplane computes the vectors u and v that determine the arc cjkl +u cos α+v sin α
that is created by the intersection of a sphere and a plane.
function [U V]=uv_sphereplane(xold, C, F, P4)
% F is the normal vector to the plane
% P4 is the most recently entered point.
% xold is the current solution.
% C is the center of the arc.
Ubar=(xold-C);
Pprime=P4-C;
58
mat = [F;Ubar;Pprime];
rhs=[0;0;1];
Vbar=mat \ rhs;
U=Ubar.’;
V=(Vbar/norm(Vbar))*norm(U).’;
59
Bibliography
[1] F. Aurenhammer and R. Klein. Voronoi diagrams. In Sack and ed. Urrutia, editors, Handook
of Computational Geometry, pages 201–290. North Holland, 2000.
[2] P.M. Dearing and P. Thipwiwatpotjana. One-center location with block and euclidean distance.
Journal of Research of NIST, 111:89–96, 2006.
[3] P.M. Dearing and C. Zeck. A dual algorithm for the minimum covering ball problem in Rn .
Operations Research Letters, to appear.
[4] Z. Drezner and H.W. Hamacher (ed). Facility Location: Application and Theory. SpringerVerlag, New York, 2002.
[5] Z. Drezner (ed). Facility Location: A Survey of Applications and Methods. Springer-Verlag,
New York, 1995.
[6] J. Elzinga and D.W. Hearn. Geometrical solutions for some minimax location problems. Transportation Science, 6:379–394, 1972.
[7] J. Elzinga and D.W. Hearn. The minimum covering sphere problem. Management Science,
19:96–104, 1972.
[8] D.W. Hearn and J. Vijay. Efficient algorithms for the(weighted) minimum circle problem.
Operations Research, 30:777–795, 1982.
[9] Megiddo. Linear time algorithm for linear programming in IR3 and related problems. SIAM
Journal of Computing, 12:759–776, 1983.
[10] J.J. Sylvester. A question in the geometry of situation. Quart.J. Pure Appl. Math., 1(79), 1857.
[11] J.J. Sylvester. On poncelet’s approximate linear valuation of surd forms. Philosophical Magazine, xx(Fourth Series):203–222, 1860.
[12] Christiane R. Zeck. A dual algorithm for the minmax location problem in Rn . Master’s thesis,
Clemson University, July 2007.
60