IBM ILOG Solver User's Manual > The Basics > Using Objectives: Map Coloring with Minimum Colors > Review exercises

For answers, see "Suggested answers".

  1. What is relaxing constraints?
  2. What is an objective?
  3. Add an objective to the changing money problem you worked on in Chapter 3, Using Arrays and Basic Search: Changing Money. Assume that you want to pay for an item that costs 1.23 euros. You have a mixture of coins of the following types: 1 euro cent, 10 euro cents, 20 euro cents, and 1 euro. To make the problem more interesting, assume that you have only 5 coins of 1 euro cent. You prefer to pay for the item using as many of your lower denomination coins as possible. Create an objective that uses the following coefficients to represent the importance of using each type of coin: 1000 (1 euro cent), 800 (10 euro cents), 300 (20 euro cents), and 10 (1 euro). Change the code so that you only search for one maximized solution.
  4. Add a different objective to the original changing money problem you worked on in Chapter 3, Using Arrays and Basic Search: Changing Money. This time, instead of trying to pay for the item using as many of your lower denomination coins as possible as in Exercise 3, try to use as few coins as possible. Assume that you want to pay for an item that costs 1.23 euros. You have a mixture of coins of the following types: 1 euro cent, 10 euro cents, 20 euro cents, and 1 euro. To make the problem more interesting, assume that you have only 5 coins of 1 euro cent. Create an objective that minimizes the number of coins using the function IloMinimize. Change the code so that you only search for the minimized solution.