# Selecting Remote Driving Locations for Latency Sensitive Reliable Tele-Operation
## 3 Selecting Driving Locations for Multiple Paths
### Selecting a Fixed Number of Driving Locations for Smallest Distance  
Now, let us turn our focus to Objective II. As we have seen earlier, in Objective II, the size of the driving locations is fixed to a certain constant. Thus, if we want to choose \(k\) driving locations from the candidate driving location set \(\mathcal{F}\), there are \(\binom{|\mathcal{F}|}{k}\) different sets of \(k\) driving locations. In Objective II, we want to select the driving location set \(D\) that has the smallest distance to the base station set \(B\) of \(P\). Thus, the algorithms for Objective II try to find a set of \(k\) driving locations, \(D\), that minimizes the \(Dist_{max}(D,B)\). In other words,  
\[D=\operatorname*{argmin}_{D\in\mathcal{P}(\mathcal{F}k)}Dist_{max}(D,B) \tag{4}\]  
where \(\mathcal{P}(\mathcal{F},k)\) is the set of all possible subsets that has \(k\) members of \(\mathcal{F}\). However, finding the best set may not be feasible since \(\binom{|\mathcal{F}|}{k}\) is very large. Instead, we propose two heuristic algorithms that find an approximate solution of Equation (4). In short, we want to have a set \(D\) that has as small value of \(Dist_{max}(D,B)\) of Equation (1) as possible. Before we propose heuristic algorithms, we first describe a baseline algorithm called \"Random Search\". In \"Random Search\", we randomly select a driving location set \(D\) from \(\mathcal{P}(\mathcal{F},k)\). Then, we compute \(Dist_{max}(D,B)\). We repeat this procedure for a certain number of iterations and choose the driving location set, \(D\), that gives the smallest distance \(Dist_{max}(D,B)\) so far. Intuitively, if we increase the number of iterations of \"Random Search\", the result becomes better. Now we propose two heuristic algorithms, which are based on binary search and k-means algorithms, respectively. The first heuristic algorithm is called \"BS\", which exploits ERDSMP. Since ERDSMP finds a small set of drivers for the given latency constraint \(L\), we systematically try different values of \(L\) for ERDSMP and find the set of driving locations corresponding to \(L\). If we can find a smallest \(L\) for which ERDSMP generates exactly \(k\) driving locations, the resulting set of \(k\) driving locations is the solution of the objective II. One way to do this is to check \(L\) sequentially. So we just start from a very small \(L\) and run ERDSMP. We repeat this procedure by increasing \(L\) slightly. When \(L\) is small, the resulting set of ERDSMP may contain a large number of driving locations. However, if we increase \(L\), then the size of the resulting set of ERDSMP decreases. When the size of the resulting set of ERDSMP is \(k\), we can stop. However, this kind of _sequential_ search may take very long time. Since the problem is just a simple search problem, instead of using sequential search, we use a _binary search_ method to search the smallest \(L\) for which ERDSMP find \(k\) driving locations. The details are shown in Algorithm 3. One thing to note is that since \(L\) is a real number, we cannot search all the possible values of \(L\). Instead, we search the values of \(L\) in the granularity of \(\delta\), which is a very small value, for example, 0.1 unit of the distances. Now, we describe another heuristic algorithm called \"K-Means\", which is based on k-means clustering algorithm [35]. Since we want to select \(k\) driving locations that can cover a set of base stations and we want the distance as small as possible, we apply \(k\)-means algorithm over the set of base stations \(B\) of \(P\). This provides the centroids of \(k\) clusters. However, the centroids may not coincide with the candidate driving locations \(\mathcal{F}\). Thus, we choose the closest driving location to each centroid, which finds \(k\) driving locations from \(\mathcal{F}\). Since the algorithm is as simple as it is, we do not elaborate further. Actually, as we have seen in Equation (4), this problem is an optimization problem, in which the constraint is \(k\), and we try to minimize the distance.