so as to complete the most difficult tasks at the least cost