AIHL 3.16.6 Chinese Postman problem | Free Mathematics Applications & Interpretation (AI) Video | RevisionDojo
IB Mathematics Applications & Interpretation (AI) videos / AHL 3.16—Tree and cycle algorithms, Chinese postman, travelling salesman Free video lesson IB · Mathematics Applications & Interpretation (AI)
AIHL 3.16.6 Chinese Postman problem Learn AIHL 3.16.6 Chinese Postman problem in this free IB Mathematics Applications & Interpretation (AI) video lesson for AHL 3.16—Tree and cycle algorithms, Chinese postman, travelling salesman.
About this video Learn AIHL 3.16.6 Chinese Postman problem in this free IB Mathematics Applications & Interpretation (AI) video lesson for AHL 3.16—Tree and cycle algorithms, Chinese postman, travelling salesman.
The video discusses the Chinese Postman Problem , which involves finding the shortest route to traverse all edges in a graph and return to the starting point. The problem is illustrated through three examples, starting with an Eulerian graph where all vertices have even degrees, allowing for a straightforward solution by summing the weights of all edges.
In the second example, a new edge creates vertices with odd degrees, necessitating the repetition of an edge to form an Eulerian graph. The shortest path is determined by connecting odd-degree vertices in the most efficient way.
The final example involves a more complex graph with eight towns, where the odd vertices are identified, and various combinations are evaluated to find the shortest connections. The total distance is calculated by summing the weights of the edges traversed, resulting in a final distance of 174 kilometers .
Video transcript 00:00 Hi guys, so in this
00:02 lesson we are going to
00:03 look at the Chinese postman
00:05 problem. It is called the
00:07 Chinese postman problem because it
00:08 was originally studied by the
00:10
Chinese mathematician, my cool quan,
00:15 that is my best guess
00:20 at a pronunciation, apologies if
00:22 I am significantly off. Anyway,
00:25 the problem is kind of
00:28 explained in this example, it
00:31 is to find the shortest
00:32 possible route. It takes to
00:37 traverse all the edges in
00:40 a graph. So it might
00:42 be a postman that wants
00:44 to walk along every road
00:46 and return back to where
00:49 he started, what is the
00:51 shortest possible route he can
00:52 take. And that's it. So
00:55 this example I'm going to
00:56 go through three examples. First
00:57 one's easy. Second one is
00:59 less easy and the third
01:00 one is the more difficult
01:01 of the three. Here, we
01:04 have a national park. There
01:05 are six places of interest.
01:07 The weight of the edges
01:08 represent the time in minutes
01:10 to, it takes to walk
01:12 along the path between adjacent
01:13 vertices. Determine the least amount
01:15 of time. It would take
01:16 a visitor to walk on
01:16 every path. Visit all six
01:19 places of interest and return
01:20 to the same place where
01:21 you started. Now, yes, we
01:22 are going to visit all
01:24 interest because he's gonna walk.
01:27 If you're gonna walk along
01:28 all the edges, you are
01:29 gonna reach all the vertices.
01:31 But note, the Chinese postman
01:33 problem is particularly interested in
01:40 edges, right? So the least
01:43 amount of time, it'll take
01:45 the visitor to walk along
01:46 every path that is the
01:48 main thing that we're looking
01:52 This is very much connected
01:54 to the previous lesson which
01:55 was Eulerian graphs. Because if
02:00 it is an Eulerian graph
02:01 which this one is, the
02:02 shortest, so this is an
02:04 Eulerian graph, then the shortest
02:07 possible way to travel across
02:12 every edge, travel along every
02:15 edge and return to where
02:16 you were, the shortest possible
02:18 way is just simply to
02:20 all these times because you
02:22 have to walk along all
02:23 of them and you know
02:26 you can walk along all
02:27 of them and return back
02:29 to where you started because
02:30 it's an island area in
02:31 graph. I know this is
02:32 an island area in graph
02:33 because this is the exact
02:35 same graph I used in
02:37 the previous lesson where I
02:38 was explaining what an island
02:39 area in graph is but
02:42 it's an island area in
02:42 graph because every vertex is
02:45 an even vertex or has
02:51 2 edges, 4 edges, 2,
02:54 an hard angle graph. Therefore,
02:56 the shortest route is just
02:58 the sum of all these
02:59 times. So it's 7 plus
03:11 And this equals 11, 21,
03:16 633 .49. 45 .50 .58.
03:23 So it's 58 minutes is
03:25 the shortest amount of time.
03:27 one is straightforward because it's
03:29 an ordinary graph. Second example,
03:33 exact same example, except there's
03:40 we are going to start
03:44 and finish in the same
03:46 vertex and walk along every
03:53 edge in the graph. Then
03:59 to repeat an edge. I
04:00 know that because this is
04:01 not an Arlarian graph and
04:04 an Arlarian graph because not
04:06 all the edges are even
04:09 degree because I've just drawn
04:10 this new line here and
04:11 this is now degree three.
04:12 and this is degree three.
04:15 So I can't start finishing
04:16 the same place and travel
04:19 through along the edges without
04:21 repeating an edge. So what
04:25 I need to decide which
04:29 edge I'm going to repeat.
04:34 my vertices that have an
04:40 and I connect them. I
04:49 like let's give that me
04:50 a giving example. If I
04:52 like this now and this
04:57 and this is like I'm
04:58 just going to basically repeat
04:59 this, this edge twice, which
05:04 I have an Eulerian graph
05:11 same vertex, I can start
05:13 and finish at the same
05:14 vertex, and travel along every
05:19 edge. However, there's a problem.
05:24 This is not necessarily the
05:26 quickest way to get from
05:28 deliberately put in a way
05:32 that is quicker. So,
05:39 D, yes, it's 15 along
05:42 this edge, but what about
05:44 instead of going on this
05:50 that. I'll put in this
05:52 edge and pink actually. I'm
06:00 connect the two, the two
06:04 that have an odd degree
06:07 but I'm going to connect
06:08 them in the shortest possible
06:09 way and in this case
06:11 it's not directly it's actually
06:13 going through C so I
06:14 hope that makes sense. Now
06:21 four vertices of an odd
06:24 degree and that's what I'm
06:24 going to show you in
06:25 the next in the next
06:27 example and it's so more
06:29 difficult of the three obviously.
06:31 So now that I've put
06:36 the total. So the total
06:38 is now I actually have
06:41 this 58. So it's just
06:46 5. So all the greens
07:01 Done. Last example. The below
07:06 graph shows eight towns in
07:07 France, so these are the
07:08 eight towns that we see
07:11 and the roads joining them.
07:12 The weights of the edges
07:13 represent the distance in kilometers,
07:16 lower lives in town A,
07:17 she wants to drive along
07:18 every road before returning to
07:20 A. Use the Chinese post
07:21 -round algorithm, clearly showing all
07:24 the stages to find the
07:25 shortest distance required to travel
07:26 in order to drive along.
07:29 every vote and write down
07:31 a possible root. Okay, so
07:33 this is the example where
07:37 I said you could have
07:39 up to four vertices that
07:42 are odd so that would
07:46 odd number of ages joining
07:49 them. So the first thing
07:52 vertices. Let's write that down.
07:57 So the odd vertices, the
08:01 odd vertices are A, because
08:04 there's only three there. B
08:25 odd means there's one three
08:28 five seven whatever edges even
08:30 means it's two four six
08:31 setters right so our odd
08:36 need to do is connect
08:38 and edge from one of
08:41 the odd vertices to the
08:42 other but we need to
08:44 that gives us the shortest
08:46 possible route so the only
08:49 to figure out what is
08:53 the shortest way to connect
08:55 two pairs of edges. So
08:57 what, the only way to
08:59 at all the different combinations.
09:02 So we could have, we
09:03 could connect A to C
09:09 would be fine. Or we
09:11 could connect A to D
09:27 to d. And that's actually,
09:29 that's it. There's only three
09:30 combinations. There's no other, I
09:32 don't have any other combinations.
09:39 All right. Now though, we
09:41 need to figure out how,
09:42 well, we need to figure
09:43 out which is the shortest
09:45 of these three combinations. So,
09:52 C, what's the shortest possible
09:56 Well, it's either going to
10:04 which is 25, so it's
10:05 actually going to be that
10:06 one. I mean, you could
10:08 but that's going to be
10:09 more. So it's 5 plus
10:12 plus 15, which is 25.
10:17 G, the shortest way is
10:19 definitely the 12, because any
10:21 other, it's 14 and 15,
10:24 25 plus 12. That's obviously
10:27 equal to 37. Okay, then
10:39 All right, what's the quickest
10:45 9, 2014, that's not going
10:47 to work. It's going to
10:51 22 plus the CG. Again,
10:56 it's definitely going to be
10:59 27. Now you could go,
11:02 it's, you could look it
11:03 and go right guys, it's
11:04 definitely going to be this
11:07 even look at this and
11:08 say that, it's not going
11:09 to be this. But that's
11:10 not good enough. You have
11:11 to show even the one,
11:13 You know what's going to
11:14 be this one? You have
11:15 to show what this one
11:17 would be. What would be
11:19 the shortest way to connect
11:22 clear that you're choosing this
11:23 one because it's the shortest
11:28 wrong actually. Maybe this one's
11:31 just 10. That's my 5
11:32 plus 5, which is 10.
11:38 is 14. You actually have
11:40 wrong. This one's going to
11:50 which is 24. So that's
11:51 actually the shortest route. So
11:52 definitely you want to check
11:53 them all. That's because you
11:54 never know. So this is
11:57 the one I'm going to
11:58 choose. So I'm going to
12:03 going to connect C to
12:04 D by just going straight
12:05 across. So let's do that.
12:07 I'm going to do that
12:09 I'm gonna do this to
12:12 this not like that like
12:16 this and then this guy
12:20 to this guy. Okay, now
12:23 I'm gonna add in what
12:24 these are this is gonna
12:28 be five. This is gonna
12:38 Okay, so then it says,
12:43 use the Chinese post -naga,
12:45 clearly showing all the stages
12:46 to find the shortest distance
12:48 required to travel in order
12:49 to drive along every road.
12:51 So we're gonna, you're gonna,
12:52 she's gonna start a day
12:55 drive along every road. So
12:57 essentially all you have to
12:59 all these numbers that you
13:00 see in front of you,
13:02 all the purple ones plus
13:03 the five plus the five
13:06 is to also write down
13:07 a possible root. So let's
13:11 I'll write it down first
13:13 and then I'll kind of
13:15 just to make sure we're
13:16 correct. So I could do
13:34 Let's go to F. Let's
13:48 C. So now let's see,
13:59 So I've got over here
14:24 right. And I've covered every
14:26 possible one out. That's definitely
14:28 not the only option. In
14:29 fact, there's loads of options.
14:30 You can go here first,
14:32 then here you can do
14:33 there's loads of nodes and
14:34 nodes of different options. There
14:35 are different routes that you
14:36 could take. Let's just let's
14:37 just do that route with
14:39 pink just to make sure
14:40 we're right. So A to
14:41 E goes to there. E2D
14:46 does this. Fine. D to
14:51 C. Oops, that's not what
15:26 Then B, then A, then
15:40 Nice. So we walked, we
15:41 started at A, we walked
15:42 on every single edge exactly
15:44 once, and we finished an
15:48 A, which is just what
15:51 shortest distance required,
15:54 is the shortest distance. Shortest
16:07 distance is, and I just
16:09 basically need to add up
16:12 all these numbers. So let's
16:22 order I did it, plus
16:24 14, plus 12, plus 10,
16:32 plus 7, plus 6, plus
16:37 5, plus 15, plus 20,
16:43 plus 12, plus 5, plus
16:58 plus 5 again gives us
17:01 174. So this shortest distance
17:03 is 174. Obviously you don't
17:05 even have to add them
17:06 in order. Just literally add
17:08 up the numbers and you
17:09 know it's the shortest possible
17:11 distance. Okay, that's it guys.
17:13 I hope that makes sense.
17:16 Yeah, that's it. I'll see
17:17 you in the next video.