2
$\begingroup$

The author of this paper gave this sum $\sum_{i=1}^n \log\frac{N}{x_i} = O(N)$, where $x_i, i = 1,\dots,n$ is a partition of $N$, but I cannot figure out how the summation is solved.

  • 0
    Well, it is clearly less than $n\log N$, so if $N$ varies and $n$ remains fixed, then it is $O(\log N)$ which is $O(N)$. But it is unclear to what extent $n$ is allowed to vary.2017-02-21
  • 0
    Can we assume $x_i \geq 1$ ?2017-02-21
  • 0
    Are you trying to maximize the sum?2017-02-21
  • 0
    @Zubzub Yes, N and $x_i$ are all natural numbers2017-02-21
  • 0
    It's a rather long paper. Can you be more specific as to where the sum appears? If you allow the partition $N=1+1+\cdots+1$, then the sum is $N\log N$, which is *not* $O(N)$. So there must be some other condition on the $x_i$'s.2017-02-21
  • 0
    @Paul No, because $x_i$ is supposed to be random based on the inputs to the data structure2017-02-21
  • 0
    @BarryCipra Sorry, it is under page 659, Theorem 2 (Static Optimality Theorem)2017-02-21
  • 1
    @JackBlack, I'm sorry too, but I don't see how you're getting the formula in your post from what's on that page. Hopefully someone else can.2017-02-21

2 Answers 2

1

We have $$\sum_{i=1}^{n} \log \frac {N}{x_i}$$ $$=(\log N - \log x_1) +(\log N- \log x_2) +\cdots + (\log N -\log x_n) $$ $$= n (\log N) -(\log x_1 +\log x_2 +\cdots \log x_n) $$ $$=n\log N -\log \prod_{i=1}^{n} x_i $$

I think there is a typo in your question in the sense that $\prod_{i=1}^{n} x_i = N $. Hope it helps.

  • 0
    I soubt tat's the problem, since OP is quite clear in the use of the word "partition."2017-02-21
1

I'm honestly not sure about my proof but I will try. We will do an induction on $n$.

Starting at $n=1$, clearly $x_1 = N$ and the sum is $0$ which is $O(N)$.

Now assuming it is true up to $n$ and let's see $n+1$ : $$ \sum_{i=1}^{n+1} \log\frac{N}{x_i} = \sum_{i=1}^{n} \log\frac{N}{x_i} + \log \frac{N}{x_{n+1}}. $$ Now we know that for a fixed $N$, $\log \frac{N}{x_{n+1}} \leq \log N$ since $x_{n+1} \geq 1$. Therefore applying the induction hypothesis we get $$ \sum_{i=1}^{n+1} \log\frac{N}{x_i} = \sum_{i=1}^{n} \log\frac{N}{x_i} + \log \frac{N}{x_{n+1}} \leq O(N) + \log N = O(N) $$

Note also that this proof assumes nothing about $N$ (except $N \geq 1$) so this holds for all fixed $N$.