1 Introduction

A possible approach to the visual exploration of large and complex networks is to gradually display them by showing a sequence of , where each frame contains the drawing of a portion of the graph. When going from one frame to the next, some vertices and edges appear while others disappear. To preserve the mental map, the geometric representation of vertices and edges that are shared by two consecutive frames must remain the same. Informally speaking, a  for a graph consists of a sequence of frames such that every vertex and edge of the graph appears in at least one frame. Moreover, there is a consistency requirement (as for the labels in a zoomable digital map [2]): once a vertex disappears, it may not re-appear. Hence, after a vertex appears, it remains visible until all its incident edges are represented; then it disappears in the transition to the next frame. See Fig. 1 for a storyplan.

Fig. 1.
figure 1

A forest storyplan of the Petersen graph.

Since edge crossings are a natural obstacle to the readability of a graph layout [10], Binucci at al. [4] introduced and studied the that asks whether a graph G admits a storyplan such that every frame is a crossing-free drawing and in every frame a single new vertex appears. Binucci et al. showed that the problem is NP-complete in general and fixed-parameter tractable w.r.t. the vertex cover number. They also proved that every graph of treewidth at most 3 admits a planar storyplan.

Motivated by the research of Binucci et al., we forward the idea of representing a graph with a storyplan such that each frame is a drawing whose visual inspection is as simple as possible. Specifically, we study the and the , which are defined analogously to the planar storyplan problem (see Definition 1 below). We let the classes of graphs that admit planar, outerplanar and forest storyplans be denoted by \(\mathcal {G}_\textrm{planar}\), \(\mathcal {G}_\textrm{outerpl}\), and \(\mathcal {G}_\textrm{forest}\), respectively. Clearly, \(\mathcal {G}_\textrm{forest} \subseteq \mathcal {G}_\textrm{outerpl} \subseteq \mathcal {G}_\textrm{planar} \subseteq \mathcal {G}\), where \(\mathcal {G}\) is the class of all graphs. To further simplify visual inspection, our algorithms draw all frames with straight-line edges. We call storyplans with this property .

Beside the work of Binucci et al., our research relates to the graph drawing literature that assumes either dynamic or streaming models (see, e.g., [1, 3, 6, 7]) and to recent work about graph stories (see, e.g., [5, 9]). The key difference to our work is that these papers (except [4]) assume that the order of the vertices is given as part of the input. We now summarize our contribution, using as shorthand for triangle-free.

  • We establish the chain of strict containment relations \(\mathcal {G}_\textrm{forest} \subsetneq \mathcal {G}_\textrm{outerpl} \subsetneq \mathcal {G}_\textrm{planar} \subsetneq \mathcal {G}\) (see Fig. 2) by showing that

    • there is a \(\triangle \)-free 6-regular graph that does not admit a planar storyplan;

    • there is a \(K_4\)-free 4-regular planar graph that (trivially) admits a planar storyplan, but does not admit an outerplanar storyplan; and

    • there is a \(\triangle \)-free 4-regular (nonplanar) graph that admits an outerplanar storyplan, but does not admit a forest storyplan.

    Recall that a is a maximal planar graph; it admits a planar drawing where every face is a triangle. We show that no triangulation (except for \(K_3\)) admits an outerplanar storyplan; see Sect. 3.

  • We show that every partial 2-tree and every subcubic graph except \(K_4\) admits an outerplanar straight-line storyplan ( in linear time); see Sect. 4. In our construction for subcubic graphs, every frame contains at most five edges.

  • A graph must be \(\triangle \)-free in order to admit a forest storyplan. We show that \(\triangle \)-free subcubic graphs (as the Petersen graph in Fig. 1), and \(\triangle \)-free planar graphs admit straight-line forest storyplans (which we can compute in linear and polynomial time, respectively); see Sect. 5.

Fig. 2.
figure 2

Overview: existing [4] and new storyplan results, implying \(\mathcal {G}_\textrm{forest} \subsetneq \mathcal {G}_\textrm{outerpl} \subsetneq \mathcal {G}_\textrm{planar} \subsetneq \mathcal {G}\). (For simplicity, we mention 2-/3-trees rather than partial 2-/3-trees.)

We start with some preliminaries in Sect. 2 and close with open problems in Sect. 6. The full proofs of statements with a “\(\star \)” are in the full version of this paper [12]. Given a positive integer n, we use as shorthand for \(\{1,2,\dots ,n\}\).

2 Preliminaries

Our definitions of a planar, an outerplanar, and a forest storyplan are based on the definition of a planar storyplan of Binucci et al. [4].

Definition 1

A \(\mathcal {S}=\langle \tau , (D_i)_{i\in [n]} \rangle \) of G is a pair defined as follows. The first element is a bijection \(\tau :V \rightarrow [n]\) that represents a total order of the vertices of G. For a vertex \(v \in V\), let \(i_v= \tau (v)\) and let \(j_v = \max _{u \in N[v]} \tau (u)\), where N[v] is the set containing v and its neighbors. The interval \([i_v,j_v]\) is the of v. We say that v at step \(i_v\), is at step i for each \(i \in [i_v,j_v]\), and at step \(j_v+1\). Note that a vertex disappears only when all its neighbors have appeared. The second element of \(\mathcal {S}\) is a sequence of drawings \((D_i)_{i\in [n]}\), called of \(\mathcal {S}\), such that, for \(i \in [n]\): (i) \(D_i\) is a drawing of the graph \(G_i\) induced by the vertices visible at step i, (ii) \(D_i\) is planar, (iii) the point representing a vertex v is the same over all drawings that contain v, and (iv) the curve representing an edge e is the same over all drawings that contain e.

We emphasize that though for the definition of a storyplan we allow that edges could be represented by curves, our constructions use only straight-line segments. For an and a , we strengthen requirement (ii) to \(D_i\) being outerplanar and \(D_i\) being a crossing-free drawing of a forest, respectively. In what follows, we will sometimes use a slight variant of Definition 1, in which we enrich the sequence \((D_i)_{i\in [n]}\) of frames by explicitly representing the portions of the drawings that consecutive frames have in common. More precisely, for \(i \in [n-1]\), let \(D_i'=D_i \cap D_{i+1}\). Then, a storyplan is a sequence of drawings \(\langle D_1, D'_1, \dots , D_{n-1}, D'_{n-1}, D_n\rangle \), where in each step \(i < n\), we first introduce a vertex (in \(D_i\)) and then remove all vertices (in \(D_i'\)), that is, the vertices that disappear in the next step. Similar to \(D_i'\), we define \(G_i'\) for \(i \in [n-1]\) as the graph induced by the vertices of \(V(G_i) \cap V(G_{i+1})\). We now list some useful observations.

Property 1

If a graph G admits a planar, an outerplanar, or a forest storyplan, then the same holds for any subgraph of G. Conversely, if a graph G does not admit a planar, an outerplanar, or a forest storyplan, then the same holds for all supergraphs of G.

Lemma 1

([4]). Let \(K_{a,b} = (A \cup B, E)\) be a complete bipartite graph with \(a = |A|\), \(b=|B|\), and \(3 \le a \le b\). Let \(\mathcal {S}=\langle \tau , \{D_i\}_{i\in [a+b]} \rangle \) be a planar storyplan of \(K_{a,b}\). Exactly one of A and B is such that all its vertices are visible at some \(i \in [a+b]\).

Example 1

Every bipartite graph admits a forest storyplan: first add all vertices of one set of the bipartition and then, one by one, the vertices of the other set. Note that each vertex of the second set is visible in only one frame.

3 Separation of Graph Classes

Trivially, triangulations admit planar storyplans, but as we show now, no triangulation (except for \(K_3\)) admits an outerplanar storyplan.

Theorem 1

No triangulation (except for \(K_3\)) admits an outerplanar storyplan.

Proof

For a triangulation, the closed neighborhood of each vertex induces a wheel, which is not outerplanar. For the first vertex that disappears according to a given storyplan, however, its whole closed neighborhood, which is not outerplanar, must be visible.   \(\square \)

Example 2 (Platonic graphs)

According to Theorem 1, the tetrahedron, the octahedron, and the icosahedron do not admit outerplanar storyplans because they are triangulations. The cube is bipartite; hence, it admits a forest storyplan due to Example 1. The dodecahedron is \(\triangle \)-free and cubic; hence, it admits a forest storyplan due to Theorem 5.

We now separate the graph classes \(\mathcal {G}_\textrm{forest}\), \(\mathcal {G}_\textrm{outerpl}\), \(\mathcal {G}_\textrm{planar}\), and \(\mathcal {G}\); see Fig. 2.

Theorem 2

The following statements hold:

  1. 1.

    There is a \(\triangle \)-free 6-regular graph that does not admit a planar storyplan; hence \(\mathcal {G}_\textrm{planar} \subsetneq \mathcal {G}\).

  2. 2.

    There is a \(K_4\)-free 4-regular planar graph that does not admit an outerplanar storyplan; hence \(\mathcal {G}_\textrm{outerpl} \subsetneq \mathcal {G}_\textrm{planar}\).

  3. 3.

    There is a \(\triangle \)-free 4-regular (nonplanar) graph that admits an outerplanar storyplan, but does not admit a forest storyplan; hence \(\mathcal {G}_\textrm{forest} \subsetneq \mathcal {G}_\textrm{outerpl}\).

Proof

  1. 1.

    The graph \(C_{3,3,3,3,3}\) (see Fig. 3a) is \(\triangle \)-free and 6-regular, but does not admit a planar storyplan as we will now show. Let \(V(G)=V_1 \cup \dots \cup V_5\) be the partition of the vertex set into independent sets of size 3. Note that, for \(i \in \{1,2,3,4,5\}\), \(G[V_i \cup V_{(i \bmod 5)+1}]\) is isomorphic to \(K_{3,3}\). For \(K_{3,3} = G[V_1 \cup V_2]\), we know by Lemma 1 that, in any planar storyplan, either all vertices of \(V_1\) or all vertices of \(V_2\) are shown simultaneously, say, those of \(V_1\). Hence, for a frame to be planar, the vertices of \(V_2\) and \(V_5\) cannot be shown simultaneously. This, in turn, means that the vertices of \(V_3\) and \(V_4\) must be shown simultaneously. But then there must be a frame with a drawing of the non-planar graph \(G[V_3 \cup V_4]=K_{3,3}\).

  2. 2.

    Observe that the octahedron (see Fig. 3b) is planar, 4-regular, and \(K_4\)-free, but does not admit an outerplanar storyplan due to Example 2.

  3. 3.

    The graph \(C_{2,2,2,2,2}\) (see Fig. 3c) is \(\triangle \)-free and 4-regular, but does not admit a forest storyplan. The proof is analogous to the one above. There needs to be a frame with a drawing of \(K_{2,2}\), which is not a tree. On the other hand, the order of the vertices shown in Fig. 3c yields an outerplanar storyplan. Note that we cannot use the vertex positions exactly as in the figure, but if we place vertex 8 at the position of vertex 6 (which will have disappeared by then), every frame is crossing-free.    \(\square \)

Fig. 3.
figure 3

Three graphs from the proof of Theorem 2. The graph in (a) is \(\triangle \)-free and does not admit any planar storyplan. The octahedron graph in (b) does not admit any outerplanar storyplan. The graph in (c) is \(\triangle \)-free and does not admit any forest storyplan (but the vertex numbering corresponds to an outerplanar storyplan – if vertex 8 is placed at the position of vertex 6, which will have disappeared by then).

4 Outerplanar Storyplans

In this section we present families of graphs that admit outerplanar storyplans.

Theorem 3

Every partial 2-tree admits a straight-line outerplanar storyplan, and such a storyplan can be computed in linear time.

Proof

Due to Property 1, it suffices to prove the statement for 2-trees.

Let G be a 2-tree. Hence, there exists a \(\sigma = \langle v_1, \dots , v_n \rangle \) of the vertex set V(G). In other words, G can be constructed as follows: we start with \(v_1, v_2, v_3\) forming a \(K_3\) and then, for \(i \ge 4\), \(v_i\) is on an edge \(v_k v_\ell \) with \(k, \ell < i\), that is, \(v_i\) is connected to \(v_k\) and \(v_\ell \) by edges. We claim that we can choose a vertex order \(\sigma '\) and an embedding \(\mathcal {E}\) of G such that \(\sigma '\) (together with \(\mathcal {E}\)) defines an outerplanar storyplan. Moreover, we can obtain a straight-line drawing of G with embedding \(\mathcal {E}\) in linear time [8, 14]. Let \(\varGamma \) be such a drawing. For the outerplanar storyplan that we construct we use the positions of vertices and edges as in \(\varGamma \). This yields a straight-line storyplan. Figure 4(a) shows a 2-tree with a stacking order (that is not an outerplanar storyplan).

Fig. 4.
figure 4

A 2-tree G with a stacking order (a); its tree decomposition yields a vertex order \(\sigma = \langle 1,2,3,4,8,5,6,7,9\rangle \) (b); and an embedding of G that together with \(\sigma \) defines an outerplanar storyplan (c).

To show that an outerplanar storyplan always exists, we create a tree decomposition \(T_{G,\sigma }\) of G. The root of \(T_{G,\sigma }\) represents the triangle \(\Delta v_1 v_2 v_3\) given by the first three vertices of \(\sigma \). For \(i = 4, 5, \dots \), let \(v_i\) of \(\sigma \) be stacked onto the edge \(v_k v_\ell \) with \(k < \ell < i\). We add a node to \(T_{G,\sigma }\) that represents \(v_i\) and is a child of the node representing \(v_\ell \). Note that if \(\ell \le 3\), then this new node is a child of the root. Figure 4(b) shows a tree decomposition of the 2-tree in Fig. 4(a).

From \(T_{G,\sigma }\), we obtain a vertex order \(\sigma ' = \langle v'_1, v'_2, \dots , v'_n \rangle \) being an outerplanar storyplan as follows; see Fig. 4(c). Let \(v_1'=v_1\), \(v_2'=v_2\), and \(v_3'=v_3\). Now, we traverse the nodes of \(T_{G,\sigma }\) in (depth-first) pre-order and add the represented vertices of G to \(\sigma '\). We claim that for \(\sigma '\), we can choose an embedding \(\mathcal {E}\) (defined implicitly next) of G such that all frames are outerplanar. Note that the first three vertices form a triangle, which always admits an outerplanar drawing. Now consider \(v_i'\) for \(i = 4, 5, \dots \). Our invariant is that, before the i-th frame starts, the parent p of \(v_i'\) in \(T_{G,\sigma }\) has degree 2 in the current outerplanar drawing and lies on the outer face. This implies that \(v_i'\) can be added to the outer face because it is stacked onto an edge of the outer face resulting again in an outerplanar drawing. Of course, for \(i = 4\), our invariant is satisfied. If \(p = v_{i-1}'\), then our invariant is trivially satisfied. Otherwise, let \(p = v_j'\) for some \(j < i - 1\). Observe that, for \(k \in \{j + 1, \dots , i-1\}\), each \(v_k'\) will have disappeared by the end of the \((i-1)\)-th frame. This is due to the fact that \(v_k'\) is not an ancestor of \(v_i\), which means that all of the neighbors of \(v_k'\) have already been introduced to the storyplan due to the depth-first pre-order traversal. Essentially, every frame given by \(\sigma '\) shows a subpath of \(T_{G,\sigma }\), which is a sequence of stacked triangles admitting an outerplanar drawing.   \(\square \)

Theorem 4

(\(\star \)). Every subcubic graph except \(K_4\) admits a straight-line outerplanar storyplan with at most five edges in each frame, and such a storyplan can be computed in linear time.

Proof

Due to Property 1, it suffices to prove the statement for cubic graphs.

We can assume that the given cubic graph G (which is not \(K_4\)) is connected; otherwise we consider each connected component separately. For an outerplanar storyplan, we will order the vertices \(v_1, \dots , v_n\) of G such that the resulting sequence of graphs \(\langle G_1, G'_1 \dots , G_{n-1}, G'_{n-1}, G_n \rangle \) has the following property: for \(4 \le i \le n-1\), \(G'_i\) has at most two edges. Only for \(i=3\), \(G'_i\) may be a triangle and would thus contain three edges. Then we show how to obtain outerplanar drawings \(D_1, D'_1 \dots , D_{n-1}, D'_{n-1}, D_n\) of the graphs \(G_1, G'_1 \dots , G_{n-1}, G'_{n-1}, G_n\), respectively. For \(i \in [n]\), let \(H_{i} = G[\{v_1, \dots , v_{i}\}]\).

We pick the first vertex \(v_1\) arbitrarily. For \(1 < i \le n\), let v denote a vertex of \(G'_{i-1}\) with maximum degree in \(H_{i-1}\). If there are more choices, let v additionally have maximum degree in \(G'_{i-1}\). We then select \(v_i \in V(G)\setminus \{v_1, \dots , v_{i-1} \}\) as a neighbor of v in G. Note that v always has such a neighbor, otherwise v would already be completed and, hence, would not be in \(G'_{i-1}\). The intuition behind this choice is that we want to remove v from the drawing as soon as possible.

We claim that, for \(4 \le i \le n-1\), the graph \(G'_i\) contains at most two edges. In addition, if \(G'_i\) contains two edges, then these edges are both incident with \(v_i\). This would mean that, for \(i \in [n]\), \(G_i\) contains at most five edges. Indeed, even if \(G'_3\) has three edges (that is, \(G'_3\) is a triangle), then \(G_4\) still has at most five edges since G is not \(K_4\). Clearly, \(D_1\) and \(D_2\) have at most two edges.

We consider three cases depending on the degree of v in \(G'_{i-1}\); see Fig. 5.

(C1):

Vertex v does not have any neighbors in \(G'_{i-1}\). By the choice of v, this implies that there are no edges in \(G'_{i-1}\) because \(H_{i-1}\) is connected and, for an edge in \(G'_{i-1}\), \(H_{i-1}\) contains an incident degree-2 vertex. Note that all edges in \(G_i\) are new and incident with \(v_i\). If \(v_i\) has three neighbors in \(G_i\), then \(v_i\) will disappear, and there are no more edges in \(G'_i\). Hence, \(G'_i\) has at most two edges. Note that both edges are incident with \(v_i\).

(C2):

Vertex v has one neighbor in \(G'_{i-1}\). If v has degree 2 in \(H_{i-1}\), then v disappears in the next step and \(G'_i\) does not contain it. Since \(v_i\) has at most one edge that stays in \(G'_i\), the number of edges in \(G'_i\) is not larger than in \(G'_{i-1}\). If v has degree 1 in \(H_{i-1}\), then, by construction, all other vertices in \(G_{i-1}\) have also degree at most 1 in \(H_{i-1}\). Hence, \(i=3\), that is, v and its neighbor are the first two vertices that we introduced.

(C3):

Vertex v has two neighbors in \(G'_{i-1}\). In this case, the two edges incident with v are the only edges in \(G'_{i-1}\). Then v disappears as \(v_i\) is its last neighbor. Therefore, \(G'_i\) contains at most one edge that \(v_i\) may have introduced.

Fig. 5.
figure 5

Cases considered in the proof of Theorem 4. In all of them, the number of edges in \(G'_i\) is maximized. Gray vertices and edges were visible in some previous steps.

We have shown that, in each case, the number of visible edges in \(G'_i\), for \(4 \le i \le n-1\), is at most two. Note that, if there are two edges, then they share an endpoint. In the full version [12], we also show that we can always find a position of the vertices such that each frame is outerplanar and straight-line.

To see the linear runtime, note that we can choose \(v_i\) and update \(H_i\) in amortized constant time by using a suitable data structure [13]. The other steps of our construction require constant time for each vertex \(v_i\).   \(\square \)

5 Forest Storyplans

Clearly, any triangle is an obstruction for a graph to admit a forest storyplan. Interestingly, for planar and subcubic graphs this is the only obstruction for the existence of a forest storyplan as we show now.

Theorem 5

(\(\star \)). Every \(\triangle \)-free subcubic graph admits a straight-line forest storyplan. Such a storyplan can be computed in linear time and has at most five edges per frame.

Proof We use the storyplan from the proof of Theorem 4. By construction, we never get a cycle since we consider triangle-free graphs.   \(\square \)

As a warm-up for our main result, we briefly show the following weaker result.

Observation 1

Every \(\triangle \)-free outerplanar graph admits a straight-line forest storyplan, and such a storyplan can be computed in linear time.

Proof Sketch

Let G be a \(\triangle \)-free outerplanar graph, and let \(\varGamma \) be an outerplanar straight-line drawing of G. Let \(\sigma = \langle v_1, v_2, \dots , v_n \rangle \) be the circular order of the vertices along the outer face of \(\varGamma \) (which can easily be determined in linear time [11]). We claim that \(\sigma \) yields a forest storyplan of G. (Note that the positions of the vertices in \(\varGamma \) will make this storyplan straight-line.)

To this end, we show that there is no frame where a complete face of \(\varGamma \) is visible. If this is true, then no frame contains a complete cycle. This is due to the fact that, in outerplanar graphs, the vertex set of every cycle contains the vertex set of at least one face. Let \(F = \langle v_{i_1}, v_{i_2}, \dots , v_{i_k} \rangle \) with \(i_1 < i_2 < \dots < i_k\) be a face of G. Since G is \(\triangle \)-free, we have \(k \ge 4\). Note that \(v_{i_1}\) and \(v_{i_3}\) as well as \(v_{i_2}\) and \(v_{i_4}\) are not adjacent. Since G is outerplanar, \(v_{i_2}\) may be adjacent only to vertices that appear in \(\sigma \) between (and including) \(v_{i_1}\) and \(v_{i_3}\). Therefore, \(v_{i_2}\) disappears before \(v_{i_4}\) appears. Hence it is indeed not possible that all vertices of the same face appear in a frame.   \(\square \)

Now we improve upon the simple result above. Note, however, that we do not guarantee a linear running time any more.

Theorem 6

Every \(\triangle \)-free planar graph admits a straight-line forest storyplan, and such a storyplan can be computed in polynomial time.

Proof

Let G be a \(\triangle \)-free planar graph, and let \(\varGamma \) be a planar straight-line drawing of G. In the desired forest storyplan for G, we use the position of the vertices in \(\varGamma \).

We first give a rough outline of our iterative algorithm and then describe the details. In each iteration (which spans one or more steps of the storyplan that we construct), we a vertex on the current outer face, which means that we add it and its neighbors (if they are not visible yet) to the storyplan one by one. In this way, after each iteration, at least one vertex disappears, namely the one we picked.

Let \(G_1=G\) and, for \(i \in \{1,2,\dots \}\), let \(v_i\) be the vertex that we pick in iteration i, and let \(G_{i+1}\) be the subgraph of \(G_{i}\) that we obtain after removing the vertices (and the edges incident to them) that disappear in iteration i; see Fig. 7b. The algorithm terminates as soon as \(G_i\) is a forest and adds the remaining vertices in arbitrary order to the storyplan under construction. We call vertices and edges incident with the (current) outer face . The others are .

We always pick outer vertices. For this reason, only two types of vertices are problematic for avoiding cycles: the endpoints of (i.e., inner edges incident with two outer vertices) and the endpoints of (i.e., length-2 paths that connect two outer vertices via an inner vertex).

Fig. 6.
figure 6

From an embedded \(\triangle \)-free planar graph \(G_i\) (black & gray), we obtain \(G_i'\) (black). Note that \(G_i'\) decomposes into seven simple cycles and two connected components. The outer edges and vertices of these connected components form cactus graphs. (Color figure online)

Let \(G_i'\) be the (embedded) subgraph of \(G_i\) (embedded according to \(\varGamma \)) that consists of all vertices and edges that lie on a simple cycle that bounds the outer face of \(G_i\), plus every edge that connects two cycles, plus all chords and half-chords (and, thus, plus the inner vertices that lie on the half-chords) of \(G_i\); see Figs. 6 and 7c. For example, the edges e and \(e'\) of \(G_2\) in Fig. 7b are not part of \(G_2'\). We say that a vertex of \(G_i'\) is if it lies on the outer face and is not part of a chord or a half-chord.

Let \(H_i\) be the weak dual of \(G_i'\) (see Fig. 7c), i.e., the (embedded) multigraph that has a vertex for each inner face of \(G_i'\) and an edge for each pair of inner faces that are incident with a common edge of \(G_i'\). Note that \(H_i\) is outerplane (since the inner vertices of \(G_i'\) form an independent set) and that \(H_i\) has no loops (since \(G_i'\) does not have leaves). We maintain the following invariants:

Fig. 7.
figure 7

A \(\triangle \)-free planar graph G where (a) shows a forest storyplan computed by our algorithm, (b) shows the result of the first iteration of the algorithm, and (c) shows the auxiliary graph for the second iteration. Subscripts refer to the iteration in which a vertex is picked. Red crosses mark vertices that may not be picked. (Color figure online)

(I1):

At no point in time, the set of visible edges on the outer face forms a cycle.

(I2):

During iteration i, the only inner vertices that may be visible are those that are adjacent to \(v_i\) and to no other visible vertex on the outer face.

(I3):

During iteration i, the only inner edges that may be visible are those that are incident with \(v_i\) and to no other vertex on the outer face.

(I4):

At the end of each iteration (after removing the vertices that are not visible any more and before picking a new one), only vertices and edges incident with the outer face are visible.

Obviously, if the invariants hold, the set of visible edges in each frame forms a forest. In order to guarantee that the invariants hold, we use the following rules that determine which vertices we may not pick; see Fig. 8. We call a vertex observing these rules . Note that we always pick a good vertex on the outer face of \(G_i'\) – we will later argue that there always is one.

(R1):

Do not pick a vertex v whose extended neighborhood \(N[v]=\{v\} \cup \{ u :uv \in E(G_i) \}\) contains all invisible vertices of the outer face of \(G_i'\).

(R2):

Do not pick an endpoint of a chord.

(R3):

Do not pick a neighbor of an endpoint of a chord if the other endpoint of that chord is visible.

(R4):

Do not pick an endpoint of a half-chord if the other endpoint is visible.

Fig. 8.
figure 8

Rules that determine which vertices may not be picked (marked by red crosses). Black squares represent visible vertices, white squares represent invisible vertices, and gray disks represent vertices that may be visible or invisible. (Color figure online)

Rule (R1) ensures that we do not close a cycle on the outer face, thus, invariant (I1) holds. Rule (R4) ensures that none of the visible inner vertices is adjacent to two visible vertices on the outer face (including the picked vertex), thus, invariant (I2) holds. Rules (R2) and (R3) ensure that no chords are visible. Together with rule (R4) and the fact that G is \(\triangle \)-free, they ensure that the inner edges that are visible are incident with the picked vertex and no other vertex on the outer face. Thus, invariant (I3) holds. Invariant (I4) holds because we always pick a vertex on the outer face and remove it. As a result, the faces incident with the picked vertex become part of the outer face and the previously inner neighbors (if any) of the picked vertex become incident with the outer face.

It remains to prove that, as long as \(G_i\) is not a forest (and the algorithm terminates), there exists a vertex that can be picked without violating any of our rules. Our proof is constructive; we show how to find a vertex to pick.

We first show that \(H_i\) is a (collection of) cactus graph(s), that is, every edge of \(H_i\) lies on at most one cycle. Suppose that \(H_i\) contains an edge \(e_1\) that lies on at least two simple cycles. If the interiors of the two cycles are disjoint, then \(e_1\) is not incident to the outer face of \(H_i\) (contradicting \(H_i\) being outerplane). Otherwise, one of the cycles has at least one edge \(e_2 \ne e_1\) in the interior of the other cycle, again contradicting \(H_i\) being outerplane.

We show in two steps that \(G_i\) (actually even \(G_i'\)) always contains a good vertex, which we pick. First, we show how to find a good vertex in the base case, that is, if the outer face of \(G_i'\) is a simple cycle. Then, we consider the general case where the outer face of \(G_i'\) is a (collection of) cactus graph(s). Here, we repeatedly apply the argument of the base case to find a good vertex. So, assume that the outer face of \(G_i'\) is a simple cycle and, hence, \(H_i\) is connected.

In the trivial case that the weak dual \(H_i\) is a single vertex, \(G_i'\) is a cycle of at least four free vertices. Due to invariant (I1), there is an invisible vertex \(v \in G_i'\). Any non-neighbor of v in \(G_i'\) is a good vertex, which we can pick.

If \(H_i\) has a vertex of degree 1, which corresponds to a face f of \(G_i'\), it means that f is incident with exactly one chord and to no half-chords. Since G is \(\triangle \)-free, there are at least two free vertices in f. Note that at most one endpoint of the chord is visible (due to invariant (I3)). If one endpoint is indeed visible, then its unique neighbor on the boundary of f that is not incident with the chord observes all rules and can be picked. If none of the endpoints of the chord is visible, then any free vertex of f can be picked.

Otherwise, all vertices of \(H_i\) have degree at least 2. Let F be the set of faces of \(G_i'\) that are incident with exactly one half-chord and to an arbitrary number of outer edges (but to no other inner edge). Note that in \(H_i\), F corresponds to a set of vertices of degree 2. We now use the following two helpful claims. Their proofs are in the full version [12].

Claim 1

(\(\star \)). The set F has cardinality at least 2.

Claim 2

(\(\star \)). Let the edge e (or the edge pair \(\{e_1, e_2\}\)) be any chord (half-chord) of \(G_i'\), let \(F_1\) be the set of inner faces on the one side, and let \(F_2\) be the set of inner faces on the other side of e (or \(\{e_1, e_2\}\), resp.). Then, \(F_1 \cap F \ne \emptyset \) and \(F_2 \cap F \ne \emptyset \).

We continue to show that there is a good vertex on the outer face of \(G_i'\), which we can pick. Assume first that \(G_i'\) does not have chords. Thus, all vertices of \(G_i'\) trivially observe rules (R2) and (R3). Let \(f \in F\), and let u and w be the endpoints of the unique half-chord incident with f. If there is a free vertex v in f such that N[v] does not contain the last invisible vertices of the outer face of \(G_i'\), then we pick v. Rules (R1) and (R4) are observed by the definition of v. If, for every free vertex v in f, N[v] contains all invisible vertices of the outer face of \(G_i'\), consider the following three cases; see Fig. 9. The cases are ordered by priority; if we fulfill the conditions of multiple cases, the first case applies.

Fig. 9.
figure 9

Cases when there is no chord in \(G_i'\). We always find a good vertex.

(C1):

Both u and w are visible. Then, consider a face \(f' \in F\) different from f, which exists by Claim 1. Clearly, all of its vertices are visible, and we can pick any free vertex \(v'\) of \(f'\) without violating the rules.

(C2):

Exactly one of \(\{u, w\}\) is visible. W.l.o.g., assume that u is visible and w is invisible. We claim that u observes all rules. Since w remains invisible after picking u, u observes rule (R1). If there was another half-chord incident with u, either it would again be incident with w, which does not violate rule (R4), or it would be incident with another vertex of \(G_i'\), which is visible. By Claim 2, however, there is another face \(f' \in F\) on the other side of that half-chord. As all of the vertices of \(f'\) on the outer face are visible, we would be in case (C1) instead.

(C3):

Both u and w are invisible. We claim that u observes the rules. Similar to case (C2), u observes rule (R1) (since w stays invisible) and rule (R4) (if there was another half-chord incident with u whose other endpoint is visible, we would be in case (C1) or in case (C2)).

Now assume that \(G_i'\) has one or more chords. Of course, each of these chords has at most one visible endpoint. The chords with exactly one visible endpoint divide \(G_i'\) into several subgraphs. Observe that at least one of these subgraphs contains no such chord in its interior and is bounded by only one of them (or no chord has a visible endpoint, then there is only one subgraph, namely \(G_i'\)). We call this subgraph \(\hat{G}_i'\) and we let u and w denote the visible and invisible endpoints of the bounding chord e, respectively (or if there is only one subgraph, then u and w are just neighbors). By a case distinction on the facets incident to u and w, we can show that there is always a good vertex on the outer face of \(\hat{G}_i'\), and hence on the outer face of \(G_i'\). The details are in the full version [12].

Claim 3

(\(\star \)). There is a good vertex on the outer face of \(\hat{G}_i'\).

We have shown that there is always a good vertex on the outer face of \(G_i'\) if the outer face of \(G_i'\) is a simple cycle. Now assume that the outer face of \(G_i'\) is not just a simple cycle, but consists of one or multiple cactus graphs. If we have multiple cactus graphs, we can consider them individually. So, it suffices to consider the case where the outer face of \(G_i'\) is one (connected) cactus graph. Still, \(H_i\) may be disconnected. Let \(C_1, C_2, \dots \) be the connected components of \(H_i\), and let \(\tilde{G}_1, \tilde{G}_2, \dots \) be the corresponding subgraphs of \(G_i'\). Two subgraphs \(\tilde{G}_j\) and \(\tilde{G}_k\) may be connected by at most one common vertex or via a single edge. Otherwise, we consider them as non-connected (if they are connected by a path of length \(\ge 2\) in \(G_i\), they are independent because the neighborhood of \(\tilde{G}_j\) does not overlap \(\tilde{G}_k\) and vice versa; these parts remain as a forest in the end). Let T be a graph with a vertex for each \(\tilde{G}_1, \tilde{G}_2, \dots \) where two vertices are adjacent if and only if the corresponding subgraphs are connected. Since the outer face of \(G_i'\) is a cactus graph, T is a forest. Consider the subgraph \(\tilde{G}_1\) and use the algorithm above to find a good vertex v. If v is a cut vertex, then check if it is also a good vertex in all subgraphs from \(\{\tilde{G}_1, \tilde{G}_2, \dots \}\) where it is contained as well. Further, check for each neighbor w of v that is contained in a subgraph \(\tilde{G}_j\) distinct from \(\tilde{G}_1\) whether making w visible violates one of the invariants (note that this is a weaker criterion than checking if w is a good vertex and it implies that w and its neighbors in \(\tilde{G}_j\) are not good vertices). If there is a subgraph \(\tilde{G}_j\) where picking v breaks at least one rules (or making a neighbor of v visible breaks an invariant), then find a good vertex in \(\tilde{G}_j\) (recall that there exists at least one good vertex) and proceed in the same way. Since T does not contain cycles, this procedure always terminates with a (globally) good vertex.

Concerning the running time, note that, if we maintain the outer face, we can find, for each vertex, its incident chords and half-chords in linear time. Further, our constructive proof can be turned into a polynomial-time algorithm as it includes only graph traversal and graph construction operations that can be executed in polynomial time.   \(\square \)

6 Open Problems

  1. 1.

    What is the complexity of deciding whether a given graph admits an outerplanar or a forest storyplan? We conjecture that recognition is NP-hard.

  2. 2.

    While we extended the existing planar storyplan problem into the direction of less powerful but easier-to-understand storyplans, one could also go into the opposite direction and investigate more powerful storyplans in order to be able to construct such storyplans for larger classes of graphs. For example, 1-planar storyplans would be a natural direction for future research.