 Welcome to our review for Exam 1 for Math 1030, Contemporary Mathematics at Southern Utah University. As usual, I'll be your professor here, Dr. Andrew Misseldine. So this is the first of our exams that we're going to see throughout this course. So what I want to do in this video is discuss the many topics that are going to appear here in Exam 1. The short answer is that this exam is going to cover the topics we've been learning about so far regarding to graph theory. So graphs, vertices, edges, Euler's Circuits, Hamilton's Circuits, all of that business right there. So as this is our first exam, a few things I do want to say about the structure of this exam, for which you can see the cover page of the practice exam right in front of you. As we go through this review, it might be helpful to have open in front of you the practice exam that you can find on Canvas or the exam syllabus. You might want to pause the video and find that right now. Now with this exam review, there are some things that I really can't talk about in this video. In particular, things like time, place, and manner of the exam. It can change from semester to semester, the dates, the times. And so those things, you'll want to take a look at the exam syllabus to make sure you're squaring all of those things. But things that won't change from semester to semester for this exam are going to be the types of questions, the topics that appear on this exam, and those are the things I want to talk about in this video here. So what should you be studying as you prepare for this exam? So one thing that you should be aware of is that this exam has two types of questions. We have so-called multiple choice questions for which you would just circle your answer amongst the choices that's present. We'll talk some more about those in just a second. And then there's also these free response questions for which you would write all of your work, all your supporting work in order to get to the final answer. This exam has nine questions in the multiple choice section. They're worth five points each. And then the remaining questions, there's 15 questions on this exam, the remaining six questions are in the free response section and the amount of points they are worth varies from question to question. You can see that right here. And so like question 10 is worth five points, the next one's worth eight. And it depends on the difficulty of the question. And so be aware of that as we're going through this exam. So all of these questions are about graphs and the things related to that. And so as you are working through this exam and the multiple choice section, you would just select the one correct answer, but in the free response show all your work. Partial credit is available in the free response section. If you don't get exactly the right answer, you can still get partial credit based upon the work you showed there. Be aware though, if you only put the final answer in the free response, even if it's correct, you'll probably get no points. The work is necessary for full credit. In the multiple choice section though, it's all or nothing. There's no partial credit for those ones. You either select the correct answer or you don't. All right. The other specific things like what materials can you use? Where do I take the exam? Take a look at that in the syllabus because that can change from term to term. So without further ado, let's talk about the topics of this exam. Now in this video here, I'm gonna talk about the types of questions you should be preparing for. I'm not gonna solve any of the problems in this review. There are solutions attached to this practice exam, so you can check your own solutions. But also I do have also solution videos prepared that you can watch for each of these questions you see on here. So if you do have questions about how these problems are solved, take a look at those videos. This review video is just gonna focus on the topics that we need to be preparing for here. Okay. So with question number one, well honestly, this is true for basically every question on this exam. You're gonna be given a graph and asked to analyze some aspect of that graph. And this test will be randomly generated. So it is actually possible that you might see the same graph on multiple questions. That's not a big deal. Each question will ask you something different about the graph. So even if you get the same graph, no biggie there whatsoever. Question one is, I usually like to start the test with one that's softball, nothing too hard here. So question number one is gonna ask you about how the vertices are connected to each other. So this might lead to something like degree. Remember the degree of a vertex is the number of edges connected to that. If a loop is present, we count the loop twice because there's a start and stop. That's what we're counting there. For degree, it's kind of like we draw a circle and we look at nothing outside of the circle and we then ask ourselves, how many edges do I see there? So for vertex A, the degree would be three in that situation. But related to this idea is the idea of adjacency, like who is adjacent to A? A is adjacent to B, it's adjacent to F, it's adjacent to G, but A is not adjacent to D because there is no edge that connects A to D together. There is a path from A to D, but that's actually a topic that you'll see in a different question. Question number one, very much softball, like what's the degree of a vertex? Which vertices are adjacent to which vertices? Just some basic vocabulary about graphs that we've seen through these lessons. And I should actually take a moment and pause and say that. This exam is gonna cover lessons one through eight about graph theory. Now, admittedly, lesson nine, as we start talking about scheduling and things beyond that, we are gonna talk about the notion of a digraph, a directed graph, but none of that directed graph conversation is gonna appear on this exam. This one only is about undirected graphs that we saw in lessons one through eight. So we'll see things like Euler circuits, Hamilton circuits, traveling salesman problems, shortest path, Dijkster's algorithm, Flurry's algorithm, Kruskal's algorithm, those are the type of things we're gonna see on this exam, okay? So yeah, question number one, I really should think it's like a lesson one type thing. Very, very basic idea. Admittedly, I confess degree was introduced in lesson three, but very, very, very low level stuff there. Okay, question number two is gonna give you a picture of a graph and it's gonna ask you to correctly identify either a bridge on the graph. Remember, a bridge is an edge, which if removed would disconnect the graph. This question is asking to find a bridge. So which of these six edges is a bridge? It could be that the graph has multiple bridges, but amongst the six options, there should only be one bridge. So by process of elimination, like it's not AX, it's not BY whatever, find the one bridge that's listed among the six there. This question could also be modified to ask about bottlenecks. Remember, a bottleneck is similar to a bridge, but a bottleneck is a vertex if removed from the graph would disconnect the graph. The notion of bridges we introduced in lesson three as we were talking about Euler circuits and Euler paths. And then when it came to bottlenecks, we introduced those in lesson five as we started talking about the traveling salesman problem. So question number two is gonna ask you to check and find either bridges or bottlenecks on a graph. So be prepared to do those. Question number three is going to ask about Euler paths and particularly it's gonna ask, I like to use Euler's theorem. So remember, Euler's theorem tells us that a graph has an Euler circuit if and only if all of the vertices are even and it also tells us that it has an Euler path. So it has a Euler path, meaning that it visits every edge once and only once, but it doesn't start and stop at the same place. It has an Euler path exactly when two vertices are odd and all the other ones are even. So with this question right here to ask, which two vertices must all Euler paths start or stop at? So this would tell us like, oh, what are the two odd vertices you're looking for that? So you should know Euler's theorem, that statement I just said. Question number three will ask you to apply Euler's theorem in some type of multiple choice section kind of like this, like find the start and stops of an Euler path. Notice it doesn't ask you to find an Euler path, it just tells you what two points do you have to start and stop at, which would be the two odd vertices. Question number four is gonna be a traveling salesman problem. In particular, it's gonna ask you to run the nearest neighbor algorithm on a complete graph that's a complete weighted graph that's provided. So something like K5 with all the various weights there. When you're running this one, it does say use the nearest neighbor algorithm. So there's some things you have to note here. The nearest neighbor algorithm needs a starting point. It's gonna specify the starting point. So you start at B on this example. As we've seen with the nearest neighbor algorithm, different starting vertices can lead to different answers. So if you do not start at the vertex that is specifically mentioned in the instructions here, you might get a different answer and that would then be marking it wrong, okay? I should also mention that the cheapest link algorithm is not what the instructions ask you to do. The cheapest link algorithm could produce a different answer than nearest neighbor starting at B. So you wanna make sure you follow the directions, use the starting point that I mentioned, otherwise you get some wrong answers here. Now, as you're looking for the answer here, it doesn't actually ask what is the circuit, the Hamilton circuit you're constructing. It just wants to know what's the cost of the circuit. So you would add together all of the edges you use. So like if you went round robin, I'm not saying that's the right answer, but if you went round robin, if you think that's the correct circuit, you would take 3.3 plus 5.3 plus what is that, 5 plus 4.5 plus 3.6, you'd add that together. On this exam, of course, you are allowed to use a calculator, so if you want, you can help with the arithmetic here. There's no questions that require a calculator, but I can confess that on a question like this, the addition, it's profitable to have a calculator, so you might wanna bring one when you take the exam here. You're just gonna write the cost of the tour that the nearest neighbor algorithm gives you, start in at B, make sure you start at B, and also don't use the cheapest link because that could give you the wrong answer. Honestly, a lot of these answers here are the answer for a different Hamilton circuit, some of which you might find if you do nearest neighbor out of the wrong vertex or if you do the cheapest link. So do make sure you follow the instructions there. Some things I should mention, I forgot to mention here, with question number three, we did Euler's Circuits in lesson three, so if you need to review Euler's Theorem and learn some more about Euler's Circuits or Euler paths, you might wanna go back to that one. And number five right here, we learned the nearest neighbor algorithm in lesson five, if I do recall, or no, that's, I'm sorry, that was lesson six. In lesson five, we introduced Hamilton circuits, but we didn't learn the nearest neighbor algorithm until lesson six right there, so do be aware. Question number five is gonna be a question about trees. So I want you to analyze, do the properties that I'm gonna give you about a graph guarantee that it's a tree or not? We introduced the notion of trees in lesson seven, and in particular, there's a couple of properties we found out that are equivalent to being a tree. A graph is a tree if it's connected and has no cycles, that's the definition of a tree. Another condition we have is that a graph is a tree if and only if every edge is a bridge. A graph is a tree if and only if every pair of vertices has a unique path between them. And then finally, a graph is a tree if and only if it's a connected graph with n vertices and n minus one edges. So those are properties all equivalent to being a tree. And question five is gonna ask you something like that. So in this case, suppose that a connected graph, so that the tree has to be connected, it has 10 vertices, call them A through J if you need to, and there are two paths connecting C and D, all right? So that has something to do with the single path property. Is the single path property satisfied or violated? I'm not gonna say in this video, because again, I'm not gonna provide the answer. If you were like, oh, that can't be a tree, then you would select, say, choice B, it's like, oh, that's not a tree. If you're like, oh, those conditions guarantee it's a tree, then you would say A. But it could also be something like, oh, I don't have enough information. Like, let's say it tells us there's 10 vertices here. But if it's like, oh, you have a graph with 10 vertices and nine edges, right? That's tempting to say it's a tree because it doesn't sound like the N minus one edge property. Well, in order for this to be a tree, it does have to be a connected graph. It turns out, oh, I misspelled the word. That's what it turned out. It turns out that a graph can have one less edge, but not be a tree. For example, if I did something like the following, you take two vertices right here, another one over here, and so you have three vertices and then two edges. It's not a tree in that case, because it's not connected. But in order for it to be connected, you have to do something like that in which case that would be a tree. So the answer actually could be C, that you don't have enough information that the graph that's described could be a tree or could not be a tree. So this one is definitely one you're gonna wanna think about, again, go to lesson seven to see those properties that you should be aware of. Feel free to put them in your notes. It'll be helpful for this exam. Moving on to the next page here, question number six. So that you'll be given the picture of a graph, okay? And you'll be asked which of the following is an Euler path or Euler circuit on this graph. In this case, it was asked for an Euler path so the starting and stopping points don't have to be the same. If it was a circuit, it would have to start and stop at the same spot, of course. So an Euler path, remember, this is a path which uses every vertex once and only once. And so it's not asking you to construct an Euler path. It's just saying of the six options here, which one is actually an Euler path. And so some things I could note here is like where are the odd vertices? Every Euler path has to start at one of the two odd vertices. That itself might help eliminate some of these possibilities very, very quickly. Some of them would be discarded for that reason. But at the very least, you can just go through them one by one by one. It's like, okay, looking at the first one here, I go from G to D to E to B to C to D to, and you can keep on going, of course, through all of these things here and see how that handles thing. I will finish this one out here. You go from D to A to B to E to D to E. That's not an Euler path, right? I mean, one, you didn't hit every vertex and then actually some you hit twice. So that one's not an Euler path, so you can rule that out. So by process elimination, determine which of the six is an Euler path and the other five will not be, okay? This question is gonna ask about Euler path, but it could be an Euler circuit as well. So again, like we said before, we introduced Euler paths and Euler circuits in lecture three, but lecture four about dead head might also be worth taking a look at as that was about Eulerization. That's not directly related to this problem, but there might be some information there that could be useful as you're preparing for this exam. Question seven is gonna be a question on shortest path. This is gonna be an unweighted graph. You're gonna see a weighted graph later on. So you can run the full force of Dijkstra's algorithm, but since there's no weights, each of the weights you wanna think of as one, and so you actually might be able to solve this without the full force of Dijkstra's algorithm. By all means, you've used Dijkstra's algorithm here, but it's like, okay, I wanna find the distance, the shortest path from A to G. With the absence of weights, I think you can find out what's going on here. This graph has an example of bridge. You're gonna have to use that. And you wanna find what is the shortest path. Particularly, you wanna figure out what's the length of the shortest path. So you're like, oh, the shortest path is you go around like this. Okay, that is definitely not the shortest path, just so we're clear. You'd be like, okay, one, two, three, four, five, six, seven, eight, nine. And you're like, oh, it's nine. Oh, that answer's not there. So I made a mistake clearly. So you'd select just with the length of the shortest path. You don't actually have to come up with the shortest path itself. Shortest path was the main conversation we did with lecture two. Dijkstra's algorithm was introduced in lesson two as well, but we also looked at some of these smaller examples of shorter path that are for unweighted graphs. It's a little bit easier, of course, in that situation. All right, question number eight. This is gonna be very similar to question number four that we saw on the previous page. That is, you'll be given a weighted, complete graph. You'll be asked to solve a traveling salesman problem, but this time it's going to give you the cheapest link, or it says use the cheapest link algorithm to solve the problem. Again, you don't have to write down what was the Hamilton circuit you found using the cheapest link. You just have to find out what was the cost of the cheapest link tour to solve that traveling salesman problem. So again, if you think it goes, you just grabs all the edges on the boundary. You would take nine plus 25 plus 32 plus 18 plus 35. That has to be something. Let's say it's 121, you would select choice B. That's all you have to do. But like I cautioned you with question number four, with the nearest neighbor ones, you need to follow the instructions. If you try to do nearest neighbor with any of the vertices, it might not agree with what the cheapest link gives you. So run the cheapest link algorithm to guarantee that you'll get the correct answer there. Now, cheapest link was introduced in lecture seven. So if you need some more practice or want to see some more examples, please go look at the lesson or the corresponding homework assignments there. So then we get to question number nine. This is the last question on the multiple choice section. This one is actually very similar to question number six that we saw above. But this time you're going to be given a graph and you want to analyze which of the following is a Hamilton path or a Hamilton circuit. So a Hamilton path unlike an Euler path is a path which visits every vertex once and only once. And Euler's theorem doesn't exactly apply. Finding like a criteria for the existence of Hamilton paths and circuits is a little bit harder. But again, in this example, all you have to do is figure out which of these six options is a Hamilton path. One of them will be the other ones will not. And so you could try to go through them. You know, it's like, okay, I go from F to B to A to D. You can go through them and see if that gives you a Hamilton circuit or a Hamilton path. In this case, it's asking for a path on the actual test might ask for a Hamilton circuit instead. Some of these might not even be paths. Like you might jump from vertex to another vertex they're not even adjacent to, I don't know. But I do check to see which of these is Hamilton path and which one's not. So just so you're aware, the Hamilton circuit as a definition and Hamilton path was introduced into lesson five. And so you might want to go to that lesson and the corresponding homework to get some more practice if you're not ready to do that already. Now that gets us through the multiple choice section. Remember, there's nine questions total in this section. Five points each, so a total of 45 points. You would select what you think is the one correct answer and no partial credit is available on those ones. So do take your time to make sure you answer those things correctly. Now we're gonna move to the free response section of this exam. Like we mentioned before, the total points for a specific question varies based upon its difficulty. But you can get partial credit if you have partially correct answers or partially correct work. And you do need to show all the appropriate work, which I get it. In some problems, there's not really a lot of work to show. Like question number 10 right here. It's gonna ask you to draw an illustration to represent the graph when the vertex set is given and when the edge set. So you draw a graph, it's like, okay, I have five vertices. You would label them like A, B, C, et cetera. And then you connect the edges if possible. Like, oh, there's an edge A, B. There's an edge A, C, et cetera. So you draw the picture. So there's not a lot of work to show. I mean, the answer is the illustration and thus all of the points is gonna come from that final graph. Now, if you do have some mistakes in the graph, you can still get some partial credit. But this one's only worth five points. So it's actually on par with a multiple choice question in terms of its difficulty. We were doing this in lesson number one. So we should be able to understand like how can we draw a graph? And be aware that not every illustration is unique. There are different ways you can draw a graph that's still correct, that's perfectly fine. As long as you have a correct graph illustration, you can get the full points on question number 10. Question number 11 here is gonna have to do with oilerizations and finding oiler circuits. So you're definitely gonna want to come to lessons three and four for that. And lesson three, we learned Flurry's algorithm which tells us how to construct an oiler path or circuit on a graph. This graph that you can see right here, it does actually have an oiler circuit. You can argue that every vertex is degree even. And therefore by oiler's theorem, an oiler circuit exists. So then you wanna implement Flurry's algorithm which we learned about in lesson three to construct an oiler circuit. And for the sake of simplicity, since there's so many vertices, if you want to label them like A, B, C, D, you can do that assuming you know the alphabet. You can do that and then you can be like, oh, I go from A to B to C to D, whatever. But many of us, especially since the graph will probably be unlabeled, it might just be easier just to label the edges. Excuse me, so you can go like one to two to three to four to five to six, just clearly label the order and that way the grader can easily follow and see if the thing you construct it is an oiler circuit or not. There's not a unique answer to this problem because when an oiler circuit exists, there actually can be a multitude of oiler circuits. But Flurry's algorithm which tells us to avoid bridges. There's options because when you avoid a bridge there might be a lot of edges to choose from. Run Flurry's algorithm and you can construct an oiler circuit as long as it's correct you'll get the full points there. And again, on this question, there's not a lot of ways of showing your work other than the answer itself, one, two, three, four, et cetera. But depending on how close your final answer is to an oiler circuit or not, to look how close you got with using Flurry's algorithm, we can give you some partial credit potentially if there were some mistakes there. I should also mention that question 11 here, it might ask you to come up with an oiler circuit but it also might ask for you to find an oilerization. It could be that you have a graph that doesn't have an oiler circuit because edges might be odd in which case you might need to add some extra edges. So what you would do is you would draw the extra edges and remember for an oilerization just like we discussed in lesson four, for an oilerization you could only use multiple edges. That is you can only double up on edges that already exist on the graph. No new edges are allowed. And you need to do this in a minimal fashion. As in you add edges in such a way that the problem is small. That is the extra, the dead head is minimized. We in the homework did explore this with some un, with weighted graphs but for the sake of the exam these graphs here, the oiler circuit you would find or the oilerization, these would be unweighted graphs. So that makes it a little bit easier and I would want you to oilerize a graph based upon that. So that's what you could see in question 11 here. Either find an oiler circuit on a graph that has an oiler circuit or if it doesn't have an oiler circuit you would oilerize it and then add these edges and then you might have to label the edges as well. One, two, three, four, five, et cetera. So be prepared to do that on question number 11. And these are things we did from homeworks three and four. That question's worth eight points. Question number 12 is worth 10 points and this will have to do with minimal spanning trees like we learned about in lesson eight for which you'll run Kruskal's algorithm to find the minimal spanning tree. Remember Kruskal's algorithm is basically just the cheapest link algorithm. It's just the focus is a little bit different. With the cheapest link algorithm you're trying to find a minimum Hamilton circuit. With Kruskal's algorithm you're looking for a minimal spanning tree. And so that slight difference is like, well you can revisit the same vertex as many times as you want to because it's a tree but you can't build cycles. So and then you just grab what is the cheapest one. So looking at this graph right here like the cheapest link is like, oh I have a 10 right here. I have a 10 right here. I have a 10 right here. You keep on going from there. I can't use this anymore because that would form a cycle. And so what you're gonna do is you're gonna run Kruskal's algorithm. You're gonna find the tree and then you have to so notice what it says here find the minimal spanning tree shown below using Kruskal's algorithm. So if you need to you can sort of color the graph in order to show it or you can just label which tree you have over here. So I do need to see like what is the tree and then also describe its weight. So you would add together all the weights to get a final answer but I do need to see the tree. Unlike those multiple choice questions where you just gave me the weight of the Hamilton circuit I need to know what the tree is. Most of us can probably just color it on the page there which if you only have a pencil just like kind of like, you know just make it bold. So it's very clear like what edges you used. You can label it over here if you want to but that can get a little bit messy. I think drawing it on the graph is probably your best bet there. And if you have colored pencils pile means do so. I mean who doesn't just keep those in their pockets at all times. But if you don't, if you just have a pencil just kind of like shade it in to indicate very clearly what edges you're using just make sure you don't erase the numbers if you do that, okay. Question number 12 worth 10 points find as minimum spanning tree using Kruskal's algorithm and tell me the weight of that minimum spanning tree. All right, question number 13. This one I want you to solve a traveling salesman problem but you're gonna do this one by the brute force algorithm. Remember what does brute force mean? You need to try everything. You try every possibility. Now I'm not gonna give you a problem that's too big probably something like this I'll give you K4, okay. So if you look at every possible circuit and because since you're trying every possibility why as well just for the sake of it started A when you go from A it's like what can you do? You go from B to C to D. There's gonna be six options you have to look at here. If you have a fixed starting point on K4 and the starting point doesn't matter so why as well pick a point to start at say that A there's gonna be six options but these options come in pairs. So there's like there's just the same option backwards. So really there's not a lot of options here. So when I say brute force it's not a big problem you can handle it. I want you to look at every possible Hamilton circuit list all of their weights and then decide which one was the best one. So indicate of your list of all of them which what's the best one and what's its cost. So for this one, this one you definitely have to show all your work on if you don't list all of the Hamilton circuits then you're gonna lose some points. You gotta show the cost of each of those Hamilton circuits and then you have to indicate of all of those Hamilton circuits what is the best option there, okay? So with the brute force we started doing this in lesson six very briefly at the beginning we did it with a K5 problem K4 is much simpler but I want you to mimic that for question number 13 there. It's worth so many points not because it's hard but because there's a lot to show as compared to some of the other ones. Question number 14 you will be asked to given a weighted graph here you'll be asked to find the shortest distance between two vertices in that graph. So for example, this one you have vertex C you have vertex G you wanna find the shortest path from C to G so you might do something like this I don't know if that's the shortest path but you're gonna have that. Now in order to find the shortest path you are gonna run Dijkstra's algorithm here. This is a problem you have to show all your work so I do need to see that you do Dijkstra's algorithm with Dijkstra's algorithm you wanna you go from C to G but you actually drive backwards on this thing so you actually start here be like okay the distance from G to G is zero and then the distance from F to G is like 21 running Dijkstra's algorithm you would fill in these boxes and so you do need to show all of these boxes until eventually you find the right distance here that's how you show your work on this one if you leave those boxes blank you're throwing away points I do need to see that what is the shortest distance and then actually write out the path for which you can either color it on your page or you can just write out like C to D to E to F to G again I'm not saying that's the shortest path just hypothetically okay Dijkstra's algorithm was the main focus of lesson number two so if you want some more practice on Dijkstra's algorithm go look at lesson number two for that one this one's worth 10 points this now gets us to our final question on this exam question number 15 for which you'll be given another traveling salesman problem but now we're gonna do the repeated nearest neighbor algorithm so remember to repeat this near neighbor you do the nearest neighbor algorithm for all of the vertices this graph has five vertices so we'll start at A find the nearest neighbor answer start at B find the nearest neighbor answer start at C write the nearest neighbor answer do all of those and so you'd write those like oh if you start at A you're gonna get this one here's the cost you start at B here's the circuit you get and here's the cost like so these are those are supposed to be dollar signs they don't quite look like them you know you do it at C and you should do it you tell me the cost you do have to do all five of them or if you did something if there was like six vertices you'd have to do more right and do all of them try all of the vertices cause that's what repeated nearest neighbor means and then whatever the correct one is you would indicate like oh this is the optimal path that we found I mean I guess I should say it's suboptimal there could be a better answer but I need to know what was the answer you got from the repeated nearest neighbor and you do have to do all of them for full credit on this one okay so that then gets us to the end of this exam we basically hit everything I guess I should also mention that repeated nearest neighbor we introduced in lesson six it was the same lesson that we introduced the nearest neighbor algorithm so as we're preparing for the exam there's clearly gonna be some randomizations variation that happens here like question number 15 it will be about the repeated nearest neighbor algorithm but this graph you can anticipate to be different so that the answer is different but you do need to prepare how to use these algorithms like all the algorithms we learned about you need to know how to use you need to know how to use Dijkstra's algorithm to find shortest path you need to know how to find you need to know how to use Flurry's algorithm to find another circuit brute force nearest neighbor repeated nearest neighbor cheapest link to find Hamilton's circuits you need to know how to use Kruskal's algorithm to find a minimal spanning tree you need to know all of the definitions of things like bottlenecks and bridges and edges and vertices adjacency degrees oh my all those things you need to know those things and therefore this exam will be a very accurate assessment of your understanding of our chapter on graph theory of course if you have any questions beyond this review please reach out to me I'll be glad to help you as best as I can best of luck in your studies everyone and I will see you next time