A Class of Greedy Algorithms and Its Relation to Greedoids
A long-standing problem in algorithm design has been to characterize the class of problems for which greedy algorithms exist. Many greedy problems can be described using algebraic structures called matroids, which were later generalized to greedoids. Once in this form, the original problem can be solved using Edmonds’ Greedy Algorithm. However there are several practical problems with greedy solutions that either do not have a greedoid representation (e.g. Activity Selection) or for which none is known (e.g. Huffman Coding). This paper presents a new characterization of greedy problems that is strictly more general than greedoids, in that it includes all greedoids, as well as problems such as Activity Selection and Huffman Coding. Unlike matroids, our characterization is an axiomatization of a form of Branch and Bound Search, where greediness is associated with the existence of an appropriate dominance relation. Starting from a definition of optimality of the required solution we derive a recurrence relation. This recurrence can then be transformed into a correct-by-construction program that solves problems in our greedy class, analogous to the Greedy Algorithm.
Unable to display preview. Download preview PDF.
- [BM93]Bird, R.S., De Moor, O.: From dynamic programming to greedy algorithms. In: Möller, B., Schuman, S., Partsch, H. (eds.) Formal Program Development. LNCS, vol. 755, pp. 43–61. Springer, Heidelberg (1993)Google Scholar
- [BZ92]Björner, A., Ziegler, G.M.: Introduction to greedoids. In: White, N. (ed.) Matroid Applications. Cambridge University Press, Cambridge (1992)Google Scholar
- [Cha95]Charlier, B.: The greedy algorithms class: formalization, synthesis and generalization. Technical report (1995)Google Scholar
- [NC09]Nedunuri, S., Cook, W.R.: Synthesis of fast programs for maximum segment sum problems. In: Intl. Conf. on Generative Programming and Component Engineering (GPCE) (October 2009)Google Scholar
- [NSC10]Nedunuri, S., Smith, D.R., Cook, W.R.: Synthesis of greedy algorithms using dominance relations. In: 2nd NASA Symp. on Formal Methods (2010)Google Scholar
- [Smi88]Smith, D.R.: Structure and design of global search algorithms. Tech. Rep. Kes.U.87.12, Kestrel Institute (1988)Google Scholar
- [Smi90]Smith, D.R.: Kids: A semi-automatic program development system. IEEE Trans. on Soft. Eng., Spec. Issue on Formal Methods 16(9), 1024–1043 (1990)Google Scholar
- [SPW95]Smith, D.R., Parra, E.A., Westfold, S.J.: Synthesis of high-performance transportation schedulers. Technical report, Kestrel Institute (1995)Google Scholar
- [SW08]Smith, D.R., Westfold, S.: Synthesis of propositional satisfiability solvers. Final proj. report, Kestrel Institute (2008)Google Scholar