I have a real-world problem, and, unfortunately, being an engineer, I feel compelled to solve it.
I went to Walmart the other day and attempted to purchase eleven over-the-counter (OTC) health-related products totaling $104.07.
At checkout, $$61.54 of the total was approved for payment by my insurance OTC benefit card, while $42.53 of the total was not approved (which I paid for in cash.)
The receipt does NOT indicate which items were approved and which were not.
The problem I'm trying to solve is: Which items were approved and which were not?
The eleven items and their costs are as follows:
- Gauze pads 2.34
- Alcohol 3.48
- Antibiotic cream 4.12
- Lidocaine cream 4.94
- Bandages 4.97
- Hydrocortisone 7.12
- Peptobismol 8.56
- Toothpaste 10.59
- Melatonin 13.76
- Ibuprofan 19.71
- Loratadine 24.48
In summary: There are eleven elements in total divided into two sets.
Set "A" contains "n" elements totaling $61.54.
Set "B" contains "11-n" elements totaling $42.53.
What are the "n" elements contained in set "A"?
I don't have a clue as to how to go about solving this.
I do realize, however, that there may be more than one solution to this problem.
Edit: Taxes have been removed from the totals.