Closed Thread
Results 1 to 4 of 4

Thread: Unique & Complex Sorting Program

  1. #1
    ryan.devani is offline Newbie
    Join Date
    Jan 2008
    Posts
    2
    Rep Power
    0

    Unique & Complex Sorting Program

    Basically, the program needs to take a data set of X (i.e. 80) students and assign them them into Y (i.e. 10) groups. Then assign Y (i.e. 10) number of faculty members, one to each group. But, students can’t be in a group with anyone they have been in a group with before or have a faculty member they have had before.

    Currently, there are three sets of groups that already exist. So, the program would need to be able to consult that data and use it to avoid repeats. Ideally, I want the program to be able to refer back to any number of past group lists, as the process will need to be repeated several times to generate several sets of groups. I'd like the past group lists to be in an excel spreadsheet format and the new lists that are outputted to also be into an excel spread sheet.

    Also, I wanted to have the program be flexible so that the numbers of students, groups, and faculty members could change as well as the identities of each group (i.e. there may be times where some faculty are not involved and others are). Finally, I understand that there will be a point where the program cannot create a group without overlap. In this case I wanted to program to make the overlap from group sets more prior. For example, a student would be in the same group with another student they had been with in the first group set versus the third group set.

    I had a few ideas as to how this could work, but I don’t know which idea to use and how to go about it.

    1. I was thinking of inputting all the students into a pool and then assigning them one by one to a faculty member. Each time the program went to assign a student to a group/faculty member it would consult the past groups and make sure that the student had not been with that faculty member or any students that have already been assigned into this new group.

    2. Another idea I had was to have the computer generate all the possible combinations of group sets (as in every possibility would be a list of Y groups using X students) , ignoring overlap (not sure how to do that mathematically). Then, it would go through each set checking for overlap of faculty member or student in comparison to previous lists. Each time it had overlap, it would go to the next group set, until it found a group without any overlap.

    3. The last idea was similar to the second idea. The computer would generate all the possible combinations of groups (not sets), so if a group was 8 students and 1 faculty member, it would generate a list of every possible group. Then, it would go through each set checking for overlap from group to group within those sets. It would also have to check against the current groups it sets aside for the group set being generated.

    I hope someone can find a solution as I’ve been doing this process by hand on paper and its very tedious and time consuming. Please keep in mind that my programming knowledge is limited (I have only done a little Visual Basic programming, and that was several years ago) and I was thinking of using Visual Basic or an Excel macro. Thanks in advance for any help you can provide!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    I wrote a similar program before that was a little more complicated. For that program, I had a group of n people that would meet several times in m subgroups. A person could only be in one meeting at a time, and had restrictions like no two subgroups could have two people in common.

    I created a triply linked list of all possible subgroups, then used a new list to build the sequence of "meeting assignments". I had the third link for unwinding the second list if I ran into a conflict and had to backtrack. Unfortunately, backtracking could cause the algorithm to be hideously inefficient.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    ryan.devani is offline Newbie
    Join Date
    Jan 2008
    Posts
    2
    Rep Power
    0

    Help

    Hey, that sounds really helpful. I don't really understand how you did all of that, but do you think you could forward me the code?

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    I would have to look around for a while to find it. I wrote it quite a while ago and have changed computers a couple times during that time. It's not in any of the obvious places
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TASM TASM program help : Sorting
    By Nagasaki in forum Assembly
    Replies: 1
    Last Post: 10-12-2011, 03:49 PM
  2. A Complex Scenario.
    By newbie14 in forum C# Programming
    Replies: 0
    Last Post: 07-13-2009, 11:06 AM
  3. ‘Advanced Unique Impressions & Unique Clicks’ Plug
    By adserverexpert in forum Services for Buy/Sell/Trade
    Replies: 0
    Last Post: 10-06-2008, 01:51 AM
  4. complex numbers
    By kenna in forum General Programming
    Replies: 6
    Last Post: 11-06-2007, 08:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts