Hi, This is an example from Convex Optimization Book. I only want to check the strong duality by using dual variables returned by cvx. For the first problem it does hold. But for the dual problem it is not. Even when I remove negative instances which make the result complex number, the strong duality does not hold. Why? Actually I have the same difficulty with the dual variables returned by cvx, in one of my own problems and when I tried to figure out it using a simple problem using cvx, I encountered this even with problems from the book.
% Section 11.8.4: Network rate optimization
% Boyd & Vandenberghe "Convex Optimization"
% Argyrios Zymnis - 05/03/08
% some comments
L = 20;
n = 10;
k = 7; %average links per flow
A = double(rand(L,n) <= k/L);
c = 0.9*rand(L,1)+0.1;
% Solve network rate problem
dual variable LA % I added this
LA:A*x <= c
primal_obj = cvx_optval;
c'*LA-sum(log(A'*LA))-n % I added this
% Solve dual problem to obtain link prices
dual variable xd % I added this
xd:lambda >= 0
sum(log(xd))% I added this
dual_obj = cvx_optval;
I’m getting also lambda and LA identical but I expect the result of sum(log(xd)) be equal to objective function of primal problem which is not. it’s equal -129.9515 but the objective of primal problem is -31.5685. Thanks a lot.