We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
2. In the BACKPACK problem, you are given a collection of books of different costs and...
Please help with question 2 (c). (2) Suppose, the game is updated so that every item, i, now has weight, wi], in kilograms (you can assume you are passed the item weights in an array, w, of size m). You can only carry n kilograms of weight. (a) (1 point) Example: Let n Ξ 15, m 5. If the item values are v (5.30, 17, 32, 40) and the item weights are w - 2,4, 3,6,15} which should you choose...
Give a decision problem corresponding to each of the search problems given below. (a) • Input: A set of classes to be scheduled. A list of pairs of the classes which can not be scheduled during the same period. • Output: The largest set of classes that can all be scheduled during the same period. Solution A • Input: A set of classes to be scheduled. A list of pairs of the classes which can not be scheduled during the...
A problem that can be solved by the Backtracking technique is the 'Sum-of-Subsets' problem. Given n distinct positive numbers (usually called weights), we want to find all possible subsets of these numbers whose sum (or weight) is W. A “binary” state space tree (like in the 0/1 Knapsack problem) can be constructed for this problem, where each level represents one of the n numbers. A left branch indicates that the number is included in the subset, and a right branch...
Python Problem, just need some guidance with the description, pseudocode and run time. I believe this is an 0-1 knapsack problem? Shopping Spree: (20 points) Acme Super Store is having a contest to give away shopping sprees to lucky families. If a family wins a shopping spree each person in the family can take any items in the store that he or she can carry out, however each person can only take one of each type of item. For example,...
Given the sequence an defined recursively as follows: an 3an-1+2 for n 2 1 Al Terms of a Sequence (5 marks) Calculate ai , аг, аз, а4, а5 Keep your intermediate answers as you will need them in the next question. A2 Iteration (5 marks) Using iteration, solve the recurrence relation when n21 (i.e. find an analytic formula for an). Simplify your answer as much as possible, showing your work and quoting any formula or rule that you use. In...
QUESTION 1 (39 MARKS) Suppose you choose 2 books that you are planning to read (the books selected must contain both Malay and English). Thus, there will be a total of 2n number of books, where n is the number of team members. Assume that this 2n is the size of population that is approximately normally distributed with mean and standard deviation ơ a) List the number of pages for each of the 2n books as in Table 1. Let...
You are considering opening a series of ice cream shops along a long, straight beach. There are n potential locations where you could open a shop, and the distance of these locations from the start of the beach are, in meters and in increasing order, d1, d2, d3, ...., dn; you may assume all of the di are integers. The constraints are as follows: • At each location you may open at most one ice cream shop. • The expected...
Shopping Spree: Acme Super Store is having a contest to give away shopping sprees to lucky families. If a family wins a shopping spree each person in the family can take any items in the store that he or she can carry out, however each person can only take one of each type of item. For example, one family member can take one television, one watch and one toaster, while another family member can take one television, one camera and...
Maximum Value But Limited Neighbors You are given an array a[1..n] of positive numbers and an integer k. You have to produce an array b[1..n], such that: (i) For each j, b[j] is 0 or 1, (ii) Array b has adjacent 1s at most k times, and (iii) sum_{j=1 to n} a[j]*b[j] is maximized. For example, given an array [100, 300, 400, 50] and integer k = 1, the array b can be: [0 1 1 0], which maximizes the...
2. The escape velocity for an object on the surface of the Earth is given by: 2GM = 1.12 x10 m/s VaR A projectile is launched from the surface of the earth at a velocity of v0.5vm. To what height above the Earth's surface does the projectile rise if air resistance is neglected? 3. A blimp is filled with 200m of helium. How much total weight (cargo plus the weight of the blimp itself) can the blimp carry? (b) If...