Using pararell processing to calculate the costs for the different lambdas