Group Combination Generator - Help needed
Posted: Tue Oct 05, 2004 10:48 am
Hello everyone, I am new here, so I figured I would give a little tidbit about myself before I ask my question. My name is Kyle-Vance, I am 17 and currently attending my senior year of high school in Jersey. I have a class called "senior seminar" in which I can pretty much do whatever I want, as long as I accomplish something. I decided to do mine on 3d Modelling and Animation, but you have to "help the school" somehow. They through this assignment at me...
I have a "simple" assignment of creating a program.
Here is what it has to be able to do (step by step)
1: The user tells the program how many students (objects) it has
2: The user puts in a list of all of the students (objects) names
3: The user tells the program how many students (objects) it wants in every group
4: The program displays EVERY possible set of combinations without using the same two students (objects) in the same group, ever.
It would be great if the program save/load the list of students so that the teacher doesn’t have to retype the list over and over again.
for instance, 6 students, in groups of 2
AB CD EF
AC BE DF
AF DB CE
Notice that even though AC BF DE has not been used, A and C have already been in the same group.
A B C D E and F would all be student’s names (objects) and there would be 3 different possible sets of groups. Of course, this list would grow in size quite a bit depending on how many students/groups.
While I realize that this is a very complicated algorithm behind the program, I have a few months to get a finished product. I just need some resources for how to do this.
As for the programming language itself: I can use whatever I want, the only logical ones for me are HTML/PHP/JavaScript/Visual Basic as they are the only ones I can test/write from school (this has to be done 100% in school).
I have a "simple" assignment of creating a program.
Here is what it has to be able to do (step by step)
1: The user tells the program how many students (objects) it has
2: The user puts in a list of all of the students (objects) names
3: The user tells the program how many students (objects) it wants in every group
4: The program displays EVERY possible set of combinations without using the same two students (objects) in the same group, ever.
It would be great if the program save/load the list of students so that the teacher doesn’t have to retype the list over and over again.
for instance, 6 students, in groups of 2
AB CD EF
AC BE DF
AF DB CE
Notice that even though AC BF DE has not been used, A and C have already been in the same group.
A B C D E and F would all be student’s names (objects) and there would be 3 different possible sets of groups. Of course, this list would grow in size quite a bit depending on how many students/groups.
While I realize that this is a very complicated algorithm behind the program, I have a few months to get a finished product. I just need some resources for how to do this.
As for the programming language itself: I can use whatever I want, the only logical ones for me are HTML/PHP/JavaScript/Visual Basic as they are the only ones I can test/write from school (this has to be done 100% in school).