set students;
set projects;
set arcs within students cross projects;
var assign{(i,j) in arcs} binary;
# is 1 if student i is assigned to project j, 0 otherwise
maximize total_assignments: sum{(i,j) in arcs} assign[i,j];
s.t. at_most_one_project_for_each_student{i in students}:
sum{(i,j) in arcs} assign[i,j] <= 1;
s.t. at_most_one_student_for_each_project{j in projects}:
sum{(i,j) in arcs} assign[i,j] <= 1;
data;
set students:= A B C D E F;
set projects:= x y z u v w;
set arcs:=
A x
B x
B y
B z
C y
C z
D z
E z
E u
E v
E w
F u
F v;