Click here to Skip to main content
15,902,718 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Solving a circularly recursive system of equations Pin
MikeMarq9-Dec-09 9:52
MikeMarq9-Dec-09 9:52 
GeneralRe: Solving a circularly recursive system of equations Pin
Tim Craig9-Dec-09 13:42
Tim Craig9-Dec-09 13:42 
AnswerRe: Solving a circularly recursive system of equations - I think I may have solved it Pin
MikeMarq7-Dec-09 16:49
MikeMarq7-Dec-09 16:49 
GeneralRe: Solving a circularly recursive system of equations - I think I may have solved it Pin
Gideon Engelberth7-Dec-09 17:18
Gideon Engelberth7-Dec-09 17:18 
GeneralRe: Solving a circularly recursive system of equations - I think I may have solved it Pin
MikeMarq7-Dec-09 18:19
MikeMarq7-Dec-09 18:19 
AnswerRe: Solving a circularly recursive system of equations Pin
mabo429-Dec-09 4:05
mabo429-Dec-09 4:05 
AnswerSuch Equations Don't Exist Pin
Som Shekhar15-Dec-09 7:42
Som Shekhar15-Dec-09 7:42 
QuestionAdvice about choice of algorithm Pin
thebiggestbangtheory25-Nov-09 11:06
thebiggestbangtheory25-Nov-09 11:06 
Dear all,
I am a newbie here, this is my first post. I have looked over a few algorithms and have searched this board for my question but have not been able to narrow down to a clear answer.

I am looking for any pointers/code/advice to help decide how to solve the following problem.

I have to write a program to suggest the starting time of a job. There is 1 CPU, and there are n jobs already scheduled on it and we know their run times. I can assume a run time (maybe a median of the known run times or something) for this new job. The constraint being at no time should there be more than m jobs running in parallel.

I think this problem is relatively simple. For a hammer and tongs solution, I have implemented a quick-sort kinds binary cleaving program which starts with a random time of the day, say, 13:00, and checks if one more process can be started at that time, it accepts the "assumed" run time of the new process and finds if the number of jobs will become greater than m during the assumed run time of the new process. If not, success! else, I cleave the two sides of the time chosen 00:00-12:59 and 13:01-23:59 (of course I can add the assumed run time to 13:01 to make a better choice of the window/range) to get the midway time position and check there and so on.

Can there be a more formal solution to this problem? Like maybe based on the Knapsack algorithm or something.. any advice.

Also, what could be a good measure of the "assumed" run time, I'm thinking median. I do realize that this question is a bit vague.

Thanks in advance,
-J
AnswerRe: Advice about choice of algorithm Pin
Fatbuddha 126-Nov-09 21:02
Fatbuddha 126-Nov-09 21:02 
AnswerRe: Advice about choice of algorithm Pin
Eddy Vluggen27-Nov-09 0:28
professionalEddy Vluggen27-Nov-09 0:28 
AnswerRe: Advice about choice of algorithm Pin
Alan Balkany1-Dec-09 4:17
Alan Balkany1-Dec-09 4:17 
QuestionHow to Generate Unique Serial Number.. Pin
shaina223120-Nov-09 0:12
shaina223120-Nov-09 0:12 
AnswerRe: How to Generate Unique Serial Number.. Pin
Paulo Zemek20-Nov-09 1:16
Paulo Zemek20-Nov-09 1:16 
GeneralRe: How to Generate Unique Serial Number.. Pin
shaina223120-Nov-09 2:40
shaina223120-Nov-09 2:40 
GeneralRe: How to Generate Unique Serial Number.. Pin
Member 419459311-Dec-09 11:44
Member 419459311-Dec-09 11:44 
AnswerRe: How to Generate Unique Serial Number.. Pin
Robin_Roy2-Dec-09 19:04
Robin_Roy2-Dec-09 19:04 
GeneralRe: How to Generate Unique Serial Number.. Pin
supercat98-Dec-09 8:04
supercat98-Dec-09 8:04 
QuestionWhats the fastest way to search through a binary heap? Pin
CaptainSeeSharp18-Nov-09 18:08
CaptainSeeSharp18-Nov-09 18:08 
AnswerRe: Whats the fastest way to search through a binary heap? Pin
harold aptroot18-Nov-09 23:06
harold aptroot18-Nov-09 23:06 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
CaptainSeeSharp19-Nov-09 5:43
CaptainSeeSharp19-Nov-09 5:43 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
harold aptroot19-Nov-09 6:00
harold aptroot19-Nov-09 6:00 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
CaptainSeeSharp19-Nov-09 6:07
CaptainSeeSharp19-Nov-09 6:07 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
harold aptroot19-Nov-09 6:25
harold aptroot19-Nov-09 6:25 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
CaptainSeeSharp19-Nov-09 7:17
CaptainSeeSharp19-Nov-09 7:17 
QuestionCrowd detection (people), how to? Pin
Gamma_ace12-Nov-09 15:53
Gamma_ace12-Nov-09 15:53 

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.