B Binary variables (Absolute values)

AI Thread Summary
The discussion centers on the formulation of absolute values using binary variables in mixed-integer programming (MIP). The user questions the significance of the bolded "2" in the MIP formulation, suggesting that the expected range of values should be between 0 and 1. They analyze the equations provided and conclude that the range appears to extend to 2 under certain conditions. The inquiry highlights confusion regarding the implications of the binary variables and their relationship to the absolute value calculations. Clarification is sought on whether the range indeed exceeds the expected limits.
Rev. Cheeseman
Messages
353
Reaction score
21
TL;DR Summary
The value is from 0 to 1, but what do these 2s represent?
Hello,

According to https://www.fico.com/fico-xpress-op.../mipform/dhtml/chap2s1.html?scroll=ssecabsval the formula for absolute values are :

y = | x1 - x2| for two variables x1, x2 with 0 ≤ xi ≤ U

Introduce binary variables d1, d2 to mean
d1 : 1 if x1 - x2 is the positive value
d2 : 1 if x2 - x1 is the positive value

MIP formulation
0 ≤ xi ≤ U [1.i]
0 ≤ y - (x1-x2) ≤ 2 · U · d2 [2]
0 ≤ y - (x2-x1) ≤ 2 · U · d1 [3]
d1 + d2 = 1 [4]

Notice the bolded 2s above in the MIP formulation section, what do these 2s represent? I thought the range of the value is just 0 to 1.
 
Physics news on Phys.org
Consider <br /> y - (x_1 - x_2) = |x_1 - x_2| - (x_1-x_2) = \begin{cases}<br /> 0 &amp; x_1 \geq x_2\quad (d_2 = 0)\\<br /> 2|x_1 - x_2| &amp; x_1 &lt; x_2\quad (d_2 = 1).\end{cases} Therefore 0 \leq y - (x_1 - x_2) \leq 2Ud_2.
 
pasmith said:
Consider <br /> y - (x_1 - x_2) = |x_1 - x_2| - (x_1-x_2) = \begin{cases}<br /> 0 &amp; x_1 \geq x_2\quad (d_2 = 0)\\<br /> 2|x_1 - x_2| &amp; x_1 &lt; x_2\quad (d_2 = 1).\end{cases} Therefore 0 \leq y - (x_1 - x_2) \leq 2Ud_2.

Ok, I'm sorry if I sounds ignorant but the range of value is still 0 to 1, and not from 0 to 1 and then 2. Correct?
 
I was reading a Bachelor thesis on Peano Arithmetic (PA). PA has the following axioms (not including the induction schema): $$\begin{align} & (A1) ~~~~ \forall x \neg (x + 1 = 0) \nonumber \\ & (A2) ~~~~ \forall xy (x + 1 =y + 1 \to x = y) \nonumber \\ & (A3) ~~~~ \forall x (x + 0 = x) \nonumber \\ & (A4) ~~~~ \forall xy (x + (y +1) = (x + y ) + 1) \nonumber \\ & (A5) ~~~~ \forall x (x \cdot 0 = 0) \nonumber \\ & (A6) ~~~~ \forall xy (x \cdot (y + 1) = (x \cdot y) + x) \nonumber...
Back
Top