 Another centrality measure comes from thinking of our graph as representing lines of communication between nodes. Consider the shortest path between two nodes. Well, what do we mean by that? If the edges are unweighted, the shortest path is the one that passes through the fewest edges, and here's an important idea, might be one of many equally short paths. We call A shortest path a geodesic, and remember, there might be several paths that are equally short. So, for example, in the graph shown, let's try to find the shortest path between A and H. And we see that the path A, B, E, H crosses three edges, but so does the path A, C, E, H, and also A, C, G, H. So in fact, there are three shortest paths between A and H. And this leads to another useful centrality measure between those centrality. So imagine a message passing from one node to another. We might assume the message passes along the shortest path between the nodes. So a node that is on many such shortest paths might be viewed as an important controller of the information through the network. It's worth pointing out this isn't just hypothetical. Wars have started because of the influence of someone along the communication chain. So suppose we focus on a node. The betweenness centrality of a node is the fraction of the shortest path between the other nodes that pass through the node we're focusing on. Now like many things, betweenness centrality is easy to describe. It does take a bit more work to implement. So let's find the betweenness centrality of node C in the graph. So the idea behind betweenness centrality is if we want a message to go from one node to another, how many of those messages have to pass through C? And for that, we note that there are 10 possible pairs to connect. A to B, A to D, A to E, A to F, BD, BE, BF, DE, DF, and EF. And what makes betweenness centrality a little bit of work is not that the work we have to do is particularly difficult, but there's a lot of it. So let's get started. What we want to do is find out how many shortest paths there are and how many of those C is on. So from A to B, there's only one shortest path, so that we'll go in our shortest path column, and C isn't on it. Likewise from A to D, there's only one shortest path and C isn't on it. In A and E, there is a shortest path and C is on that shortest path. So that's one more shortest path and one shortest path that C is on. And between A and F, there's a shortest path and C is also on that shortest path. Now we look at the shortest paths between B and D, and there's only one shortest path and C isn't on it. So that's one more shortest path. Between B and E, well there's actually two shortest paths, B to D to E, which excludes C, B to C to E, which includes C. So that adds two shortest paths and adds one to shortest paths that C is on. And between B and F, there's one shortest path and that one includes C. Between D and E, there's one shortest path that excludes C. Between D and F, the shortest path goes through C. Between E and F, there's one shortest path that includes C. So there are eleven geodesics and C is on six of them. So the betweenness entropy of C is 611s.