A challenge that arises in databases is how to summarize data in easy-to-display formats, such as...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A challenge that arises in databases is how to summarize data in easy-to-display formats, such as a histogram. A problem in this context is the minimal imbalance problem. The input consists of an array A containing n positive numbers and an integer k. Consider k indices j1.j2,.jk that partition the array into k+1 subarrays A[1j1], Alj1 +1.j2), ., A[jk + 1, n]. The weight w(i) of the ith subarray is the sum of its entries. The ΣLA1 k +1 max w(i) imbalance of the partition is That is, the imbalance is the maximum deviation of any partition from the average size. a) Give an algorithm for determining the partition with minimal imbalance given A, n and k. (This basically corresponds to finding a histogram with k + 1 bars as close to equal as possible.) Σ b) Explain how your algorithm would change if the imbalance was redefined to be ΣLA k +1 A challenge that arises in databases is how to summarize data in easy-to-display formats, such as a histogram. A problem in this context is the minimal imbalance problem. The input consists of an array A containing n positive numbers and an integer k. Consider k indices j1.j2,.jk that partition the array into k+1 subarrays A[1j1], Alj1 +1.j2), ., A[jk + 1, n]. The weight w(i) of the ith subarray is the sum of its entries. The ΣLA1 k +1 max w(i) imbalance of the partition is That is, the imbalance is the maximum deviation of any partition from the average size. a) Give an algorithm for determining the partition with minimal imbalance given A, n and k. (This basically corresponds to finding a histogram with k + 1 bars as close to equal as possible.) Σ b) Explain how your algorithm would change if the imbalance was redefined to be ΣLA k +1
Expert Answer:
Answer rating: 100% (QA)
a Algorithm for determining the partition with minimal imbalance Step 1 Initialize an array A of n positive numbers and an integer k Step 2 Set the maximum imbalance to infinity Step 3 Generate all po... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-1133935940
10th edition
Authors: Ulric J. Gelinas, Richard B. Dull
Posted Date:
Students also viewed these algorithms questions
-
A natural convection air heater consists of an array of parallel, equally spaced vertical plates, which may be maintained at a fixed temperature Ts by embedded electrical heaters. The plates are of...
-
A computer consists of an array of five printed circuit boards (PCBs), each dissipating P b = 20 W of power. Cooling of the electronic components on a board is provided by the forced flow of air,...
-
Refer to Problem 14-45. Explain how your answers would change for each independent situation indicated below: In problem 14-45 Holly funded the Holly Marx Trust in January 2015. The entire trust...
-
Landry State University, a public university located in Louisiana, has a June 30 fiscal year. On July 20 of the current year, Landry State University receives $2,125,000 in payments from the U.S....
-
Consider a tennis tournament for n players, where n = 2k, k Z+. In the first round n/2 matches are played, and the n/2 winners advance to round 2, where n/4 matches are played. This halving process...
-
Use the given figure, translation vectors v and w, and reflection lines l and m to construct the indicated glide reflections. Show the figure in the positions before and after the glide reflection....
-
In the months leading up to the 2016 election, Christopher Steele, a former British intelligence agent, was hired by a Washington, D.C., research firm to investigate whether then-candidate Donald...
-
Having rejected a tariff on textiles (a tax on imports), the president of Isoland is now considering the same-sized tax on textile consumption (including both imported and domestically produced...
-
A crystal was analyzed using X-ray diffraction with radiation from a copper source. The observed angle was 8.61. Determine the distance between layers of the crystal. d = Element (pm) CO 179 Cr 229...
-
SuperCity is a large retailer of electronics and appliances. The store sells three different models of TVs that are ordered from different manufacturers. The demands, costs, and storage requirements...
-
Angie's Amazing Getups Incorporated is a Canadian controlled private corporation with a head office in London, Ontario. The company is a manufacturer of high end custom costumes and makeup used in...
-
Why is the cultural environment (& being aware of race diversity in the workplace) important for someone who wants to pursue a career as a manager across cultures?
-
The amount of carbon-14 present in animal bones after t years is given by P(t) = Poe 0.00012097t. A bone has lost 13% of its carbon-14. How old is the bone? To the nearest year, what is the age of...
-
The following is an alphabetical list of accounts and balances for J. Anderson, proprietorship, at June 30, 2024: Accounts Payable $11,800 Notes Payable $28,200 Accounts Receivable 9,650 Prepaid...
-
Calculate the adjusted cash balance per the books of XYZ Co. given the following information. Item Amount Balance per bank statement $600 Balance per cash account book balance 710 Deposit in transit...
-
Laura has decided to use Self Mediation with Peter For the first several minutes of the meeting, Peter angrily accuses Laura of causing the conflict and details his reasons for believing Laura is at...
-
How do emergent properties of complex adaptive systems influence the formulation and execution of organizational strategy in dynamic environments?
-
You deposit $10,000 in a savings account that earns 7.5% simple interest per year. What is the minimum number of years you must wait to double your balance? Suppose instead that you deposit the...
-
Using Figure, speculate about the kinds of data that might be running along the data flow that comes from the accounts receivable master data to bubble 2.1. Be specific and be prepared to defend your...
-
Among the three functional entities (marketing, finance, and logistics) shown in Figure, what goal conflicts could exist, and how might this affect the results of the OE/Sprocess? VP MARETING VP...
-
Choose ( or you instructor may designate) an ERP add- on module ( such as CRM, SCM, PLM, or SRM). Describe how Skullcandy ( or another organization selected by your instructor) might use the module...
-
What is the minimum speed for orbiting Earth in a close orbit? What is the maximum speed? What happens above this speed?
-
What connection did Newton make between a falling apple and the Moon?
-
Why will a projectile that moves horizontally at 8 km/s follow a curve that matches the curvature of Earth?
Study smarter with the SolutionInn App