Blog

Evaluating Simple Polynomials

July 12, 2010
I had a chance to show the students, in 25 minutes, what functional program calculation is about. The student have just been exposed to functional programming a week ago in a three-hour course, and I have talked to them about maximum segment sum way too many times. ... [11 comments...].

Sum of Squares of Differences

July 11, 2010
Given an array of integers having at least two elements, compute the sum of squares of the difference between all pairs of elements. It is not hard to quickly write up a O(N²) program using nested loops, which, I have to confess, is what I would do before reading Kaldewaij’s book and realised that it... [2 comments...].

An Exercise Utilising Galois Connections

May 6, 2010
In the recent work of Sharon and me on maximally dense segments we needed quite a number of functions to be monotonic, idempotent, etc. It only occurred to me after submitting the paper: could they be defined as Galois connections? ... [no comments...].

Finding Maximally Dense Segments

April 5, 2010
Sharon and I have finally concluded, for now, our work on the maximally dense segment problem (download the draft here), on which we have been working on and off for the past two years. Considering the algorithm itself and its derivation/proofs, I am quite happy with what we have achieved. The algorithm is rather complex,... [no comments...].

The Maximum Segment Sum Problem: Its Origin, and a Derivation

April 5, 2010
In a previous paper of mine, regrettably, I wrongly attributed the origin of the maximum segment sum problem to Dijkstra and Feijen’s Een methode van programmeren. In fact, the story behind the problem was told very well in Jon Bentley’s Programming Pearls. I learned the function derivation of the maximum segment sum problem from... [2 comments...].

[All blog posts...]

Software

  • Fully Polynomial-Time Approximation by Thinning: Code accompanying a forthcoming paper of Yu-Han Lyu, Akimasa Morihata, and me: Constructing Datatype-Generic Fully Polynomial-Time Approximation Schemes Using Generalised Thinning.
  • Maximally Dense Segments — Code and Proof: Code and proof accompanying our forthcoming paper Functional Pearl: Maximally Dense Segments.
  • AoPA — Algebra of Programming in Agda: The AoPA library allows one to encode Algebra of Programming style program derivation, both functional and relational, in Agda, accompanying the paper Algebra of Programming Using Dependent Types (MPC 2008) developed in co-operation with Hsiang-Shang Ko and Patrik Jansson.
  • Push: Improving Heap Residency for Lazy Stream Processing by Concurrency: Prototype implementation of a language Push, accompanying our recently submitted paper. The prototype is implemented and prepared by Ta-Chung Tsai.While studying XML stream processing, we noticed that programmers need concurrency to save space, especially in a lazy language. We propose the idea of pushing datatypes — when a pushing closure is demanded, all expressions referring
  • Maximum Segment Sum and Density with Bounded Lengths: 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

Academic Activities

Teaching:

Colleagues

Research assistants:
  • Yun-Yan Chi (jaiyalas) 郗昀彥,
  • Jian-Xin Lin (godfat) 林建欣,
  • Yu-Han Lyu 呂昱翰,
  • Ta-Chung Tsai 蔡大中.
Previous research assistants: