355
правок
Изменения
→Реализация
for i = 1 to n do
for j = 1 to n do
S = {1,...,n};
P = sum(p[i]);
for k = n downto 1 do
find job j in S with nN[j] = 0 and minimal f[j](P)-value;
S = S \ {j};
schedule[k] = j;
P -= p[j];
for i = 1 to n do
if A[i][j] = 1 then
Сложность этого алгоритма $O(n^2)$.