# Globally Optimal Facility Locations for Continuous-Space Facility Location Problems
## 3 Location Estimation Based on the Manhattan Distance
### Minimum Distance Approach
The above definitions on the empirical distribution and the sample quantile do not consider the weights of the observations. Thus, the definitions with weights are given below. **Definition 4**. : _Given a set of observations \(x_{1}\),\(x_{2}\),..., \(x_{n}\) with corresponding positive weights \(\omega_{1}\),\(\omega_{2}\),..., \(\omega_{n}\) such that \(\sum_{i}^{n}{}_{=1}\omega_{i}=1\), we have the empirical cumulative distribution function \(G_{n}(x)\) with weights, which is defined as_  
\[G_{n}(x)=\sum_{i=1}^{n}\omega_{i}\mathrm{I}(x_{i}\leq x) \tag{16}\]  
Note that the above \(G_{n}\) includes the conventional empirical cumulative distribution function \(F_{n}\) in (8), as a special case when \(\omega_{i}=1/n\). Similar to the definition of the sample quantile function in Csorgo [60], we define the sample quantile function with weights. **Definition 5**. : _Given a set of observations \(x_{1}\),\(x_{2}\),..., \(x_{n}\) with corresponding positive weights \(\omega_{1}\),\(\omega_{2}\),..., \(\omega_{n}\) such that \(\sum_{i}^{n}=1\omega_{i}=1\), the sample left and right quantiles with weights are given by_  
\[G_{n,L}{}^{-1}(p)=\inf\left\{x:G_{n}(x)\geq p\right\} \tag{17}\]  
\[G_{n,R}{}^{-1}(p)=\inf\left\{x:G_{n}(x)>p\right\} \tag{18}\]  
Next, our goal is to obtain the minimizer of the \(\Psi_{3}\) in (3). As the weighted medians for the \(x\)-axis, \(y\)-axis, and \(z\)-axis observations can be calculated separately, we only focus on the weighted median of \(x\)-axis observations, which are given by  
\[G_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:G_{n}(x)\geq\frac{1}{2 }\right\}=x_{(k)}\text{ if }\sum_{j=1}^{k-1}\omega_{(j)}<\frac{1}{2}\leq\sum_{j=1}^{k}\omega_{(j)},\ k=1,2, \ldots,n \tag{19}\]  
\[F_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:F_{n}(x)\geq\frac{1}{2} \right\}=x_{(k)}\text{ if }\frac{k-1}{n}<\frac{1}{2}\leq\frac{k}{n},\ k=1,2, \ldots,n \tag{11}\]0  
where \(\omega_{(j)}\) is the weight for \(x_{(j)}\). According to the equations in (14) and (20), we can deduce the following equation. Then, we have  
\[F_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:F_{n}(x)\geq\frac{1}{2} \right\}=x_{(k)}\text{ if }\frac{k-1}{n}<\frac{1}{2}\leq\frac{k}{n},\ k=1,2, \ldots,n \tag{11}\]1  
It is obvious that the above \(x_{(k)}\) minimizes the weighted Manhattan distance. However, it is not a unique minimizer when there is a tied value at \(\sum_{j=1}^{k}\omega_{(j)}=1/2\). Thus, we have two cases and both of them are the minimizers to the objective function:  
(i) \(\sum_{j=1}^{k-1}\omega_{(j)}<1/2\) and \(1/2<\sum_{j=1}^{k}\omega_{(j)}\)  
(ii) \(\sum_{j=1}^{k-1}\omega_{(j)}<1/2\) and \(1/2=\sum_{j=1}^{k}\omega_{(j)}\)  
Because the minimizer of \(\Psi_{3}\), denoted by \(\widetilde{u}\), \(\widetilde{v}\), and \(\widetilde{w}\) can be calculated separately. Based on the weighted median obtained in this subsection, the globally optimal location of the facility in a three-dimensional space is given by  
\[F_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:F_{n}(x)\geq\frac{1}{2} \right\}=x_{(k)}\text{ if }\frac{k-1}{n}<\frac{1}{2}\leq\frac{k}{n},\ k=1,2, \ldots,n \tag{11}\]2  
\[F_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:F_{n}(x)\geq\frac{1}{2} \right\}=x_{(k)}\text{ if }\frac{k-1}{n}<\frac{1}{2}\leq\frac{k}{n},\ k=1,2, \ldots,n \tag{11}\]3  
\[F_{n,L}{}^{-1}\bigg{(}\frac{1}{2}\bigg{)}=\inf\left\{x:F_{n}(x)\geq\frac{1}{2} \right\}=x_{(k)}\text{ if }\frac{k-1}{n}<\frac{1}{2}\leq\frac{k}{n},\ k=1,2, \ldots,n \tag{11}\]4  
In addition, the globally optimal location of the facility in a two-dimensional plane is easily obtained by (22) and (23). For the higher-dimensional (\(d=4,\ 5,\ldots\)) globally optimal facility location problem with Manhattan distance, the main task is to calculate each of the weighted medians for all the axes. Then, the optimal facility location in a higher-dimensional hyperspace can be obtained.