Chpt4 贪心算法
区间调度
![](https://img.haomeiwen.com/i11651659/c355474bc9a5b592.png)
compatible means that b_start-time is later than a_end-time.
区间划分
![](https://img.haomeiwen.com/i11651659/5151c4c37eadd255.png)
最小延迟
![](https://img.haomeiwen.com/i11651659/d51a47d2a582b097.png)
命题4.7 存在一个没有空闲时间的最优调度
命题4.8 所有所有逆序也没有空闲时间的调度有相同的最大延迟
命题4.9 存在一个即没有逆序,也没有空闲时间的最优调度.
最优超高速缓存
???
一个图的最短路径
DJ算法
最小生成树
逆删除
proc ReverseDelete():
create an edge list E with all edges and their weights
sort E in descending order
for each edge in E:
v1,v2← vertices connected by edge
delete edge
if v1 and v2 are not connected
reinsert edge
endIf
endFor
end Proc
prim
![](https://img.haomeiwen.com/i11651659/63d56c6e1edf8048.png)
kruskal
![](https://img.haomeiwen.com/i11651659/965fb3aeb03e35e4.png)
聚类
最小生成树去掉最大的k-1个边
huffmancode
prefix code
网友评论