Questions tagged [summation]
27 questions
6
votes
2 answers
Why is $\sum_{i=1}^n O(i)$ not the same as $O(1)+O(2)+\dots+O(n)$?
The well-known textbook Introduction to Algorithms ("CLRS", 3rd edition, chapter 3.1) claims the following:
$$ \sum_{i=1}^n O(i) $$
is not the same as (I'm not using DNE because the book explicitly says "is not the same as")
$$ O(1) + O(2) + \dots…
Padaca
4
votes
1 answer
Maximum sum of values in a square grid (one in each row/ column)
this is my first post here so bare with me :).
What i'm looking for is an algorithm that can find the maximum sum of values in a square grid under the restriction, that you can only pick 1 value from each column and row.
so for…
Control
- 41
- 3
4
votes
2 answers
Sum of series (n/1) + (n/2) + (n/3) + (n/4) +…….+ (n/n)
I wonder if there is a formula to calculate the sum of n/1 + n/2 + n/3 + n/4 + ... + 1. (Integer division)
The number n can be as large as 10^12, so a formula or a solution having the time complexity of O(logn) will work.
This is how far I can…
Loc Truong
- 233
- 1
- 3
- 9
3
votes
0 answers
Trilinear sum of characters in $\mathbb{Z}_2^n$
This is my first time asking a question on this site, as I believe my question is probably related to computer science (and possibly to the analysis of Boolean functions), and someone here might be able to help me.
Consider the group…
RFZ
- 131
- 2
3
votes
2 answers
Linearity property of summation applied to Big Theta notation (CLRS math background appendix)
Section A.1 of the Mathematical Appendix of the CLRS, the third edition, page 1146, contains the following formula stating linearity property of summation applied to $\Theta$ notation:
$$
\sum_{k=1}^{n}\Theta\left ( f \left ( k \right ) \right…
Pavlo Maistrenko
- 133
- 3
2
votes
1 answer
sum of Boolean characters larger degree
I was curious if someone knew the answer/reference for the following. So it is well-known that if $S\in \{0,1\}^n$, then
$$
\frac{1}{2^n}\sum_{x\in \{0,1\}^n} (-1)^{\langle S, x\rangle}=1
$$
if and only if $S=0^n$ and is $0$ otherwise. Suppose I…
postasguest
- 21
- 1
2
votes
2 answers
Closed-form expression for the sums of the rows of the Trinomial triangle
There is a question in the second chapter of the book that I'm unable to solve, and unfortunately algorist.com does not provide a rigorous enough solution, or maybe I can't quite understand it.
Here is the question:
I've noticed the sums of rows…
kasra
- 235
- 2
- 10
2
votes
0 answers
How to parallelize a summation efficiently
Say I have an array a[1..n], and I want to output an array s[1..n] with s[i] = a[1]+...+a[i]. What is the best (or at least standard) way to do so in parallel?
The way I can think of doing it, given m processors, is to split the array a into m…
H A Helfgott
- 241
- 1
- 6
2
votes
1 answer
How to solve recurrence $T(n) = 5T(\frac{n}{2}) + n^2\lg^2 n$
I have tried solve the recurrence $T(n) = 5T(\frac{n}{2}) + n^2\lg^2 n$ using substitution. Apparently, it is exact for some $n$ and the order of the general solution can be found from this exact solution.
By substitution I got the following (not…
bingbong
- 29
- 3
1
vote
0 answers
Grouping transactions having pre-determined sums?
I have a transaction grouping problem that I'm having trouble to devise the algorithm to solve it. Not even ChatGPT (version 3.5) can solve this correctly.
Suppose I have five transactions:
Transaction ID AA value 10
Transaction ID BB value…
adib
- 111
- 2
1
vote
1 answer
Is there a formula for this summation $\sum\limits_{k=i}^\mathbb{N}{i}$?
Is there a formulae for this summation?
I wonder this could be not a constant or to say that i * i?
$\sum\limits_{k=i}^\mathbb{N}{i}$
Newbieee
- 25
- 3
1
vote
1 answer
Asymptotic notation for summations
I am struggling to understand why this property of asymptotic notation is true
Cirrus86
- 123
- 3
1
vote
0 answers
Reconstructing an Array via Time-Intensive Subset Queries
I am trying to design an algorithm for a problem, and the following is an auxiliary problem for which a good solution would imply a faster algorithm for the original problem.
I am given access to an array of numbers. However, I am only allowed to…
SmeltQuake
- 63
- 4
1
vote
2 answers
Summation of asymptotic notation
How can we solve summation of asymptotic notations like given below:
$$
\sum_{k=1}^{n-1} O(n).
$$
mbhatti_20
- 11
- 2
0
votes
1 answer
What is the simplified form of this big o
$O(\sum_{l=0}^{log_2n} l*2^l)$. I took the integral of the term which I think is $O(n*log(n))$
Prikshet
- 17
- 1