## From Dynamic Programming to Greedy Algorithms (1992)

Venue: | Formal Program Development, volume 755 of Lecture Notes in Computer Science |

Citations: | 14 - 3 self |

### BibTeX

@INPROCEEDINGS{Bird92fromdynamic,

author = {Richard Bird and Oege De Moor},

title = {From Dynamic Programming to Greedy Algorithms},

booktitle = {Formal Program Development, volume 755 of Lecture Notes in Computer Science},

year = {1992},

pages = {43--61},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

A calculus of relations is used to reason about specifications and algorithms for optimisation problems. It is shown how certain greedy algorithms can be seen as refinements of dynamic programming. Throughout, the maximum lateness problem is used as a motivating example. 1 Introduction An optimisation problem can be solved by dynamic programming if an optimal solution is composed of optimal solutions to subproblems. This property, which is known as the principle of optimality, can be formalised as a monotonicity condition. If the principle of optimality is satisfied, one can compute a solution by decomposing the input in all possible ways, recursively solving the subproblems, and then combining optimal solutions to subproblems into an optimal solution for the whole problem. By contrast, a greedy algorithm considers only one decomposition of the argument. This decomposition is usually unbalanced, and greedy in the sense that at each step the algorithm reduces the input as much as poss...

### Citations

1532 |
A Discipline of Programming
- Dijkstra
- 1976
(Show Context)
Citation Context ... , the relations A / B form a complete lattice. We can therefore appeal to the well-known theorem of Knaster and Tarski for solving recursion equations. A modern proof of this theorem can be found in =-=[5]-=-. Theorem 1. Let (L; ) be a complete lattice, and let OE : L / L be a monotonic function. Then the equation OE x = x has a least solution which is also the least solution of OE xsx . Quotient. Suppose... |

419 |
Category Theory for Computer Science
- Barr, Wells
- 1990
(Show Context)
Citation Context ...ory, namely category, functor, terminal object, product, coproduct, and algebra for an endofunctor. Readers not familiar with this material can find it (for example) in the textbook by Barr and Wells =-=[2]-=-. There are also a number of introductions that focus on applications to program derivation [6, 11, 12, 14, 17]; these are especially suited as background for the present paper. 3.1 Relations Sets are... |

107 |
Data structures and program transformation
- Malcolm
- 1990
(Show Context)
Citation Context ...tor. Readers not familiar with this material can find it (for example) in the textbook by Barr and Wells [2]. There are also a number of introductions that focus on applications to program derivation =-=[6, 11, 12, 14, 17]-=-; these are especially suited as background for the present paper. 3.1 Relations Sets are denoted by upper case identifiers: A; B ; C . A relation between A and B is a subset of the cartesian product ... |

99 |
and Order in Algorithms
- Law
- 1992
(Show Context)
Citation Context ...tor. Readers not familiar with this material can find it (for example) in the textbook by Barr and Wells [2]. There are also a number of introductions that focus on applications to program derivation =-=[6, 11, 12, 14, 17]-=-; these are especially suited as background for the present paper. 3.1 Relations Sets are denoted by upper case identifiers: A; B ; C . A relation between A and B is a subset of the cartesian product ... |

90 |
Algebraic approaches to program semantics
- Arbib, Manes
- 1986
(Show Context)
Citation Context ... = ([f ])) j (h \Delta ff = f \Delta Fh): Not all functors Fun / Fun have an initial algebra, for example, the existential image functor P does not. However, all polynomial functors Fun / Fun do (see =-=[13]-=-). The class of polynomial functors is inductively defined by the following clauses: 1. The identity functor and constant functors are polynomial; 2. if F and G are polynomial, then so are their compo... |

62 |
A fixpoint theorem for complete categories
- Lambek
- 1968
(Show Context)
Citation Context ...R \Delta ff = S \Delta FR) j (R = ([S ])) (R \Delta ff ` S \Delta FR) ) (R ` ([S ])) (R \Delta ff ' S \Delta FR) ) (R ' ([S ])): It is well-known that the initial algebra ff is in fact an isomorphism =-=[9]-=-, and therefore we have, for instance, (R = S \Delta FR \Delta ff ffi ) j (R = ([S ])): 4 Dynamic Programming In this section we restate a result of De Moor [15]. Throughout, we assume F is a relator ... |

58 |
Optimal sequencing of a single machine subject to precedence constraints
- Lawler
- 1973
(Show Context)
Citation Context ...(y ; a), and one may compute y\Omega a in linear time. Using well-known program transformations, this naive program can be transformed into a quadratic time program, thus obtaining Lawler's algorithm =-=[10]-=-. There is a yet more efficient implementation of the same greedy strategy, which only requires O(n log 2 n) computation steps [7]. The general questions we are interested in are these: how is the dyn... |

36 |
Homomorphisms and promotability
- Malcolm
- 1989
(Show Context)
Citation Context ...tor. Readers not familiar with this material can find it (for example) in the textbook by Barr and Wells [2]. There are also a number of introductions that focus on applications to program derivation =-=[6, 11, 12, 14, 17]-=-; these are especially suited as background for the present paper. 3.1 Relations Sets are denoted by upper case identifiers: A; B ; C . A relation between A and B is a subset of the cartesian product ... |

26 | Applications of a Strategy for Designing Divide-and-Conquer Algorithms - Smith - 1987 |

25 |
der Woude. A relational theory of datatypes
- Aarts, Backhouse, et al.
- 1992
(Show Context)
Citation Context ...re relators. For any relator F , the initial algebra ff of F : Fun / Fun is also an initial algebra of F : Rel / Rel . We also have that ([R]) is simple if R is. Proofs of these facts can be found in =-=[1, 15]-=-. In the category of functions, the universal property of the initial algebra ff can only be specified as an equation, for equality is the only way of comparing two functions. For relations, the situa... |

17 |
A categorical approach to the theory of lists
- Spivey
- 1989
(Show Context)
Citation Context |

13 |
A 2-categorical approach to geometric morphisms
- Carboni, Kelly, et al.
- 1991
(Show Context)
Citation Context ...l / Rel is monotonic if R ` S implies FR ` FS . The following theorem states the most important properties of monotonic functors. A detailed proof can be found in the paper by Carboni, Kelly and Wood =-=[4]-=-. Proposition 4. Suppose that F : Rel / Rel is monotonic. Then -- F preserves functions, i.e. for all f in Fun, Ff is a function. -- F preserves converse, i.e. F(R ffi ) = (FR) ffi . 8 Richard Bird an... |

9 |
Categories, relations and dynamic programming. D.Phil. thesis
- Moor
- 1992
(Show Context)
Citation Context ...k of that paper. The conclusion was that a more flexible framework was needed, and this observation motivated one of us to undertake an in--depth study of dynamic programming in a categorical setting =-=[15]-=-. The present paper summarises the results on dynamic programming, and shows how they can be extended to a theory of greedy algorithms. The structure of the paper is as follows. First we study a typic... |

7 |
List partitions
- Bird, Moor
- 1993
(Show Context)
Citation Context ...icable, and if an additional monotonicity condition is satisfied, then we can narrow the choice of decompositions to a single candidate, thus obtaining a greedy algorithm. This idea was formalised in =-=[3]-=- for a restricted class of optimisation problems, namely those involving list partitions. Although it was suggested that the technique might be more widely applicable, it proved difficult to formulate... |

2 |
Greedoids, volume 4 of Algorithms and combinatorics
- Korte, Lovasz, et al.
- 1991
(Show Context)
Citation Context ...nder which a greedy solution is possible, but does not discuss mathematical systems in which the greedy condition is valid. Two such systems are known: those of a matroid and those of a greedoid (see =-=[8]-=-). Essentially, the verification of the greedy condition for the maximum lateness problem is an application of greedoid theory. It remains to be seen whether our approach gives further insight into su... |

1 |
An O(n log n) algorithm for the maximum weighted tardiness problem
- Hochbaum, Shamir
- 1989
(Show Context)
Citation Context ...lled a schedule, of x that minimises a certain function c, called the cost function. This cost function returns the so-called maximum lateness of a schedule, and this explains the name of the problem =-=[7]-=-. The maximum lateness problem is specified as a relation mt , where mt = min(c) \Delta perms : The function perms returns the set of all permutations of a bag. That is, perms y = f x j bagify x = y g... |