Arc diagrams, flip distances, and Hamiltonian triangulations1footnote 11footnote 1An extended abstract [12] of this work was presented at the 32nd Symposium on Theoretical Aspects of Computer Science (STACS 2015).

Arc diagrams, flip distances, and Hamiltonian triangulations111An extended abstract [12] of this work was presented at the 32nd Symposium on Theoretical Aspects of Computer Science (STACS 2015).

Jean Cardinal Université libre de Bruxelles (ULB), Belgium, jcardin@ulb.ac.be. Partially supported by the ESF EUROCORES programme EuroGIGA, CRP ComPoSe.    Michael Hoffmann Department of Computer Science, ETH Zürich, Switzerland, {hoffmann,kustersv,manuelwe}@inf.ethz.ch.Partially supported by the ESF EUROCORES programme EuroGIGA, CRP GraDR and the Swiss National Science Foundation, SNF Project 20GG21-134306.    Vincent Kusters33footnotemark: 3 44footnotemark: 4    Csaba D. Tóth California State University Northridge, Los Angeles, CA; and Tufts University, Medford, MA, USA, cdtoth@acm.org. Partially supported by the NSF awards CCF-1422311 and CCF-1423615.    Manuel Wettstein33footnotemark: 3 Partially supported by the ESF EUROCORES programme EuroGIGA, CRP ComPoSe and the Swiss National Science Foundation, SNF Project 20GG21-134318/1.
Abstract

We show that every triangulation (maximal planar graph) on vertices can be flipped into a Hamiltonian triangulation using a sequence of less than combinatorial edge flips. The previously best upper bound uses -connectivity as a means to establish Hamiltonicity. But in general about flips are necessary to reach a -connected triangulation. Our result improves the upper bound on the diameter of the flip graph of combinatorial triangulations on vertices from to . We also show that for every triangulation on vertices there is a simultaneous flip of less than edges to a -connected triangulation. The bound on the number of edges is tight, up to an additive constant. As another application we show that every planar graph on vertices admits an arc diagram with less than biarcs, that is, after subdividing less than (of potentially ) edges the resulting graph admits a -page book embedding.

1 Introduction

An arc diagram (Figure 1) is a drawing of a graph in which vertices are represented by points on a horizontal line, called the spine, and edges are drawn either as one halfcircle (proper arc) or as a sequence of halfcircles centered on the line (forming a smooth Jordan arc). In a proper arc diagram all arcs are proper. Arc diagrams have been used and studied in many contexts since their first appearance in the mid-sixties [28, 33]. They constitute a well-studied geometric representation in graph drawing [20] that occurs, for instance, in the study of crossing numbers [1, 6] and universal point sets for circular arc drawings [3].

(a)
(b)
(c)
Figure 1: A plane straight-line drawing (a), an arc diagram (b) and a proper arc-diagram (c) of the same graph.

Bernhart and Kainen [4] proved that a planar graph admits a plane (i.e., crossing-free) proper arc diagram if and only if it can be augmented to a Hamiltonian planar graph by adding new edges. Such planar graphs are also called subhamiltonian, and they are NP-hard to recognize [37]. A Hamiltonian cycle in the augmented graph directly yields a feasible order for the vertices on the spine. Every planar graph can be subdivided into a subhamiltonian graph with at most one subdivision vertex per edge [29]. Consequently, every planar graph admits a plane biarc diagram in which each edge is either a proper arc or the union of two halfcircles (a biarc); one above and one below the spine. Di Giacomo et al. [21] showed that every planar graph even admits a monotone plane biarc diagram in which every biarc is -monotone—such an embedding is also called a 2-page topological book embedding. See [20] for various other applications of subhamiltonian subdivisions of planar graphs.

Eppstein [17] said: “Arc diagrams (with one arc per edge) are very usable and practical but can only handle a subset of planar graphs.” Using biarcs allows us to represent all planar graphs, but adds to the complexity of the drawing. Hence it is a natural question to ask: How close can we get to a proper arc diagram, while still being able to represent all planar graphs? A natural measure of complexity is the number of biarcs used.

Previous methods for subdividing an -vertex planar graph into a subhamiltonian graph use at most one subdivision per edge [20, 21, 25, 29], consequently the number of biarcs in an arc diagram is bounded by the number of edges. Our main goal in this paper is to tighten the upper and lower bounds on the minimum number of biarcs in an arc diagram (or, alternatively, the number of subdivision vertices in a subhamiltonian subdivision) of a planar graph with vertices. Minimizing the number of biarcs is clearly NP-hard, since the number of biarcs is zero if and only if the graph is subhamiltonian.

Our results. In Section 3 we show that the number of biarcs can be bounded by , even when they are restricted to be monotone. Although previous methods can be shown to yield less than the trivial biarcs [25], or ensure monotonicity [21], we give the first proof that both properties can be guaranteed simultaneously. The algorithm is similar to the canonical ordering-based method of Di Giacomo et al. [21].

{restatable}

theorembiarcmonotone Every planar graph on vertices admits a plane biarc diagram using at most biarcs, all of which are monotone. Moreover, such a diagram can be computed in time.

For arbitrary (not necessarily monotone) biarcs we achieve better bounds. Our main tool is relating subhamiltonian planar graphs to edge flips and subdivisions in triangulations.

A flip in a triangulation involves switching the diagonal of a quadrilateral made of two adjacent facial triangles. We consider combinatorial flips, which can be regarded as an operation on an abstract graph. The flip graph induced by flips on the set of all triangulations on vertices, and the corresponding flip distance between two triangulations, have been the topic of extensive research [9, 11]. For instance, the flip diameter restricted to the interior of a convex polygon is equivalent to the rotation distance of binary trees [31, 34].

By subdividing an edge we mean replacing with a new vertex that is connected to both endpoints of . The following theorem, which is proved in Section 4, relates biarcs to edge subdivisions and is a simple generalization of the characterization of Bernhart and Kainen.

{restatable}

theorembernkaingeneral A planar graph admits a plane biarc diagram with at most biarcs if and only if there is a set of at most edges in so that subdividing these edges transforms into a subhamiltonian graph.

In Section 5 we prove that in every triangulation there exists a set of less than edges that can be flipped simultaneously so that the resulting triangulation is -connected, and that this bound is tight up to an additive constant. Since by Tutte’s Theorem every -connected planar graph is Hamiltonian, we can transform every planar graph into a subhamiltonian graph by subdividing at most edges. The fact that a single simultaneous flip can make a triangulation -connected has already been established by Bose et al. [8]. However, they do not give any bound on the number of flipped edges.

{restatable}

theoremupsimfour Every maximal planar graph on vertices can be transformed into a -connected maximal planar graph using a simultaneous flip of at most edges. Moreover, such a set of simultaneously flippable edges can be computed in time.

{restatable}

theoremupsimfourlower For every , there is a maximal planar graph on vertices such that no simultaneous flip of less than edges results in a -connected graph.

Finally, in Section 6 we prove an upper bound on the flip distance of a triangulation to Hamiltonicity, that is, on the worst-case number of successive flips required to reach a Hamiltonian triangulation. Given the hardness of determining whether a given planar graph is Hamiltonian, we should not expect a nice characterization of (non-)Hamiltonicity. Hence, in the context of planar graphs, -connectivity is often used as a substitute because by Tutte’s Theorem it is a sufficient condition for Hamiltonicity.

Bose et al. [10] gave a tight bound (up to an additive constant) of on the number of flips that transform a given triangulation on vertices into a -connected triangulation. We show that fewer flips are sufficient to guarantee Hamiltonicity. Obviously, the target triangulation is not -connected in general, which means it possibly contains separating triangles.

{restatable}

theoremhamflip Every maximal planar graph on vertices can be transformed into a Hamiltonian maximal planar graph using a sequence of at most edge flips. Alternatively, it can be transformed into a subhamiltonian planar graph by subdividing a set of at most edges. Moreover, such a sequence of flips or subdivisions can be computed in time.

In this case we do not have a matching lower bound. The best lower bound we know can be obtained using Kleetopes [22]. These are convex polytopes that are generated from another convex polytope by replacing every face by a small pyramid. In the language of planar graphs, we start from a -connected planar graph and for every face add a new vertex that is connected to all vertices on the boundary of the face. If the graph we start from has enough faces, then the added vertices form a large independent set so that the resulting graph is not Hamiltonian. Aichholzer et al. [2] describe such a construction explicitly in the context of flipping a triangulation to a Hamiltonian triangulation, but state the asymptotics only. A precise counting reveals the following figures. {restatable}theoremhamlower For every , there is a maximal planar graph on vertices such that no sequence of less than edge flips produces a Hamiltonian graph, and there is no set of less than edges whose subdivision produces a subhamiltonian graph.

Our proof of Theorem 1 is constructive, and each flip in the sequence involves an edge of the initial graph that is incident to a separating triangle of . Several of these edges may be incident to a common facial triangle, in which case the edges are not simultaneously flippable.

Theorem 1 allows us to translate Theorems 1 and 1 to the context of biarc diagrams, where we obtain bounds for the number of biarcs needed.

{restatable}

corollaryarcdiaupper Every planar graph on vertices admits a plane biarc diagram with at most biarcs. Moreover, such a diagram can be computed in time.

{restatable}

corollaryarcdialower For every , there is a maximal planar graph on vertices that cannot be drawn as a plane biarc diagram using less than biarcs.

As another corollary, we establish a new upper bound on the diameter of the flip graph of all triangulations on vertices, improving on the previous best bound of by Bose et al. [10]. Mori et al. [27] showed that any two Hamiltonian triangulations on vertices can be transformed into each other by a sequence of at most flips. Combined with Theorem 1, this implies the following. {restatable}corollaryflipdist Every two triangulations on vertices can be transformed into each other using a sequence of at most edge flips.

2 Notation

A drawing of a graph in maps the vertices into distinct points in the plane and maps each edge to a Jordan arc between (the images of) the two vertices that is disjoint from (the image of) any other vertex. To avoid notational clutter it is common to identify vertices and edges with their geometric representation. A drawing is called plane (or an embedding) if no two edges intersect except at a possible common endpoint. Only planar graphs admit plane drawings, but not every drawing of a planar graph is plane. A maximal planar graph on vertices is a planar graph with edges. In this paper the term triangulation is used as a synonym for maximal planar graph.222In contrast, a maximal plane straight-line drawing may have fewer edges, depending on the number of points on the convex hull.

In a plane drawing of a triangulation , every face (including the outer face) is bounded by three edges. Hence, every triangulation with vertices is 3-connected [16][Lemma 4.4.5]. Every 3-connected planar graph has a topologically unique plane drawing, apart from the choice of the outer face. Specifically, the facial triangles are precisely the nonseparating chordless cycles of in every plane drawing [16][Proposition 4.2.7]. Consequently, has a well-defined dual graph (independent of the drawing): the vertices of correspond to the faces of , and two vertices of are adjacent if and only if the corresponding faces share an edge. A triangle of that is not facial is called a separating triangle, as its removal disconnects the graph.

A graph is Hamiltonian if it contains a cycle through all vertices. By a famous theorem of Tutte [35, 36], all -connected planar graphs are Hamiltonian. For triangulations, -connectivity is equivalent to the absence of separating triangles. A vertex or an edge is incident to a triangle in a graph if it is a vertex or edge of .

A triangulation can be partitioned into a -block tree . Each vertex of is either a maximal -connected component of or a subgraph of that is isomorphic to . Two vertices of are adjacent if they share a separating triangle of . The 4-block tree is similar to the standard block-tree for -connected components, but the generalization of the notion “component” to higher connectivity is not straightforward in general. For a triangulation, however, the -block tree is well-defined and can be computed in linear time and space [24].

Flips. Consider an edge of a triangulation and let and denote the two incident facial triangles. The flip of replaces the edge by the edge . If this operation produces a triangulation (i.e., if and the edge is not already present in ), we call flippable333We consider combinatorial flips, as opposed to geometric flips defined for straight-line plane drawings, where an edge is flippable if and only if the quadrilateral formed by the two incident facial triangles is convex..

A closely related concept is the simultaneous flip of a set of flippable edges in a triangulation , which is defined as follows. For denote by the edge created by flipping in , and let . Then the simultaneous flip of in results in the graph . Bose et al. [8] introduced this notion and showed that the result of a simultaneous flip is a triangulation if every facial triangle of is incident to at most one edge from and the edges , for , are all distinct and not present in .

3 Monotone Biarc Diagrams

In this section we present a simple linear time algorithm to construct a biarc diagram in which all biarcs are drawn as monotone curves (with respect to the spine). The algorithm is based on the fundamental notion of a canonical ordering, which is defined for an embedded triangulation. As every triangulation on vertices is -connected, embedding it into the plane essentially amounts to selecting one facial triangle to be the outer face. This choice also determines a unique outer face (cycle) for every biconnected subgraph.

A canonical ordering [19] for an embedded triangulation on vertices is a total order of the vertices such that

  • for , the induced subgraph is biconnected and internally triangulated (i.e., every face other than the outer face is a triangle);

  • for , is an edge of ;

  • for , lies in the interior of (the unbounded region of the plane bounded by ) and the neighbors of in form a sequence of consecutive vertices along the boundary of .

It is well-known that every triangulation admits a canonical ordering [19], and such an ordering can be computed in time [15].

\biarcmonotone

*

Proof.

Let be a planar graph on vertices and suppose without loss of generality that is an embedded triangulation. If is not maximal planar, add edges to make maximal planar, choose any embedding, and simply remove the added edges from the final drawing.

Consider a canonical ordering of the vertices of . We construct a biarc diagram of incrementally by inserting the vertices in canonical order and embedding them on the -axis (spine). Let and let denote the outer cycle of , for . During the algorithm, we maintain the following invariants.

  1. All edges of are proper arcs (none is a biarc). The vertices and are the leftmost and rightmost, respectively, vertices of on the spine. The edge forms the lower envelope of (i.e., no point of the biarc diagram is vertically below). All edges of other than are on the upper envelope of (i.e., no point of the biarc diagram is vertically above).

  2. Any biarc used in is a down-up biarc, that is, the semicircle incident to its left endpoint lies below the spine and the semicircle incident to its right endpoint lies above the spine.

We embed the triangle by placing , , and on the spine in this order from left to right and by drawing all edges as proper arcs below the spine (Figure 2). Clearly 12 hold for this embedding.

Figure 2: Start the incremental embedding with a triangle.

Now suppose that we have a biarc diagram for that satisfies the invariants and we want to add . Let be the vertices of labeled from left to right along the spine. By 1 this order is compatible with the vertex order along , with and . As we work with a canonical ordering, the neighbors of on form a contiguous subsequence of , with . In addition, 2 guarantees that we can insert along the spine between and , just to the right of : Every biarc leaving to the right goes down first and, therefore, does not block the spine locally at , whereas proper arcs above the spine leaving to the right can be bent down to become down-up biarcs while maintaining their vertical order (Figure 3). After placing , the edges to can be drawn as proper arcs above the spine. The edge can even be drawn as a proper arc below the spine because the two vertices are neighbors along the spine by construction. It is easily checked that the invariants 12 are maintained. This completes the description of the first version of our algorithm.

(a) before
(b) after
Figure 3: Make room for a new vertex .

First lower bound on the number of proper arcs.

It remains to bound the number of biarcs used by the algorithm. As a first observation, note that all edges are drawn as proper arcs initially (when they first appear). An edge may become a biarc in a later step only if it is bent down to make room for a vertex inserted immediately to the right of the left endpoint of . In particular, every edge drawn below the spine, such as the three edges of and the edges drawn at steps , remain proper arcs throughout the algorithm. Finally, at least three new edges will be drawn in the last step (i.e., when inserting ) as proper arcs. This yields a first lower bound of at least proper arcs and, therefore, at most biarcs.

A refined algorithm and lower bound.

In order to obtain the claimed bound, let us consider in more detail the insertion of a vertex where . We claim that for any vertex we can obtain proper arcs in the final drawing, rather than just one. However, we also have to adapt our algorithm slightly, as described in the following paragraph.

The improvement is based on two simple but crucial observations. First, observe that a vertex can be inserted just to the right of any of the vertices , not only . The invariants 12 can be maintained for any such choice. Second, observe that none of the edges of the path appear on anymore and neither do the left endpoints of these edges. In particular, it follows that every proper arc among those edges will remain a proper arc in the final drawing. Now we have to be careful when counting these edges because some of them might be drawn below the spine and we accounted for them already. Here is where the first observation comes to our help. We modify the algorithm to insert just to the right of the last vertex in such that the edge is drawn below the spine. If no such edge exists, then we insert just to the right of , as before.

For the analysis we consider two cases. If exists (Figure 4), then the insertion of does not create any biarcs. All edges along the path are proper arcs drawn above the spine and have not yet been counted. As none of these arcs appears on , they will not be counted again. In addition, all edges from to are proper arcs of whose left endpoints do not appear on . Lastly, the edge from to can be drawn below the spine. Therefore, all these edges remain proper arcs throughout the algorithm. The total number of new proper arcs in the final drawing is, therefore, at least .

(a) before
(b) after
Figure 4: Inserting a new vertex with , , and .

In the second case there is no and is inserted just to the right of . But we also know that none of the edges in the path of are below the spine. Therefore, all these edges will be proper arcs in the final drawing that have not been counted yet. Together with the new edge , which is drawn below the spine, we get again new proper arcs in the final drawing.

In summary, we always get at least new proper arcs in the final drawing when inserting a vertex . In the last step, when inserting , we even get new proper arcs. Therefore, the total number of proper arcs is bounded from below by . The total number of edges in is

Combining both expressions yields at least

proper arcs and, therefore, at most biarcs in the final drawing.

Regarding the runtime bound, observe that when inserting a new vertex we inspect all its neighbors on the current outer cycle to select the right spot for insertion. Therefore the time spent for each vertex is proportional to its degree. As the graph is planar, the sum of all vertex degrees is linear. The arc diagram under construction can be represented as a tree using standard techniques [15], where in addition we also store for every edge whether it is a proper arc or a down-up biarc. ∎

4 General Biarc Diagrams

In this section we discuss the connection between biarc diagrams and edge flips and subdivisions in triangulations. Recall that Bernhart and Kainen [4] characterized planar graphs that admit a plane proper arc diagram as all subhamiltonian planar graphs. The following theorem generalizes this characterization in the context of biarc diagrams (the original Theorem is obtained by setting ).

\bernkaingeneral

*

Proof.

First, suppose there is a biarc diagram of with at most biarcs. Then we can simply subdivide these at most biarcs in order to obtain a proper arc diagram of some graph . By the characterization of Bernhart and Kainen, is subhamiltonian.

Second, fix a set of at most edges in so that subdividing them results in a subhamiltonian graph . By the characterization of Bernhart and Kainen we know that admits a proper arc diagram. Removing the new vertices from the subdivided edges in that arc diagram results in a biarc diagram of with at most biarcs (if both arcs incident to a subdivision vertex are on the same side of the spine, then the biarc can be replaced by a single proper arc). ∎

A similar statement can be obtained for simultaneous edge flips, where the edges to be manipulated must not share a triangle. As this is a more restricted setting, we get a correspondence in one direction only. But this is enough for the purpose of getting upper bounds on the number of biarcs.

Lemma 1.

If a maximal planar graph can be transformed into a Hamiltonian graph with a simultaneous flip of edges, then admits a plane biarc diagram with at most biarcs.

Proof.

Let be a Hamiltonian graph obtained from by simultaneously flipping an edge set to with . Without loss of generality, assume that is a minimal set of edges that must be flipped in order to obtain a Hamiltonian graph. Consequently, every Hamiltonian cycle in passes through all edges in . If we subdivide each edge in , we obtain another Hamiltonian graph . Now consider the graph obtained from by subdividing each edge in , and identify the subdivision vertices of the corresponding edges in and . Notice that the union of and is a plane graph that contains , hence it is Hamiltonian. Consequently is subhamiltonian. By Theorem 1, admits a plane biarc diagram with at most biarcs, as claimed. ∎

In order to obtain a general statement about arc diagrams from Lemma 1, we need a bound on the number of edges to simultaneously flip in a given graph in order to make it Hamiltonian. Even the existence of such a simultaneous flip—regardless of the number of edges involved—is not obvious to begin with. For instance, consider triangulations and where has a vertex with linear degree and all vertices in have constant degree (e.g., a nested triangle graph). As a single simultaneous flip can only change about half of the edges incident to a vertex, at least a logarithmic number of simultaneous flips is required to transform into  [8].

Bose et al. [8] showed that every triangulation on vertices can be transformed to a -connected (hence Hamiltonian) triangulation by a single simultaneous flip. However, no bound is known on the number of flipped edges, which leaves us with the trivial bound of . Note that the corresponding bound on the number of biarcs is similar to the one from Theorem 1, but there we could guarantee that all biarcs are monotone. Using Lemma 1 we do not have any control over the type of biarcs used.

5 Simultaneous Flip Distance to 4-connectivity

In this section we determine the maximum number of edges needed to transform an -vertex triangulation into a -connected triangulation using a single simultaneous flip. Consider a triangulation . As there is no -connected triangulation on fewer than six vertices, suppose that has at least six vertices. We would like to transform into a -connected triangulation by simultaneously flipping a set of edges such that all separating triangles are destroyed and none created. We use the following criterion to ensure that the resulting triangulation is -connected.

Lemma 2 (Bose et al. [8]).

Let be a set of edges in a triangulation such that no two edges in are incident to a common triangle, every edge in is incident to a separating triangle, and for every separating triangle there is at least one edge in that is incident to . Then is simultaneously flippable in and the resulting triangulation is -connected.

Recall that the edges of a triangulation and its dual are in one-to-one correspondence. Consequently, the set of edges dual to those in forms a matching in . As all faces of a triangulation are triangles, is cubic (-regular). Moreover, every triangulation on vertices is -connected and so its dual is bridgeless (-edge-connected). By a famous theorem of Tait the following statement is equivalent to the Four-Color Theorem:

Theorem 3 (Tait [7]).

Every bridgeless cubic planar graph admits a partition of the edge set into three perfect matchings.

In particular, this applies to the dual of a triangulation. Call a set of edges of a triangulation a (perfect) dual matching if forms a (perfect) matching of . While it is clear that a perfect dual matching contains exactly one edge of each facial triangle, this is not obvious for separating triangles. But it follows from a simple parity argument, as the following lemma shows.444Bose et al. [8] derive this property from the explicit Tait coloring. The statement here is slightly more general because it holds for every perfect dual matching.

{restatable}

lemmaldualhittriangle Every perfect dual matching of a triangulation contains an edge of every triangle of .

Proof.

For facial triangles the statement holds by definition. So consider a separating triangle of and the subgraphs and of induced by together with the two respective components of . As is a maximal planar graph, it has faces including the facial triangle . Hence the number of faces of different from is odd and so every perfect matching of contains at least one edge that connects a face of with a face of . The corresponding primal edge of the dual matching is an edge of , as required. ∎

The combination of Theorem 3 with Lemma 5 immediately yields the following {restatable}corollarycdualhittriangle Every triangulation admits a partition of the edge set into three perfect dual matchings such that every triangle of is incident to exactly one edge from each of the three matchings.

The last missing bit to prove Theorem 1 is an upper bound on the number of edges in a triangulation that can be incident to separating triangles. {restatable}lemmaedgebound At most edges of a maximal planar graph on vertices are incident to separating triangles. This bound is the best possible.

Proof.

We proceed by induction on the number of separating triangles. For a maximal planar graph without separating triangles the statement is trivial. For , the only maximal planar graph is and it has no separating triangle. For , there is only one maximal planar graph up to isomorphism, and it contains exactly one separating triangle, bounded by edges.

Consider a maximal planar graph on vertices and a minimal separating triangle of , that is, a separating triangle such that for at least one component of the subgraph does not contain a separating triangle (equivalently, or is -connected). Put . The graph has vertices and contains exactly one fewer separating triangle than . By the inductive hypothesis, at most edges of are incident to separating triangles of . As far as the corresponding count for is concerned, only the three edges of have to be accounted for in addition.

If some edge of also bounds a separating triangle in , then this edge has already been counted inductively in . Including the remaining at most two edges of , we see that at most edges of are incident to separating triangles of . Also if , then at most edges of are incident to separating triangles of .

Otherwise, and none of the edges of is incident to any separating triangle in . Denote the vertices of by , and let and be the two faces of incident to the edge . By contracting the edge in , we obtain a graph on vertices. The contraction identifies the two edges and into a single edge. Similarly the two edges and are identified into a single edge.

We claim that after this contraction is simple, that is, no multi-edge is introduced (other than the two edge pairs already mentioned and handled). This is because the vertices and have exactly two common neighbors in , which are and . If and had any other common neighbor , then the triangle would be a separating triangle in , contrary to our assumption that is not incident to any separating triangle in . Hence and are the only common neighbors of and , and so no multi-edge is created by contracting , as claimed.

Finally we observe that by the inductive hypothesis at most edges of are incident to separating triangles of . In addition to the three edges of we also have to account for changes caused by the contraction of the edge . Edges and are identified in , but neither is incident to any separating triangle in by assumption. Edges and are also identified. They each may be incident to separating triangles in but they are counted once only in . Consequently, we count the three edges of and one additional edge for a total of at most edges incident to separating triangles in .

For a matching lower bound, consider the graphs depicted in Figure 5. The solid edges are incident to separating triangles. On the left, we have and and exactly edges incident to separating triangles. To obtain larger examples, repeatedly insert a new vertex into a face with exactly one solid edge. The remaining two edges of this face become solid. Note that this operation creates a face with exactly one edge that is incident to a separating triangle, and so the operation can be repeated indefinitely. After such operations we have vertices and precisely edges incident to separating triangles, as desired.

Figure 5: Tight examples for Lemma 5, for .

Now we have all pieces together to prove Theorem 1. \upsimfour*

Proof.

Consider a maximal planar graph on vertices. By Corollary 5 the edges of can be partitioned into three perfect dual matchings , , and , of edges each, such that each separating triangle is incident to one edge from each. Let , for , denote the dual matching that results from removing all edges from that are not incident to any separating triangle. By Lemma 5 at most edges of are incident to separating triangles. Therefore, one of , , and contains at most edges. By Lemma 2 these edges are simultaneously flippable and the resulting graph is -connected.

All separating triangles (and incident edges) can be found in time [13]. Theorem 3 is known to be equivalent to the Four Color Theorem [7], and a proper -coloring of yields an edge partition into dual matchings in all 4-connected subgraphs in time. The current best algorithm for -coloring a planar graph with vertices runs in time [32]. Consequently, we can find a smallest dual matching from in time. ∎

The following construction shows that the bound in Theorem 1 is tight up to an additive constant of . \upsimfourlower*

Proof.

Start with and select a face of . For , the graph is recursively obtained from as follows (see Figure 6 where is the outer face): For each face adjacent to in , insert a new vertex of degree 3 into and connect it to all three vertices of . Since is adjacent to three distinct faces, the number of vertices in is . By construction, has three groups of separating triangles. Each group contains separating triangles that lie in one of the three subdivided faces of and share a common edge with .

As the face is incident to all separating triangles in , it is tempting to just flip the three edges of . However, a simultaneous flip can include at most one of the edges incident to . Consequently, at least two edges of remain untouched, each of which is incident to a group of separating triangles. As no two triangles within a group share any other edge, one flip per triangle is needed to destroy them all simultaneously. Also two separating triangles from different groups are edge-disjoint—except for the three largest separating triangles, which are bounded by the edges of . But any two groups share only one such edge and so at most one flip can be saved in this way. Therefore, in order to handle the two groups whose edge incident to is not flipped at least edges need to be flipped. Clearly, at least one more edge flip is required to handle the third group, which leaves us with the claimed bound of at least edges. ∎

(a)
(b)
(c)
Figure 6: The first members of a family of triangulations that require a simultaneous flip of at least edges to become -connected.

6 Flip Distance to Hamiltonicity

With regard to arc diagrams, there is actually no reason to insist that the triangulation be -connected. In order to apply Lemma 1 we need only that the triangulation is Hamiltonian. In this section we go one step further and in addition lift the restriction that the flip be simultaneous. Instead, an arbitrary sequence of edge flips is allowed. In this case tight bounds are known if the goal is to obtain a -connected triangulation. Bose at al. [10] showed that flips are always sufficient and sometimes flips are necessary to transform a given triangulation on vertices into a -connected triangulation.

In general, a sequence of flips has no direct implication for arc diagrams. But if only edges of the original triangulation are flipped, then we can subdivide those edges rather than flipping them. In the resulting arc diagram only the subdivided edges may appear as biarcs. But a bound on the flip distance to a Hamiltonian triangulation is of independent interest. For instance, it is directly related to the current best upper bound on the diameter of the flip graph of combinatorial triangulations [10, 26, 27]. The argument uses a single so-called canonical triangulation and shows that every triangulation can be transformed into this canonical triangulation in two steps: First at most flips are needed to obtain a -connected triangulation and then an additional at most flips are needed to transform any -connected triangulation into the canonical one. Combining two such flip sequences yields an upper bound of on the diameter of the flip graph [10]. The bound of flips for the second step is actually tight [26]. The corresponding bound for a triangulation that is Hamiltonian (but not necessarily -connected) is slightly worse only: It can be transformed into the canonical triangulation using at most flips [27]. Hence our focus is to improve the first step by showing that fewer flips are needed to guarantee a Hamiltonian triangulation than a -connected one.

\hamflip

*

Proof outline. The proof is constructive and consists of two steps. In a first step we apply a sequence of elementary operations that transform a triangulation into a -connected triangulation . An elementary operation is either a usual edge flip or a dummy flip, where a facial triangle is subdivided into three triangles by inserting a new (dummy) vertex and then all three edges of are flipped. All this will be done in such a way that becomes -connected and, therefore, contains a Hamiltonian cycle . We then remove all dummy vertices and construct a Hamiltonian cycle resembling in the resulting triangulation . Finally, we argue that can be obtained from with at most (usual) edge flips. Specifically, we show that each dummy flip can be implemented using at most two edge flips.

Dummy flips. Given a triangulation on vertices and a facial triangle of , a dummy flip of transforms as follows (Figure 7): First, insert a new (dummy) vertex in the interior of face and connect it to all three vertices of . Note that becomes a separating triangle in the resulting graph. Second, flip all three edges of in an arbitrary order.

(a) before
(b) Step 1
(c) Step 2
Figure 7: Example of a dummy flip.

Similarly to the usual flip operation, a dummy flip may create multiple edges. But we will use this operation in specific situations only—as specified in the lemma below—where we can show that it produces a triangulation (that is, no multiple edges). {restatable}lemmadummyflip Let be a maximal planar graph and let be a facial triangle of such that every edge of is incident to a separating triangle of . Then the dummy flip operation of in produces no parallel edges and no new separating triangles.

Proof.

Let be a facial triangle of as specified above and insert a new vertex into . First we claim that every edge of is flippable. Consider the edge and assume that it is incident to faces and . The only obstruction to flippability of is the presence of an edge in . By assumption there is a separating triangle in , for some vertex . Given that both and are facial, the vertices and are separated by (they are in different components of ). Therefore, by planarity of , the edge is not present in and so is flippable, as claimed.

Noting that any two distinct triangles in a (simple) graph share at most one edge, we observe that no separating triangle shares two edges with . In particular, flipping the edge does not destroy any separating triangle incident to the edges or . Hence even after flipping one or two edges of , we can still apply the above reasoning to show that the other edge(s) of remain flippable. It follows that all three edges of can be flipped in any order.

It remains to show that these flips do not introduce any separating triangle. Denote by the graph that results from the dummy flip of in . As all newly introduced edges are incident to , any new separating triangle must also be incident to . So suppose is a separating triangle in . In particular, this means that the edge was present in already. At most one of and can be vertices of , otherwise would not be an edge of (exactly the edges of were flipped away, after all). So we may suppose without loss of generality that is a vertex of some triangle in . However, by assumption there is a separating triangle incident to the edge in , which separates (in ) from all neighbors of in other than and . It follows that , but the triangles and are facial in by construction. Therefore, there is no separating triangle in that is incident to and so no separating triangle is introduced by the dummy flip of in . ∎

6.1 First Step: Establish 4-Connectedness

Our main lemma to establish Theorem 1 is the following.

Lemma 4.

Every maximal planar graph on vertices can be transformed into a -connected maximal planar graph by a sequence of flip and dummy flip operations, for some , such that .

Recall that there are triangulations on vertices that contain pairwise edge-disjoint separating triangles [10, 23]. In this case, we need to flip away at least one edge from each separating triangle to reach -connectivity. Considering that a dummy flip operation flips three edges, we must have . The crucial claim in Lemma 4 is that is possible, and later we will show how to replace each dummy flip by two usual flips rather than three (Lemma 6.2).

The rest of this section is devoted to the proof of Lemma 4. We describe an algorithm that, given a triangulation on vertices, returns a sequence of flip and dummy flip operations that produces a -connected graph. The bound is written equivalently as and is established via the following charging scheme. Each edge of , with the exception of the three edges of the outer face, receives one unit of credit. Each edge flip costs six units. Each dummy flip costs fifteen units and produces three new edges, each of which receives one unit of credit.

4-Block Decomposition. In our algorithm, we recursively process -connected subgraphs using the -block tree of (see Figure 8 for an example). By fixing an (arbitrary) plane embedding of , we make a rooted tree such that the root is the -block that contains the boundary of the outer face of . Every separating triangle of corresponds to an edge between two -blocks, where the parent lies in the exterior of (plus ) and the child lies in the interior of (plus ). For a -block in denote by the outer face of , and denote by the number of vertices of minus three (the vertices of ). As a maximal planar graph, has edges and faces. An edge of is called an interior edge if it is not incident to the outer face . For each -block in we maintain counters and that denote the number of flips and dummy flips, respectively, that were used within during the course of the algorithm. Initially , for every vertex of .

(a) before flipping
(b) after flipping
Figure 8: Example of a 4-block decomposition and how a flip of the edge merges blocks. The vertices and edges of the root (level zero) are shown solid black, the vertices and edges on level one are shown dotted red, and the vertices and edges on level two are shown dashed blue.

The algorithm computes the sequence of flip and dummy flip operations incrementally, and maintains a current triangulation produced by the operations. Both the graph and the -block decomposition change dynamically during the algorithm: when we flip an edge of some separating triangle(s), all -blocks containing edge merge into a single -block. At the end of the algorithm, the tree consists of a single -block that corresponds to the -connected graph . In order to avoid notational clutter, we always denote the current -block tree by . As an invariant (detailed below) we maintain that at each node of the number of interior edges (ignoring dummy edges) balances the cost of operations that were spent in this -block. As evolves, so does the graph represented by . This graph is the union of all nodes (-blocks) in , where for any edge of the vertices and edges of the common triangle in the two endpoints (-blocks) are identified.

Main loop. At every step, we take an arbitrary -block on the penultimate level of , that is, is not a leaf but all of its children are leaves. Let denote the set of indices such that is a child of in , and denote . The algorithm selects a sequence of edges of to be flipped (or dummy flipped) in order to merge with , for all , into a new -block . Denote the resulting -block tree by . If no edge of is flipped, then is a leaf of . But if an edge of is flipped, then may be an interior node of .

Algorithmic preliminaries. In each iteration, we flip the edges of a dual matching of (a -connector, defined below), but if forms a checkerboard (defined below), we substitute three of these flip operations by one dummy flip.

A -connector for is a dual matching of that contains precisely one edge from every triangle in . By Lemma 2 we can flip the edges of a -connector in an arbitrary order, and the 4-blocks , for all , merge into . Note that a perfect dual matching for consists of edges and so every -connector contains at most this many edges.

Consider a partition of the edge set of into three perfect dual matchings , , and (Theorem 3). For each , , the subset of edges that are incident to some triangle from is a -connector for . We select according to the following criteria:

  • has minimum cardinality and

  • if possible (among the sets of minimum cardinality), then contains an edge of .

Every -connector that is obtained from some partition , , in the described way is an optimal -connector for in .

We say that is a checkerboard if every interior edge of belongs to exactly one triangle of . If is a checkerboard, then we perform a dummy flip on a triangle that is selected according to the following lemma (see Figure 9 for illustration).

{restatable}

lemmaprelimdummy If is a checkerboard, then contains two triangles, and , such that is a bounded facial triangle adjacent to three triangles in and is adjacent to but not to .

Proof.

We partition the set of facial triangles of into two subsets: the set (which are separating triangles in ), and the set of all other faces that we denote by . The dual graph is a -regular planar graph on nodes, one of which corresponds to the outer face .

If is a checkerboard, then the bounded faces of induce a bipartite subgraph in between and the bounded faces in . This subgraph has precisely three vertices of degree two (adjacent to the outer face), all other degrees are three. Since the sum of degrees in the two vertex classes are equal, all three neighbors of the outer face must be in the same vertex class. Therefore, is a bipartite graph on all faces, where the two classes are either and , or and . Given that has faces (including the outer face ), the two classes each have size .

In particular, is adjacent to three distinct facial triangles of that are either all in or all in . We distinguish two cases. First assume is adjacent to three triangles in . Then also contains at least three triangles. Since is planar, it does not contain as a subgraph, and so there exists a bounded face that is not adjacent to all three triangles adjacent to , and a face adjacent to but not to . Next assume is adjacent to three triangles in , let one of them be . Since these triangles are edge-disjoint, each vertex of is incident to a distinct triangle in . This implies that , and so there is a fourth triangle that is adjacent to three triangles in . ∎

(a)
(b)
(c)
Figure 9: Three examples to illustrate Lemma 6.1. The vertices and edges of are shown solid black, the vertices and edges of its children are shown dotted red.

Algorithm 4Connect. Given a triangulation , fix an arbitrary embedding of . This embedding defines a rooted -block tree . While is not a singleton, do:

  1. Consider an arbitrary vertex at the penultimate level of .

  2. If is not a checkerboard, then find an optimal -connector for and flip the edges of in an arbitrary order.

  3. Otherwise, let and be two triangles of as in Lemma 6.1. Let be the dual perfect matching that contains the common edge of and . First apply a dummy flip to . Then consider all triangles in that are not adjacent to , in an arbitrary order. For every such triangle, flip the incident edge in .

  4. Finally, update and .

Correctness of the Algorithm. We show that the above algorithm transforms an input triangulation on vertices into a -connected triangulation using a sequence of flips and dummy flips, for some , such that . By Lemmata 2, 6, and 6.1, the operations described in the algorithm can be performed. In every step of the algorithm at least two nodes of the -block tree are merged. Therefore, after a finite number of steps we are left with a block tree that consists of a single -block .

Independent dummy vertices. The following observation is crucial for the second step of our algorithm (Section 6.2) where we eliminate dummy vertices and simulate dummy flips using regular edge flips. {restatable}observationobsdummy For each vertex created by a dummy flip operation in 4Connect, subsequent operations do not modify the six facial triangles incident to .

Proof.

The claim directly follows from the following properties of the operations performed by the algorithm. (i) When the algorithm flips an edge (including the three flips of a dummy flip), this edge is incident to a separating triangle of the current graph. (ii) The algorithm never creates new separating triangles. (iii) For every vertex created by a dummy flip, at the end of this dummy flip none of the edges of the six triangles incident to is incident to any separating triangle in .

The first two properties are obvious, but the third may need a bit of justification: Each of the three edges of the face where is inserted is incident to a triangle from . In particular, the three neighbors of other than the vertices of lie inside these triangles and so do all edges between them and the vertices of . By choice of , the graph inside any triangle from is a leaf of and, therefore, does not contain any separating triangle of . ∎

Free and trapped edges. It remains to bound the number of flip and dummy flip operations performed by the algorithm. An edge within some -block of is free if it is not incident to any separating triangle of . Free edges are a good measure of progress for our algorithm because our final goal is to arrive at a state where all edges of are free. An edge of that is not free is incident to one or two triangles from . We refer to these edges as singly trapped and doubly trapped, respectively.

Invariants. As an invariant we maintain that every vertex of satisfies the following conditions:

  1. If is the only vertex of , then it has at least free edges.

  2. If is a leaf of that is not the root of , then has at least free interior edges.

  3. If is an interior vertex of , then either or has at least free interior edges.

Initially, 1 holds since has at least two vertices. 2 holds for every leaf of because all of the interior edges are free, , and . Finally, 3 holds for every interior vertex of because . Having a certain number of edges in a plane graph implies having a certain number of vertices, as quantified by the following lemma. {restatable}lemmapni If has at least two nodes, then , for every -block in .

Proof.

For a leaf of , condition 2 implies that has at least edges (the three edges of are not interior). As has exactly edges, it follows that . Similarly for an interior vertex of with , condition 3 implies that has at least edges and so . As is integral, we again obtain . Finally, if , then the statement becomes , which is trivial. ∎

Invariant maintenance. It remains to show that each step of the algorithm maintains invariants 13. If an edge of is flipped and is not the root of , then more blocks may merge into : The edge is definitely shared with the parent of in , but it may be shared with further ancestors as well. In addition, the edge may belong to (at most) one sibling of and possibly some descendants of . We denote by the set of all such that is a leaf of that is merged into . Similarly, denote by the set of all such that is an interior vertex of that is merged into , and denote by the set of indices such that . Note that neither nor are empty, because and . However, we may have .

At the end of a step that merged all , for , into we have and , where and denote the number of flips and dummy flips, respectively, that were executed during this step. The following two lemmata do not make specific assumptions about the set of operations (other than that they are valid, that is, yield a triangulation). In particular, the set of edges flipped need not form a optimal -connector. {restatable}lemmapropcounttwo Suppose that together with all its children in is merged into a leaf of using flips and dummy flips. Then contains at least free interior edges.

Proof.

Combining Lemma 6.1 with we obtain

Given that is a leaf of , all its interior edges are free. ∎

{restatable}

lemmapropcountthree Suppose that along with all its children in is merged into an interior node of using flips and dummy flips. Then contains at least free interior edges.

Proof.

All children of are merged together with into . As is an interior node of , an edge of is flipped in this process and the new edge added by this flip is a free interior edge of . In addition, all edges inside are free interior edges of . The number of vertices inside is , which by Lemma 6.1 is at least . Hence the number of free interior edges inside is at least .

From the remaining nodes of merged into we get by 2 and 3 an additional number of free interior edges. Summing up yields at least

free interior edges in . ∎

Case analysis. We now show that every step of the algorithm 4Connect maintains the invariants 13. We start with the case that forms a checkerboard and then consider the case that does not form a checkerboard. {restatable}lemmapropcountfour Suppose that is a checkerboard. Then fulfills invariants 13.

Proof.

In this case, the algorithm performs dummy flip and flips. As is a checkerboard, we have (any previous flip in would have created a free interior edge). Recall that has faces, one of which is the outer face, and hence either or (see also Lemma 6.1). We distinguish these two cases.

Case 1: . Then . No edge of is flipped in this step, and along with all its children is merged into a leaf of . By Lemma 6.1 we find at least

free interior edges in , which noting that proves 2.

Case 2: . Then and is adjacent to three distinct triangles from . By Lemma 6.1, we have , and is not adjacent to the triangle selected for the dummy flip in this step. Consequently, the algorithm flips the common edge of and .

If the resulting graph is an interior node of , then by Lemma 6.1 we find at least

free interior edges in , which implies 3. Otherwise, is a leaf of and by Lemma 6.1 we find at least

free interior edges in . If is the only vertex of