How to write this


(mousa) #1

sum((x/h)^0.25)sum((x^0.75)/h^-0.25)

given that x =[x1 x2…] and all positive such that sum(x)=1
and h=[h1,h2,…] also all positive and of equal dimension to x


(Mark L. Stone) #2

If x has dimension 2 or greater, this is neither convex nor concave (as can be seen by looking at the eigenvalues of the Hessian), and therefore can not be entered into CVX. h being the vector of ones is sufficient to show this.

Edit (post left for context, but is withdrawn due to error).


(mousa) #3

yes x has dimension 2…but i derived the hessian of the whole objective function and it showed that it is positive semi-definite
what i have given above is just a portion of the whole objective function.
any ideas how to approach this problem


(Mark L. Stone) #4

Sorry, I had a typo in my calculation and entered the wrong function. So I withdraw the non-convex claim.

It looks like it might be concave (definitely not convex, unless I have misread the function), but I haven’t proven it. If dimension is 2, you can reduce this to a 1 dimensional problem by substituting x2 = 1- x1, and of course the constraint 0 <= x1 <= 1. I don’t see how to get it accepted by CVX. Can you build it up following CVX’s rules?


(mousa) #5

well, I tried the following
(sum(pow_p(x./h,0.25)(sum(h.(pow_p(x./h,0.75))))

but I get the following error
Error using cvx/times (line 173)
Disciplined convex programming error:
Cannot perform the operation: {concave} .* {concave}


(Mark L. Stone) #6

I suggest you (re-)read the CVX Users’ Guide. Of course that operation is not allowed, as it does not necessarily preserve concavity.


(mousa) #7

thank you very much, will do that

Appreciate the help


(Michael C. Grant) #8

It actually depends a lot on what you’re trying to do with this. Because in fact, it is possible to express

\left(\sum_i (x_i/h)^{1/4} \sum_i (x_i/h)^{3/4} \right)^{1/2}

in CVX as follows:

geo_mean([sum(pow_p(x/h,0.25)),sum(pow_p(x/h,0.75)])

But you can’t express it without the surrounding square root. The geometric mean here is concave, so you could maximize this, or you could put a lower bound on it.