1

I currently have a fixed set of length $5$ denoted with elements $A = \{s_1,\ldots,s_5\}$. I have a function that takes each element and cubes it, then sums across all elements, so that

$$ S = \sum_{i=1}^5 s_i^3 $$

However, sometimes the set may be missing elements, for example, $s_4$ may be missing. In those cases, I would like for it to be a $0$ inside the sum, so that I get $S = s_1+s_2+s_3+0+s_5$. Is there a way to represent this in a rigorous way, perhaps by using an indicator function?

I am thinking that the sum can be defined as

$$ S = \sum_{i=1}^5 s_i^3 \cdot \mathbb{1}\left(s_i \in A\right) $$

but I am having a hard time making this tight. Does anyone have suggestions? Thanks!

user321627
  • 2,584

2 Answers2

3

Honestly, your situation feels arbitrary. Neither the elements of a set nor the terms of a sum are ordered, so what you want might as well be $(|A|$ denotes the cardinality of the set $A)$ $$ S = \sum_{s \in A} s^3 + \sum_{i=1}^{5-|A|} 0,$$ which might as well just be $$ S = \sum_{s \in A} s^3. $$

ryang
  • 38,879
  • 14
  • 81
  • 179
1

Usually, $\widehat \cdot$ is used to indicate that an element is missing. For instance, we have that $$\sum_{i = 1}^n x_1 x_2 \cdots \widehat{x_i} \cdots x_n = x_2 x_3 \cdots x_n + x_1 x_3 \cdots x_n + \cdots + x_1 x_2 \cdots x_{n - 1}.$$ It might not be as precise as an indicator function, but this is fairly common in the literature.