1 00:00:01,500 --> 00:00:03,700 PROFESSOR: Graph coloring is the abstract version 2 00:00:03,700 --> 00:00:07,510 of a problem that arises from a bunch of conflict scheduling 3 00:00:07,510 --> 00:00:08,330 situations. 4 00:00:08,330 --> 00:00:10,890 So let's look at an example first and then define 5 00:00:10,890 --> 00:00:12,720 the problem. 6 00:00:12,720 --> 00:00:15,090 So let's think about a bunch of aircraft that 7 00:00:15,090 --> 00:00:20,360 have to be scheduled on the ground at jet ports or gates. 8 00:00:20,360 --> 00:00:22,940 Now, if two flights are on the ground at the same time, 9 00:00:22,940 --> 00:00:25,070 they need to be assigned to different gates 10 00:00:25,070 --> 00:00:27,370 since a gate serves one airplane. 11 00:00:27,370 --> 00:00:30,250 And what we'd like to do is try to figure out 12 00:00:30,250 --> 00:00:32,490 how many different gates do we need 13 00:00:32,490 --> 00:00:34,450 to be able to service all the planes that 14 00:00:34,450 --> 00:00:36,630 might be on the ground. 15 00:00:36,630 --> 00:00:38,010 How many gates are needed? 16 00:00:38,010 --> 00:00:39,960 So let's look at a sample schedule. 17 00:00:39,960 --> 00:00:43,760 There are six slides here numbered 122, 145, through 99. 18 00:00:43,760 --> 00:00:49,540 And the horizontal bar is, say, times during the day. 19 00:00:49,540 --> 00:00:52,690 And this blue block indicates that flight 122 20 00:00:52,690 --> 00:00:57,490 is on the ground from, let's say, 3:00 AM to 7:00 AM, 21 00:00:57,490 --> 00:01:01,950 and flight 145 is on the ground at a completely disjoint time 22 00:01:01,950 --> 00:01:02,800 interval. 23 00:01:02,800 --> 00:01:04,069 So is 67. 24 00:01:04,069 --> 00:01:07,630 257 is on the ground from midnight until about 6:00 AM. 25 00:01:07,630 --> 00:01:10,220 It does overlap with 122, and so on. 26 00:01:10,220 --> 00:01:12,810 So this is the information we have. 27 00:01:12,810 --> 00:01:14,670 And what we're trying to figure out 28 00:01:14,670 --> 00:01:17,220 is how many gates do we need. 29 00:01:17,220 --> 00:01:20,720 Well, it's easy to see here that the worst case, 30 00:01:20,720 --> 00:01:24,740 if you just think of this vertical green line sliding 31 00:01:24,740 --> 00:01:28,360 across the bar, and you look at the maximum number 32 00:01:28,360 --> 00:01:32,990 of blue intervals that the green line ever crosses, it's three. 33 00:01:32,990 --> 00:01:34,880 The largest number of planes that 34 00:01:34,880 --> 00:01:37,050 are on the gate at any given moment 35 00:01:37,050 --> 00:01:40,600 is three, which means we can get by with three gates. 36 00:01:40,600 --> 00:01:42,629 So we have to cope with that conflict. 37 00:01:42,629 --> 00:01:44,170 So abstractly, what we're going to do 38 00:01:44,170 --> 00:01:48,830 is assign each aircraft to be a vertex of a graph. 39 00:01:48,830 --> 00:01:50,990 And we're going to put an edge in 40 00:01:50,990 --> 00:01:54,730 to indicate not compatibility, but conflict. 41 00:01:54,730 --> 00:01:56,990 Compatibility was what we were looking at previously 42 00:01:56,990 --> 00:01:59,380 with our examples of matching. 43 00:01:59,380 --> 00:02:02,545 Now this line means that 306 and 145 44 00:02:02,545 --> 00:02:04,990 are on the ground at the same time. 45 00:02:04,990 --> 00:02:05,980 They conflict. 46 00:02:05,980 --> 00:02:08,990 They need the same gate, and we have to serve them 47 00:02:08,990 --> 00:02:10,229 with different gates. 48 00:02:10,229 --> 00:02:13,260 And likewise, 99 and 145 are on the ground. 49 00:02:13,260 --> 00:02:14,350 306 and 99. 50 00:02:14,350 --> 00:02:16,825 And this was the three flights that were 51 00:02:16,825 --> 00:02:18,460 on the ground at the same time. 52 00:02:18,460 --> 00:02:21,730 And then if I fill in the graph with all the other vertices 53 00:02:21,730 --> 00:02:23,905 and draw an edge when two flights are 54 00:02:23,905 --> 00:02:25,280 on the ground at the same time, I 55 00:02:25,280 --> 00:02:27,360 wind up with this little graph. 56 00:02:27,360 --> 00:02:31,210 OK, now we can talk abstractly about the coloring problem, 57 00:02:31,210 --> 00:02:35,740 which is let's assign colors to the vertices in such a way 58 00:02:35,740 --> 00:02:42,070 that no two adjacent vertices have the same color. 59 00:02:42,070 --> 00:02:44,940 Adjacent vertices should have different colors. 60 00:02:44,940 --> 00:02:47,890 And it should be clear from the description of how 61 00:02:47,890 --> 00:02:52,980 we derive this graph from the aircraft schedules 62 00:02:52,980 --> 00:02:55,940 that the minimum number of distinct colors 63 00:02:55,940 --> 00:02:59,020 needed to color the graph corresponds 64 00:02:59,020 --> 00:03:03,440 to the minimum number of gates needed to serve the aircraft. 65 00:03:03,440 --> 00:03:04,910 So let's try coloring this graph. 66 00:03:04,910 --> 00:03:07,750 I'll start with coloring 257 red, 67 00:03:07,750 --> 00:03:11,120 and 122 yellow, and 99 green. 68 00:03:11,120 --> 00:03:12,560 There's no loss of generality here 69 00:03:12,560 --> 00:03:14,060 because these are the three that are 70 00:03:14,060 --> 00:03:16,580 on the ground at the same time, reflected by the fact 71 00:03:16,580 --> 00:03:17,910 that they're in a triangle. 72 00:03:17,910 --> 00:03:20,034 And I'm going to have to use three different colors 73 00:03:20,034 --> 00:03:22,280 since each one is adjacent to the other two. 74 00:03:22,280 --> 00:03:23,280 OK, what next? 75 00:03:23,280 --> 00:03:25,780 Well, let's color 145 yellow. 76 00:03:25,780 --> 00:03:27,800 I might as well reuse it since it's not 77 00:03:27,800 --> 00:03:30,220 adjacent to a yellow vertex. 78 00:03:30,220 --> 00:03:34,450 And then here, I've got another triangle. 79 00:03:34,450 --> 00:03:36,890 So if I'm not going to use an extra color, 80 00:03:36,890 --> 00:03:39,070 the sensible thing to do would be to color that red. 81 00:03:39,070 --> 00:03:40,194 But oops, I didn't do that. 82 00:03:40,194 --> 00:03:41,010 I used a red here. 83 00:03:41,010 --> 00:03:44,770 There's another triangle, I guess, that allows me to color. 84 00:03:44,770 --> 00:03:48,370 And then I color this black because here, I'm stuck. 85 00:03:48,370 --> 00:03:53,780 I'm adjacent to both a yellow, a black, and a green vertex. 86 00:03:53,780 --> 00:03:56,400 So I have to come up with a fourth color. 87 00:03:56,400 --> 00:03:58,380 All right, we did it with four colors. 88 00:03:58,380 --> 00:04:00,840 It means that we could have gotten away with four gates. 89 00:04:00,840 --> 00:04:03,690 And the colors tell us which aircraft 90 00:04:03,690 --> 00:04:04,730 to assign to which gate. 91 00:04:04,730 --> 00:04:08,420 So 257 and 67 can both be assigned to the red gate 92 00:04:08,420 --> 00:04:11,660 because they are not on the ground at the same time. 93 00:04:11,660 --> 00:04:13,340 There's no edge between them. 94 00:04:13,340 --> 00:04:17,579 122 and 145 can be assigned the yellow gate, and so on. 95 00:04:17,579 --> 00:04:20,320 Now, this was not the smartest way to color. 96 00:04:20,320 --> 00:04:21,860 A better coloring is shown here. 97 00:04:21,860 --> 00:04:24,434 You can check that every two adjacent vertices 98 00:04:24,434 --> 00:04:25,350 have different colors. 99 00:04:25,350 --> 00:04:28,650 And now I've done it with only three colors-- red, yellow, 100 00:04:28,650 --> 00:04:30,260 and green. 101 00:04:30,260 --> 00:04:34,040 So now there are three gates and I get a better schedule. 102 00:04:34,040 --> 00:04:36,040 Another example of this kind of conflict problem 103 00:04:36,040 --> 00:04:38,830 comes up with scheduling final exams. 104 00:04:38,830 --> 00:04:43,420 Two subjects conflict if a student is taking both. 105 00:04:43,420 --> 00:04:45,200 Because if a student's taking both, 106 00:04:45,200 --> 00:04:47,590 I can't have the final exams at the same time. 107 00:04:47,590 --> 00:04:49,770 And so I need to assign different time 108 00:04:49,770 --> 00:04:53,750 slots during exam period to subjects that overlap, 109 00:04:53,750 --> 00:04:55,560 that have a student in common. 110 00:04:55,560 --> 00:05:00,740 And then the question is, given this data about which pairs 111 00:05:00,740 --> 00:05:02,970 of subjects have a student in common, 112 00:05:02,970 --> 00:05:05,590 we want to know how short an exam period can we 113 00:05:05,590 --> 00:05:06,490 get away with. 114 00:05:06,490 --> 00:05:10,410 Again, it becomes a simple graph model and a coloring problem. 115 00:05:10,410 --> 00:05:13,720 So here, we've drawn a graph with some sample subjects. 116 00:05:13,720 --> 00:05:17,750 6.042 and 18.02 have a student in common. 117 00:05:17,750 --> 00:05:19,290 That's what that edge means. 118 00:05:19,290 --> 00:05:22,920 They need to have final exam scheduled at different times. 119 00:05:22,920 --> 00:05:27,000 Likewise, 8.02 and 6.042 have a student in common, 120 00:05:27,000 --> 00:05:29,430 so they need to be scheduled at different times. 121 00:05:29,430 --> 00:05:34,720 On the other hand, 6.042 and 18.02-- sorry. 122 00:05:34,720 --> 00:05:37,100 What are some two that are not adjacent? 123 00:05:37,100 --> 00:05:42,250 3.091 and 18.02 have no edge between them, 124 00:05:42,250 --> 00:05:45,130 which means that they can be scheduled at the same time. 125 00:05:45,130 --> 00:05:50,040 There's no student who's taking both 3.091 and 18.02, at least 126 00:05:50,040 --> 00:05:52,590 according to the data in this graph. 127 00:05:52,590 --> 00:05:54,010 So let's try coloring it. 128 00:05:54,010 --> 00:05:55,332 And again, there's a triangle. 129 00:05:55,332 --> 00:05:57,290 I'm going to have to use three different colors 130 00:05:57,290 --> 00:05:59,100 for a triangle. 131 00:05:59,100 --> 00:06:01,380 And here's another triangle. 132 00:06:01,380 --> 00:06:06,740 And to be economical, let's just reuse green. 133 00:06:06,740 --> 00:06:09,530 Now, here, I've got another vertex 134 00:06:09,530 --> 00:06:12,800 that's adjacent to three different color vertices. 135 00:06:12,800 --> 00:06:15,670 And so it's going to have to be colored with a fourth color. 136 00:06:15,670 --> 00:06:18,340 This time, it turns out that the four colors are best possible. 137 00:06:18,340 --> 00:06:19,330 You can check that. 138 00:06:19,330 --> 00:06:25,260 And it corresponds to a schedule in which the 6.042 is scheduled 139 00:06:25,260 --> 00:06:28,160 on Monday morning at 9:00, and 6.001 140 00:06:28,160 --> 00:06:31,540 is scheduled on Monday at 1:00. 141 00:06:31,540 --> 00:06:36,100 But 8.02 and 3.091 can both be scheduled for Tuesday 9:00 AM. 142 00:06:36,100 --> 00:06:42,160 And finally, 18.02 is scheduled on Tuesday at 1:00 PM. 143 00:06:42,160 --> 00:06:46,650 OK, so this kind of a conflict modeling situation 144 00:06:46,650 --> 00:06:48,340 comes up all the time. 145 00:06:48,340 --> 00:06:51,249 Another place where you get these kind of compatibility 146 00:06:51,249 --> 00:06:53,540 graphs or incompatibility graphs that you want to color 147 00:06:53,540 --> 00:06:55,800 would be if you were running a zoo 148 00:06:55,800 --> 00:06:59,400 and you had to have separate habitats for certain kinds 149 00:06:59,400 --> 00:07:03,100 of species of animals that you don't want to mix together. 150 00:07:03,100 --> 00:07:04,480 Big fish eat little fish. 151 00:07:04,480 --> 00:07:07,010 It's a truism in the aquarium world. 152 00:07:07,010 --> 00:07:10,500 And so you need to keep big fish separate from little fish. 153 00:07:10,500 --> 00:07:13,570 And you don't want the tigers living together 154 00:07:13,570 --> 00:07:15,200 with the chimpanzees. 155 00:07:15,200 --> 00:07:18,430 So we could again model this problem 156 00:07:18,430 --> 00:07:20,030 as how many cages do we need. 157 00:07:20,030 --> 00:07:22,180 We create a vertex for each species 158 00:07:22,180 --> 00:07:27,040 and put an edge between two species that mustn't share 159 00:07:27,040 --> 00:07:30,220 a habitat or share a cage. 160 00:07:30,220 --> 00:07:33,360 Another one would be assigning different frequencies 161 00:07:33,360 --> 00:07:34,890 to radio stations. 162 00:07:34,890 --> 00:07:38,610 And again, if two radio stations are close to each other, 163 00:07:38,610 --> 00:07:40,540 they will interfere. 164 00:07:40,540 --> 00:07:42,990 So they have to be assigned to different colors 165 00:07:42,990 --> 00:07:44,080 or different frequencies. 166 00:07:44,080 --> 00:07:47,870 So now, we would be using radio stations as vertices. 167 00:07:47,870 --> 00:07:50,650 And radio stations that were near enough to interfere 168 00:07:50,650 --> 00:07:53,490 with each other would get connected by an edge, 169 00:07:53,490 --> 00:07:56,060 indicating that they needed to be assigned different color 170 00:07:56,060 --> 00:07:57,430 frequencies. 171 00:07:57,430 --> 00:08:02,100 And one of the classic ones is literally to color a map. 172 00:08:02,100 --> 00:08:04,930 If you were trying to take, say, a map of the US 173 00:08:04,930 --> 00:08:07,480 and assign colors to it in such a way 174 00:08:07,480 --> 00:08:10,480 that you never had two states that 175 00:08:10,480 --> 00:08:13,830 shared a border with the same color-- and this 176 00:08:13,830 --> 00:08:17,190 is an illustration of doing it with four colors. 177 00:08:17,190 --> 00:08:19,510 The question is if I give you some kind of a planar map 178 00:08:19,510 --> 00:08:21,915 like this, what's the minimum number of colors 179 00:08:21,915 --> 00:08:22,540 that will work? 180 00:08:22,540 --> 00:08:29,130 Now, you're allowed to have two countries share the color 181 00:08:29,130 --> 00:08:33,600 if they only meet at one point. 182 00:08:33,600 --> 00:08:36,090 But if they have a positive length boundary, 183 00:08:36,090 --> 00:08:40,159 they have to be different colors. 184 00:08:40,159 --> 00:08:46,420 OK, the way that this turns into a vertex coloring problem 185 00:08:46,420 --> 00:08:49,410 is if you take a planar graph like this-- here's 186 00:08:49,410 --> 00:08:51,810 just an arbitrary one-- what I can do 187 00:08:51,810 --> 00:08:54,430 is I'm interested in coloring the regions, the countries, 188 00:08:54,430 --> 00:08:56,670 with different colors, but I'll just replace 189 00:08:56,670 --> 00:08:57,864 each region by a vertex. 190 00:08:57,864 --> 00:09:00,030 So I'm going to stick a vertex in the middle of each 191 00:09:00,030 --> 00:09:00,655 of the regions. 192 00:09:00,655 --> 00:09:03,660 Notice there's an outer region here too that gets a vertex. 193 00:09:03,660 --> 00:09:07,560 So one, two, three, four, five, six regions, or six vertices. 194 00:09:07,560 --> 00:09:10,200 And then I'll simply connect two vertices 195 00:09:10,200 --> 00:09:16,170 when there is a positive length edge that their regions share. 196 00:09:16,170 --> 00:09:19,155 So that edge corresponds to the fact 197 00:09:19,155 --> 00:09:20,530 that there's this boundary that's 198 00:09:20,530 --> 00:09:24,060 shared between this region and this region. 199 00:09:24,060 --> 00:09:28,810 If you look at this same triangular-shaped region, 200 00:09:28,810 --> 00:09:30,970 it has a boundary with the outside region. 201 00:09:30,970 --> 00:09:33,480 So there's going to be an edge from here to the vertex that 202 00:09:33,480 --> 00:09:35,100 represents the outside. 203 00:09:35,100 --> 00:09:37,230 And there's the rest of the edges. 204 00:09:37,230 --> 00:09:43,340 An edge appears between two regions that share a boundary. 205 00:09:43,340 --> 00:09:47,170 And now, the question is coloring the countries 206 00:09:47,170 --> 00:09:49,500 corresponds to coloring the vertices. 207 00:09:49,500 --> 00:09:53,335 And we'd like to color the graph with as few colors as possible. 208 00:09:53,335 --> 00:09:56,770 Well, a famous result that was proved in the '70s 209 00:09:56,770 --> 00:10:01,110 is that every planar graph is in fact four-colorable. 210 00:10:01,110 --> 00:10:04,120 Now, this was first claimed to be proved in the 1850s, 211 00:10:04,120 --> 00:10:06,250 but in fact, the published proof was wrong. 212 00:10:06,250 --> 00:10:08,380 It sat around in the journal literature for decades 213 00:10:08,380 --> 00:10:10,710 before somebody found a bug. 214 00:10:10,710 --> 00:10:13,630 Or that is to say that the proof was wrong, not the result. 215 00:10:13,630 --> 00:10:17,080 There was a big hole in the proof that had not 216 00:10:17,080 --> 00:10:18,670 been adequately justified. 217 00:10:18,670 --> 00:10:22,190 The proof did give a correct argument for five coloring, 218 00:10:22,190 --> 00:10:25,960 and the four color problem was opened for over 100 years. 219 00:10:25,960 --> 00:10:31,850 Then in the 1970s, two mathematicians 220 00:10:31,850 --> 00:10:35,590 came up with a proof of the four color theorem 221 00:10:35,590 --> 00:10:39,510 that was very controversial because a lot of their proof 222 00:10:39,510 --> 00:10:41,690 required a computer program to crank 223 00:10:41,690 --> 00:10:45,110 through several thousand sample graphs that needed to be 224 00:10:45,110 --> 00:10:46,770 verified for four-colorability. 225 00:10:46,770 --> 00:10:50,420 They had an argument that showed that there could only 226 00:10:50,420 --> 00:10:52,600 be a few thousand counter examples if there 227 00:10:52,600 --> 00:10:54,880 was-- or rather, if there was any graph that couldn't 228 00:10:54,880 --> 00:10:57,781 be four colored, it would be one of these several thousand 229 00:10:57,781 --> 00:10:58,280 graphs. 230 00:10:58,280 --> 00:11:01,510 And then they went to work on coloring these several thousand 231 00:11:01,510 --> 00:11:04,850 graphs, which were generated with the aid of a computer 232 00:11:04,850 --> 00:11:08,280 and then colored with the aid of a computer, and also by hand. 233 00:11:08,280 --> 00:11:11,520 This did not make the mathematical community happy 234 00:11:11,520 --> 00:11:15,070 because a proof like that is essentially uncheckable. 235 00:11:15,070 --> 00:11:18,060 A much improved version was developed in the 1990s, 236 00:11:18,060 --> 00:11:20,170 but it still requires, in the end, 237 00:11:20,170 --> 00:11:22,950 a computer program to generate about 600 maps 238 00:11:22,950 --> 00:11:25,090 and verify their colorability. 239 00:11:25,090 --> 00:11:28,760 So it remains to find a proof of the four color theorem 240 00:11:28,760 --> 00:11:32,500 that you could say is humanly comprehensible without the aid 241 00:11:32,500 --> 00:11:33,190 of a computer. 242 00:11:33,190 --> 00:11:37,520 But there's no longer any doubt, really, about this theorem 243 00:11:37,520 --> 00:11:38,775 in the mathematical community. 244 00:11:41,590 --> 00:11:44,935 In general, if I take an arbitrary graph 245 00:11:44,935 --> 00:11:47,920 and I ask what's the minimum number of colors to color it, 246 00:11:47,920 --> 00:11:50,640 that's called the chromatic number of the graph. 247 00:11:50,640 --> 00:11:53,140 So chi of G is the minimum number 248 00:11:53,140 --> 00:11:56,240 of colors to color G. Let's look at some chis 249 00:11:56,240 --> 00:11:58,260 for different kinds of graphs. 250 00:11:58,260 --> 00:12:01,250 So here we have a simple cycle of length 4. 251 00:12:01,250 --> 00:12:02,830 And it's obvious that that can be 252 00:12:02,830 --> 00:12:06,210 colored with two colors-- just alternate the colors. 253 00:12:06,210 --> 00:12:08,480 On the other hand, somewhat-- and in fact, 254 00:12:08,480 --> 00:12:13,350 generalizes, by the way, to any even length cycle. 255 00:12:13,350 --> 00:12:16,690 The chromatic number of an even length is simply two. 256 00:12:16,690 --> 00:12:19,210 You color the vertices alternately. 257 00:12:19,210 --> 00:12:22,280 On the other hand, if the cycle is of odd length, 258 00:12:22,280 --> 00:12:24,579 you're going to need a third color. 259 00:12:24,579 --> 00:12:26,120 There's no way around it because even 260 00:12:26,120 --> 00:12:27,869 if you try to get by with two colors, then 261 00:12:27,869 --> 00:12:29,480 you color things alternately. 262 00:12:29,480 --> 00:12:31,220 And then when you wrap around, you 263 00:12:31,220 --> 00:12:34,019 discover that you can't alternately color. 264 00:12:34,019 --> 00:12:35,810 You're going to need a third color in order 265 00:12:35,810 --> 00:12:37,230 to avoid a clash. 266 00:12:37,230 --> 00:12:42,120 So in general, the chromatic number of an odd length cycle 267 00:12:42,120 --> 00:12:44,970 is 3. 268 00:12:44,970 --> 00:12:49,670 The complete graph on five vertices is shown here. 269 00:12:49,670 --> 00:12:52,640 This is a five vertex graph in which every vertex 270 00:12:52,640 --> 00:12:55,410 is adjacent to the other four. 271 00:12:55,410 --> 00:12:59,210 And since every vertex is adjacent to the other four, 272 00:12:59,210 --> 00:13:00,950 you're going to need five colors. 273 00:13:00,950 --> 00:13:01,950 You can't do any better. 274 00:13:01,950 --> 00:13:05,300 They have to all have different colors. 275 00:13:05,300 --> 00:13:07,790 And so the chromatic number of the complete graph 276 00:13:07,790 --> 00:13:10,500 on n vertices where every vertex is 277 00:13:10,500 --> 00:13:15,630 adjacent to the other n minus 1 is n. 278 00:13:15,630 --> 00:13:19,200 Another simple example that comes up is if I take the cycle 279 00:13:19,200 --> 00:13:22,130 and I put on an axle in the middle-- 280 00:13:22,130 --> 00:13:24,510 we call it a wheel then. 281 00:13:24,510 --> 00:13:32,090 A wheel with a cycle of length of 5 around the outside, 282 00:13:32,090 --> 00:13:35,640 a perimeter of length 5, is called W5. 283 00:13:35,640 --> 00:13:39,880 And we can color it with four colors. 284 00:13:39,880 --> 00:13:44,010 And in general, the argument that the chromatic number 285 00:13:44,010 --> 00:13:47,340 for an odd length wheel is four is 286 00:13:47,340 --> 00:13:50,500 that I know I'm going to need three colors to color the rim. 287 00:13:50,500 --> 00:13:53,790 And since the axle is adjacent to everything on the rim, 288 00:13:53,790 --> 00:13:55,720 I'm going to need a fourth color for it. 289 00:13:55,720 --> 00:13:58,570 On the other hand, again, if the perimeter is even, 290 00:13:58,570 --> 00:14:02,400 then I can get by with three colors. 291 00:14:02,400 --> 00:14:04,800 One more remark about chromatic numbers 292 00:14:04,800 --> 00:14:07,370 is there's an easy argument that shows 293 00:14:07,370 --> 00:14:11,530 that if you have a graph, every one of whose vertices is 294 00:14:11,530 --> 00:14:18,020 at most degree k-- there are at most k other vertices 295 00:14:18,020 --> 00:14:20,310 adjacent to any given vertex-- then that 296 00:14:20,310 --> 00:14:23,250 implies that the graph is k plus 1 colorable. 297 00:14:23,250 --> 00:14:25,430 And the proof is really constructive and trivial. 298 00:14:25,430 --> 00:14:28,390 Basically, you just start coloring the vertices any way 299 00:14:28,390 --> 00:14:31,610 you like subject to the constraint 300 00:14:31,610 --> 00:14:33,530 that when you color a vertex, it's 301 00:14:33,530 --> 00:14:35,560 supposed to not be the same color as any 302 00:14:35,560 --> 00:14:37,190 of the vertices around it. 303 00:14:37,190 --> 00:14:38,510 But that's easy to do. 304 00:14:38,510 --> 00:14:42,060 Because when it's time to color some vertex, 305 00:14:42,060 --> 00:14:44,270 even if all the vertices around it are colored, 306 00:14:44,270 --> 00:14:45,620 there's only k of them. 307 00:14:45,620 --> 00:14:49,310 And so I will always be able to find a k plus first color 308 00:14:49,310 --> 00:14:52,590 to assign it and get us a satisfactory coloring. 309 00:14:52,590 --> 00:14:54,625 So I can get by with k plus 1 colors. 310 00:14:57,290 --> 00:15:00,280 Now, the general setup with colorability 311 00:15:00,280 --> 00:15:02,770 is that to check whether a graph is two-colorable 312 00:15:02,770 --> 00:15:04,280 is actually very easy. 313 00:15:04,280 --> 00:15:10,880 And we may talk about that in some class problems. 314 00:15:10,880 --> 00:15:15,290 But three-colorability dramatically changes. 315 00:15:15,290 --> 00:15:19,110 We're back in the realm of NP-complete problems. 316 00:15:19,110 --> 00:15:21,800 In fact, a result of a student of mine 317 00:15:21,800 --> 00:15:25,910 almost 40 years ago was that even if a graph is planar 318 00:15:25,910 --> 00:15:28,950 where you know it can definitely be colored with four colors, 319 00:15:28,950 --> 00:15:30,510 determining whether or not it can 320 00:15:30,510 --> 00:15:35,130 be colored with three colors is as hard as satisfiability. 321 00:15:35,130 --> 00:15:38,770 And it is, in fact, an NP-complete problem. 322 00:15:38,770 --> 00:15:43,750 In fact, a proof of how you reduce satisfiability 323 00:15:43,750 --> 00:15:46,370 to colorability appears in a problem 324 00:15:46,370 --> 00:15:51,620 in the text, which we may assign as a problem set problem. 325 00:15:51,620 --> 00:15:58,190 So in general, finding chi of G is hard, even for three colors. 326 00:15:58,190 --> 00:16:00,960 Now, it's not any worse, again, from a theoretical point 327 00:16:00,960 --> 00:16:06,500 of view for checking what chi of G 328 00:16:06,500 --> 00:16:09,590 is even if it's a very large number, although pragmatically, 329 00:16:09,590 --> 00:16:14,390 three color will be easier to check than n-colorability. 330 00:16:14,390 --> 00:16:18,830 And that is our story about colorability.