Journal of Graph Algorithms and Applications Approximation Algorithms for the Maximum Induced Planar and Outerplanar Subgraph Problems

The task of finding the largest subset of vertices of a graph that induces a planar subgraph is known as the Maximum Induced Planar Subgraph problem (MIPS). In this paper, some new approximation algorithms for MIPS are introduced. The results of an extensive study of the performance of these and existing MIPS approximation algorithms on randomly generated graphs are presented. Efficient algorithms for finding large induced outerplanar graphs are also given. One of these algorithms is shown to find an induced outerplanar subgraph with at least 3n/(d + 5/3) vertices for graphs of n vertices with maximum degree at most d. The results presented in this paper indicate that most existing algorithms perform substantially better than the existing lower bounds indicate.


Introduction
The Maximum Induced Planar Subgraph problem (MIPS) is the task of finding the size of the largest subset of vertices in a graph that induces a planar subgraph. This problem is known to be NP-hard [19]. A similar problem is the Maximum Planar Subgraph problem, which is the task of finding the largest subset of edges in a graph that forms a planar subgraph. A comprehensive survey of the latter problem, with brief discussion of MIPS, is provided by Liebers [14].
Planarity of graphs has applications in areas such as graph drawing, circuit design and facility layout [4,13,12]. Many graph drawing applications find a large planar subgraph as the initial step in determining a layout of a graph. Jünger and Mutzel [13] discuss the use of MPS in the use of applications for graph layout. MIPS was little studied until Edwards and Farr [6,8,9] showed that the MIPS is useful in determining the fragmentability of classes of graphs. Fragmentability provides a measure of how susceptible graphs are to being broken into components of bounded size by the removal of a small proportion of vertices. A planar graph can be partitioned into such components by removing a small proportion of the vertices in linear time (Lipton and Tarjan [15]). Edwards and Farr show that a bound on their measure of the fragmentability of non-planar classes of graphs can be obtained from bounds on the proportion of vertices that need to be removed in order to produce a maximum induced planar subgraph [6].
In this paper, several new approximation algorithms for MIPS are presented. These include two new algorithms for finding large induced outerplanar subgraphs. An experimental analysis of both the new algorithms and the existing algorithms is provided. Algorithms for other subclasses of planar graphs are also considered for comparative purposes. These include maximal independent set and maximal induced forest.
Both new and existing algorithms were implemented. Their behaviour in terms of performance and running time was observed on over 12,000 randomly generated graphs of up to 10,000 vertices and on GDT-test-suite-CU 1 , a graph set of about 10,000 graphs extracted from the ALF graph base used in [5]. Experimental results indicated that most algorithms performed substantially better than the best known lower bounds. In the experiments undertaken, the approximation algorithms for finding large induced outerplanar subgraphs produced larger subgraphs than those produced by many of the existing algorithms for MIPS. A mathematical analysis of one of the algorithms for finding an induced outerplanar subgraph shows that it finds one with at least 3n/(d + 5/3) vertices for graphs of n vertices with maximum degree at most d, which is close to the best known lower bound of 3n/(d + 1) for MIPS.
All graphs are simple, containing no multiple edges or loops. In this paper n denotes the number of vertices and m denotes the number of edges in a graph. We write P for the vertex set of an induced planar subgraph P of a graph G and R = V (G) \ P . The neighbours of a vertex v that lie in a set of vertices X is denoted by N X (v) and the number of neighbours of v in X is denoted by d X (v).

Existing Algorithms for MIPS
There are few existing approximation algorithms for MIPS. In this section three of these algorithms are discussed. Algorithms for finding a maximal independent set and maximal induced forest are also considered. The subgraphs produced by these algorithms are planar (although not maximally so). These algorithms are examined in order to provide some comparison between these simpler approaches and more sophisticated methods.

The Halldórsson-Lau Algorithm
Halldórsson and Lau [11] give a linear time algorithm for graphs of maximum degree at most d with a performance ratio of 1/⌈(d + 1)/3⌉. They use a result of Lovász [16], who showed that for any graph of maximum degree d there exists a partition of the vertex set of the graph into α parts such that the parts induce subgraphs G 1 , G 2 , ..., G α with each subgraph G i having maximum degree at most d i , and Σ α i=1 d i = d − α + 1. Hence the number of parts required to ensure each subgraph has at most degree 2 is ⌈(d + 1)/3⌉. Halldórsson and Lau's algorithm creates such a partition. A largest part is selected as the planar subgraph. As the subgraph produced has maximum degree at most two, this subgraph is unlikely to be a maximal planar subgraph.

The Vertex Addition Algorithm
Another algorithm for finding induced planar subgraphs for graphs of maximum degree at most d was presented by Edwards and Farr [7] based on a proof in [6]. In this paper, this algorithm will be referred to as the Vertex Addition algorithm. This algorithm has time complexity O(mn) and finds an induced planar subgraph of at least 3n/(d+1) vertices, which implies a performance ratio of at least 3/(d+1). This performance ratio improves on that of the Halldórsson-Lau algorithm for cases where d ≡ 2 (mod 3). Furthermore, the subgraphs produced by Edwards and Farr are not constrained to having maximum degree at most two. This algorithm partitions V = V (G) into two sets, P (the vertices in the induced planar subgraph) and R = V \P . Initially P is empty and R = V . Vertices are incrementally added to P (and removed from R) whilst maintaining the planarity of P . In some cases a vertex in P is interchanged with a vertex in R. The restrictions on selection of vertices for inclusion into P are stricter than required to maintain planarity, but allow certain properties in the graph to be maintained which enable the performance of the algorithm to be analysed. See [6,7] for further information.
The subgraphs produced by this algorithm are not necessarily maximal. The authors note that in some cases after the algorithm has stopped, it is possible to add some additional vertex to P whilst maintaining planarity [7]. Edwards and Farr comment that although it is clear that their lower bound is not tight, the difference between it and the actual value is unknown.

The Vertex Removal Algorithm
Edwards and Farr [8,9] also provided another algorithm for finding large induced planar subgraphs for a wider class of graphs, namely those of average degree at mostd. This algorithm will be referred to as the Vertex Removal algorithm. It finds an induced subgraph of at least 3n/(d + 1) vertices for a graph with average degree at mostd ≥ 4 or a graph that is connected and has average degree at mostd ≥ 2. This algorithm also partitions the vertices into two sets, P and R, but in this case initially P = V and R = ∅.
The graph is reduced by either removing any vertex of degree at most one, or by removing any vertex v of degree two and its incident edges, uv and vw, and inserting a single edge uw if such an edge is not already in the graph. These operations are performed iteratively until neither operation can be applied to the graph. This process is said to produce a reduced graph. At each iteration (a) a vertex of highest degree in the reduced graph is removed and (b) all possible reductions are performed on the graph P . To avoid the cost of planarity testing at each iteration, Edwards and Farr use a loop condition that a vertex is to be removed from the reduced graph while the number of removed vertices is less than a value ρ which they calculate to be an upper bound on the size of the smallest set X of vertices of G such that G − X is planar.
Faria, Figueiredo, Gravier, Mendonça and Stolfi [10] have presented an algorithm similar to the Vertex Removal algorithm. However, this algorithm is limited to graphs of maximum degree (and thus average degree) at most 3. The performance ratio of this algorithm is 3/4 which is the same as that achieved by the Vertex Removal algorithm for graphs of average degree at most 3.

The Vertex Subset Removal Algorithm
A modification of the Vertex Removal algorithm called the Vertex Subset Removal algorithm was also implemented. This algorithm was based on private communication from Edwards and Farr. Their algorithm was modified to select the vertex v ∈ P with the largest number of neighbours of degree lower than the degree of v in the reduced graph. This is the first MIPS algorithm to consider ordering of selection of vertices. Liebers [14] comments that there is no known investigation of the impact of different vertex orderings on the size of subgraph produced. The comparison of the behaviour of the Vertex Removal and the Vertex Subset Removal algorithms provides some indication of the desirability of such a strategy.

Other Algorithms
With NP-hard problems there is usually a trade-off between quality of solution and time taken to produce the solution. Sometimes naive algorithms can provide a reasonable solution in less time than a more sophisticated algorithm.
In the experiments undertaken two such algorithms were implemented: one to find a maximal independent set and the other to find a maximal induced forest. A comparison of the time taken and the size of subgraph produced by these algorithms with those produced by the approximation algorithms for MIPS provides an indication of what is gained by using more sophisticated methods and at what cost in terms of time.
By Turán's theorem [2, p.81], a maximal independent set has size at least n/(d + 1), which is 1/3 of the best known lower bound on the size of an induced planar subgraph. In our experiments we use a standard sequential algorithm that finds a maximal independent set. Initially, the vertices are sorted into ascending order of degree. Using bucket sort with at most n − 1 buckets this can be done in O(n) time. Each vertex is examined and added to P if it is not adjacent to any vertex in P . Thus, a maximal independent set can be found in time O(n).
Alon, Mubayi and Thomas [1] showed that a graph of average degreed has a maximal induced forest of size at least 2n/(d+1), which is 2/3 of the best known lower bound for MIPS. The algorithm implemented to find a maximal induced forest selects vertices in increasing order of degree. Initially, the vertices are sorted into ascending order of degree, which can be done in O(n) time. Each vertex is examined and added to P if it has at most one neighbour in any component in P . If d is the maximum degree of the graph, this takes time O(nd). Thus the total time taken to determine which vertices can be added to P and update the components of P is at most O(nd). Thus, a maximal induced forest can be found in O(nd) time.

New Algorithms
In this section some new algorithms for finding a large induced planar subgraph are introduced, including algorithms for finding a large induced outerplanar subgraph. The performance of one of these algorithms is analysed mathematically, and a lower bound of 3n/(d + 5/3) on its performance ratio is established. This is close to the bound of 3n/(d + 1) for the existing algorithms [7,8,9] for MIPS. Furthermore, at least one additional vertex can be added to an induced outerplanar subgraph whilst maintaining planarity (unless the original graph is outerplanar). In most cases the size of a maximum induced planar subgraph is larger than the size of a maximum induced outerplanar subgraph. However, in the experiments performed the size of the induced outerplanar subgraph found was close to the largest induced subgraph found by any of the MIPS algorithms.
Our first two algorithms form an outerplanar subgraph from a maximal induced forest. They both incrementally add vertices whilst maintaining out-erplanarity. In the second algorithm a vertex in the planar set is sometimes interchanged with a vertex in the non-planar set. This algorithm allows the size of the outerplanar subgraph produced to be analysed more easily.
A third algorithm is presented that produces induced planar subgraphs with a more restricted structure which we call a palm tree.
None of the existing algorithms, or the algorithms discussed so far in this section, add vertices that introduce K 4 minors into the induced subgraphs. Furthermore these algorithms usually only add vertices with few neighbours in P . An algorithm for an operation that identifies some of the vertices whose addition may produce an induced planar subgraph containing a K 4 minor was also designed (see Section 3.3). In our experiments, the effects of combining this operation with some of the existing MIPS algorithms were observed.

Algorithms for Finding Large Induced Outerplanar Subgraphs
In this section two algorithms for finding a large induced outerplanar subgraph are introduced. The second of these algorithms can be shown to find an induced outerplanar subgraph containing at least 3n/(d + 5/3) vertices. An analysis of the time complexities of these algorithms is included. This analysis assumes the use of the most efficient data structures and sorting/searching algorithms. These may not be those used in the actual implementation of the algorithms. In Section 4.2 the performance of these algorithms is compared to that of the previous algorithms. The comparison of size of subgraph produced by these algorithms gives some indication of the improvement in size of subgraph achieved by using an algorithm to find a planar subgraph in comparison to an algorithm that finds an outerplanar subgraph.

Outerplanar Algorithm 1 (OP1)
The OP1 algorithm (see Algorithm 1) initially finds a maximal induced forest. It then identifies certain vertices with at most two neighbours in any component in P that can be added to P whilst maintaining outerplanarity.
A block is a maximal connected subgraph containing no cutvertex. Proposition 2 uses the following fact about outerplanar graphs: Proof: Initially, the algorithm finds a maximal induced forest, which is an outerplanar subgraph. At each loop, Algorithm OP1 adds a vertex v which has at most two neighbours in any single component to P . If vertex v has at most one neighbour in any component of an outerplanar graph P , then it is plain that P ∪ {v} is outerplanar. Thus it suffices to show that if X is an outerplanar component of P , and v has two neighbours in X, then X ∪ {v} is outerplanar.
while ∃v ∈ R satisfying the following criteria: • Vertex v has at most two neighbours in any single component in P • In each component X of P in which v has two neighbours, w 1 and w 2 , there exists a w 1 -w 2 path T , such that at most one edge of T belongs to a cycle of P , and such an edge (if it exists) belongs to only one cycle of P do Select the vertex v ∈ R having the lowest d V (v) satisfying the above criteria; Let w 1 and w 2 be the neighbours of v in X, and let T be a w 1 -w 2 path in X . Now X is an outerplanar graph, so its blocks are outerplanar (see Fact 1). Consider the blocks of X ∪ {v} .
If T contains no edge that belongs to any cycle in X , then the blocks in X ∪ {v} are the block B = (T ∪ {v}) + vw 1 + vw 2 and all the blocks of X that are not just edges of T . The block B is outerplanar as it is a cycle, and all the blocks of X are outerplanar, so X ∪ {v} is outerplanar.
Alternatively, suppose T contains an edge e that belongs to a cycle C. Since e belongs to no other cycle of X , C is in fact a block of X . Then the blocks in X ∪ {v} are the block B + C, formed from B and C, and all the blocks of X that are not just edges of T . The block B + C is a theta graph, that is, a graph consisting of three internally disjoint paths with the same two distinct endpoints. One of these three paths is a single edge in the block B + C, so it is outerplanar.

Proposition 3 Algorithm OP1 has time complexity O(mn).
Proof: Let d be the maximum degree of the input graph. Algorithm OP1 consists of two phases. In the first phase a maximal induced forest is found in time O(nd) (see Section 2.4).
The loop in Algorithm OP1 then adds vertices to P whilst maintaining outerplanarity. There are at most n(d − 1)/(d + 1) vertices in R at the commencement of the loop. At each iteration the algorithm checks if a path satisfying the criteria in the algorithm exists. The path is found by a modified depth first search technique. A valid path contains at most one edge belonging to a cycle in P . If in any branch of the search tree a second edge belonging to a cycle is encountered, no further edges in this branch are examined. Thus, no edge can be examined more than once. Thus the search takes O(m) time and the loop takes O(mn) time.
As m > d, the total time taken by the algorithm is O(mn). 2

Outerplanar Algorithm 2 (OP2)
Algorithm OP2 (see Algorithm 2) also initially finds a maximal induced forest. It then identifies additional vertices that can then be added whilst maintaining outerplanarity. However, Algorithm OP2 also interchanges some vertices in P and R in order to ensure that when the algorithm stops, all vertices in R have at least three neighbours in components of size at least three in P . This enables a lower bound on the size of subgraph produced by this algorithm to be determined, but incurs an additional running cost of identifying such vertices for removal.

Proposition 4 Algorithm OP2 finds an induced outerplanar subgraph.
Proof: Initially P is the vertex set of a maximal induced forest, so P is outerplanar. In the first loop of Algorithm OP2, a vertex v is added if, in each component in P , the neighbours of v lie on a unique path. It is sufficient to show that such a vertex can be added to a single component in P whilst maintaining outerplanarity. As a vertex v with at most one neighbour in any component can easily be added to P and maintain outerplanarity, we will consider the case where v has at least two neighbours in component X where X ⊆ P .
Let T be the path containing the neighbours w 1 , w 2 , . . . w k of v in X . Now X is an outerplanar graph. As no two vertices in T are connected by any other path, T contains no edge that forms part of a cycle in X . Thus the blocks in X ∪ {v} are the block B = (T ∪ {v}) + vw 1 + vw 2 + . . . + vw k and all the blocks of X that are not just edges of T . It is clear that B is outerplanar. Thus all the blocks of X ∪ {v} are outerplanar.
Thus, when the first loop of Algorithm OP2 is completed, P is outerplanar. The second loop in Algorithm OP2 deals with vertices in R that have at most two neighbours in Q. It is clear that a vertex with at most one neighbour in any non-tree component and at most two neighbours in any tree component can be added to P whilst maintaining outerplanarity. We need only show that a vertex v with two neighbours, say w 1 and w 2 , in some non-tree component X can be added to the component whilst maintaining outerplanarity.
We showed in the proof of Proposition 2 that if there exists a unique w 1w 2 path in X , then v can be added to this component whilst maintaining outerplanarity. It remains to prove that v can be added to X when the w 1 -w 2 path S is not unique.
Suppose for one of the neighbours of v in X, say w 1 , there exists a path w 1 , . . . , x that is disjoint from S except for the endpoints. If w 1 is removed from while ∃v ∈ R such that for each component X , where X ⊆ P , either v has no neighbours in X , or the neighbours of v in X lie along a unique path T in X (i.e., there is no other path connecting any two vertices in this path) do P := P ∪ {v}; R := R \ {v}; end Let Q ⊆ P denote the set of vertices belonging to components of size at least three in P . while ∃v ∈ R such that v has at most two neighbours in Q do if vertex v has at most one neighbour in Q then P := P ∪ {v}; Then there exists a w-x path in P that is disjoint from S except for the endpoints w and x. if such a path exists with w 1 as an endpoint then w = w 1 else if such a path exists with w 2 as an endpoint then w = w 2 else Let w be the first vertex on S for which such a path exists Alternatively suppose that w is the first vertex on S such that a w-x path exists in X which is disjoint from S except for the endpoints. Let w 1 , . . . , w i , w, . . . , w 2 be this w 1 -w 2 path. As no path exists from any vertex in {w 1 , . . . , w i } to any vertex in {w, . . . , w 2 }, X \ {w} has two components. As vertex v has one neighbour in each of these components, v can be added to X \ {w} whilst maintaining outerplanarity.
Thus if the two neighbours, w 1 and w 2 , of v in component X lie on a non-unique w 1 -w 2 path, there exists a vertex w ∈ X such that X \ {w} ∪ {v} is outerplanar.
Thus Algorithm OP2 finds an induced outerplanar subgraph. Proof: Let d be the maximum degree of the input graph. Algorithm OP2 initially finds a maximal induced forest, which can be found in time O(nd) (see Section 2.4).
In the first loop each of the vertices in R are examined and those that satisfy the criteria are added to P . There are at most n(d − 1)/(d + 1) vertices in R. A path containing the neighbours of v ∈ R in a component X is found by initially having a path of length one consisting of a single neighbour of v. The path is then extended (at either end) including additional neighbours of v when possible until all the neighbours are in the path. This can be done in time O(m). Suppose the path T cannot be extended to include all the neighbours of v, but there exists a path S that does contain all the neighbours of v. As T and S differ in at least one subpath, there exists at least two vertices in S that are connected by more than one path. Thus the neighbours of v do not lie on a unique path (in the sense required by the loop condition). Thus if the path cannot be extended to include all the neighbours of v then either no such path exists, or the path containing the neighbours of v is not unique.
If a path containing all the neighbours of v is found it may not be unique. In order to show that the path T is not unique (in the sense demanded by the first loop), another path that is not a subpath of T must be found that connects two vertices belonging to the path. For each edge w i w i+1 on the path, the algorithm attempts to find an alternative path in X \ {w i w i+1 } from w i to a vertex that occurs further along the path T . If such a path exists, then T is not unique. Let Q ⊆ P be the set of vertices belonging to components of size at least three in P . At each iteration of the second loop a vertex v with at most two neighbours in Q is added to P , and in some cases a vertex w with at least three neighbours in Q is removed from P . Thus, each iteration decreases the number of vertices in R with at most two neighbours in Q.
A path S connecting the two neighbours of v in Q, w 1 and w 2 , must be found at each iteration. In the worst case, this involves checking at most |E( P )| < m edges. The algorithm then determines if another w 1 -w 2 path can be found. Proof: Let P be the set of vertices that induce the subgraph produced by the OP2 algorithm. When the algorithm is completed, every v ∈ R has at least three neighbours in some component of size at least three, otherwise it would have been added to P . Let Q ⊆ P where Q consists of all vertices belonging to a component of size at least three in P . Let n 1 = |P | and let K Q be the set of components of Q . For Each component of size k in Q contains at least k − 1 edges, so As all components in Q have size at least three, |K Q | ≤ |Q|/3. So Now, From (1) and (4), So n 1 ≥ 3n/(d + 5/3).

Palm Trees
In the previous section algorithms for finding large induced outerplanar subgraphs were considered. In this section an algorithm that produces a tree-like structure is considered.
A palm tree is a connected graph which is either a cycle or can be constructed from the union of a tree T with an independent set X by joining each vertex in v ∈ X to two adjacent vertices in T (these two vertices need not be the same for all v ∈ X). A palm forest is a graph all of whose components are palm trees.
If P is a maximal forest in G, then every vertex in R has at least two neighbours in some forest component in P , otherwise P is not maximal. Thus, for all v ∈ R, d P (v) ≥ 3 or d P (v) = 2 and the neighbours in P are in a single component of P . All of the existing MIPS algorithms discussed in Section 2, except for the Halldórsson-Lau algorithm, guarantee that for all v ∈ R, d P (v) ≥ 3 when the algorithm ceases. On termination the Palm Tree algorithm also guarantees this condition, but the subgraph produced has a similar structure to a tree.
The Palm Tree Algorithm (see Algorithm 3) initially finds a maximal induced forest P . It then considers all vertices v ∈ R with d P (v) = 2 and neighbours w 1 , w 2 ∈ P . If w 1 and w 2 are adjacent, then the subgraph induced by {v, w 1 , w 2 } is a cycle of length three. Any such vertex can always be added to P whilst maintaining planarity. If the neighbours of v are not adjacent then there exists a w 1 -w 2 path S connecting these vertices in P . (If no such path exists, vertex v has degree 2 and is adjacent to two components, which contradicts the maximality of the induced forest.) Now, if the component in P containing the neighbours of v consists solely of the path S, then vertex v can be added to P and the resulting component is a cycle. If this is not the case, (S ∪ {v}) + vw 1 + vw 2 is a cycle of length at least four containing at least one vertex with at least three neighbours in P ∪ {v}.
If one of the neighbours of v, say w 1 , has at least two neighbours in P , then w 1 will have at least three neighbours in (P ∪ {v}) \ {w 1 }. Alternatively, if both the neighbours of v have only one neighbour in P and the component does not consist solely of a path, then there exists some vertex along the path S that has at least three neighbours in P . Thus, a vertex exists in the component that can be interchanged with v whilst maintaining the planarity of P . Interchanging vertex v with such a vertex decreases the number of vertices with d P (v) ≤ 2 in R. Thus when the Palm Tree algorithm terminates, all vertices in R have at least three neighbours in components of size at least three in P .

Proposition 7 The Palm Tree Algorithm has time complexity O(n 2 ).
Proof: The Palm Tree Algorithm initially finds a maximal induced forest in time O(nd) (see Section 2.4). Each vertex v ∈ R with two neighbours in P is then added to P . In some cases a vertex is removed from P when v is added. The removed vertex w has at least three neighbours in P ∪ {v} \ {w}. Thus each iteration reduces the number of vertices in R with degree at most two.
Input: A graph G = (V, E) P := ∅, R := V . Find a maximal induced forest F : P := V (F ), R := V \ P . while ∃v ∈ R such that d P (v) = 2 do while ∃v ∈ R such that d P (v) = 2, and the addition of v to P creates a cycle of length three do P := P ∪ {v}; R := R\{v}; end while ∃v ∈ R such that d P (v) = 2 and the addition of v to P creates a component that is a cycle do P := P ∪ {v}; R := R\{v}; end while ∃v ∈ R such that d P (v) = 2 and the addition of v to P creates a cycle of length at least four that contains at least one vertex of degree at least three in P ∪ {v} do Let w 1 and w 2 be the two vertices adjacent to v in P . In the worst case, all vertices in R with two neighbours in P require a vertex to be removed from P to enable them to be added. This requires the path connecting the neighbours of v in P to be examined to find a candidate vertex for removal. There are at most |E( P )| ≤ m ≤ 3|P | ≤ 3n edges in such a path. Thus the main (outer) loop in the Palm Tree algorithm takes time O(n 2 ).
When this loop is completed, any vertex adjacent to only components of size at most two is added to P . This loop takes O(|R|) steps. Thus the time complexity of the Palm Tree Algorithm is O(n 2 ). 2

Finding more complex planar subgraphs
Each of the above algorithms finds an induced planar subgraph with no K 4 minor. A simple example is the induced planar subgraphs of the graph K 5 found by the various algorithms. Both algorithms by Edwards and Farr and the algorithm by Halldórsson and Lau find an induced planar subgraph of size three (the same subgraph found by the algorithms for finding an induced outerplanar subgraph), rather than the maximum induced planar subgraph K 4 .

Input:
We designed an algorithm that added some vertices, in some cases, to the induced planar subgraph. If in each component X containing neighbours of a vertex v, the neighbours of v lie on some face of some embedding of X, then P ∪ {v} is planar. Our algorithm, which we call the Enlarge Planar Subgraph (EPS) operation (see Algorithm 6), detects some (but not all) situations of this kind, and adds v to P . Algorithm 4 reduces the induced subgraph, P , using a subset of the reduction operations discussed in Section 2.3. The operation that we omit here Input: A graph G = (V, E), a set of vertices V ′ ⊆ V to be included in the path, and a set of edges E ′ ⊆ E to be included in the path.
Let w 1 be the first vertex in T and let w 2 be the last vertex in T ; if ∃uw 1 ∈ E ′ and u ∈ T then Prepend u to T ; Prepend u to T ; else if ∃u ∈ V, u ∈ T adjacent to w 2 then Append u to T ; else Output: ∅ end end Output: T Algorithm 5: Find Path Input: A graph G = (V, E) and P ⊆ V such that P is planar.
T has length at most one then /* X ∪ {v} is planar */ continue ; else if T has length two and the internal vertex has at most three neighbours in X then /* X ∪ {v} is planar */ continue ; else Let I = {1, . . . , |V (T )|} and let S be the sequence reject v (so it is not included in P ); break; end end else reject v (so it is not included in P ); break; end P := P ∪ {v}; R := R \ {v}; P ′ = Reduce Graph( P ); end end Output: P Algorithm 6: EPS Algorithm is the one that removes a vertex v of degree two and its incident edges, uv and vw, when the edge uw is already in the graph. Note that the reduction operations we retain here do not change the number of cycles in the graph, while the omitted operation reduces the number of cycles. Suppose P ′ is formed from P by applying reduction operations from this subset. Then P ′ preserves the cycle structure of P in the sense that every cycle in P is a subdivision of a cycle in P ′ . Each vertex V i in the reduced graph P ′ consists of a set of vertices in the original graph P that have been combined by the reductions. At each iteration Algorithm 6 reduces the induced subgraph P to P ′ using Algorithm 4. The neighbourhood N P ′ (v) in P ′ of a vertex v ∈ R is the set of V i ∈ P ′ that contain the neighbours of v in P . For each component X in P ′ , N X (v) ⊆ N P ′ (v) contains the neighbours of v in component X. At each iteration (i.e. for each v ∈ R), for each component X of P ′ the algorithm tries to find a path T containing these neighbours of v with the added constraint that if any neighbour of v in P is included in two vertex sets in P ′ , say V i and V j , then T must contain the edge V i V j (which we call mandatory). In order to minimize the cost of searching for such a path, the EPS operation uses a simple local search strategy (see 5). At each iteration of the Find Path algorithm, a vertex in N X (v) is added to the path if possible, with preference given to any vertex whose addition adds one of the mandatory edges to T . If no vertex in N X (v) can be added to either end of the path, then if possible a vertex in P ′ that is not a neighbour of v can be added to an end of T . Note that this process might not find a path T containing all N X (v), even if one exists. If a path containing all N X (v) is not formed by this process, we continue with the next vertex in R.
As P ′ preserves the cycle structure of P , P ∪ {v} is planar if and only if P ′ ∪ {v} is planar. Suppose each edge of T belongs to at most one triangle of P ′ , and that every such triangle contains a vertex of degree 2. Suppose further that at most one edge outside these triangles meets an internal vertex of T , and (if such an edge exists) meets only one such vertex. Then P ′ ∪ {v} is planar, and so is P ∪ {v} . If a path T is found that satisfies these conditions for each component X, the EPS operation adds the vertex v to P .
The EPS operation was combined with the PT, OP1 and Vertex Subset Removal algorithms, by running it on the induced planar subgraphs found by those algorithms, in order to draw some conclusions about the subgraphs found by those algorithms.
The classical method as described in [2, p.143] was used to produce random graphs of expected average degreed (so edge probability p =d/(n − 1)). The random d-regular graphs were produced by both the Bollobás [3] and Steger-Wormald [17] algorithms. While Bollobás' method generates graphs randomly with a uniform probability distribution, the Steger-Wormald method has a distribution that is approximately uniform and tends to uniform as n → ∞. As a single iteration of the Bollobás method produces a d-regular simple graph with probability e (1−d 2 )/4 (see [18]), it was not feasible to use this method to produce large numbers of graphs. Thus in the experiments undertaken, the Bollobás method was used to produce graphs only for smaller values of n. In contrast the Steger-Wormald method generates d-regular graphs quickly. A comparison of the results on regular graphs of the same size and degree but generated by these different methods produced extremely close results. The closeness of these two results gives support to the validity of using the Steger-Wormald generated graphs for the larger sized graphs and those of higher degree, and using the results to draw conclusions about the behaviour of induced planar subgraph algorithms on random regular graphs.
Each induced planar subgraph algorithm was run on a series of graphs. For each combination of size, degree and graph generation method, the average size of subgraph produced and the average time taken was recorded. The algorithms were also run on the graphs from the GDT-test-suite-CU. As this suite contains sets of graphs of varying maximum degree of order 10 to 100, the average proportion of vertices in the planar subgraph for each n was recorded, and the average proportion of vertices in the planar subgraph for a given average degree within an interval of 0.1. Details about the computer on which all tests were run are listed in Table 1. The Halldórsson-Lau and Vertex Addition algorithms are designed to be used on graphs of maximum degree at most d. However, the experimental results also contain observations of their behaviour on graphs of expected average degree d. When considering these results, it should be noted that such graphs are likely to have maximum degree greater than d.

Discussion of Results
A complete set of all results is available at http://www.csse.monash.edu.au/~kmorgan/MIPS.html. Tables containing the average proportion of vertices in the induced planar subgraph, the average size of induced planar subgraph and the average elapsed time taken are provided. The standard deviation is included in parentheses for each average size (or time) given. Table 2   In this section the behaviour of the algorithms in terms of the size of induced planar subgraph produced will be considered.

Standard Deviation
The standard deviation of the size of subgraph found for random d-regular graphs is remarkably small, usually less than 1%. The standard deviation was higher for subgraphs of graphs produced by the classical method, but still well under 1% for large graphs except for the results of the HL algorithm where the standard deviation was as high as 8%. The results of the tests on the graphs of average degree from the GDT-test-suite-CU also exhibited a small standard deviation, usually less than 4%. The Performance of the MIPS Algorithms Figure 1(a) displays the performance of the algorithms as d varies when run on d-regular graphs of 10,000 vertices. The HL algorithm produced subgraphs with average size close to this algorithm's worst case lower bound from [11], namely n/2 for 3 ≤ d ≤ 5, n/3 for 6 ≤ d ≤ 8 and n/4 for d = 9. The only algorithm producing a smaller average size subgraph was the IS algorithm. The behaviour of the other algorithms as d increases in terms of the reduction in proportion of vertices in the induced subgraph is remarkably similar as can be seen in Figures 1 and 2. In Table 3 the proportion of vertices in the subgraphs found for graphs of 10,000 vertices are displayed. As n increases, the proportions of vertices in the subgraphs found by the various MIPS algorithms quickly converge to these proportions. This is typical of the behaviour of the algorithms on both d-regular graphs and graphs of expected average degreed. For a fixed d, as n increases, the values rapidly converge to within 5% of the proportion found for n =10,000. Each of the algorithms converges, in this sense, on or before n = 200, except for the HL algorithm on graphs of expected average degreed. The proportions of vertices in the subgraphs found by each of these algorithms differ by only a few percent in smaller graphs, but as n becomes large only by a fraction of a percent (see Table 3). The fact that the average sizes of subgraph produced by these algorithms are so similar even though the classes of induced subgraphs produced are not all the same may suggest that there may be some fundamental limit on the performance of algorithms for finding induced subgraphs with many hereditary properties.  Table 3: Average proportion of vertices in induced planar subgraph found in randomly generated graphs of 10,000 vertices. (Standard deviations in parentheses.) The average proportion of vertices in a subgraph found in a graph of given n and degree was larger for the graphs of expected average degreed. These graphs are likely to contain some vertices with degree less than 3, which contribute to the size of subgraph produced, but do not present any obstacle to planarity.
The VSR algorithm usually produced the largest subgraphs of all MIPS algorithms (excluding algorithms combined with the EPS operation). However, the VSR+EPS algorithm usually found a larger subgraph.
In Figure 3 the results in terms of average size subgraph for a fixed number of vertices is shown for the tests on graphs from GDT-test-suite-CU. In this test suite there is no fixed maximum (or average) degree for any given n. These results also show that the algorithms combined with the EPS operation usually find a larger induced subgraph than the other algorithms. Comparison between Algorithm T and other MIPS Algorithms Although the lower bound for the size of induced planar subgraph produced by the algorithm T for finding a maximal induced forest is only 2/3 of the best known lower bounds for MIPS, in practice the subgraphs produced by T and the other algorithms (VSR, VR, VA, PT, OP1 and OP2) are very close in size. The HL algorithm [11] produces an induced subgraph consisting of disjoint cycles and paths. Such a subgraph could be regarded as not much more than a linear forest: it may just have some additional vertices (and their incident edges) added to create cycle components. Yet the lower bound on the size of subgraph produced by this algorithm is considerably better than the lower bound of T (although in practice the subgraphs produced by the HL algorithm are small in comparison to the size of a maximal induced forest).
Most of the subgraphs found by the VA algorithm (see Figure 1) were smaller than the subgraphs found by the T algorithm. This may suggest the simple approach of finding a maximal induced forest provides a reasonable solution to MIPS for the types of random graphs we considered. On the other hand it may indicate that the current algorithms are finding little more than a forest with a few additional vertices. This latter suggestion is supported by the similarity between the size of subgraph found by the MIPS algorithms and those found by algorithms for finding simpler structures such as outerplanar subgraphs and palm trees. The fact that the EPS operation is usually able to find additional vertices to add to subgraphs produced by these algorithms indicates that the subgraphs found are usually not maximal.
Conjectured Average Case Lower Bounds -Graphs of Maximum Degree d The maximum proportion of vertices in the induced subgraphs produced by the algorithms for d-regular graphs as d increases appears to be close to the sequence: 3/4, 6/9, 9/15, 12/22, 15/30, 18/39, 21/49, . . . . From this sequence it appears that the proportion of vertices in the subgraph produced for a given d by these algorithms is at least 3(d − 2)/((d + 1)(d + 2)/2 − 6) = 6/(d + 5). Now 3/(d + 1) ≤ 6/(d + 5) when d ≥ 3, so this proposed bound would exceed the existing lower bound of 3n/(d + 1). Note that this proposed bound cannot apply to all d-regular graphs, since (for example) K 31 contains an induced planar subgraph of size at least six. However, 6n/(d + 5) appears to provide a reasonable guide to the proportion of vertices included in the subgraph on average, for random d-regular graphs. We conjecture that the actual lower bound for all d-regular graphs is close to (3 + ((d − 3)/d))/(d + 1). This proposed lower bound suggests a subgraph of at least four vertices should be obtained from a graph of degree at most 30, so it works for K 31 .
Conjectured Average Case Lower Bounds -Graphs of Average Degreed The maximum proportion of vertices in the induced planar subgraphs produced by the algorithms on graphs of expected average degreed asd increases appears to be close to the following sequence: 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, . . .. From this sequence it appears that the proportion of vertices in the subgraph produced for a givend by these algorithms is at least (3/(d + 1)) 1/2 . (A slightly closer estimated lower bound may be (3/(d + 1 + (d − 3)/d))) 1/2 .) Although this lower bound does not hold for dregular graphs, graphs of average (but not maximum) degreed contain some vertices of lower degree which are more likely to be included in the induced planar subgraph. Thus, it is not surprising that the size of the induced planar subgraph is larger than that found in a d-regular graph.

Running Time of Algorithms
Algorithms such as the VA and OP2 performed worst in terms of running time on graphs of maximum degree d (see Figures 4(a) and 5). This reflects the cost of determining if a vertex should be removed when a vertex is added to the planar subset. The running time required by many of the algorithms for d-regular graphs with some fixed number n of vertices decreases as d increases. In some cases this may be due to there being fewer vertices that can be added when the degree is high. The VA algorithm shows this behaviour. By contrast the VSR algorithm shows a slight increase in running time as d increases. As d increases for a fixed size graph, the graph will become denser and thus is less likely to reduce as quickly as a less dense graph. Thus the location of a vertex for removal requires searching a larger reduced graph which may increase the processing time. The algorithms behaved quite differently on graphs of expected average degreed (see Figure 4(b)). While the running times tended to decrease as d increased in the experiments on d-regular graphs, the running times remained more constant in the case of the graphs of expected average degreed (except in the case of the OP2 algorithm where the running times increased for 3 ≤ d ≤ 8 and the VA algorithm for d < 6). It should be noted that the actual running times were lower than those for d-regular graphs.
The simpler algorithms such as IS and HL exhibit linear average time. Algorithms such as those using the EPS operation and the VA algorithm that include some searching for paths exhibit approximately quadratic complexity.

Conclusion and Further Work
Several new algorithms for the Maximum Induced Planar Subgraph and Maximum Induced Outerplanar Subgraph problems were designed. New and existing algorithms were implemented and an extensive experimental study of the behaviour of these algorithms on randomly generated graphs was undertaken. As most of the existing algorithms had not previously been implemented, the implementation of these algorithms provided new insights into how they perform in practice.
The connections between these problems and two related problems, namely Maximal Induced Forest and Maximal Independent Set, were also investigated. It was found that in practice the size of subgraph produced by existing algorithms on random graphs was similar to that produced by algorithms for finding a maximal induced forest.
One of our algorithms for finding large induced outerplanar subgraphs was analysed and shown to produce subgraphs of size at least 3n/(d+5/3) for graphs of maximum degree at most d. Although this lower bound is slightly less than the existing lower bound of 3n/(d+1) for induced planar subgraphs, experiments showed that for large n the size of the induced outerplanar subgraphs found were often larger than those produced by the existing algorithms for MIPS.
Although the observed results were close to the lower bound of 3n/(d + 1) for d = 3, as d increased the lower bound was increasingly loose. The results for average proportion of vertices in the induced subgraph suggests that the lower bound on size of induced subgraph may be closer to (3 + (d − 3)/d)/(d + 1).