Journal of Moocher Structure (T~oc~m~, 235 (1991) 293-309 Elsevier Science Publishers B.V., Amsterdam
293
A revised peeling algorithm for determining if a hexagonal system is KekulBan Pierre Hansena and Maolin Zhen$ “GERAD, Ecok des Sautes Etudes Commerciales, Montrkal, Canada and RUTCUR, Rutgers University, New Brunswick, NJ 08903 (USA) “RVTCOR, Rutgers University, New Brunswick, NJ 08963 (USA) (Received 10 October 1990; in revised form 25 January 1991)
It is proved that for any hexagonal system there is a peak and a valley which are border adjacent (the path from the peak to the valley along the border is monotone) and such that either the wetting border of the peak contains no peaks or the catching border of the valley contains no valleys. Based on this property, a revised peeling algorithm is given to find a perfect matching for a hexagonal system if it exists. As a consequence, it is shown that the matching between peaks and valleys induced by perfect path systems is unique.
1. INTRODUCTION
A hexagonal system is a finite connected plane graph with no cut-vertex in which every interior region is a regular hexagon of side length 1. The topological properties of hexagonal systems are extensively studied for they play an important role in theoretical chemistry of benzenoid hydrocarbons [ 11. There have been studies of the problem of determining if a hexagonal system has a perfect matching; in other words, if the corresponding benzenoid hydrocarbon has a Kekule structure. Sachs [Z] proved rigorously that a hexagonal system is Kekulean if and only if it admits a perfect path system, i.e. a set of disjoint monotone paths joining peaks to valleys. This property was already known to Gordon and Davison [3 1. It is used in the “peeling algorithm” of Gutman and Cyvin [ 41 which proceeds by recursively deleting the leftmost monotone path from peak and valley and then deleting pendant vertices (if any) together with their first neighbors. Unfortunately, this algorithm does not work in all cases. Gutman and Cyvin [5] tried to repair the algorithm’s defect but, as shown below, it still does not always work correctly. Other algorithms based on network flows and on finding convex pairs, have been proposed by He and He [ 61 and by Sheng [ 71 respectively. A very clear survey of these algorithms has recently been given by Sheng [S] . In this paper, we pres0166-1280/91/$03.50
0 1991 Elsevier Science Publishers B.V. Ah rights reserved.
294
ent some properties of peaks and valleys and give a simple revised peeling algorithm to determine whether or not a hexagonal system is Kekulean. As a consequence, we show that the matching of peaks and valleys induced by all perfect path systems of a hexagonal system is unique, i.e. if a peak and a valley are the ends of a monotone path in a perfect path system then they are the ends of a monotone path in every perfect path system.’ 2. DEFINITIONS
A generalized hexagonal system is a connected subgraph of a hexagonal system with each interior region being a hexagon. In this paper we assume that all generalized hexagonal systems are drawn in the plane so that one of their edge directions is parallel to the y-axis. A peak of a generalized hexagonal system is a vertex which lies above its adjacent vertices. A valley of a generalized hexagonal system is a vertex which lies below its adjacent vertices. A peak p and a valley v are said to be left (right) border adjacent if the path from p to v contained in the border of H which contains p’s first left (right) neighbor is monotone decreasing. The wetting region of a peak consists of all the monotone paths from the peak. The catching region of a valley consists of all monotone paths from the valley (see Fig. 1).In a hexagonal system the wetting region of a peak contains some valley and the catching region of a valley contains some peak. Let p be a peak and v1 and v2 be the valleys which are the endpoints of the leftmost and rightmost monotone paths from p. We call v1 and v, the leftmost and rightmost valleys in p’s wetting region. We call the path from v1 to v2
V
Fig. 1. ‘We have learned from Professor Sachs at the Fourth ~~~tio~ Conference on Graph Theory and Combinatorics, Marseilles, July 1990, that a more general result on perfect path systems and perfect matchi~ of regular tilings of the plane is proved by Cameron and Sachs [Q] in a research report of 1984.
contained in the border of H which does not contain p, the wetting border of p. Similarly, we can define the catching border of a valley (see Fig. 2). A (peak to valley) path system of a generalized hexagonal system H is a system of disjoint monotone paths each starting at a peak and ending at a valley. A perfect path system is a path system containing all the peaks and valleys of H. For a hexagonal system H, a straight line segment C with end points p1 and p2 (which may be the same) is called a cut if (a) C is orthogonal to one of the three edge directions, (b) each of p1 and p2 is the center of an edge on the boundary of H, (c ) C is completely contained in the inside of H except at its two ends. Clearly, deleting all the edges intersecting C, will produce a graph with esactly two components. One, called the upper bank of C, lies above C and the other, called the lower bank of C, lies below C (see Fig. 3). All the cuts mentioned from now on are horizontal ones.
Fig. 2.
296 3. A COUNTER-EXAMPLE
FOR GUTMAN AND CYVIN’S REVISED PEELING
ALGORITHM
In order to give a counter-example for the revised peeling algorithm of Gutman and Cyvin [5 1, we recall the following definition. Let the peaks of a hexagonal system be conventionally labeled so that pi+r lies to the right of and/or below pi (iE=1, .... n- 1). A canonical labeling of the valleys of the hexagonal system is such that vi+1 lies to the right of and/or below vi (is 1, .... la- 1) , and a monotone path exists connecting pi with vi for all i= 1, .... n. The basis of the revised peeling algo~thm given by Gutman and Cyvin [ 5 J is the statement that the hexagonal system If, with peaks and valleys labeled as described above, is Kekulean if and only if the remaining graph obtained by deleting the leftmost monotone path from pl to v1 from H has a perfect matching. The following example shows this is not true in general. As shown in Fig. 4, pl, pz, p3 is a conventions labeling of the peaks, and vl, v2, v3 is a canonical labeling of the valleys. But after deleting the leftmost monotone path from p1 to v1 one obtains a graph having no perfect matching. 4. MAIN RESULTS
In this section we state our main theorems, the rules of the revised peeling algorithm and give an example to show how the algorithm works. We relegate all proofs to the appendix. Theorem 4.1 For a hexagonal system H, there is a pair of border adjacent peak p and valley v such that either (I) the wetting border of p contains no peaks, or (2) the catching border of v contains no valleys.
Fig. 4.
297
Fig. 5.
Let H be a generalized hexagonal system without pending vertices, H’ be the subgraph of H induced by the set of edges which belong to some hexagon. Clearly, each component of H’ is a hexagonal system. Since H has no nonhexagonal interior region, if H# H’ then there is a component of H’ , denoted by L(H), such that H has only one edge which has one end in and the other not in L(H). If H=H’ then let L(H) =H. If H#H’ then let r(L(H)) denote the unique vertex of L(H) which has a first neighbor out of L(H), else let r (L(H) ) be empty (see Fig. 5). Note that the choice of L(H) may not be unique. Algorithm Input: H, a hexagonal system; Output: M, a perfect matching of H if it exists; statement that there is none otherwise; Initialize A4 to the empty set. Step 1. If H has an isolated vertex as a component, then return H is nonKekulean and stop. If H is empty, return Mand stop. If none of the above cases apply, let H’ be a component of H and proceed to Step 2. Step 2. ( 1) If L (H’ ) has only one peak and one valley, then put all non-vertical edges in a monotone path between the peak and the valley that is contained in the border of L(H’ ) into M, delete the monotone path and its incident edges from H; replace H by the remaining graph (also denoted by H); proceed to Step 3. (2) If case ( 1) does not apply, find a border adjacent peak p and valley v in L(H’ ) such that either the wetting border of p contains no peaks or the catching border of v contains no valleys, and the monotone path L from p to v along the border of L (H’ ) does not contain r (L (H’ ) ); put all non-vertical edges of L into M, delete L and its incident edges from H, replace iY by the
298
remaining graph, proceed to Step 3. If one cannot find such p and v, then return His non-Kekul&n and stop. Step 3. If H has a pendant edge, then put it into M and delete it together with its end vertices, replace H by the remaining graph, and iterate Step 3, else return to Step 1. Clearly, after leaving Step 3 each component of the remaining graph is also a generalized hexagonal system with no pending vertex. Figure 6 shows how the algorithm works. Even though the mathematical basis of the algorithm is quite complicated, its use is simple and it is fask i.e. quite large examples are easily solved by hand. A good heuristic rule to accelerate the algorithm in practice is to check first the condition relating to peaks and valleys in the wetting and catching borders for the closest pair of border adjacent peak and valley (note that such a pair of peak and valley is not always joined by a path in a perfect path system, see Fig. 7). Because each step of the algorithm can easily be implemented in O( 1VI ) time, where V denotes the set of vertices of the hexagonal system, and is apP
& 8.
(a’) The generailed hexagonal
system 05tairw by d&ting the vertices incident with the bold edges in 8. (a).
6. @‘I
Theganeralired hexagonal system obtained Dy deleting rne~i~tw~~ bo!uedgesin S.@). Fig. 6.
P’
/ 8
V’
6. (c’f
6. (Cf By applying Step 2 (1)
mewboM-es
put into M.
are
The generalized hexagonal system obtained 5~ delebng the mticas incident wtth the bold edges in 6. (c).
299
Fig. 7.
plied at most 1Vi times, the worst-case complexity of the algorithm is in C( I V12)* Any perfect path system P of a hexagonalsystemH induces a matchingA& betweenpeaks and valleyssuch that peak p matchesvalleyv if and only if they are the ends of a monotone path in P. We then have Theorem 4.2 If a hexagonal system H has a perfect path system, then the matchingsbetween peaks and valleys induced by all perfect path systemsare the same. 5. APPENDIX
In this section, we prove the theoremsand show the validityof the algorithm stated in section 4. By a resultof Sachs [2 1, a hexagonalsystemH has a perfect matchingif and only if it has a perfect path system. It is easilyto construct a perfect matching of H from a perfect path systemP in the followingway. Choose all non-vertical edges in and all vertical edges not in the perfect path system.Denote this perfect matching by M(P). For a perfect matchingM of H, from any peak there issues a monotone path to a vahey with its non-vertical edges in M and its verticaledgesnot in A4.This monotone path is uniquelydeterminedby M. The paths so constructed from M are disjoint and therefor form a perfect path system. Denote this perfect path system by P(M). Similarly, a generalized hexagonalsystem withoutpending vertices has a perfect matchingif and only if it has a perfect path system [9]. Lemma 5.1
Let p and v be two vertices of a hexagonal system H, and C,, C,, .... C, be cuts of H. If all Ci together cut all paths from p to v, then one of them cuts all paths from p to v.
Proof. By contradiction.Without loss of generality,we can assumethat every subset of k- 1 cuts Ci cannot cut all paths from p to v. Then for each cut Ci there is a path Pi from p to v such that only Ci cuts Pi. For convenience, we give each edge of Pi a direction which coincides with the direction of Pi (from p to v ). Let e; be the first and ei be the last edges of Pi intersectingCi.We can assume that Pi intersects Ci only once, i.e. ei=ei, because of the following reasons. If ei# ei there are two cases. (a) Suppose that ei and e: are directed upwards (a similarargumentholds if they are directeddownwards). Let vi and vi be the heads of ei and e: respectively, and PI be the path from vi to vi consisting of the edges which are nonvertical,just above Ci and betweenvi and vi. Let PI be the subpath of Pi from vi to vi. Then clearly (Pi-P: ) UPI inters&~ Ci only once but not any other cut of Cl, *.*,C, and it contains a path from p to v, We can replace Pi by this path. (b) Suppose that ei is directed upwards and e: is directed downwards (a similarargumentholds if ei is directeddownwardsand e: is directedupwards). Let ti be the tail of ei and hi be the head of e:. Let Pi be the path consisting of the edges which are non-vertical,just below Ci and between ti and hi, and P; be the subpath of Pi from ti to hi. Then (Pi- Py ) u Pi intersects none of Ci and contains a path from p to v. This contradicts that the Ci cut all the paths from p to v. Now consider C1,C, and PI, Pz. Since e, and e2 are different, e, intersects C1,and e2 intersects C,, one can check easily that PI u Pz contains a cycle to which e, and e2belong. Since one end of C1is in the inside of this cycle, H has a non-hexagonalinteriorregion. This is a contradiction. Let p be a peak (valley) of a hexagonalsystem which is border adjacent to a valley (peak). If’p’s wetting (catching) border contains some peak (valley) p’, then there is a cut which separatesp and p’ and whose upper and lower banks contain both peaks and valleys. Proof. By symmetry,we prove the lemma for p a peak. Without loss of gener-
ality, we assumethat p is left border adjacentto a valley v. Let v’ be the rightmost valley in p’s wetting region.There are two cases. Case 1. Suppose p’ is below v or v’ . Note that p’ is never on the same level as v or v’ . There are two subcases: S&cese I, Assumethat p’ is below v’ . Considerthe cutsjust above p’. Then p is above these cuts and p‘ is below them. So these cuts cut all paths from p to p’. By Lemma 5.1, among the cuts there is one which cuts all paths from p
301
to p’. But this one does not cut the monotone path from p to v’ and the monotone paths beginning at p’ . So this cut satisfies the demand. S&case 2. Suppose that p’ is below v. The proof is similar to Subcase 1. Case 2. Suppose p’ is above v and v’ . Denote the leftmost monotone path from p to v by L and the rightmost monotone path from p to v’ by R. There are two subcases. Subcase 1. Suppose p’ is between L and R. Consider the cuts just above p’. Then p is above and p’ is below these cuts. Each of these cuts cannot separate p from v and v’ for otherwise there will be a vertical edge which is incident with p’. By Lemma 5.1, among the cuts considered there will be one which separates p and p' . This cut satisfies the demand. Subcase 2. Suppose p’ is on the left side of L or on the right side of R. (a) Assume that v’ is higher than v. Consider the cuts of H just below v’ with their right ends on the left of v’ and their left ends on L or on the right of L. Such cuts must exist. These cuts cut all paths from p top’ . If this is not true, there is a path from p to p’ and therefore a path from v’ to p’ not intersecting any of the cuts. Denote the one from v’ to p’ by P1. Let Pz be the path from p’ to v’ contained in the wetting border of p. We assign a direction to Pz which is from v’ to p’ and a direction to each edge in P2 which coincides with the direction of P2. For P2 we have the following conclusions. (1) If P2 and R have an intersection not at v’ , then the intersection could not be just a vertex, for the degree of each vertex is less than 4. (2) If Pz and R have an inspection, by ( 1) the inception is the union of disjoint paths. Let I3 be one of the disjoint paths with ends x andy. Also assume that y is closer to v’ than x in P* If y#v’, and the edge incident with y which belongs to Pz but does not belong to B is on the left of R, then the edge e in Pz which is incident with x but does not belong to B is on the left of R. If y=v’, then e is also on the left of R. The reason is as follows. Note that when one travels from v’ to p’ along P2, H is always on his right hand side. If e is on the right of R, then the three edges incident with x belong to the border of H. This is impossible. By conclusions (2)) we can see that Pz must cross some of the cuts otherwise p’ will be between L and R. Since Pz starts from above the cuts, the first vertical edge of Pz crossing the cuts should go down, and also the last vertical edge of Pz goes down for otherwise, by conclusion (2) p’ will be between L and R. It is easy to see that Pz crosses each of the cuts at most twice for all its edges are on the border of H. If there is one of the cuts which cuts Pz just once, then similar to the proof of Lemma 5.1, there is a cycle contained in P1 uPz so that one of the ends of the cut is in the interior of the cycle. So His not a hexagonal system.
Therefore if Pz crosses a cut, then it passes the cut exactly twice and the two crossing edges of p2 have different directions, i.e. one goes up and the other goes down. But since the first and the last edges of P2 crossing the cuts are all orienteddownwards,there are odd numbersof edgesof P2 which cross the cuts and are oriented downwards.This is a contradiction.Thus the cuts cut all the paths from p to p’ . By Lemma 5.1, one of them cuts all the paths from p to p’ . Denote this cut by C. If p’ is in the lower bank of C, one can check easily that C is the desiredcut. If p’ is on the upper bank of C, assumethat v” is a valley in the wetting border of p’ . If v” is in the upper bank, we are done. If v” is in the lower bank, then there is a monotone path from p’ to v” crossing C. Since p’ is either on the left side of L or the right side of R, the monotone path first crossesR then C. From this we have that p and p’ are not separatedby C. This is a contradiction. (b) Suppose v is higherthan v’. Let C’ be the cut just below v which intersects with R. Considerthe cutsjust below v with left ends on the right of v and the right ends on the left of C’ plus C’ . Then these cuts will separatep from p’ . Otherwisesimilar to (a), there is a path P, from v to p’ not passing the cuts. Let P2 be the path from v to p’ in the wettingborder of p. Similarto (a) we assign a direction to P2 (from v to p’ ) and a direction to each edge of P2. Similarto (a) we have that (1) and (2) are true. In order to show that (2) is true, it is enough to note that when one travels from v to p’ along P2, H is alwayson the left hand side. So as in case (a), we can obtain the conclusion. (c) Suppose v and v’ are at the same level. Consider the cuts just below v and v’ . Such cuts must exist for otherwisep’ will be between L and R. As in (a) and (b), we can prove the conclusion. Lemma 5.3 For a hexagonalsystem H, there are two peak-valley pairs (pl, vi) and (p2, v2) (which may be the same) such that p1 and v1 are left border adjacent and p2 and v2 are rightborder adjacent. Proof. We choose a peak p1 and a valley v1 such that there is a monotone path P from p1to v1and the path L from p1to v1counter clockwise along the border of H is as short as possible. We claim that p1 and v1 are left border adjacent. Indeed, if this is not the case, there is a peak or a valley which is an interior vertex of L. Without loss of generality,assumethat there is a peak p # p1 in L. ConsiderP’ which is a monotone path from p to a valleyv. If v is not in L, then P intersectswith P’ . So there is a monotone path from p to vl. This contradicts the choice of p1 and vl. Similarly,there is also a contradiction for v in L. In a similarway we can show that there is a right border adjacentpair of peak and valley.
Lemma 5.4 Let @# 0 be a set of cuts of H. Then there are two distinct cuts C and C’ of @such that one of the following conclusions is true. (a) The lower bank of C and the upper bank of C’ contain no other cuts in @, (b) C # C’ and the upper banks of C and C’ contain no other cuts in C, (c) CZ C’ and the lower banks of C and C’ contain no other cuts in C. Proof. Let C, be a cut in @.Let C, be the cut contained in the lower bank of C, such that the path between its two ends which is contained in both the lower bank of C, and the border of H has minimum length. Let CL be the cut contained in the upper bank of C1 with a similar property as for C,. Without any difficulty, one can check that one of (a)-(c) is true for Cz, Cz. Proof of Theorem 4.1. By contradiction. If the conclusion is false, by Lemma 5.2, there is a cut whose lower bank and upper bank have both peaks and valleys. Consider all such cuts. They are disjoint. By Lemma 5.4, there is one of them whose lower or upper bank contains none of the cuts. Let C be such a cut. By symmetry, assume that C’s lower bank contains none of the cuts. As in the proof of Lemma 5.3, there is a pair of border adjacent peak and valley, p1 and vl, in C’s lower bank. We claim that pl’s wetting border contains no peaks. Let v and v’ be the leftmost and rightmost valleys in pl’s wetting region (note that one of v and v’ is equal to v1 ). If this is not true, then there is a peak pi in pl’s wetting border. If pi is in the lower bank of C, then by Lemma 5.2 there is a cut separating p1 and pi. This cut should be contained in the lower bank of C, which contradicts the choice of C. So every peak in pl’s wetting border belongs to the upper bank of C, and p1 lies between v and v’ on the border of H in the lower bank of C (see Fig. 8). Let e, and e2 be the leftmost and rightmost vertical edges intersecting C. At least one of the hexagons just below e, and e2 belong to H. Otherwise consider all the cuts just below C with left ends on the right of e, and right ends on the left of e2. Clearly the cuts separate p1 and pi. By Lemma 5.1 one of the cuts separates p1 and pi. But this cut lies on the lower bank of C. By noting that the upper bank of C is contained in the upper bank of this cut, one can check easily that the lower bank and upper bank of this cut contain both peaks and valleys. This contradicts the choice of C. Assume that the hexagon just below e, belongs to H. Let C’ be the cut which cuts this hexagon. Since C’ lies on the lower bank of C and its upper bank contains C’s upper bank, by the choice of C, the lower bank of C’ contains no peaks. Thus p1 belongs to the upper bank of C'.Without loss of generality we assume that p1 lies on the border of H in the upper bank of C’ between the left end of C and the left end of C’. Then v’ is on the upper bank of C’ for else pl’s wetting border is contained in the lower bank of C and
Fig. 8.
thus pi lies on the lower bank of C. This is a contradiction. So starting at the left end of C counter clockwise along the border of H, one first meets v’ then p1 and then v. There are no peaks between v’ and the left end of C on the upper bank of C’ along the border of H for otherwise there is a peak in p
(c ) v1f v, and the cat&&g borders of v1 and v2contain no valleys* (d) pl#ps andv,z v,, the wetting horder of pI contains no peaks, and the catching border of v2 contains no valleys. Proof. There are two cases. Case1. There is no cut of H such that its lowerbank and upperbank contain both peaks and valleys.By Lemma 5.2, the wetting (catching) border of each peak (valley) which is border adjacent to a valley (peak) contains no peak (valley). By Lemma 5.3, the conclusion (a) is proved. Note that p1 may be p2 and v1 may be v,. Case 2. There is a cut of H whose upper bank and lower bank contain both peaks and valleys.Let @ be the set of such cuts of H. There are two cuts C9C ’ in @ satisfyingLemma 5.4. If Lemma 5.4 (a) is true, by the proof of Theorem $.I, then (d) is valid. Similarly, if Lemma 5.4 (b) or (c) is true, then (c) or (b ) of this lemma is valid. Supposethat (for a hexagonalsystem H) p is a peak and v is a valley which are border adjacent such that either p’s wstting border contains no peak or v’s catchingborder contains no valley. If H has a perfect path system,then p and v are the ends of a monotone path in everyperfect path system. Proof. Without loss of generality,assumethat p’s wetting border contains no peak and p, v are left border adjacent. If p and v do not match each other in some perfect path systemPPthen let p match v’ and v matih p’ in P. Since the path from v’ to p along the border which passes v contains no peak, except for p, the two monotone paths from p to v’ and from v to p’ in P will intersectwith each other, a contradiction. Supposethat p is a peak and v is a valley of a hexagonalsystemH which are border adjacent such that either p’s wetting border contains no peak or v’s catching border contains no valley. If H has a perfect path system, then the monotone path between p and v which lies on the border of H belongs to a perfect path system. Pro@. Without loss of generality,assumethat p and v are left border adjacent. By Lemma 5.6, there existi a rnon~~ne path P” with ends p and v in a perfect path system. Let P be the monotone path between p and v contained in the border of H. Note that P may intersect but never crosses P’. So replacingP by P we get another perfect path system. The proof is completed.
Lemma 5.8 Let x and y be two vertices of a generalized hexagonal system H with no pending vertex, and P be a monotone path between x and y. If P is a subpath of a monotone path contained in a perfect path system of H, then the nonvertical edges in P belong to a perfect matching of H. Proof. The method to construct a perfect matching from a perfect path system mentioned at the beginning of this section immediately leads to the conclusion. By Lemma 5.7 and Lemma 5.8, we immediately obtain the following. coroualy 5.1 Let p and v be a border adjacent peak and valley pair in a hexagonal system H, and L be the monotone path between p and v along the border. If either the wetting border of p contains no peaks or the catching border of v contains no valleys, then the non-vertical edges of L belong to a perfect matching of H. Lemma 5.9 Let W be a generalized hexagonal system with no pending vertices which has a perfect path system. Then one of the following conclusions is true: (a) L(H) has only one peak and one valley, and the non-vertical edges belonging to a monotone path between the peak and the valley are contained in a perfect matching of H. Moreover, the non-vertical edges in one of the monotone paths between the peak and the valley along the border of L(H) belong to a perfect matching of 23. (b)UH) h as a Pair of border adjacent peak p and valley v such that p and v are also peak and valley of H, either the wetting border of p con~ns no peaks or the catching border con~ns no valleys with respect to Z(H) , and the monotone path L between p and v along the border does not contain r (L (H) ) . The non-vertical edges in L belong to a perfect matching of H. Proof. By Theorem 4.1 and Corollary 5.1, we can assume that L(H) #H. There are two cases: Case 1. L(H) has only one peak p and one valley v. Only one of them may not be a peak or valley of H. If they both are peak and valley of H, then they have to match each other in any perfect path system of H. So any monotone path between the peak and valley belongs to a perfect path system. By Lemma 5.8, (a) is true. If this is not the case, then one of p and v is r(L(H)), say r(L(H) ) =p. We can see easily that the monotone path in a perfect path system with one end being v has to contain p. So any monotone path from p to v in L ( fil) is a subpath of a monotone path in some perfect path system of H. By Lemma 5.8, (a) is true.
Case 2. If L(H) has more than one peak or more than one valley, then one of (a)-(d) of Lemma 5.5 is true for L(H). We only check that if Lemma 5.5 (b) is true, then (b) of this lemma is true. We can prove the other cases simi) be two pairs of border adjacent peaks and valleys as lmly.bt (PI,Vd,(Pz,Vz in Lemma 5.5. Then p1#pz and the wetting borders of p1 and p2 contain no peaks with respect to L(H). Let Li be the monotone path between pi and vi 2=~(~(~)),~hasnope~ectpath ~ongthe~~erof~(~) (i=l,2).Ifv,=v system. So we can assume that either v1# v2 or v2# r (I, (H) ) . If v1 f v,, then we have one of L1, L,, say L1 not containing r (L (H) ). Similar to Lemma 5.6 p1 has to match v1 in any perfect path system of H. By Lemma 5.8, we have proved (b ). If v2 # r (L (H) ), then whether or not v1= v2, there is one of L1, L2 not containing r (L (23) ) . We prove (b ) similarly. Proof of the correctness of the algorithm. Note that after leaving Step 3, each component of the remaining graph is also a generalized hexagonal system with no pending vertex. So Theorem 4.1, Corollary 5.1 and Lemma 5.9 ensure the correctness of the algorithm. Using Lemma 5.6, we now prove that MP is unique for all perfect path systems. Proof of Theorem 4.2. Byinduction on the number s(H) of hexagons of H. For s(H) = 1,the theorem is true. Suppose the theorem is true for s(H) < n. Now consider s(H) = n. If the theorem is not true, then there are two perfect path systems P1, P2, and a peak p such that the mono~ne paths P1~Bbl,P2&, starting at p have distinct destinations. By Lemma 5.6, there is a peak p’ and a valley v’ which are left or right border adjacent and match each other in every perfect path system. Let L be the monotone path between p’ and v’ along the border of H. Without loss of generality, we assume that L belongs to both P1 and P2 (since if L$lFpl,then delete the monotone path of P1 with ends p’ and v’ from Pl and add L to P1;a new perfect path system PP;is obtained; if L#P2 apply a similar change to P2 yielding P;; then [FD; and P&have the desired property). Let Ml = M( PI) and M2 =M( P2) denote the perfect rna~~ngs of H induced by the two perfect path systems. Clearly Mi includes all non-vertical edges in Pi. On L, Ml and M2 are same. The symmetric difference of M1 and M2, which is equal to Afl uM2 - (Ml n M2), is the union of disjoint cycles. These cycles are different from the border of H because of L. Let C be any such cycle. Then the subhexagonal system C(H) of H with C as its border has a perfect matching. Actually Mi r\ C(H) is a perfect matching of C(H) . So by the induction hypothesis, the matching between the peaks and valleys of C( H) is unique. We will use this conclusion later. Since all the cycles in the symmetric difference of Ml and M2 are disjoint,
we let
c,,c,,
.‘.,
C, be all the cycles in the symmetricdifferencesuchthat Ci(W)
has no intersectionwith Cj(W) when i#j. Clearly outside of 6 C,(H), M1 is i=l
equal to MB Because the edges of Cc are alternativelyin M1 and A&, all the edges which are incident with Ci and not in C#I) belong to neither M1 nor M2, Nate that if P, intersectswith none of C,(N) (i=l, .... k), then P,=P,. This is a ~ontra~ction. If PI intersectswith CJH) , then the ~~~~tion can not be just a vertex. So P1n ( 6 Ci (H) ) is the union of disjoint subpathsof PI* Let these disjoint subpathsbi?,, L 2, .... Lb Without loss of generality,we can assume that Li is above &+i for i= 1, .... k- 1. Let Li have upper end 5 and lower end xl (i= 1, .... k 1.Denote the subpathaf Pt with x: and xi+1as its ends by L; (i=l, .... k - 1) . Denote the subpath of P, with p and 3c1as its ends by Lb and the subpath of P1 from xkto the lower end of PI by Ai. Note that all non-verticaledgesof Pr belong to M, and all verticaledgesdo not. For L’, (i= 0, *..,k) and LjV=I, .... k) I we have the following easy facts. (a) The edges of Li are alternativelyin AflnMz and E(H) - (Ml wM2), whereE(H) is the set of edges of H. (b) The upper end edge and lower end edge of Li (i= 1, .... k- 1) belong to none of M1 and M2. The upper end edge of I& and the lower end edge of Lk are in M1n M2 and the lower end edge of Lb and the upper end edge of Lk are in E(H) - (A!fluM,) if they exist. (c) The edges of Li (i=l, .... k) are alternativelyin Ml and E(H) -Ml. The upper and lower edges of ,I+are in M, and thereforenon-vertical. Since Ciis a cycle in the symmetricdifferenceof Ml and Mx, C;(H) n MI and C,(H) n Mz are perfect matchingsof Ci(H) as we mentionedbefore. They inducetwoperfe@tpa~systernsBPfC,(H)nM,f,IFDICi(H)nM~)forC,IH). Cafe. If Lj is contained in C,(H) then LISP (C;(H) n Ml 1. There is a monotone path LT EBP ( Ci (H) n M2) with the same ends as Lie Proof of the chim. First we prove that Xi,the upper end OfLj, is a peak of Ci( W) .
If X~is the upper end of PI, i.e. p, then it is a peak of Cj(H). If Xjf;p, since the lowerend edge of Lj_ 1 is verticaland not in Ci(H) , the two edgesincidentwith xi in Ciare below it. Thus xj is a peak of Ci(W) . Similarlyxi is a valleyof Ci(Ii). By fact (c), we have that LjEP( C,(H) n Ml ) e By the induction hypothesis, there is a monotone path LT EP ( Ci (H) n M2) with Xj and X: being its upper and lower ends. The proof of the claim is completed. Now consider the mono~ne path P=Lh u L: uL; utz u ... u L;_, v LX u L&. The edges of P are ~~rnatively in M2 and E(H) -A& with its upper end as p_ So P=P,. But the lower end of P is the same as the one of PI. Thus P, and Pz have the same ends. This is a contradictionagain.
ACKNOWLEDGMENTS
This work was supported by AFOSR grants 89-0512 and 90-0008 to Rutgers University.
1 S.J. Cyvin and I. Gutman, Kekuh? Structures in Benzenoid Hydrocarbons (Lecture Notes in Chemistry 46), Springer VerIag, Berlin, 1988. 2 H. Sachs, Combinatorics, 1 (1985) 89. 3 M. Gordon and W.H.T. Davison, J. Chem. Phys., 20 (1952) 428. 4 I. Gutman and S.J. Cyvin, J. Mol. Struct. (Theochem), 138 (1986) 325. 5 I. Gutman and S.J. Cyvin, J. Mol. Struct. (Theochem), 164 (1988) 183. 6 W. He and W. He, Theor. Chim, Acta, 68 (1985) 301. 7 R. Sheng, Top. Curr. Chem., 163 (1990) 211. 8 R. Sheng, Chem. Phys. Let&, 142 (1987) 196. 9 K. Cameron and H. Sachs, Research report, Bonn University, 1984.