Map reduce implementation of scenario selection algorithm.