 There we go. It's late afternoon. I'm in Abigail's office. I was I was gonna go jog but if you watch the The playlist on linear algebra, you know that I've taken a tumble in my last one and I I'm just not I'm just not there yet. So I thought okay. Let's let's just make this video and graph theory What I want to show you in this video is just some of the common graphs that you will come across When you start studying graph theory, it might be some of the first graphs that you see in a textbook and We're gonna go into into Mathematica and I'll show you how easy it is. It is to do that I might show you one one extra function that you haven't seen before just to make life a little bit more interesting Let's go to Mathematica and let's go have a look. So here we are in Mathematica And let's just have a look at some of these graphs that you might come across Commonly in your textbooks or in class as you start learning about About graph theory the first time we're going to look at it. It's just the cycle graph. Let's do cycle Cycle and then gee we see cycle graph there and let's have one with five Vertices shift enter shift return. There we go and you can see what a cycle graph is all about is that every vertex is connected To two other vertices and they in turn connected to The one that they've just been connected to and the next one such that you can you can just follow along you can walk along this Graph you can imagine and just end up where you were before Now let's have a quick look at something. I want to show you the table function uppercase TA bit table and The table function does a few things. It's going to create this list of elements. I'm going to say n comma and then I'm going to say n again n goes from 1 to 10 in steps of 1 Let's just see what that creates one two three four five six seven eight nine ten It's clear to see what this table function does you give it some Expression in this instance was this in and then you iterate over that This variable in the expression in I could have called it x and x or I and I doesn't matter And you just give it this this recipe go from one started one in the ten and going steps of one Let's let's try this again. You'll see you in a moment. Why I want to show you this table function. Let's do n squared I'm going to hold down control or command and hit six and that gives me this superscript. So it's n squared I'm going to hit the right arrow key Just so that I move down and again and then in curly braces, let's do n going from one to five Let's do this in steps of one So n is going to go be one then two then three then four then five and in each instance It is going to be squared. So one squared is one two squared is four three squared is nine four squared 16 and five squared is 25 So let's just do this Let's have a table of cycle graphs cycle graphs and Let's make it. I'm just gonna be different. Let's just say I and I'm going to let I go from one to five in steps of one So it's gonna have cycle graph with one vertex cycle graph with two vertices cycle graph with three vertices Let's see what happens. Remember just to close the square brackets that we have they and there we have There's a cycle graph according to the Wolfram language with one vertex and it just has a loop with two vertices We'll see that there are two edges here Three just goes around this triangle four and five So it shows me five elements in this list see that it's inside of curly braces and it just shows me these five Different cycle graphs and that's beautiful. So that's what a cycle graph is all about Let's do the next one and that's a null graph. No graph is just a graph without any edges Without any edges. So let's make a graph Just a normal graph. Let's create some vertices one two and three Just one two and three and then for the edge set we have an empty set That's just like set notation with an empty set open close curly braces with nothing in and let's just do vertex Labels and we'll make that the name and we close our square brackets And there we go. We see one two and three, but there's no edges between them That is a null graph null graph. This means there are no edges between our vertices Let's do a complete graph. Let's have a look at what a complete graph is but then this this time around Let's use table again. Always have to start with an uppercase table. Let's do complete graph Let's do complete. I'm gonna Down there we go complete graph autocomplete and let's do in this time It's fine, and I'm gonna say in goes to from one two Five and steps of one. Let's look at what all these complete graphs look like with one Vertex two vertices three vertices four vertices and five vertices and there we go There's one with one. Just the vertex two You see they connected and here you see three But you can see every vertex is connected to every other vertex With four it becomes more clear. There are three There are three edges to every vertex that one has three that one is three that one is three that one has three look at this Five vertices and we see ten edges there, but every vertex with four edges Every vertex is connected to every other vertex None of them are missing and we actually have this little theorem Maybe just copy it from my other screen. I'm just gonna paste it there And we see that the number of edges of a complete graph is the number of vertices times One minor one less than all the vertices divided by two. Why is this so well? Look at this one with a ten it starts with five vertices Every five vertices every vertex can can then connect to four others So that's the five times the four But an edge has two vertices So we just have to divide by two in the end and that gives me ten and and and I can show you that I'm going to do edge count Let's scroll down. There we go each count of a complete graph With five vertices five vertices close my square bracket close my square bracket again every function With its arguments, you have to close with a square bracket and lo and behold it is ten just as advertised ten Should we do one more let's do one more I want to show you the utility graph now utility graph It's something that's saved on the Wolfram servers It is it is something that that that will be downloaded and because it's data We have this function called graph data graph data, and I'm just going to pass it a specific name and Because it's a string it goes inside of Quotation marks, and I'm going to say utility graph there it goes it finds it utility graph I'm going to hold on shift enter shift return and It's going to download this from the Wolfram service. You say initializing graph data indices You see it going there. It's downloaded. It's installed the first time you run this it might take some time So what is this utility? Well, you can think of the utilities being something like water electricity And gas and there you have your water your electricity and gas in here You have three houses and each one of these houses has to be connected to each of these three utilities ends utility graph You can see that's quite easy quite an easy concept there, and it's going to help us later just to Just to get to to some other concepts in graph we might come back to this utility graph But now at least you've seen a utility graph I want you to take you back to the cycle graph. Let's do this cycle graph and let's make the cycle graph in Four vertices with four vertices there you see Now can I change this into a complete graph? What we see is missing is the edge between these two and these two vertices Now I can create the complement of the cycle graph and the complement We'll just take away the edges that are there and put the ones in that are not there such that All in all we would have a complete graph. So let's let's have a look Let's have a look at that. I'm going to say graph Compliment Here we go graph complement of the complete or let's make it the cycle graph. I should say cycle cycle graph and with four Vertices let's have a look at that and lo and behold there you do see it You still see those same four vertices and now it's just these two edges that were not there Should this have been a complete graph and they are put in and the ones that were there originally They are simply they are simply taken away So there you've seen a few of the common graphs as I mentioned that you would find in your textbooks As you start learning about this graph theory start playing around with them You've seen the table function now try to do something with a table function quite a bit of fun But then use the table function as well to create some of these graphs and have them have one two three four five Etc vertices have some fun