Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Fit Scheduling Algorithm

I'm writing a scheduling program with a difficult programming problem. There are several events, each with multiple meeting times. I need to find an arrangement of meeting times such that each schedule contains any given event exactly once, using one of each event's multiple meeting times.

Obviously I could use brute force, but that's rarely the best solution. I'm guessing this is a relatively basic computer science problem, which I'll learn about once I am able to start taking computer science classes. In the meantime, I'd prefer any links where I could read up on this, or even just a name I could Google.

like image 462
stillinbeta Avatar asked Apr 30 '10 17:04

stillinbeta


People also ask

What is best fit algorithm?

What is Best Fit Algorithm? Best Fit is a memory management algorithm; it deals with allocating smallest free partition which meets the requirement of the requesting process.

What is best fit and worst fit in operating system?

The best-fit strategy will allocate 12KB of the 13KB block to the process. Worst fit: The memory manager places a process in the largest block of unallocated memory available.

What is worst fit algorithm?

Worst Fit allocates a process to the partition which is largest sufficient among the freely available partitions available in the main memory. If a large process comes at a later stage, then memory will not have space to accommodate it.

What is the advantage of best fit?

Advantages of Best-Fit Allocation :Memory Efficient. The operating system allocates the job minimum possible space in the memory, making memory management very efficient.


2 Answers

I think you should use genetic algorithm because:

  • It is best suited for large problem instances.
  • It yields reduced time complexity on the price of inaccurate answer(Not the ultimate best)
  • You can specify constraints & preferences easily by adjusting fitness punishments for not met ones.
  • You can specify time limit for program execution.
  • The quality of solution depends on how much time you intend to spend solving the program..

    Genetic Algorithms Definition

    Genetic Algorithms Tutorial

    Class scheduling project with GA

like image 126
Betamoo Avatar answered Oct 07 '22 10:10

Betamoo


There are several ways to do this

One approach is to do constraint programming. It is a special case of the dynamic programming suggested by feanor. It is helful to use a specialized library that can do the bounding and branching for you. (Google for "gecode" or "comet-online" to find libraries)

If you are mathematically inclined then you can also use integer programming to solve the problem. The basic idea here is to translate your problem in to a set of linear inequalities. (Google for "integer programming scheduling" to find many real life examples and google for "Abacus COIN-OR" for a useful library)

My guess is that constraint programming is the easiest approach, but integer programming is useful if you want to include real variables in you problem at some point.

like image 20
nielsle Avatar answered Oct 07 '22 12:10

nielsle