这个 space 的复杂度是如何在这个系列总和中计算出来的?

How is this space complexity calculated in this series sum?

有人可以向我解释以下 space 复杂度计算吗?

Given a stream of numbers of size b bits, calculate the sum of these numbers.

If we have seen T numbers so far, the sum is at most T2^b and hence needs at most O(b+log T) space.

现在,T2^b 必须是上限,因为更准确的上限是 T(2^b - 1)。

但是他们是如何计算出 space 上限是 O(b +logT) 的?

使用 m 位,您最多可以存储(大约)2m 个数字.因此,换句话说,如果您知道总和,则需要取对数以获得位数(因此 space 复杂度)。

这里,log(T 2b) = b + log(T).