NB Closed voices are terribly out of place. The choice of algorithm and design to solve a controversial problem is absolutely part of the programming.
I think that you will be further with a minimum weight of two-way matching than with “Stable marriage” (also called the Hungarian method or algorithm or “Maximum weight”), which can give you minimum weight by simply negating the weight.)
. , node .
. . . - . - .
/, .
@nava - , , MWBM, . .
, , , . "" "dummy", . . , .
, . , O_i i- . R_ip - , p- . , W_ip - , i- p- . - :
W_ip = A * R_ip + B * O_i
A B, . , . , B , .
A = 1, B = N^2, where N is the number of students.
, , , .. , , .
, ( 90-), MWBM , , FORTRAN. O (N ^ 3). 1000 ( ). O (N ^ 2 log N), 3 N = 1000. "" 5000 .
, , .