Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

Step: 1

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Information Systems

Authors: Ulric J. Gelinas, Richard B. Dull

10th edition

9781305176218, 113393594X, 1305176219, 978-1133935940

More Books

Students also viewed these Algorithms questions

Question

3. Name and describe the main types of spirits.

Answered: 1 week ago