# How can we write a binary variable as a power to a constant number?

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}}$$

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$$
• interesting. Could you perhaps explain the rationale behind this linearization ? May 16 at 9:00

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}$$.