My question is similar to this one though a bit more complicated. Though my question also includes indices, I am removing them to ease readability.

Let binary variables $x,y\in\{0,1\}$, non-negative continuous variable $z\in\mathbb{R}^+$ and the parameter $\lambda\in\mathbb{R}^+$. Is there a way to linearize the below equality constraint?

$$\displaystyle z=\sqrt{\lambda\left(x+y\right)}$$

Can we benefit from the fact that $\alpha=x+y$, where $\alpha \in \{0,1,2\}$ and write additional constraints?


1 Answer 1


For $j\in\{0,1,2\}$, introduce binary variable $w_j$ to indicate whether $x+y=j$, and then impose the following linear constraints: \begin{align} \sum_{j=0}^2 w_j &= 1 \\ \sum_{j=0}^2 j\cdot w_j &= x+y \\ \sqrt{\lambda}\sum_{j=0}^2 \sqrt{j}\cdot w_j &= z \end{align}

  • $\begingroup$ I posted and indexed version of the problem [here] (or.stackexchange.com/questions/3568/…) and I cannot ensure whether I correctly apply it or not. Can you please give it a hand? $\endgroup$
    – tcokyasar
    Feb 19, 2020 at 17:29

Your Answer

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

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