Challenge Jan-2023

Christmas Model created by ChatGPT                                                    Solutions

This model defines a set of people, a set of gifts, and the happiness level and cost of each gift. The objective is to maximize the total happiness, subject to the budget constraint that the total cost of the gifts must be less than or equal to the budget, and the constraint that each person can only receive one gift.

Here is a sample of test data:

PEOPLE:  “Alice”, “Bob”, “Carol”, “Dave”, “Eve”
GIFTS: “Book”, “Toy”, “Chocolate”, “Wine”, “Flowers”
GIFT COSTS: 10, 20, 5, 15, 7
HAPPINESS:
“Book”: [3, 2, 5, 1, 4]
“Toy”: [5, 2, 4, 3, 1]
“Chocolate”: [1, 3, 4, 5, 2]
“Wine”: [2, 5, 3, 4, 1]
“Flowers”: [4, 3, 1, 2, 5]
BUDGET: 50

Please submit your solutions using your favorite BR/DM tool or just common sense.

Solutions: