2
$\begingroup$

Is there an effective method to solve the following optimization problem in Mathematica?

\begin{align*} \min & \quad -t \\ \mathrm{s.t.} &\quad A \succeq 0,\,a=1 \end{align*} I mean A is positive semidefinite.

The matrix $A$ is given:

A={{2 a^3-t,-12 a^3+3 a^2 b+15 a^2 c-8 c^3,2 u,2 v},{-12 a^3+3 a^2 b+15 a^2 c-8 c^3,-t-2 (8 a^3+36 a^2 b-3 a b^2-30 a b c-15 a c^2-15 a^2 d+24 c^2 d+2 u),-24 a^2 b-36 a b^2+b^3+15 b^2 c+15 b c^2+c^3+30 a b d+30 a c d-24 c d^2-2 v,2 w},{2 u,-24 a^2 b-36 a b^2+b^3+15 b^2 c+15 b c^2+c^3+30 a b d+30 a c d-24 c d^2-2 v,-t-2 (24 a b^2+12 b^3-15 b^2 d-30 b c d-3 c^2 d-15 a d^2+8 d^3+2 w),-8 b^3+15 b d^2+3 c d^2},{2 v,2 w,-8 b^3+15 b d^2+3 c d^2,2 d^3-t}}
$\endgroup$
4
  • $\begingroup$ You could provide details on $A(t)$ $\endgroup$ Commented Nov 13, 2022 at 0:58
  • $\begingroup$ You don't have a matrix. You have a matrix-valued function. You don't even mention if this function is affine, as Roman claims. Are you even trying? $\endgroup$ Commented Nov 13, 2022 at 10:29
  • $\begingroup$ @RodrigodeAzevedo , I edited the question again. $\endgroup$
    – lapcal
    Commented Nov 13, 2022 at 14:50
  • $\begingroup$ It remains unsatisfactory. Something satisfactory would be $A (t) := A_0 + t A_1$, where both $A_0$ and $A_1$ are symmetric. In short, reading the Mathematica code should not be required in order to understand what $A (t)$ looks like. $\endgroup$ Commented Nov 13, 2022 at 15:07

2 Answers 2

5
$\begingroup$
  • If the "succeed equal to" $\succeq$ mean positive definite, we can consider the determinant of submatrix. $$\mathrm{Det} A(1,2,\cdots, k ; 1,2,\cdots,k)\geq 0$$

for all $1\leq k\leq n$

conditions = {Det[A[[Range@1, Range@1]]], Det[A[[Range@2, Range@2]]], 
    Det[A[[Range@3, Range@3]]], Det[A[[Range@4, Range@4]]]} >= 0;
sol = NMinimize[{-t, conditions}, {a, b, c, d, u, v, w, t}, 
  Method -> "SimulatedAnnealing"]

{0.00129277, {a -> -0.0646633, b -> -0.100358, c -> 0.1109, d -> -0.0633609, u -> -0.000584144, v -> -0.0000168834, w -> 0.0000766361, t -> -0.00129277}}

conditions /. sol[[2]]
Eigenvalues[A /. sol[[2]]] > 0 // Thread

{True, True, True, True} {True, True, True, True}

$\endgroup$
1
  • $\begingroup$ @Roman Thanks your example, it is actually need to add another extra conditions for the questionor's question. $\endgroup$
    – cvgmt
    Commented Nov 13, 2022 at 15:03
1
$\begingroup$
A = {{2 a^3 - t, -12 a^3 + 3 a^2 b + 15 a^2 c - 8 c^3, 2 u, 2 v},
     {-12 a^3 + 3 a^2 b + 15 a^2 c - 8 c^3, -t - 2 (8 a^3 + 36 a^2 b - 3 a b^2 - 30 a b c - 15 a c^2 - 15 a^2 d + 24 c^2 d + 2 u), -24 a^2 b - 36 a b^2 + b^3 + 15 b^2 c + 15 b c^2 + c^3 + 30 a b d + 30 a c d - 24 c d^2 - 2 v, 2 w},
     {2 u, -24 a^2 b - 36 a b^2 + b^3 + 15 b^2 c + 15 b c^2 + c^3 + 30 a b d + 30 a c d - 24 c d^2 - 2 v, -t - 2 (24 a b^2 + 12 b^3 - 15 b^2 d - 30 b c d - 3 c^2 d - 15 a d^2 + 8 d^3 + 2 w), -8 b^3 + 15 b d^2 + 3 c d^2},
     {2 v, 2 w, -8 b^3 + 15 b d^2 + 3 c d^2, 2 d^3 - t}} /. a -> 1;

NMinimize[{-t, VectorGreaterEqual[{A, 0}, {"SemidefiniteCone", 4}]},
          Variables[A], Method -> "SimulatedAnnealing"]

(*    {-0.368118, {b -> 0.320836, c -> 0.673546, d -> 1.42392, t -> 0.368118,
                   u -> -2.55571, v -> -0.698951, w -> -0.226576}}            *)

VectorGreaterEqual looks better on the user interface:

enter image description here

$\endgroup$
3
  • $\begingroup$ Where does rule ` /. a -> 1` come from? $\endgroup$ Commented Nov 13, 2022 at 16:47
  • $\begingroup$ @UlrichNeumann The question keeps changing and this condition has been added by the OP: minimize $A$ over the positive semidefinite cone with the constraint of $a=1$. $\endgroup$
    – Roman
    Commented Nov 13, 2022 at 17:18
  • $\begingroup$ Thanks, change has passed me by $\endgroup$ Commented Nov 13, 2022 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.