Make it practical
Isao Sasano, Zhenjiang Hu, Masato Takeichi et al. · ACM SIGPLAN International Conference on Functional Programming (ICFP) · 2000
In this paper we propose a new method for deriving a practical linear-time algorithm from the specification of a maximum-weightsum problem: From the elements of a data structure x, find a subset which satisfies a certain property p and whose weightsum is maximum. Previously proposed methods for automatically generating linear-time algorithms are theoretically appealing, but the algorithms generated are hardly useful in practice due to a huge constant factor for space and time. The key points of our approach are to express the property p by a recursive boolean function over the structure x rather than a usual logical predicate and to apply program transformation techniques to reduce the constant factor. We present an optimization theorem, give a calculational strategy for applying the theorem, and demonstrate the effectiveness of our approach through several nontrivial examples which would be difficult to deal with when using the methods previously available.
Cited by 40 works. doi:10.1145/351240.351254 Open-access PDF
Authors
References
- Introduction to Algorithms
- Handbook of theoretical computer science
- Complexity of Finding Embeddings in a k -Tree
- Graph minors. II. Algorithmic aspects of tree-width
- An Introduction to the Theory of Lists
- The monadic second-order logic of graphs. I. Recognizable sets of finite graphs
- Graph Rewriting: An Algebraic and Logic Approach
- Linear-time computability of combinatorial problems on series-parallel graphs
- Functional programming with bananas, lenses, envelopes and barbed wire
- Linear-time computation of optimal subgraphs of decomposable graphs