I've been trying to solve this problem for quite some time now and I can't think of how to reduce the inner summation to a smaller problem. Usually when I have variables in the upper and lower bound of the summation, I just do
(upperbound−lowerbound+1)∗a where a is the value inside the summation. But this wont work here because I'll still have the j variable inside the outer sigma. Is there an easier way to do this that I don't know?
n∑i=0n−1∑j=i(j−i+1)
According to WolframAlpha, the solution should be:
16n(n2+3n+2)
Answer
This method doesn't use combinatorics explicitly, but reduces the sum to more well-known ones.
The terms −i and 1 don't depend on the inner summation variable j, so you can take them out using the method you describe:
n∑i=0n−1∑j=i(j−i+1)=n∑i=0((n−i)(1−i)+n−1∑j=ij)
Also, we evaluate the inner summation as T(n−1)−T(i−1) where T(x) is the xth triangular number, and T(−1)=T(0)=0
n∑i=0n−1∑j=i(j−i+1)=n∑i=0((n−i)(1−i)+n−1∑j=ij)=n∑i=0(n−i(n+1)+i2+n−1∑j=ij)=nn∑i=01−(n+1)n∑i=0i+n∑i=0i2+n∑i=0n−1∑j=ij=n(n+1)−(n+1)T(n)+n∑i=0i2+n∑i=0n−1∑j=ij=n(n+1)−(n+1)T(n)+n∑i=0i2+n∑i=0(T(n−1)−T(i−1))=n(n+1)−(n+1)T(n)+n∑i=0i2+(n+1)T(n−1)−n∑i=0T(i−1)=n(n+1)−(n+1)T(n)+n∑i=0i2+(n+1)T(n−1)−n−1∑i=1T(i)=(n+1)(n−(T(n)−T(n−1)))⏟0+n∑i=0i2−n−1∑i=1T(i)=n∑i=0i2−n−1∑i=1T(i)
Now the summation is expressed in terms of more standard summations whose values are well known.
n∑i=0i2=16n(n+1)(2n+1)
n−1∑i=1T(i)=16(n−1)n(n+1)
And we can evaluate:
n∑i=0i2−n−1∑i=1T(i)=16n(n+1)((2n+1)−(n−1))=16n(n+1)(n+2)=16n(n2+3n+2)
No comments:
Post a Comment