Changed return value for getMaxArcCost in NewGraph