Understanding the principles of cost optimization