Some algorithms that I have played with.