{'fraction_non_alphanumeric': 0.045891328402539164, 'fraction_numerical': 0.018111932910139187, 'mean_word_length': 3.622341857335128, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 8, '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}}
Graph colouring and the total Betti number

The total Betti number of the independence complex of a graph is an intriguing graph invariant. Kalai and Meshulam have raised the question on its relation to cycles and the chromatic number of a graph, and a recent conjecture on that theme was proved by Bonamy, Charbit and Thomasse. We show an upper bound on the total Betti number in terms of the number of vertex disjoint cycles in a graph. The main technique is discrete Morse theory and building poset maps. Ramanujan graphs with arbitrary chromatic number and girth log(n) is a classical construction. We show that any subgraph of them with less than n^0.003 vertices have smaller total Betti number than some planar graph of the same order, although it is part of a graph with high chromatic number.


Introduction
Independence complexes of graphs provide an interesting link between graph theory and algebraic topology. Any (reasonable) CW-complex can be turned into an independence complex by further triangulations and studied with graph theory; conversely we can try to understand graph theoretic notions using algebraic topology.
The independence complex Ind(G) of a graph G is the simplicial complex given by its independent sets and its total Betti number is Many papers in both mathematics and physics have been written to understand b(G), see for example [1,2,4,9,11,13]. Kalai and Meshulam [15] have asked if the chromatic number of a graph is linked to subgraphs with high total Betti number. One beautiful trial balloon towards this was a conjecture just verified by Bonamy, Charbit and Thomassé [3]: Graphs with large chromatic number induce 3k-cycles. The connection is that b(C n ) is 2 if n is divisible by three, and 1 otherwise.
In this paper we continue the study the path of understanding the connection between b(G) and the cycle and colouring structure of G. An explicit corollary of our main result is that if G is a graph with at most k ≥ 2 vertex disjoint cycles, then b(G) ≤ 1 + √ 5 2 (2+o(1))k log k . Ramanujan graphs of order n and chromatic number at least χ have a girth of at least order log n 3 log χ . Any subgraphs of that order would have b(G) ≤ 1 and be useless to detect a high chromatic number. We show that the subgraphs with less than log n 3 log χ n 0.003(log χ) −1 vertices also have too low b(G), because there is a planar graph of the same order with higher total Betti number.
Our results on the total Betti number all builds on creating discrete Morse functions in a combinatorial way, and using that b(G) ≤ c(G) where c(G) is the minimal number of critical cells in an acyclic matching on the face poset of the independence complex of the graph G. In Section 2 we introduce and prove basic results on how to compute inequalities for c(G) by splitting G into other graphs. In Section 3 we then apply that together with techniques from Voss' proof [19] of the Erdös-Pósa theorem to prove our main results, which is an exact version of the corollary stated above. This also involves some cute enumerative combinatorics on Lucas numbers. In Section 4 we recall Ramanujan graphs and insert its parameters in our general result and compare it to results on planar lattices.

Discrete Morse theory 2.1 Basic discrete Morse theory
In this section we review some elementary results about discrete Morse theory and introduce one piece of new notation in Definition 2.3. A simplicial complex on a set V , which in this paper always is finite, is a set ∆ of subsets of V that is closed under taking subsets. In particular, if ∆ is not the empty set, then it contains the empty set. We regard simplicial complexes as they are, and do not follow the practice of some topologists to remove the empty set. The boolean lattice on V induces a poset structure on ∆ by inclusion, and we also denote the (face) poset by ∆. An element covers another one in a poset if it is strictly larger, but minimal with that property. For a set S let S k be the set of subsets of S of cardinality k. A matching M on ∆ is a subset of ∆ 2 satisfying that -if {σ, τ } ∈ M then τ covers σ in the poset ∆ (or the other way around) -and if m 1 , m 2 ∈ M and m 1 ∩ m 2 = ∅ then m 1 = m 2 .
A sequence of distinct elements {σ 1 ⊂ τ 1 }, . . . , {σ n ⊂ τ n } of a matching M on ∆ with n > 1 is a cycle if τ i ⊃ σ i+1 for each 1 ≤ i < n and τ n ⊃ σ 1 . A matching is acyclic (also called a Morse matching) if there are no cycles in it. The elements not contained in a matching are called critical. If there are no critical elements the matching is complete. This follows from the fundamental theorem of Discrete Morse theory. There are several efficient ways to construct acyclic matching and the following conceptual and elementary one was introduced in Jonsson's PhD thesis [12] and attributed to Björner. . If no M q contains a cycle, then M is acyclic.

Basic independent sets and their complexes
In this text a graph G is a set of vertices V G and a set of edges E G ⊆ VG 2 . A subset I of vertices is independent if e ⊆ I for no edge e ∈ E G . Any subset of an independent set is also independent. The set of independent subsets of a graph G is Ind(G), and it is a simplicial complex on V G called the independence complex of G. The neighbourhood of a vertex v in a graph G is N G (v) = {u ∈ V g | {u, v} ∈ E G }.

Morse matchings on independence complexes of graphs
Now we derive some useful results to recursively build large acyclic matchings on independence complexes of graphs. None of these results are essentially new, see [5,6,7,12,13], but since we can provide better and very short proofs today, they are included. Proof. There only element of Ind(G) is ∅ and every pair in a matching reduces the number of critical elements by two.  Proof. Let the edge be uv. Employ Lemma 2.6 and note that c(G \ u) = 0 by Lemma 2.5 since v is an isolated vertex and that H = G \ ({u} ∪ N (u)).
Proof. Note that G \ ({u} ∪ N (u)) has the isolated vertex v and use Lemma 2.5 and Lemma 2.6.
Proof. We do induction on the number of edges of G. First the base case of no edges in G. Then it follows from Lemma 2.4 and Lemma 2.5. Now the case of edges in G. If there is an isolated edge then it follows from Lemma 2.7 and induction. If there are no isolated edges, then there is a vertex v that is a leaf of the forest G incident to an edge vw. The vertex w is incident to another edge wu because otherwise vw would be an isolated edge. Now N (v) ⊆ N (u) and by Lemma 2.8 the vertex u can be folded away, and we are done by induction. This is a slightly weaker version than the main theorem of [6].
Proposition 2.10. Let G be a graph with a subset U of vertices whose deletion removes all cycles. Then c(G) ≤ 2 #U .

Proof. Employ Lemma 2.6 for every vertex in
where all the c() ≤ 1 are derived from Proposition 2.9.
The following useful lemma does in a sense extend the previous ones about isolated vertices and edges that had straightforward proofs. For a simplicial complex ∆ with an acyclic matching L we construct a new poset ∆/L by identifying all elements matched by L. This becomes a poset when L is acyclic without further identifications exactly when L is acyclic. Note that there is a natural poset map ∆ → ∆/L whose fibers are critical elements and matchings.

Independence complexes of graphs with a given number of vertex disjoint cycles
We start by deriving an enumerative lemma required later on. The Fibonacci numbers are defined by ϕ(0) = 0, ϕ(1) = 1 and ϕ(n) = ϕ(n−1)+ϕ(n−2) for any integers n, and the Lucas numbers are defined by ℓ(n) = ϕ(n − 1) + ϕ(n + 1). We have defined these numbers for all integers, including the negative ones. For n > 1 the Lucas number ℓ(n) is the integer closest to ( 1+ √ 5 2 ) n . Note that ϕ(n) ≥ 0 for n ≥ −1 and the recursion can be formulated by matrices as The Lucas numbers enumerates matchings on cycles and this can be viewed as a generalisation of that. Proof. The proof is by induction on n. For any sequence (s 1 , s 2 ) there is at least one element of {0, 1} 2 that is not allowed, and the cardinality of the set is at most 2 2 − 1 = 3 = ℓ(2). Now n > 2. If s i = 1 for some i, then x i = x i+1 (and similarly in the case i = n) and we have a projection down to the case n − 1. By induction and ℓ(n − 1) ≤ ℓ(n) this case is done. Remaining is the case of all s i = 1. If s i = 0 then and if s i = 2 then This shows that the cardinality of the set in question is Tr(A 1 A 2 · · · A n ) where each A i is one of the 2 × 2 matrices determined by the value of s i . It remains to show that the trace is at most ℓ(n) for n > 2. For integers i, j, k, l ≥ 1 elementary Fibonacci number manipulations shows that which is non-negative in all entries. By repeated application of this to bundle up the matrices by type, we have that where m is the number of zeros in the given sequence s and n − m is the number of twos in it. As m goes from 0 to n in the right hand side of the previous inequality one gets a row of the Lucas triangle [14], whose top part looks like this: 2  1  1  3  2  3  4  3  3  4  7  5  6  5  7  11  8  9  9  8  11 Each row of the Lucas triangle is maximised on the boundary, where it is the Lucas number ℓ(n).
In the proof of Lemma 3.1 two 2 × 2 matrices are related by a non-standard transposition. Except for that, the trace inequality is very similar to the first part of Dyson's proof of the Golden-Thompson inequality [10]. Small computer calculations supports that there is nothing particular with the matrices in the proof, except that they are related by the non-standard transposition. Now we turn to applying discrete Morse theory to independence complexes of graphs. The girth of a graph is the length of its shortest cycle. In graphs of minimum degree three and a bounded number of vertex disjoint cycles the girth is also bounded. We modify a constructive graph theoretic approach by Voss [19] to estimate the girth. For our approach this is more suitable than the commonly cited work by Simonovits [18].
Definition 3.2. The effective girth of a graph G is the smallest number of vertices of degree at least three on a common cycle. For integers k ≥ 1 let g(k) be the maximal effective girth of a graph of minimal degree at least two with at most k vertex disjoint cycles. Proposition 3.3. g(1) = 4, g(2) = 6, g(3) = 8; g(k) ≤ (2 + o(1)) log 2 (k) and g(k) ≤ 2 + 2 log 2 1 + k i=1 g(i) for k > 1.
Proof. This was proved by Voss [19] where it is stated for the girth of graphs of minimal degree three. Proof. Let N be the set of n vertices on C that are allowed to be adjacent to vertices of G \ C. Enumerate them v 1 , v 2 , . . . , v n clockwise around C and let t i be then number of vertices between v i and v i+1 going clockwise from v i to v i+1 . Also let t n be the number of vertices going clockwise from v n to v 1 . Consider the poset map φ : Ind(G) → Ind (G[N ]). We want to construct an acylic matching on each fiber and then glue them together. The elements σ ∈ Ind(G[N ]) can be encoded as sequences (y 1 , . . . , y n ) ∈ {0, 1} n by y i = 1 if and only if v i ∈ σ. Then the fiber of σ is isomorphic to the independence complex of a disjoint union of (1) a path on t 1 − y 1 − y 2 vertices, (2) a path on t 2 − y 2 − y 3 vertices, . . . By repeated use of Lemmas 2.5, 2.7, 2.8 one can see that c(P n ) = 0 if n ≡ 1(3) and c(P n ) = 1 otherwise, where P n is a path on n vertices. By assumption c(H) ≤ c. By Lemma 2.11 we have an acyclic matching on the fiber with at most c critical cells if all of the path lengths are not equal to one modulo three. If a single one of them is equal to one modulo three, then we have an acyclic matching without critical cells. Relaxing this problem to sum up over all (y 1 , . . . , y n ) ∈ {0, 1} n , and removing the modulo three symmetries, we get the set stated in Lemma 3.1 and the factor ℓ(n) counting fibers with at most c critical cells. By Lemma 2.2 there is an acyclic matching on Ind(G) with at most cℓ(n) critical cells.
Proof. The proof is by induction on k. If k = 0 then G is a forest and c(G) ≤ 1. Now k > 0. By repeated use of Lemma 2.8 vertices can be folded away from G to reach a subgraph G ′ such that c(G) ≤ c(G ′ ) and each vertex of degree one in G ′ is on an isolated edge. If G ′ is a disjoint union of isolated vertices and edges, then c(G ′ ) ≤ 1 by Lemmas 2.5 and 2.7. Otherwise G ′ is a disjoint union of isolated vertices, isolated edges, and a subgraph G ′′ of minimal degree at least two, and c(G ′ ) ≤ c(G ′′ ) by Lemmas 2.5, 2.7 and 2.11.
In G ′′ there is an induced cycle C with at most g(k) vertices of C adjacent to vertices of G ′′ \ C according to Proposition 3.3, and by Theorem 3.4, where c(H) ≤ c should be satisfied for all induced subgraphs H of G ′′ . Any such H has at most k − 1 vertex disjoint cycles and by induction c ≤ ℓ(g(1))ℓ(g (2)) · · · ℓ(g(k − 1)).
Corollary 3.6. If G is a graph with at most k ≥ 2 vertex disjoint cycles, then The graph consisting of k disjoint copies of K 5 shows that this bound cannot be improved beyond 4 k . We believe that the correct exponent should be k log k rather than k. Essentially this should be able to achieve by combining the probabilistic lower bound of the Erdös-Pósa theorem [8] with Euler-characteristic calculations, since the homology should be concentrated in one dimension for a random independent complex. The resulting calculations should be doable with methods from statistical physics. Unfortunately we haven't been able to rigourously perform those calculations at this point.
The upper bound in Erdös-Pósa theorem gives an upper bound on the number of vertices that has to be removed from a graph to turn it acyclic, given that it has at most k vertex disjoint cycles. The main theorem of [6] by Engström provides an upper bound on the dimension of the total cohomology of the independence complex of a graph, given the number of vertices required to be removed to turn it acyclic. Combining those two theorems gives a bound like in Corollary 3.6 but much worse.
For a graph G without cycles we know that b(G) ≤ 1 is optimal. The next case is easy. Proposition 3.7. Let G be a graph without two vertex disjoint cycles. Then b(G) ≤ 4, and it is optimal.
Proof. As in the proof of Theorem 3.5 only graphs of minimal degree at least two needs to be considered. We can also assume that G is connected and not acyclic. Let G * be the graph attained from G by the iterative contractions that replaces each vertex of degree two and its two incident edges by one edge. The minimal degree of G * is at least three.
If there is a triangle in G * , then c(G) ≤ 1 · ℓ(3) = 4 by Theorem 3.4. If there isn't a triangle in G * , then by a straight forward exercise one can see that G * is isomorphic to a complete bipartite graph K 3,t with t ≥ 3. Let u and v be two different vertices of G that after the contractions to G * are still left, and they are in the part with 3 vertices. Removing u and v from G gives an acyclic graph, and by Proposition 2.10 applied to them, c(G) ≤ 2 2 = 4.
The graph K 5 shows that it's optimal.

Ramanujan graphs
Good conditions to show strong lower bounds for the chromatic number is very hard to attain in general and several attacks have been made from topological combinatorics. A very interesting approach have been lifted by Kalai and Meshulam: Can a lower bound for the chromatic number of a graph be derived from that one of its subgraphs have a high total Betti number? In this section we show that there are Ramanujan graphs with arbitrary high chromatic numbers whose all small subgraphs have low total Betti number. This could be interpreted as that large enough subgraphs need to be inspected using Betti numbers to determine the chromatic number. It is quite obvious that one needs to pass a barrier of log N vertices to understand the chromatic number of order N graphs, since the girth can be pushed to that order for arbitrary chromatic number. We show that at least N α vertices for some α > 0 is necessary to find subgraphs with high enough Betti numbers.
The following optimal expanders were constructed by Lubotzky, Phillips and Sarnak [16]. See Nesetril [17] for an accessible survey on their properties as listed here.
Theorem 4.1. For primes p and q with Legendre symbol ( p q ) = 1 and q sufficiently large, there are Ramanujan graphs X p,q with q(q 2 − 1)/2 vertices, girth at least 2 log p q and chromatic number at least p+1 2 √ p . Proof. Let P be a convex piece of the hexagonal dimer lattice in Figure 1 of Adamaszek's paper [1], and H a convex piece of that. The b(P ) estimate is from Proposition 4.1 of that paper.
Any subgraph on m vertices of X p,q would have at most m 2 log p q vertex disjoint cycles due to the bound on the girth. Applying Corollary 3.6 to it and comparing with the bound in the previous proposition proves the following. Proposition 4.3. Let χ be a positive integer. There is a Ramanujan graph G of order n and chromatic number at least χ, and a planar graph P of order n, such that for every subgraph G ′ of G with at most log 2 n 3 log 2 χ n 0.003(log 2 χ) −1 vertices, there is a subgraph P ′ of P of the same order as G ′ with b(P ′ ) > b(G ′ ).