知识卡片
最近使用缓存按时期计数失误
按每遇到第k+1种不同块分期,LRU每期至多k次失误。
不能说离线最优每期必失误;前一期k种块加下一期首块共有k+1种,在该跨期窗口中最优至少失误一次。
隔一个边界取互不重叠窗口,m期给出OPT≥⌈(m−1)/2⌉,故LRU≤2k·OPT+k,竞争比为O(k)。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第27章 在线算法 · 查看原书依据
Epoch 1 begins with the first request. Epoch i, for i > 1, begins upon encountering the (k + 1)st distinct request since the beginning of epoch i − 1. Consider the following example of requests with k = 3: The first k = 3
参考来源
- 位置:《算法导论(第4版)》第27章《在线算法》(OEBPS/chapter027.xhtml,文本字符[30000,35000))。
- 结论依据:第27章给出按k种块分期与LRU每期至多k次失误;原书逐期OPT下界有反例,改用不重叠的跨期k+1种块窗口证明O(k)界。
- 原始内容:Epoch 1 begins with the first request. Epoch i , for i > 1, begins upon encountering the ( k + 1)st distinct request since the beginning of epoch i − 1. Consider the following example of requests with k = 3: The first k = 3