Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
courses:cs211:winter2014:journals:haley:chapter3 [2014/01/29 04:16] archermcclellanhcourses:cs211:winter2014:journals:haley:chapter3 [2014/02/12 07:33] (current) archermcclellanh
Line 44: Line 44:
  
 ===== 3.4: Testing Bipartiteness ===== ===== 3.4: Testing Bipartiteness =====
-    * +    * Bipartite graphs contain no odd cycles. 
 +    * We can use breadth-first search to determine whether a graph is bipartite. We can then say: 
 +        * No edge of G joins two vertices of the same layer, thus G is bipartite and we can color the even layers one color and the odd another. 
 +        * xor 
 +        * An edge joins two vertices in the same layer, G contains an odd-length cycle, so G is not bipartite. 
 +    * This book section wasn't very interesting. 7/10. 
 + 
 +===== 3.5: Digraphs & Connectivity ===== 
 +    * We represent digraphs as two adjacency lists, one of which is all in-edges and one of which is all out-edges. 
 +    * BFS & DFS are essentially the same now, with the following changes: 
 +        * BFS is given by finding all vertices with in-edges from our starting vertex to any other vertex. 
 +        * DFS is given recursively from vertex //v// by finding a vertex with an edge //v → u//. 
 +    * A digraph is strongly connected if for every pair of vertices (u,v) there exist paths u → v and v → u.  
 +        * If two vertices u,v are mutually reachable and v,w are mutually reachable, then u,w are mutually reachable. 
 +    * The strongly connected components of two vertices in a digraph D are either disjoint or identical. 
 +    * Well-written and interesting and delightful. 10/10. 
 + 
 +===== 3.6: Directed Acyclic Graphs & Topological Orderings ===== 
 +    * A Directed Acyclic Graph is a directed graph without cycles. Go figure. 
 +    * They can be used to determine precedence relationships. 
 +    * A //topological ordering// of a directed graph G is an ordering of its nodes as v_1,v_2,...,v_n such that for each edge (v_i,v_j), i<j. 
 +    * Iff G is a DAG, it has a topological ordering. 
 +    * Every DAG necessarily has a vertex with no incoming edges. 
 +    * We compute topological orderings by finding a vertex in G without incoming edges, putting it first, and deleting it from G. Then recursively find a topo-ordering of G-v and appending that. 
 +    * This section was okay. 8/10.
courses/cs211/winter2014/journals/haley/chapter3.1390968992.txt.gz · Last modified: 2014/01/29 04:16 by archermcclellanh
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0