logo       

Re: Perl 'Expert' Quiz-of-the-Week #16: msg#00035

Subject: Re: Perl 'Expert' Quiz-of-the-Week #16
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.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe