Page 1 of 1

Problem 3277 : Workshops

Posted: Mon Feb 27, 2006 9:14 pm
by mido
Any hints how to do this.... I tried to think of possible greedy algs, but each one seemed to have a snag...

Thanks....

Posted: Thu Mar 30, 2006 11:57 pm
by Moha
We solved it in contest by Graph matching.;)

Posted: Mon Feb 05, 2007 4:34 am
by teamacm
Moha wrote:We solved it in contest by Graph matching.;)
Do you mean weighted bipartite matching?

I've been attempting to implement this using Ford-Fulkerson and a modified Dijkstra (to avoid the problem of negative weighted edges). However, it is too slow: O(v^3) where v=1000.

Could you give details about how you solved it?

workshops

Posted: Sun Feb 18, 2007 12:47 am
by ltdtl
You can solve it using greedy alg.
it will take O(nlogn+rlogr+ nr).
if you make a good implementation, it will be reduced into O(xlogx), but it is not necessary (i guess).

Posted: Sat Feb 24, 2007 7:33 am
by teamacm
Could you please tell me what kind of greedy algorithm would solve it?

Posted: Wed Mar 07, 2007 10:08 am
by sclo
Sort the workshop by some order (decreasing size, then increasing time).
Sort the rooms by another order (increasing time, then increasing capacity).

Greedily assign each workshop increasing order to the first available room.

Posted: Thu Mar 08, 2007 4:38 am
by nbauernf
I thought I could find a counter-example to your greedy choice, but I can't seem to find it at this moment.

Practicing for the world finals I wrote a greedy solution, and I ended up proving to myself that it cannot possibly be greedy (any choice of picking has a counter example). Maybe I didn't think about this choice... I'll go change my ordering to this and see if it works on my test set.

Nate

Re: Problem 3277 : Workshops

Posted: Tue Apr 01, 2008 7:12 pm
by rushel
edit: can two workshop share the same room at the same time if the room has sufficient capacity