{'fraction_non_alphanumeric': 0.0411178712308618, 'fraction_numerical': 0.019589489870963428, 'mean_word_length': 3.3356521739130436, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Planarity Criterion for Graphs

It is proven that a connected graph is planar if and only if all its cocycles with at least four edges are"grounded"in the graph. The notion of grounding of this planarity criterion, which is purely combinatorial, stems from the intuitive idea that with planarity there should be a linear ordering of the edges of a cocycle such that in the two subgraphs remaining after the removal of these edges there can be no crossing of disjoint paths that join the vertices of these edges. The proof given in the paper of the right-to-left direction of the equivalence is based on Kuratowski's Theorem for planarity involving K_{3,3} and K_5, but the criterion itself does not mention K_{3,3} and K_5. Some other variants of the criterion are also shown necessary and sufficient for planarity.


Introduction
In this note we prove the necessity and sufficiency of a rather simple planarity criterion for graphs (which, as usual, and as in [2], are understood to be finite, not directed, without multiple edges and without loops). We prove that a connected graph is planar if and only if all its cocycles with at least four edges are grounded in the graph. The notion of grounding, which is purely combinatorial, will be defined precisely later in this section. Our planarity criterion, which is based on this notion, stems from the intuitive idea that with planarity there should be a linear ordering of the edges of a cocycle such that in the two subgraphs remaining after the removal of these edges there can be no crossing of disjoint paths that join the vertices of these edges. The criterion will become clear with the examples of the next section. As far as we know, this criterion is new, and it is formulated without mentioning the graphs K 3,3 and K 5 of Kuratowski's planarity criterion (see [3] and [2], Chapter 11).
The proof of necessity for this criterion, i.e. of the left-to-right direction of the equivalence, is easy. The proof given here of sufficiency, i.e. of the remaining direction, relies however on Kuratowski's Theorem on planarity. We use actually the sufficiency direction for Kuratowski's criterion, which is more difficult to prove than the necessity direction. We suppose that an independent proof could be given for the sufficiency of our criterion, but we do not expect it to be shorter than the proof of sufficiency for Kuratowski's criterion, and, as far as we can see, it would rely on similar ideas. So we do not find it worthwhile to go into such a new proof, which would make the paper longer.
For newer papers giving, like ours, planarity criteria for graphs alternative to Kuratowski's one may consult the references of [4] and [7]. An extensive bibliography for various matters related to Kuratowski's Theorem may be found in [9].
We will follow the terminology and notation of [2] whenever we can, except that instead of point and line we use respectively vertex and edge for abstract graphs too, and not only for geometric graphs (embedded in R 3 )-this usage is presumably more common.
A cutset of a connected graph is a set of its edges whose removal (see [2], Chapter 2) results in a disconnected graph, and a cocycle is defined in [2] (Chapter 4) as a minimal cutset (note that elsewhere, as e.g. in [4], the terminology might be different). We call a cocycle big when it has at least four edges. Given a cocycle C of a connected graph G, let G ′ and G ′′ be the two connected subgraphs of G obtained by removing the edges of C from G. We keep this convention throughout the paper.
Consider four distinct edges x 1 , x 2 , x 3 and x 4 of a big cocycle C of G; we assume that for i ∈ {1, . . . , 4} we have that x i is u i v i , and the vertices u 1 , u 2 , u 3 and u 4 are in G ′ , while the vertices v 1 , v 2 , v 3 and v 4 are in G ′′ . Note that although the four edges x 1 , x 2 , x 3 and x 4 are distinct, the vertices u 1 , u 2 , u 3 and u 4 need not be distinct, and the same for the vertices v 1 , v 2 , v 3 and v 4 .
We say that {x 1 , x 3 } and {x 2 , x 4 } are disparate in G ′ when in G ′ we have a u 1 −u 3 path and a u 2 −u 4 path with no vertex in common. Analogously, we say that {x 1 , x 3 } and {x 2 , x 4 } are disparate in G ′′ when in G ′′ we have a v 1 −v 3 path and a v 2 −v 4 path with no vertex in common. (Something analogous to our notion of disparate pairs of edges is given for vertices in the notion of skew C-components; see [9], Section 2.) In a sequence X 1 a 1 . . . X n a n X n+1 , where n ≥ 1, the sequence a 1 . . . a n is a nonempty subsequence; here a i , for i ∈ {1, . . . , n}, is a member of our sequence and X j , for j ∈ {1, . . . , n+1}, is a sequence, possibly empty, of such members.
A big cocycle C of G is grounded in G when there is a sequence without repetitions containing all its edges such that for every subsequence The theorem giving our planarity criterion is the following.

Theorem. A connected graph is planar if and only if each of its big cocycles is grounded in it.
An arbitrary graph is planar when, of course, each of its connected subgraphs is planar. So this theorem yields easily a planarity criterion for arbitrary graphs.
In the next two sections we consider preliminary matters, which we use in Section 4 to give a proof of our theorem. At the end of that section, and at the very end of the paper, we envisage some variants of our theorem, which are easily derived from our proof, and which may be interesting from an algorithmic point of view.
2 The big cocycles of K 3,3 and K 5 It happens that if G is K 3,3 or K 5 , then all the big cocycles of G are not grounded. For the proof of the Theorem it is however enough that at least one of these big cocycles of G is not grounded.
If G is K 3,3 we have just two types of big cocycles. The first type is given by the dotted edges in the following picture of G: . . , 5}, we have that x i is the edge u i v i , and analogously in the other pictures below. This cocycle of G is not grounded in G. For example, if we take the sequence x 1 x 2 x 3 x 4 x 5 of the edges of our big cocycle, then for the subsequence x 1 x 2 x 3 x 4 we have that {x 1 , x 3 } and {x 2 , x 4 } are disparate in G ′′ , since the one-vertex paths v 1 and v 2 have no vertex in common.
As another example, take the sequence x 1 x 2 x 5 x 4 x 3 . Then for the subsequence x 1 x 2 x 5 x 4 we have that {x 1 , x 5 } and {x 2 , x 4 } are disparate in G ′′ , since the path v 1 v 5 and the one-vertex path v 2 have no vertex in common.
Up to renaming of indices, the sequences in these two examples are the only two different sorts of sequences with our first type of cocycle for K 3,3 . In our cocycle we have two kinds of edges: on the one hand, x 1 , x 2 , x 3 and x 4 , each adjacent on both ends with another edge of the cocycle, and on the other hand x 5 , adjacent on both ends with no other edge of the cocycle. In the first example, in {x 1 , x 3 } and {x 2 , x 4 } we have only edges of the first kind. In the second example, in {x 1 , x 5 } and {x 2 , x 4 } we have also the edge x 5 of the second kind. Since G ′ and G ′′ are isomorphic graphs, this exhausts all possibilities.
The second type of big cocycle with G being K 3,3 is given by the dotted edges in the following picture of G: This cocycle of G is not grounded in G. For example, if we take the sequence x 1 x 2 x 3 x 4 of the edges of our big cocycle, then for the subsequence x 1 x 2 x 3 x 4 (which is our sequence itself) we have that {x 1 , x 3 } and {x 2 , x 4 } are disparate in G ′′ , since the one-vertex paths v 1 and v 2 have no vertex in common.
As another example, take the sequence x 1 x 3 x 2 x 4 . Then for the subsequence x 1 x 3 x 2 x 4 we have that {x 1 , x 2 } and {x 3 , x 4 } are disparate in G ′ , since the paths u 1 u 2 and u 3 u 4 have no vertex in common.
Since the edges in our cocycle are of the same kind (unlike what we had with the previous type of cocycle, with five edges), up to renaming of indices the sequences in these two examples are the only kind of sequences with our second type of cocycle for K 3,3 . The cocycles that have G ′ with five vertices and G ′′ with a single vertex have three edges, and are hence not big. There are no other types of cocycle for K 3,3 .
If G is K 5 , then we have just two types of cocycles, and they are both big. The first type is given by the dotted edges in the following picture of G: This cocycle of G is not grounded in G. For example, if we take the sequence x 1 x 2 x 3 x 4 x 5 x 6 of the edges of our big cocycle, then for the subsequence x 2 x 3 x 4 x 5 we have that {x 2 , x 4 } and {x 3 , x 5 } are disparate in G ′′ , since the one-vertex paths v 1 and v 3 have no vertex in common.
As another example, take the sequence x 1 x 2 x 4 x 3 x 5 x 6 . Then for the subsequence x 2 x 4 x 3 x 5 we have that {x 2 , x 3 } and {x 4 , x 5 } are disparate in G ′ , since the one-vertex paths u 2 and u 4 have no vertex in common. Since all the edges in our cocycle are of the same kind, up to renaming of indices the sequences in these two examples are the only kinds of sequences with this first type of cocycle for K 5 .
The second type of big cocycle with G being K 5 is given by the dotted edges in the following picture of G: This cocycle of G is not grounded in G. For example, if we take the sequence x 1 x 2 x 3 x 4 of the edges of our big cocycle, then for the subsequence x 1 x 2 x 3 x 4 we have that {x 1 , x 3 } and {x 2 , x 4 } are disparate in G ′ , since the paths u 1 u 3 and u 2 u 4 have no vertex in common. In G ′ we have also that {x 1 , x 2 } and {x 3 , x 4 } are disparate, because the paths u 1 u 2 and u 3 u 4 have no vertex in common, while {x 1 , x 4 } and {x 2 , x 3 } are disparate because the paths u 1 u 4 and u 2 u 3 have no vertex in common. Since all the edges in our cocycle are of the same kind, up to renaming of indices the sequence in our example is the only kind of sequence with our second type of cocycle for K 5 . There are no other types of cocycle for K 5 .

Extending cocycles
Let G be a connected graph, let H be a connected subgraph of G, and let D be a cocycle of H. We will prove the following.
Lemma. There is a cocycle C of G such that D ⊆ C. If D is a big cocycle not grounded in H, then C is a big cocycle not grounded in G.
Proof. Let J be the induced subgraph (see [2], Chapter 2, for this notion) of G with the same set of vertices as H. Since H is connected, J must be connected too. We define first a cocycle E of J such that D ⊆ E. The cocycle E will be the set of all edges uv of J such that u is in H ′ and v is in H ′′ , where H ′ and H ′′ are the connected subgraphs of H obtained by removing D from H.
The remainder of the proof will be made by induction on the number n of vertices in G that are not in H. If n = 0, then G and H have the same sets of vertices, and G and J coincide. The cocycle C of the lemma will then be E.
Suppose for the induction hypothesis that K is an induced subgraph of G, that K is connected, that F is a cocycle of K such that D ⊆ F , and let there be a vertex of G not in K. Let the removal of F from K result in the connected subgraphs K ′ and K ′′ of K.
For every vertex u in G that is not in K consider the set L ′ u of edges uv of G with v a vertex of K ′ ; the set L ′′ u is defined in the same manner with respect to K ′′ . There must be a vertex u such that L ′ u ∪ L ′′ u = ∅, because G is connected. Let M be the graph obtained by adding to K such a vertex u and all the edges in L ′ u ∪ L ′′ u . We obtain a cocycle N of M by stipulating that N is It is clear that M is an induced subgraph of G, that M is connected, and that N is a cocycle of M such that D ⊆ N . So by induction we conclude that there is a cocycle C of G such that D ⊆ C.
If D is big, then C is, of course, also big. If D is not grounded in H, then for an arbitrary sequence of its members we have a subsequence x 1 x 2 x 3 x 4 such that {x 1 , x 3 } and {x 2 , x 4 } are disparate either in H ′ or in H ′′ . It is easy to conclude that {x 1 , x 3 } and {x 2 , x 4 } are hence disparate either in G ′ or in G ′′ , which are the subgraphs of G obtained by removing C from G. From that we conclude easily that C is not grounded in G. This concludes the proof of the Lemma.

Proof of the Theorem
For the proof of the right-to-left direction, i.e. the sufficiency direction, suppose a connected graph G is not planar. By Kuratowski's Theorem, there must be a subgraph H of G that is homeomorphic to either K 3,3 or K 5 . Since edge subdivision produces out of a cocycle that is not grounded in a graph at least one cocycle that is not grounded in the graph that results from the subdivision, we have that what is shown in Section 2 holds also for every graph H homeomorphic to K 3,3 or K 5 . Hence there is a big cocycle D of H that is not grounded in H. By the Lemma of Section 3, there is a big cocycle C of G that is not grounded in G.
For the proof of the left-to-right direction, i.e. the necessity direction, suppose G is a planar graph, with Γ being a plane graph realizing G. Let Γ * be the geometric dual (see [2], Chapter 11, for this notion) of Γ. For every big cocycle C of G, there is a cocycle K of Γ realizing C, and a cycle K * of Γ * such that the edges of K and the edges of K * correspond bijectively to each other by intersecting in a single point (see [1], Theorem 3, Section 2.2). The cycle K * gives a sequence of the members of K, and hence a sequence of the members of C.
For every subsequence x 1 x 2 x 3 x 4 of this sequence we have that {x 1 , x 3 } and {x 2 , x 4 } are disparate neither in G ′ nor in G ′′ . Otherwise, we would have in Γ two intersecting paths without common vertex (see Lemma 2 of [5]). So C is grounded in G. This concludes the proof of the Theorem.
There are necessary and sufficient conditions for planarity that are variants of the criterion in our theorem. One obtains these other criteria by restricting the big cocycles mentioned in the Theorem. For example, one may restrict them to big cocycles with at least five edges. This is because, as shown in Section 2, for G being either K 3,3 or K 5 there is one such big cocycle of G not grounded in G. It is clear for the Lemma of Section 3 that if D has at least five edges, then C has at least five edges. Other examples, according to what is shown in Section 2, are obtained by restricting ourselves to big cocycles such that both of the subgraphs G ′ and G ′′ have at least two vertices, or to big cocycles such that one of G ′ and G ′′ has a subgraph that is a cycle. These other restrictions, as the previous one, accord with the Lemma of Section 3. The last example, involving cycles, is related to a characterization of K 3,3 and K 5 that may be found in [6] (Lemma 3; see also [8], Lemma on the Kuratowski Graphs (2)).
These restricted variants of our criterion might be interesting from an algorithmic point of view. They may shorten a procedure for checking planarity.