Abstract
In this chapter we study a method for optimizing over certain set systems, the so-called greedy algorithm. More precisely, it is used for maximizing a weight function on so-called independence systems, the classical instance being the system of spanning forests of a graph. The greedy strategy is rather short-sighted: one always selects the element which seems best at the moment. In other words, among all the admissible elements, one chooses that with maximal weight and adds it to the solution being constructed. In general, this simple-minded strategy will not work, but for a certain class of structures playing a very important part in combinatorial optimization, the so-called matroids, it indeed leads to optimal solutions. Actually, matroids may even be characterized by the fact that the greedy algorithm works for them, but there are other possible definitions. We shall look at various other characterizations of matroids and also consider the notion of matroid duality. Following this, we will consider the greedy algorithm as an approximation method for maximization on independence systems which are not matroids. We examine the efficiency of this approach, that is, we derive bounds for the ratio between the solution given by the greedy algorithm and the optimal solution. We also look at the problem of minimization on independence systems. Finally, in the last section, we discuss some further generalizations of matroids and their relationship to the greedy algorithm.
Greed is good. Greed is right. Greed works.
From ‘ Wall Street ’
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
Originally, Whitney [Whi35] and van der Waerden [vandW37] (see also [vandW49] for an English edition) introduced matroids as an abstract generalization of the notions of linear and algebraic independence, respectively. In the next section, we give some other possible definitions. The generalization of the algorithm of Kruskal to matroids was found independently by [Gal68], [Wel68] and—actually a bit earlier—by Edmonds; see [Edm71]. Early forms of the underlying ideas go back even to [Bor26a] and [Rad57].
- 2.
The construction of graphic matroids admits an obvious generalization to multigraphs. While this observation may, at first glance, not seem very interesting, it will be important in the context of duality.
- 3.
The tail-partition matroid is defined analogously.
- 4.
If edges not lying in a cycle—that is, edges belonging to just one face F—are allowed, one has to associate such edges with loops in the construction of G ∗. It should also be noted that a planar graph may admit essentially different plane embeddings and, hence, nonisomorphic geometric duals.
- 5.
Note that the greedy algorithm can yield different solutions T g for different orderings of the elements of E (which may occur if there are distinct elements having the same weight). Hence we indeed have to minimize over all T g .
- 6.
This result was conjectured or even proved somewhat earlier by various other authors; see the remarks in [KorHa78].
- 7.
Note that it does not make sense to apply the original version of the greedy algorithm if S is not closed under inclusion: in this case, it might happen that an element x cannot be added to the feasible set T constructed so far, because T∪{x} is not feasible; nevertheless, it might be permissible to add x at some later point to the set T′=T∪A. If w(x)>w(y) for some y∈A, the original greedy algorithm 5.1.1 would fail in this situation, as the element x would already have been dismissed. To avoid this, we simply keep the strategy of always selecting the largest available element; all that is required is a different formulation.
- 8.
Characterizing greedoids in terms of the greedy algorithm requires the use of certain non-linear objective functions; see [KorLS91].
References
Bachem, A., Kern, W.: Linear Programming Duality. An Introduction to Oriented Matroids. Springer, Berlin (1992)
Bjørner, A., Ziegler, G.M.: Introduction to greedoids. In: White, N. (ed.) Matroid Applications, pp. 284–357. Cambridge University Press, Cambridge (1992)
Bjørner, A., Las Vergnas, M., Sturmfels, B., White, N., Ziegler, G.M.: Oriented Matroids. Cambridge University Press, Cambridge (1992)
Boruvka, O.: O jistém problému minimálním. Acta Soc. Sci. Nat. Morav. 3, 37–58 (1926)
Boyd, E.A., Faigle, U.: An algorithmic characterization of antimatroids. Discrete Appl. Math. 28, 197–205 (1990)
Bryant, V., Brooksbank, P.: Greedy algorithm compatibility and heavy-set structures. Eur. J. Comb. 13, 81–86 (1992)
Cunningham, W.H.: Improved bounds for matroid partition and intersection algorithms. SIAM J. Comput. 15, 948–957 (1986)
Edmonds, J.: Submodular functions, matroids and certain polyhedra. In: Guy, K. (ed.) Combinatorial Structures and Their Applications, pp. 69–87. Gordon & Breach, New York (1970)
Edmonds, J.: Matroids and the greedy algorithm. Math. Program. 1, 127–136 (1971)
Edmonds, J.: Matroid intersection. Ann. Discrete Math. 4, 39–49 (1979)
Faigle, U.: The greedy algorithm for partially ordered sets. Discrete Math. 28, 153–159 (1979)
Faigle, U.: On ordered languages and the optimization of linear functions by greedy algorithms. J. Assoc. Comput. Mach. 32, 861–870 (1985)
Frank, A., Tardos, E.: Generalized polymatroids and submodular flows. Math. Program. 42, 489–563 (1988)
Fujishige, S.: Submodular Functions and Optimization. North Holland, Amsterdam (1991)
Gale, D.: Optimal assignments in an ordered set: an application of matroid theory. J. Comb. Theory 4, 176–180 (1968)
Goecke, O.: A greedy algorithm for hereditary set systems and a generalization of the Rado-Edmonds characterization of matroids. Discrete Appl. Math. 20, 39–49 (1988)
Hausmann, D., Korte, B.: Algorithmic versus axiomatic definitions of matroids. Math. Program. Stud. 14, 98–111 (1981)
Helman, P., Mont, B.M.E., Shapiro, H.D.: An exact characterization of greedy structures. SIAM J. Discrete Math. 6, 274–283 (1993)
Jenkyns, T.A.: The efficacy of the ‘greedy’ algorithm. In: Proc. 7th Southeastern Conf. Combinatorics, Graph Theory and Computing, pp. 341–350 (1976)
Korte, B., Hausmann, D.: An analysis of the greedy heuristic for independence systems. Ann. Discrete Math. 2, 65–74 (1978)
Korte, B., Lovász, L.: Mathematical structures underlying greedy algorithms. In: Gécseg, F. (ed.) Fundamentals of Computation Theory, pp. 205–209. Springer, Berlin (1981)
Korte, B., Lovász, L., Schrader, R.: Greedoids. Springer, Berlin (1991)
Kruskal, J.B.: On the shortest spanning subtree of a graph and the travelling salesman problem. Proc. Am. Math. Soc. 7, 48–50 (1956)
Lawler, E.L.: Matroid intersection algorithms. Math. Program. 9, 31–56 (1975)
Lawler, E.L.: Combinatorial Optimization: Networks and Matriods. Holt, Rinehart and Winston, New York (1976)
Lehman, A.: A solution of the Shannon switching game. SIAM J. Appl. Math. 12, 687–725 (1964)
Minty, G.J.: On the axiomatic foundations of the theories of directed linear graphs, electrical networks and network programming. J. Math. Mech. 15, 485–520 (1966)
Oxley, J.G.: Matroid Theory. Oxford University Press, Oxford (1992)
Pym, J.S., Perfect, H.: Submodular functions and independence structures. J. Math. Anal. Appl. 30, 1–31 (1970)
Qi, L.: Directed submodularity, ditroids and directed submodular flows. Math. Program. 42, 579–599 (1988)
Rado, R.: Note on independence functions. Proc. Lond. Math. Soc. 7, 300–320 (1957)
Recski, A.: Matroid Theory and Its Applications. Springer, Berlin (1989)
Reingold, E.M., Tarjan, R.E.: On a greedy heuristic for complete matching. SIAM J. Comput. 10, 676–681 (1981)
Tutte, W.T.: Introduction to the Theory of Matroids. Elsevier, New York (1971)
van der Waerden, B.L.: Moderne Algebra, 2nd edn. Springer, Berlin (1937)
van der Waerden, B.L.: Modern Algebra, Vol. I. Frederick Ungar, New York (1949) (translated from the 2nd revised German edition by Fred Blum, with revisions and additions by the author)
Welsh, D.J.A.: Kruskal’s theorem for matroids. Proc. Camb. Philos. Soc. 64, 3–4 (1968)
Welsh, D.J.A.: Matroid Theory. Academic Press, New York (1976)
White, N. (ed.): Theory of Matroids. Cambridge University Press, Cambridge (1986)
White, N. (ed.): Combinatorial Geometries. Cambridge University Press, Cambridge (1987)
White, N. (ed.): Matroid Applications. Cambridge University Press, Cambridge (1992)
Whitney, H.: Planar graphs. Fundam. Math. 21, 73–84 (1933)
Whitney, H.: On the abstract properties of linear dependence. Am. J. Math. 57, 509–533 (1935)
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Jungnickel, D. (2013). The Greedy Algorithm. In: Graphs, Networks and Algorithms. Algorithms and Computation in Mathematics, vol 5. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32278-5_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-32278-5_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32277-8
Online ISBN: 978-3-642-32278-5
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)