Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| courses:cs211:winter2011:journals:charles:chapter4 [2011/02/19 07:11] – [4.6 Implementing Kruskal's Algorithm: The Union-Find Data Structure] gouldc | courses:cs211:winter2011:journals:charles:chapter4 [2011/02/20 02:45] (current) – [4.8 Huffman Codes and Data Compression] gouldc | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| * Reverse-Delete: | * Reverse-Delete: | ||
| ===== 4.6 Implementing Kruskal' | ===== 4.6 Implementing Kruskal' | ||
| - | The title says it all. We want to know the connected components of a graph, but we don't want to recompute them every time that an edge is added to the graph. | + | The title says it all. We want to know the connected components of a graph, but we don't want to recompute them every time that an edge is added to the graph. |
| - MakeUnionFind(S): | - MakeUnionFind(S): | ||
| - Find(u): returns the name of the component that u belongs to; O(log n). | - Find(u): returns the name of the component that u belongs to; O(log n). | ||
| - Union(A,B): merges two components (A,B) into one component; O(log n). | - Union(A,B): merges two components (A,B) into one component; O(log n). | ||
| - | EFFICIENCY(4.25): Kruskal' | + | Efficiency |
| ===== 4.7 Clustering ===== | ===== 4.7 Clustering ===== | ||
| + | Situation: Given a collection of objects, we want k clusters (but not any clustering, we want the " | ||
| + | A variation of Kruskal' | ||
| ===== 4.8 Huffman Codes and Data Compression ===== | ===== 4.8 Huffman Codes and Data Compression ===== | ||
| + | Huge research area. Think languages. If there are n letters in a language, it's possible to encode the letters in log(n) bits. But we know that letters come up with different frequencies. Suppose we are given the individual frequencies of each letter; is it possible to encode the more frequent letters with fewer bits so as to reduce the average bits per letter (ABL)? | ||
| + | Yeah, Huffman coding is one way. | ||
| ===== 4.9 Minimum-Cost Arborescences: | ===== 4.9 Minimum-Cost Arborescences: | ||
| Under construction... | Under construction... | ||
