Question: 2 The Delivery Problem: A Delivery company has a set of boxes to deliver. Each box has a value and a weight. It has one
The Delivery Problem:
A Delivery company has a set of boxes to deliver. Each box has a value and a weight. It has one delivery vehicle.
You are given a capacity which is the maximum total weight that can be transported and a quota which is
the minimum total value that you want to carry at any one time. The problem is to find a subset of the objects
whose total weight is at most equal to the capacity and whose total value is at least equal to the quota
For example, given these three objects:
and a capacity of and a quota of then a solution to the problem is the set Note that there is no
solution involving object because once you have loaded you cannot load any of the other two. You are not
allowed to choose a fraction of an object.
There are at most objects.
A name is a single alphabetical character.
All quotas, capacities, weights, and values are integers.
An example is given below:
capcity
quota
num objects
Object Wgt Value
A
B
C
D
E
F
G
H
I
Your programs should output the solution set, the total weight and the total value. Also output the generation
in which the solution was found.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
