1 00:00:01,135 --> 00:00:02,510 PROFESSOR: The point of switching 2 00:00:02,510 --> 00:00:05,450 from relational language to graph theoretical language 3 00:00:05,450 --> 00:00:08,710 is really so that we can talk about paths and connections. 4 00:00:08,710 --> 00:00:13,710 So let's look at the topic of graph connectivity in general. 5 00:00:13,710 --> 00:00:16,750 Two vertices in a simple graph, or for that matter, 6 00:00:16,750 --> 00:00:19,220 a directed graph, are said to be connected if and only 7 00:00:19,220 --> 00:00:20,910 if there's a path between them. 8 00:00:20,910 --> 00:00:23,750 In a directed graph, the path would have a direction. 9 00:00:23,750 --> 00:00:26,500 In a simple graph, paths don't have direction. 10 00:00:26,500 --> 00:00:29,780 So a is connected to b if and only if b is connected to a. 11 00:00:29,780 --> 00:00:32,040 It's a symmetric relation. 12 00:00:32,040 --> 00:00:34,140 So two vertices are connected if and only 13 00:00:34,140 --> 00:00:35,640 if there's a path between them. 14 00:00:35,640 --> 00:00:37,764 That's equivalent, of course, to saying if and only 15 00:00:37,764 --> 00:00:39,150 if there's a walk between them. 16 00:00:39,150 --> 00:00:42,000 We include length 0 paths and length 0 walks, 17 00:00:42,000 --> 00:00:45,930 so every vertex is considered to be connected to itself. 18 00:00:45,930 --> 00:00:49,250 A whole graph is said to be connected if all of its vertex 19 00:00:49,250 --> 00:00:52,810 are connected to each other. 20 00:00:52,810 --> 00:00:55,070 So every graph you can think of as 21 00:00:55,070 --> 00:01:00,000 broken up into the mutually connected pieces, or subgraphs, 22 00:01:00,000 --> 00:01:02,440 which are called its connected components. 23 00:01:02,440 --> 00:01:04,660 So let's look at a simple example. 24 00:01:04,660 --> 00:01:07,520 Let's look at the connections between MIT buildings, 25 00:01:07,520 --> 00:01:10,640 where we draw an edge between building 10 and building 13 26 00:01:10,640 --> 00:01:13,570 if there's a door between them or a corridor or between them. 27 00:01:13,570 --> 00:01:15,950 So there's a corridor between building 10 and building 4, 28 00:01:15,950 --> 00:01:18,710 but not between building 10 and building 12. 29 00:01:18,710 --> 00:01:22,200 To get to 12, you have to go through 4. 30 00:01:22,200 --> 00:01:26,160 That's the main building numbers off the MIT Infinite Corridor. 31 00:01:26,160 --> 00:01:28,490 East campus, of course, isn't connected to anything, 32 00:01:28,490 --> 00:01:30,790 so it's a single, isolated vertex. 33 00:01:30,790 --> 00:01:34,850 And then there's the medical center in E17 and E25, 34 00:01:34,850 --> 00:01:38,750 which are a sequence of four buildings that are connected 35 00:01:38,750 --> 00:01:41,894 as indicated, but not connected at all to east campus 36 00:01:41,894 --> 00:01:43,310 or the Infinite Corridor, that is, 37 00:01:43,310 --> 00:01:46,240 you have to go outside to get from east campus 38 00:01:46,240 --> 00:01:48,530 to the Infinite Corridor or from the Infinite Corridor 39 00:01:48,530 --> 00:01:49,810 to the medical center. 40 00:01:49,810 --> 00:01:53,500 Unless you sneak through the basement and another restricted 41 00:01:53,500 --> 00:01:54,600 areas. 42 00:01:54,600 --> 00:01:56,610 So this is one graph. 43 00:01:56,610 --> 00:01:57,700 It's not three graphs. 44 00:01:57,700 --> 00:02:01,090 This is one graph which has three parts, 45 00:02:01,090 --> 00:02:04,780 and so it has three connected components. 46 00:02:04,780 --> 00:02:07,140 In general, the more connected components 47 00:02:07,140 --> 00:02:08,719 a graph has, the more broken up it 48 00:02:08,719 --> 00:02:11,110 is, and that's a way to remember it. 49 00:02:11,110 --> 00:02:13,530 The formal definition of the connected component 50 00:02:13,530 --> 00:02:17,780 of a vertex, v, is simply all of the vertices, w, 51 00:02:17,780 --> 00:02:21,630 that are connected to v. And if you 52 00:02:21,630 --> 00:02:23,170 look at these connected components, 53 00:02:23,170 --> 00:02:26,080 they've defined an equivalence relation on the vertices, 54 00:02:26,080 --> 00:02:29,910 of course, because a connected component is a block 55 00:02:29,910 --> 00:02:32,360 of the equivalence relation. 56 00:02:32,360 --> 00:02:34,400 It's a block of the partition associated 57 00:02:34,400 --> 00:02:37,230 with the equivalence relation. 58 00:02:37,230 --> 00:02:41,320 Another way to define this, the set of w that are connected 59 00:02:41,320 --> 00:02:45,300 to v, is simply it's taking the image of v 60 00:02:45,300 --> 00:02:50,210 under the greater than or equal to 0 walk relation. 61 00:02:50,210 --> 00:02:53,820 E star is our notation for the walk relation 62 00:02:53,820 --> 00:03:00,620 in the graph whose edges are E, including walks of length 0. 63 00:03:00,620 --> 00:03:05,070 So a graph is connected then means it really has only one 64 00:03:05,070 --> 00:03:07,180 connected component.