An interval's weight is defined as the reciprocal of the interval size. For example if an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
An interval's weight is defined as the reciprocal of the interval size. For example if an interval contains two elements, then its weight is 1/2; and it contains 5 elements, its weight is then 1/5. Given a sorted array A in increasing order and an integer k, the interval [i, j] contains j-i+1 elements, and thus it has a weight 1/(j-i+1). The weighted minimum good interval cover problem is to find a group of good intervals that the total interval weight is minimized. The intervals are mutually disjoint. For Example, If A is [20, 21, 25, 26, 30, 31, 32, 34,37,39], and k is 7. [1, 3] is a good interval and its weight is 1/3-1/(3-1 + 1). [2, 2] is a good interval and its weight is 1=1/(2-2 + 1). There can be multiple groups of intervals that can cover all elements in A. We list out several good interval covers and the total weight as shown below. Actually, one can find that the sum of intervals' weight can not be less than 11/12. The [1, 4], [5, 7], [8, 10] (The fourth line) is a weighted minimum good interval cover.< 2 Good Intervals Sum of intervals weight [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/3+1/3+1/2+1/2-5/3 [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/2+1/2+1/2+1/2+1/2-5/2 [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/4+1/5+1=29/20 [20, 21, 25, 26, 30, 31, 32, 34, 37,39] 1/4+1/3+1/3=11/12 I 1 1) Suppose that A is [1, 3, 5, 6, 8, 13, 14, 17, 19, 20, 25], and k is 8, Please write out a weighted minimum good interval cover. (20% ) < 2) Now, given any sorted array A in increasing order and a positive integer k, please design a dynamic programming algorithm to find a weighted minimum good interval cover for A. What is the running time in terms of big-Oh. (20%) An interval's weight is defined as the reciprocal of the interval size. For example if an interval contains two elements, then its weight is 1/2; and it contains 5 elements, its weight is then 1/5. Given a sorted array A in increasing order and an integer k, the interval [i, j] contains j-i+1 elements, and thus it has a weight 1/(j-i+1). The weighted minimum good interval cover problem is to find a group of good intervals that the total interval weight is minimized. The intervals are mutually disjoint. For Example, If A is [20, 21, 25, 26, 30, 31, 32, 34,37,39], and k is 7. [1, 3] is a good interval and its weight is 1/3-1/(3-1 + 1). [2, 2] is a good interval and its weight is 1=1/(2-2 + 1). There can be multiple groups of intervals that can cover all elements in A. We list out several good interval covers and the total weight as shown below. Actually, one can find that the sum of intervals' weight can not be less than 11/12. The [1, 4], [5, 7], [8, 10] (The fourth line) is a weighted minimum good interval cover.< 2 Good Intervals Sum of intervals weight [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/3+1/3+1/2+1/2-5/3 [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/2+1/2+1/2+1/2+1/2-5/2 [20, 21, 25, 26, 30, 31, 32, 34, 37,39 1/4+1/5+1=29/20 [20, 21, 25, 26, 30, 31, 32, 34, 37,39] 1/4+1/3+1/3=11/12 I 1 1) Suppose that A is [1, 3, 5, 6, 8, 13, 14, 17, 19, 20, 25], and k is 8, Please write out a weighted minimum good interval cover. (20% ) < 2) Now, given any sorted array A in increasing order and a positive integer k, please design a dynamic programming algorithm to find a weighted minimum good interval cover for A. What is the running time in terms of big-Oh. (20%)
Expert Answer:
Answer rating: 100% (QA)
1 Weighted Minimum Good Interval Cover Example If A is 1 3 5 6 8 13 14 17 19 20 25 and k is 8 here i... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Use Table 2-5 to find the seven-bit ASCII code for the backslash character (\). TABLE 2-5 Standard ASCII codes. Character NUL (null) Start Heading Start Text End Text End Transmit. Enquiry Acknowlege...
-
Refer to all of the facts in Problem 12-6. Required 1. Using the format in the chapters appendix, prepare a statement of cash flows work sheet. 2. Prepare a statement of cash flows for 2014 using the...
-
A diffusion couple similar to that shown in Figure 5.1a is prepared using two hypothetical metals R and S. After a 2.5-h heat treatment at 750(C the concentration of R is 4 at% at the 4-mm position...
-
Part I Mindy Feldkamp and her two colleagues, Oscar Lopez and Lori Melton, are personal trainers at an upscale health spa/resort in Tampa, Florida. They want to start a health club that specializes...
-
Draw a graph similar to the one shown in exhibit 13.4 and explain its implications. Exhibit 13.4 EXHIBIT 13.4 Bayside Memorial Hospital: Corporate and Project Costs of Capital Project Cost of Capital...
-
The Madison Corporation is authorized to issue $800,000 of five-year bonds dated June 30, 2007, with a face rate of interest of 11%. Interest on the bonds is payable semiannually and the bonds are...
-
Ahmed, a foreign qualified accountant, has recently returned to Pakistan and has joined a newly incorporated company Radium Limited (RL), a subsidiary of a listed company. Ahmed has been entrusted...
-
Its Just Lunch is a nationwide service company that arranges lunch dates for clients. Its Just Lunch collects cash up front for a package of dates. Suppose your group is opening an Its Just Lunch...
-
At the end of 10 years, you want to have $75,000 saved for a down payment on a house. You expect to earn 10%-compounded annually-on your investment over the next 10 years. a How much would you have...
-
What challenges are generally associated with remote working? 2) What benefits are generally associated with remote working? 3) Given your personal experience with online college courses and/or...
-
Anna received 100 shares of India Stock as a gift from her best friend on March 23, Year 2, when the fair market value was $42 per share. Her friend had purchased the stock on February 12, Year 1,...
-
How can nonfinancial managers contribute to an organization's financial viability? Please explain.
-
Idenfy at least three common bases for materiality and calculate the range of materiality for the current year for each base. (6 marks) b. Conclude on the most appropriate materiality and include a...
-
What is ancient greece and what are somethings about ancient greece what do they do there and what do they eat?
-
What is the typical extent to which ownership is separated from voting rights in crowdfunding campaigns on Crowd cube? Does offering a greater separation of ownership and control improve the...
-
The following selected accounts and normal balances existed at year-end. Notice that expenses exceed revenue in this period. Make the four journal entries required to close the books: Accounts...
-
Show how to determine in O(n 2 lg n) time whether any three points in a set of n points are colinear.
-
One way to determine whether a point p 0 is in the interior of a simple, but not necessarily convex, polygon P is to look at any ray from p 0 and check that the ray intersects the boundary of P an...
-
Professor Stewart is consulting for the president of a corporation that is planning a company party. The company has a hierarchical structure, that is, the supervisor relation forms a tree rooted at...
-
a. For the allowed energies of a particle in a box to be large, should the box be very big or very small? Explain. b. Which is likely to have larger values for the allowed energies: an atom in a...
-
The molecules in the rods and cones in the eye are tuned to absorb photons of particular energies. The retinal molecule, like many molecules, is a long chain. Electrons can freely move along one...
-
What was the approximate activity of the plutonium source at the start of the mission? A. \(2 \times 10^{21} \mathrm{~Bq}\) B. \(2 \times 10^{19} \mathrm{~Bq}\) C. \(2 \times 10^{17} \mathrm{~Bq}\)...
Study smarter with the SolutionInn App