algorithm for minimisation of time given profit is maximised
Show older comments

i am confused here as to how can the profit be maximised and time be minimised at the same time.. now if the profit is maximised then first i sort the profits and select the company first that has maximum profit for 1st month and so on till nth month .. i know the profit will be maximised here..but for the same permutation i have no idea if the time will be minimum ...help me understand ..thanks .. i am learning algorithms and new to this ..
7 Comments
William Rose
on 15 Feb 2022
Please explain what ideas you have to solve the problem, and show what you have tried so far to solve this problem. Then people will help you where something does not work as you expect. Thank you.
Malloju Dinesh
on 15 Feb 2022
Malloju Dinesh
on 15 Feb 2022
For each ordering of the n companies, you'll get a total profit and a total oversee time after n months.
Now, from the n! possible orderings, you are asked to determine the ordering that gives maximum total profit, but (since there might be more than one ordering with maximum total profit) with the least total oversee time.
At least this is my interpretation of the assignment.
Malloju Dinesh
on 15 Feb 2022
Read my comment again more carefully.
Say n = 3.
Say you get total profits and total oversee times as follows for the 6 possible orderings:
P1 = 200, T1 = 20
P2 = 150, T2 = 10
P3 = 70, T3 = 10
P4 = 180, T4 = 15
P5 = 200, T5 = 18
P6 = 190, T6 = 16
Now ordering 1 and 5 give maximum profit 200, but among these 2 possibilities, you choose ordering 5 because it has oversee time 18 < 20.
Malloju Dinesh
on 16 Feb 2022
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!