Menu

Going Backpacking Trip Shenandoah National Park Friend Two Completed Packing List Need Bri Q43784601

You are going on a backpacking trip through Shenandoah National park with your friend. You two have just completed the packinYou are going on a backpacking trip through Shenandoah National park with your friend. You two have just completed the packing list, and you need to bring n items in total, with the weights of the items given by W = (W1, W2,…,W). You need to divide the items between the two of you such that the difference in weights is as small as possible. The total number of items that each of you must carry should differ by at most 1. Use dynamic programming to devise such an algorithm, and prove its correctness and running time. You may assume that M is the maximum weight of all the items (i.e., Vi, w 5 M). The running time of your algorithm should be a polynomial function of n and M. The output should be the list of items that each will carry and the difference in weight. Show transcribed image text You are going on a backpacking trip through Shenandoah National park with your friend. You two have just completed the packing list, and you need to bring n items in total, with the weights of the items given by W = (W1, W2,…,W). You need to divide the items between the two of you such that the difference in weights is as small as possible. The total number of items that each of you must carry should differ by at most 1. Use dynamic programming to devise such an algorithm, and prove its correctness and running time. You may assume that M is the maximum weight of all the items (i.e., Vi, w 5 M). The running time of your algorithm should be a polynomial function of n and M. The output should be the list of items that each will carry and the difference in weight.

Expert Answer


Answer to You are going on a backpacking trip through Shenandoah National park with your friend. You two have just completed the p…

OR