α-Probabilistic flexible aggregate nearest neighbor search in road networks using landmark multidimensional scaling

In spatial database and road network applications, the search for the nearest neighbor (NN) from a given query object q is the most fundamental and important problem. Aggregate nearest neighbor (ANN) search is an extension of the NN search with a set of query objects Q={q0,⋯,qM-1}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q = \{ q_0, \dots , q_{M-1} \}$$\end{document} and finds the object p∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p^*$$\end{document} that minimizes g{d(p∗,qi),qi∈Q}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g \{ d(p^*, q_i), q_i \in Q \}$$\end{document}, where g (max or sum) is an aggregate function and d() is a distance function between two objects. Flexible aggregate nearest neighbor (FANN) search is an extension of the ANN search with the introduction of a flexibility factor ϕ(0<ϕ≤1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi \, (0 < \phi \le 1)$$\end{document} and finds the object p∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p^*$$\end{document} and the set of query objects Qϕ∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q^*_\phi $$\end{document} that minimize g{d(p∗,qi),qi∈Qϕ∗}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g \{ d(p^*, q_i), q_i \in Q^*_\phi \}$$\end{document}, where Qϕ∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q^*_\phi $$\end{document} can be any subset of Q of size ϕ|Q|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi |Q|$$\end{document}. This study proposes an efficient α\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha $$\end{document}-probabilistic FANN search algorithm in road networks. The state-of-the-art FANN search algorithm in road networks, which is known as IER-kNN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k\hbox {NN}$$\end{document}, used the Euclidean distance based on the two-dimensional coordinates of objects when choosing an R-tree node that most potentially contains p∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p^*$$\end{document}. However, since the Euclidean distance is significantly different from the actual shortest-path distance between objects, IER-kNN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k\hbox {NN}$$\end{document} looks up many unnecessary nodes, thereby incurring many calculations of ‘expensive’ shortest-path distances and eventually performance degradation. The proposed algorithm transforms road network objects into k-dimensional Euclidean space objects while preserving the distances between them as much as possible using landmark multidimensional scaling (LMDS). Since the Euclidean distance after LMDS transformation is very close to the shortest-path distance, the lookup of unnecessary R-tree nodes and the calculation of expensive shortest-path distances are reduced significantly, thereby greatly improving the search performance. As a result of performance comparison experiments conducted for various real road networks and parameters, the proposed algorithm always achieved higher performance than IER-kNN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k\hbox {NN}$$\end{document}; the performance (execution time) of the proposed algorithm was improved by up to 10.87 times without loss of accuracy.


Introduction
The search for the nearest neighbor (NN) in spatial database and road network applications is the most fundamental and important problem and has been studied extensively for many years [1][2][3][4]. With the recent advances and wide use of mobile devices and GPS systems, studies on various applications and services using the NN search are being actively conducted. The conventional NN search finds the nearest object p * (∈ D) from a query object q among target objects D = {p 0 , … , p N−1 } [1,5]. In other words, for all objects p j (0 ≤ j < N) in D , it holds that d(p * , q) ≤ d(p j , q) , where d() is a distance function between two objects.
Aggregate nearest neighbor (ANN) search is an extension of the NN search with M (≥ 1) query objects Q = {q 0 , … , q M−1 } , where M = |Q| [2,4,6,7]. The ANN search finds the object p * that minimizes g(p, Q) among target objects, where g is an aggregate function (max or sum), and g(p, Q) is defined as g(p, Q) = g{d(p, q i ), q i ∈ Q} . In other words, it holds that g(p * , Q) ≤ g(p j , Q) for every object p j in D . The existing studies only considered g = max and sum; for g = min and count, the search is trivial, and for g = average, it is almost the same as that for g = sum. When M = 1 , the ANN search is identical to the NN search. The following are application examples of the ANN search: -To quickly convene all members for an emergency meeting, it is advantageous to select a location that minimizes the (maximum) distance of the farthest member. -To maximize the profit from customers when constructing a new building (e.g., hospital and supermarket), the location of the new building should be determined such that the sum of distances from all potential customers should be minimized.
Flexible aggregate nearest neighbor (FANN) search was investigated in [3,8,9], which introduced a flexibility factor (0 < ≤ 1) to extend the ANN search. The FANN search finds the object p * and the query subset Q * that minimize g(p, Q ) (Q ⊂ Q) . In other words, for every object p j in D and every subset Q of Q, it holds that g(p * , Q * ) ≤ g(p j , Q ) . In the applications of the ANN search described above, if the emergency meeting can be held only with M members or if M key customers are targeted rather than all potential customers, the FANN search is more useful and efficient than the ANN search. If = 1 , the FANN search is identical to the ANN search. If the FANN search problem is solved simply using an ANN algorithm, the ANN algorithm must be executed for every possible Q (⊂ Q) . Since the number of Q , which is |Q| |Q | , is extremely large, this 1 3 approach is highly inefficient. For instance, for |Q| = 1024 and = 0.5, the ANN algorithm must be executed 4.48 × 10 306 times. The previous ANN and FANN algorithms were studied separately for Euclidean spaces and road networks. The road network is usually represented using a graph data structure; each object, i.e., a point of interest (POI) corresponds to a vertex, and each physical/logical path between adjacent objects corresponds to an edge. The distance between two objects in road networks is defined as the shortest-path distance between them. The Dijkstra's algorithm, which is a representative shortest-path algorithm, has a complexity as high as O(E + V log V) , where V and E are the numbers of vertices and edges, respectively [10]. Although there are more efficient shortest-path algorithms proposed recently, their complexities are much higher than that of distance calculation between two points in a Euclidean space. Yao et al. [3] proposed various exact and approximate FANN algorithms and experimentally demonstrated that the algorithm, known as IER-kNN , using the R-tree [5] had the highest performance for almost all road networks and parameters. IER-kNN used the Euclidean distance based on two-dimensional (2-D) coordinates of objects when choosing the R-tree node that most potentially contains p * . However, since the Euclidean distance between two objects is significantly different from the shortest-path distance between them, IER-kNN incurs many unnecessary node lookups and many calculations of 'expensive' shortestpath distances.
This study proposes an efficient FANN search algorithm in road networks. The contributions of this study are summarized as follows: -The proposed algorithm uses landmark multidimensional scaling (LMDS) [11,12] to transform all objects in a road network into k-dimensional objects (k ≥ 1) such that the distances between the objects are preserved as much as possible. The Euclidean distances between objects after LMDS transformation can be obtained very quickly and accurately. Since the proposed algorithm uses a more accurate distance than the state-of-the-art IER-kNN algorithm when choosing an R-tree node to visit, unnecessary node lookups and calculations of shortest-path distances are significantly reduced, thereby greatly improving the FANN search performance of the proposed algorithm. -The correctness of the proposed algorithm is proven based on a probabilistic assumption. The proposed algorithm is probabilistic in the sense that, for a given probability , it 'assumes' the interval of differences between the actual shortestpath distances and the estimated k-dimensional Euclidean distances. -A series of experiments were conducted to compare the performance of the proposed algorithm and the state-of-the-art IER-kNN algorithm using various real road networks. As a result, the proposed algorithm always achieved higher performance for all road networks and parameters than IER-kNN ; the performance (execution time) of the proposed algorithm was improved by up to 10.87 times without loss of accuracy.
This paper is organized as follows: Sect. 2 briefly describes the previous ANN and FANN search algorithms and LMDS. Section 3 explains the proposed algorithm 1 3 α-Probabilistic flexible aggregate nearest neighbor search… in detail, and Sect. 4 evaluates the performance of the proposed algorithm. Finally, Sect. 5 concludes this paper.

Related work
This section briefly introduces the previous ANN and FANN search algorithms in Euclidean spaces and road networks. Thereafter, it explains multidimensional scaling (MDS) that transforms objects in a metric space into those in a Euclidean space. Yiu et al. [4] proposed three algorithms for the ANN search in road networks. The first algorithm was designed by applying the Incremental Euclidean Restriction (IER) paradigm; it prunes an R-tree node n based on the Euclidean distances from the node n to query objects. The remaining two algorithms were adaptations of the existing top-k algorithm, which finds the k nearest query objects based on their shortest-path distances. Ioup et al. [2] proposed an algorithm for the ANN search in road networks using the M-tree [13]. However, this algorithm returns only approximate search results, and the error range of the search results is not known.
Li et al. [8,9] investigated the FANN search in Euclidean spaces. They presented two exact algorithms, namely the R-tree algorithm and the list algorithm. Li et al. [8,9] also proposed a 3-approximate algorithm and a (1 + 2

√
2)-approximate algorithm for aggregate functions g = sum and max, respectively. Li et al. [9] additionally presented a 2-approximate algorithm in a 2-D space and a (1 + )-approximate algorithm in a low-dimensional space for each of g = sum and max.
Yao et al. [3] handled the FANN search in road networks and proposed three algorithms, namely Dijkstra-based algorithm, R-List algorithm, and the IER-kNN algorithm. In addition, they presented an exact algorithm and a 2-approximate algorithm requiring no indices for g = max and sum, respectively. Among these algorithms, IER-kNN showed almost always the highest performance. However, as in [4], IER-kNN used an index constructed using 2-D Euclidean coordinates instead of the actual shortest-path distances between objects. The algorithms requiring no indices showed very low search performance as expected.
MDS [14,15] is a method of transforming objects in a metric space into objects (i.e., points) in a k-dimensional Euclidean space while preserving the distances between objects as much as possible, where k (≥ 1) can be given arbitrarily. MDS is also used for dimensionality reduction and visualization for objects in a highdimensional Euclidean space. Classical MDS [14], which is most widely known, has the advantage of providing highly accurate transformation results, but it also has the disadvantage of very high time complexity of O(CN 2 + N 3 ) , where N is the number of objects and C is the cost for distance calculation. LMDS [11,12] was proposed to overcome the disadvantage of classical MDS. Classical MDS requires a distance matrix of size N × N for every possible object pair, but LMDS uses only a distance matrix of size N × n for every combination between randomly chosen n (≪ N) 'landmark' objects and all objects, and has the time complexity of O(CnN + knN + n 3 ) , which is much lower than that of classical MDS. The efficiency and accuracy of LMDS have been demonstrated in [12,15]. Section 4 also demonstrates experimentally that LMDS significantly improves FANN search performance.

IER-LMDS: Efficient FANN algorithm in road networks
This section explains in detail the proposed FANN algorithm, which is referred to as IER-LMDS hereinafter. The IER-LMDS algorithm greatly improves FANN search performance by significantly reducing the calculations of expensive shortest-path distances between two objects compared with IER-kNN [3]. Table 1 summarizes the notations used in this study.
In this study, road network objects are mapped into those in a metric space as in [2]. The metric space is formally defined as a (D, d) pair, where D is a set of objects, and d ∶ D × D → ℝ is a distance function between two arbitrary objects in D satisfying the following three properties for any objects O a , O b , and O c (∈ D): The shortest-path distance between road network objects satisfies the above three properties if all edges are undirected edges with positive weights and there is no self-loop edge. We consider only the road networks satisfying the conditions in this study.
Algorithm 1 outlines the IER-LMDS algorithm. The basic architecture is similar to that of the previous FANN algorithms in Euclidean spaces and road networks [3,9]. IER-LMDS and the previous algorithms commonly store the nodes n of the R-tree in a priority queue H and extract them from H in the order of n.ĝ (line 6 of Algorithm 1), where n.ĝ is the estimated FANN distance of node n (explained in detail later), and is obtained using the estimated distance d between two objects. It is obvious that the estimated distance d that is closer to the actual shortest-path distance d is more advantageous for reducing the lookups of unnecessary nodes n and the calculations of 'expensive' distances d for the objects in the nodes n. While IER-kNN uses the Euclidean distance d (2) based on 2-D coordinates of objects when calculating n.ĝ , IER-LMDS uses the Euclidean distance d (k) based on the k-dimensional coordinates of objects obtained through LMDS transformation. While the distance d (2) is significantly different from the actual shortest-path distance d, the distance d (k) is very close to d as explained in Sect. 2. This is quantitatively shown using real road network datasets in Sect. 4. Figure 1 shows an example of distribution of X = d −d (k) for a sample of 10,000 object pairs obtained after LMDS transformation of a real road network dataset. As shown in this figure, the sample mean X is very close to 0, and the sample standard deviation S is also very small. To identify the distribution of X, we conducted Kolmogorov-Smirnov tests (K-S tests) [16] for diverse probability distributions. The K-S test for a probability distribution returns the 'goodness-of-fit' statistic, which represents the difference between the given sample data and the specified probability distribution function values. Our tests yielded the best statistics for the normal distribution and Student's t-distribution. Since the t-distribution becomes closer to a normal distribution as the degree of freedom (= n − 1) increases, where n is the number of samples, we assume that X follows a normal distribution. The mean and standard deviation of the population are estimated as those obtained from a sample of a sufficiently large size, i.e., it is assumed that X ∼ N(X, S 2 ).
Each line of Algorithm 1 is explained in detail as follows: first, LMDS transformation is performed for the given road network dataset R . For LMDS, two parameters n and k (≤ n) are required as described in Sect. 2. The values of these two parameters are directly proportional to accuracy of the LMDS transformation.
However, the larger values of these two parameters generally lead to a longer transformation time. In particular, if k becomes very large, the search performance is dramatically degraded when using a multi-dimensional index such as the R-tree constructed using the k-dimensional objects. This phenomenon is known as the high-dimensionality problem or high-dimensionality curse [17]. In the experiments in Sect. 4, n and k were set as n = 50 and k = 4 . After storing all the k-dimensional objects in an R-tree, the root node of the R-tree is stored in the priority queue H, and the FANN distance p * .g of the object p * is set to infinity.
The while loop in lines 5-16 of Algorithm 1 is performed once for every node n that has not been pruned in H. In line 6, the node with the smallest n.ĝ is extracted among all nodes n in H. If n is a non-leaf node, e.ĝ is calculated for every entry (i.e., node) e in n in line 9 as follows: For each query object q i (∈ Q, 0 ≤ i < M) , the Euclidean distance d , i.e., d (k) between q i and the MBR e.R for e is obtained, where the distance d (q i , e.R) is defined as d (q i , e.R) = √ mindist(q i , e.R) . IER-LMDS as well as many other FANN algorithms [3,9] uses the definition of mindist() as given in [5]. Figure 2 shows the examples of d distances for three query objects. The d distance of an object residing inside of the MBR such as q 3 is defined as 0. Among M d values, the smallest m (= |Q|) values are obtained, and without loss of generality, let d 0 , … ,d m−1 be the smallest m d values. Thereafter, we obtain e.ĝ = g{d i , 0 ≤ i < m} [3,9], where g = max or sum. If the value of e.ĝ is less than or equal to p * .g − (X + z S) , e is added in H, where is 1 if g = max or m if g = sum. X and S are the sample mean and standard deviation for variable X, respectively, and z is the value that satisfies the probability P(z ≤ Z) = for the given and the variable Z that follows the standard normal distribution. The following Lemma 1 proves that there is no false drop (i.e., false negative) by IER-LMDS if the variable X follows the normal distribution N(X, S 2 ) as was assumed above.
For the given probability (0 < < 1) , z is the value that satisfies P z ≤ X−X S = . In other words, it holds that X + z S ≤ X for the given . By replacing X with d i −d � i for two objects q i and e ′ , we obtain d � i +X + z S ≤ d i and thus g{d � i +X + z S} ≤ g{d i } . Since it holds that d i ≤d ′ i , it is induced that g{d i +X + z S} ≤ g{d � i +X + z S} , i.e., e.ĝ + (X + z S) ≤ g{d � i +X + z S} , and thus e.ĝ + (X + z S) ≤ g{d i } , where = 1 (g = max) or m (g = sum) . Therefore, if it holds that p * .g < e.ĝ + (X + z S) , i.e., e.ĝ >p * .g − (X + z S) , it is concluded that p * .g < g{d i } for any e ′ in e.R, and thus e can be discarded safely. ◻ If the node n extracted from H in line 6 is a leaf node, in line 13, e.g is calculated for every entry (i.e., object) e in n. The e.g value is calculated in the same manner as e.ĝ in line 9, except that the actual shortest-path distance d is used instead of d . In other words, e.g is obtained as e.g = g{d i , 0 ≤ i < m} [3,9], where d i = d(q i , e) , and without loss of generality, d i (0 ≤ i < m) are the m smallest values among d i (0 ≤ i < M) . If e.g is smaller than p * .g , e is assigned as a new p * . Finally, in line 17, the current p * value is returned as p * , and the corresponding Q * and p * .g (= g(p * , Q * )) are also returned together.
In Algorithm 1, the number of FANN objects (k) was assumed to be 1. This algorithm can be extended for the general case of k ≥ 1 as follows: instead of storing only one final FANN object p * , an array K is allocated to store k FANN objects. The p * i objects in K are sorted in the order of p * i .g , and initially, the algorithm sets p * i .g ← ∞ (0 ≤ i < k) in line 4. In lines 9 and 13, p * .g is replaced with p * k−1 .g , and finally, the array K is returned in line 17.
Similar to IER-kNN , IER-LMDS needs to compute an FANN distance g(p, Q ) for every object p in a road network R in the worst case. The FANN distance

Experimental evaluation
In this section, the search performance of IER-LMDS is compared with that of IER-kNN [3] through a series of experiments using real road network datasets. Since IER-kNN showed the best performance among the algorithms by Yao et al. [3], IER-LMDS is compared only with IER-kNN in this study. The search accuracy of IER-LMDS is also examined for various search probabilities . The platform for the experiments is a workstation with an AMD 3970X CPU, 128 GB memory, and 1.2TB SSD. We implemented IER-LMDS and IER-kNN in C/C++. In particular, we used a library named Eigen for eigendecomposition of distance matrices in LMDS. 1 In all experiments, the parameters for LMDS were set as n = 50 and k = 4.
The datasets used in the experiments are actual road networks of five states and Washington DC in the US. These datasets were provided by the US Census Bureau and have been used in the 9th DIMACS Implementation Challenge 2 and in many previous studies [1,3]. Table 2 lists the datasets used in the experiments. Each dataset is a graph composed of a set of vertices and a set of undirected edges. Each vertex corresponds to an object (i.e., a POI) and is composed of an ID and a geographic coordinate (latitude and longitude). Each edge corresponds to a path directly connecting two adjacent vertices and is composed of the IDs of two connected vertices, transportation time, geographic distance, and road type. The datasets have noises such as self-loop edges and disconnected graph segments [3]. Thus, we performed pre-processing tasks to remove the noises. The distance d() between two objects in a road network was defined as the shortest-path distance between them and was obtained using the pruned highway labeling (PHL) algorithm [18,19]. The PHL algorithm is known as the fastest shortest-path algorithm [1,3]. In the experiments, we used the C/C++ code written by the original authors of the PHL algorithm. 3 In the first experiment, stress values were calculated using the actual shortestpath distances d and the estimated Euclidean distances d between two objects in road networks. We compared the stress values that were separately calculated using d (k) and d (2) distances, where d (k) is the k-dimensional distance obtained after LMDS transformation, and d (2) is the distance obtained using 2-D coordinates of objects (refer to Sect. 3). The stress function is defined as Eq. (1) [20]: where d i,j and d i,j represent the actual shortest-path distance and the Euclidean distance between two objects O i and O j , respectively. In both IER-LMDS and IER-kNN , since it is advantageous that the estimated distance d is close to the actual distance d, the smaller stress values are better. Table 3 summarizes the result of the first experiment. Each value is the average of stress values obtained for randomly chosen 1% of all possible paths or 100 million paths, whichever is larger, from each road network. The stress values in the second and third columns were calculated using d (k) and d (2) distances, respectively. The result showed that the stress values decreased significantly when LMDS transformation was applied for every road network. Therefore, it is clear that IER-LMDS can determine the pruning bounds of R-tree nodes more accurately than IER-kNN , thereby significantly reducing the calculation of expensive shortest-path distances d.
In the second experiment, we compare the calculation time of the shortest-path distance d and the Euclidean distance d . Table 4 summarizes the result of the second experiment, where the ratios are obtained by dividing the calculation time of (1) distance d by that of distance d . As in the first experiment, each value is the average of ratios obtained by randomly chosen 1% of all possible paths or 100 million paths in each road network. The ratio tends to increase as the road network becomes larger since the size of a road network is directly proportional to the number of objects on the path between two objects on the average. Therefore, it is essential to reduce the calculation of distance d to improve the performance of any FANN search algorithm. Table 5 lists the parameters to consider in the third to eighth experiments. The parameter values in parentheses indicate default values. In the third experiment, we compared the execution time required for the FANN search and the number of PHL distance calculations for each road network dataset in Table 2. The values  of all other parameters were set as default. Figure 3 shows the result of the third experiment. Each value in this figure is the average of the values obtained for randomly generated 1000 query sets Q. The result for each of aggregate functions g = max and sum was indicated by appending suffixes '-MAX' and '-SUM' to algorithm names, respectively, e.g., IER-LMDS-MAX and IER-LMDS-SUM. As can be observed in this figure, the execution time and the number of PHL distance calculations have similar trends for both algorithms. This indicates that the most dominant factor that determines the performance of the FANN algorithms is the number of shortest-path distance calculations. As the size of road network increased, more objects are contained within the pruning boundaries causing more distance d calculations, thereby increasing the execution time. In the third experiment, IER-LMDS always achieved higher performance than IER-kNN ; for NH dataset and g = max , the performance was improved by up to 4.37 times.
In the fourth experiment, FANN search performance was compared while changing the number of query objects M, and the result is shown in Fig. 4. As M increased, the execution time and the number of PHL distance calculations increased almost linearly since in line 13 of Algorithm 1, the actual distance d to every query object q i is calculated to determine the FANN distance e.g for each object e. As in the third experiment, the performance was determined almost by the number of PHL distance calculations for both algorithms. In this experiment, IER-LMDS always achieved higher performance than IER-kNN ; the performance was improved by up to 2.85 times for M = 64 and g = max.
In the fifth experiment, FANN search performance was compared while changing the coverage ratio C of query objects. C was obtained by dividing the size of the minimal region containing all query objects by that of the region occupied by the entire road network. Figure 5 shows the result of the fifth experiment. As C increased, the execution time also increased generally since more objects were contained in the query region and the number of PHL distance calculations between them also increased. In this experiment as well, IER-LMDS always achieved higher performance than IER-kNN ; the performance was improved by up to 3.61 times for C = 0.2 and g = max.  In the sixth experiment, the performance was compared for various flexibility factors , and the result is shown in Fig. 6. In this figure, as increased, the execution time and the number of PHL distance calculations of IER-kNN also increased since, as increased, p * .g for the candidate FANN object p * also increased causing more R-tree node lookups and more PHL distance calculations. In IER-LMDS, in contrast, although increased, the increasing trend of the execution time and the number of PHL distance calculations was not strong; they even decreased for = 0.8 and 1.0. In line 9 of Algorithm 1, although and p * .g increased, the value of (X + z S) remained constant and thus there was only a small change in the pruning bound. Meanwhile, as increased, e.ĝ also increased for an entry e causing less entries e to be added in H. In this experiment as well, IER-LMDS always achieved higher performance than IER-kNN ; the performance was improved by up to 10.87 times for = 1.0 and g = max.
In the seventh experiment, the performance was compared while changing the number of FANN objects k. Figure 7 shows the results. For both IER-LDMS and IER-kNN , the pruning bound increased with k. Since more R-tree nodes were visited, the execution time and the number of PHL distance calculations increased. In this experiment as well, IER-LMDS always achieved higher performance than IER-kNN ; the performance was improved by up to 2.79 times for k = 1 and g = max.
Finally, FANN search performance and accuracy were compared for various search probabilities . The search accuracy of IER-LDMS was calculated as follows: for (a) Execution time (seconds).
(b) Number of PHL distance computations.  each query Q, the error = p * .g − * .g was determined, where p * .g and * .g were obtained for the FANN objects p * and * returned by IER-LDMS and IER-kNN , respectively. Subsequently, the mean square error (MSE), i.e., where n is the number of queries. Since the third to eighth experiments were conducted for 1000 randomly generated queries, n = 1000 . The result of the final experiment is shown in Fig. 8. In Fig. 8a, since the pruning bound for IER-LMDS increased with , the number of PHL distance calculations and the execution time also increased. In Fig. 8b, we could find that MSE decreased rapidly as increased. For ≥ 0.5 , all became zero. The graph of the number of PHL distance calculations is omitted since it has a similar trend to the execution time as in other experiments. In the last experiment as well, IER-LDMS always achieved higher performance than IER-kNN ; the performance was improved by up to 3.13 times for = 0.5 and g = max.

Conclusions
This study proposed an efficient -probabilistic FANN search algorithm named IER-LMDS in road networks. IER-LMDS mapped road network objects into those in a metric space and then transformed them into k-dimensional Euclidean space objects while preserving the distances between objects using LMDS [11,12]. The state-ofthe-art FANN algorithm named IER-kNN [3] used the Euclidean distance based on the 2-D coordinates of objects when choosing the R-tree nodes to visit, and thus it could not avoid performance degradation due to significant differences between the Euclidean distances and the actual shortest-path distances. A series of experiments were conducted in this study to confirm the superiority of IER-LMDS by comparing its performance and accuracy with those of IER-kNN for various real road networks and parameters. The results of all experiments revealed that IER-LDMS always achieved higher performance than IER-kNN for all road networks and parameters; the performance was improved by up to 10.87 times. We believe that IER-LDMS will be widely adopted for efficient FANN search in a variety of road network applications in the future.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.