BBO Discussion Forums: Assigning choices optimally - BBO Discussion Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Assigning choices optimally

#1 User is offline   jschafer 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 181
  • Joined: 2010-October-26
  • Gender:Male
  • Location:London, UK
  • Interests:Origami, squash, table tennis, travelling

Posted 2011-February-07, 08:08

For our Msc course we all have to do one project out of 45 available projects. Each student needs to select 5 projects they would consider doing and rank them according to preference. Then projects will get assigned to students so that there is maximum happiness accross all the students (possibly assigning 'happiness rankings' to 1st, 2nd, 3rd, 4th and 5th choices). There are 45 projects and 33 students, the goal being to assign one project to each student whilst keeping as many students as happy as possible. Is there any sort of program to optimise this allocation of projects? If anyone knows of something (relatively simple) that can solve this problem it would be much appreciated =)
0

#2 User is offline   kenberg 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 11,132
  • Joined: 2004-September-22
  • Location:Northern Maryland

Posted 2011-February-07, 08:16

Let's see if I understand this correctly: Each of the 33 students will indicate what project they would like to work on, then you will divide the students into five groups of six or seven students each, and each group will have a project?


If that is it, the following seems practical: Tell the students that they should list their three top choices and then two alternates. I am guessing, and it would be interesting to see, that you will be able to make up the groups with most of the students having one of their three top choices and all of them having one of of their top five. If students picked randomly this might not be likely but some projects will have broad appeal. If, out of 45 possible assignments, most get one of their top three choices this should make almost everyone reasonably happy.

No doubt other schemes could be tried but any assignment of happiness value will be arbitrary so I would go with simply using some plausible mechanism to give most people something that is satisfactory.

But I will be interested in seeing more sophisticated schemes. We actually use something like what I suggest in a setting of somewhat smaller scale. No heavy complaints.
Ken
0

#3 User is offline   jschafer 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 181
  • Joined: 2010-October-26
  • Gender:Male
  • Location:London, UK
  • Interests:Origami, squash, table tennis, travelling

Posted 2011-February-07, 08:33

Sorry, I may have been a bit unclear by how I phrased it. There are 45 projects, out of which each student needs to select 5 they would be happy to do. In the end only one student will be assigned to one project (and no students for some projects as there are more projects than students). I'll edit the OP to make it clearer.
0

#4 User is offline   TylerE 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,760
  • Joined: 2006-January-30

Posted 2011-February-07, 10:55

How about this:

Have them fill out slips with their choices, in a ranked order. Place the slips in a hat.

Draw a slip at random. That person gets their highest ranked available project. If none of the five listed are available, put it in a seperate stack. Repeat until none are left in the bag.

If you have any in the second stack (If you're really lucky you won't!) Then those people get to pick for the list of remaining projects, in the order their slip was chosen.

I make no claims that this is optimal, but it seems fair (at least in the aggregate) and has the advantage of being easy to do.
0

#5 User is offline   WellSpyder 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 1,627
  • Joined: 2009-November-30
  • Location:Oxfordshire, England

Posted 2011-February-07, 11:13

I like TylerE's solution. Anything based more explicitly on assigning a value to each person getting their first, second, third, choice etc and seeking to maximise the overall value runs the risk of distorting choices. For example, if I know my first choice is likely to be semi-popular, I may have an incentive to ensure my other choices are all from the popular category rather than the unpopular category, to maximise the chances that I will get my first choice.
0

#6 User is offline   nigel_k 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,207
  • Joined: 2009-April-26
  • Gender:Male
  • Location:Wellington, NZ

Posted 2011-February-07, 13:56

I like TylerE's solution too and nobody needs to list their top five choices. Just randomly assign each student a number from 1 to 33. Whoever gets 1 picks first and so on. It's not optimal because the last person might be left with no project they like but some projects that are other people's second choice. But it is very simple and I think quite close to optimal.

For an optimal solution, I don't know what is best. Brute force would definitely take too long. I would start by counting up the number of unique projects chosen in any of the top five choices. If it is close to 33 then you have to start by assigning any of the projects that were chosen by exactly one person. If it is close to 45 you can start by trying to give as many people as possible their first or second choice.

Also, one of the projects should be to design a solution for this exact problem. That way you won't have to worry about it next year.
0

#7 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,426
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2011-February-07, 14:16

This looks like a fairly standard linear programming problem...

MathWorks produces some good software to solve these sorts of problems. (If your at a University, there is a good chance that you have free access to MATLAB)

The following online text book has a good introduction to the topic:

http://www.mathworks.com/moler/lu.pdf
Alderaan delenda est
0

#8 User is offline   awm 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 8,337
  • Joined: 2005-February-09
  • Gender:Male
  • Location:Zurich, Switzerland

Posted 2011-February-07, 15:30

It's a weighted bipartite matching problem. It can be solved efficiently by an application of minimum-weight flow. Efficient solutions to this type of optimization problem are an area of continuing study in computer science theory; there are a number of good approaches and faster algorithms are being designed all the time. I'm not going to summarize the state of the art approaches here (see i.e. "Introduction to Algorithms" by Cormen, Leiserson, Rivest, and Stein for an introduction to this area).

Hrothgar is right that this can be approached via linear programming; however there are much simpler and faster algorithms available.
Adam W. Meyerson
a.k.a. Appeal Without Merit
1

#9 User is offline   Cascade 

  • PipPipPipPipPipPipPipPip
  • Group: Yellows
  • Posts: 6,764
  • Joined: 2003-July-22
  • Gender:Male
  • Location:New Zealand
  • Interests:Juggling, Unicycling

Posted 2011-February-07, 15:33

View Posthrothgar, on 2011-February-07, 14:16, said:

This looks like a fairly standard linear programming problem...

MathWorks produces some good software to solve these sorts of problems. (If your at a University, there is a good chance that you have free access to MATLAB)

The following online text book has a good introduction to the topic:

http://www.mathworks.com/moler/lu.pdf


I think we need integer solutions - a solution like 0.2 of each of your five choices probably wouldn't be ideal.

Which makes it an integer programming problem.
Wayne Burrows

I believe that the USA currently hold only the World Championship For People Who Still Bid Like Your Auntie Gladys - dburn
dunno how to play 4 card majors - JLOGIC
True but I know Standard American and what better reason could I have for playing Precision? - Hideous Hog
Bidding is an estimation of probabilities SJ Simon

#10 User is offline   awm 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 8,337
  • Joined: 2005-February-09
  • Gender:Male
  • Location:Zurich, Switzerland

Posted 2011-February-07, 17:00

Fortunately, matching-based linear programs are unimodular and always produce integral optimum solutions. Obviously this is not true of linear programs in general.
Adam W. Meyerson
a.k.a. Appeal Without Merit
0

#11 User is offline   barmar 

  • PipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Admin
  • Posts: 21,494
  • Joined: 2004-August-21
  • Gender:Male

Posted 2011-February-08, 00:04

Isn't this the stable marriage problem?

#12 User is online   helene_t 

  • The Abbess
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,158
  • Joined: 2004-April-22
  • Gender:Female
  • Location:UK

Posted 2011-February-08, 06:03

I would start by computing a "popularity" measure for each of the 45 projects and a "pickyness" measure of each student, based on the popularity of each student's choices.

Then I will first assign all projects that have been rated 1 by only one student to that student, and subsequently, among all projects that have been rated 1 by more than one student, assign the least popular one to the most picky of all students that had that project rated 1.

Continue doing this until the 1-ratings are exhausted, then continue with 2-ratings etc.

But as AWM says, this is a well-known problem so there is probably some free software out there that will do it in some clever way.

Ideally, the algorithm should
- give as little scope as possible to manipulation, i.e. students boosting their chances by being dishonest about their 2nd choice. My guess would be that all non-ridiculous algortihms are subject to some degree of manipulation but some will be less manipulatable than others, in some sense.
- be deterministic, i.e. not rely on monte carlo heuristics.
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
0

#13 User is offline   awm 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 8,337
  • Joined: 2005-February-09
  • Gender:Male
  • Location:Zurich, Switzerland

Posted 2011-February-08, 14:59

View Postbarmar, on 2011-February-08, 00:04, said:

Isn't this the stable marriage problem?


No, because the projects do not have preference lists over the students.
Adam W. Meyerson
a.k.a. Appeal Without Merit
0

#14 User is offline   y66 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 6,496
  • Joined: 2006-February-24

Posted 2011-February-08, 21:42

I like TylerE's solution. It is straightforward and pretty optimal in terms of understandability to kids, fairness and fun.
If you lose all hope, you can always find it again -- Richard Ford in The Sportswriter
0

#15 User is offline   kenberg 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 11,132
  • Joined: 2004-September-22
  • Location:Northern Maryland

Posted 2011-February-09, 12:18

It seems to me that the problem needs some further definition.

Thought experiment: You have three students. One algorithm provides two of the students with their first choice and the third student with his third choice. Another algorithm provides one student with his first choice and the other two students with their second choice. Which algorithm would be judged to be the better?

Of course with three students the algorithm would be to write down all the possibilities and see which you (perhaps invoking some subjectivity) think best. But for more students it seems to me you have to decide whether you prefer an algorithm that gives, say, 25 of the 33 students either their first or second choice but gives some students their fourth or even fifth choice to an algorithm that gives no one anything worse than their third choice but gives far fewer students their first choice. When I have done such things I have put a premium on having no one seriously unhappy even if that means fewer people are ecstatic. But it's a choice.

After such choices are made by a human, it would not surprise me at all that MatLab has a program for it. This doesn't sound like a problem no one has faced before.
Ken
0

#16 User is offline   blackshoe 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,633
  • Joined: 2006-April-17
  • Gender:Male
  • Location:Rochester, NY

Posted 2011-February-09, 17:55

The best algorithm gives me my first choice. All else is irrelevant. :)
--------------------
As for tv, screw it. You aren't missing anything. -- Ken Berg
I have come to realise it is futile to expect or hope a regular club game will be run in accordance with the laws. -- Jillybean
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users