An algorithm for graph optimal monomorphism - Systems, Man and ...
An algorithm for graph optimal monomorphism - Systems, Man and ...
An algorithm for graph optimal monomorphism - Systems, Man and ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
I<br />
628 1FEE TRANSAC‘TIONS ON SYSTFMS, MAN, ANI) C’YBEKNETIC’S, VOI.. 20. NO. 3. MAY/JUNE 1990<br />
<strong>An</strong> Algorithm <strong>for</strong> Graph Optimal<br />
Monomorphism<br />
A. K. C. WONG, M. YOU, AND S. C. CHAN<br />
Abstract -<strong>An</strong> <strong>algorithm</strong> <strong>for</strong> finding the <strong>optimal</strong> <strong>monomorphism</strong> between<br />
two attributed <strong>graph</strong>s is proposed. The problem is <strong>for</strong>mulated as a<br />
tree search problem. To guide the search, the branch-<strong>and</strong>-bound heuristic<br />
approach is adopted, using an efficient consistent lower bounded<br />
estimate <strong>for</strong> the evaluation function of the cost associated with the<br />
<strong>optimal</strong> solution path in the search tree. This <strong>algorithm</strong> is a generalization<br />
of an <strong>algorithm</strong> <strong>for</strong> <strong>graph</strong> <strong>optimal</strong> isomorphism which has been<br />
compared with another <strong>algorithm</strong> <strong>for</strong> its per<strong>for</strong>mance. The present<br />
<strong>algorithm</strong>’s potential of engineering application is demonstrated by a<br />
simple structural pattern recognition problem <strong>and</strong> a plant allocation<br />
<strong>and</strong> distribution problem.<br />
I. INTRODUCTION<br />
HE <strong>graph</strong> <strong>monomorphism</strong> problem [3],[4], also known<br />
T as the sub<strong>graph</strong> isomorphism problem [5], [61, is one<br />
that finds whether or not a one-to-one incidence preserving<br />
vertex mapping between a <strong>graph</strong> <strong>and</strong> a sub<strong>graph</strong> of<br />
another larger <strong>graph</strong> exists. The notion of <strong>optimal</strong>ity<br />
becomes important in <strong>graph</strong> <strong>monomorphism</strong> when a perfect<br />
matching between the attributed values of the two<br />
<strong>graph</strong>s may not be available. Notable methods that deal<br />
with the generalization of the <strong>graph</strong> <strong>monomorphism</strong> problem<br />
include Ghahraman, Wong, <strong>and</strong> Au’s <strong>graph</strong> <strong>optimal</strong><br />
<strong>monomorphism</strong> <strong>algorithm</strong>s [71, Shapiro <strong>and</strong> Haralick’s<br />
<strong>for</strong>ward-checking <strong>algorithm</strong> <strong>for</strong> inexact matching [8], <strong>and</strong><br />
Tsai <strong>and</strong> Fu’s sub<strong>graph</strong> error-correcting isomorphism <strong>algorithm</strong><br />
[9]. Various applications of the <strong>graph</strong> <strong>optimal</strong><br />
<strong>monomorphism</strong> problem have been outlined in [7]. A<br />
recent experiment on image underst<strong>and</strong>ing by inexact<br />
<strong>graph</strong>-matching can be found in [lo]. Approaches to solve<br />
the general <strong>graph</strong> isomorphism/<strong>monomorphism</strong> problem<br />
are discussed in [4], [6]. A further generalization of the<br />
<strong>graph</strong> <strong>monomorphism</strong> problem is the largest common<br />
sub<strong>graph</strong> isomorphism problem [ill, [121.<br />
In this paper, we propose an <strong>algorithm</strong> <strong>for</strong> finding the<br />
<strong>optimal</strong> <strong>monomorphism</strong> between two attributed <strong>graph</strong>s.<br />
The <strong>optimal</strong> <strong>monomorphism</strong> is the best matching as it<br />
minimizes the “cost” or “error” incurred in the mapping.<br />
Such minimization can also be applied directly to the cost<br />
of <strong>graph</strong> trans<strong>for</strong>mation [13], or to the increment of<br />
entropy in a r<strong>and</strong>om <strong>graph</strong> synthesis process [14]-[18],<br />
<strong>Man</strong>uscript received October 16, 1988; revised November 6, 1989.<br />
The authors are with the PAMI Group, Department of <strong>Systems</strong><br />
Design Engineering, University of Waterloo, Waterloo, ON, Canada,<br />
N2L 3G1.<br />
IEEE Log Number 8933540.<br />
without the need of extending the order of the smaller<br />
<strong>graph</strong> to that of the larger <strong>graph</strong> in order to get an<br />
<strong>optimal</strong> isomorphism between them.<br />
Following [7], we call one of the two <strong>graph</strong>s the pattern<br />
<strong>graph</strong> <strong>and</strong> the other one the base <strong>graph</strong>. Let the orders of<br />
the pattern <strong>graph</strong> <strong>and</strong> the base <strong>graph</strong> be m <strong>and</strong> n,<br />
respectively, with m G n. In the particular case where<br />
m = n, the problem is to find the <strong>optimal</strong> isomorphism<br />
between the two <strong>graph</strong>s. The decision tree <strong>for</strong> the <strong>graph</strong><br />
<strong>monomorphism</strong> problem between the pattern <strong>graph</strong> <strong>and</strong><br />
the base <strong>graph</strong> has height m, <strong>and</strong> n - p sons <strong>for</strong> each<br />
node at level p = 0,l; . . , m - 1. Searching through the<br />
decision tree by the branch-<strong>and</strong>-bound technique, we can<br />
identify the <strong>optimal</strong> <strong>monomorphism</strong> between the pattern<br />
<strong>graph</strong> <strong>and</strong> the base <strong>graph</strong>.<br />
11. THE EVALUATION FUNCTION IN THE<br />
BRANCH-AND-BOUND ALGORITHM<br />
In general, solving a branch-<strong>and</strong>-bound problem requires<br />
an evaluation function that assigns a cost to the<br />
branch incident to each node N of the tree. Each node N<br />
at level p > 0 is described by a collection of pairs N =<br />
{(i, si)}, where i = 1,2,. .., p correspond to the vertex<br />
indices of the pattern <strong>graph</strong> <strong>and</strong> the 4;’s are the distinct<br />
vertex indices of the base <strong>graph</strong> matched with the i’s.<br />
Assume that N = ((1, q,),(2, q2); . .,(p, qp)} indicates<br />
the unique path from the root to N. Then the cost<br />
k(p,q,) assigned to the branch incident to N is defined<br />
as<br />
where<br />
P-1<br />
k(p,q,)=c(p,q,)+ C c’((.j9P)~(qj~qp)) (1)<br />
c’( ( a 9 b) , ( c, 4 ) = .((a 2 b)<br />
j= 1<br />
3 ( c 7 4 ) + c( ( b 3 a) 3 ( d, c))<br />
(2)<br />
<strong>and</strong> c(x,y) is the mapping cost between the <strong>graph</strong> elements<br />
x <strong>and</strong> y in the pattern <strong>graph</strong> <strong>and</strong> base <strong>graph</strong>,<br />
respectively.<br />
The choice of the evaluation function critically determines<br />
the search result. In this section, we first define the<br />
evaluation function f* <strong>and</strong> then propose a consistent<br />
lower bounded estimate f of f* with reference to [l].<br />
The evaluation function f* is defined in such a way<br />
that its value f*(N) at a node N={(i,q,)li=1,2;..,p)<br />
001 S-9472/90/0500-0628$0 1 .OO 01990 IEEE
I<br />
WONO et 01.: AN ALGORITHM FOR GRAPH OPTIMAI. MONOMORPHISM<br />
h2Y<br />
of level p is the cost g*(N) of an <strong>optimal</strong> path from the<br />
root to node N plus the cost h*(N) of an <strong>optimal</strong> path<br />
from node N to a leaf T = {(i, q,)li = 1,2; . ., m), where m<br />
is the height of the tree, i.e.,<br />
f*( N) = g*( N) + h*( N) (3)<br />
P<br />
g*(N) = c k(i,q,) (4)<br />
1 = 1<br />
m<br />
h*(N)=min ( c k(i,q,,)) (5)<br />
,=p+l<br />
where k(x, y) is as defined in (1) <strong>and</strong> t denotes a feasible<br />
path from N to T.<br />
The value f*(N) is the cost of an <strong>optimal</strong> path from<br />
the root R to a leaf T that is constrained to go through<br />
node N. It is used to order the nodes in the tree <strong>for</strong><br />
expansion. In application, an estimate, f(N), called a<br />
heuristic function of f*(N), is used instead, in which<br />
f(N)=g*(N)+h(N) (6)<br />
where h(N) is a “consistent lower bounded estimate” of<br />
h*(N) using any available heuristic in<strong>for</strong>mation. As far as<br />
h(N) G h*(N), using f(N) as the lower bounded estimate<br />
<strong>for</strong> each node N, the branch-<strong>and</strong>-bound <strong>algorithm</strong> would<br />
1) exp<strong>and</strong> fewer nodes as compared with a search <strong>algorithm</strong><br />
using no heuristic in<strong>for</strong>mation (such as the breathfirst<br />
<strong>algorithm</strong>, which assumes h(N) = 0 <strong>for</strong> all N), <strong>and</strong> 2)<br />
always guarantee a minimum cost solution path in the<br />
decision tree.<br />
Let N={(l,q,),(2,q2);. .,(p,q,)) be the current node<br />
of the decision tree at level p. Then we have the sets NI<br />
<strong>and</strong> N2 of vertices, which have already been matched<br />
between the pattern <strong>graph</strong> <strong>and</strong> the base <strong>graph</strong>, i.e.,<br />
NI = (192,. . .,PI<br />
N2 = (q19q2,. . ., 4,l<br />
where i is matched with q1 <strong>for</strong> i = 1,2; . * , p. We also<br />
have the sets M, <strong>and</strong> M, of vertices which have not yet<br />
been matched between the pattern <strong>graph</strong> <strong>and</strong> the base<br />
<strong>graph</strong> as follows:<br />
MI = {p+l,p+2;..,m}<br />
M, = { q I q E I 17 2,. . . 3 n) \ 4 ).<br />
Let k’(i, q) be the cost of adding a pair of vertices (i, q)<br />
to N, where i E M, <strong>and</strong> q E M,. We define<br />
P<br />
k’(i,q) =c(i,q)+ C c’((i7j),(q9q,)). (7)<br />
1-1<br />
Then, <strong>for</strong> each unmatched vertex i E M,, we find a corresponding<br />
vertex q E M, such that the cost k’(i,q) is<br />
minimized. Note that such a mapping H: M, -+ M, may<br />
be many-to-one. Let a(N) be the total cost of H. We<br />
have<br />
m<br />
Similarly, we can define b(N) as the total cost of an<br />
<strong>optimal</strong> mapping H’: MI x M , + M, x M,. That is, <strong>for</strong><br />
each arc (i, j) with endpoints i,j E MI, we find a minimum<br />
cost mapping H‘: (i, j) -+(q, r), such that (q, r) is an<br />
arc with endpoints q, r E M,. H‘ can also be many-to-one.<br />
Hence<br />
With a(N) <strong>and</strong> b(N) defined, we then use their sum as<br />
the lower bounded estimate of h*(N), i.e.,<br />
h( N) =a( N) + b( N). ( 10)<br />
Property: For any node N of the decision tree, h(N) is<br />
a consistent lower bounded estimate of h*(N), i.e.,<br />
The heuristic function <strong>for</strong> <strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong><br />
given by (6)-(10) is a generalization of that used in<br />
[l], whose per<strong>for</strong>mance has been compared with the<br />
heuristic function used in [21.<br />
In [2], by defining the cost of mapping a vertex i E MI<br />
to a corresponding vertex q E M, to be<br />
the total cost h’(N) of an “error-correcting’’ homomorphism<br />
between MI <strong>and</strong> M, is taken as<br />
h’(~) = min k”(i,q). (13)<br />
EM, qEMZ<br />
Since h‘(N) < h*(N) is always true, h’(N) is used as the<br />
lower bounded estimate of h*(N) <strong>for</strong> finding the sub<strong>graph</strong><br />
error-correcting isomorphism between two <strong>graph</strong>s.<br />
<strong>An</strong> <strong>algorithm</strong> is said to be more in<strong>for</strong>med than another<br />
if it uses more accurate heuristic in<strong>for</strong>mation, i.e., using<br />
estimated values closer to h*(N). Since h*(N) > h(N) ><br />
h’(N) always holds, the <strong>algorithm</strong> which uses h(N) as a<br />
lower bounded estimate of h*(N) is more in<strong>for</strong>med than<br />
the <strong>algorithm</strong> using h’(N). Experimental results of <strong>graph</strong><br />
<strong>optimal</strong> isomorphism reported in [l] indeed show that the<br />
<strong>algorithm</strong> that uses h(N) exp<strong>and</strong>s fewer number of nodes<br />
<strong>and</strong> requires less CPU time than the <strong>algorithm</strong> that uses<br />
h’(N). It is evident that our <strong>algorithm</strong>, that uses h(N) <strong>for</strong><br />
<strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong>, will be an efficient one.<br />
Example: 1: To illustrate the computation of f(N)<br />
given by (61, let G be the pattern <strong>graph</strong> with m = 4 <strong>and</strong> H<br />
be the base <strong>graph</strong> with n = 5 as shown in Fig. 1, in which<br />
the attributed values of the vertices <strong>and</strong> edges of both<br />
<strong>graph</strong>s are enclosed in brackets. For simplicity, we set<br />
c(x, y) = 1s - tl, where s <strong>and</strong> t are the attributed values of<br />
x <strong>and</strong> y, respectively, <strong>and</strong> set c((a, b), (c, d)) =<br />
c((b, a),(d, c)) such that c’((a, b),(c, d)) = 2c((a, b),(c, d)).<br />
ForN={(1,4),(2,5)),p=2,Ml={3,4),<strong>and</strong> M,=(1,2,3),<br />
I
630<br />
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND < YBERNETIC‘S, VOL. 20, NO. 3, MAY/JUNE 1990<br />
Graph H<br />
Fig. 1. Pattern <strong>graph</strong> G <strong>and</strong> base <strong>graph</strong> H.<br />
we have<br />
=5<br />
A<br />
a( N ) = min k’(i,q)<br />
i=3 4EMz<br />
111. THE ALGORITHM AND APPLICATIONS<br />
The <strong>algorithm</strong> <strong>for</strong> <strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong> based<br />
on (6)-(10) is presented next.<br />
Begin {hitiation)<br />
Set upper-bound = infinity. (infinify is a vely large<br />
number 1<br />
Set tentative-solution = (empty).<br />
Set N2 =(empty).<br />
Set f (N) = 0.<br />
Set active-node-list = {(N2, f(N))). {root node)<br />
End {Initiation)<br />
Begin {Main process}<br />
While active-node-list is not empty do: (node expan-<br />
sion}<br />
Set current-node = first element of active-node<br />
-list.<br />
Set N; = first element of current-node. {i.e., N, in<br />
(N*, f(”<br />
Set p’ = number of elements in N;.<br />
Set p = p’+ 1.<br />
Set M, = { p + 1, p + 2, . 1 * , m) . (m = size of pattern<br />
<strong>graph</strong>)<br />
Set MI =(1,2;..,n)\N;. {n=size ofbase<strong>graph</strong>)<br />
For each element s in Mi do:<br />
* Set qp=s.<br />
* Set N2 = N2/ U qp. {append qp to N;}<br />
* Set M,=M;\q,.<br />
* Compute f(N)= g*(N)+ a(N)+ MN).<br />
* If p#m, then<br />
. Insert (N2, f(N)) in active-node-list in<br />
ascending order according to the value of<br />
f(N). (new node generated)<br />
* Else if f(N) < upper-bound, then<br />
. Set upper-bound = f(N).<br />
* Set tentative-solution = {NJ.<br />
* End<br />
Remove current-node from active-node-list. (current-node<br />
is replaced by its active sons)<br />
Remove any element in active-node-list whose<br />
f(N) value is greater than or equal to upper-bound.<br />
{prune unpromising nodes)<br />
Output <strong>optimal</strong>-solution = {(i, qi)(i = 1,2; * *, m)<br />
where qi is the ith element of tentative-solution.<br />
Output <strong>optimal</strong>-cost = upper-bound.<br />
End {Main process)<br />
1
I<br />
I<br />
WONG et 01.: AN ALGORITHM FOR GRAPH OPTIMAI. MONOMORPHISM<br />
Root<br />
63 1<br />
1<br />
2 3<br />
([ 1,41, (2.51,<br />
(3,21,(4,1))<br />
Fig. 2. Decision tree <strong>for</strong> G <strong>and</strong> H.<br />
\<br />
(( 1,41, (2,51,<br />
(3.21, (4.31)<br />
( Optimal solution 1<br />
4<br />
Fig. 3. Runway model A.<br />
Fig. 4. Runway model B.<br />
Example: 2: The complete search tree <strong>for</strong> the pattern<br />
<strong>graph</strong> <strong>and</strong> the base <strong>graph</strong> shown in Fig. 1, based on the<br />
<strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong> <strong>algorithm</strong>, is shown in<br />
Fig. 2.<br />
Example: 3: The conspicuous features of an airport<br />
field are its runways. Figs. 3-5 show three different<br />
models of the open-V runway configuration. Airports that<br />
have open-V runway configurations include Houston Intercontinental<br />
Airport (model A), Jacksonville International<br />
Airport (model B), <strong>and</strong> Mid-Continent Airport at<br />
Wichita (model C). Fig. 6 shows the image <strong>graph</strong> of the<br />
prominent runways of the Jacksonville International Airport<br />
obtained from the photo<strong>graph</strong> shown in Fig. 7 [19].<br />
The matrix representations of the attributed <strong>graph</strong>s of<br />
Figs. 3-6 are shown in Tables I-IV, respectively. <strong>An</strong><br />
entry aij of each matrix represents:<br />
1) the attributed value of vertex i, i.e., the length of<br />
runway i, <strong>for</strong> i = j; or otherwise,<br />
2) the attributed value of edge (U), i.e., the center-tocenter<br />
distance between runway i <strong>and</strong> runway j<br />
plus the acute angle between them.'<br />
In this example, we find <strong>optimal</strong> matching between the<br />
image <strong>graph</strong> <strong>and</strong> each of the three models. The cost of<br />
matching two <strong>graph</strong> elements is taken as the absolute<br />
difference between the attributed values of the two elements.<br />
Table V shows the output of our <strong>graph</strong> <strong>optimal</strong><br />
<strong>monomorphism</strong> <strong>algorithm</strong>, which indicates that the image<br />
<strong>graph</strong> of the Jacksonville runways <strong>and</strong> runway model B<br />
incur the lowest cost of matching.<br />
Example: 4: Consider the site selection, plant allocation,<br />
<strong>and</strong> distribution problem as described in the following.<br />
'This measure is not perspective-invariant <strong>and</strong> is used here <strong>for</strong> illustrative<br />
purposes only; other more stable measures may be used instead.<br />
1 7
632 IZEE TRANSACTIONS ON SYSTEMS, MAN. AND C'YHERNFTICS, VOIL 20, NO. 3, MAY/JUNF 1990<br />
TABLE I1<br />
ATTRIH~JTED VALUES OF FIG. 4<br />
1 2 3 4 5 6 7<br />
1<br />
~ ~<br />
70 6+0 45+60 49+60 22+78<br />
2 70 40+60 45+60 17+78<br />
3 72 6+0 23+20<br />
4 72 27+20<br />
5 (symmetrical) 30<br />
6<br />
7<br />
~ ~~ ~<br />
27+20 28+60<br />
22+20 22+60<br />
18+78 22+60<br />
23+78 27+60<br />
5+82 10+40<br />
30 10+42<br />
50<br />
1 2 /<br />
Fig. 5. Runway model C.<br />
Fig. 6. Image <strong>graph</strong> of Jacksonville International Airport.<br />
TABLE Ill<br />
ATTRIBUTED VALUES OF FIG. 5<br />
1 2 3 4 5 6 7 8<br />
1 75 17+0 44+50 51+50 47+50 21+65 21+65 27+25<br />
2 38 38+50 45+50 46+50 23+65 25+65 37+25<br />
3 37 9+0 13+0 24+65 26+65 37+25<br />
4 55 17+0 32+65 34+65 45+25<br />
5 (symmetrical) 85 25+65 26+65 32+25<br />
6 25 4+0 19+90<br />
7 22 15+90<br />
8 30<br />
TABLE IV<br />
ATTRIBUTED VALUES OF FIG. 6<br />
1 2 3 4 5 6<br />
1 62 5+0 54+82 27+70 31+12 29+41<br />
2 59 49+82 22+70 26+12 24+41<br />
3 60 27+12 23+70 25+41<br />
4 25 4+58 7+29<br />
5 (symmetrical) 26 7+29<br />
6 54<br />
TABLE V<br />
RESULTS OF GRAPH OPTIMAL MONOMORPHISM<br />
Pattern Graph (Fig. 6)<br />
Base Matching<br />
Graph cost Vertex Mapping ((I, 9,))<br />
Fig. 3 983 ((1,6),(2,5),(3,1),(4,2),(5,4),(6,3))<br />
Fig. 4 424 ((I, 1),(2,2),(3,3),(4,5),(5,6),(6,7))<br />
Fig. 5 634 ((1,4),(2,5),(3,1),(4,2),(5,3),(6,8))<br />
Fig. 7. Photo<strong>graph</strong> of Jacksonville International Airport (reprinted<br />
from [19]).<br />
TABLE I<br />
ATTRIBUTED VALUES OF FIG. 3<br />
1 2 3 4 5 6<br />
1 50 3+0 5+0 38+62 40+62 42+62<br />
2 50 2+0 35+62 37+62 39+62<br />
3 60 35+62 37+62 39+62<br />
4 65 2+0 5+0<br />
5 (symmetrical) 65 3+0<br />
6 65<br />
The main objective of this problem is to select five sites<br />
out of ten potential ones based on some considerations.<br />
The ten potential sites are shown in Fig. 8, in which the<br />
dem<strong>and</strong>s <strong>for</strong> a product in the neighborhoods of the sites,<br />
given in tons per day, are enclosed in brackets. The sites<br />
selected will be used as sales outlets <strong>for</strong> the product, <strong>and</strong><br />
each of them will have its own packaging plant to do the<br />
final packing of the product. The capacities of the packaging<br />
plants are shown in Table VI. The first consideration<br />
is that the capacity of the packaging plant allocated to a<br />
site shall very closely match the dem<strong>and</strong> <strong>for</strong> the product<br />
in the neighborhood of the site. Out of the five selected<br />
sites, one of them will be chosen as the central sales<br />
outlet, which will be furnished with a processing plant to<br />
process all the raw materials required <strong>for</strong> the product.<br />
The processed raw materials will then be distributed to<br />
the other sales outlets daily by individual fleets. The<br />
second consideration is there<strong>for</strong>e to minimize the total<br />
cost of transportation by selecting a suitable site as the<br />
central sales outlet. The last consideration is that, while<br />
the distance between any two sales outlets shall be as<br />
short as possible to facilitate distribution <strong>and</strong> overall<br />
management, it is also advisable to have the outlets kept<br />
far away from each other to avoid competition amongst<br />
I
I<br />
WONG et al.: AN ALGORITHM FOR GRAPH OPTIMAL MONOMORPHISM<br />
633<br />
2 (lot/d)<br />
0<br />
10 (7t/d)<br />
0<br />
5 (Ilt/d)<br />
e<br />
4 (14t/d)<br />
e<br />
C<br />
Fig. 8.<br />
Ten potential sites of sales outlets.<br />
TABLE VI<br />
CAPACITIES OF PACKAGING PLANTS<br />
TABLE VI1<br />
DESIRABLE DISTANCES BETWEEN PACKAGING PLANTS<br />
Size Capacity Available Large Medium Small<br />
Large 15 t/day 1 no.<br />
Medium 10 t/day 1 no.<br />
Small 5 t/day 3 nos.<br />
Large 5 5 5<br />
Medium 5 4 4<br />
Small 5 4 3<br />
IN km<br />
them, especially when they will have their own policies of<br />
operation. The desirable distances between different sizes<br />
of sales outlets are given in Table VII.<br />
The ten potential sites are represented by a matrix, as<br />
shown in Table VIII, in which entry nrr gives the dem<strong>and</strong><br />
<strong>for</strong> the product in tons per day in the neighborhood of<br />
site i whereas entry n,, <strong>for</strong> i # j gives the distance from<br />
site i to site j in kilometers. Tables IX, X, <strong>and</strong> XI show<br />
the matrix representations of three different arrangements<br />
of the processing plant <strong>and</strong> the packaging plants.<br />
The processing plant may be installed with any size of<br />
packaging plant. The entries m,, or m,, in Tables IX, X,<br />
<strong>and</strong> XI indicate<br />
1) the capacity of packaging plant i <strong>for</strong> i = j;<br />
2) the capacity of packaging plant j <strong>for</strong> i = 1, i.e., the<br />
ideal quantity of the product to be transported<br />
daily from the processing plant (which is installed<br />
at the same site as packaging plant 1) to packaging<br />
plant j; <strong>and</strong><br />
3) the desirable distance between packaging plant i<br />
<strong>and</strong> packaging plant j <strong>for</strong> 1 < i < j.<br />
The problem is <strong>for</strong>mulated as a <strong>graph</strong> <strong>optimal</strong><br />
<strong>monomorphism</strong> problem by taking Table VI11 as the base<br />
<strong>graph</strong> <strong>and</strong> Tables IX, X, <strong>and</strong> XI as the pattern <strong>graph</strong>s.<br />
The idea is to find the best match between the real-world<br />
TABLE VI11<br />
ATTRIBUTED VALUES OF TEN POTENTIAL SITES<br />
1 2 3 4 5 6 7 8 9 10<br />
1 5 5 91010 6 4 4 8 8<br />
2 5 1 0 4 9 1 1 1 0 7 4 5 8<br />
3 9 4 8 6 1 1 1 2 9 5 4 7<br />
4 1 0 9 6 1 4 7 1 0 9 7 4 5<br />
5101111 7 1 1 5 6 8 7 4<br />
6 6 1 0 1 2 1 0 5 6 3 7 9 6<br />
7 4 7 9 9 6 3 3 4 6 4<br />
8 4 4 5 7 8 7 4 3 3 3<br />
9 8 5 4 4 7 9 6 3 5 4<br />
10 8 8 7 5 4 6 4 5 4 7<br />
TABLE IX<br />
ATTRIBUTED VALUES OF PLANT ARRANGEMENT A<br />
1 2 3 4 5<br />
1 1 5 1 0 5 5 5<br />
2 10 10 4 4 4<br />
3 5 4 5 3 3<br />
4 5 4 3 5 3<br />
5 5 4 3 3 5<br />
situation of the sites given in Table VI11 <strong>and</strong> each of the<br />
ideal situations as presented in Tables IX, X, <strong>and</strong> XI. The<br />
costs <strong>for</strong> the mapping of the <strong>graph</strong> elements are<br />
1) c(i, j) = a x(m,, - n,,) if mrr > n,,.<br />
2) c(i,j) = b x(n,, - m,,) if m,, < rill.<br />
--1 7
I<br />
634<br />
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND C'YBERNETICS, VOI.. 20, NO. 3, MAY/JUNE 1990<br />
TABLE X<br />
ATTRIBUTED VALUES OF PLANT ARRANGEMENT B<br />
1 2 3 4 5<br />
1 1 0 1 5 5 5 5<br />
2 1 5 1 5 5 5 5<br />
3 5 5 5 3 3<br />
4 5 5 3 5 3<br />
5 5 5 3 3 5<br />
TABLE XI<br />
ATRIBCITED VALUES OF PLANT ARRANGEMENT C<br />
1 2 3 4 5<br />
1 5 15 10 5 5<br />
2 15 15 5 5 5<br />
3 IO 5 1 0 4 4<br />
4 5 5 4 5 3<br />
5 5 5 4 3 5<br />
2 (10t/d)<br />
5 (llt/d)<br />
8<br />
Fig. 9. Plant arrangement A (matching cost = 181).<br />
io (7t/d)<br />
8<br />
5 (llt/d)<br />
8<br />
4 (14t/d)<br />
Fig. 10. Plant arrangement B (matching cost = 195).
WONG et al.: AN ALGORITHM FOR GRAPH OPTIMAL MONOMORPHISM 635<br />
2 (iot/d)<br />
7 (3t/d)<br />
5 (llt/d)<br />
Fig. 11. Plant arrangement C (matching cost = 186).<br />
TABLE XI1<br />
REsuL-rs OF GRAPH OFWMAL MONOMORPHISM<br />
Base Graph (Table VIII)<br />
Pattern Matching<br />
Graph cost Vertex Mapping ((i, 9,))<br />
Table IX 181 ((1,4),(2,3),(3,9),(4,10),(5,8))<br />
Table X 195 ((1,2),(2,3),(3, I), (4,9), 68))<br />
Table XI 186 ((1,9),(2,4),(3,3),(4,101,(58))<br />
3) c‘((1, j),(q, r)) = c X quantity X nqr where<br />
a) quantity = nji if mlj > njj<br />
b) quantity = m , if m , < n . .<br />
Jl<br />
4) c’((i, j),(q, r)) = d x lmij - n,,l if 1 < i < j.<br />
where U, b, c, <strong>and</strong> d are parameters.<br />
For the purpose of this example, we take U = 10, b = 5,<br />
<strong>and</strong> c = d = 1. The result of matching the <strong>graph</strong>s, based<br />
on our <strong>algorithm</strong> <strong>for</strong> <strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong>, is<br />
summarized in Table XI1 <strong>and</strong> Figs. 9- 11.<br />
IV. CONCLUSION<br />
In this paper, we have proposed an <strong>algorithm</strong> <strong>for</strong> finding<br />
the <strong>optimal</strong> <strong>monomorphism</strong> between attributed <strong>graph</strong>s<br />
or r<strong>and</strong>om <strong>graph</strong>s. Here the <strong>graph</strong> <strong>optimal</strong> <strong>monomorphism</strong><br />
problem is <strong>for</strong>mulated as a tree search problem;<br />
then the branch-<strong>and</strong>-bound heuristic is adopted to guide<br />
the tree search. The heuristic consists of a consistent<br />
lower bounded estimate <strong>for</strong> the evaluation function of the<br />
cost associated with the <strong>optimal</strong> solution in the decision<br />
tree. Some illustrative examples have also been given.<br />
REFERENCES<br />
[l] M. You <strong>and</strong> A. K. C. Wong, “<strong>An</strong> <strong>algorithm</strong> <strong>for</strong> <strong>graph</strong> <strong>optimal</strong><br />
isomorphism,” in hoc. 7th. Int. Conf. on Part. Recogn., Montreal,<br />
Canada, 1984, pp. 316-319.<br />
[2] W. H. Tsai <strong>and</strong> K. S. Fu, “Error-correcting isomorphism of<br />
attributed relational <strong>graph</strong>s <strong>for</strong> pattern analysis,” IEEE Trans.<br />
Syst. <strong>Man</strong> Cybern., vol. SMC-9, no. 12, pp. 757-768, Dec. 1979.<br />
[3] D. E. Ghahraman, A. K. C. Wong, <strong>and</strong> T. Au, “Graph <strong>monomorphism</strong><br />
<strong>algorithm</strong>s,” IEEE Trans. Sysr. <strong>Man</strong> Cybern., vol. SMC-10,<br />
no. 4, pp. 189-196, Ap. 1980.<br />
141 F. A. Akinniyi, A. K. C. Wong, <strong>and</strong> D. A. Stacey, “A new<br />
<strong>algorithm</strong> <strong>for</strong> <strong>graph</strong> <strong>monomorphism</strong> based on the projections of<br />
the product <strong>graph</strong>,” IEEE Trans. Syst. <strong>Man</strong> Cybern., vol. SMC-16,<br />
no. 5, pp. 740-751, Sept./Oct. 1986.<br />
[5] J. R. Ullmann, “<strong>An</strong> <strong>algorithm</strong> <strong>for</strong> sub<strong>graph</strong> isomorphism,” J.<br />
ACM, vol. 23, no. 1, pp. 31-42, 1976.<br />
[6] J. K. Cheng <strong>and</strong> T. S. Huang, “A sub<strong>graph</strong> isomorphism <strong>algorithm</strong><br />
using resolution,” Part. Recogn., vol. 13, no. 5, pp. 371-379, 1981.<br />
[7] D. E. Ghahraman, A. K. C. Wong, <strong>and</strong> T. Au, “Graph <strong>optimal</strong><br />
<strong>monomorphism</strong> <strong>algorithm</strong>,” IEEE Trans. Syst. <strong>Man</strong> Cybern., vol.<br />
SMC-10, no. 4, pp. 181-188, Apr. 1980.<br />
[81 L. G. Shapiro <strong>and</strong> R. M. Haralick, “Structural descriptions <strong>and</strong><br />
inexact matching,” IEEE Trans. Pattern <strong>An</strong>aly. Machine Intell., vol.<br />
PAMI-3, no. 5, pp. 504-519, Sept. 1981.<br />
[91 W. H. Tsai <strong>and</strong> K. S. Fu, “Sub<strong>graph</strong> error-correcting isomorphism<br />
<strong>for</strong> syntactic pattern recognition,” IEEE Trans. Syst. <strong>Man</strong> Cybern.,<br />
vol. SMC-13, no. 1, pp. 48-62, Jan./Feb. 1983.<br />
1101 M. A. Eshera <strong>and</strong> K. S. Fu, “<strong>An</strong> image underst<strong>and</strong>ing system<br />
using attributed symbolic representation <strong>and</strong> inexact <strong>graph</strong>-matching,”<br />
IEEE Trans. Pattern <strong>An</strong>al. Machine Intell., vol. PAMI-8, no.<br />
5, pp. 604-617, Sept. 1986.<br />
[I 11 A. K. C. Wong <strong>and</strong> F. A. Akinniyi, “A net based <strong>algorithm</strong> <strong>for</strong><br />
largest common sub<strong>graph</strong> isomorphism,” Proc. 1983 Int. Conf. on<br />
<strong>Systems</strong>, <strong>Man</strong>, <strong>and</strong> Cybernetics, pp. 197-201.<br />
D. A. Stacey <strong>and</strong> A. K. C. Wong, “A largest common sub<strong>graph</strong><br />
isomorphism <strong>algorithm</strong> <strong>for</strong> attributed <strong>graph</strong>s,” submitted to IEEE<br />
Trans. Syst. <strong>Man</strong> Cybern. <strong>for</strong> publication, 1988.<br />
M. You <strong>and</strong> A. K. C. Wong, “On distance of attributed <strong>graph</strong>s<br />
<strong>and</strong> r<strong>and</strong>om <strong>graph</strong>s,” Proc. 1983 Int. Conf. on <strong>Systems</strong>, <strong>Man</strong>, <strong>and</strong><br />
Cybernetics, pp. 632-636.<br />
-, “R<strong>and</strong>om <strong>graph</strong>s <strong>and</strong> their distance measure,” Pmc. I982<br />
Int. Conf. on Cybernetics <strong>and</strong> Society, pp. 467-471.<br />
A. K. C. Wong <strong>and</strong> M. You, “Entropy <strong>and</strong> distance measures of<br />
r<strong>and</strong>om <strong>graph</strong>s,” Proc. I983 IEEE Cornputer Society Conf. on<br />
Computer Vision <strong>and</strong> Pattern Recognition, pp. 371-376.<br />
-, “Entropy <strong>and</strong> distance of r<strong>and</strong>om <strong>graph</strong>s with application to<br />
structural pattern recognition,” IEEE Trans. Pattern <strong>An</strong>aly. Machine<br />
Intell., vol. PAMI-7, no. 5, pp. 599-609, Sept. 1985.<br />
1171 A. K. C. Wong, “Structural pattern recognition: A r<strong>and</strong>om <strong>graph</strong><br />
approach,” in NATO AS1 Series, Vol. F30. Pattern Recognition<br />
I 7
I<br />
636 IEEE TRANSACTIONS ON SYSTEMS, MAN. AND CYBERNETICS, VOL. 20, NO. 3. MAY/JUNF 1990<br />
[18]<br />
[19]<br />
Theory <strong>and</strong> Applications, P. A. Devijver <strong>and</strong> J. Kittler, Eds. Berlin,<br />
Heidelberg: Springer-Verlag, 1987, pp. 323-345.<br />
A. K. C. Wong, J. Constant, <strong>and</strong> M. You, “R<strong>and</strong>om <strong>graph</strong>s,”<br />
Syntactic <strong>and</strong> Structural Pattern Recognition - Fundamentals, Advances,<br />
<strong>and</strong> Applications, H. Bunke <strong>and</strong> A. Sanfeliu, Eds. New<br />
Jersey: World Scientific, 1989.<br />
J. Stroud, Airports of The World. London: Putnam & Company,<br />
1980.<br />
<strong>An</strong>drew K. C. Wong received the Ph.D. degree<br />
in 1968 from Carnegie-Mellon University.<br />
He is currently a Professor in the Department<br />
of <strong>Systems</strong> Design Engineering, <strong>and</strong> Director of<br />
the PAM1 (Pattern <strong>An</strong>alysis <strong>and</strong> Machine Intelligence)<br />
Lab at the University of Waterloo. From<br />
1984 to 1987, he assumed the responsibility of<br />
Research Director, in charge of the Robotic<br />
Vision <strong>and</strong> Knowledge Base Project. Since 1987<br />
he has been heading two projects under two<br />
Ontario Centres of Excellence, namely, “Flexible<br />
Automation” under the <strong>Man</strong>ufacturing Research Corporation of<br />
Ontario, <strong>and</strong> “Knowledge Acquisition, Synthesis <strong>and</strong> Organization”<br />
under the In<strong>for</strong>mation Technology Research Centre of Ontario. Since<br />
then, he has authored <strong>and</strong> co-authored chapters/sections in a good<br />
number of engineering books <strong>and</strong> published many articles in scientific<br />
journals <strong>and</strong> conference proceedings. He is currently an Associate<br />
Editor of the Journal of Computers in Biology <strong>and</strong> Medicine. Over the<br />
years, he has also served as Consultant to a number of major industries<br />
including IBM, NCR, Northern Telecom, GM, Hughes, <strong>and</strong> Spar<br />
Aerospace.<br />
<strong>Man</strong>lai You was born in Suao, Ilan, Taiwan,<br />
Republic of China, on July 3, 1949. He grdduated<br />
from Mingchi Institute of Technology, Taiwan,<br />
in 1970. He received the M.S. degree in<br />
product design from Illinois Institute of Technology,<br />
Chicago, in 1977, <strong>and</strong> the Ph.D degree<br />
in systems design from the University of Waterloo,<br />
Waterloo, ON, Canadd, in 1983.<br />
From 1972 to 1975 he was a Product Design<br />
Engineer at <strong>Man</strong>ya Plastics Corporation, Taiwan.<br />
From 1977 to 1980, he lectured on product<br />
design at Mingchi Institute of Technolom. He was a Research Assistant<br />
<strong>and</strong>PostdoctGrate Researcher at the Department of <strong>Systems</strong> Design,<br />
University of Waterloo, in the periods from 1980 to 1983 <strong>and</strong> 1983 to<br />
1984, respectively. He is currently an Associate Professor of Product<br />
Design at Mingchi Institute of Technology, Taiwan. His fields of interest<br />
include pattern recognition, ergonomics, computer-aided design, <strong>and</strong><br />
design methodology.<br />
S. C. Chan received the B S degree in civil<br />
engineering from University of Hong Kong, in<br />
1973 <strong>and</strong> the M S. degree in management science<br />
(with specialization in operational research)<br />
from Imperial College, U K , in 1984<br />
He is currently with the Pattern <strong>An</strong>alysis <strong>and</strong><br />
Machine Intelligence Laboratory of the Department<br />
of <strong>Systems</strong> Design Engineering of the University<br />
of Waterloo while working toward the<br />
Ph.D degree His research interests include<br />
<strong>graph</strong> mapping, pattern recognition, <strong>and</strong> analysis<br />
of macromolecular sequences<br />
1