CSCI 62 Data Structures Dr. Joshua Stough November 20, 2008.
-
Upload
amice-carson -
Category
Documents
-
view
216 -
download
1
Transcript of CSCI 62 Data Structures Dr. Joshua Stough November 20, 2008.
CSCI 62Data Structures
Dr. Joshua StoughNovember 20, 2008
Today
• Program 7• Finish hashtables• What are Graphs, what to do with
them (more on Tuesday)• Intro C++
Evaluation Notes
• Assignments – Too hard: 3 (esp. HuffmanTree)– Right: 1– Easy: 2– Not related enough to class: 1– Vague: 2– Is the grading harsh?
• More modular: why, what, show: 1• More lab: 7
Evaluation Notes
• It’s expected that you don’t know C++.– We will be implementing some of the
data structures we’ve covered.• Uneven difficulty in assignments.
– Start early to know how to schedule.– We’ll do smaller assignments.
• Greatest band: Led Zeppelin or The Beatles
More on Maps
• MapVector
• ChainedHashTable – – Replace an association at a bin with a
list of associations at a bin.– collisions result in appending to the
list of associations at that bin.– Complexity as related to loadFactor?
Hashing issues
Hashing issues
Some Map review
Graphs
• Vertex, edge, label, • Edge is incident to two vertices
– Undirected if vertex order irrelevant– Directed otherwise.
• Path-sequence of distinct edges– Simple- vertices are distinct
• Vertices are connected if there’s a simple path between them.– Strongly connected if bi-directional
GraphMatrix
Algorithms
• Reachability• Topological Sort –vertices ordered• Transitive Closure- reachability for
all pairs– Warshall’s
• All pairs minimum distance– Floyd
• Single-source, shortest path– Dijkstra