-1

I didn't want to continue the discussion in comments so I decided to ask as a question:

What do we gain by writing this simple expression

$\sum_{k=0}^n 2^k = 2^{n+1} - 1$

as this where final index is missing and the index $k$ is a range:

$\sum_{0\le k < n} 2^k = 2^{n} - 1$

Apparently this is used in high mathematics by professional mathematicians but what do we gain in this case?

UserX
  • 4,930
zeynel
  • 365
  • 2
    95% of the time for stuff like this, the answer is probably simply "personal preference". Maybe consistency with other formulas or stylistic choices. – PrincessEev Dec 07 '23 at 13:17
  • Ok, but how do I know the final index since it is not stated explicitly? The first one I can read as "sum starting from $k=0$ to $n$". How do I read the other one? – zeynel Dec 07 '23 at 13:22

2 Answers2

2

There are at least two (related) advantages to excluding the upper bound.

  1. The sum $$\sum_{m \leq k < n}$$ (with $k$ being the bound variable) extends over $n - m$ terms; if you include the upper bound, it’s $n - m + 1$.

  2. If you split up a summation, you get $$\sum_{m \leq k < n} = \sum_{m \leq k < l} + \sum_{l \leq k < n}$$ for any $m \leq l \leq n$. If you include the upper bound, you get shifts by $1$ again.

(For these reasons, it’s common for range operators in programming languages to work this way.)

Now, in math the notation $$\sum_{k=m}^n$$ is firmly established to include the upper bound. If you want to exclude it, you have the option of using either the notation from above; or you need to change the meaning of the summation sign (which will be confusing even if you are explicit about it); or you need to invent your own version, like $$\sum_{k=m}^{<n}.$$

Of course, the notation with $m \leq k < n$ in the subscript also has a technical problem: It is not apparent anymore which variable is the one bound by the summation sign. I have seen $$\sum_{k : m \leq k < n}$$ as a possible notation to indicate that, but often, context is enough.

Eike Schulte
  • 3,232
  • 1
    Just echoing that, as the first part of this answer indicates, if you start doing manipulations with ranges, like intersecting, unioning, or complementing them, these "half open" ranges become almost mandatory. Otherwise you have all these +1s and -1s to keep track of, and you're going to get at least one of them wrong. – JonathanZ Dec 07 '23 at 16:42
  • Thanks, great answer. But I still have a question. If the subscript is $\sum_{0\le k < n} 2^k = 2^{n} - 1$, for $n=3$, $k$ can take the values, 0, 1 and 2 and the equality works. But $k$ can also be, 1 and 2 since we have $0\le k$. But if $k$ takes the values 1 and 2 only, the equality will not work. What am I missing? – zeynel Dec 08 '23 at 15:39
  • İgnore my comments above. I see that it works because $2^{n+1} -1$ becomes $2^n - 1$ – zeynel Dec 08 '23 at 16:33
  • Another question that I still don't understand: If we write the subscript as $0 \leq k < n$ how do we know the initial value of $k$? $k_{init}$ can be 0 or greater than zero, that is, any number $<n$. – zeynel Dec 12 '23 at 19:32
  • 1
    The sum includes all $k$ that fulfill the inequality, with the tacit understanding that we’re only considering whole numbers for $k$. – Eike Schulte Dec 12 '23 at 21:19
  • 1
    To drive the point home: there is no "initial value of $k$" when dealing with a subscript with range, like $0\le k<n$ or more generally $k\in E.$ You can forget about whatever ordering on $E.$ – Anne Bauval Dec 13 '23 at 13:17
  • @EikeSchulte Thanks. I think finally I understand: We use the index range notation when we want to do abstract manipulations with the summation sign. When we are interested in doing actual summation we indicate beginning and ending indices as e.g. $k_{init}=0$ and $n=5$. $k_{final}$ can be $k_{final}=n$ or $k_{final} = n-1$. It's no different than summing an array with Python or any other language. – zeynel Dec 15 '23 at 08:23
  • 1
    Yes, “standard” summation notation certainly has a more ordered “feel” to it. That said, as it is a very strong convention in math to only use $+$ for associative and commutative operations, the order really should not matter. (For finite summations that is. In the infinite case, there are questions of conditional convergence which do depend on the order to some degree.) – Eike Schulte Dec 15 '23 at 12:26
0

Of course, $$\begin{align}\forall n\in\{0,1,\dots\}\quad\sum_{k=0}^n 2^k = 2^{n+1} - 1\\\iff\forall n\in\{1,2,\dots\}\quad\sum_{k=0}^{n-1}2^k = 2^n- 1.\end{align}$$ This can be rewritten: $$\begin{align}\forall n\in\{0,1,\dots\}\quad\sum_{0\le k\le n}2^k = 2^{n+1} - 1\\\iff\forall n\in\{1,2,\dots\}\quad\sum_{0\le k\le n-1}2^k = 2^n- 1\\\iff\forall n\in\{1,2,\dots\}\quad\sum_{0\le k<n}2^k = 2^n- 1.\end{align}$$

As explained many times in comments to your previous post which you are refering to, the advantage of $\sum_{0\le k < n} 2^k = 2^n- 1$ over $\sum_{k=0}^{n-1} 2^k = 2^n- 1$ was for $n=0$: $$\sum_{0\le k <0}\text{anything}=\sum_{k\in\varnothing}\text{anything}=0$$ (cf. "Empty sum" on Wikipedia), whereas, as far as I know, $\sum_{k=0}^{-1} 2^k$ makes no sense.

This allowed to prove by induction $$\forall n\in\{\color{red}0,1,2,\dots\}\quad\sum_{0\le k<n}2^k = 2^n- 1,$$ the base case being $0=2^0-1$.

Anne Bauval
  • 34,650