0

I have a silly confusion.

For this constraint here, $a_{i1,j1} + a_{i2,j2} ≤ 1$ if $0 < |i1−i2|+|j1−j2| < d$.

I understand this constraint but I want to ensure that this encompasses all $i$ and $j$, not just $i1,i2$, and $j1,j2$. I am told that this constraint in fact, encompasses ALL $i$ and $j$, but I am NOT getting it.

Also, can we have 'if' in a programming constraint equation like this? I am trying to find an example but failing at that.

Please help.

user577215664
  • 40,625
  • Hi, Could you please Latex rendering allowed by mathjax? https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference This will make your post a lot more readable. – Plussoyeur Sep 23 '20 at 15:13
  • Done, thanks for the suggestion. –  Sep 23 '20 at 15:19

1 Answers1

1

This is actually not one constraint, but rather a set of constraints, one for each $(i_1, i_2, j_1, j_2)$ satisfying the condition $0 < |i_1 - i_2| + |j_1 - j_2| < d$. The "if" clause is not part of the linear programming problem itself, it just determines what constraints that problem has.

Robert Israel
  • 448,999
  • How do I generalize it for all i,j in accordance with linear programming rules? Including the 'if' is normal for expressing problems like these as I didn't see examples with 'if' in the constraints anywhere? Please help. –  Sep 23 '20 at 16:51
  • Sorry, are you saying that this is already generalized? Could you please elaborate how? –  Sep 23 '20 at 20:27
  • 1
    The "if" is actually be used as shorthand for "for all $i_1, i_2, j_1, j_2$ such that $0 < |i_1 -i_2| + |j_1 - j_2| < d$. – prubin Sep 23 '20 at 22:38
  • 1
    What do you mean by "generalized"? Do you want the constraint for all $i_1, i_2, j_1, j_2$? – Robert Israel Sep 24 '20 at 03:01
  • I want for all i and j that means $i_{1}$,$i_{2}$,$i_{3}$........$i_{n}$ and $j_{1}$,$j_{2}$,$j_{3}$........$j_{n}$ ..Thank you. –  Sep 25 '20 at 00:04
  • @prubin But how do I include the other constraint then...? This one: a_{i1,j1}+a{i2,j2}≤1.......without the if –  Sep 25 '20 at 00:08
  • 1
    So you say "for all $i_1$, $i_2$, $j_1$, $j_2$". – Robert Israel Sep 25 '20 at 00:23