A greedy algorithm for finding a large 2-matching on a random cubic graph

A 2-matching of a graph $G$ is a spanning subgraph with maximum degree two. The size of a 2-matching $U$ is the number of edges in $U$ and this is at least $n-\k(U)$ where $n$ is the number of vertices of $G$ and $\k$ denotes the number of components. In this paper, we analyze the performance of a greedy algorithm \textsc{2greedy} for finding a large 2-matching on a random 3-regular graph. We prove that with high probability, the algorithm outputs a 2-matching $U$ with $\k(U) = \tilde{\Theta}\of{n^{1/5}}$.


Introduction
In this paper we analyze the performance of a generalization of the well-known Karp-Sipser algorithm [13,12,1,4] for finding a large matching in a sparse random graph.A 2-matching U of a graph G is a spanning subgraph with maximum degree two.Our aim is to show that w.h.p. our algorithm finds a large 2-matching in a random cubic graph.The algorithm 2greedy is described below and has been partially analyzed on the random graph G δ≥3 n,cn , c ≥ 10 in Frieze [9].The random graph G δ≥3 n,m is chosen uniformly at random from the collection of all graphs that have n vertices, m edges and minimum degree δ(G) ≥ 3.In [9], the 2-matching output by the algorithm is used to find a Hamilton cycle in O(n 1.5+o (1) ) time w.h.p.Previously, the best known result for this model was that G δ≥3 n,cn is Hamiltonian for c ≥ 64 due to Bollobás, Cooper, Fenner and Frieze [7].It is conjectured that G δ≥3 n,cn is Hamiltonian w.h.p. for all c ≥ 3/2.The existence of Hamilton cycles in other random graph models with O(n) edges has also been the subject of much research.In such graphs, the requirement δ ≥ 3 is necessary to avoid three vertices of degree two sharing a common neighbor.This obvious obstruction occurs with positive probability in many models with O(n) edges and δ = 2. G 3-out is a random graph where each vertex chooses 3 neighbors uniformly at random.This graph has minimum degree 3 and average degree 6. Bohman and Frieze proved that G 3-out is Hamiltonian w.h.p. also by building a large 2-matching into a Hamilton cycle [3].Robinson and Wormald proved that r-regular graphs with r ≥ 3 are Hamiltonian w.h.p. using an intricate second moment approach [14], [15].Before this result, Frieze proved Hamiltonicity of r-regular graphs w.h.p. for r ≥ 85 using an algorithmic approach [10].An algorithmic proof of Hamiltonicity for r ≥ 3 was given in [11].
In addition to the Hamiltonicity of G δ≥3 n,cn for 3/2 < c < 10, the Hamiltonicity of random graphs with O(n) edges and a fixed degree sequence is a widely open question.One natural example is the Hamiltonicity of a graph chosen uniformly at random from all the collection of all graphs with n/2 vertices of degree 3 and n/2 vertices of degree 4 (this particular question was posed by Wormald).For both G δ≥3 n,cn and graphs with a fixed degree sequence one might hope to prove Hamiltonicity by first using 2greedy to produce a large 2-matching and then using an extension rotation argument to convert this 2-matching into a Hamilton cycle.In this paper we provide evidence that the first half of this broad program is feasible by showing that 2greedy finds a very large 2-matching for the sparsest of the models with minimum degree 3, the random cubic graph itself.
The size of a 2-matching U is the number of edges in U and this is at least n − κ(U ) where κ denotes the number of components.It was shown in [12] that w.h.p. the Karp-Sipser algorithm only leaves Θ(n 1/5 ) vertices unmatched.Here we prove the corresponding result for 2greedy on a random cubic graph.
We prove Theorem 1.1 using the differential equations method for establishing dynamic concentration.The remainder of the paper is organized as follows.The 2greedy algorithm is introduced in the next Section, and the random variables we track are given in Section 3. The trajectories that we expect these variables to follow are given in Section 4. A heuristic explanation of why 2greedy should produce a 2-matching with roughly n 1/5 components is also given in Section 4. In Section 5 we state and prove our dynamic concentration result.The proof of Thereom 1.1 is then completed in Sections 5, 6, and 7.

The Algorithm
The Karp-Sipser algorithm for finding a large matching in a sparse random graph is essentially the greedy algorithm, with one slight modification that makes a big difference.While there are vertices of degree one in the graph, the algorithm adds to the matching an edge incident with such a vertex.Otherwise, the algorithm chooses a random edge to add to the matching.The idea is that no mistakes are made while pendant edges are chosen since such edges are always contained in some maximum matching.The algorithm presented in [9] is a generalization of Karp-Sipser for 2-matchings.Our algorithm is essentially the same as that presented in [9] applied to random cubic graphs.A few slight modifications have been made to ease the analysis and to account for the change in model.We assume that our input (multi-)graph G = G([n], E) is generated by the configuration model of Bollobas [6].Let W = [3n] be our set of configuration points and let Given a pairing F (i.e. a partition of W into m = 3n/2 pairs) we obtain a (multi-)graph G F with vertex set [n] and an edge (φ(u), φ(v)) for each {u, v} ∈ F .Choosing a pairing F uniformly at random from among all possible pairings Ω of the points of W produces a random (multi-)graph G F .It is known that conditional on G F being simple, i.e. having no loops or multiple edges, that it is equally likely to be any (simple) cubic graph.Further, G F is simple with probability (1 − o( 1))e −2 .So from now on we work with G = G F .
We only reveal adjacencies (pairings) of G F as the need arises in the algorithm.As the algorithm progresses, it grows a 2-matching and deletes vertices and edges from the input graph G.We let Γ = (V Γ , E Γ ) be the current state of G. Throughout the algorithm we keep track of the following: • U is the set of edges of the current 2-matching.The internal vertices and edges of the paths and cycles in U will have been deleted from Γ.
• b(v) is the 0-1 indicator for vertex v ∈ [n] being adjacent to an edge of U .
We refer to the sets Y 3 and Z 2 as Y and Z throughout.The basic idea of the algorithm is as follows.We add edges to the 2-matching one by one, which sometimes forces us to delete edges.These deletions may put vertices in danger of having degree less than 2 in the final 2-matching.Thus, we prioritize the edges that we add to U , so as to match the dangerous vertices first.More precisely, At each iteration of the algorithm, a vertex v is chosen and an adjacent edge is added to U .We choose v from the first non-empty set in the following list: Y 1 , Y 2 , Z 1 , Y, Z.As in the Karp-Sipser algorithm, taking edges adjacent to the vertices in Y 1 , Y 2 and Z 1 is not a mistake.We will prove that by proceeding in this manner, we do not create too many components.
When a vertex v is chosen and its neighbor in the configuration is exposed it is called a selection move.Call the revealed neighbor, w the selection.The edge (v, w) is removed from Γ and added to U .If the selction w is a vertex in Z, then once (v, w) is added to U , we must delete the other edge adjacent to w. Hence we reveal the other edge in the configuration adjacent to w.Call this exposure a deletion move.
Details of the algorithm are now given.

Algorithm 2Greedy:
Initially, all vertices are in Y .Iterate the following steps as long as one of the conditions holds.
Choose a random vertex v of Y 1 .Suppose its neighbor in Γ is w.Remove (v, w) from Γ and add it to U .Set b(v) = 1 and move v to Z 0 .re-assign(w). Step Choose a random vertex v of Y 2 .Randomly choose one of the two neighbors of v in Γ to expose and call it w.
If w = v ({v} comprises an isolated component in Γ with a loop), then remove (v, v) from Γ and move v from Y 2 to Y 0 .
Otherwise, remove (v, w) from Γ and add it to U .Set b(v) = 1 and move it to Z 1 .re-assign(w). Step Choose a random vertex v of Z 1 .v is the endpoint of a path in U .Let u be the other endpoint of this path.Suppose the neighbor of v in Γ is w.Remove (v, w) from Γ and add it to U .Remove v from Γ.

re-assign(w).
Step 2 Choose a random vertex v of Y .Randomly choose one of the three neighbors of v in Γ to expose and call it w.
Otherwise, remove (v, w) from Γ and add it to U .Set b(v) = 1 and move it to Z.

re-assign(w).
Step 3 The remaining graph is a random 2-regular graph on |Z| many vertices.Put a maximum matching on the remaining graph.Add the edges of this matching to U .
Subroutine re-assign(w): 1.If b(w) = 0: Set b(w) = 1 and move w from Y to Z, Y 2 to Z 1 or Y 1 to Z 0 depending on the initial state of w.

If b(w) = 1:
Remove w from Γ.If w was in Z prior to removal, then the removal of w from Γ causes an edge (w, w ′ ), to be deleted from Γ. Move w ′ to the appropriate new set.For example, if w ′ were in Z, it would be moved to Z 1 ; if w ′ were in Y , it would be moved to Y 2 , etc.

The Variables
In this section we will describe the variables which are tracked as the algorithm proceeds.Throughout the paper, in a slight abuse of notation, we let Y, Z, etc. refer to both the sets and the size of the set.Let M refer to the size of E Γ .We also define the variable If X is a variable indexed by i, we define ∆X(i) := X(i + 1) − X(i).

The sequences σ, δ
We define two sequences σ, δ indexed by the step number i. σ(i) will indicate what type of vertex is selected during a selection move, and δ(i) will do the same for deletion moves.
Formally, σ is a sequence of the following symbols: Y, Z, ζ, loop, multi.We will put σ(i) = loop only when step i is of type 2 and the selection move reveals a loop.We put σ(i) = multi only when step i is of type 1(c), and w = u ∈ Z.The only way this happens is when v ∈ Z 1 , u ∈ Z, (v, u) ∈ U , and the selection made at step i happens to select the vertex u.Otherwise we just put Note that the symbols loop, multi are for very specific events, and not just any loop or multiedge.If step i is of type 1(b) and our selection move reveals a loop, then we put σ(i) = ζ.Also, if step i is of type 1(c) and the selection move reveals a multi-edge whose other endpoint is also in δ is a sequence of symbols: Y, Z, ζ, ∅.We will put δ(i) = ∅ when there is no deletion move at step i (i.e. when σ(i) / ∈ {Z, multi}).Otherwise δ(i) just indicates the type of vertex that the deletion move picks (here we don't make any distinctions regarding loops or multi-edges).

The variables A, B
We will define the following two important variables: A is a natural quantity to define, since the algorithm terminates precisely when A = 0. B is also natural because it represents the number of half-edges which will (optimistically) be added to our current 2-matching before termination.We will see that A and B are also nice variables in that their 1-step changes ∆A(i), ∆B(i) do not depend on what type of step we take at step i.We have and note that these all depend on whether ζ = 0 (i.e.whether step i is of type 1 or 2).However, which do not depend on whether ζ = 0.For ∆A, we have used the identity which states that we make a deletion move if and only if our selection move was Z or multi.Note also that if we establish dynamic concentration on A, B, ζ then we implicitly establish concentration on Y, Z, M since 4 The expected behavior of A, B, ζ In this section, we we will non-rigorously predict the behavior of the variables and some facts about the process.Throughout the paper, unless otherwise specified, t refers to the scaled version of i, so Heuristically, we assume there exist differentiable functions a, b such that Further, we assume that ζ stays "small".We will prove that these assumptions are indeed valid.We also let where we have omitted the dependence on i for ease of notation.

The trajectory b(t)
Since B(0) = 2n, and recalling (3.5), we see that The probability that σ(j) = loop or δ(j) = ζ on any step j should be negligible.Thus we expect

The trajectory a(t)
We derive an ODE that a should satisfy: .
Note that we have used (3.4).Thus a(t) should satisfy 2) The substitution x = a 1−t yields a separable ODE, which can be integrated to arrive at So a(t) is given implicitly as the solution to the above cubic equation with coefficients depending on t.We may actually solve that cubic to get three continuous explicit functions a 1 (t), a 2 (t), a 3 (t) (though the formulas are nasty to look at).From the initial condition a(0) = 1 and the fact that 0 ≤ a(t) ≤ 1, it's clear that the solution we want is (5 + 4t) From here we can see that a(t) → 0 as t → 1 − .More precisely, lim To confirm this, note that arccos (1 Rewriting the cos term using the angle addition formula and Taylor expansion, we see (4.3).Additionally, Since a(0) = 1, for all 0 ≤ t ≤ 1 we have 2 3 3 2

Downward drift of ζ
We expect ζ to be "small", and to justify that claim we will show that whenever ζ is positive, it is likely to decrease.Assume that ζ(i) > 0. In the following table, we make use of the fact that δ(i) = ∅ if and only if σ(i) ∈ {Z, multi}.So for example, To illuminate this table, we provide an example.
Therefore, roughly speaking we have and are motivated to define

Expected behavior of ζ
In the last subsection we estimated E[∆ζ(i)] when ζ > 0, using (4.8).We can also use (4.8) to estimate the variance when ζ > 0. We see that . Thus, to model the behavior of ζ(i) we consider a simpler variable: a lazy random walk X τ (k) with There is at least constant (bounded away from 0) probability that X τ (s) is, say, 1 standard deviation above its mean.However, the probability that X τ (s) is very many standard deviations larger than that is negligible.In other words, it is reasonable to have a displacement as large as , where we have . Now we reconsider the variable ζ.Roughly speaking, ζ(i) behaves like the lazy random walk considered above, so long as we restrict the variable i to a short range (so that t does not change significantly), and we have ζ(i) > 0 for this range of i.We have ζ(0) = 0, and ζ has a negative drift so it's likely that ζ(j) = 0 for many j > 0. Specifically, if j is an index such that ζ(j) = 0, then we expect ζ(i) to behave like X τ (i − j) with τ = j n , so long as i is not significantly larger than j.Thus we expect to have . But this rough analysis does not make sense toward the end of the process: indeed, for j > n − n 3 5 (i.e. for 1 − τ < n − 2 5 ), we have j + (1 − t) − 3 2 > n.However, we can still say something about what happens when j is large, since the variable s cannot be any bigger than n − j.Now for j ≥ n − n 3 5 and s ≤ n − j we have ψ(s) ≤ n 1 5 .Thus, we never expect ζ to be larger than n 1 5 , even towards the end of the process.

many components?
At any step of the algorithm, we expect the components of the 2-matching to be mostly paths (and a few cycles).We would like the algorithm to keep making the paths longer, but sometimes it isn't possible to make a path any longer because of deletion moves.Specifically, for example, if one endpoint of a path is in Z 1 , and then there is a deletion move and the deletion is that endpoint, then that end of the path will never grow.If the same thing happens to the other endpoint of the path, then the path will never get longer, and will never be connected to any of the other paths.Similarly, the number of components in the final 2-matching is increased whenever the algorithm deletes a Y 1 or a Y 2 .Thus we can bound the number of components in the final 2-matching by bounding the number of steps i such that δ(i) = ζ.
. So integrating, we estimate the total number of components as

The stopping time T and dynamic concentration
In this section, we introduce a stopping time T , before which A and B stay close to their trajectories, and ζ does roughly what we expect it to do.We will also introduce "error" terms for both A, B and a "correction" term α for the variable A. For most of the process, α will stay smaller than the error term for A. However, toward the end of the process α will be significant.Using α in our calculations thus allows us to track the process farther.As it turns out, the variable B does not need an analogous "correction" term.
We define the following random variables which represent "actual error" in A, B: We define the stopping time T as the minimum of n − C T n 7 15 log 6 5 n and the first step i such that any of the three following conditions fail: ) and for every step j < i such that ζ is positive on steps j, . . ., i, for some as-yet unspecified error functions f a , f b , ℓ j and absolute constant C T .Throughout the paper we will use C ? to refer to unspecified but existent absolute constants.In subsection 5.6, we present actual values for these constants.
We anticipate that the conditions on ζ will imply that for some function f ζ we have for all i ≤ T .Our goal for now is to prove that for some suitable error functions, w.h.p.T is not triggered by any of the conditions (5.1), (5.2), (5.3).The remainder of this section contains the proof of Theorem 5.1.Here we define the error functions f a , f b , f ζ (up to the choice of constants).While these definitions are not very enlightening at this point, they will aid the reader in confirming many of the calculations that appear below.Those same calculations will motivate the choice of these functions. (5.4) (5.6)

A useful lemma
We'll use the following simple lemma several times to estimate fractions.

T is not triggered by A
We define and let the stopping time T j be the maximum of j, T , and the least index i ≥ j such that e a (i) is not in the critical interval [g a (t), f a (t)] (5.7) where 0 < g a < f a is an as-yet unspecified function of n, t.Our strategy is to show that w.h.p.A never goes above na + α + f a because every time e a enters the critical interval, w.h.p. it does not exit the interval at the top.The use of critical intervals in a similar context was first introduced in [5].
Let F i be the natural filtration of the process (so conditioning on F i tells us the values of all the variables, among other things).
For i < T , we have from (3.4) that The last equality follows from Lemma 5.2.Note that the lemma actually implies that the big-O term includes mixed products of terms like α • f ζ for example.We have simplified by using the fact that for all real numbers x and y, |xy| ≤ 1 2 x 2 + y 2 .We are now motivated to cancel out the ζ term in the last line by recursively defining α(0) := 0 (5.8) (5.9) From this definition and the defintion of f ζ , it follows that for i ≤ T , n n 1/5 log 9/5 n for n − n 3/5 log 2/5 n < i ≤ T.
(5.10) as long as (5.11) Now for j ≤ i < T j , we have the supermartingale condition Note that in the last line we have used (5.9), the fact that e a ≥ g a , and also that a satisfies the differential equation (4.2).By taking g a = Ω (f a ), we see that A + (j), . . ., A + (T j ) is a supermartingale since which dominates the big-O term in (5.13).
We use the following asymmetric version of the Azuma-Hoeffding inequality (for a proof see [2]): Lemma 5.3.Let X j be a supermartingale, such that −C ≤ ∆X(j) ≤ c for all j, for c < C 10 .Then for any a < cm we have This follows from analysis of the function a(t).So for the supermartingale A + (j) • • • A + (T j ).Thus, if A crosses its upper boundary at the stopping time T , then there is some step j (with T = T j ) such that and A + (T j ) > 0. In this case, j is intended to represent the step when e a enters the crtical interval, (5.7).Applying the lemma we see that the probability of the supermartingale A + having such a large upward deviation has probability at most exp As there are O (n) supermartingales A + (j), . . ., A + (T j ), we must choose f a , g a to make the above probability o 1 n .The following choice suffices: as long as the constant C A is chosen so that If we define then we may prove that A − stays positive w.h.p. in a completely analogous fashion.

T is not triggered by ζ
Referring to (4.8), we may say that if Now, before T we have (5.16) In the last step we have cleaned up the big-O using the facts For every step j, we define a stopping time where h j is some function we will choose that will make ζ + j (i) a supermartingale.Now for j ≤ i < T j , using (5.16), we have (5.19) so the choice makes the sequence a supermartingale as long as the constant C h is chosen so that Since h j j n = 0, we will always have ζ + j (j) = ζ(j).We'll use the following supermartingale inequality due to Freedman [8]: Lemma 5.4.Let X i be a supermartingale, with ∆X i ≤ C for all i, and V (i Referring to (4.8), before T we can put and note that before T , we have for some constant C py such that T .
Suppose the variable ζ triggers the stopping time T .Then there are steps j < i = T such that ζ > 0 all the way from step j to step i, and ζ + j (i) > ℓ j (t) − h j (t).We'll need to apply the lemma to the supermartingale ζ + j to show this event has low probability (guiding our choice for ℓ j ).Note that in the lemma we can plug in the following for v: So the unlikely event has probability at most exp As there are O n 2 pairs of steps j, i we'd like to make the above probability o 1 n 2 .Towards this end we consider 2 cases.
n, then it suffices to put ℓ j − h j = C ℓ log n as long as (5.23) (i − j) With this choice, w.h.p.T is not triggered by ζ.

An upper bound on ζ
In this section we'll motivate our choice of the function f ζ .
Lemma 5.5.W.h.p. for all j < n − 2C 2 5 x n 3 5 log 2 5 n such that ζ(j − 1) = 0, we have Also, using (4.3) and the defintion of b, Plugging in the value of ℓ j (t), we have that for any i ≥ j such that ζ(j) . . .ζ(i) are all positive, x (5.25) 2 .As long as C x > 1 and j < n−2C 2 5 x n j > log n so we can evaluate the "max" in ℓ j .Also note that the coefficient of x is dominated by − 1 6 n 1 − j n , so the coefficient of x is at most, say − 1 7 n 1 − j n .Thus (5.25) gives which is negative for this range of j as long as we pick C x such that (5.26) Therefore, ζ must have hit 0 again before step i = j + nx j .This proves the first part of the lemma.
To prove the second part, consider (5.25) for j < i < j + nx j (i.e. for 0 < x < x j ).If and for x larger than that, we'll put where to justify the second line we use the inequality c √ x−dx ≤ c 2 4d for real numbers x, c, d > 0.
We would also like to say something about ζ(i) for i > n − 2C 2 5 x n Proof.Suppose step j ′ ≥ n − 2C 2 5 x n x + 2 So in particular we can say that for i ≤ T we have where x + 2 so we can put We'll apply Lemma 5.4 to −B − .Note that before T we can put and therefore, referring to V (i) as in Lemma 5.4, .
So for v we will plug in which is an upper bound on V (i) as long as where L is a positive contstant large enough that for all i 0 ≤ i ≤ i end p z (i)p y (i) ≥ w(i) − Ln −2/5 log n, p z (i)p y (i) + p z (i) 2 ≥ 1 − w(i) − 2Ln −2/5 log n and p z (i)p y (i) + p z (i) 2 + p y (i) ≥ 1 − 3Ln −2/5 log n.
We will split the time range i 0 to i end into d = log n many chunks of length n 3/5 log −2 n.Recall that i 0 = n − n 3/5 and for all 1 ≤ ℓ ≤ d define i ℓ = i ℓ−1 + n 3/5 log −2 n.
For 0 ≤ ℓ < d, we define a martingale starting at i ℓ to be We also have that V ar[X(i)|F i−1 ] = Θ n 2/5 log −2 n .
Further, using the fact that for the expression for V ℓ is completely deterministic, we may choose γ(n, ℓ) such that γ(n, ℓ) < V ℓ < γ(n, ℓ)+o(γ(n, ℓ)).By using the facts about a(t) and b(t) presented in Section 4, we may take γ(n, ℓ) = C ℓ n 2/5 log −2 n for come constant C ℓ .Note here that there is an absolute constant c such that C ℓ ≤ c for all 0 ≤ ℓ < d.
Hence applying Lemma 7.2 to S ℓ with stopping time i ℓ+1 , we see that

Theorem 5 . 1 .
With high probability,T = n − C T n

Lemma 5 . 6 .
There exists a constant C ζ such that w.h.p. for all i ≤ T we have ζ(i) ≤ C ζ n

5 . 5 T
is not triggered by B Recall from (4.1) that e b