Calculating the probablitites in parallel. Changed cout to fprintf so that it writes the output on a separate file for each processor.