Acta Mathematicae Applicatae Sinica, English Series Vol. 34, No. 1 (2018) 197–208 https://doi.org/10.1007/s10255-018-0735-0 http://www.ApplMath.com.cn & www.SpringerLink.com Acta Mathemacae Applicatae Sinica, English Series © The Editorial Office of AMAS & Springer-Verlag GmbH Germany 2018 A Distance Function for Computing on Finite Subsets of Euclidean Spaces Hajar Ghahremani-Gol 1,2 , Farzad Didehvar 2, , Asadollah Razavi 2,3 1 Department of Mathematics, Faculty of Science, Shahed University, Tehran 3319118651, Iran (E-mail: h.ghahremanigol@shahed.ac.ir) 2 Department of Mathematics and Computer Science, Amirkabir University of Technology, 424 Hafez Av, Tehran, 1591634311, Iran (E-mail: didehvar@aut.ac.ir) 3 Department Pure Mathematics, Faculty of Mathematics and Computer Science, Shahid Bahonar University of Kerman, Kerman, Iran (E-mail: arazavi@uk.ac.ir) Abstract In practical purposes for some geometrical problems, specially the fields in common with computer science, we deal with information of some finite number of points. The problem often arises here is: “How are we able to define a plausible distance function on a finite three dimensional space?” In this paper, we define such a distance function in order to apply it to further purposes, e.g. in the field settings of transportation theory and geometry. More precisely, we present a new model for traveling salesman problem and vehicle routing problem for two dimensional manifolds in three dimensional Euclidean space, the second problem on which we focus on this line is, three dimensional triangulation. Keywords geodesic; least square method; vehicle routing problem; traveling salesman problem; three dimen- sional triangulation 2000 MR Subject Classification 68T20; 68M99; 90C59; 53C22 1 Introduction There are many algorithms for solving geometrical problems in computer science, such as trav- eling salesman problem TSP, vehicle routing problem VRP and three dimensional triangulation. The traveling salesman problem is related to find the shortest path that a salesman can take through each of n cities once and only once, starting from one city and returning to it. Mostly these algorithms solve these types of problems for the flat Euclidean surfaces, but in general and for practical purposes these problems must be proposed in two dimensional manifolds, since the real situations are not usually a flat Euclidean surface. Here, we try to consider the generalized situation. As usual in practical purposes, we have a finite set of points in R 3 . The strategy is: in the first step to associate a surface to them, later we define a function for the distance among points related to the defined surface. To do this, at first we define a convenient two dimensional manifold with respect to these points, and in the second step we define the distance between two points with respect to this manifold as the length of a geodesic on this manifold. Indeed some of the definitions which seem natural are not appropriate. For instance, it seems natural to follow the following steps to compute a reasonable distance function: For the first level the least square method has been extended to define convenient two- dimensional manifold. Manuscript received October 28, 2014. Revised April 12, 2017. Corresponding author.