Affiliation:
1. Snake Island Research Inc., 18 Fifth St., Ward's Island, Toronto, Canada M5J 2B9
Abstract
Dynamic programming is used infrequently by APL programmers, in spite of its ability to reduce the computational effort required to solve many problems. This paper uses the
String Shuffle
problem as the basis for a comparison of brute force, recursive, and dynamic programming algorithms. Simple algorithms for each of these approaches are designed and evaluated, then individually optimized and re-evaluated, to show the benefits of dynamic programming.
The dynamic programming algorithm is then recast to use flow control structures recently introduced into ISI J and APL*PLUS III. Use of control structures in conjunction with dynamic programming results in orders of magnitude performance improvement over brute force and naive recursive algorithms. APL*PLUS III control structures are shown to provide a performance improvement of up to 30% over GOTO-based loops.
Publisher
Association for Computing Machinery (ACM)
Reference11 articles.
1. Robert Bemecky and Paul Berry. SHARP APL Reference Manual. iverson Software Inc. 33 Major St. Toronto Canada 2nd edition 1993. Robert Bemecky and Paul Berry. SHARP APL Reference Manual. iverson Software Inc. 33 Major St. Toronto Canada 2nd edition 1993.
2. Richard Bellman. Dynamic Programming. Princeton University Press 1957. Richard Bellman. Dynamic Programming. Princeton University Press 1957.
3. Profiling, performance, and perfection (tutorial session)