1) Implemented the randomized algorithm for the mapper