- I have items called 'Resources' from 1 to 7.
- I have to use them in different actions identified from 1 to 10.
- I can do a maximum of 4 actions each time. This is called 'Operation'.
- The use of a resource has a cost of 1 per each 'Operation' even if it is used 4 times.
- The following table indicates the resources needed to do the related actions:
| | Resources | |--------|----------------------------------| | Action | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |--------|----------------------------------| | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | | 2 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | | 3 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | | 4 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | 5 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | | 6 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | | 7 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | 8 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | | 10 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
The objective is to group all the 'Actions' in 'Operations' that minimize the total cost. For example, a group composed by actions {3, 7, 9} needs the resources {1, 2, 3, 4, 6} and therefore has a cost of 5, but a group composed by actions {4, 7, 9} needs the resources {2, 4} and therefore has a cost of 2.
It is needed to get done all the actions the most economically.
Which algorithm can solve this problem?