Feb 21
Discuss homework : questions / comments.
Example of binary tree in C (with graphviz output!) :
And an example of plotting with gnuplot (scriptable!) :
graphs
Start talking about material in chapter 3 of the text : graphs.
- How to store a graph in a computer program?
- adjacency matrix : O(vertices**2) storage; O(1) edge check
- adjacency list : O(edges) storage; O(edges per vertex) edge check
Is my binary tree in C one of these? Which?
"explore" algorithm; pg 95 Dasgupta. Define "tree edges" and "back edges". Define "forest".
Connectivity: how can we determine if a graph is connected?
Talk about "depth first search", and recursion: a natural fit for
graphs.
DAG : directed acyclic graph
So: read chapter 3; expect an assignment from it - and maybe some from chap 4 (shortest paths) as well - for next week.
In the meantime: think about how would you implement a breadth-first search.
tools