Can someone help me to typeset the following optimization problem:
2 Answers
The following should produce your equation:
\documentclass[]{article}
\usepackage[]{amsmath}
\begin{document}
\begin{equation}
\min\lVert z\rVert_{1}\quad\text{subject to}\quad
\lVert Az - y\rVert_{2} \leq \eta\quad\text{and}\quad
z\in [0,1]^{N}.
\tag{$\mathrm{P}^{\eta}_{\mathrm{bin}}$}
\end{equation}
\end{document}
-
Is it possible to refer to this problem with the command \ref? Is it also possible to enumerate the problem like (1.1)– wayneCommented Sep 8, 2020 at 14:34
-
@wayne leave out the
\tag
(that's producing the expression in parentheses to the right, that way the equation will be numbered normally. Using\label
you can use\ref
to reference it (that's true whether you use\tag
or not, just put\label
after\tag
and its argument).– SkillmonCommented Sep 8, 2020 at 15:12 -
I add only a complement using optidef
package useful for optimization of the problems.
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{optidef}
\begin{document}
\begin{mini*}
{}{\lVert z\rVert_{1}}{}{}\tag{$\mathrm{P}^{\eta}_{\text{bin}}$}
\addConstraint {\lVert Az-y \rVert_{2}}{\leq \eta,}{\quad \text{ and } z\in [0,1]^{N}.}
\end{mini*}
\end{document}