This ismy understanding about th e assignment,
Input: We have a set of baseball cards, each with a name (identifier), a market price (which indicates its selling price), and Gertrude's selling price. We also have a budget constraint, W, which is the maximum amount we can spend.
Objective: We want to select a subset of these cards such that the total cost of the cards (Gertrude's selling prices) does not exceed W and the profit (difference between the market price and Gertrude's price) is maximized.
Brute Force Solution: For each subset of cards, we need to calculate the total cost and profit and, track the subset with the maximum profit while adheringg to the budget constraint.
sample_cards = [
("JimRice1975", 1000, 100),
("RickyHenderson1983", 2000, 150),
("HonusWagner1933", 2000000, 202),
("DerekJeter1996", 300, 120)
]
budget = 300
The brute force solution for the sample set of cards with a budget of 300 genrates a max profit of 1,999,798 by purchasing the "HonusWagner1933" card from Gertrude.
if this is correct, we can connect through Chat for further discussion.
Please note, I can provide the code only after payment release. 7 Clients have taken the work without pay. Its disheartening.
Regards.