Garner, Robin Robin.Garner at
Fri Jan 9 13:38:21 EST 2004

It looks like the only data structure you use here is a list, which has an
access time of O(n).  Perhaps if you used a log(n) data structure (like a
FiniteMap) or a constant structure (like an array) the runtime might
It's difficult to see from your program exactly what the algorithm you're
using is.  Or even how to run it. Have you done an analysis of its time
complexity ?

-----Original Message-----
From: Bhrein Brannick [mailto:bhrein_brannick at]
Sent: Friday, 09 January, 2004 3:25 AM
To: haskell-cafe at
Subject: Help!!!!

Hi Guys,

I'm a fourth year computer science in Ireland and I'm doing my final year
project on Haskell programming. What I'm doing is writing a program in
Haskell for the maths department for my college. What it involves is this:
There is a class of 50 students and there are about 25 staff members. Now
some staff member's take on three students, two students or even just one
student depending on the staff member for supervising students. The students
rank the projects the staff members have on offer in order of preference
from 1 to 4 (see Haskell code in mail attachment). The program finds the
best assignment of projects for students based on their ranking. The program
works fine and that but my problem is that it takes way too much time to
execute the program. When I reduced class number to 10 students and only
included 10 staff for allocation projects it took thirty seconds to execute.
That was fine. But when I increased class number to 20 students it took 10
minutes to execute. I tried it once for a class of 50 students and I
wouldn't let it finish since it was taking far too long. I'm just wondering
is there any way that the program can be improved so that execution of
program can be faster. Even if there were software available that makes
Haskell programs runs faster that would be a great help. I have a
presentation in this, which I have only ten minutes to show the department
what I'm talking about, and I want to include a demonstration of the program
in it. Can you please help me with this since I tried a number of things
with this and it never once seemed to improve performance. 

Thank you,

Bhrein Brannick,

Maths department,

NUI Galway,


  <> beano #7


The new MSN 8: <>  smart spam protection
and 2 months FREE* 

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Haskell-Cafe mailing list