INFORMATIONSCIENCES 64,181-190 (1992) 181 A Note on “Distance Functions in Digital Geometry” P. P. DAS Department of Computer Science and Engineering, Indian Institute of Technology, Kharagpur-721 302, India ABSTRACT It was proved in [2] that the digital distance d(B), defined by a neighborhood sequence B in the n-dimensional quantized space, is a metric if and only if B is well-behaved. In this note we present an efficient 0( p*(n + p)) algorithm for testing if a given B is well- behaved, where p is the length of the sequence B. We have also reviewed the other weaker and stronger conditions of triangularity and have introduced a new weaker condition here to reformulate the strategy for deciding the metricity of a d(B). 1. INTRODUCTION In [2] Das et al. have presented the class of distance functions, d(B), defined by neighborhood sequences, B, in n-dimensional digital geometry. Our primary aim in this paper is to supplement [2] with an efficient algorithm for testing the triangularity of d( B)‘s. In n-D, the neighborhood of a given point can be one of the n distinct types, which is characterized by a neighborhood parameter m, zyxwvutsrqponmlkj 1 < m < n. Mathematically, we say two points u and u in n-D are O(m)-neighbors if )u(i)-u(i)1 gl, l<i<n, and C~S,)u(i)-u(i)) 6m. The distance be- tween two points, which is defined as the length of the shortest path from start to goal, formed by successive O(m)-neighbors is called the m-neighbor distance dz [l]. On generalization over dz, it was proposed in [2] that the neighborhood be dependent on the position of a point in a path. There- fore, the neighborhood definition must follow a sequence (called a Neigh- borhood Sequence) B = {b(i) : i ) 1 and b(i)E{ 1,2,. . . , n}} which indicates that O@(i))-neighborhood for a point on the ith position of a path. Since it is impossible to list out such an infinite sequence, one is generally concerned with the sequences that are cyclic (with cycle length p ) 1) in nature. That is, if the N-sequence B is B = {b(i) : 16 i < p} then the neighborhood set for a point that is on the ith position on the path (the start is on the 1st position) is b((i - 1) modp + 1). OElsevier Science Publishing Co., Inc. 1992 655 Avenue of the Americas, New York, NY 10010