Click here to Skip to main content
15,797,672 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 7:32
harold aptroot26-Jun-20 7:32 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 10:06
Member 1487381426-Jun-20 10:06 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 10:27
harold aptroot26-Jun-20 10:27 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 11:30
Member 1487381426-Jun-20 11:30 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 12:05
harold aptroot26-Jun-20 12:05 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 12:20
Member 1487381426-Jun-20 12:20 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 12:56
harold aptroot26-Jun-20 12:56 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 13:23
Member 1487381426-Jun-20 13:23 
But I'm not sure how I should treat the data in this case.

Let's suppose our sum of job times is S = 100.

We have k = 3 assignees.

We start by calling Algorithm1(100) == TRUE of course

Now we are calling Algorithm1(50) == TRUE

Now Algorithm1(25) == FALSE
So in this case we want to check the middle between [25, 50], so we can get that by calculating 0.5(*25 + 25*2), so that now we call Algorithm1(38) which returns TRUE

But what now? We would divide again 38 by 2 and go out of the range [25, 50].

See the problem?
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 13:33
harold aptroot26-Jun-20 13:33 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 13:59
Member 1487381426-Jun-20 13:59 
AnswerRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Gerry Schmitz26-Jun-20 6:47
mveGerry Schmitz26-Jun-20 6:47 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 10:10
Member 1487381426-Jun-20 10:10 
QuestionImplementation of the hash function in a HashMap Pin
terrybogard425-Jun-20 23:07
terrybogard425-Jun-20 23:07 
AnswerRe: Implementation of the hash function in a HashMap Pin
Alan Balkany8-Sep-20 7:16
Alan Balkany8-Sep-20 7:16 
QuestionAlgorithms work Pin
Member 1484318525-May-20 5:50
Member 1484318525-May-20 5:50 
AnswerRe: Algorithms work Pin
Dave Kreskowiak25-May-20 5:58
mveDave Kreskowiak25-May-20 5:58 
AnswerRe: Algorithms work Pin
Eddy Vluggen25-May-20 11:28
professionalEddy Vluggen25-May-20 11:28 
GeneralRe: Algorithms work Pin
Richard Deeming27-May-20 1:25
mveRichard Deeming27-May-20 1:25 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 9:59
professionalEddy Vluggen27-May-20 9:59 
AnswerRe: Algorithms work Pin
ZurdoDev27-May-20 10:46
professionalZurdoDev27-May-20 10:46 
GeneralRe: Algorithms work Pin
kalberts27-May-20 11:13
kalberts27-May-20 11:13 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 11:17
professionalEddy Vluggen27-May-20 11:17 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 11:14
professionalEddy Vluggen27-May-20 11:14 
AnswerRe: Algorithms work Pin
Patrice T28-May-20 23:20
mvePatrice T28-May-20 23:20 
Questionalgorithm Pin
Member 1483481217-May-20 0:57
Member 1483481217-May-20 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.