知识卡片
流算法用少量内存处理数据
流算法处理无法完整存入内存的数据,空间限制显著小于输入规模;除了时间,还需记录对数据的扫描遍数。它把在线输入约束落到可用内存和通行次数上。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第27章 在线算法 · 查看原书依据
Streaming algorithms model this situation by requiring the memory used by an algorithm to be significantly smaller than the input size. For example, you may have a graph with n vertices and m edges with m ≫ n, but the memory allowed may be only O(n).
参考来源
- 位置:《算法导论(第4版)》第27章《在线算法》(OEBPS/chapter027.xhtml,文本字符[60000,62615))。
- 结论依据:第27章章末注释将流算法限定为数据过大、无法完整存储时用显著小于输入的数据空间处理,并明确把扫描遍数作为运行时间之外的指标。此处不涉及缓存概率界或 Art_P880–P888。
- 原始内容:Streaming algorithms model this situation by requiring the memory used by an algorithm to be significantly smaller than the input size. For example, you may have a graph with n vertices and m edges with m ≫ n , but the memory allowed may be only O ( n ).
- 补充原文:A streaming algorithm is measured by the number of passes made over the data in addition to the running time of the algorithm.