Ruby and Java Implementations of some of the algorithms