Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given a sorted list T of n integers and an integer k , we want to partition T into k contiguous segments such that every

Given a sorted list T of n integers and an integer k, we want to partition T into k contiguous segments such that every element of T is in a segment, and the maximum sum of elements in any segment is minimal. For example, if T=[100,200,300,400,500] and k=2, then the best partitioning is 100,200,300 for the first segment and 400,500 for the second segment because it leads to a sum of 600 in the first and 900 in the second. There isn't a way to partition T so that the sum of elements in each segment is less than 900.
(a) Find lower and upper bounds for the maximum sum of elements in a segment in any partitioning of T. You may assume that every integer in T is less than some integer N.
(b) Give an algorithm which determines whether T can be partitioned into k contiguous segments such that the sum of elements in each segment is less than some constant c.
(c) Combine your solutions from parts (a) and (b) to design a divide and conquer algorithm which finds an optimal partitioning of T.
[
(d) Analyze the running time of your algorithm.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

Understand how to design effective service guarantees.

Answered: 1 week ago