flow networks Definition. A flow network is a directed graph G=(, E)with two distinguished vertices:a source s and a sink t. Each edge(u, v)E E has a nonnegative capacity c(u, v). If(u, v) E, then c(u, v)=0 Example: c 2001 by Charles E Leiserson
文件格式: PDF大小: 177.21KB页数: 19
麻省理工学院:《算法导论》(英文版) Lecture 21 Prof charles e. leiserson
文件格式: PDF大小: 70.04KB页数: 2
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










