Professional Documents
Culture Documents
1 Problem Statement
Consider a sequence of N elements {ai } for 1 ≤ i ≤ N consisting entirely of
zeros and ones, i.e. ai ∈ {0, 1} ∀i.
Then, we define a prefix sum Sk of the sequence for k ≤ N as the sum of the
first k elements of the sequence, i.e.
k
X
Sk = ai
i=1