Implementations of major algorithms