Okay, I guess I'm going to start now. My name is Oskar Sandberg, and as you see, I'm going to talk a bit about network mathematics. So this talk is probably going to be a little different than most talks here, because I'm not going to be giving you any attacks or anything like that. I'm just going to be talking a bit about the ideas behind the mathematics of networks, and I'm going to give some examples. Maybe some of them you have seen. Some of them I promise you have not seen. So what I mean by network, and the word is used in many different ways, but for this one it's going to be the simplest abstraction possible, which is that there's just a collection of points, and there are connections between them. So that's a network, points and connections. So this kind of abstraction is very common, and it comes up in a lot of different sciences. So the study of networks. Networks really is a cross-science field, and it comes up in physics, in biology, in sociology, and of course when you're dealing with computers and computer security and everything like that. And so I like to put this up just because this abstraction has many different names, as tends to be the case when different fields are studying the same thing, but it really all means the same thing. So mathematicians, and since... I do math, I'm probably going to use these terms most, is instead of a network, you talk about a graph, which is confusing to a lot of non-mathematicians because they think of a graph as the plot thing, but that's not what you mean. If a mathematician says graph, he means a network, points and connections between them. And in math, they're called vertices and edges. And computer scientists often would rather refer to a network, and they talk about nodes and links, possibly. Not all these. I mean, within any field, it varies as well. But these are just examples of the sort of thing that people would say. And then down at the bottom, I put some examples, right? If you see, you can see the World Wide Web as a network, and then each vertex is a web page, and then you have links, and those are directional, but the Internet, depending on how you look at it, you could either see individual sites or networks, and they're connected. So just since this is a math talk, we're going to do some math. So formally, the way you define this graph is you say that there's a set of vertices and a set of edges. And we just denote those by V and E. So it's a collection of vertices, these are the points, and then the edges between them. And so V is just some collection, and UV, then, is a collection of pairs, saying that for each pair UV, if this exists in the set E, then that is an edge. And one thing you have is, when you're looking at networks, if we're trying to study networks in real life, is that you have either ones that are structured and designed by people explicitly, or you have ones that are randomly evolved. And those are some examples. Corporate LANs or telephone networks tend to be designed by somebody who thinks about how the network works, network should be set up. Whereas other things are maybe more or less random. There's no design to the network that makes up the World Wide Web or the social network of the world. And then there's also those that are somewhere in between. The best way to model something like many peer-to-peer networks or the internet itself is to say, well, there is some structure. Somebody is trying to bring some sort of order here, but it's pretty chaotic. Nobody drew up a map and said this is how it should be. And these ones that lie somewhere in between is actually where some of the most interesting mathematics comes in. And that's where we're going to get to. And so when you're doing analysis of these sort of things, what type of questions you're asking usually depends on what type of network you're looking at. For these structured networks, the questions are typically something that are algorithmic in nature. They tend to be, oh, how should I make a network so that it has this and that property? And these tend to be the very classical, combinatorial computer science problem. How do I connect this to make a graph in a certain sense or whatever? Whereas if you're dealing with randomly generated networks, social networks, the web, something like that, you tend to be more analytic because you're saying, well, we have this dynamic that's randomly wiring up this thing, and we want to understand what's going on. So the questions tend to be more analytic in nature. So I'm going to be dealing with networks that are randomly created. . With either completely random or with some structure, and we're going to be looking a little bit at different models of this. So what we start out with is the very simplest model, which mathematicians refer to as GNP, G of NMP. And the roles of NMP I'll explain. And this is an old model that goes back to the work of Erdős in the 50s, Erdős and . And the idea is we just enumerate the vertices. So we call the points on the graph. Well, I numbered from 0 here, but normally you'd number from 1. If you can forget the zero, that's a typo. And too much coding in C. And then the point is, once you have this collection of vertices, you just add edges independently and with this probability P for every pair. And so this notion of independence is extremely important when you're dealing with anything probabilistic. And what it means is that it happens without depending on what the outcome of the other things were. The best way to think about this is that for every pair of vertices, we toss a coin, and if the coin comes up heads, then they have an edge between them. If not, then they don't. There's no whether two nodes have an edge between them. It doesn't depend on whether there are all the other edges in the network. So I have this simulator. Just to show here, I took 200 vertices like this, and I just spread them out now. We don't know which is which. But it doesn't really matter. And then we have a rather low P here. So for every possible pair of edges, we can just add one randomly. And I hope you can see those all right there. Because this P is very small now, for every possible pair here, there's only a small probability that there's an edge. You see rather few edges. And I'll show you some more of that, sorry, later. So, so this is not going to be the main part of the talk, but it's worth noting that already with this very simple model, which is really the simplest way to make a random network, you get a lot of interesting properties that have been, and that actually are quite relevant. Yeah? What? I'm sure that there are applications to computer graphics, yes. So, so, for instance, if, I did this kind of backwards, so. Yeah, the point is, if this P is greater than one over N, then you're going to get what is known as a connected cluster, which means that most of the edges, for some definition of most, which is different from most definitions of most, you're, you're, you're going to, so, so a lot, a very big part of, of the, of the vertices are all going to be connected to each other, by which we mean that we can travel along edges to go from any one to any other. So, as an example of this, so we could take this picture here, and hopefully this, the contrast is good enough, yeah, that you can see what happens if we, what I've done now is I colored all the edges that are, that, that are connected to one another, where you can pass through from one to the other in the same color. But what we see is that, with this very small P, we get very many different colors, because most, to start with, most vertices we can see have no edges at all, so they're completely disconnected from anybody else, and even where there are edges, most of the edges are disconnected from one another. You can't travel from one vertex to another over these edges in this network. So, this is a disconnected network, where you, for instance, you can't, if it was a communication network, you couldn't have communication, but it turns out that, even for a pretty small value, like this, where we only have two, so, the number of, of edges at each vertex, vertex is going to be n times p here because you've got n different nodes and probability p of connecting to each one of them. So here you've got about two edges at each point. And it turns out already here if we do the same thing that even though there are rather few edges, it turns out that almost everyone belongs to this red. You can see there's still vertices that are disconnected from each other, but almost everyone belongs to this red cluster here. And this is an important property because it says that it doesn't take a lot of edges. In fact, so the theoretical threshold is only one edge per vertex. The probability of connecting can be so small that each vertex on average only has one edge. And yet, most vertices will still be in this connected or it has to be a little over one, but most of the vertices will still be connected to one another. And this is one of these very important for example for security applications, the robustness of random networks in the sense that if you do knock out edges and it , if you try to attack a network, you have to bring down the average number of edges very, very far if they're randomly wired in order to disconnect people. And it turns out that with just a little more, so if you go up to log n edges per vertex, then you'll get something which looks like this. Now we've gone up to five in this example with 200. And then you get something which is completely connected. So everyone is really connected and no one is left out at all. So an interesting property of these random networks is that it takes rather few edges to make sure that everyone is included. And in order to disconnect the network, you really have to knock things out. Shit, sorry. Keep hitting the wrong button. So the other thing which I'm going to come back to is the question of diameter of this connected cluster, which is how many edges do I have to, I know I can travel from one vertex to another within the cluster. How many steps does it take? And that's at most. And that's what's called the diameter. It's like if you think about the diameter of a circle, that's how far apart are to the distance between the furthest points on the circle is the diameter. In the same sense, when you talk about the diameter of a network or a graph, you mean how far apart, how many steps does it take to go from the ones that are farthest from each other. So this model GMP has, it does have interesting properties and you can really see some of the things with the utility of the randomness in doing things like keeping the graph connected. But it isn't known as a very good model for studying real world networks because it doesn't seem to obey a lot of the properties that we see in networks like the internet, like social networks, like biological networks. And one example of this is that, I'm going to show an example of this, but the degree is highly concentrated, to use a technical term, which means that it varies very little. And by degree I mean the number of edges connected to each vertex. So when you have when you have this, you, essentially what happens for large networks like this is that most vertices have about the same number of edges. They're connected to about the same number of other ones. Whereas if you think about a real world network, sort of like a world social network, that isn't the case at all. You have some people who are isolated and lonely, and some people who get all the friends and get to go to all the parties. No bitterness. So it tends to be, so it seems like if you look at most real world networks, they can't really be wired up in this very simple fashion of taking each possible edge and saying, and flipping a coin to see whether it's on or off. I guess no one would think that a social network would be built that way, but it's obviously not a good model because it fails to get for this property that you have that some people are very popular and some people aren't. And also there's an important property of triangles in the graph. And by triangles, I mean loops of three edges. So you can go from an easy way to think about it, if you think go back to the social network, which is usually the easiest context to think about these things, is that if you have two friends, it's very likely that they are friends as well. I mean, not very, but it's quite likely that they are friends as well. But if you remember, even in this highly connected network that we had here, this probability that any one edge exists is still just 0.025, which means that if you, if a network is built like this, that I'm connected to two people, the probability that they have an edge between them is independent of that I knew them, so it doesn't depend on that. So it's still this probability which is very low, which probably isn't true about your friends because a lot of your friends will know each other because they met through you or whatever. So this is also an unrealistic property. And we're going to, I'm going to be talking a bit about models which include these sort of things, and especially the ladder thing is something we'll come back to. So before I do, though, I wanted to give one example, an example of a model sort of explaining why it is that we have this unfairness that there are some vertices that have a very high degree, some people who have very many friends, and some vertices that have a low degree. And this model is called preferential attachment, and it was originally proposed by two physicists, Barabasci and Albert, and the rigorous mathematical work was done by Barabasci and Riordan in analysing it to try to see that it really behaves like one would predict that it would. And the idea with this model is that you have this network, and like a social graph or whatever, and people are coming in one by one, and when they come in, they connect to somebody who's already joined. So first person joins, he can't do anything. Second person comes in, he joins with the first, he becomes friends with the first person. Third person comes in, he has to choose one of them to become friends with, and so on. And what happens is that in the later phases, the probability that a new vertex or a new node, sorry, I'm using, is that he will connect to somebody will be proportional to the number of friends they have already. So that means if somebody already has a high degree, has many edges coming out, then they will be more likely to get another edge when the next person joins the network. And this leads to this sort of the rich get richer sort of effect, which of course, I mean, it's very natural, and if you think about social networks, there does seem to be somewhat of that dynamic going on in there. So here's preferential attachment to sort of illustrate this in my simulator here. You can see at the bottom here, I've done a plot of the degree distribution. By that I mean, how many vertices have so many friends, right? And the numbers aren't there, but they aren't very important. It's more the shape of this plot that you see, the shape of the histogram there, which says that it's sort of, it's concentrated around one point. Most people have like four or five friends, and some people have a little bit more, some people have a little bit less, but it really just sticks around there. And in green, I've highlighted the edges of the vertex who has the most number of friends, and you can see he's got quite a few friends, but it's not extremely many. And this was then generated, this is the same graph we were looking at before, this GMP graph where each edge just exists by a coin flip. So then we'll do this preferential attachment instead. So the nodes join one at a time, and then their willingness to connect to vertices now is going to be dependent on how many friends that vertex had before. And you can see already from the beginning is the zero bar on the degree distribution is because ones that haven't joined have zero. That goes down, and you see that you get a very different shape on this distribution here, which is that the lowest, which is two here, I think, because everyone got two friends just from joining the network, that most people just have two. Some people have a little bit more, and they're getting 3 and you can't see it, but there's actually like, there's actually very, very small one pixel bars going all the way to the end of the screen, because if we look at the guy here who has the most number of friends, he knows a lot of people. Because he was one of the first people to join, he happened to get a lot of friends early on, and because he had a lot of friends early on, he got more friends later, and therefore, he got this. These sort of dynamic explanations for why networks form are the sort of things that one is looking for in the study of networks. or one of the things that we're going to be looking for. But this was actually an aside because the real thing that I'm going to be talking about is not this but the other one. And before that, I want to step aside from the mathematics and talk about sort of one of the motivating ideas behind this part of studying networks. And this, again, relates to the world social network, but one shouldn't really think of it as being just being – I use the social network metaphor because it's very direct. It's right in front of us. But all these things really do apply to a lot of different kinds of networks. This preferential attachment has been applied to just about everything, from power graphs to how your brain wires up to everything like that. But you have to forgive me for using the social metaphor because it's very direct and it's easy to think about. And the small world phenomenon comes straight from the social metaphor as well. And it says that if we look at naturally occurring networks, and social networks in particular, they tend to have this small diameter, which is what I mentioned before, that the number of steps to go from one point to another following the edges of the graph is not that big between anybody else in the graph. And so this sort of – the real birth of the interest in the small world phenomenon comes from an experiment done by this guy, Stanley Milgram, in 1967. I don't know if anyone's heard of Milgram. Well, I'm sure somebody's heard of him, but I don't know if all of you have heard of him. He's an extremely cool guy who did a lot of, like, strange psychological experiments in the 60s. He's most famous for the one where he had volunteers electrocute other people to see how much voltage they would put in if they were just told to do it by somebody who looked like they're authoritative. But this particular experiment that I'm talking about is a little less sadistic than that, unfortunately. It's instead we're going to – instead what he did was he wanted to see – how far is it between people in the world? Everyone sort of knows the – I mean, this idea that if I have a friend who has a friend who has a friend who knows whoever. And the way that he wanted to do this was to give letters to people. And he started – he thought, if we take people on opposite ends of the world and we give them letters and they have to give them to their friends in order to reach somebody on the other side of the world. So the letters, it was addressed to somebody – to a stockbroker in Boston, or actually Sharon, which is outside Boston. And he gave it to volunteers in Omaha, Nebraska, which I guess in Stanley Milgram's world was like the opposite ends of the world. So he – as far as he could get. And the idea was it was addressed to this guy who it was destined for, but the people were only allowed to send the letter to people that they knew. So they couldn't just put a stamp on it, put it in the mailbox and send it to him. They had to find some friend who they thought was the right person to give it to to get it in the direction of this guy in Boston. And that way they could sort of – to see, is it really a small world? And sort of this experiment, he did several versions of it, and you can sort of – but his – the overall result was, yes, it was. And when these letters – for those letters that did reach their destination, and he found that it was only about six steps on average that they took to go from these farmers out in Omaha, Nebraska, to the stockbroker in Boston. And this – if anyone's heard the term six degrees of separation, the sort of – the idea that there's – there's six steps between anybody in the world, it comes from this – this experiment that he did and the publicity that it got. So nowadays, we don't really need to do these sort of experiments in order to do similar things. So I have this example. I just went on one of these social network sites where people go put in all their stuff. In this case, it was Google's One Orchid. And just to get a similar path there by a little bit of experimentation, I got a little bit of help from the site. So I just picked a random person. And – and I thought, well, what if she wanted to find a path to some other random person? It – it could happen. Right? And – and well, so it turns out that – that in six steps, this Miss Fernanda Trincado here, who – I should say that I've – I – I made this example a while ago. And I've used it quite a number of times in talks now. And I – I actually did pick her. I don't know who she is. So I'm always thinking, like, someday I'm going to do this. And – and somebody's going to be, hey, I know her. And I'll get in trouble. But then I'll also have confirmed that it is a small world, right? So – so Fernanda Trincado, she knows this gentleman named Leandro Toledo, apparently, who knows Marcelo Toledo, who – I guess they're related brothers or something by – and he happens to know Nat Friedman, who some people in this room may have heard of, because, of course, he's a free software programmer, one of the GNOME guys, I think. And Nat Friedman knows Roger Dingledine, who many of you should have heard of, especially if – and you should have gone to his talk yesterday. So this is somebody who I know. So there we have our six steps between Miss Fernanda and me. Yeah, you're right, it's five steps. But it – that's less than six steps. It's actually – not knowing how to count is a basic property that you need if you want to be a mathematician. Okay. So I wanted to note that, as I said before – I didn't show it to you, but I will – the simple types of graphs that we were talking about before, these GMP, where we just take it to every edge and we flip it on or off, they have a low diameter. They really have this property that going from – as long as there is a path between the two points, it tends to be short. But we noted that they are not a good model for social networks for any number of reasons. The degree distribution, the triangle, stuff like that. And in particular, one can see this in a very interesting property of this Milgram experiment, which is even though these networks have a low diameter, it isn't possible to search in them. And I'll try to show you what I mean by this. If we look at this, I went back now to this standard, simple GMP, where we just have every edge on or off with some probability. It's the same graph I had in the beginning. And if we want to find out the diameter, then – well, a lot of people here have done some computer science, so they know that there are these breadth-first algorithms for finding the shortest path. So I went and I did that here, and you can see in red the shortest path between these two points. And it turns out to be three steps between the top corner and the bottom corner. And what I've highlighted here – what I've highlighted in green and blue here are all the edges we had to look down in order to run this algorithm. So I did a breadth-first search. I looked at all the neighbors of the first point, all their neighbors, all their neighbors' neighbors, until I found the endpoint. And that's when I knew that I'd found the minimum path between them. The smallest path between these two points is three steps, because I checked all the ones that are within two steps, and I know that none of those was this node that we were looking for. So while I was able to find this very short path – so this random network does have this sort of short path. It is a small world in some sense. We had to do a lot of work. We had to look through the whole network to do it. And if you think about this experiment with these people in – if you think about this experiment with the people in Omaha who were sending their letters and trying to get them to this guy in Boston, and their friends and their friends, they obviously – they didn't have access to doing this type of analysis, of looking at the whole world's social network. There weren't social networking sites back then. So they couldn't look and see. They only had to go by sort of, which one of my friends do I think is most likely to sort of be in the right direction of this stockbroker who should get it? So if you try to do it that way, it becomes something more like this in this type of network. Here we're trying just to forward, and he's trying to forward the whole time until he finds his destination. And as you can see, the path that we found was not as great as those three steps that we had. In fact, they had to forward around for 54 steps before it reached the destination here. And the reason for this comes back to this independence of edges that we had, which is to say that every edge in this thing existed like a coin flip. Where I drew them on the screen is just for visualization. It had nothing to do with how connected they are. So if you think about it, there is no point in passing the message towards the person because in a graph like that, being close to somebody doesn't mean that you're more likely to know them. And I think it's important to note the difference between their existing path and being able to find one. And if we look at this example again, I think you can sort of see it here. So say that Fernanda did want to send a letter to me. She knew a little bit about me. She knows I'm from Sweden. I do computer stuff and I do networks and stuff. Maybe this, I don't know, maybe this Leander Toledo is somebody who works a bit with computers. Or maybe she knows that his brother Marcelo does work with computers. So she thinks, okay, I'll give it to him. Marcelo knows that he knows Nat Friedman who is a free software programmer. So he thinks, okay, that kind of makes sense. And then Nat Friedman might, if he knew that I worked on Freenet and Anonymity and stuff like that, think that Roger is a good person to give it to and Roger would give it to me. So that kind of works. But now let's say I wanted to send a letter to Fernanda. And Roger's a good guy, but he's not the person I would send a letter to I would expect to get to a hot Brazilian girl. So there really is a difference between having this path and me being able to find it if I wanted to get this letter to her. So what it turns out is that for this sort of searching to be, in an idealized model, for this kind of searching to be possible, we have to, we need to be able to go from, sort of the probability that we have this edge between, that we have this line between two of the points, an edge between two of the vertices, has to depend on the distance between them in the sense that if I am close to somebody, I have to be more likely to know them. Otherwise it doesn't make any sense to send the letter to somebody who's close to the destination in some sense. And one can sort of see this as saying that the probability of each edge existing is proportional, and by proportional I mean we can multiply it by some constant, but in terms of the distance, it depends on one over the distance raised to some value. So in some sense, if this alpha value here is big, that means that it decreases very fast. It's very unlikely that I'll know somebody who's far away, because if somebody's a hundred steps away, and this is three, then there would be a million, then there would be a million, I got that right this time, to one over a million that I know them, which is very unlikely. If this is small, then I would be more likely to know people who are far away. So this alpha here kind of tunes the locality of the graph. How likely is it that I know somebody who's far away? How much does it depend on the distance is given by this, what we raise the distance to when we take this proportionality. And if you do this, you can sort of say that we can formalize the routing algorithm we're going to use if you think about these simulations, and we simply use what's called greedy routing, which is I look at my neighbors and I say, well, who's closest to the destination where I want this message to end up? That's who I'm going to send it to. So if you said that sort of the people in the Milgram experiment hadn't known anything about the destination except where he lived, it might make sense to do geographically greedy routing. Well, I know that he lives in Boston. I'll just say, I'll send it to whoever I know who lives closest to Boston. And that's the sort of model that you're looking for. And this is a... So these sort of questions and the math around them were first done by John Kleinberg, who's a computer scientist at Cornell. And he figured out something very interesting, which is that there's really only one case of this value alpha here, this value alpha which tunes how much people, how much the probability that you know somebody should depend on the distance. It's only allowed to depend, it's only one case where you actually have the right situation to be able to find these quick paths. And it has to be that this alpha is equal to the dimension of the world that the people live in. Or another way of putting this is that the probability that X should have this way of, this edge, so here I used a slightly different method for edge, but what I mean is that there should be this edge between X and W has to be proportional to the number of vertices that are between, that are closer to X than W is. So if you think about it, it's rather easy to see that this will be two in two dimensions and three in three dimensions, etc. The power there, because... So we can do that sort of picture, which is instead of taking this graph, we now redraw it. And instead of looking at the degree distribution as we had before, we look at the link distribution. Which is... So before I drew this histogram, which was how many friends each vertex has, here this is the distance to their friends on average. And you can see that in this thing, we have this sort of spread out look. And it doesn't decrease very fast. The probability that you know somebody doesn't decrease fast with the distance between you. If we remake the graph according to this distribution where it does decrease with the distance between you, so that you're more likely to know people who are close to you, and less likely to know people who are far away from you, then you get a link distribution which has this sort of smooth tail like that, sort of tapers off like this one does. And you get something where instead of jumping around for 50 steps like we did before, using just this very plain greedy routing, where I'm just saying, okay, look at all his neighbors, those are the ones in green, who is closest to the destination? Okay, we make him red and we go there. Then we look at all of his neighbors, they're also green, and take the closest. And we got there in five steps. So what you really need is four to have this connection between how far nodes are from each other and how they know each other. And we can do this many times to see what the average number of steps it would take in this graph is. And it turns out that it's 4.1. So you can search very fast. Okay, this is a small graph. It only has 200 vertices in it. But it turns out that this works very well however large you make the graph. It scales logarithmically for those of you who are polylogarithmically. Okay, so now after 33 minutes, we're done with the background. And I was going to talk a little bit about what I do. If we're unlucky with the time, you might not get the proof. So that would be very unfortunate. So the interesting thing about this result, if you think about it, if you think about the result of Kleinberg, is that it's mostly negative in the sense that what he said was that there's only, you need to have a very, very specific relation between the distance between two people and the probability that they know each other for searching to work. So it's rather curious because one wants to apply this to say the Milgram experiment and say, oh, you can search in the real world social network, but yet we know that it needs to have a very, very specific properties for this to be true. And it seems those two things are kind of difficult to, because, I mean, the search network forms somewhat chaotically. There has to be some dynamic then which causes this to happen. And that's sort of the question which I'm going to try to answer. And what we're going to try to do is, if you think about this model, the preferential attachment where people were coming in, and we could kind of explain via a dynamic why some people got more friends than others. We tried to do something similar to see why people tend to know people who are close and who are far with exactly this proportion so that it tapers off with the right value so that searching is possible. Okay, so here comes some math now. So those of you who are so inclined can fall asleep for a while. If you take the numbers 1 to up to n, and then we sort them in a random order. So say we had the cards in a deck. Actually, I bought a deck of cards to illustrate this, but then I got drunk last night and I lost them. It's fine. We have a gambler in the house. Or as we call it, applied probability theory. How I fund my trips to Vegas. Field studies. So if I take these and I say, what is the probability that the case number that I draw is the biggest one yet? So what I mean by this is, you have this random ordering of the numbers, and you take out the first one and you say, well, what's the probability that that's the biggest one yet? Well, duh. I mean, it's the first one, so of course it's the biggest one yet. So for the first one, that probability is 1. I draw the second one. What is the probability that the second one I draw is the biggest one yet? Can anyone guess what that is? Half. Half, yeah. Because if it's bigger than the first, those two could have come in either order equally likely. Since we had things shuffled in a random order, it's equally likely that the first one is bigger than the second. And same thing, if you look at the third, so this is sort of a more formal description, but if you look at the third one, then we have those three, and those could have been in any order with the same probability. So the probability that the third one is the biggest of the three that we have drawn so far is 1 third, and the fourth one is 1 fourth. So the general answer is that this probably is like 1 over k. So when I come to draw my tenth one, the probability that that's a new record is going to be 1 tenth. When I draw the hundredth, the probability that that's a record is going to be 1 hundredth. And this 1 over k here is interesting because it's similar to this thing we had before where we wanted to have 1 over the number of vertices that are closer than the new one that you come to. So from this one can directly sort of have a model for how a network forms that will lead to these edges, namely like this. We say that each vertex, and you can sort of think of it as a person, has for every single person in the world, they have some level of interest. So for all of you people out there, I don't know what it is, but for all of you have some level of interest to me. Some of you are not interesting to me at all, sorry. Some of you might be very, very interesting if we just started talking. And one person here is the most interesting person in the room for me. So what you can say, you can create a connection between two vertices if it turns out that the second one, v, is more interesting to you than anyone that is closer to him. That is to say, a person would be friends with someone if they're more interesting than anyone that they have met previously. And if you think about the relationship between this, the probability of knowing somebody should be 1 over the number of people that are closer, and the probability that setting a new record is going to be 1 over the probability of the number you have seen, you see that you get the right dynamic from this. So, I mean, a way to think about this is, I go into the world, I'm born, I have no friends at all, so I go into the world, first person I meet, I become friends with. Person who lived closest to me is the first person I meet. Then I go on and I meet more people, and I will make friends with each new one which is more interesting than people I had met before. And if you do this, then you will get exactly this probability that an edge between two vertices is 1 over. And here we'll create more than one edge coming out of each vertex, but it will be about log n, which is sort of the order we're looking for. And one can do the same argument. So, I was going to actually prove that if we create a graph like this, then we can, then you can easily see that you can find paths that are log n in length from one point to another. And because this is a talk in mathematics, you want to have one proof in there. My advisor likes to tell me that a talk in mathematics should contain one joke and one proof, and they should not be the same thing. So, hopefully, I'm not actually going to go through the proof. Anyone who's interested can, there are more, yeah? What you're saying is there's six degrees of separation between all of us, and we all know someone who knows someone who knows someone who knows their, some of their body. Well, I'm not going to make that sort of categorical statement about the six degrees of separation. The point is, if you look at the World Social Network, then on average, the number of steps between people is very low. And it's not that strange a thing to expect. Can we say for sure that there isn't somebody who's seven steps from somebody else? Of course not. But on average, it will be very small. And people have done, since Milgram, since they're 60, people have done more experiments of this kind to try to get an actual number. And I don't know how worthwhile it is. The point is, it's small. I can promise you that there's nobody within 15, say, further than 15. That I feel quite comfortable promising. But the point is that the model that I'm going to make is actually not the one I was telling you about. Because a better way to think about this, rather than think about each person sort of having this interest in others, is to think about the world and think about this. In the real world, we live close to people. And that makes us similar. But we also are similar in other ways. We have similarity both in sort of where we live and who are close to us, but also in other ways. For example, here at DEF CON, we all live all across the world. But because we're similar in our interests, we come together. So one way of modeling this interest that we have, between people, is to say that we place everyone somehow in the space that represents their interests in their life. And then how interesting somebody is to you is how far apart they are in that space. So if you put that into sort of the construction I said before, then what you say is that I will know somebody if they are closer in the space of interests than anyone is in the real world space, to me. And this creates this double cluster, this clustering graph, which I'm going to illustrate for you now with the simulator. So this is the reason why we had the colors. Unfortunately, the contrast isn't great, but maybe you can see a little bit there. In the middle, I started out with a guy. And what I've done now is each vertex, the reason I had them colored from the beginning is that aside from assigning a random position to everybody, I've also assigned a random color, which shows sort of what they are interested in. And what they want to do, is then find the... He goes out into the world. So purple is right there in the middle. And he starts searching outwards. And the first person he runs into is this reddish node that is a little bit above him. That's the one that's the very closest to him. Because that's the first one he runs into, it's the most interesting one, the one that's closest to him in color that he's met so far. So we create an edge between them. He goes a little bit further. He finds one that's sort of bluish. And that's closer to purple. I'm using RGB colors and Euclidean distance, if anybody cares. So this bluish one is a little bit closer. So he'll add an edge to that. He goes out and he finds... Well, there's one yellowish guy there who was not closer than the bluish guy. So he's not going to become friends with him, because he's not more interesting than somebody he already knows. But there is a guy there who is the... who turns out to be also bluish and is a little bit closer still. And after a while he finds someone who's very close to him, even closer. And now he really isn't making friends with anyone anymore because he's met so similar people, until eventually he meets this person who's the very closest to him in color of everyone in the whole graph. And that creates his longest edge there. And this is going to run now for all the vertices. And you can see this link distribution being created by this thing here. As each one of them finds these friends who are similar to them, and this link distribution that you're going to see being created it speeds up after a while so I won't have to wait for the whole thing is going to represent what we are looking for. There we go. And you can see that this link distance already looks like what we wanted in the sense that most edges are rather short. Most people... Because when you first go into the world you're making friends with a lot of people because you don't have that many people to compare to. But as they're further away, then... And so, I mean, one can say as a model for how the real world might work of course, anything like this is going to be idealized. You don't go into the world, you don't meet everyone, you don't make friends with anyone, you don't have strict criteria on distance. But what you could say is in order to keep a relationship with someone, or to stay friends with somebody, they need to be somehow more interesting to you than somebody who is more accessible. Because if somebody who is more interesting is more accessible, then probably you will lose interest in the people who are farther away and less accessible to you. So... And now that we're done with this construction, everyone got their edges, we can try this sort of searching again and it turns out that it works fine. And one of the interesting things that isn't completely obvious with this construction is that, in fact, this... The construction is completely symmetrical. So the role of the positions that you see on the screen in the space and the colors are the same. So if you look at blue and red here, instead of taking the top corner and the bottom corner, what I've done is I've taken the bluest vertex and the reddest vertex, and they happen to live very close to one another, but they're very different because one of them is only interested in blue things and one of them is only interested in red things. But we can do the same thing and search using... Instead of going greedy in space, as I'm trying to find the neighbor who was closest to the bottom, I say, well, blue starts and he looks at his reddest friend, and that would look for his reddest friend all the way... until... And it turns out, because this definition is symmetric, it's searchable in this way, too. So you can do it either by looking for the person who lives closest or the person who's most... And that's a sort of interesting property because when the psychologists went in these Milgram experiments and they asked people, well, what were you doing? How did you decide what to send the letter? But some portion of them said, well, I was just looking for somebody who lived close, and about some of them said, well, I was looking for someone who was professionally close to the destination. That seems to be sort of what people... the reasoning that people are using, that sort of thing. Okay. So... This is then the mathematical definition of this thing that you don't all need to worry about. So just to conclude, it's really just sort of a couple of examples of how one can do these simple probabilistic models, and they give very interesting examples of complicated structures and patterns and properties that emerge in these networks. Okay. And I haven't gone into it this time, sort of what the applications of these things are. If you wanted, you could have gone to our talk two years ago at DEF CON, and then you would have heard about applications. It might be a little too late to tip off on that. So anyways, there are plenty of sort of interesting applications, both sort of how should we build networks like peer-to-peer networks, et cetera, and also how should we... to try to analyze things like social networks, how they exist from these sort of models. And it involves interesting mathematics that, unfortunately, I would have had to have a blackboard in a couple of hours to do for you. So, okay. I think that's... Except for questions, it's going to be... You had your hand up first, so... I'm not sure what you mean by that. There's lots of conditioning in this, because you don't have independence of edges in these networks, so they become difficult to analyze, because when you condition on things, things change completely. So there is a lot of conditioning, but... Yeah. The software that you've been using for all the graphs... Yeah. ...is that available? I keep meaning to put the source code up, yeah. As soon as I do it, it will be GPLed. Yeah. So more your research is worth instead of cost more efficient, depending on the product? So more... The point with this particular piece that I was talking about in the end is really just to see, is there a simple natural property which can sort of explain why these dynamics might approach? It's not really, can we do this in a quick way? There are other ways of building these networks in good ways, and I could have talked about that as well, but this is more like a very simple idea that tends to lead to the right dynamics. I can't hear you. There are plenty of applications, but it's not really my department, so I'm not going to speculate on that. Okay. Maybe we'll do the breakout if there are more questions, so...