Lets say i have a data set with five columns with subject name for every student and need to create a program for exams.
Mark A B C F
Paul K C L A
Jane B F D A
George M N C E
I need to find the best way to combine all letters so that no student has two exams the same day.
For example the subject A cannot be in the same day with B,C,D,F,K or L.
A possible solution (output) would be
Day 1 : A,E
Day 2 : B,K,M
Day 3 : C,D
Day 4 : F,L,N
This solution is not unique. All we need is to find this result for the smallest amount of days.
If we could choose somehow the maximum number of subjects that can be grouped in a day would be perfect.
A pivot table could help . An approach I tried , was by finding the number of students for every two subject pair.
For example
A B C D E F K L M N
A - 2 2 1 0 2 1 1 0 0 from here we can see that A has no conflict with E,M or N. But a group of A,E,N is not acceptable (see George)
B 2 - 1 1 0 2 0 0 0 0
C 2 1 - 0 1 1 1 1 1 1 from this line we see that C can be grouped only with D
D
E the rest are completed
F as explained
K
L
M
N
Hope I was clear about my problem.
Suppose that I have a data set of a thousand students.
Any help would be appreciate.
Sorry for being a novice at this.
Thanks in advance
Mark A B C F
Paul K C L A
Jane B F D A
George M N C E
I need to find the best way to combine all letters so that no student has two exams the same day.
For example the subject A cannot be in the same day with B,C,D,F,K or L.
A possible solution (output) would be
Day 1 : A,E
Day 2 : B,K,M
Day 3 : C,D
Day 4 : F,L,N
This solution is not unique. All we need is to find this result for the smallest amount of days.
If we could choose somehow the maximum number of subjects that can be grouped in a day would be perfect.
A pivot table could help . An approach I tried , was by finding the number of students for every two subject pair.
For example
A B C D E F K L M N
A - 2 2 1 0 2 1 1 0 0 from here we can see that A has no conflict with E,M or N. But a group of A,E,N is not acceptable (see George)
B 2 - 1 1 0 2 0 0 0 0
C 2 1 - 0 1 1 1 1 1 1 from this line we see that C can be grouped only with D
D
E the rest are completed
F as explained
K
L
M
N
Hope I was clear about my problem.
Suppose that I have a data set of a thousand students.
Any help would be appreciate.
Sorry for being a novice at this.
Thanks in advance