algorithm.txt: initial algorithm design for this problem