notes41

# notes41 - Graphs-Graph Terminology a Adjacent vertices...

This preview shows pages 1–2. Sign up to view the full content.

Review For Final Exam MergeSort - Divide and Conquer - Implementation - Practice Examples - Complexity O(n*log(n)) Quicksort - Implementation - Practice Examples - Complexity: Expected = O(n*log(n)), Worst = O(n^2) Radix Sort - Implementation - Complexity O(b*n) where b is number of bits per key BucketSort - Implementation - Complexity O(n+m) where n is number of keys, m is range of keys String Matching - Brute Force a. Implementation b. Complexity O(m*n) where m is substring length, n is text length - Rabin Karp a. Compares hash numbers b. Implementation c. Complexity: Expected = O(m+n), Worst = O(m*n) Data Compression - Fixed and variable length encoding - Prefix rule for variable length encoding - Encoding trie - Huffman encoding trie to get optimal encoding Tries - lookup of string in a trie, O(n) where n is length of the string

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Graphs-Graph Terminology a. Adjacent vertices, degree of vertex b. Path, simple path, cycle, connected graph- Complete Graph- Spanning Tree- Data Structures for graphs a. edge list b. adjacency list c. adjacency matrix- Depth First Search a. recursive b. use a stack- Breadth First Search a. visit vertices at a distance of 1, then 2, then 3, … b. use a queue Transitive Closure-transitive closure of G called G*-use DFS for every vertex and make paths from root to every vertex reached-use Floyd Warshal Algorithm Topological Sort-Implementation-Examples Shortest Path Algorithm (Dijkstra)-Implementation-Examples Minimum Spanning Tree-properties-Prim Jarnick Algorithm-Examples Materials to Study-Class Notes-Previus Exams-Study Guide-Projects...
View Full Document

## This note was uploaded on 02/02/2012 for the course CS 251 taught by Professor Staff during the Fall '08 term at Purdue.

### Page1 / 2

notes41 - Graphs-Graph Terminology a Adjacent vertices...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online