CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 17:38:03 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=775a5331bb621f177ccdfdc4dab74831b4754249b663b944cf8ca1f30fe90d69a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22iK7Hkul1ZIOA1Gw-gWezYvhNgwyGuWFd%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d021029c26c1a6-BLR
lcm - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C= [11, 13, 17, 14; 16, 18, 14, 10; 21, 24, 13, 10];
- S= [8 5 9];
- D= [8 7 5 4];
- [m ,n]= size(C);
- if(sum(S)==sum(D))
- disp('Balanced');
- else if(sum(S)<sum(D))
- C(end+1,:)=zeros(1,n);
- S(end+1)= sum(D)- sum(S);
- s=sum(D);
- else
- C(:,end+1)=zeros(m,1);
- D(end+1)= sum(S)- sum(D);
- s=sum(C);
- end
- end
- table =C;
- table= [table , S(:)];
- mD = [D, s];
- table= [table ; mD];
- var ={'D1','D2','D3', 'D4', 'Supply' };
- disp(array2table(table, 'VariableNames', var));
- X=C;
- Ci=C;
- while any(S~=0)|| any(D~=0)
- mini = min(C(:));
- [r, c]= find(C==mini);
- y = min(S(r), D(c));
- [alloc, ind]= max(y);
- rr= r(ind);
- cc= c(ind);
- X(rr, cc)= alloc;
- S(rr)= S(rr)- alloc;
- D(cc)= D(cc)-alloc;
- C(rr, cc)= inf;
- end
- table =X;
- table= [table , S(:)];
- mD = [D, s];
- table= [table ; mD];
- var ={'D1','D2','D3', 'D4', 'Supply' };
- disp(array2table(table, 'VariableNames', var));
- Cost = Ci.*X;
- [m, n]= size(X);
- if nnz(X)==m+n-1
- disp('Non-degenerate initial BFS');
- else
- disp('degenerate initial BFS');
- end
- final = sum(Cost(:));
- disp("Total Cost is ");
- disp(final);
Advertisement
Add Comment
Please, Sign In to add comment
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 7 sec ago | 0.24 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ W
JavaScript | 12 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 9
JavaScript | 20 sec ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ V
JavaScript | 23 sec ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 29 sec ago | 0.24 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ X
JavaScript | 31 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ Y
JavaScript | 35 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 39 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand