On Random Greedy Triangle Packing David A. Grable ∗ Institut f¨ ur Informatik Humboldt-Universit¨ at zu Berlin D-10099 Berlin Germany Submitted: August 5, 1996; Accepted: F ebruary 26, 1997 Abstract The behaviour of the random greedy algorithm for constructing a maximal packing of edge- disjoin t triang les on n poin ts (a max imal partial trip le sys tem) is an alys ed wit h particular emphasis on the final number of unused edges. It is shown that this number is at most n 7/4+o(1) , “halfway” from the previous best-known upper bound o(n 2 ) to the conjectured value n 3/2+o(1) . The more general problem of random greedy packing in hypergraphs is also considered. 1 In troduct ion Consider the following simple algorithm for construct ing a maximal collection of pair-disjoint triples in a set ofn points: repeatedly pick a triple uniformly at random from among all triples which do not share a pair with any previou sly pick ed triple, unti l ther e are no more candida te triples . It is perhaps mildly surprising that such a simple random greedy procedure almost always results in a collection of triples which cover almost all of the pairs [13, 12]. In this paper we obtain significantly ti gh ter bounds on the number of unc o ve red pair s. In par ti cul ar, we show tha t the number ofuncovered pairs is almost always no more than n 7/4+o(1) , where o(1) is a function going to 0 as n goes to infinity. This problem is expressed nicely in the language of design theory. A partial triple systemon n points (a PTS(n) for short) is a collection of 3-element subsets ( triples) of{1,...,n} such that each 2-element subset ( pair) is contained in ( covered by) at most one triple. Of considerable interest are partial triple systems in which every pair is covered by exactly one triple. Such systems are called Steiner triple systems. The reader is referred to [3] for more background on design theory. A partial triple system is maximalif no triple can be added without covering some pair more than once. It is ob viou s, but worth noting, that Stei ner triple systems are maximal, but they are ∗ Supported by Deutsche Forschungsgemeinschaft project number Pr 296/4-1. e-mail: grable@i nformatik.hu-berlin.de Mathematics Subject Classification: 05B40, 05C70
19
Embed
David A. Grable- On Random Greedy Triangle Packing
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
Submitted: August 5, 1996; Accepted: February 26, 1997
Abstract
The behaviour of the random greedy algorithm for constructing a maximal packing of edge-disjoint triangles on n points (a maximal partial triple system) is analysed with particularemphasis on the final number of unused edges. It is shown that this number is at most n7/4+o(1),“halfway” from the previous best-known upper bound o(n2) to the conjectured value n3/2+o(1).
The more general problem of random greedy packing in hypergraphs is also considered.
1 Introduction
Consider the following simple algorithm for constructing a maximal collection of pair-disjoint triples
in a set of n points: repeatedly pick a triple uniformly at random from among all triples which do
not share a pair with any previously picked triple, until there are no more candidate triples. It is
perhaps mildly surprising that such a simple random greedy procedure almost always results in a
collection of triples which cover almost all of the pairs [13, 12]. In this paper we obtain significantly
tighter bounds on the number of uncovered pairs. In particular, we show that the number of
uncovered pairs is almost always no more than n7/4+o(1), where o(1) is a function going to 0 as n
goes to infinity.
This problem is expressed nicely in the language of design theory. A partial triple system on n
points (a PTS(n) for short) is a collection of 3-element subsets (triples) of 1, . . . , n such that each
2-element subset (pair ) is contained in (covered by ) at most one triple. Of considerable interest are
partial triple systems in which every pair is covered by exactly one triple. Such systems are called
Steiner triple systems. The reader is referred to [3] for more background on design theory.
A partial triple system is maximal if no triple can be added without covering some pair more
than once. It is obvious, but worth noting, that Steiner triple systems are maximal, but they are
∗Supported by Deutsche Forschungsgemeinschaft project number Pr 296/4-1.e-mail: [email protected] Subject Classification: 05B40, 05C70
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 2
not the only maximal partial triple systems. Another observation is that the leave graph of a PTS
(the graph whose edges are the uncovered pairs) is triangle-free if and only if the PTS is maximal.
The random greedy algorithm constructs a maximal partial triple system in the following way.
It starts with an empty partial triple system and the complete list of candidate triples. It repeatedlypicks a candidate triple from the list uniformly at random, adds it to the partial triple system, and
removes it and all other candidates with which it shares a pair from the list of candidates, until
there are no more candidates.
The problem is to determine how many uncovered pairs remain. In other words, we’re interested
in finding out how close the resulting partial triple system is to a Steiner triple system. Of course,
since the procedure involves randomness, it may be that with some small probability, the resulting
PTS is very bad. On the other hand, there is a small probability that the result is a Steiner triple
system. It will turn out, though, that usually the result is somewhere in between, but not very far
from being a Steiner triple system.There are two alternate ways to express the algorithm. One, from the point of view of the
leave graph, is that the algorithm starts with the complete graph and repeatedly removes random
triangles until the graph is triangle-free.
In the other alternate expression, all of the randomness takes place in the initial stage of
execution: the list of all triples is first randomly ordered and then the triples are considered one at
a time in this order. If the triple shares no pair with any previously selected triple (i.e. it can be
added to the PTS) then it is added. Otherwise, it is discarded. It is actually this last procedure
which we will analyse.
We take what we call an “honest nibble” approach. The nibble method, pioneered by Rodl [11],was originally a method (really an algorithm) for showing the existence of asymptotically good
partial designs as conjectured by Erdos and Hanani [4] and, later, the existence of packings and
colourings in hypergraphs [5, 10, 7, 1, 9]. The nibble algorithm isn’t exactly the same as the random
greedy algorithm but there are enough similarities that Rodl and Thoma [12] were able to use it
to show that the random greedy algorithm almost always produces a partial triple system with
only o(n2) uncovered pairs. Spencer [13] proved the same using completely different techniques.
By “almost always” we mean that with probability 1 − o(1), the algorithm produces the required
result.
We modify the nibble algorithm so that it behaves exactly the same as the random greedyalgorithm. This “honest nibble” algorithm is presented in the next section. We then give a sim-
plified analysis that shows that the number of uncovered pairs is almost always at most n11/6+o(1).
Thereafter, we will show how to refine the analysis to improve the bound to at most n7/4+o(1).
No lower bounds on the number of uncovered pairs are known, but substantial computer sim-
ulations of the random greedy algorithm have been carried out by Balinska and Wieczorek [2] for
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 3
triangle packing and by Gordon, Kuperberg, Patashnik, and Spencer [6] for more general pack-
ing problems. These simulations indicate that the correct order of magnitude for the number of
uncovered pairs is n3/2+o(1) and, indeed, Joel Spencer has offered $200 for a proof.
At the end of the paper, we will also look at the behaviour of the random greedy algorithm forconstructing packings in hypergraphs.
2 The Honest Nibble
The traditional nibble process starts with the empty partial triple system and repeatedly adds a
small number of triples in the following way: triples are selected independently at random with
a very small probability from all remaining candidates, each selected triple which does not share
a pair with any other selected triple is added to the current partial design, and then the list of
candidates is updated by removing all selected triples and any triples with which they share a pair.To get the desired theoretical result, it is only necessary to take a large but fixed number of such
nibbles, but one could of course run this process until there were no more candidate triples.
To make the connection to the random greedy algorithm, consider the version of the random
greedy algorithm where all possible triples are first randomly ordered and then the triples are
considered one by one. Equivalently, we could generate the ordering in bursts. Each of these bursts
corresponds roughly to a single nibble.
More specifically, do the following. Start with an empty partial triple system and the set of all
triples. To generate a burst, select triples independently at random with some small probability
(to be specified later), randomly order the selected triples, and remove the selected triples from theset of unused triples. After generating each burst, process the triples in the manner of the greedy
algorithm: consider each triple in turn in the random order given and, if it can be added to the
partial triple system, do so.
Compare what happens here with what happens in the traditional nibble process. Here, if a
selected triple could not be added to the partial triple system as it existed at the beginning of the
burst, it will never be added. In the traditional nibble, such a triple would never have been selected
since we only select from candidate triples—that is, from triples which could be added. Here, of the
remaining selected triples, a triple which is pair-disjoint from all other remaining selected triples
will always be placed in the partial design. The same thing happens in the traditional nibble. It isonly in the case of selected triples which share a pair that the two methods differ. The traditional
nibble throws out all such triples, but here we “do the right thing”, by considering the ordering and
doing what the greedy algorithm would do. Note that this is the only situation where the ordering
of the burst matters.
The point of the bursts is to give us well defined intermediate stopping points in the process,
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 4
where we can determine what the leave graph of the partial triple system looks like. This way,
we only have to analyse one burst at a time, giving more or less a proof by induction. By taking
the right sized burst, we hope to show that the leave graph remains fairly regular throughout the
entire process. This will let us predict how many edges are left near the end fairly well. If we tookbursts that were too small—in the extreme case, only one triangle at a time—we couldn’t take
much advantage of the fact that the triangles are presented randomly. The burst would only affect
a very few vertices, so the degrees wouldn’t stay very regular from one burst to the next. If we took
very large bursts—the extreme case here is a single burst—the ordering dependencies among those
selected triangles sharing pairs would be very difficult to analyse. We therefore pick bursts of a size
such that they each contain enough randomly placed triangles that their effects occur in a smooth
way over the entire leave graph, but not so many triangles that there are a lot of dependencies.
We are interested in showing that at the end, when the leave graph of the partial triple system
is triangle-free, there are almost always fewer than f (n) edges, for some function f (n). We’ll dothat by carefully analysing the leave graph after each burst and showing that there is a number t
so that after the tth burst, the leave graph already has fewer than f (n) edges.
At last we introduce some notation. Let Gs be the leave graph of the partial design after the
sth burst. So
K n = G0 ⊇ G1 ⊇ · · · ⊇ Gs ⊇ · · · ⊇ Gt ⊇ · · · .
The probability with which we choose triangles in the sth burst is the ratio of two quantities:
a parameter η to be defined a bit later as a function of n going to 0 as n goes to infinity and a
number Ds−1 defined as follows.
Consider an ideal situation in which every edge of a graph G ⊆ K n is contained in exactly D
triangles. Nibble in G with probability η/D (that is, select triangles independently at random with
probability η/D, order the selected nibbles at random, etc.) and let H be the probability that a
given edge e is not removed from the graph. This probability turns out, as we will later show, to
be independent of the choice of e and even of G. We will see that, indeed,
H := Pr[edge survival] = 1− η + 32 η2 − 5
2 η3 + O(η4).
With this in mind, we define real numbers Ds := H 2sn and E s := H s
n2
. When going from
Gs−1 to Gs, we will nibble with probability η/Ds−1. Nibbling at this rate will ensure that each
edge of Gs is in about Ds triangles and that Gs has about E s edges.
Just for reference, in the traditional nibble, η is a small constant and e−η is used in place of
H Indeed, H = e−η + O(η2), so the difference in relatively insignificant, but this minor difference
benefits us in a major way.
Of course, the Ds and E s don’t track the numbers of triangles contained in each edge and the
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 6
ε by computing the expectation of deg(e) for a surviving edge e and then using a large deviation
result to bound the actual value with high probability. Afterwards, we’ll do the same for |E (G)|to bound δ.
To compute the expectation, we’ll need a few more definitions and two lemmas. We say twotriangles are adjacent if they share a common edge (but not merely a common vertex). A path is
a sequence of adjacent triangles and a cluster is a maximal collection of selected triangles in which
every two triangles are joined by a path within the collection.
The ordering of the triangles within a cluster determines which of the triangles of that cluster
succeed, but the success of the triangles in one cluster is independent of the orderings of the other
clusters.
The first lemma says that with high probability, we will never encounter clusters with more
than a large, but fixed, number of triangles.
Lemma 1 With probability 1−O(n−2), there are no clusters with more than m = O(1) triangles.
Proof The probability that all c of the triangles of a potential partial (i.e. not necessarily
maximal) c-cluster are selected is (η/D)c and the number of potential partial c-clusters is at most
(ED/3) · 3D · 5D . . . (2c− 1)D < n2(2c)cDc. Therefore, the expected number of partial c-clusters
is at most (2c)cηcn2.
To guarantee that, with probability 1 − O(n−2), no cluster with m or more triangles is ever
selected, we show that the expected number of partial m-clusters is O(n−2) and use Markov’s
inequality. Let ξ > 0 be a fixed real number such that η ≤ n−ξ. Note that we will always pick η
so that this is possible; for instance in the n11/6+o(1)
result η will be chosen to be n−1/3+γ
. Thenset m = 4/ξ = O(1). For this value of m, the expected number of partial m-clusters is at most
(2m)mn−mξ+2 = O(n−2).
Since assertion (1) insists that we pick t n, it follows that with probability 1 −O(n), there
are no clusters with more than m = O(1) triangles in any of the t bursts. Therefore, we can safely
ignore all large clusters.
The next lemma deals with the probability that a constant number of edges all survive a single
burst. It says that their survival is almost independent, regardless of their configuration.
Lemma 2 For any constant-sized set F of edges of G, the probability that all of the edges of F
survive to G is
1− ηD
f ∈F
deg(f ) + O(η2).
Note The constant concealed by the O-notation is independent of ε, η, and D, and therefore also
of s, but does depend on |F |. In point of fact, the constant is at most 3 |F |+ 4|F |2, but the exact
value is irrelevant.
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 12
Turning finally to the number of edges remaining at this step t, we see that
|E t| = O
H tn2
= O
n11/6+γ
.
We can force the number of remaining edges as close to n11/6
as we like by fixing γ > 0 sufficientlysmall. In other words, modulo Lemmas 3 and 4, we’ve proven
Theorem 5 For any fixed γ > 0, the random greedy triangle packing algorithm almost always
leaves fewer than O
n11/6+γ
uncovered pairs.
4 Deviations
To bound the deviations of the random variables discussed in the previous section, we’ll need the
powerful large deviation inequality discussed in full detail in [8]. Here we only give the essential
definitions and relevant considerations.Assume we have a probability space generated by independent random variables X i (choices),
where choice X i is from the finite set Ai, and a function (random variable) Y = f (X 1, . . . , X n) on
that probability space. We are interested in proving a sharp concentration result on Y —that is, to
bound Pr[|Y −Ex[Y ]| > a], for any a, as well as we can.
Consider the following query game, the aim of which is to determine the value of Y . We can
make queries of the form “what is the value of X i?” in any order we want. The questioning can
be adaptive, meaning that we can chose the next X i to be queried as a function of the knowledge
gained so far. A querying strategy for Y is an algorithm for determining which queries should be
made in which order. We can describe a strategy as a decision tree whose internal nodes designatequeries to be made. If a given node represents the query “what is the value of X i?” then it has
as many children as there are possible values for X i. You might think of the down edges as being
labelled with the values a ∈ Ai. In this fashion, every path from the root to a node going through
vertices corresponding to X i1, . . . , X ik defines an assignment a1, . . . , ak for these random variables.
We can then think of the jth node as storing the value Ex[Y | X i1 = a1, . . . , X ij−1 = a j−1]. In
particular, the leaves of the tree store each of the possible values of Y .
The idea behind this query-based large deviation inequality is to bound the deviation of Y
by carefully bounding the contribution to the deviation made by each X i. A strategy efficiently
expresses which X i are relevant and more importantly allows us to estimate the contribution at thetime that the query is made. For instance, the result of previous queries may imply that the next
query will have a more limited effect than would have been initially anticipated. Formally, define
the variance of a query q concerning choice i to be
vq =a∈Ai
Pr[X i = a] µ2q,a,
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 14
Now we can return to the matter at hand, proving Lemmas 3 and 4. To prove Lemma 3, start by
fixing an edge e and assuming that it survives. That just means that none of its incident triangles
is accepted. But some of them may not survive as triangles in G, since some of their edges may
be covered by accepted triangles.The relevant probability space is formed from the independent triangle selections and inde-
pendent, uniformly random orderings for each cluster. At first glance, the fact that the orderings
depend on which triangles were selected, and hence which clusters exist to be ordered, seems to
preclude the use of Theorem 6. But instead of picking an ordering for each cluster, we simply pick
an ordering of all triangles uniformly at random. It is easy to see that a random ordering of all
triangles, when restricted to the triangles of a single cluster, is a uniform random ordering and that
the orderings of necessarily disjoint clusters are independent.
Each of the 2 deg(e) edges in triangles incident to e can only disappear if it is covered by a
cluster, so we should first fully explore all clusters covering these edges. Note trivially that eachedge is covered by at most one cluster.
To explore the cluster at one edge takes at most (2 m + 1)(1 + ε)D = O(D) queries, where
m = O(1) is the maximum size of a cluster (Lemma 1). This gives a total of at most O(D2)
queries. These are Yes/No queries, with Pr[Yes] = η/D. Importantly, the effect of a query is
at most the number of edges covered by the cluster. This is certainly less than 2m + 1 = O(1).
Altogether, these queries contribute at most O(D2) ηDO(1)2 = O(ηD) to the total variance.
Next we have to query the ordering. This is equivalent to querying the independent orderings
for each cluster, now that we know what they are. Each cluster ordering can affect only the edges
covered by that cluster, so the effect of each query is O(1).The only question is, how many ordering queries do we have to make? Well, clearly the answer
is the number of clusters covering edges in triangles incident with e. This could conceivably be as
much as O(D), which would lead to a weaker deviation result than we would like, so we use the
“exceptional outcomes” feature of Theorem 6.
Edge f is covered by a cluster with probability 1 − (1 − η/D)deg(f ) = O(η), so the expected
number of relevant edges covered by clusters is O(ηD). Furthermore, if we ignore the triangles
incident with e, the events “f is covered by a cluster”, for the relevant f ’s, are independent, so
the Chernoff bounds imply that the number of such edges covered by clusters is not much more
than its expectation. In particular, this number is with probability at least 1 − n−10
no morethan O(ηD log n). And of course, the number of clusters is no more than the number of edges
covered by clusters. If we then consider the triangles incident with e, we note that these triangles
can increase the number of clusters by at most 1 and may, in fact, reduce it by joining previously
isolated clusters.
Thus, we say that an outcome is exceptional if it results in more than O(ηD log n) clusters
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 15
covering edges in triangles incident with e. So now we know that in non-exceptional circumstances
we need never make more than O(ηD log n) cluster ordering queries. This gives as total variance
for this strategy
V = O(ηD) + O(ηD log n) · O(1)2/4 = O(ηD log n).
We want the probability of deviation to be on the order of n−10, so we put ϕ = 10 log n and get a
deviation of O√
ηD log n
, as claimed in Lemma 3. Note that the side condition of Theorem 6,
that 0 ≤ ϕ ≤ V / max c2q , only requires that ηD = Ω(1).
Finally we prove Lemma 4. Here we’re concerned with the number of surviving edges in the
entire graph, so we have to first query all O(ED) triangles. As before, these are Yes/No queries
with Pr[Yes] = η/D and maximum effect 2m + 1 = O(1). These queries therefore contribute
O(ED) ηDO(1)2 = O(ηE ) to the total variance.
Querying the ordering is equivalent to querying the independent orderings of all clusters in the
graph. With very small probability this is quite large, but an argument like the one given above
shows that with probability at least 1 − n−10 there are no more than O(ηE log n) clusters. Each
cluster ordering affects only the O(1) edges in that cluster, so in non-exceptional circumstances the
cluster ordering queries contribute O(ηE log n) ·O(1)2/4 = O(ηE log n) to the total variance.
The strategy therefore has total variance V = O(ηE log n). Setting ϕ = 10 log n to get a devia-
tion probability of 3n−10, the large deviation inequality gives a deviation of order O√
ηE log n
,
as claimed in Lemma 4. The side condition requires that ηE = Ω(1).
5 Improvements
Now we would like to sharpen the proof of Theorem 5 as much as possible to get a better bound.
Basically this amounts to doing all the computations as accurately as possible. We won’t actually
do the computations, but rather show how one would do them and look at their consequences.
The first thing to do would be to improve Lemma 2 by detailing the O(η2) term. That is done by
using an extended version of Table 1 to work out a more accurate expression for Pr[T is accepted |T is selected]. As we’ve already shown in the proof of Lemma 2, the first three terms are, for
instance,
Pr[T is accepted
|T is selected] = 1
−32 (1
±ε)η + 5
2 (1
±ε)2η2
−O(η3).
We can continue this to any desired accuracy O(ηb) as long as we know how many potential clusters
of each type there are. It is for this reason that Lemma 2 is set up to handle any constant number
of triangles (we know that we never need to consider clusters with more than a constant number
of triangles by Lemma 1).
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
Finally, the number of edges remaining after the tth burst is
|E t| = O
H tn2
= O
n2−(1/4)(1−2γ )(1−1/b)
.
We can force the exponent to be as close to 7/4 as we like by setting γ sufficiently small and b
sufficiently large. Therefore, we’ve proven the following theorem.
Theorem 7 For any ξ > 0, the random greedy triangle packing algorithm almost always leaves
fewer than O
n7/4+ξ
uncovered pairs.
6 Packings in Hypergraphs
Actually, everything done in this paper can be done in the more general setting of packings in
simple, k-uniform, D-regular hypergraphs on N points. A hypergraph is simple, k-uniform , and
D-regular if no two edges share two points, if all edges contain exactly k points, and if every pointis contained in D edges. A packing is a collection of disjoint edges.
The random greedy hypergraph packing algorithm picks edges one at a time, uniformly at
random to build up a maximal packing. How many points are not covered by any edge in the
resulting packing? The results of Spencer [13] and Rodl and Thoma [12] apply to this setting and
state that almost always the number of uncovered points is o(N ). The corresponding conjecture
8/3/2019 David A. Grable- On Random Greedy Triangle Packing
the electronic journal of combinatorics 4 (1997), #R11 18
is that the number of uncovered points is almost always N D−1/(k−1)+o(1). The techniques of this
paper can be used to show that the number of uncovered points is almost always N D−1/2(k−1)+o(1).
To see how triangle packing is a special case of hypergraph packing, we construct a hypergraph
whose packings correspond to partial triple systems. The N =n2
points of the hypergraph arethe pairs of points in the triple system and the
n3
hyperedges correspond to all of the possible
triples. A packing is then a collection of triples no two of which share a pair—that is, a partial
triple system. We note that a similar construction gives a hypergraph whose packings correspond
to partial designs with larger parameters.
Now it is clear why we called the number of triangles containing a given edge that edge’s degree:
in the hypergraph the edge is a point and the triangles which contain it are its incident hyperedges.
Also, in this setting the clusters are simply the connected components of the hypergraph induced
by the selected hyperedges.
Acknowledgements
Special thanks are due to Joel Spencer for suggesting the problem and to him and the anonymous
referee for useful comments on an earlier version of the paper.
References
[1] N. Alon, H.J. Kim, J. Spencer, Nearly perfect matchings in regular simple hypergraphs, Israel
Journal of Mathematics, to appear.
[2] K.T. Balinska and I. Wieczorek, Random triangle deletion process, Technical UniversityPoznan, 1989.
[3] T. Beth, D. Jungnickel, and H. Lenz, Design Theory , Cambridge University Press, Cambridge,1986.
[4] P. Erdos and H. Hanani, On a limit theorem in combinatorial analysis, Publ. Math. Debrecen
10 (1963), 10–13.
[5] P. Frankl and V. Rodl, Near perfect coverings in graphs and hypergraphs, European Journal
of Combinatorics 6 (1985), 317–326.
[6] D. Gordon, G. Kuperberg, O. Patashnik, and J. Spencer, Asymptotically optimal coveringdesigns, Journal of Combinatorial Theory, Series A, to appear.
[7] D.A. Grable, More-than-nearly-perfect packings and partial designs, preprint, 1994.
[8] D.A. Grable, A large deviation inequality for functions of independent, multi-way choices,Combinatorics, Probability, and Computing , to appear.
8/3/2019 David A. Grable- On Random Greedy Triangle Packing