Connected Components Mathematics for Computer Science MIT 6.042J/18.062J Every graph consists of separate connected pieces (subgraphs) called Graph Connectivity Trees Albert R Meyer, March 12, 2010 connected components lec 6F.1 Connected Components 13 12 26 10 4 8 16 66 lec 6F.2 Connected Components E17 East Campus Albert R Meyer, March 12, 2010 E25 Med Center The connected component of vertex v ::= Infinite corridor 3 connected components the more connected components, the more “broken up" the graph is. Albert R Meyer, March 12, 2010 lec 6F.3 lec 6F.4 Edge Connectedness Connected Components Def: vertices v, w are k-edge connected if they remain connected whenever fewer than k edges are deleted. So a graph is connected iff it has only 1 connected component Albert R Meyer, March 12, 2010 Albert R Meyer, March 12, 2010 lec 6F.5 Albert R Meyer, March 12, 2010 lec 6F.6 1 k-edge Connectedness Edge Connectedness no path no path delete 1-edge connected Albert R Meyer, March 12, 2010 2-edge connected lec 6F.8 Edge Connectedness Albert R Meyer, March 12, 2010 lec 6F.9 k-edge Connectedness no path Def: A whole graph is k- edge connected iff every two vertices are k-edge connected. 3-edge connected Albert R Meyer, March 12, 2010 lec 6F.10 Edge Connectedness lec 6F.11 k-edge Connectedness this whole graph is Connectivity measures fault tolerance of a network: how many connections can fail without cutting off communication? Albert R Meyer, March 12, 2010 Albert R Meyer, March 12, 2010 delete 1-edge connected lec 6F.12 Albert R Meyer, March 12, 2010 lec 6F.13 2 Cut Edges Cut Edges An edge is a cut edge if removing it from the graph disconnects two vertices. Albert R Meyer, March 12, 2010 B B is a cut edge lec 6F.16 Cut Edges Albert R Meyer, March 12, 2010 lec 6F.18 Cut Edges A deleting B gives two components Albert R Meyer, March 12, 2010 A is not a cut edge lec 6F.19 Cut Edges lec 6F.20 Cut Edges So a connected graph is 2-edge connected iff it has no cut edge. still connected with edge A deleted Albert R Meyer, March 12, 2010 Albert R Meyer, March 12, 2010 lec 6F.21 Albert R Meyer, March 12, 2010 lec 6F.22 3 Cycles Cycles A cycle is a path that begins and ends with same vertex A cycle is a path that begins and ends with same vertex a v a v w b w b path: v···b···w···w···a···v also: a ···w ···w ···b ···v ···a also: a···v···b···w···w···a lec 6F.23 Albert R Meyer, March 12, 2010 Simple Cycles A simple cycle is a cycle of length > 2 that doesn’t cross itself: v w a path: v···a···w···v lec 6F.25 Simple Cycles also: w···a···v···w Albert R Meyer, March 12, 2010 lec 6F.26 Cut Edges and Cycles length > 2 implies that going back & forth over an edge is not a simple cycle w Albert R Meyer, March 12, 2010 w a path: v···a···w···v Albert R Meyer, March 12, 2010 v lec 6F.24 Simple Cycles A simple cycle is a cycle of length > 2 that doesn’t cross itself: v Albert R Meyer, March 12, 2010 lec 6F.27 Lemma: An edge is a not a cut edge iff it is on a simple cycle. Albert R Meyer, March 12, 2010 lec 6F.30 4 Trees Trees A tree is a connected graph with no simple cycles. A tree is a connected graph with every edge a cut edge. equivalently: Albert R Meyer, March 12, 2010 lec 6F.31 More Trees equivalently Albert R Meyer, March 12, 2010 lec 6F.32 Other Tree Definitions • graph with a unique simple path between any 2 vertices • connected graph with n vertices and n–1 edges • an edge-maximal acyclic graph Albert R Meyer, March 12, 2010 lec 6F.33 Albert R Meyer, March 12, 2010 lec 6F.34 Team Problems Problems 1&2 Albert R Meyer, March 12, 2010 lec 6F.40 5 MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.