October 4, 2007
Prove the thinning theorem by fold fusion. Horrifyingly, I could not do it anymore! Have my skills become rusty due to lack of practice in the past few years?
[More ...]
- 0 Comments
Tags: Program Derivation, Thinning Theorem.
June 20, 2007
Given a list, zip its first half with the reverse of its second half, in only “one and a half” traversals of the list.
[More ...]
- 4 Comments
Tags: Haskell, Program Derivation.
It may be surprising that variations of the maximum segment sum (MSS) problem, a textbook example for the squiggolists, are still active topics for algorithm designers. These literate Haskell scripts presents a program solving two recently studied variations: computing the maximum sum of segments not longer than an upper-bound, and the maximum density (average) of segments not shorter than a lower-bound. 2007/06/26 Update: fixed binary search.
2007/11/04 Update: linear time algorithm for MSDL.
[More ...]
- 0 Comments
Tags: Greedy Theorem, Program Derivation, Segment Problems, Thinning Theorem.
R. S. Bird and S-C. Mu, Countdown: a case study in origami programming. In Journal of Functional Programming Vol. 15(5), pp. 679-702, 2005.
[GZipped Postscript]
[More ...]
- 0 Comments
Tags: Haskell, Program Derivation, Program Inversion, Thinning Theorem.
R. S. Bird and S-C. Mu, Inverting the Burrows-Wheeler transform. In Journal of Functional Programming Vol. 14(6) Special Issue on Functional Pearls, pp. 603-612, Novermber 2004.
[GZipped Postscript]
[More ...]
- 0 Comments
Tags: Burrows-Wheeler Transform, Program Derivation, Program Inversion.
S-C. Mu and R. S. Bird, Theory and applications of inverting functions as folds. In Science of Computer Programming Vol. 51 Special Issue for Mathematics of Program Construction 2002, pp. 87-116, 2003.
[GZipped Postscript]
[More ...]
- 0 Comments
Tags: Converse-of-a-Function Theorem, Program Derivation, Program Inversion.
S-C. Mu and R. S. Bird, Rebuilding a tree from its traversals: a case study of program inversion. In The First Asian Symposium on Programming Languages and Systems, LNCS 2895, pp. 265-282, Bejing, 2003.
[GZipped Postscript]
[More ...]
- 0 Comments
Tags: Converse-of-a-Function Theorem, Program Derivation, Program Inversion.
S-C. Mu, A Calculational Approach to Program Inversion. D.Phil Thesis. Oxford University Computing Laboratory. March 2003
[GZipped Postscript][PDF]
[More ...]
- 0 Comments
Tags: Converse-of-a-Function Theorem, Greedy Theorem, Program Derivation, Program Inversion, Thinning Theorem.
S-C. Mu and R. S. Bird, Inverting functions as folds. In Sixth International Conference on Mathematics of Program Construction, Dagstuhl, Germany, July 2002
[GZipped Postscript]
[More ...]
- 0 Comments
Tags: Converse-of-a-Function Theorem, Program Derivation, Program Inversion.
R. S. Bird, J. Gibbons and S-C. Mu, Algebraic methods for optimisation problems. In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, LNCS 2297, pp. 281-307, January 2002.
[PDF]
[More ...]
- 0 Comments
Tags: Program Derivation, Program Inversion, Thinning Theorem.