walkccc / CLRS

📚 Solutions to Introduction to Algorithms Third Edition
https://walkccc.me/CLRS
MIT License
4.62k stars 1.25k forks source link

5.2-4 #489

Open jingyuhhh opened 8 months ago

jingyuhhh commented 8 months ago

sum(1/n)=1?

1/n is divergent. Why can it be 1? image

Toby1009 commented 2 months ago
截圖 2024-05-19 凌晨1 45 08
Toby1009 commented 2 months ago

I think the ans is wrong , it should be n*(1/n) = 1

leverimmy commented 1 week ago

From my point of view, the answer is CORRECT. The dummy variable for the summation is $i$ instead of $n$. That is to say, $$1 = \sum{i = 1}^{n}\frac{1}{n} \neq \sum{n = 1}^{\infty}\frac{1}{n}(\text{diverges}).$$ So, summing up $1/n$'s, would yield to the result $1$. @jingyuhhh @Toby1009