Mark Jason Dominus wrote:
>
> You will write a program that schedules the semester of courses at
> Haifa University. @courses is an array of course names, such as
> "Advanced Basket Weaving". @slots is an array of time slots at which
> times can be scheduled, such as "Monday mornings" or "Tuesdays and
> Thursdays from 1:00 to 2:30". (Time slots are guaranteed not to
> overlap.)
>
> You are also given a schedule which says when each course meets.
> $schedule[$n][$m] is true if course $n meets during time slot $m,
> and false if not.
>
> Your job is to write a function, 'allocate_minimal_rooms', to allocate
> classrooms to courses. Each course must occupy the same room during
> every one of its time slots. Two courses cannot occupy the same room
> at the same time. Your function should produce a schedule which
> allocates as few rooms as possible.
You know, this sounds a lot like a personal scheduler I built several
years ago for my alma mater, the University of Pennsylvania. You pick
from a list of courses you'd like to take, each of which can offer
several different sections, and it will wade through the overlaps and
spit back some valid schedules. i.e., you choose Biology 101, Dutch
230, Music 21 and Econ 220, and it finds 17 combinations of the
various sections for those classes that allow you to take them all.
Check out http://sac.students.vpul.upenn.edu:81/ if you're interested...
--
Ron Isaacson
Morgan Stanley
ron.isaacson-/PgpppG8B+R7qynMiXIxWgC/G2K4zDHf@xxxxxxxxxxxxxxxx / (718) 754-2345
NOTICE: If received in error, please destroy and notify sender. Sender
does not waive confidentiality or privilege, and use is prohibited.
|