Min-plus algebra addition
[X] = minplusoplus(A,B)
This function returns Xi,j= ai,j⊕' bi,j = min {ai,j, bi,j}.
A = sprand(5,5,0.3); B = sprand(5,5,0.6); k = find(A == 0); l = find(B == 0); A(k) = %inf; B(l) = %inf; A = round(10*A); B = round(10*B); A = full(A) B = full(B) X = minplusoplus(A,B) // We already known that ℝmax ≅ ℝmin // So minplusoplus(A,B) = -maxplusoplus(-A,-B) isequal(minplusoplus(A,B),-maxplusoplus(-A,-B)) | ![]() | ![]() |