{'fraction_non_alphanumeric': 0.04896851716266851, 'fraction_numerical': 0.011326930531030621, 'mean_word_length': 3.4525407478427614, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On minimal graphs containing k perfect matchings

We call a finite undirected graph minimally k-matchable if it has at least k distinct perfect matchings but deleting any edge results in a graph which has not. An odd subdivision of some graph G is any graph obtained by replacing every edge of G by a path of odd length connecting its end vertices such that all these paths are internally disjoint. We prove that for every k>0 there exists a finite set of graphs S(k) such that every minimally k-matchable graph is isomorphic to a disjoint union of an odd subdivision of some graph from S(k) and any number of copies of the complete graph on two vertices.


Introduction
All graphs considered here are supposed to be finite and undirected unless stated otherwise, and they may contain multiple edges but no loops. For terminology not defined here, we refer to [1] or [2]. A matching of G is a set M of edges of G such that every vertex of G is end vertex of at most one member of M , and M is called a perfect matching of G if every vertex of G is end vertex of exactly one member of M . By M(G) we denote the set of perfect matchings of G. A graph is k-matchable if |M(G)| ≥ k, and it is called minimally k-matchable if it is kmatchable but, for every e ∈ E(G), G − e is not. An odd subdivision (sometimes called a totally odd subdivision) of a graph G is any graph obtained from G by replacing every e edge with a path of odd length (possibly 1) connecting the end vertices of e such that all these paths are pairwise internally disjoint. In particular, G is an odd subdivision of itself. Our main result is the following.
Theorem 1 For every k ≥ 1 there exists a finite set of graphs G k such that every minimally k-matchable graph is isomorphic to the disjoint union of an odd subdivision of some graph from G k and any number of copies of K 2 .
It is easy to see that the minimally 1-matchable graphs are just disjoint unions of any number (perhaps 0) of copies of K 2 , and that the minimally 2-matchable graphs are disjoint unions of a single cycle C of even length ≥ 2 and any number of copies of K 2 . So Theorem 1 holds with G 1 = ∅, and for G 2 = {C 2 }. However, the situation gets more complex for larger k, not only in terms of an increasing size of the sets G k ; for example, the classes of minimally k-matchable graphs need not even to be disjoint for distinct k: The disjoint union G of two even cycles has four perfect matchings, but deleting any edge results in a graph which has only two perfect matchings; therefore, G is minimally 4-matchable and, at the same time, minimally 3-matchable.
There are some results on graphs with a fixed number of perfect matchings. For example it is known that for every positive integer k there exists a constant c k such that the maximum number of edges of a simple graph with n vertices, n even and large enough, and with exactly k perfect matchings is equal to n 2 /4+c k [3], where c k ≤ k and c k is positive for k > 1 [5]. Another "extremal" result of a similar flavour states that for every simple graph G on n vertices and m edges there exists a graph H on n vertices and m edges with |M(H)| ≤ |M(G)| such that H is a threshold graph, that is, it admits a clique K such that the vertices from V (H) \ K are independent and their neighborhoods form a chain with respect to ⊆. This has been used to determine the minimum number of perfect matchings in a simple graph on n vertices and m edges [4]; although being a minimizing result at first glance, that number is trivially 0 if m ≤ n 2 − (n − 1), so that the interesting part of the analysis is concerned with extremely dense graphs. Among the few structural results on graphs with a fixed or even only a small number of perfect matchings let us mention Lovász's Cathedral Theorem (see Chapter 5 in [8]), which characterizes the maximal graphs having exactly k perfect matchings, and Kotzig's classic theorem that every connected graph with a unique perfect matching admits a bridge from that matching [6]. The latter theorem has been used recently to prove that a graph G without three pairwise nonadjacent vertices and exactly one optimal coloring (in terms of the chromatic number) has a shallow clique minor of order at least |V (G)|/2 [7], which supports Seymour's conjecture that every graph G without three pairwise nonadjacent vertices in general admits a shallow clique minor of order at least |V (G)|/2. By getting more structural insight into graphs (and also hypergraphs) with only a few perfect matchings -as provided by our main result -it may be possible to generalize the results from [7].
Let us close this section with two simple observations. First note that every edge incident with some vertex x in a minimally k-matchable graph must be contained in at least one perfect matching; since every perfect matching contains exactly one edge incident with x, the degree of x, and, hence, the maximum degree of G, is bounded from above by |M(G)|. As we have seen above, the number of perfect matchings of a minimally k-matchable graph G can be larger than k, but the following Lemma bounds it by 2k − 2 (and bounds, at the same time, the maximum degree ∆(G) of G by k).
Proof. Let x be a vertex of degree d := d G (x) ≥ 2, and let J be the set of edges of G incident with x; so |J| = d. For e ∈ J, let m e denote the number of perfect matchings from |M(G)| containing e. Consequently, |M(G)| = e∈J m e =: s. Since G − e has s − m e perfect matchings and G is minimally k-matchable, we get s − m e ≤ k − 1. Taking the sum over all e ∈ J on both sides we get d · s − s ≤ d · (k − 1), from which the statement of the Lemma follows. Since d/(d − 1) is decreasing for increasing d, it is maximal for d = 2, implying |M(G)| ≤ 2k − 2. Since s ≥ k by assumption to G we derive d G (x) ≤ k for all vertices and hence ∆(G) ≤ k.
The following Lemma implies easily the formally stronger version of Theorem 1 that for every k ≥ 1 there exists a finite set of graphs G k such that a graph is minimally k-matchable if and only if it is isomorphic to the disjoint union of an odd subdivision of some graph from G k and any number of copies of K 2 . Proof. Suppose that G has been obtained from H by disjointly adding a single copy of K 2 , and let e be the edge of that K 2 . One checks readily that

Proof of Theorem 1
For a path P and vertices a, b from P , let aP b denote the subpath of P connecting a and b. We apply this notion to some cycles as well; to this end, such a cycle C comes with a fixed orientation, and for vertices a = b from C, aCb is the subpath from a to b of C following that orientation; we also refer to aCb as the a, b-segment along C. By C −1 , we denote the cycle C with the orientation opposite to the given one (so the a, b-segment along C is the b, a-segment along C −1 ). R := P 1 . . . P k denotes the union (concatenation) of the paths P 1 , . . . , P k . If the P j are described as subpaths of larger paths or segments along cycles by their end vertices, say, P i = a i Q i b i , and if b i = a i+1 then we list only one of b i , a i+1 in the description of R; for example, we write aP bQc instead of aP bbQc. In all cases, R will be a path or a cycle.
is a perfect matching, too, and we call it the matching obtained from M by exchanging along C. If N is another perfect matching then a path P is called N, M -alternating if N is a perfect matching of P and E(P ) \ N ⊆ M ; that is, P starts and ends with an edge of N and if f, g are consecutive on P then f ∈ N ∧g ∈ M or f ∈ M ∧g ∈ N .
Proof of Theorem 1. We do induction on k. The statement is obviously true for k = 1, take G 1 = ∅. Let G be a minimally (k + 1)-matchable graph. We may assume that G is not an odd subdivision of some smaller graph, and that no component of G is isomorphic to K 2 . Since ∆(G) ≤ k + 1 by Lemma 1, it suffices to find an upper bound for |V (G)| in terms of k.
G contains a spanning minimally k-matchable subgraph H. By induction, H is the disjoint union of an odd subdivision of some graph from G k and some number of copies of K 2 . Let Since G k is finite by induction, it suffices to bound the length of the subdivision paths in H and (which is much easier) the number of copies of K 2 in terms of k from above. If F is empty then this is obvious; G is then one of the graphs from G k . Hence it suffices to consider the case that F = ∅, implying N = ∅. Claim 1. F ⊆ N. In particular, F is a matching, and no perfect matching of G contains at least one but not all edges of F . Suppose, to the contrary, that there exist e ∈ F and N ∈ N such that e ∈ N . Deviant from standard notion, a chord of C is an N, M -alternating (odd) path having only its end vertices in common with C. Observe that for every edge e ∈ N \ E(C) incident with at least one vertex from C there exists a chord starting with e. Let P be a chord, and let a, b be its endvertices on C. Both a, b are incident with a unique oriented edge e, f , respectively, from M . If both a, b are initial vertices of e, f , respectively, then we call P an out-chord, if they P Q R C Figure 1: An out-chord P , an in-chord Q, and an odd chord R along the cycle C. Edges from the perfect matching M are displayed fat and, on C, oriented according to the direction of C. Non-fat edges on the chords are necessarily from one and the same matching N , whereas non-fat edges on C may be anywhere outside M . Q and R cross, whereas P, Q and P, R do not cross. R together with the lower segment along C starting at R's endvertices forms another Malternating cycle.
are both terminal vertices then we call P an in-chord, and in the other cases P is called an odd chord. P is external if it contains at least one edge from F (which is then from N ), and internal otherwise. P crosses a chord Q if the end vertices of Q are in distinct components of C − {a, b}; in that case, Q crosses P , too. See Figure 1 for an example.
Claim 2. If P is an odd external chord then it is the only external chord. P can be extended to an M -alternating cycle by (exactly) one of the two paths connecting its end vertices in C. The perfect matching obtained from M by exchanging along this cycle would contain the edges from E(P ) ∩ N but no other edges from F ; it is from N (see, for example, the odd chord R in Figure  1), so that, by Claim 1, F ⊆ E(P ) ∩ N follows; in particular, there cannot be another external chord. This proves Claim 2.
Claim 3. Suppose that some in-chord P crosses some out-chord Q. Then either both P, Q are internal, or there are no external chords distinct from P, Q. P ∪Q can be extended to an M -alternating cycle along C by (exactly) one of the two linkages connecting their end vertices in C (see Figure 2). The matching M obtained from M by exchanging along this cycle would contain the edges from (E(P ) ∪ E(Q)) ∩ N but no other edges from F ; if not both P, Q are internal, then M is from N, so that, by Claim 1, F ⊆ (E(P ) ∪ E(Q)) ∩ N follows; in particular, there cannot be another external chord except for P, Q. This proves  We now turn to a more specific situation concerning C. Suppose that D = x 0 x 1 . . . x is a subpath of C of length ≥ 6 whose vertices have degree 2 in H. We will show that if is large then we find a large number of M -alternating cycles in G, each with an edge not in any of the others, from which we can construct a very large number of perfect matchings in G, contradicting Lemma 1.
If D contained an edge of N then by Claim 1 both of its endvertices have degree 2 in G, and from this it (easily) follows that G is an odd subdivision of a smaller graph, which has been excluded initially. Therefore, D contains no edges from N . Since N is a perfect matching, every internal vertex x i of D (that is: i ∈ {1, . . . , − 1}) is the end vertex of an external chord, say, P i . By Claim 2, these chords are in-or out-chords, and P i is an in-chord if and only if P i+1 is an out-chord, for all i ∈ {1, . . . , − 2}. By Claim 3, P i and P i+1 do not cross, implying that P i and P j are distinct and do not cross, for all i = j from {1, . . . , − 1}. In particular, there are at least three external chords; Claim 2 thus implies that there are no external odd chords at all, and Claim 3 implies that, in general, an in-chord and an out-chord cannot cross unless they are both internal. Suppose that some chord R crosses three of the P i . Then it crosses three consecutive of them, say P i−1 , P i , P i+1 . Since at least one among them is an in-chord and at least one is an out-chord, R must be an odd chord by Claim 3 and, thus, internal by Claim 2. R extends to an M -alternating cycle as follows: P i+1 P i−1 R P i Figure 3: Three consecutive chords P i−1 , P i , P i+1 crossed by a (long, horizontal) odd chord R. P i−1 and P i+1 are in-chords, P i is an out-chord. The resulting M -alternating cycle is underlayed in grey. We get similar pictures if P i−1 , P i+1 were out-chords and P i was an in-chord, or if the edges from M on C incident with the end vertices of R were actually in the upper half. The picture does not determine the location of x i−1 , x i , x i+1 ; if they are on the upper part of the picture then the x i−1 , x i -segment and the x i , x i+1 -segment along C each consist of a single edge only (whereas the picture suggests that these may be longer segments).
We extend R along its outgoing edge of M along C until we meet the first inchord among P i−1 , P i , P i+1 , follow that in-chord, exit it via its second in-edge on C, follow C opposite to its given orientation until we meet the next chord among P i−1 , P i , P i+1 , which is an out-chord, traverse that out-chord, exit via its second out-edge on C, and close by traversing C in its given orientation until we meet R (see Figure 3 for an example). By exchanging M along this cycle we get a matching which contains the N -edges of two but not of all external chords, violating Claim 1. This proves Claim 4.
Let y i denote the end vertex of P i distinct from x i , and let S i denote the (closed) y i+1 y i -segment along C.
Claim 5. Let i ∈ {2, − 2}. If P i is an out-chord then it is crossed by an internal odd chord or it is crossed by an out-chord with end vertices in S i−1 and S i . If P i is an in-chord then it is crossed by an internal odd chord or it is crossed by an in-chord with end vertices in S i−1 and S i . Suppose first that P i is an out-chord. The y i , x i -segment D along C has an odd number of vertices. An even number among them is covered by edges from N ∩ E(C), so that an odd number among them is incident with an edge from N not on C, i. e. with an end edge of some external chord. Since both x i , y i are of the latter kind, there must be and odd number and, hence, at least one chord Q starting in the interior of D and ending in V (C) \ V (D), that is, Q crosses P i . If Q is odd then it is internal by Claim 2. Otherwise, Q must be an out-chord by Claim 3. Again by Claim 3, Q cannot cross the external in-chords P i−1 or P i+1 , so that its end vertices are in S i−1 and S i . This proves the first part of Claim 5, and, symmetrically, the second part follows. Observe that x i+2 x i+3 ∈ M by construction. If P i+2 or P i+3 is crossed by an internal odd chord S then its end vertices are in S i ∪ S i+1 ∪ S i+2 ∪ S i+3 ∪ S i+4 by Claim 5; hence the unique M -alternating cycle in C ∪ S containing S verifies Claim 6 in this case. Hence we may suppose that neither P i+2 nor P i+3 is crossed by an internal odd chord. If there was an internal odd chord S with some end vertex in S i+2 then its other end vertex would be in S i+2 , too, and the unique M -alternating cycle in C ∪ S containing S verified Claim 6 again. Hence all chords with end vertices in S i+2 are in-chords or out-chords. ( * ) Suppose that there is an in-or out-chord Q with both end vertices in S i+2 . Take it in such a way that the distance of its end vertices is as small as possible in the graph S i+2 . Let a and b be the end vertices of Q. Exactly one of a, b is incident with an edge from M ∩E(aS i+2 b). Without loss of generality, let it be a; there is an M, N -alternating subpath of aS i+2 b starting with a, and we take a maximal one, say S; its end vertex c distinct from a is an internal vertex of aS i+2 b, and by maximality of S the edge e from N incident with c is not in E(C); observe that e = bc since the edge from N incident with b is on Q. Hence there is a chord R with end vertex c, and R = Q. It must either be an in-chord or an out-chord by ( * ) as c ∈ S i+2 , and since S is an M, N -alternating path, we know that R is an in-chord if Q is an out-chord and R is an out-chord if Q is an in-chord. By choice of Q, the end vertex d of R distinct from c is not in aS i+2 b, so that Q, R cross. If Q is an in-chord then bQaScRdC −1 b is the desired M -alternating cycle: In that case, R is an out-chord, so it cannot cross the external in-chords P i+3 and P i+1 , implying d ∈ S i+1 ∪ S i+2 ), and both of Q, R are internal by Claim 3. If, otherwise, Q is an out-chord then, symmetrically, bQaScRdC −1 b is the desired M -alternating cycle.
Hence all chords with some end vertex in S i+2 must cross P i+2 or P i+3 . P i+2 is an out-chord, so that, by Claim 5 and ( * ), it is crossed by an out-chord Q with end vertices b ∈ S i+1 and a ∈ S i+2 ; a is adjacent with an edge from M ∩ E(aS i+2 b). As in the previous paragraph, there exists a maximal M, Nalternating path in aS i+2 b starting with a and ending with a vertex c = a. Since y i+2 is end vertex of an out-chord, we see that c is an inner vertex of aCy i+2 . As above, there is an in-chord R with end vertex c. R crosses either P i+2 or P i+3 , but it cannot cross the external out-chord P i+2 , so that it must cross P i+3 . But then the end vertex d of R distinct from c is in S i+3 as R cannot cross the external out-chord P i+2 . It follows that Q, R cross, so they are internal by Claim 3, and bQaScRdC −1 b (where d is the end vertex of R distinct from c) is the desired cycle. Figure 4 illustrates the process. This proves Claim 6.
S i+1 . , x i+5 are consecutive on C, so there is "no space" for the end vertices of chords other than P i , . . . , P i+5 "in between" them. Some labels are omitted. Now consider an arbitrary path x 0 , . . . , x of vertices of degree 2 in G and observe that it is contained in some M -alternating cycle C, to which we apply the considerations following Claim 1. We construct an upper bound for in terms of k. There exists a d such that − 1 ≥ 6d + 1 but − 1 < 6(d + 1) + 1. Then for has at most 2k − 2 perfect matchings, so that 2 d ≤ 2k − 2, that is, d ≤ log 2 (k − 1) + 1. It follows ≤ 6(d + 1) ≤ 6 log 2 (k − 1) + 12.
Recall that H is the disjoint union of an odd subdivision of some graph from G k , say, H 0 , and some number, say q, of copies of K 2 . Suppose that e is the edge of one of the latter copies of K 2 , and let us assume, to the contrary, that e had no parallel edges in G. If one of the endvertices had degree 1 in G then e would be contained in every perfect matching of G; if there was an edge f = e incident with e then it cannot be contained in any perfect matching of G, so that M(G − f ) = M(G), contradiction; therefore, both endvertices in G had degree 1, contradicting the initial assumption that G has no components isomorphic to K 2 . Consequently, both end vertices of e were incident with edges from F , which is a matching by Claim 1. By assumption to e, these edges were distinct, and both end vertices of e had degree 2 in G; from this it easily follows that G is an odd subdivision of some smaller graph, contradiction. Therefore, every edge forming a copy of K 2 in H must have at least one -and, hence, exactly one -parallel in G, so that G had at least 2 q perfect matchings; it follows that 2 q ≤ 2k by Lemma 1, implying q ≤ log 2 k + 1.

Minimally 3-matchable graphs
Let us finish by describing the set G 3 by specializing (and, thus, partly illustrating) the ideas of the proof of Theorem 1. We may assume that G ∈ G 3 is minimally 3-matchable, i.e.
G is not an odd subdivision of some smaller graph, ( †) and that no component of G is isomorphic to K 2 . G contains a spanning minimally 2-matchable subgraph H, and, according to Claim 1, F := E(G) − E(H) is a (not necessarily perfect) matching. As G 2 = {C 2 }, H is the disjoint union of an even cycle H 0 and q copies of K 2 . By repeating the arguments in the end of the proof of Theorem 1 we see that any of these copies must have exactly one parallel edge in G. As H 0 has two matchings we see that q ≤ 1, for otherwise G had at least 8 matchings, contradicting Lemma 1. Moreover, if q = 1 then there is no edge e ∈ F connecting two vertices from H 0 , for otherwise G − e contained two disjoint even cycles and thus still had four matchings; in that case we deduce that G consists of two disjoint 2-cycles.
If, otherwise, q = 0, then H = H 0 , and there must be at least one edge e ∈ F connecting two distinct vertices from H in G (as H has only two perfect matchings). In order to apply the chord notion of the previous section, let us take a matching M of H and another matching N not from H, and fix an orientation of H (= C). If e forms and external odd chord then H + e already contains three disjoint matchings, so that H +e = G, and, by ( †), G is the graph on two vertices with three parallel edges, sometimes called the theta graph (see also Claim 2 above). So we may assume without loss of generality that all edges from F constitute external in-or out-chords. We take e = xy such that the length of the x, y-segment along C = H is minimized. Without loss of generality, e is an out-chord (otherwise we reverse the orientations and x, y). There exists a maximal subpath P of S of starting at x with the out-edge from M and then alternately using edges from N and M . Its endvertex z distinct from x is an interior vertex of S and its final edge is again from M . Hence there exists an edge g from F constituting an in-chord. By choice of e, g crosses e. Now it follows (as in Claim 3), that there are no further external chords at all. Consequently, by ( †), G is the complete graph K 4 . Hence we proved: Theorem 2 Every minimally 3-matchable graph is isomorphic to the disjoint union of any number of copies of K 2 and either two 2-cycles, or an odd subdivision of the theta graph, or an odd subdivision K 4 .
It is possible to restate Theorem 1 and its specializations in terms of chambers as used in connection with Lovász's Cathedral Theorem (see Chapter 5 in [8]). Let us do this for Theorem 2. According to [5], a chamber is the vertex set of a connected component of the spanning subgraph H := (V (G), M(G)) formed by all edges of perfect matchings. Now if G is a graph with exactly three perfect matchings we know that H is minimally 3-matchable, so that, apart from chambers spanned by edges in all three matchings, G has either two further chambers spanned by an even cycle each, or a single further chamber spanned by a totally odd subdivision of the theta graph, or a single further chamber spanned by an odd subdivision of K 4 . Analogously, one could think of Theorem 1 as a classification theorem for graphs with exactly k perfect matchings.