Summation in subsets

26 Views Asked by At

A bit of a beginner question, but I'm currently working on routing and travelling salesman problem and a bit confused. Currently I have these two constraints in my model, but what is the mathemathical difference between these two?

  1. $$\sum_{i \in V}x_i,_j = 1 \ for \ all \ {j \in V}$$
  2. $$\sum_{j \in V}x_i,_j = 1 \ for \ all \ {i \in V}$$

Which constraint sums up the rows and which constraint sums up the columns?

1

There are 1 best solutions below

1
On

Consider the matrix $X = (x_{i,j})_{i,j \in V}$. The first expression says that, for every column (which are indexed by $j \in V$), the sum of its elements is 1. In other words, the $j$-column is fixed and the row index $i$ runs: so it's a sum over a column. The second expression is the same but for every row.