Revising the Fellows-Kaschube K3,3 Search

The first algorithm to achieve linear-time performance searching for and identifying a subgraph homeomorphic to K3,3 is due to Fellows and Kaschube. Part of the proof of correctness depends on three cases of a straddling bridge of a subgraph homeomorphic to K5 in an input graph. This paper presents a missing fourth case and revises the algorithm with an additional K3,3 homeomorph isolator for the condition corresponding to the missing case. This paper also discusses why the prior proof of correctness missed the fourth case and presents a new proof of correctness showing that there are no other missing cases.


Introduction
Given a graph G and a pattern graph P , a homeomorphic subgraph search algorithm seeks to find a subgraph H of G that has the essential structure of P . Specifically, H and P are equivalent except that some edges of P could be paths in H whose internal vertices are degree two, and vice versa. While the general problem of homeomorphic subgraph search is challenging, there are efficient algorithms for some pattern graphs, such as K 2,3 , K 3,3 , and K 4 [1,2,4]. In particular, the homeomorphic subgraph search algorithm by Fellows and Kaschube [4] was the first to achieve linear-time performance for P = K 3, 3 .
In a subgraph H homeomorphic to K 3,3 or K 5 , the vertices of degree higher than two are called image vertices, and each path in H that connects a pair of image vertices without including any other image vertices is called a fundamental path. Degree-two vertices between the image vertices of a fundamental path are called non-image vertices. As the Fellows-Kaschube algorithm isolates a subgraph homeomorphic to K 3,3 , it identifies the image vertices, so it is reasonable to return them, along with H, as a way to optimize applications that consume the output, especially when processing billions or more graphs.
A challenge with the Fellows-Kaschube method is that there is a case for identifying a subgraph homeomorphic to K 3,3 that is missing from the proof of correctness and hence the algorithm. In this missing case, a reasonable implementation is likely to still inadvertently identify a subgraph H homeomorphic to K 3,3 based on a different case, but the image vertices of H would not match the image vertices predicted by the proof of correctness for the different case. This paper contributes the additional case as well as a proof that there are no others, thereby completing the proof of correctness of the Fellows-Kaschube algorithm. This contribution also helps ensure that implementations optimized to return the image vertices operate correctly. Section 2 presents as preliminaries the pertinent aspects of the Fellows-Kaschube method. Section 3 presents the missing case and a discussion of how it would be handled by a reasonable implementation, and then revises the algorithm with a new handler for the missing case. Section 4 presents a proof that the revised algorithm is complete due to there being no other missing cases as well as a discussion of why the prior proof missed the case. Section 5 presents concluding remarks.

Preliminaries
An implementation of the Fellows-Kaschube method begins by applying a planarity algorithm, such as [3], on a given biconnected graph G. The planarity algorithm produces either a planar embedding of G, a subgraph homeomorphic to K 3,3 , or a subgraph homeomorphic to K 5 . The Fellows-Kaschube method has the desired output result if the planarity algorithm result is a planar embedding of G or a subgraph of G homeomorphic to K 3,3 , so further work is only performed if the result is a subgraph homeomorphic to K 5 , which is denoted J. The Fellows-Kaschube method examines the bridges of G that attach to the fundamental paths of J. A bridge is said to straddle J if it attaches to vertices that do not lie on a single fundamental path. The proof of Theorem 1 in [4] asserts that "there are only three different ways a bridge of J can straddle J as shown in Figure 2" [4, p. 281]. For each of the three ways of a bridge straddling J, the pattern for identifying a subgraph homeomorphic to K 3,3 is shown in Figure 2 of [4], an edited version of which appears in Figure 1.  [4]. The dotted paths are not needed to form a subgraph homeomorhpic to K 3,3 .
In each case in Figure 1, the two partitions of the image vertices are (x 1 , x 2 , x 3 ) and (y 1 , y 2 , y 3 ), and all image vertices except y 1 are also image vertices of the subgraph J homeomorphic to K 5 . In Figure 1(A), y 1 is not in J and the straddling bridge attaches to three image vertices of J. In Figures 1(B) and 1(C), y 1 appears along a fundamental path p of J and the straddling bridge containing y 1 attaches to a second vertex of J that is not in p. In the absence of these three given ways a bridge can straddle the K 5 homeomorph J, Fellows and Kaschube assert that the search for a subgraph homeomorphic to K 3,3 can proceed under the assumption that "no bridge of J straddles J" [4, p. 283].

The Missing Case
There is an additional way that a bridge of J can straddle J that is irreconcilable with the cases described in [4] and reviewed in Section 2. Figure 2 depicts the missing case. Figure 2(A) depicts the unlabeled pattern, which shows the straddling bridge attaching to two non-image vertices of two fundamental paths of J that do not share any image vertices. The missing case is distinct from the case in Figure 1(A), which requires that the straddling bridge attaches to three image vertices of J. The missing case is distinct from the case in Figure 1(B), which requires that the straddling bridge attaches to at least one image vertex. The missing case is distinct from the case in Figure 1(C) because, in that case, the straddling bridge attaches to two non-image vertices of two fundamental paths of J that do share an image vertex (labeled x 2 ). It is reasonable for implementations of the Fellows-Kaschube method to select one of the three cases based on how many image vertices of J are included in the attachments of the straddling bridge. Such implementations would classify the missing case in Figure 2 as an instance of the case in Figure 1(C). Therefore, we examine how the K 3,3 homeomorph isolator for Figure 1(C) would process the straddling bridge configuration in Figure 2.
First, one of the non-image vertex attachment points of the straddling bridge is labeled y 1 , and the two image vertices of J in the fundamental path containing y 1 are labeled x 1 and x 2 . The paths [y 1 , . . . , x 1 ] and [y 1 , . . . , x 2 ] are marked for inclusion in the subgraph homeomorphic to K 3,3 . Next, on the fundamental path containing the other non-image vertex attachment point of the straddling bridge (not y 1 ), one of the two image vertices on that fundamental path is labeled x 3 (see Figure 2(B)). Then, the path is marked from y 1 , through the straddling bridge, to the other non-image vertex attachment point of the straddling bridge, and to x 3 . The remaining two unlabeled image vertices of J are labeled y 2 and y 3 . Figure 2(B) reflects the result after the following additional paths are marked: [y 2 , . . . , So far, using the K 3,3 homeomorph isolator from Figure 1(C) on the straddling bridge configuration in Figure 2 has worked. However, as shown in Figure 2(C), x 3 does not become degree when marking the final path [y 3 , . . . , x 3 ] because it overlaps a portion of the path that was already marked when marking the path [y 1 , . . . , x 3 ]. Therefore, x 3 does not become an image vertex in the output. However, marking the path [y 3 , . . . , x 3 ] does cause a subgraph homeomorphic to K 3,3 to still be isolated because the straddling bridge attachment point, labeled x 3 ′ in Figure 2(C), becomes another degree three vertex that, in lieu of x 3 , happens to have distinct marked paths to y 1 (as part of marking [y 1 , . . . , x 3 ]), y 2 (due to marking [y 2 , . . . , x 3 ] and part of marking [y 3 , . . . , x 3 ]), and y 3 (as part of marking [y 3 , . . . , x 3 ]).
Any subgraph H homeomorphic to K 3,3 that is isolated by applying the method from Figure 1(C) on the case in Figure 2 is notable not only because one of the image vertices is incorrect but also because one of the image vertices from J is not in H. In all cases from [4] in Figure 1, all five image vertices from the K 5 homeomorph J are included in the subgraph homeomorphic to K 3,3 that is isolated. This prompts the question of whether it is possible to develop a new K 3,3 homeomorph isolator for the case in Figure 2 that would include all five image vertices of J. Theorem 1 shows that it is not possible.
Theorem 1 If a straddling bridge B of J attaches only to two non-image vertices of two fundamental paths of J that do not share an image vertex of J, then no subgraph homeomorphic to K 3,3 in B ∪ J can contain all five image vertices of J.
Proof: Assume that all five of the image vertices of J must be image vertices of a subgraph H of B ∪ J that is homeomorphic to K 3,3 . Then only one of B's attachment vertices to J can be an image vertex of H because H has six image vertices. Since J is a subgraph homeomorphic to K 5 , we can select without loss of generality the sixth image vertex to be the one labeled y 1 in Figure 2(B). Due to the available path connections between y 1 and other vertices in B ∪ J, the three image vertices of J in the opposing partition of H from y 1 must be the ones labeled x 1 , x 2 , and one of x 3 or y 3 in Figure 2(B). Furthermore, we can select the vertex labeled x 3 as the third vertex in the opposing partition of H from y 1 because J is a K 5 homeomorph. Therefore, the last two image vertices of H must be the ones labeled y 2 and y 3 in Figure 2 Figure 2(B). Here we reach a contradiction because there is no remaining way to select a path from y 3 to x 3 whose internal vertices are distinct from the internal vertices of the previously selected paths and the other image vertices of H. □ Due to Theorem 1, it is reasonable to develop a K 3,3 homeomorph isolator for the case in Figure 2 by simply unlabeling vertex x 3 and relabeling x 3 ′ to be x 3 , since it is the final image vertex of the K 3,3 homeomorph. However, it is notable that this isolation method is guaranteed to produce an output containing seven or more vertices. This prompts the question of whether every K 3,3 homeomorph isolator for the case in Figure 2 must necessarily isolate a subgraph homeomorphic to K 3,3 containing at least seven vertices. Figure 3 shows that the answer is no by showing an alternative K 3,3 homeomorph isolator that produces an output containing only six vertices if, within B ∪ J, each image vertex in the first partition of the K 3,3 homeomorph is a neighbor of each image vertex in the second partition. After unlabeling vertex x 3 and relabeling x 3 ′ to be x 3 , the label y 2 is moved to the unlabeled vertex (formerly labeled x 3 ) so that the fundamental path [y 2 , . . . , x 3 ] is not required to contain an internal vertex. An additional point about this alternative isolator is that one image vertex of the K 5 homeomorph J, labeled z in Figure 3, is neither an image vertex nor even included in the isolated K 3,3 homeomorph.
When the K 3,3 homeomorph isolator in Figure 1(C) is applied properly to the case that it solves, it is notable that it is also guaranteed to produce an output containing seven or more vertices. Theorem 2 shows that every K 3,3 homeomorph isolator for the case in Figure 1(C) must necessarily isolate a subgraph homeomorphic to K 3,3 containing at least seven vertices. This establishes an  Figure 2, since the alternative isolator in Figure 3 can produce outputs having less than seven vertices.
Theorem 2 If a straddling bridge B of J attaches only to two fundamental paths of J at nonimage vertices of J, denoted x and y, and the two fundamental paths share an image vertex of J, denoted z, then every subgraph homeomorphic to K 3,3 in B ∪J must contain at least seven vertices.
Proof: Assume, by contradiction, that B ∪ J contains a subgraph homeomorphic to K 3,3 having only six vertices. All vertices in B ∪ J have degree two except the seven vertices depicted in Figure 1(C). At least one of x and y must be an image vertex of any subgraph homeomorphic to K 3,3 in B ∪ J because J only contains five vertices of degree greater than two. Therefore, for each subgraph H homeomorphic to K 3,3 in B ∪ J, first assume that only one of x and y is an image vertex of H. Then, without loss of generality, H has the configuration depicted in Figure 1(C) wherein the one of x or y is labeled y 1 . In this configuration, y 1 (the one of x or y) is degree three, and it only connects in B ∪ J to two image vertices of J and the other of x and y. Since the other of x and y is assumed not to be an image vertex of H, then the other of x and y must be included as a degree two vertex in a third fundamental path emanating from y 1 , which contradicts the assumption that H has less than seven vertices. Therefore, for each subgraph H homeomorphic to K 3,3 in B ∪ J, assume that both x and y are image vertices of H. Since x and y have only degree three, they must be in opposite partitions of H. Furthermore, both image vertices of J in the fundamental path p x containing x must be in the partition of H that contains y, and both image vertices of J in the fundamental path p y containing y must be in the partition of H that contains y. Thus, we reach a contradiction because p x and p y share an image vertex z that cannot be in both partitions of H, and so we must reject the original assumption that B ∪ J contains a subgraph homeomorphic to K 3,3 having only six vertices. □

No Other Missing Cases
The proof of Theorem 1 in [4] asserts but does not prove that "there are only three different ways a bridge of J can straddle J..." [4, p. 281]. To complete any case-based proof of correctness, it is necessary not only to articulate the cases one can discern but also to prove that no other undiscerned cases exist. Theorem 3 completes the proof of correctness of the revised Fellows-Kaschube K 3,3 search, i.e. the Fellows-Kaschube K 3,3 homeomorphic subgraph search algorithm as revised by inclusion of one of the two K 3,3 homeomorph isolators in Section 3.
Theorem 3 Let G = (V, E) be a biconnected graph with a subgraph J homeomorphic to K 5 . If a bridge of J straddles J, then G has a subgraph homeomorphic to K 3,3 .
Proof: Given a bridge B of J that straddles J, we only need to consider how B attaches to two fundamental paths since two fundamental paths are sufficient for demonstrating a subgraph homeomorphic to K 3,3 . Furthermore, we can begin the analysis by considering only two attachments from B to J, denoted x and y, one per fundamental path, denoted p x and p y , respectively. Case 1 : If x and y are both image vertices of J, then they are insufficient by themselves to establish that B is a straddling bridge of J because J is a K 5 homeomorph that has a single fundamental path connecting every pair of its image vertices. Therefore, if B is a straddling bridge of J, then there must exist a third point of attachment, denoted y ′ , that attaches to a fundamental path of J other than the one containing both x and y. As was shown in [4], if y ′ is also an image vertex of J, then a subgraph homeomorphic to K 3,3 can be obtained by assigning x 1 = x, x 2 = y, and x 3 = y ′ in Figure 1(A). The assignments can be in any order since J is a K 5 homeomorph and so its rendition can be rearranged into the canonical form depicted in Figure 1(A). On the other hand, if y ′ is not an image vertex of J, then B can be analyzed as an instance of Case 2 below by replacing with y ′ whichever of x and y attaches to the fundamental path containing y ′ .
Case 2 : If only one of x and y is an image vertex of J, then without loss of generality, let x denote the image vertex. As was shown in [4], a subgraph homeomorphic to K 3,3 can be obtained by assigning x 1 = x and y 1 = y in Figure 1(B). Note that y may attach to any of the six fundamental paths that do not contain x, but because J is a K 5 homeomorph, the rendition of J can be rearranged into the canonical form depicted in Figure 1(B) wherein x is at the top of the diagram and the fundamental path containing y is on the lower left.
Case 3 : If neither of x and y is an image vertex of J and the two distinct fundamental paths p x and p y share an image vertex, then a subgraph homeomorphic to K 3,3 can be obtained, as was shown in [4], by assigning x to the unlabeled vertex and letting y 1 = y in Figure 1(C). Note that x may attach to any of six fundamental paths that share one of the two image vertices with the fundamental path containing y, but because J is a K 5 homeomorph, the rendition of J can be rearranged into the canonical form depicted in Figure 1(C).
Case 4 : If neither of x and y is an image vertex of J and the two distinct fundamental paths p x and p y do not share an image vertex, then a subgraph homeomorphic to K 3,3 can be obtained as shown in Figure 3 by assigning x 3 = x and y 1 = y. Note that x may attach to any of three fundamental paths that share no image vertices with the fundamental path containing y, but because J is a K 5 homeomorph, the rendition of J can be rearranged into the canonical form depicted in Figure 3.
As a contradictive assumption, assume there exists a fifth case of a straddling bridge B that attaches to J in a way that is distinct from the four above. B cannot attach to more than two image vertices as that would not be distinct from one of the forms covered by Case 1. If B attaches to exactly two image vertices of J, labeled x and y, then it is not a straddling bridge unless it also attaches to a non-image vertex on a fundamental path that does not contain both x and y, but B cannot attach to two image vertices and a non-image vertex of J because, ignoring the attachment to one of x or y, that would not be distinct from the forms covered by Case 2. Therefore, assume B attaches to at most one image vertex of J and any other attachments to J are to non-image vertices. If B attaches to one image vertex y of J, then it is not a straddling bridge unless it also attaches to a non-image vertex of J that is on one of the six fundamental paths of J that does not contain y, but B cannot have such a non-image vertex attachment as that also would not be distinct from the forms covered by Case 2. Therefore, assume that B attaches only to non-image vertices of J. To be a straddling bridge, B must attach to more than one fundamental path of J, and without loss of generality, we can consider the attachments of B to two distinct fundamental paths of J since B attaches to two if it attaches to more than two. Similarly, without loss of generality, we can consider only one of B's attachments to each fundamental path. To be distinct fundamental paths, the two fundamental paths can only share either one image vertex or zero image vertices of J, but the fundamental paths cannot share one image vertex as that would not be distinct from the forms covered by Case 3, and they cannot share zero image vertices as that would not be distinct from the forms covered by Case 4. Given one of B's attachment points x to a non-image vertex of a fundamental path p x , there are only nine other fundamental paths of J that could contain the second of B's non-image vertex attachment points, all of which are covered by Cases 3 and 4. Therefore, we reach a contradiction of the assumption of a fifth case because B cannot meet the definition of being a straddling bridge of J since it cannot attach to any image vertices of J nor can it attach to the non-image vertices of two distinct fundamental paths.
The theorem then follows because, in each of the four and only four existing canonical cases in which a bridge of J straddles J, a subgraph homeomorphic to K 3,3 "with image vertices x 1 , x 2 , x 3 and y 1 , y 2 , y 3 " [4, p. 281] can be extracted from G. □ It is useful to consider how the proof of Theorem 1 in [4] differs from the proof of Theorem 3 above. In the former proof, Figure 2 in [4] (see Figure 1) is referenced in the proof, so it is reasonable to conclude that it provides an implicit proof by contradiction that there are no more than three cases of a straddling bridge based on a bridge attaching to zero, one, or more than one image vertex of J. While there are no other distinct cases for the number of image vertices to which a straddling bridge can attach, it is important to align the case analysis in a proof by contradiction with the definition of the phenomenon under scrutiny. Since the definition of a straddling bridge B of J is based on B's attachments to multiple fundamental paths of J, the case analysis must include consideration of the configurations of the fundamental path attachments of B to J. For Cases 1 and 2, the distinction made no difference because all alternative ways of attaching a straddling bridge are isomorphic to the canonical forms in Figures 1(A) and 1(B). For Case 3, once a fundamental path p x is known for a first non-image vertex attachment x of B to J, there are nine subcases to consider corresponding to each of the other fundamental paths in J that could contain the second non-image vertex attachment of B to J. In the canonical form of Case 3 shown in Figure 1(C), the two fundamental paths share an image vertex of J, but only six of the nine other fundamental paths of J share an image vertex with p x . Since the rearrangement operations for the rendition B ∪ J -namely, rotation, flipping about the vertical axis, and swapping the positions of two vertices -do not alter the fundamental paths of J, two fundamental paths that share no image vertices before a rearrangement cannot share an image vertex after the rearrangement. Therefore, Case 3 cannot cover the three subcases of fundamental paths that share no image vertex of J with p x . These three subcases are covered by the canonical form for Case 4 shown in Figure 3. More to the point, in the latter proof, we are able to claim as fact that there are no other subcases because the canonical forms for Cases 3 and 4 cover all nine possibilities for the second fundamental path.

Conclusion
In this paper, we have revised the Fellows-Kaschube algorithm for finding a subgraph homeomorphic to K 3,3 . A new K 3,3 homeomorph isolator was added for a missing case of how a bridge of a K 5 homeomorph J could straddle J, i.e. connect to more than one fundamental path of J. This case was shown to be irreconcilable with original straddling bridge cases from Fellows and Kaschube [4]. A new proof of correctness in this paper shows that there are no other missing straddling bridge cases. Finally, we have shown the importance in general of explicitly proving assertions about the number of distinct cases of a phenomenon and of carefully aligning the case analysis with the definition of the phenomenon to help avoid drawing fallacious conclusions in case-based proofs.