The sum-free process

$S \subseteq \mathbb{Z}_{2n}$ is said to be sum-free if $S$ has no solution to the equation $a+b=c$. The sum-free process on $\mathbb{Z}_{2n}$ starts with $S:=\emptyset$, and iteratively inserts elements of $\mathbb{Z}_{2n}$, where each inserted element is chosen uniformly at random from the set of all elements that could be inserted while maintaining that $S$ is sum-free. We prove a lower bound (which holds with high probability) on the final size of $S$, which matches a more general result of Bennett and Bohman, and also matches the order of a sharp threshold result proved by Balogh, Morris and Samotij. We also show that the set $S$ produced by the process has a particular non-pseudorandom property, which is in contrast with several known results about the random greedy independent set process on hypergraphs.


Introduction
Let H be a hypergraph. A set of vertices S ⊂ V (H) is called independent if S contains no edge of H. The random greedy algorithm for independent sets starts with S = ∅, and then randomly inserts elements into S so long as S remains independent. Specifically, at the i th step, we put S := S ∪ {v i } where v i is chosen uniformly at random from all vertices v such that S ∪ {v} is independent (we halt when there are no such vertices v). The algorithm terminates with a maximal independent set.
One notable instance of this algorithm is the H-free process for any fixed k-uniform hypergraph H (where k ≥ 2 so H might be a graph). The process starts with an empty hypergraph on vertex set [n], and iteratively inserts randomly chosen hyperedges so long as we never create a subhypergraph isomorphic to H. The H-free process can be viewed as an instance of the random greedy independent set algorithm running on a hypergraph H with vertex set [n] k , where each edge of the hypergraph H corresponds to a subset of [n] k forming a copy of H. Bohman [5] analyzed the H-free process when H is the graph K 3 , determining (up to a constant) how long the process lasts , and bounding the independence number of the final graph formed. Bohman's analysis of the process included information about the independence number of the graph produced, and gave a second proof that the Ramsey number R (3, t) is Ω t 2 log t . In the same paper, Bohman considered the K 4 -free process and improved the best known lower bound on R(4, t). Bohman and Keevash [6] went on to analyze the H-free process for many other graphs H, resulting in new lower bounds on R(s, t) for fixed s ≥ 5, and new lower bounds on the Turán numbers of certain bipartite graphs. More recently, Bohman and Keevash [7], and independently Fiz Pontiveros, Griffiths, and Morris [9] proved that the K 3 -free process terminates with 1 2 √ 2 + o(1) log 1/2 n · n 3/2 edges (and also gave better bounds on the indpendence number of the graph produced by the K 3 -free process). Other specific instances of Hfree processes have been further studied, on some of which there are upper and lower bounds (matching up to a constant factor) on the final size of the graph, notably the K 4 -free process by Warnke [14] and independently Wolfovitz [16]; the C ℓ -free process by Warnke [13] and independently Picollelli [12]; and the (K 4 − e)-free process (also known as the diamond-free process) by Picollelli [11]. With Bohman, the author in [3] considers the independent set process on a general class of hypergraphs, and proved a lower bound (on the size of the final independent set) which generalizes many of the known lower bounds for specific hypergraphs. The general bound in [3] applies to some instances of the H-free process where H is a hypergraph, as well as the k-AP-free process (which chooses elements of Z n while avoiding a k-term arithmetic progression). Theorem 1.1. Let r and ǫ > 0 be fixed. Let H be a r-uniform, D-regular hypergraph on N vertices such that D > N ǫ . Define the degree of a set A ⊂ V (H) to be the number of edges of H that contain A. For a = 2, . . . , r − 1 we define ∆ a (H) to be the maximum degree of A over A ∈ V a . We also define the b-codegree of a pair of distinct vertices v, v ′ to be the number of edges e, e ′ ∈ H such that v ∈ e \ e ′ , v ′ ∈ e ′ \ e and |e ∩ e ′ | = b. We let Γ b (H) be the maximum b-codegree of H. and then the random greedy independent set algorithm produces an independent set S in H with The indpendent sets produced by the algorithm tend to have pseudorandom properties. For example, the K 3 -free process produces a graph whose independence number is roughly the same as it would be in a random graph with the same edge density ( [5], [7], [9]), and for any fixed K 3 -free graph G, the number of copies of G in the graph produced by the K 3 -free process is roughly the same as it would be in a random graph with the same edge density (see [17]). [3] also has a pseudorandom type result for the independent sets produced by the algorithm, which generalized Wolfovitz's result and which they used to bound the Gowers norm of the set produced by the k-AP-free process. We state this result from [3] now. Theorem 1.2. Fix s and a s-uniform hypergraph G on vertex set V (H) (i..e the same vertex set as the hypergraph H). We let X G be the number of edges in G that are contained in the independent set produced at the i th step of the random greedy process on H. Set p = p(i) = i/N and let i max be the lower bound (3) on the size of the independent set given by the random greedy algorithm given in Theorem 1.1. If no edge of G contains an edge of H, i < i max is fixed, |G|p s → ∞ and ∆ a (G) = o(p a |G|) for a = 1, . . . , s − 1 then with high probability.
This paper addresses the sum-free process. In this process we look for a set S ⊂ Z 2n such that S has no solutions to the equation a + b = c. Define our edge set E to be the family of all solutions {a, b, c} to a + b = c (Such edges {a, b, c} are called Schur triples). Note that {a, b, c} may have 1, 2, or 3 distinct elements. We write the generic form {a, b, c} with the understanding that if, say, b = c then we mean the set {a, b} and not a multiset with two copies of b. Thus, S is sum-free if and only if S is an independent set in the hypergraph H with vertex set Z 2n and edge set E. H is not uniform but almost all of the edges have size 3. Indeed, each vertex v = 0 is in O(1) edges of size 2 and no edge of size 1. Theorem 1.1 cannot be applied directly to the sum-free process, since H is not quite uniform, and also not quite regular. However it is nearly uniform and nearly regular, and these issues alone would not present much difficulty in the analysis. But there is a more crucial way in which H fails to satisfy the hypotheses of Theorem 1.1: the codegree condition (2). Consider the vertices v and −v for v = 0, n. Each of v, −v is in about D = Θ(n) edges, but the 2-codegree of v, −v is also Θ(n) since whenever we have the equation v + b = c we also have the equation −v + c = b. Thus, one of the points of interest in this paper is to see how to overcome this issue.
The largest sum-free subset of Z 2n is the set consisting of the odd numbers. Indeed, Balogh, Morris, and Samotij in [2] proved that p = log n 3n 1/2 is a sharp threshold above which we have the following: if G p is a random subset of Z 2n where each element is included with probability p independently, then w.h.p. the largest sum-free subset of G p is simply the set of its odd elements. Roughly speaking, the fact that odd + odd = even imposes a very specific structure on maximum sum-free subsets of random sets in Z 2n . However, this special structure ceases to be relevant for very sparse random sets in Z 2n .
Our main theorem is as follows: Theorem 1.3. With high probability, the sum-free process run on Z 2n produces a set of size at least i 0 := 1 6 n 1/2 log 1/2 n.
We conjecture that a matching (up to a constant factor) upper bound holds, since intuitively the sum-free process should not produce sets that have density larger than the threshold in [2].
Another point of interest in this paper is to demonstrate a non-pseudorandom statistic of the set S produced by the sum-free process (in contrast to all the pseudorandom results concerning other instances of the hypergraph independent set process). It turns out that the set S tends to contain a large number of pairs v, −v, much larger than one would expect in a (uniformly chosen) random set of size |S|. Indeed, if |S| = Θ(n 1/2 log 1/2 n) were chosen uniformly at random, then we would expect S to contain Θ(log n) pairs v, −v. However, as we will see in the last section of the paper, the number of such pairs in S actually grows like a power of n.
Our analysis of the sum-free process on Z 2n easily extends to Z 2n+1 with no substantial changes. Note that Z 2n+1 also has linear-sized sum-free subsets (e.g. the set of all odd numbers less than n). However, since there is no result analogous to [2] for Z 2n+1 , we work in Z 2n .

The Algorithm and Associated Random Variables
The random greedy algorithm for sum-free sets starts with a sum-free set S(0) := ∅, and a set Q(0) of elements that may be inserted into the S(0) without spoiling the sum-free property. Since 0 + 0 = 0, the element 0 cannot be part of any sum-free set. Any singleton except for {0} is sum-free, so Q(0) = Z 2n \ {0}. At step i, the algorithm selects an element s(i) uniformly at random from Q(i) and puts S(i + 1) := S(i) ∪ {s(i)}. The algorithm then determines Q(i + 1), the set of elements that could potentially be inserted in S(i + 1) without spoiling the sum-free property. If Q(i + 1) is empty, the algorithm terminates with a maximal sum-free set.
We call the elements of S(i) chosen, the elements of Q(i) open, and all other elements of Z 2n closed. As we noted above, at the start of the algorithm 0 is closed and every other element is open.
We will define several more random variables which (roughly speaking) represent the degrees of vertices. We will partition the set of edges containing v according to what role v plays in the corresponding equation and v is on the right side of the equation. We also define the random variable Several of the variables we just defined take two arguments (a vertex v and the step i). Sometimes for shorthand we will suppress the i.

Heuristically anticipating the trajectories
We use some heuristics to anticipate the likely values of the random variables throughout the process. Intuitively, we will mostly assume that certain aspects of the hypergraph H(i) are the same as what they would be if S(i) were a set of i uniformly chosen random elements (rather than having been chosen to satisfy the sum-free property), each chosen with probability i/2n. In other words we are using a heuristic assumption of pseudorandomness to guess the trajectories of our variables as the process evolves. But due to the special relationship between v and −v in this hypergraph, we will have to be careful about assuming independence: we will see that u and v behave almost independently except when u = −v. Furthermore, the relationship between v and −v will cause the vertex 0 to behave completely differently from other vertices.
Since v is in about 3n edges and these edges do not interact pathologically (e.g. almost all pairs of these edges are disjoint other than v), We would like to guess the probability that both u and v are open. We should be careful to take possible correlations into account, so we imagine that we know u is open and consider the effect on the probability v is open. It turns out that the relevant thing to look for is pairs of edges e ∋ u, e ′ ∋ v with |e ∩ e ′ | = 2. The pairs with |e ∩ e ′ | = 2 are worrisome since if one of u, v gets closed by one of the edges then the other vertex also gets closed automatically. On the other hand since we know u is open we already know that v does not get closed via any such edge. But since there are few such edges, knowing that u is open does not affect many of v's chances to get closed. We estimate the probability that both u and v are open to be so heuristically u and v behave independently. Thus we are ready to make the following predictions for v = 0 (note that the probability that an element is in S is i/2n = t/2n 1/2 ): Note that we are using our heuristic assumption of independence, for example when we say D 3,R (v) ≈ np 2 and it is important to note that since v = 0, v is not in any equation Here we can begin to see the mildly pathological behavior of this process emerge: if −v is open then v is more likely to be open. We make the prediction Thus we make the prediction which we note is larger than our prediction for D 2,R (v) for any v = 0. Roughly speaking this means that if −v is chosen then it is more likely v will stay open for longer than it otherwise would, and intuitively this should mean that v is more likely to eventually be chosen, so we should end up with a lot of pairs {v, −v} in S. We will now see that this is the case. We predict the value of D 1,R (0). At each step, the variable D 1,R (0) either stays the same or increases by 1. The probability of increasing is integrating the above expression gives the prediction: The variables D 1,R (v) for v = 0 will be much smaller, and we will prove that later.
We finish this section with a general conjecture about the random greedy algorithm for independent sets in hypergraphs. This conjecture ought to apply to all sufficiently "nice" (almost uniform, almost regular, not too sparse) hypergraphs. In general, the algorithm should terminate soon after the number of open elements is negligible compared to the number we've already chosen. Our conjecture is that we can predict when this happens using the heuristically derived trajectory for Q.
Conjecture 3.1. The step i at which the random greedy independent set algorithm terminates w.h.p. is asymptotically the value i such that Q ≈ i. In particular, the sum-free process terminates when 2np ≈ n 1/2 t, so when Even proving the lower bound of the conjecture presents considerable difficulty, particularly due to the fact that we suspect D 1,R (0) becomes larger than D 2 (v) by that time (see equation (5) to see why this would wreak havoc on our present analysis of the process).

Proof Overview
We appeal to the usual differential equations method to establish dynamic concentration of the random variables around the trajectories we heuristically derived. See Wormald's survey [18] for a nice introduction to the standard method and a general theorem about random variables following trajectories given by differential equations. See also Warnke's note [15] for a nice short proof of a stronger version of Wormald's general theorem. In the standard differential equations method we define a "good event" stipulating that our random variables are close to their trajectories, and a family of martingales such that if a random variable strays far from its trajectory then one of our martingales has a large deviation, which is unlikely. This method is employed by many of the previously mentioned papers including [1,3,5,6,7,9,11,12,13,14,16,17]. For two more more recent uses of the method see Bohman and Warnke [8] as well as Bennett, Dudek and Zerbib [4]. Our present proof most resembles [5].
A note on checking the variation equations: they can be verified in a straightforward (though perhaps a bit tedious) manner as follows. On the left side of the inequality, plug in the values of all of the functions. There will be a common power of n, a power of log n and a power of p that can be factored out of everything, leaving a factor which is just a polynomial in t. That polynomial will have no positive coefficients and so we just bound it using its constant term (which is valid since t ≥ 0). For example, to verify (12), note that Note that the bounds in (4) give tight estimates (i.e. accurate to within a multiplicative factor of (1 + o(1))) for all our random variables. Indeed, first note that we have p(t(i 0 )) = n −1/48 . Then, for example, note that we have f 3 =Θ p −4 n 3/4 = o(np 2 ) and so the first bound in (4) tells us that D 3,L = (1 + o(1))2np 2 . Similarly all the error terms in (4) are much smaller than their respective corresponding main terms.

Preliminaries
In this section we prove several bounds that are necessary for our calculations. Most of these bounds are used to justify big-O terms later.
For v = 0, we anticipate D 2 (v) ≈ D 2,L (v) + D 2,R (v). But to make this estimate valid we need to bound the number of q ∈ Q such that q = v and there are two edges e 1 , e 2 ∈ D 2,L (v) ∪ D 2,R (v) such that q ∈ e 1 , e 2 . Note that v is only in O(1) many edges of size 2, so let us assume |e 1 | = |e 2 | = 3. In other words, for some s 1 , s 2 ∈ S we have e j = {v, q, s j }. There are cases to consider, according to how the corresponding equations are arranged. Without loss of generality we have one of the following cases: 1. v + s 1 = q and v + q = s 2 . Then s 1 + s 2 = 2v (so we have {s 1 , s 2 } ∈ D 1,R (2v)).
Thus, before stopping time T we have We now show that if v = 0 then v does not get closed too many times. Note that D 1,L (v) only increases in size on steps when we choose an element of D 2,L (v), and on such steps D 1,L (v) can increase by at most 2. Before the stopping time T , we have that ). An application of the Chernoff bound then tells us that R does not get bigger than log 2 n w.h.p., and thus the stopping time T does not happen due to the condition on D 1,L (v). Bounding D 1,R (v) is similar.
We now bound the size of D 2 (v 1 ) ∩ D 2 (v 2 ), for v 1 , v 2 = 0, v 1 = ±v 2 . Again, each of v 1 , v 2 is only in O(1) many edges of size 2, so we assume edges have size 3. Then for each q ∈ D 2 (v 1 ) ∩ D 2 (v 2 ) there is a pair s 1 , s 2 ∈ S such that both {v 1 , s 1 , q} and {v 2 , s 2 , q} are in E. There are cases to consider according to how each of the equations is arranged, but in each case we reach one of the following conclusions: {v 1 +v 2 , s 1 , s 2 } ∈ E, {v 1 − v 2 , s 1 , s 2 } ∈ E, or {v 2 − v 1 , s 1 , s 2 } ∈ E. Thus, by our bounds on the sizes of sets of the form D 1,L and D 1,R we have, for v 1 , v 2 = 0, v 1 = ±v 2 that To finish this section, we present a couple of lemmas which we will use several times to estimate things. The following lemma will be used to estimate fractions based on estimates of the numerator and denominator.

Tracking the D 2 variables
In this section we prove dynamic concentration of the D 2 -type variables. We start with For an arbitrary random variable V we define We let F i be the filtration of the probability space given by the first i steps of the process. We need to estimate E[∆D 2,L (v)|F i ] for i ≤ T . The one step change ∆D 2,L (v) has both positive and negative contributions. D 2,L (v) gains a pair {v, q} when we choose an element q ′ such that {v, q, q ′ } ∈ D 3,L (v), except in the case where we happen to have q ∈ D 2 (q ′ ) (in which case we may conclude that either 2q ′ or 2q is in D 2 (v)). D 2,L (v) loses a pair {v, b} when b is chosen or closed.
Thus we can put In the sum above, it is intended that q ∈ Q, s ∈ S, so we are summing all the ways to lose an edge in {v, q, s} ∈ D 2,L (v) due to closing q. The big-O term absorbs the error due to: the possibility that we choose some q ∈ {v, q, q ′ } ∈ D 3,L (v) such that q ′ ∈ D 2 (q); the possibility of losing {v, q, s} due to choosing q; and the effect of the O(1) many edges of size 2 in D 2,L (v).
Almost all of the terms in the sum are D 2 (q) ≈ D 2,L (q) + D 2,R (q) ≈ 3n 1/2 tp, by (5) and our estimates on the variables we're tracking. However, we may have some terms with q such that −q ∈ S, in which case D 2,L (q) = 0. However, supposing that {v, q, s} ∈ D 2,L (v) and −q ∈ S, we conclude (by considering cases) that either {v, s, −q} ∈ D 1,R (v) or {−v, s, −q} ∈ D 1,R (−v). Thus there are O(log 2 n) many such terms in the sum. Now applying (5), our estimate for Q, lemma 5.1, and recalling t = O(log 1/2 n) we get For each vertex v = 0 , we define the sequence of random variables We will show that the sequence of random variables D + 2,L (v, 0) . . . D + 2,L (v, T ) is a supermartingale, and then use a deviation inequality to show that w.h.p. D + 2,L (v, i) is never positive (and hence D 2,L (v, i) does not violate its upper bound). For i < T Note that we have used (7), and approximated the 1-step change of deterministic functions using derivatives (i.e. Taylor's theorem). The last line can be verified by observing that Now we use Azuma-Hoeffding to bound the probability that the supermartingale D + 2,L (v, 0) . . . D + 2,L (v, T ) becomes positive.
We now bound the largest possible 1-step changes in the supermartingale. By examining all the contributions (positive and negative) we see that the largest possible 1-step change is a large negative contribution due to the algorithm choosing some vertex v ′ such that D 2 (v ′ ) contains a lot of vertices q in an edge {v, q, s} ∈ D 2,L (v). Using (6) to bound the number of such q (for any fixed v ′ ) we get Thus, applying Azuma-Hoeffding we see that the event that the supermartingale D + 2,L (v) ever becomes positive has probability at most exp −Ω (n 1/4 log 3 n) 2 i 0 (log 2 n) 2 = o(n −1 ).
As there are at most O(n) such supermartingales, with high probability none of them have such a large upward deviation, and D 2,L (v) stays below its upper bound for all v.
The lower bound for D 2,L (v) is similar, as are the bounds for D 2,R (v) for v = 0. Now we address D 2,R (0). We have and note that for every {0, q, s} ∈ D 2,R (0) we have that −q = s ∈ S and so D 2 (q) = D 2,R (q). Thus We define the sequence of random variables We will show that the sequence D + 2,R (0, 0) . . . D + 2,R (0, T ) is a supermartingale. For i < T , Again, the biggest possible 1-step changes in the above supermartingale comes from the intersections of D 2 sets. Using (6), Thus, the event that the supermartingale D + 2,R (0, i) ever becomes positive has probability at most Therefore with high probability D 2,R (0) stays below its upper bound. Proving the lower bound for D 2,R (0) is similar.

Tracking the D 3 variables
The variable D 3,L (v) is nonincreasing, and we lose a triple {v, q, q ′ } ∈ D 3,L (v) whenever q or q ′ is closed or chosen. Thus we have Before the stopping time T , we can estimate the above expression. Most of the terms in the sum will have −q, −q ′ / ∈ S. Supposing that {v, q, q ′ } ∈ D 3,L (v) and −q ∈ S, we conclude that one of q ′ or −q ′ must be in D 2 (v). Thus there are O n 1/2 tp many such terms in the sum. Now applying (5), our control on the variables before the stopping time T , lemma 5.1, and recalling t = O(log 1/2 n) we get We define the sequence of random variables 3 We will show that the sequence D + 3,L (v, 0) . . . D + 3,L (v, T ) is a supermartingale. For i < T , we have the inequality Note that in the first line we have used (11). The last line can be verified by observing that Now we use Azuma-Hoeffding to bound the probability that the supermartingale becomes positive. By considering the total number of elements that get closed in any one step, we see The lower bound for D 3,L (v) is similar, as are the bounds for D 3,R (v) for v = 0. Now we address D 3,R (0). Using the same methods to estimate E[∆D 3,L (v)|F i ] before the stopping time T , we get but note that each term in the sum has D 2,L (q) = D 2,L (−q) and so the term is roughly 4n 1/2 tp. Thus Note that in the first line we have used (13) and the fact that D 3,R (0) is in the critical interval. The last line can be verified by observing that 2n −1/2 tf 3,0 + 2p 1/3 f 2 + n −1/2 tp 1/3 f q − n −1/2 f ′ 3,0 ≤ −p 14/3 n 1/4 log 3 n.
Now we use Azuma-Hoeffding to bound the probability that the supermartingale becomes positive. We have ∆D + 3,R (0, j) ≤ O n 1/2 tp Thus, applying Azuma-Hoeffding we see that the event that the supermartingale D + 3,R (0) is ever positive has probability o(1). Thus with high probability none of them have such large upward deviations, and D 3,R (0) stays below its upper bound. The lower bound for D 3,R (0) is similar.
We will apply the following inequality due to Freedman [10]. .