The question below seems to be the knapsack problem. I have nopreference for language but either Python or C/C++ are the best.I’m especially struggling with figuring out how to determine boththe maximum total price of items AND the items that each familymember should select. I also have difficulty finding the runningtime for dynamic programming problems. I have seen similar (butslightly different) questions on Chegg, so please don’t copy theirsolutions. Thank you. —– Acme Super Store is having a contest to give away shoppingsprees to lucky families. If a family wins a shopping spree eachperson in the family can take any items in the store that he or shecan carry out, however each person can only take one of each typeof item. For example, one family member can take one television,one watch and one toaster, while another family member can take onetelevision, one camera and one pair of shoes. Each item has a price(in dollars) and a weight (in pounds) and each person in the familyhas a limit in the total weight they can carry. Two people cannotwork together to carry an item. Your job is to help the familiesselect items for each person to carry to maximize the total priceof all items the family takes. Write an algorithm to determine themaximum total price of items for each family and the items thateach family member should select. a) A verbal description and give pseudo-code for your algorithm.Try to create an algorithm that is efficient in both time andstorage requirements. b) What is the theoretical running time of your algorithm forone test case given N items, a family of size F, and family memberswho can carry at most Mi pounds for 1 Attached
At www.ukbestessays.net, we help students cope with college assignments and write papers on a wide range of topics. We deal with academic writing, creative writing, and technical assignments.
Send us an email:
SMS or WhatsApp:
+1 (940) 905 5542