Note that there are some explanatory texts on larger screens.

plurals
  1. POOrdering Combinations for Maximum Effectiveness
    primarykey
    data
    text
    <p>So recently I was given a problem, which I have been mulling over and am still unable to solve; I was wondering if anyone here could point me in the right direction by providing me with the psuedo code (or at least a rough outline of the pseudo code) for this problem. PS I'll be building in PHP if that makes a difference...</p> <h2>Specs</h2> <p>There are ~50 people (for this example I'll just call them a,b,c... ) and the user is going to group them into groups of three (people in the groups may overlap), and in the end there will be 50-100 groups (ie {a,b,c}; {d,e,f}; {a,d,f}; {b,c,l}...). *</p> <p><em>So far it is easy, it is a matter of building an html form and processing it into a multidimensional array</em></p> <hr> <p>There are ~15 time slots during the day (eg 9:00AM, 9:20AM, 9:40AM...). Each of these groups needs to meet once during the day. And during one time slot the person cannot be double booked (ie 'a' cannot be in 2 different groups at 9:40AM).</p> <p><em>It gets tricky here, but not impossible, my best guess at how to do this would be to brute force it (pick out sets of groups that have no overlap (eg {a,b,c}; {l,f,g}; {q,n,d}...) and then just put each into a time slot</em></p> <hr> <p>Finally, the schedule which I output needs to be 'optimized', by that I mean that 'a' should have minimal time between meetings (so if his first meeting is at 9:20AM, his second meeting <strong>shouldn't</strong> be at 2:00PM). </p> <p><em>Here's where I am lost, my only guess would be to build many, many schedules and then rank them based on the average waiting time a person has from one meeting to the next</em></p> <hr> <p>However My 'solutions' (I hesitate to call them that) require too much brute force and would take too long to create. Are there simpler, more elegant solutions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. CO@Tomas: I'm a little confused. 50 people will need to be split up in 50-100 groups, where a single person needs to be in multiple groups? Why is the range of group numbers so large and, secondly, do all members need to be part of the same amount of groups or can one be part of two groups, and another guy of six? I think it's possible to do this more elegantly, by taking a smarter approach (brute force is by definition a dumb approach), but I'm missing too many variables to solve this, I feel. Or maybe I'm just not smart enough...:lol:
      singulars
    2. CO@Battle_707, When I was posting this I was thinking that exact same thing :D . So first of all the group number is defined by the user and can actually be any real integer (I was estimating 50-100), but that shouldn't matter because if your code only supports 100 groups and the user only enters 53 you can just make empty groups... and to address your second question: no, there is no standard for the number of groups each person can be on. However that just gave me an idea! Wouldn't knowing the maximum number of groups one person is on help us in some way?
      singulars
    3. COWell, yes and no. I would much rather have it if you told me every user could be 'used' the same amount of times, I think (this is just a gut feeling, I haven't done any of the calculations yet). And it's annoying that the amount of groups are so dynamic. I suppose it has to be +/-1, taking that all groups need to contain 3 people, and with 53 subscribers, you can't create all full groups using every member just once. Another question, though: is there a limit to the amount of groups that can have an appointment at one given time, or can all people/ groups meet at the same time?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload