I'm working through the 4th edition of CLRS, and I'm having difficulties understanding what the following pair of starred problems ask (p. 73):
★ f. Prove that for $S \subseteq \mathbb{Z}$, we have
$$\sum_{k \in S} \Theta\left( f(k) \right) = \Theta \left( \sum_{k \in S} f(k) \right), $$
assuming that both sums coverge.
★ g. Show that for $S \subseteq \mathbb{Z}$, the following asymptotic bound does not necessarily hold, even assuming that both products coverge, by giving a counterexample:
$$\prod_{k \in S} \Theta\left( f(k) \right) = \Theta \left( \prod_{k \in S} f(k) \right) .$$
In both problems, it is assumed that $f(n)$ is an asymptotically positive function.
My attempt:
On page 58, in the Asymptotic notation in equation and inequalities section, the authors write:
The number of anonymous functions in an expression is understood to be equal to the number of times the asymptotic notation appears.
They also write, regarding the interpretation of asymptotic notation in an equation:
No matter how the anonymous functions are chosen on the left of the equal sign, there is a way to choose the anonymous functions on the right of the equal sign to make the equation valid.
Based on these two rules my understanding of problem f is that for any function $g(k)$ which is $\Theta(f(k))$, I need to prove that the quotient $$\frac{\sum_{k \in S} g(k)}{\sum_{k \in S} f(k)} $$ is asymptotically bounded.
I am, however, unhappy with this formulation. In the right-hand side, for any fixed set $S$, the sum $\sum_{k \in S} f(k)$ is a constant. Similarly, the left-hand side appears to me to be constant too.
As a question in asymptotics, I'm looking for a variable to take the limit over and limit point. However, $k$ is "summed out" over $S$, and I cannot see to make sense of the problem.
One other way I tried to interpret the problem is that $S$ is a variable set $S_n$, for instance $S_n=\{1,2,\dots,n\}$. Then with a function such as $f(k)=k$ the equation becomes $$ \sum_{k=1}^n \Theta(k) = \Theta \left(\frac{n(n+1)}{2} \right) = \Theta \left( n^2 \right), $$ which appears reasonable.
Unfortunately, I am unhappy with this interpretation too. Why not include sets parametrized by two variables $S_{m,n}$ then? Or even many more? In that case the problem seems to get more difficult.
In summary, I would greatly appreciate help in breaking down the two problems into a more clearly posed form.
Thanks.
Edit:
A further complication for me is interpreting the $\Theta$ notation of the left-hand sides. Does the anonymous function $g(k) = \Theta(f(k))$ imply the limit is taken as $k \to \infty$ or as $k \to -\infty$? or both? With $S \subseteq \mathbb{Z}$ either limit is possible.