2.3.2 Index Sets as Expressions

In many situations, the index set is not simply an explicit list of elements, as in I = {1,,n}. Of course, any set expression can be used to construct the index set I. Hence, I could be the union or the intersection of other sets as in the following expression:

I = J ∪ K     or     I = J ∩ K

This kind of modification does not change anything for the indexed notation. It is immaterial, how the index set is constructed. Sometimes, however, we construct I as a subset of another set, say J, such that I J, and we use the notation:

I = {j ∈ J | P(j)}

where P(j) is a property about j J that is either true or false. The notation means: “for all j J such that P(j) is true”. Clearly, if P(j) is true for all elements in J then the two sets are equal (I = J). However, normally P(j) expresses a property that is true only for a proper subset of J. Using I in an indexed notation, we could write:

    Ei     with     I = {j ∈ J | P (j)}

However, it is more common and much shorter to use the notation which is as follows:


Hence, we attach the property P(j) directly to the indexing term starting it with the symbol . This is extremely useful and very common in modeling. Suppose we have a list of products. Then it is very common to sum over different subsets of products, for instance “all products for which the demand is larger than x” or “all products that are green” or whatever. It would be exaggerated to generate an explicit named index set each time.

Here are several examples: Suppose we have x1 = 10, x2 = 8, x3 = 2, x4 = 15, and x5 = 22. Furthermore, P(i) is defined to be “xi 9”, and Q(i) is defined as “i 4” with i I = {15}. Then the evaluation of the following expressions is:

       xi = x2 + x3 = 8 + 2 = 10

i∈I|P (i)

       xi = x4 + x5 = 15 + 22 = 37

In the first expression P(i) is true only for x2 and x3, hence the sum take place only over these two terms. In the second expression, Q(i) is true only for i = 4 and i = 5.

There is no need to explicitly name the properties; their corresponding expressions could be directly used in the indexing terms. Hence the two previous expressions could also be written as:

       xi = x2 + x3 = 8 + 2 = 10

     x  = x  + x  = 15 + 22 =  37
       i    4    5

We can write any Boolean expression after in the indexing term. This expression is called indexing condition.

Other examples with k K = {1100} are as following:

kKk2100k = 1 + 2 + + 10 = 55
kK3k5k2 = 32 + 42 + 52 = 50
kKk is primek = 2 + 3 + 5 + 7 + 11 + 17 + ... + 97 = 1060

In the first expression k2 100 is only true for 1 k 10. In the second expression, only 3, 4, 5 are allow for k. In the third, we say to take every k up to 100, such that k is prime.

We saw, to extend the indexing term from “i I” to “i IP(i)” does not change the meaning of the indexed notation. The expression i IP(i) is still a set albeit a subset of I that has no explicit name. However, no further concept has been added to the indexed notation.