Hi Geoff, you sent this to the announce list rather than the use rev list. That list is moderated and your post was rejected. I'm sending it on to this list which seems the proper place for it,
Best Heather :From: Geoff Canyon <[EMAIL PROTECTED]> :Subject: Fwd: December 2001 Programmer's Challenge Problem Statement :Content-Type: text/plain; charset="us-ascii" : :In case anyone is interested in entering: : :X-Sender: [EMAIL PROTECTED] :Date: Sat, 17 Nov 2001 10:14:41 -0500 :To: "CHALLENGE-A" <[EMAIL PROTECTED]> :From: Bob Boonstra <[EMAIL PROTECTED]> :Subject: December 2001 Programmer's Challenge Problem Statement :Sender: <[EMAIL PROTECTED]> :List-Subscribe: <mailto:[EMAIL PROTECTED]> :List-Digest: <mailto:[EMAIL PROTECTED]> :List-Unsubscribe: <mailto:[EMAIL PROTECTED]> : :Enclosed is the Programmer's Challenge for December 2001. : :Mail solutions to: : <mailto:[EMAIL PROTECTED]> : :Due Date: 11:59PM, ET, 1 December 2001 : :Test code is not needed for this Challenge, as you will provide a complete application. Test data will be available shortly. : :Note that we are allowing solutions built using alternative development environments (e.g., REALbasic, MetaCard, Revolution). : :-- Bob : :-------------------- : :PARENT-TEACHER CONFERENCES : :If you have children in school, you are familiar with parent-teacher conferences. Little Johnny isn't doing so well in French, or Algebra, or perhaps Advanced Calculus if your school has a gifted and talented program. Or Sally is doing very well in Subatomic Physics, and you'd like to hear her teachers tell you so. : :I was reminded recently of a Challenge suggested by Ernst Munter to write code that would help schools schedule these conferences. Your Challenge this month is to arrange a set of parent-teacher conferences that maximize the parents' satisfaction and minimize the amount of time wasted by both parents and teachers in between conferences. : :You will be given three data sets to work with for each test case. The first, in a file childrenNN.txt (where NN is a number from 01 to the number of test cases), will have one line for each child in the school, containing the child's name followed by the names of one or two parents. No child will appear on more than one line, and there will be no duplicate names of children. A sample would be the following: : :Johnny Smith, Donald Smith, Marilyn Waters-Smith :Sally Jones,Samantha Jones : :The second data set, in a file named teachersNN.txt, maps children to their teachers. Each line contains the name of a child, followed by the name of one of his/her teachers, followed by a number from 0 to 9 indicating the strength of the parents' desire to talk with that teacher. A value of 0 indicates no conference is desired, up to a value of 9 indicating the strongest desire for a conference. Example lines from this file might be: : :Johnny Smith, Richard Darwin, 3 :Johnny Smith, Rene Descartes, 9 :Johnny Smith, Edgar Allen Poe, 0 :Sally Jones, Rene Descartes, 5 :Sally Jones, Albert Einstein, 9 : :The final data set, in a file named schedulesNN.txt, identifies which parents are available at which times. The first line in this file contains the number N of conference periods available for scheduling. All teachers can be available for any or all of the periods from 1..N. Subsequent lines contain the names of parents, along with the first and the last conference period for which they will be available. Parents will be available for any period between their first and last available periods, inclusive. Each parent whose name appears in the children.txt file will appear on one line in the schedules.txt file. Example lines from this file might be: : :9 :Donald Smith, 1,9 :Samantha Jones, 4,9 :Marilyn Waters-Smith,4,6 : :Finally, the number of test cases is provided in a file input.txt, with a single line containing the number of test cases: : :15 : :Your code needs to produce output that provides the matching of parents to teachers. The output (conferencesNN.txt) should contain one line for each conference, with the name of the teacher first, the name of the parent second, and the conference period third. No parent or teacher can be in more than one conference during a given period. Both parents of a given child can participate in a conference with a teacher if they are both available during that period (two lines would be output in such a case). One line in such a file might be: : :Richard Darwin,Marilyn Waters-Smith,5 : :Finally, your solution needs to produce a log file (log.txt) that contains, for each test case, the execution time in milliseconds that your solution required to process the test case. : :Once again, the objective is to maximize parents' satisfaction with the conference schedule, and to minimize wasted time. The Challenge will be scored based on the number of penalty points accumulated by each entry. If a desired conference is not accommodated, you will accumulate 1-9 penalty points, depending on the strength of the parents' desire for that conference as expressed in teachers.txt. If a parent has a gap in the conference schedule, where a conference is scheduled during periods N and N+2, but not in N+1, you will accumulate one penalty point for each unscheduled period in the gap. Similar penalty points will accumulate for gaps in the conference schedule for teachers. Finally, the penalty will be increased by 10% for each second of execution time used by your solution. : :We're going to make another attempt to broaden the development environments accepted for the Challenge, despite mixed success in the past. This will be a native PowerPC Challenge, using any of the following environments: CodeWarrior Pro, REALbasic, MetaCard, Revolution, or ProjectBuilder. You may use another development environment if I can arrange to obtain a copy - email [EMAIL PROTECTED] to check before you use something else. You can develop for Mac OS 9 or Mac OS X. Your submission should provide everything needed to build your application. : :From: Geoff Canyon <[EMAIL PROTECTED]> :Subject: Fwd: Q&A#1 for December Conferences Challenge :Content-Type: text/plain; charset="us-ascii" : :Further info on the challenge -- gc : :>X-Sender: [EMAIL PROTECTED] :>Date: Sun, 18 Nov 2001 12:42:33 -0500 :>To: "CHALLENGE-A" <[EMAIL PROTECTED]> :>From: Bob Boonstra <[EMAIL PROTECTED]> :>Subject: Q&A#1 for December Conferences Challenge :>Sender: <[EMAIL PROTECTED]> :>List-Subscribe: <mailto:[EMAIL PROTECTED]> :>List-Digest: <mailto:[EMAIL PROTECTED]> :>List-Unsubscribe: <mailto:[EMAIL PROTECTED]> :> :>Q1: Points for dual-parent conferences :> :>> > Johnny Smith, Donald Smith, Marilyn Waters-Smith :>>> Johnny Smith, Rene Descartes, 9 :>>Does this imply that if neither parent has met Rene Descartes, I obtain 2*9=18 penalty points :> :>A1: No, only 9. The requirement is that at least one of Jonny's parents meet with the teacher. :> :>Q2: Parents with multiple children :> :>>May the same parent have several children in school e.g :>>> Johnny Smith, Donald Smith, Marilyn Waters-Smith :>> > Laura Smith, Donald Smith, Marilyn Monroe :> :>A2: Yes, the same parent might have more than one child in school. And, although I hadn't thought of it before, two children of one parent might have different second parents, as in your example. :> :>Q3: Points for multiple children with the same teacher :> :>>If the same parent have several children in school e.g :>>> Johnny Smith, Donald Smith, Marilyn Waters-Smith :>>> Laura Smith, Donald Smith, Marilyn Monroe :>>And they have the following desire for a conference :>> >Johnny Smith, Rene Descartes, 9 :>> >Laura Smith, Rene Descartes, 5 :>>Does a conference between Donald Smith ond Rene Descartes clear all 14 points? :> :>A3a: Yes. One conference between a parent and a teacher can satisfy requests on behalf of more than one child of that parent. :> :>>Does a conference between Donald Smith, Marilyn Waters-Smith ond Rene Descartes clear 23 points? :> :>A3b: No, there are only 14 points involved in these two conferences, no matter how many parents attend the conferences. :> :>Q4: Number of test cases :> :>> >The final data set, in a file named schedulesNN.txt, identifies which :>>>parents are available at which times. The first line in this file :>>>contains the number N of conference periods available for scheduling. :>>>All teachers can be available for any or all of the periods from :>>>1..N. :>> :>>... and this assumes that... :>> :>>N < 10 :>> :>>right (just as in the files' names definition where a 'N' means only one :>>numeral byte)? :> :>A4: Actually, NN<100. The file name contains two digits, so the problem should say "the number NN of conference periods ..." :> :>Q5: Should timing include file I/O? :> :>> >Finally, your solution needs to produce a log file (log.txt) that :>>>contains, for each test case, the execution time in milliseconds that :>>>your solution required to process the test case. :>> :>>I guess that this log file being produced in "test code fashion", we :>>would start measuring after the files are loaded into memory and would :>>stop right after the actual solving function returns, thus stopping right :>>before the returned data is written into the output ("conferencesNN.txt") :>>files? :>> :>>i.e. file i/o would not be counted in the execution time? :> :>A5: A reasonable interpretation, but actually, test time should measure from entry to exit of your program. If there were a test driver, it would measure from when your code is called to when it returns. In this case, your code does the I/O, so all should be included. (Obviously you cannot time writing the timing measurement.) :> :>Q6: Are parent names unique? :> :>>Your problem statement doesn't preclude the possibility of multiple :>>parents having the same name. Parents could have multiple children in the :>>school and different parents could have the same name. Can we assume that :>>all parent names will be unique? :> :>A6: Good point. Yes, you can assume parent names will be unique. :> :>Q7: May I use Perl? :> :>>Any problems if I code an entry in Perl? I'll do this on OS X which includes :>>a perl distribution so you should already have it. :> :>A7: No problem with Perl. If you prefer to use OS 9.x, I also have MacPerl. Suggest you send me a test solution and build instructions at some point so that I can verify that I can successfully build the solution. :> :>-- :>-- Programmer's Challenge -- Bob Boonstra :> [EMAIL PROTECTED] [EMAIL PROTECTED] :> <http://www.mactech.com/> <http://home.earthlink.net/~bobboonstra> :>
