Disioint-set data structure (Union-Find) Problem: maintain a dynamic collection of pairwise-disjoint sets S=(S Each set S; has one element distinguished as the representative element, rep[sil lust support 3 operations
文件格式: PDF大小: 168.81KB页数: 25
Shortest paths Single-source shortest paths nonnegative edge weights Dijkstra's algorithm: O(E+ vlg n General
文件格式: PDF大小: 159.83KB页数: 14
Negative-weight cycles Recall: If a graph G=(V, E) contains a negative weight cycle then some shortest paths may not exist
文件格式: PDF大小: 166.67KB页数: 25
Paths in graphs Consider a digraph g=(v, E)with edge-weight function w:E→>R. The weight of path p=v1→ →>…→> vi is defined to be (D)=∑(n,1)
文件格式: PDF大小: 297.74KB页数: 38
Graphs(review) Definition. a directed graph(digraph G=(, E)is an ordered pair consisting of a set y of vertices(singular: vertex) a sete c× of edges. In an undirected graphG=(V, E), the edge set e consists of unordered pairs of vertices In either case, we have El=O(v2).Moreover if G is connected, then E2v-l, which
文件格式: PDF大小: 253.76KB页数: 30
Dynamic programming Design technique, like divide-and-conquer Example: Longest Common Subsequence (LCs) Given two sequences x[l.. m] and yll.n], find a longest subsequence common to them both a' not the
文件格式: PDF大小: 132.7KB页数: 13
How large should a hash table be? Goal: Make the table as small as possible but large enough so that it wont overflow(or otherwise become inefficient Problem: what if we don 't know the proper size
文件格式: PDF大小: 198.39KB页数: 34
Fixed -universe successor problem Goal: maintain a dynamic subset s of size n of the universe 0=10, 1,.,u-1 of size u subject to these operations INSERT(X∈U\\S): Add x to s DELETE(X E S): Remove x from S
文件格式: PDF大小: 146.87KB页数: 23
Computational geometry Algorithms for solving geometric problems in 2D and higher Fundamental objects: o point line segment
文件格式: PDF大小: 246.8KB页数: 28
ynamic order statistics OS-SELECT(i, S): returns the i th smallest element in the dynamic set S. OS-RANK(, S): returns the rank ofx E S in the sorted order of s s elements IDEA: Use a red-black tree for the set S, but keep subtree sizes in the nodes
文件格式: PDF大小: 227.41KB页数: 25










