Help!!!!

Graham Klyne GK at ninebynine.org
Thu Jan 8 16:49:51 EST 2004


I have two thoughts:

It sounds as if you are using an algorithm that is inherently 
inefficient.  It may be that you need to re-think the algorithm used to 
optimize "assignment of projects for students based on their ranking".  If 
the aggregate ranking is based on a linear combination of preferences (or 
something that can be bounded by such a combination) then you may be able 
to employ Linear Programming techniques (the "Simplex method" was current 
when I was taught such things, but I believe there are better algorithms 
around today).

If you are currently using the Hugs interpreter, a speed increase of (very 
roughly) an order of magnitude or so might be achieved by switching to 
creating a directly executable program using the Glasgow Haskell Compiler.

#g
--

At 16:25 08/01/04 +0000, Bhrein Brannick wrote:

>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,
>
>Ireland.
>
>
>
>
>
>
>beano #7
>
>
>
>----------
>The new <http://g.msn.com/8HMAEN/2737??PS=>MSN 8: smart spam protection 
>and 2 months FREE*
>_______________________________________________
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell-cafe

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell-Cafe mailing list