Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A factory has N machines numbered 0 to n 1, the ith machine has a output score of wi, this is a non-negative integer. The

A factory has N machines numbered 0 to n 1, the ith machine has a output score of wi, this is a non-negative integer. The N is broken up into m groups, numbered 0 to m 1, the groups are specied by a sequence of non-negative integers d0 < d1 < ... < dm1. All machine numbered 0,...,d0 1 are in group 0. For j > 0 all machine numbered dj1,...dj 1 are in group j. It always holds that dm1 = n so every machine is in precisely one group. Create section consisting of k machines, maximizing their total output score. There is restriction that group of the machine is allowed to contribute more than 5 machines to the section. (a) Devise an algorithm that given n, m, k min(n,5m), w0,...,wn1 and d0,...,dm1 computes a valid section(with k machines so that no groups contributes more than 5 machines) with maximum total output score. For full score the running time of your algorithm should be O(nlogn). (b) Prove that your algorithm always outputs a valid section with maximum possible total score. (c) Analyze the time complexity of your algorithm (in terms of big-Oh).

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

Visualizing Health And Healthcare Data Creating Clear And Compelling Visualizations To See How Youre Doing

Authors: Katherine Rowell ,Lindsay Betzendahl ,Cambria Brown

1st Edition

1119680883, 978-1119680888

More Books

Students also viewed these Databases questions