| | |
Summary: Lazy DynamicProgramming can be Eager.
L. Allison,
Department of Computer Science,
Monash University,
AUSTRALIA 3168.
email: lloyd@cs.monash.edu.au
December 1991
Revised May 1992
Abstract. Lazyevaluation in a functional language is exploited to make the simple dynamicprogramming
algorithm for the editdistance problem run quickly on similar strings: being lazy can be fast.
Keywords: dynamicprogramming, editdistance, functional programming, lazy evaluation.
1. Introduction.
The editdistance problem[$Sell] is to find the minimum number of pointmutations, D A B, required
to edit one given string A into another given string B. A pointmutation is one of the following: change a
letter, insert a letter, or delete a letter. Sometimes one also wants to find a minimal set of mutations that
edits A into B. The problem, and variations on it, are important in MolecularBiology for comparing linear
macromolecules for similarity[$Sank][$Bish]. It also arises in spelling correction, file comparison and
other "computing" problems[$Wagn]. It is closely related to the longestcommonsubsequence problem.
There is a large body of work in the computing and biological literature on algorithms, in imperative
languages, for the editdistance problem and its relatives.
|