4

Let $x_{i,j}$ be a two-dimensional binary variable. Is it possible to write $x_{i,j}$ as a power to a number?

For example:

$$1- 0.3^{x_{i,j}} $$

GTek
  • 307
  • 1
  • 6

2 Answers2

15

If you check the two cases for $x_{i,j}$, you will see that you can rewrite the expression as a linear function of $x_{i,j}$:

  • $x_{i,j}=0$ yields $1-0.3^0=0$
  • $x_{i,j}=1$ yields $1-0.3^1=0.7$

So $1-0.3^{x_{i,j}} = 0.7x_{i,j}$ for binary $x_{i,j}$.

RobPratt
  • 32,006
  • 1
  • 44
  • 84
3

Suppose it is needed to linearize the expression $Z=P^U$. It can be written as $$Z=U\times P+1-U$$

where $U$ is a binary variable and $P$ is a parameter. This is a general formulation for calculating $Z=P^U$

  • if $U=0$ then $Z=1$
  • if $U=1$ then $Z=P$
Optimization team
  • 1,326
  • 1
  • 6
  • 20