3

I'm wondering whether there is a combinatorial proof for the identity $$ \sum_{k=0}^{n}k2^{k-1}=(n-1)2^n+1 $$ where $n$ is a positive integer

RobPratt
  • 50,938
boaz
  • 5,551
  • That sum should start at $k=1$. – Sammy Black Aug 27 '24 at 16:20
  • Also, please have a look at this, then come back and put a bit more effort into asking your question if you intend for people to put in effort in answering it. – Sammy Black Aug 27 '24 at 16:21
  • 5
    @SammyBlack starting at $k=0$ gives the exact same thing, since $0\cdot2^{0}=0.$ – Thomas Andrews Aug 27 '24 at 16:23
  • 1
    I realize that, but if it's meant to be a combinatorial proof (a bijection by counting things in different ways), then we probably don't want a negative exponent. – Sammy Black Aug 27 '24 at 16:28
  • 1
    @SammyBlack then you should have said that - as it is, it looks like you think it was wrong starting $k=0.$ – Thomas Andrews Aug 27 '24 at 16:30
  • The real hard part is the $+1$ on the right side. That suggests to me that the set of values the right side counts is something non quite so simple. – Thomas Andrews Aug 27 '24 at 16:37
  • Starting again, the left side counts triples $(i,k,S)$ where $1\leq \leq k\leq n$ and $S\subseteq {1,2,\dots,n}$ with $k=\max S.$ Given $k,$ there are $2^{k-1}$ subsets with $k=\max S$ and $k$ ways to choose $i.$ – Thomas Andrews Aug 27 '24 at 16:57
  • Since $k$ is entirely determine by $S,$ then this can be rewritten as counting all tuples $(i,S)$ with $S\subseteq {1,2,\dots,n}$ and $1\leq i\leq \max S.$ – Thomas Andrews Aug 27 '24 at 17:03
  • Thanks Thomas. This explains left hand side of the identity. How can we count without separation into disjoint cases – boaz Aug 27 '24 at 17:17

4 Answers4

4

(I encourage you to read my note for how Mike's approach can be modified to tell a very nice story, which is better than my writeup.)

We ignore $k=0$.
Consider the first $n$ integers.
Consider pairs of $(S, k)$, where $ S \subset [n]$ and $ k \in [n]$.
How many pairs satisfy $S - [k-1 ] \neq \emptyset$?

Approach 1: Condition on $\max S$.
We pick the largest $ a \in S$. Clearly $a \geq k$ is a necessary and sufficient condition for $ S - [k-1] \neq \emptyset$.
Given $a$, there are $2^{a-1}$ choices for the rest of $S$, and $a$ choices for $k$.
So there are $ \sum_{a=1}^{n} a 2^{a-1}$ valid pairs.

Approach 2: Count the complement $S \subset [k-1]$.
For a given $k$, there are $2^{k-1}$ choices for $S$. Summing over all $k$, there are a total of $2^n - 1$ pairs for the complement.
Without restrictions, there are $n$ choices for $k$ and $2^n$ choices for $S$, so there are $n2^n$ pairs in this universe.
Hence there are $n2^n - (2^n -1 )$ valid pairs.

Thus we establish the identity:

$$ \sum_{a=1}^{n} a 2^{a-1} = n 2^n - (2^n - 1) = (n-1) 2^n + 1. $$

Bonus Approach 3: Condition on $k$.
Fix $k$. We can pick any subset of $[k-1]$ for $2^{k-1}$ ways.
We can pick any non-empty subset of $[n]-[k-1]$, for $2^{n-k} - 1 $ ways.
So there are $ \sum_{k=1}^n 2^{k-1}(2^{n-k} - 1) $ ways.

Thus we establish the identity:

$$ \sum_{a=1}^{n} a 2^{a-1} = \sum_{k=1}^n 2^{k-1}(2^{n-k} - 1) = (n-1) 2^n + 1. $$

Notes

  • This proof was obtained by first creating the algebraic manipulation proof, telling the combinatorial story via the change of summation order, and cleaning it up significantly. We also use $ \sum_{k=0}^n 2^k = 2^{n+1}-1$, which counts non-empty subsets. $$ \sum_{k=1}^n k2^{k-1} = \sum_{k=1}^n \sum_{j=1}^k 2^{k-1} = \sum_{j=1}^n \sum_{k=j}^n 2^{k-1} = \sum_{j=1}^n \left( 2^{j-1} \sum_{k=0}^{n-j} 2^k \right) = \sum_{j=1}^n 2^{j-1} (2^{n-j + 1 } - 1 ) \\ = \sum_{j=1}^n 2^{n} - 2^{j-1} = n2^{n} - (2^{n} - 1 ) = (n-1)2^n + 1. $$

  • We can modify Mike's solution to the following story: Given $n+1$ children with corresponding ages, how many ways can we pick a non-empty club where the president and the oldest member are distinct?

    • LHS: Suppose the oldest member of the club has age $k+1$. Pick any one of the younger $k$ children to be president, and any of the other $k-1$ children to be in the club. Hence, summing over $k$, there are $\sum_{k=1}^{n} k2^{k-1}$ such clubs.
    • RHS: Count the complement. Given any non-empty group, the oldest member is the president, so there are $2^{n+1}-1$ in the complement. For the universe, we pick any of the $n+1$ children to be president, and then pick any of the other $n$ children to be in the club, so there are $(n+1)2^{n} $ ways. Thus there are $ (n+1)2^{n} - (2^{n+1}-1) = (n-1)2^n + 1$ such clubs.
    • Middle of Bonus: Pick the president. Pick a non-empty set of older children. Pick the younger children.
    • Can you see the bijection between our proofs? Hint: Let my $k$ be his president.
Calvin Lin
  • 77,541
3

Here's a story.

Think of a rooted dyadic tree cut at distance $n$ from the root (we include all vertices at distance $n$). For each vertex $x$, there's exactly one path from the root to $x$. For each vertex $x$, place one ball on every vertex on the path from the root to $x$, excluding the root.

We count the number of balls placed $S$ in two different ways.

  1. As there are exactly $2^{k}$ vertices of distance $k$ from the root and each one contributes exactly $k$ balls to the sum, the number of balls is $$(*)\quad S=\sum_{k=1}^n k 2^{k}.$$

  2. The number of balls placed at each vertex different from the root is exactly the number of paths passing through it. This is equal to the one path terminating at the vertex plus all the paths which continue to vertices below it. Now:

  • The number of balls at a vertex at a distance $k>0$ from the root is $1+ (2+\dots + 2^{n-k}) = 2^{n-k+1}-1$.

  • There are exactly $2^{k}$ vertices at distance $k$ from the root.

  • Therefore the number of balls placed is

$$(**)\quad S=\sum_{k=1}^n (2^{n-k+1} -1)2^k= n 2^{n+1} - 2*(2^n-1)=(n-1)2^{n+1} +2.$$

From $(*)$ and $(**)$ we have

$$ \sum_{k=1}^n k 2^{k-1} = \frac{S}{2} = (n-1)2^n +1.$$

Fnacool
  • 9,581
2

You have $n$ flagpoles arranged in a line on each of which a red or blue flag is to be placed. At least one flag must be blue. In addition, a light will be placed at the top of one flagpole, with the rule that the light may not be placed to the right of the rightmost blue flag. Let $A$ be the set of configurations obeying these rules.

The left side of the identity gives the enumeration of $A$, with $k$ understood as the position of the rightmost blue flag. (There are $2^{k-1}$ color sequences in which the rightmost blue flag is on the $k{\text{th}}$ flagpole and, for each of these, $k$ positions in which the light may be placed.)

Now look at a slightly different problem: same flagpoles and flags, but drop the requirement that there be at least one blue flag and allow the light to be placed on any flagpole except for the rightmost one, irrespective of colors. The set of such configurations--call it $B$--has $(n-1)2^n$ elements, which matches the right side of the identity, except for the $+1$ term.

Configurations in $B$ can be mapped to configurations in $A$ by the following function, which we call $f$: if the flagpole with the light as well as all flagpoles to its right have red flags, replace all flags to the right of the flagpole with the light with blue flags and move the light to the rightmost flagpole; otherwise, leave the configuration as it is.

The function $f$ has a left inverse, that is, a function $g$ from $A$ to $B$ such that $g\circ f$ is the identity function on $B$, which implies that $f$ is one-to-one. For a configuration in the image of $B$ under $f$, define the action of $g$ as follows: if the light is on the rightmost flagpole, move the light to the flagpole with the rightmost red flag, and replace all blue flags to the right of that one with red flags; otherwise leave the configuration as it is. Clearly if we apply $f$ to a configuration of $B$, and then apply $g$ to the result, we get back the configuration we started with.

There is, however, one configuration in $A$ to which the map $g$ as we have defined it cannot be applied, namely the one with the light on the rightmost flagpole and all flags blue. Call this configuration $c$. So there is a bijection between $B$ and $A\setminus\{c\}$. This proves the identity.

Will Orrick
  • 19,218
  • For completeness the last paragraph should have said, "It is easy to to see that $f\circ g$ is the identity function on $A\setminus{c}$ and hence there is a bijection..." – Will Orrick Aug 29 '24 at 18:01
1

Here's the best I could come up with. I can give direct combinatorial proofs for both of equations $(1)$ and $(2)$. Your equation is the result of subtracting $(2)$ from $(1)$. $$ \begin{align} \sum_{k=0}^{n}(k2^{k-1}+2^k)&=(n+1)2^{n}\tag1 \\ \sum_{k=0}^n 2^k&=2^{n+1}-1\tag2 \end{align} $$ For equation $(1)$, both sides are the answer to this question:

There are $n+1$ children with different ages. How many ways are there to select a nonempty subset of children to form a club, and then nominate a club member to be president?

LHS: Suppose that the oldest child in the club is the $(k+1)^\text{st}$ youngest child $(0\le k\le n)$. There are two cases:

  • We could nominate the $(k+1)^\text{st}$ child to be president. Each of the $k$ children younger than this child can be freely included in the club or not, so $2^k$ options.

  • If the $(k+1)^\text{st}$ child is not president, then the president is any of the $k$ younger children, so $k$ choices. Then, the remaining $k-1$ children can be freely included or not, so $2^{k-1}$ choices.

RHS: First, select the president, then, select the remaining club members. There are $n+1$ choices for president, and the remaining $n$ members can be freely included or not, so $2^n$ options.

For a combinatorial proof of $(2)$, you again can prove this by forming clubs from $n+1$ children. This time, you do not choose a president, and you require the club to be nonempty. See this earlier question: counting proof for $\sum_{k=0}^{n-1} 2^{k} = 2^n - 1$.

Mike Earnest
  • 84,902
  • FYI I edited my solution to indicate how you can combine your stories by taking the difference. It reflects what I previously described. – Calvin Lin Aug 27 '24 at 18:46