Directory UMM :Journals:Journal_of_mathematics:OTHER:
Acta Mathematica Academiae Paedagogicae Nyregyhaziensis
15 (1999), 55{60
www.bgytf.hu/~amapn
LATTICE OF DISTANCES
BASED ON 3D-NEIGHBOURHOOD SEQUENCES
Attila Fazekas
[email protected]
La jos Kossuth University
4010, Debrecen PO Box 12, Hungary
Dedicated to Z. Muzsnay on the occasion of his 30th birthday.
Abstract.
In this paper we give a natural ordering relation between distances based
on 3D-neighbourhood sequences. We prove that this ordering induces a complete
compact distributive lattice over the set of 3D-neighbourhood sequences.
Keywords. Digital geometry, octagonal distance
AMS Subject Classication. 68U10 Image Processing
1. INTRODUCTION
Rosenfeld and Pfaltz identied in [3] two types of motions in two-dimensional digital geometry. The cityblock motion restricts movements only to the horizontal or vertical directions,
while the second type { chessboard motion { allows diagonal movements only. These two
types of motion in 2D determine two distances namely the cityblock distance and the
chessboard distance. The alternate use of these motions results in the octagonal distance.
In case of cityblock movements there is a unit change in one coordinate at every step,
while in case of chessboard motion there is a unit change in both coordinates. Recently
Das and Chatterji [2] have extended the denition of ordinary octagonal distances to allow
arbitrary long cycle sequences of cityblock and chessboard motions called neighbourhood
sequences.
The neighbourhood sequence is a distance which is obtained by combining the cityblock and the chessboard motions.
P.P. Das in [1] shown that the distances, generated by the 2D-neighbourhood sequences, form a complete compact distributive lattice supplied with a naturally interpreted
relation order.
In 3D digital geometry we can dene three dierent distances. The 3D-neighbourhood
sequences, obviously determine the combination of types of motions determined by these
three distances.
In this paper we investigate distances generated by 3D-neighbourhood sequences and
by using the results of P.P. Das [1] we prove that they form a complete compact distributive
lattice supplied with the same ordering relation.
2. BASIC DEFINITIONS
In order to reach the aims formulated in the introduction we would like to dene the basic
denitions and notations in this chapter.
55
Denition 2.1. Let p and q be any two points of the n-dimensional digital plane. The
ith coordinate of the point p is indicated by Pri (p). The points p and q are m-neighbours
(0 m n), if the following two conditions hold:
0 j Pri (p) , Pri (q)j 1 (1 i n),
Pni=1 j Pri (p) , Pri (q)j m.
Denition 2.2. The nite sequence B = fb(i) j i = 1; 2; : : :; l and b(i) 2 f1; 2; : : :; ngg
with length l composed by the elements of the set f1; 2; : : :; ng (n 2 N) is called an
nD-neighbourhood sequence with period l.
Denition 2.3. Let p and q be any two points of the n-dimensional digital plane and B =
fb(1); b(2); : : :; b(l)g be an nD-neighbourhood sequence. The point sequence (p; q; B ) {
which has the form p = p0 ; p1; : : :; pm = q, where pi and pi,1 are r-neighbours (0 < i m)
and r = b(((i , 1) mod l) + 1) { is called the path from p to q determined by B . The
length j(p; q; B )j of the path (p; q; B ) is m.
Denition 2.4. Let p and q be any two points of the n-dimensional digital plane and B
an n-dimensional neighbourhood sequence. The shortest path from p to q is denoted by
(p; q; B ). The length of the minimal path is dened as the distance between p and q is
written as
d(p; q; B ) = j(p; q; B )j:
Using the above distance we cannot obtain a metric on the n-dimensional digital
plane for every n-dimensional neighbourhood sequence. In order to prove this, consider
the following simple example. Let B = f2; 1g, n = 2, p = (0; 0), q = (1; 1) and r = (2; 2).
In this case d(p; q; B ) = 1, d(q; r; B ) = 1, but d(p; r; B ) = 3.
The question is the following: knowing B , how can we decide whether the distance
related to B is a metric on the n-dimensional digital plane, or not? The answer can be
found in [2].
The following result of P.P. Das et al. (cf. [2]) provides an algorithm for the calculation
of the above dened distance d(p; q; B ).
Theorem 2.5. (see [2]). Let p and q be any two points of the n-dimensional digital
plane, and B = fb(1); b(2); : : :; b(l)g be an nD-neighbourhood sequence, and let
x = (x(1); x(2); : : :; x(n));
where x is the nonascending ordering of j Pri (p) , Pri (q)j that is x(i) x(j ), if i < j . Put
n,
i+1
X
x(j );
ai =
j=1
j)
, if b(j ) < n , i + 2,
bi (j ) = nb(,
i + 1 , otherwise,
Pj
fi (j ) = k=1 bi (k) , if 1 j l;
0
, if j = 0,
gi(j ) =fi (l) , fi (j , 1) , 1; 1 j l:
56
The length of the minimal path from to determined by , denoted by (
j( ; )j, is given by the following formula:
p
q
B
; )=
d p; q B
p; q B
n
; ) = max
(
i=1 i
(
d p; q B
d
i (p; q ) =
d
p; q
), where
l a + g (j )
X
i i
j =1
f
i (l )
:
3. NEIGHBOURHOOD SEQUENCES IN 3D
It is a natural question that what kind of relation exists between those distance functions
generated by 1 and 2 in case of two given, 1 and 2 neighbourhood sequences. The
complexity of the problem can be characterized by the following 2D example known from
[1]. Let 1 = f1 1 2g, 2 = f1 1 1 2 2 2g. Choose the points = (3 1) and = (6 3).
In this case we obtain that (0 ; 1) = 3 4 = (0 ; 2), but (0 ; 1) = 7 6 =
(0 ; 2). So the distance generated by 1 and 2 cannot be compared.
In [1] the author has shown that in case of 2D the distance functions generated by the
neighbourhood sequences form a distributive lattice. In this chapter we show that that
the same feature is valid in 3D as well.
Denition 3.1. The th ( 1) power r of the neighbourhood sequence can be
dened as follows:
r =f 0 ( ) j 1 g
0
( ) = ((( , 1) mod ) + 1), 1
It follows from the above Denition and from the denition of the neighbourhood
sequence that in case of any points and , ( ; r ) = ( ; ) ( 1) holds.
Theorem 3.2. Using the notation of Theorem 2.5, for any 3-dimensional neighbourhood
sequences 1 and 2
B
B
B
;
;
B
B
;
d
d
;
;
;
B
;
p
;p B
<
;q B
d
B
r
r
b
i
b
i
;q B
>
B
rl
i
l
q
;
B
i
p
B
d
q
B
B
b
;p B
;
i
d p; q B
rl:
d p; q B
r
B
; ) (
(
d p; q B1
; )
for all
d p; q B2 ;
p; q
2 Z3
if and only if
(1)
(2)
k (i) fk (i); for all 1 i l, 1 k 3;
where B1 = B1r , B2 = B2s, r = jBl1j , s = jBl2j and l is the least common multiple of
f
j 2j.
j 1 j,
B
B
Proof.
We start with the special case when j 1j = j 2j = . Clearly
B
B
l
B1
=
B1
f
i
and
= 2.
First we prove that if ( ; 1) ( ; 2) for any , then k(1)( ) k(2)( ) for
every 1 , 1 3. The proof is indirect. Assume that there are such 1
and 1 2, for which k(1) ( ) k(2) ( ) is true. If = 3, then 3(1) ( ) = 3(2)( ) trivially
holds for every 1 .
Let j (1 ) be the numbers of those (2) ( ), 1 , which equal to .
B
2
B
d p; q B
i
l
p; q
f
i
k
i
k
f
j
u
d p; q B
j
i
< f
i
k
f
j
f
j
l
l
b
57
t
t
i
j
l
In case of = 1 let = (0 0 0) and = ( 1 + 2 + 3 2 + 3 3). Using the denition
of ( ; ), it is clear that ( ; 2) is equal to . On the other hand, by the assumption
(2)
(1)
and , we have ( ; 1) , which is a
1 ( )
1 ( ), and by the denition of
contradiction.
In case of = 2 let = (0 0 0) and = ( 1 + 2 + 3 2 + 3 0). Similary as
above, we obtain ( ; 2) = . However, using again the denition of and and the
assumption 2(2)( ) 2(1)( ), we get ( ; 1) , which is a contradiction, too.
Conversely, suppose that k(1)( ) k(2)( ) for every 1 , 1 3. To derive
( ; 1) ( ; 2), by Theorem 2.5 it is sucient to show that
% l $
%
$
l
(1)
X k + k(2) ( )
X
k + k ( )
(1)
= (2)
)
)=
k (
k (
(1)
(2)
j =1
j =1
k ( )
k ( )
holds. For this we prove
that for any xed with 1 3
$
% $
%
(1)
(2)
+
(
)
+
(
)
k
k
k (2)k
for 1
(1)
k ( )
k ( )
Using the denition of k ( ), the above inequalities are equivalent to the following ones:
% $
%
$
(2)
(2)
(1)
(1)
+
(
)
,
(
,
1)
,
1
+
(
)
,
(
,
1)
,
1
k
k
k
k
k k
1
(1)
(2)
(
)
(
)
k
k
from which$
%
$
%
(1)
(2)
(
,
1)
,
(
,
1)
(
,
1)
,
(
,
1)
k
k
1+ k
1+ k
1
(1)
(2)
(
)
(
)
k
k
(2)
If ( k , 1) , k ( , 1) 0, then we even have
( k , 1) , k(1)( , 1) ( k , 1) , k(2) ( , 1)
(1)
(2)
k ( )
k ( )
Indeed, this inequality is equivalent to
(2)
(1)
(1)
(2)
k ( )( k , 1 , k ( , 1)) k ( )( k , 1 , k ( , 1))
which clearly holds because of our assumption k(2)( ) k(1)( ), 1 .
In case of ( k , 1) , k(2)( , 1) 0, by the denitions of k and k , we obviously have
%
$
( k , 1) , k(2) ( , 1) = ,1
(2)
k ( )
However, using again k(2)( ) k(1)( ), 1 , now the inequality
$
%
( k , 1) , k(1) ( , 1) = ,1
(1)
k ( )
is also true, which completes the proof of the Theorem in the special case j 1j = j 2j.
If j 1j 6= j 2j then by the above argument and using the denition r , we obtain the
statement of the Theorem.
k
p
;
d p; q B
f
i
;
q
u
u
d p; q B
> f
i
p
k
p
;
d p; q B
f
i
> f
;
q
q
d p; q B
u
u
u ;
p
i
d p; q B
i
f
a
p; q
g
q
> i
i
i
a
j
f
g
l
f
k
a
g
f
g
f
l
f
f
a
l
k
d
p; q
l
j
f
j
l:
l
j
a
f
l
l
f
j
f
f
j
k
g
l
f
f
j
j
a
a
u ;u
> i
d p; q B
d
a
u ;u
i
f
d p; q B
u ;u
i
j
a
f
l
;
j
f
j
;
j
l:
l
j
a
f
f
f
l
a
j
a
a
f
f
f
j
f
j
l
f
f
i
j
a
i
f
j
f
f
i
f
f
j
;
i
i
f
a
l
:
l
i
a
:
l
<
a
f
f
l
f
l
j
l
B
B
l;
l
B
B
58
B
Notation 3.3. Let ( ) be the set of the all neighbourhood sequences of length . We
dene the relation in the following way:
S l
l
1 B2
,
B
f
(1) (i) f (2) (i)
k
k
for all 1 and 1 3.
By the previous Theorem it is evident that is an ordering relation. Now we show
that induces a distributive lattice over ( ).
Theorem 3.4. For all 1 ( ( ) ) is a distributive lattice with minimal element
min = f1gl and maximal element max = f3gl .
Proof.
From the denition of it follows that this relation is re
exive, antisymmetric
and transitive on ( ). Thus ( ( ) ) is a partially ordered set.
In case of any 1 2 2 ( ) we dene the operations ^ and _ in the following way:
i
l
k
S l
l
S l ;
S
S
S l
S l ;
B ;B
S l
=
=
B
B
1 ^ B2 , where
B1 _ B2 , where
B
( ) = min( 1( ) 2( ))
( ) = max( 1( ) 2( ))
f i
f
f i
i ;f
f
i
i ;f
;
i
:
It is clear that 1 ^ 2 and 1 _ 2 are elements of ( ). Furthermore, 1 ^ 2 1,
1 ^ 2 2 and 1 1 _ 2 2 1 _ 2 . Thus ( ( ) ) is a lattice with operations
^ and _.
Now we show that this lattice is a distributive one. Let 1 2 3 2 ( ) and =
^
1 ( 2 _ 3 ). It is evident that for any 1 the following equalities hold:
B
B
B
B
B
B
B
B
B
S l
B ;B
B
B
B
B
B
B
S l ;
B ;B ;B
B
B
i
S l
B
l
( ) = min( 1 ( ) max( 2( ) 3( ))) = max(min( 1 ( ) 2( )) min( 1( ) 3( )))
f i
f
i ;
f
i ;f
i
f
i ;f
i
;
f
i ;f
i
:
This means that = ( 1 ^ 2) _ ( 1 ^ 3), that is ^ is distributive over _. Similarly, we
can prove that _ is distributive over ^.
It is trivial that min is the minimum and max is the maximum of ( ).
Sl ( 0) and the relation in the following way:
After this, we dene the set ( ) =
B
B
B
B
B
S
S
S
l
l0 =1
1
B
where
S l
S l
,
2
B
1
B
2
B ;
is dened in Theorem 3.2.
Theorem 3.5. ( ( ) ) is a distributive lattice for all 1, with minimal element
min = f1g and maximal element max = f3g.
Proof. This Theorem can be proved similarly to Theorem 3.4.
However, there is an important dierence between the lattices ( ( ) ) and ( ( ) ).
Namely, because of the dierent lengths of the neighbourhood sequences, there is an unpleasant feature in the second case, which can be illustrated by the following example.
Let 1 = f1 2g 2 (4) and 2 = f1 2 1 2g 2 (4). It is clear that 1 2 and
2 1 , but 1 6= 2 . To exclude such cases we can use the following construction
found in [1]:
B
S
l ;
l
T
T
S l ;
B
B
;
B
S
B
B
;
;
;
B
59
S
S
B
l ;
B
(1),
( , 1) [ f j
( , 1)g.
12
S
S
B
(1)
()
S
l
S
S
l
B
B
2 ( ) and :9 0 1
S l
l ;
l
0
< l
such that
0
l
B1
=
B
for
l
4. CONCLUSION
In this paper we have shown that the set of neighbourhood sequences and consequently the
set of ( ; )'s forms a complete distributive lattice in 3D under the natural comparison
relation. This lattice has an important role in the approximation of the Euclidean distance
by digital distances.
d p; q B
REFERENCES
[1] P.P. Das, Lattice of octagonal distances in digital geometry, Pattern Recognition Letters, 11 (1990),
pp. 663-667.
[2] P.P. Das, P.P. Chakrabarti, B.N. Chatterji, Distance functions in digital geometry, Information Sciences, 42 (1987), pp. 113-136.
[3] A. Rosenfeld, J.L. Pfaltz, Distance functions on digital pictures, Pattern Recognition, 1 (1968), pp.
33-61.
(Received November 1, 1998)
60
15 (1999), 55{60
www.bgytf.hu/~amapn
LATTICE OF DISTANCES
BASED ON 3D-NEIGHBOURHOOD SEQUENCES
Attila Fazekas
[email protected]
La jos Kossuth University
4010, Debrecen PO Box 12, Hungary
Dedicated to Z. Muzsnay on the occasion of his 30th birthday.
Abstract.
In this paper we give a natural ordering relation between distances based
on 3D-neighbourhood sequences. We prove that this ordering induces a complete
compact distributive lattice over the set of 3D-neighbourhood sequences.
Keywords. Digital geometry, octagonal distance
AMS Subject Classication. 68U10 Image Processing
1. INTRODUCTION
Rosenfeld and Pfaltz identied in [3] two types of motions in two-dimensional digital geometry. The cityblock motion restricts movements only to the horizontal or vertical directions,
while the second type { chessboard motion { allows diagonal movements only. These two
types of motion in 2D determine two distances namely the cityblock distance and the
chessboard distance. The alternate use of these motions results in the octagonal distance.
In case of cityblock movements there is a unit change in one coordinate at every step,
while in case of chessboard motion there is a unit change in both coordinates. Recently
Das and Chatterji [2] have extended the denition of ordinary octagonal distances to allow
arbitrary long cycle sequences of cityblock and chessboard motions called neighbourhood
sequences.
The neighbourhood sequence is a distance which is obtained by combining the cityblock and the chessboard motions.
P.P. Das in [1] shown that the distances, generated by the 2D-neighbourhood sequences, form a complete compact distributive lattice supplied with a naturally interpreted
relation order.
In 3D digital geometry we can dene three dierent distances. The 3D-neighbourhood
sequences, obviously determine the combination of types of motions determined by these
three distances.
In this paper we investigate distances generated by 3D-neighbourhood sequences and
by using the results of P.P. Das [1] we prove that they form a complete compact distributive
lattice supplied with the same ordering relation.
2. BASIC DEFINITIONS
In order to reach the aims formulated in the introduction we would like to dene the basic
denitions and notations in this chapter.
55
Denition 2.1. Let p and q be any two points of the n-dimensional digital plane. The
ith coordinate of the point p is indicated by Pri (p). The points p and q are m-neighbours
(0 m n), if the following two conditions hold:
0 j Pri (p) , Pri (q)j 1 (1 i n),
Pni=1 j Pri (p) , Pri (q)j m.
Denition 2.2. The nite sequence B = fb(i) j i = 1; 2; : : :; l and b(i) 2 f1; 2; : : :; ngg
with length l composed by the elements of the set f1; 2; : : :; ng (n 2 N) is called an
nD-neighbourhood sequence with period l.
Denition 2.3. Let p and q be any two points of the n-dimensional digital plane and B =
fb(1); b(2); : : :; b(l)g be an nD-neighbourhood sequence. The point sequence (p; q; B ) {
which has the form p = p0 ; p1; : : :; pm = q, where pi and pi,1 are r-neighbours (0 < i m)
and r = b(((i , 1) mod l) + 1) { is called the path from p to q determined by B . The
length j(p; q; B )j of the path (p; q; B ) is m.
Denition 2.4. Let p and q be any two points of the n-dimensional digital plane and B
an n-dimensional neighbourhood sequence. The shortest path from p to q is denoted by
(p; q; B ). The length of the minimal path is dened as the distance between p and q is
written as
d(p; q; B ) = j(p; q; B )j:
Using the above distance we cannot obtain a metric on the n-dimensional digital
plane for every n-dimensional neighbourhood sequence. In order to prove this, consider
the following simple example. Let B = f2; 1g, n = 2, p = (0; 0), q = (1; 1) and r = (2; 2).
In this case d(p; q; B ) = 1, d(q; r; B ) = 1, but d(p; r; B ) = 3.
The question is the following: knowing B , how can we decide whether the distance
related to B is a metric on the n-dimensional digital plane, or not? The answer can be
found in [2].
The following result of P.P. Das et al. (cf. [2]) provides an algorithm for the calculation
of the above dened distance d(p; q; B ).
Theorem 2.5. (see [2]). Let p and q be any two points of the n-dimensional digital
plane, and B = fb(1); b(2); : : :; b(l)g be an nD-neighbourhood sequence, and let
x = (x(1); x(2); : : :; x(n));
where x is the nonascending ordering of j Pri (p) , Pri (q)j that is x(i) x(j ), if i < j . Put
n,
i+1
X
x(j );
ai =
j=1
j)
, if b(j ) < n , i + 2,
bi (j ) = nb(,
i + 1 , otherwise,
Pj
fi (j ) = k=1 bi (k) , if 1 j l;
0
, if j = 0,
gi(j ) =fi (l) , fi (j , 1) , 1; 1 j l:
56
The length of the minimal path from to determined by , denoted by (
j( ; )j, is given by the following formula:
p
q
B
; )=
d p; q B
p; q B
n
; ) = max
(
i=1 i
(
d p; q B
d
i (p; q ) =
d
p; q
), where
l a + g (j )
X
i i
j =1
f
i (l )
:
3. NEIGHBOURHOOD SEQUENCES IN 3D
It is a natural question that what kind of relation exists between those distance functions
generated by 1 and 2 in case of two given, 1 and 2 neighbourhood sequences. The
complexity of the problem can be characterized by the following 2D example known from
[1]. Let 1 = f1 1 2g, 2 = f1 1 1 2 2 2g. Choose the points = (3 1) and = (6 3).
In this case we obtain that (0 ; 1) = 3 4 = (0 ; 2), but (0 ; 1) = 7 6 =
(0 ; 2). So the distance generated by 1 and 2 cannot be compared.
In [1] the author has shown that in case of 2D the distance functions generated by the
neighbourhood sequences form a distributive lattice. In this chapter we show that that
the same feature is valid in 3D as well.
Denition 3.1. The th ( 1) power r of the neighbourhood sequence can be
dened as follows:
r =f 0 ( ) j 1 g
0
( ) = ((( , 1) mod ) + 1), 1
It follows from the above Denition and from the denition of the neighbourhood
sequence that in case of any points and , ( ; r ) = ( ; ) ( 1) holds.
Theorem 3.2. Using the notation of Theorem 2.5, for any 3-dimensional neighbourhood
sequences 1 and 2
B
B
B
;
;
B
B
;
d
d
;
;
;
B
;
p
;p B
<
;q B
d
B
r
r
b
i
b
i
;q B
>
B
rl
i
l
q
;
B
i
p
B
d
q
B
B
b
;p B
;
i
d p; q B
rl:
d p; q B
r
B
; ) (
(
d p; q B1
; )
for all
d p; q B2 ;
p; q
2 Z3
if and only if
(1)
(2)
k (i) fk (i); for all 1 i l, 1 k 3;
where B1 = B1r , B2 = B2s, r = jBl1j , s = jBl2j and l is the least common multiple of
f
j 2j.
j 1 j,
B
B
Proof.
We start with the special case when j 1j = j 2j = . Clearly
B
B
l
B1
=
B1
f
i
and
= 2.
First we prove that if ( ; 1) ( ; 2) for any , then k(1)( ) k(2)( ) for
every 1 , 1 3. The proof is indirect. Assume that there are such 1
and 1 2, for which k(1) ( ) k(2) ( ) is true. If = 3, then 3(1) ( ) = 3(2)( ) trivially
holds for every 1 .
Let j (1 ) be the numbers of those (2) ( ), 1 , which equal to .
B
2
B
d p; q B
i
l
p; q
f
i
k
i
k
f
j
u
d p; q B
j
i
< f
i
k
f
j
f
j
l
l
b
57
t
t
i
j
l
In case of = 1 let = (0 0 0) and = ( 1 + 2 + 3 2 + 3 3). Using the denition
of ( ; ), it is clear that ( ; 2) is equal to . On the other hand, by the assumption
(2)
(1)
and , we have ( ; 1) , which is a
1 ( )
1 ( ), and by the denition of
contradiction.
In case of = 2 let = (0 0 0) and = ( 1 + 2 + 3 2 + 3 0). Similary as
above, we obtain ( ; 2) = . However, using again the denition of and and the
assumption 2(2)( ) 2(1)( ), we get ( ; 1) , which is a contradiction, too.
Conversely, suppose that k(1)( ) k(2)( ) for every 1 , 1 3. To derive
( ; 1) ( ; 2), by Theorem 2.5 it is sucient to show that
% l $
%
$
l
(1)
X k + k(2) ( )
X
k + k ( )
(1)
= (2)
)
)=
k (
k (
(1)
(2)
j =1
j =1
k ( )
k ( )
holds. For this we prove
that for any xed with 1 3
$
% $
%
(1)
(2)
+
(
)
+
(
)
k
k
k (2)k
for 1
(1)
k ( )
k ( )
Using the denition of k ( ), the above inequalities are equivalent to the following ones:
% $
%
$
(2)
(2)
(1)
(1)
+
(
)
,
(
,
1)
,
1
+
(
)
,
(
,
1)
,
1
k
k
k
k
k k
1
(1)
(2)
(
)
(
)
k
k
from which$
%
$
%
(1)
(2)
(
,
1)
,
(
,
1)
(
,
1)
,
(
,
1)
k
k
1+ k
1+ k
1
(1)
(2)
(
)
(
)
k
k
(2)
If ( k , 1) , k ( , 1) 0, then we even have
( k , 1) , k(1)( , 1) ( k , 1) , k(2) ( , 1)
(1)
(2)
k ( )
k ( )
Indeed, this inequality is equivalent to
(2)
(1)
(1)
(2)
k ( )( k , 1 , k ( , 1)) k ( )( k , 1 , k ( , 1))
which clearly holds because of our assumption k(2)( ) k(1)( ), 1 .
In case of ( k , 1) , k(2)( , 1) 0, by the denitions of k and k , we obviously have
%
$
( k , 1) , k(2) ( , 1) = ,1
(2)
k ( )
However, using again k(2)( ) k(1)( ), 1 , now the inequality
$
%
( k , 1) , k(1) ( , 1) = ,1
(1)
k ( )
is also true, which completes the proof of the Theorem in the special case j 1j = j 2j.
If j 1j 6= j 2j then by the above argument and using the denition r , we obtain the
statement of the Theorem.
k
p
;
d p; q B
f
i
;
q
u
u
d p; q B
> f
i
p
k
p
;
d p; q B
f
i
> f
;
q
q
d p; q B
u
u
u ;
p
i
d p; q B
i
f
a
p; q
g
q
> i
i
i
a
j
f
g
l
f
k
a
g
f
g
f
l
f
f
a
l
k
d
p; q
l
j
f
j
l:
l
j
a
f
l
l
f
j
f
f
j
k
g
l
f
f
j
j
a
a
u ;u
> i
d p; q B
d
a
u ;u
i
f
d p; q B
u ;u
i
j
a
f
l
;
j
f
j
;
j
l:
l
j
a
f
f
f
l
a
j
a
a
f
f
f
j
f
j
l
f
f
i
j
a
i
f
j
f
f
i
f
f
j
;
i
i
f
a
l
:
l
i
a
:
l
<
a
f
f
l
f
l
j
l
B
B
l;
l
B
B
58
B
Notation 3.3. Let ( ) be the set of the all neighbourhood sequences of length . We
dene the relation in the following way:
S l
l
1 B2
,
B
f
(1) (i) f (2) (i)
k
k
for all 1 and 1 3.
By the previous Theorem it is evident that is an ordering relation. Now we show
that induces a distributive lattice over ( ).
Theorem 3.4. For all 1 ( ( ) ) is a distributive lattice with minimal element
min = f1gl and maximal element max = f3gl .
Proof.
From the denition of it follows that this relation is re
exive, antisymmetric
and transitive on ( ). Thus ( ( ) ) is a partially ordered set.
In case of any 1 2 2 ( ) we dene the operations ^ and _ in the following way:
i
l
k
S l
l
S l ;
S
S
S l
S l ;
B ;B
S l
=
=
B
B
1 ^ B2 , where
B1 _ B2 , where
B
( ) = min( 1( ) 2( ))
( ) = max( 1( ) 2( ))
f i
f
f i
i ;f
f
i
i ;f
;
i
:
It is clear that 1 ^ 2 and 1 _ 2 are elements of ( ). Furthermore, 1 ^ 2 1,
1 ^ 2 2 and 1 1 _ 2 2 1 _ 2 . Thus ( ( ) ) is a lattice with operations
^ and _.
Now we show that this lattice is a distributive one. Let 1 2 3 2 ( ) and =
^
1 ( 2 _ 3 ). It is evident that for any 1 the following equalities hold:
B
B
B
B
B
B
B
B
B
S l
B ;B
B
B
B
B
B
B
S l ;
B ;B ;B
B
B
i
S l
B
l
( ) = min( 1 ( ) max( 2( ) 3( ))) = max(min( 1 ( ) 2( )) min( 1( ) 3( )))
f i
f
i ;
f
i ;f
i
f
i ;f
i
;
f
i ;f
i
:
This means that = ( 1 ^ 2) _ ( 1 ^ 3), that is ^ is distributive over _. Similarly, we
can prove that _ is distributive over ^.
It is trivial that min is the minimum and max is the maximum of ( ).
Sl ( 0) and the relation in the following way:
After this, we dene the set ( ) =
B
B
B
B
B
S
S
S
l
l0 =1
1
B
where
S l
S l
,
2
B
1
B
2
B ;
is dened in Theorem 3.2.
Theorem 3.5. ( ( ) ) is a distributive lattice for all 1, with minimal element
min = f1g and maximal element max = f3g.
Proof. This Theorem can be proved similarly to Theorem 3.4.
However, there is an important dierence between the lattices ( ( ) ) and ( ( ) ).
Namely, because of the dierent lengths of the neighbourhood sequences, there is an unpleasant feature in the second case, which can be illustrated by the following example.
Let 1 = f1 2g 2 (4) and 2 = f1 2 1 2g 2 (4). It is clear that 1 2 and
2 1 , but 1 6= 2 . To exclude such cases we can use the following construction
found in [1]:
B
S
l ;
l
T
T
S l ;
B
B
;
B
S
B
B
;
;
;
B
59
S
S
B
l ;
B
(1),
( , 1) [ f j
( , 1)g.
12
S
S
B
(1)
()
S
l
S
S
l
B
B
2 ( ) and :9 0 1
S l
l ;
l
0
< l
such that
0
l
B1
=
B
for
l
4. CONCLUSION
In this paper we have shown that the set of neighbourhood sequences and consequently the
set of ( ; )'s forms a complete distributive lattice in 3D under the natural comparison
relation. This lattice has an important role in the approximation of the Euclidean distance
by digital distances.
d p; q B
REFERENCES
[1] P.P. Das, Lattice of octagonal distances in digital geometry, Pattern Recognition Letters, 11 (1990),
pp. 663-667.
[2] P.P. Das, P.P. Chakrabarti, B.N. Chatterji, Distance functions in digital geometry, Information Sciences, 42 (1987), pp. 113-136.
[3] A. Rosenfeld, J.L. Pfaltz, Distance functions on digital pictures, Pattern Recognition, 1 (1968), pp.
33-61.
(Received November 1, 1998)
60