Live data from Hacker News

Ask HN: What algorithms should I research to code a conference scheduling app

news.ycombinator.com

11–20 of 24 posts

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#11
Here's my idea to throw into the ring:

You have a graph of 30 nodes. When a user votes for talks A,B,C,D, you add edges for all those 6 pairs with weight 1, or increment the weight if that edge already exists.

Find the longest path. This is your track in Room 1. Remove those nodes from the graph. Find the longest path. This is your track in Room 2. Remove those nodes from the graph.

Repeat two more times.

The problem you want to avoid is: although talks A and B are popular, they don't share the same audience members. You want to identify cohorts, or cliques, or whatever you want to call it, and keep them in the same room. Call it a "Track" and give it a name.

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#14

Here's my idea to throw into the ring: You have a graph of 30 nodes. When a user votes for talks A,B,C,D, you add edges for all those 6 pairs with weight 1, or increment the weight if that edge already exists. Find the longest path. This is your track in Room 1. Remove those nodes from the graph. Find the longest path. This is your track in Room 2. Remove those nodes from the graph. Repeat two more times. The problem…

This. I worked with a company that used this method to generate timetables for schools with way more variables and constraints. They often found working plans when other solutions did not.

Maybe a little overengineered for your problem though

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#16
Check out Constraint Optimisation algorithms. Try genetic algorithm. More detail in programming collective intelligence ( it covers group travel). For constraint optimisation i think drools has a product.

I cant find a link but such scheduling problems should be converted into color coding problem. Look into google scholar for group scheduling

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#17
I don't know of the formal way of solving such problems, but I have worked with them in the past.

Since the numbers are not large, I would suggest just brute force every possible combination and give each one a score based on your needs. You can then just select the higher ranked ones.

An example of assigning scores for this problem could be: Select any 16 talks and assign them randomly to the 4x4 time slots, and assign the 60 viewers to these as well. Now calculate the score as: +1 per vote these talks received per viewer that gets to attend them -10 for every overlapping vote -20 for a presenter not being able to attend a talk they are interested in

Sum up these numbers to get a score for this combination.

The actual numbers would depend on how important each criteria is to you. Calculate the scores for all combinations and pick the highest ranked ones. You can then be certain that the solutions you pick are mathematically the best ones. Implementing ranked preferences is also very easy this way.

If the numbers could get large and performance is an issue, then a genetic algorithm would be a good bet. It's like a better/more optimised way of moving through the solution space than plain brute forcing. You essentially select 50 good combinations, calculate scores for each and then eliminate the weakest ones while keeping the best ones and merge their good parts to create a new generation of solutions. And you do this till the solution converges. There are libraries in most programming languages that do much of this work for you.

Unless I am completely misunderstanding the problem statement, this is not a big project - the algorithm itself could be done in less than a weekend - maybe a few hours even. But yes, brute forcing or using genetic algorithms may not be the best way of solving this problem because of performance concerns.

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#19

What everyone else said, but if you want a "quick and dirty" way of doing it, you can just use a simple genetic algorithm: - Start with a couple (say 100) completely random schedules - Measure how good they are via a fitness function (say, start at 0 and everytime a constraint is violated add 1 point. You can be fancy and add different amounts depending on the type of constraint violated) - Sort the schedules from lo…

I was going to post exactly this. I always solve scheduling problems with GAs and get great results. It's easy to do and does not require any domain knowledge. It would probably take just a few hours to solve this using a GA, maybe even less.

Re: Ask HN: What algorithms should I research to code a conference scheduling app

#20
post #6

Your problem is a scheduling problem. It has been well studied in operations research [1] / mathematical optimization [2]. Basically, you formulate your problem as a integer programming model [3] and use a solver [4] to solve it. You should check PuLP [5]. You can also ask your question at OR Exchange [6]. [1] https://en.wikipedia.org/wiki/Operations_research [2] https://en.wikipedia.org/wiki/Mathematical_optimizatio…

After this, do a bit of research on goal programming or other approaches to multiobjective optimization. It could really help and depending on the approach, it's not that hard. It usually just adds a bunch of constraints or some precompuations to an already existing set of in/equalities for your model.
Post reply on HN