Implementation of some Algorithms