Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, I am not sure how to solve this question. Any help appreciated. DAC Investments is a finance company that has a team of k

Hi, I am not sure how to solve this question. Any help appreciated.image text in transcribed

DAC Investments is a finance company that has a team of k bankers. The i th banker manages M[i] dollars worth of investments, and has a performance rating of P[i]. The bankers are indexed in decreasing order of performance rating. The profitability of DAC Investments is given by (M[1]++M[k])min(P[1],,P[k]). For example, if M=[4,8,2,7,1] and P=[9,6,3,3,2], then the profitability is (4+8+2+7+1)min(9,6,3,3,2)=222=44. 2.1 [2 marks] DAC Investments has recently received a letter from the CEO, advising them that his nephew is looking for work. Although the nephew's performance rating is no better than anyone in the team, DAC Investments have been strongly encouraged to hire him in place of one of the current team members. You are given integer arrays M[1..(k+1)] and P[1..(k+1)], representing the amounts managed and performance ratings respectively. In each array, the first k entries are for the current team members and the last entry is for the CEO's nephew. The performance ratings are listed in decreasing order. In order to hire the CEO's nephew, DAC Investments will have to remove one of their bankers. How should they select which banker to remove, while maximising profitability? For the remaining subquestions, suppose DAC Investments has been acquired by a large bank. There are now n employees available, so you are given integer arrays M[1..n] and P[1..n], the latter of which is again in decreasing order. From these n candidates, DAC Investments would like to select k team members. 2.2 [10 marks] Design an algorithm that runs in O(nk) time and determines the set of k employees that maximise the profitability of DAC Investments. 2.3 [8 marks] Design an algorithm that runs in O(nlogk) time and determines the set of k employees that maximise profitability

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

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

=+What forms of industrial action are common?

Answered: 1 week ago