 Okay, so let's get started. Just so that things are completely clear. I'm sorry for those who actually know this by heart. But let's imagine we are all new. This is a new model. Nobody has ever looked at it before. It is Friday afternoon. We have a great idea. And we want to do a simulation. Or now you don't want to do a simulation. We want to sample the probability distribution, which is the partition function of this new model. This new model has a z equals to sum over all spin configurations e to the minus beta e of sigma. So it's a new model. We don't know whether anybody has ever looked at it before. And we set up our first algorithm. This first algorithm will be Markov easing dot pi. So what we do is we pick, it's on the three by three letters. We take one spin. This spin is equal k, we take it randomly. Just so that we all, so we take a random spin. We take a random spin and the move we do is we try to flip it. Now we compute pi b and pi a. Now detail balance tells us that the probability pi a times the probability to go from a to b must be equal to pi b times the probability from b to a. So pi b is e to the minus beta energy of b. Pi a is this. And this makes that we have probability from a to b divided by probability from b to a must be equal to this if we satisfy detail balance, of course. And this is implemented through p from a to b equals to minimum of one e to the minus beta eb minus ea. So then, so this is just to answer to, again, it's your question, but it's probably all the question of other people. Then no other questions have to be asked. Then, as one question left, come on. Thank you. Exactly. So what is the correlation time of this algorithm? So we also have to check that it's a periodic and so on and so on, but this is just a detail. We just have to check, we just have to make, we have to find out on what time scale it converges from this initial choice. You see the initial choice is this. This is the initial choice, that this means that at time zero we have a random distribution. So this means pi, so we have the probability at time t equals to zero is random. And now it is the question on which time scale do we convert towards t infinity, a pi infinity which is the probability distribution, the Boltzmann distribution. Pi equals to pi infinity. So on what is the time scale? But besides this, we are completely clean. There's no question that has to be asked. We know that we will convert and there's not a single thing that we have to know. There's no mystery. We have to ask our thesis advisor, well, this is okay. We know it, right? Because we've proven it ourselves. All right? So then I had this discussion a little bit. So see here. Here we are at high temperature. We have little areas, right? Here we have like 15 spins that are up. Here we have 20 spins that are down. A few spins that are up. And now what we have to do is we'll take a random walk in some walk in configuration space and we have to sample configurations. Just like in this case of the Gaussian distribution that we had before. Sometimes we have to find a configuration that was up. We had a cloud. The distribution was something like this. Sometimes we have to find this here. We have to sample here. We have to sample here. And we have to sample here. So that's what I mean. We have to find samples, but not all the same. So what it means is sometimes we have to have a sample that is all minus here, but then there will be a sample that has the same energy, the same right to be here, where this will be plus. But flipping this 15 or three or four spins will be easy with this algorithm where we take one by one. It will be easy. So this algorithm will be fine at high temperature. The algorithm Markov-Easing, if we had more time, we should program it. Let me find a nice little... Okay, now I plug. So for configurations like... So let me look at this one. Anyway, so there are some configurations. So the configurations around T for T, around the critical temperature. We have these big blobs. So for large systems, this would be one million or 10 million more or less up spins. They are not all up spins, but 10 million spins that are more or less up. This is the... It's like this that this configuration look at the critical time. Then you have 150 million spins that are more down. So I'm just telling you. And now you have the same problem that we had before with this, with the Gaussian. You have to sample here and here and here and here. So you should go from these where everybody is up. 150 million particles are up. Understand what I'm telling you? The sampling means you have to get the representatives but different representatives. They should not all look exactly like this with just a few spins flipped. And that is where the Markov easing... Markov easing.pi that is a fantastic little algorithm but it has a problem there. So now we had discussed the first idea and now we go into seriously into our business here. Seriously. Now I want to show you that we can satisfy... Here we are in detailed balance. We can satisfy detailed balance. Okay. For any value of p. Now, let me put this away. I'll come over. Okay, now the way we go is now... But let's run the algorithm. Let's run the algorithm. I accept this with p. Then I accept this with p, with p, with p. This one I have rejected. Maybe. This one I have rejected. I think a system with two screens makes no sense. I mean, just think of it. I mean, this is just a parenthesis. A system with two screens with independent screens that would be useful. But a system with two screens, in my opinion, makes no sense. Maybe I will have to leave your answer on it. I mean, I'm not a Schrodinger cat. I'm not Schrodinger's cat. So now... So now I'm like this, like this, like this. Okay, so this is... I have not yet accepted this move. It's just the move that I propose. Okay. Now, what I'm saying is I'm a little bit confused of what my problem is. So now you have some... So this is the cluster. Let's call this a cluster. And I want to flip it. But now I have to see that there's a principle of life. It means that I have some connections to negative... There are plus-minus here. So we have to count them. Could we count them? One, two, three, four. So it's a number. I think it's either 14 or 18. So the plus-minus, we'll go through this. We'll spend half an hour on this. So I think the plus-minus links are, I think it's 18. Maybe somebody can take it over here or over there. I think one, two, three, four, 18. Do you agree with it? So we have 18 links plus-minus. But we stopped there because we always... It was in our... We had the idea over beers yesterday. We decided only to have a cluster with plus-and-plus-and-plus because this is what we thought was more interesting. And we have the full right to build this cluster. But now we have also plus-plus-links. Plus-plus-links. So we stopped here because we have this plus-plus-links. And I think there are 14 of them. So now the cluster construction stopped here. That's what I tell you. This was when the cluster was stopped. So why did it stop here? Well, it stopped here because we had 14 chances of growing it. Because we would have accepted this one with probability P. Following me? Right? So we have... So we rejected this move. We accept each neighbor with probability P. But this one we did not accept. So there is somewhere at the end of our argument there will be a 1 minus P to the power of 14 in our argument. You agree with that? You understand? Build a cluster. I take... You know, you can build a cluster. You take a neighbor, and this neighbor you take him or her with probability P. At some point the cluster construction is over. Over. So now why did you stop there? Well, because there are some links across the boundary of the cluster. And those you did not take. And each of them was independent. So you accepted each of everybody with probability P. You rejected each of these links with probability 1 minus P. So because 14 times you rejected it, there somewhere must be, at the end of the day, there will be 1 minus P to the 14. I'll show you in just a minute. So something has to happen here. So now I also have to see the... But let's do it later. We'll have to do the return move, and we'll do this later. We'll go through it twice, I think. So here we have it. Okay. Now, I don't know what I wrote on my slide. But now let me use the detailed balance condition. The detailed balance condition says Pi of A times the probability to move from A to B must be Pi of B, P from B to A. So that is a real rule. But now we say that this one here, according to Metropolis and Hastings, is the probability of Pi of A. You understand? This is the Boltzmann distribution, not the Boltzmann weight. Pi of A times the A priori probability to go from A to B times the acceptance probability from A to B must be Pi of B times A B to A times probability acceptance from B to A. So everything in this equation is known except of... What is not known for us now? What do we have to compute? Is the Boltzmann weight unknown? No. This is the configuration A, excuse me. This is the Boltzmann... This is the configuration A. This is configuration A, and configuration B is the same configuration with the gray pluses down to minus. So is the Boltzmann distribution Pi of A is this known? Yes, right? It's the e to the minus beta energy. So is the... So the A priori probability to go from A to B is the probability to construct this cluster. So the probability to construct this cluster has a few... So there's a probability... There must be a fact of Pi here and the Pi here and the Pi here and the Pi here and the Pi here and the Pi here and so on. There must be a number of Pi's, but then it's really unfortunate that these same Pi's also appear in the configuration B. So this is configuration B. I should write it down here. This is configuration B and now I have to compute the probability to go from A to B and the probability from B to A. So some parts... So the cluster is plus and then there are some pluses here and some minus. This is configuration A and configuration B... And configuration B is this cluster here with little hole is minus and this plus, plus, plus and minus. This is configuration B. So now the cluster construction probability has some terms that are internal between the spin that is up and the spin that is up here. But you notice that this thing is the same as the probability if we have minus and minus. So what happens inside the cluster is not really interesting. It's not really important. But what is interesting is in the cluster construction probability is also the cluster... the end of the cluster construction. So why did we stop here at this configuration? So why did we stop here? Well, we stopped here with probability 1 minus P to the... what was it, 14 or 18? 14 I think. And here from B to A we stopped... we would have stopped because now we have not 14 links minus minus. We stopped this cluster construction because we have 1, 2, 3, backtrack and those will be 18. So we have this probability from A... the A power of B to A will be 1 minus P to the power of 18. All right. So this means... is this clear? Is this clear? Very, very easy. Very, very easy. You know, there's no... and then there's some chunk... let's say... there's some chunk that is internal and there's the same chunk that is internal. Okay, so we have inside... the probability to add a new link minus minus in the cluster that is minus and minus is exactly the same as the probability to add a new link plus plus in the cluster plus plus that unfortunately I have to take. So this thing here is the same as this here. So, you know, I can just... I can just take it out. Okay? All right, so we have finished. Time flies. No, time doesn't fly. So it's exactly contrary. So, but we'll tell other stories later. So we already know that P from A to B divided by P from B to A is equal to pi B divided by pi A times 1 minus P to the power of 18 divided by 1 minus P to the power of 14. So now, what remains is to compute pi B divided by pi A. Pi B is e to the minus beta energy of B and pi A is e to the minus beta energy of A. All right? So now... So now you see this is configuration A and we have to compute its energy. So we should compute what is the energy here. But, you know, it's kind of a little silly because now this is B, this configuration B. Next time I give this talk and put an enormous B here. It will be so great. Okay? So, but this one is the same as this one. So I don't have to take this into account. Then there's this energy. See this here? Two upspins. But this has the same energy as two downspins. So this does not play a role at... Okay? This does not play a role at all because I have to... I have to look at the audience. Oh, excuse me. All right? So this does not play a role. Okay? So the only thing that plays a role is the energy across the boundary. So what is the energy across the boundary? Can you help me again? So here we had class minus was 18, right? In configuration A and plus plus were 14. So the energy across the boundary about the boundary of the cluster is 18 times what is the energy of plus minus? It's minus one or plus one? Plus one. Thank you. And minus 14. And in configuration B how many plus minus links do we have? How many plus minus links do we have in configuration B? No, don't count. I'm just... 14. 14. Thank you. 14. And how many plus plus links do we have? Zero. Because we have no plus plus. How many minus minus links do we have? 18. So in A energy across the boundary is this and energy in B across the boundary is 14 minus 18. So now I have to look into my notes because one of the numbers... so energy is n1 minus n2 so this is... let's call this n1 and this call is n2 and then this is n2 and this is n1. All right. So now we are already finished. Already finished because now we have P A to B divided by P from B to A is equal to pi B is e to the minus beta the energy but only the energy across the boundary n2 minus n1 divided by 1 minus P to the power of 14 with n2 times 1 minus P to the n1 divided by e to the minus beta n1 minus n2. So how do we program this algorithm now? So we are finished. So I'm here. I'm finished. So how do we program this algorithm? If we have this equation this equation P A to B divided by P does anybody check the algebra? I mean just... algebra is a little big word for you know consistently putting the n1 instead of 18 and n2 instead of 14. So this is then metropolis algorithm means that P from A to B is what? Minimum, excuse me, thank you. This is where you see you have been successful and you're corrected. Minimum of what? 1 This whole story here, right? Let's do it later. All right? So now this is a number. So you see n1 is 18 n2 is 14 in this cluster construction. So beta is a number. n1 is a number. n2 is a number. As I finished my cluster construction I ended up I can look at how many n1s how many plus plus and how many plus minus I do have. And this number for the choice of beta is 156367. It's a number. It's not a function. It's a number. You following? It's a number. For any beta, beta is a number and this is a number. And then I have to accept this move is probably 0.1563678 and I have to reject it otherwise. And this number depends on P. See? So I told you that I would be able to find an algorithm that was valid for any value of P. And this is it. Except for P going to 1 I think this kind of... for P going to 1 I have a problem and that was my trivial algorithm that was soldering the spins together and this is just it. This is the acceptance. This is the acceptance. This is the acceptance. Yes. This is the... So this is the little P. This is the acceptance probability for the move that had a biased construction. So it has a biased construction to this A. So we are fully in the... we are fully in the... you know, in the bias. So the way we went from A to B is completely biased that we are taking the bias away. All right? So now... now let's do a little simplification. All right? You see, let's do all the N2's on one side and all the N1's on the other side. So here we have a e to the minus beta N2 and here we have an N to the plus beta N2. You see this beta N2. This makes e to the minus 2 beta N2 divided by 1 minus p to the N2 and then multiplied by 1 minus p to the N1 and this gives here e to the minus 2 beta N1. And this is nothing else, nothing different. This is equal to minimum of 1 e to the minus 2 beta divided by 1 minus p to the N2 1 minus p divided by e to the minus 2 beta to the N1. This is the same number 0.153367. So I didn't change anything. But now a miracle comes out. Miracle. Miraculoso. Completely miraculous is wunderbar. So completely wunderbar is that e to the minus 2 beta is equal to 1 minus p then this number is 1. So the magic value and this is what you should do in your thesis or postdoc work you know, be the first on a new subject and find the magic value if e to the minus 2 beta is 1 minus p or even better if p is equal to 1 minus e to the minus 2 beta then the acceptance probability again it exists. The algorithm of course functions for all p's but it is at its best value. So p is equal to 1 minus e to the minus 2 beta is the magic value. OK. I don't expect any questions on this derivation because it's so easy that everybody has understood it. Right? I mean is there any question one could be tempted to ask? OK. Who say, I don't know I don't know anything about critical temperatures. Yes, it is true. Of course. Yes. It will turn out that this is the percolation threshold at the critical point for the percolation problem that corresponds to this problem but this algorithm but the reason why I did not bring this up is because I got interested in this subject I was a few years younger and somebody was doing a thesis on this algorithm and he thought because it's common knowledge that this algorithm only works at any temperature and it's completely bullshit I mean I did not talk about this algorithm works at any temperature for any beta you choose 1 minus p p equals 1 minus e to the minus 2 beta you need really good good eyes to wow I really admire you I mean you should get a job with Lufthansa I mean if you can I know why your physicist if you are sitting so so far back and can still see things you should work with Lufthansa in addition they are always on strike so you don't have to work at all so anyway so this is p equals 1 minus 2 so I give a little bit short-handed answer but this algorithm works at all temperatures and now the question is what is the size of the clusters that the cluster sizes will be exactly at the percolation it will be percolating at the critical temperature so is there any other question just on the algorithm I don't expect any yes that is the only question that is really good I mean you got this I drew these pictures here see this guy here but you cannot you are not a Lufthansa pilot here so this is exactly for you I tried to get this one with p from this one with p from this one and with p from this one but once it's over it's over I ask once it's like not with dating but it's a little bit like this each one asks the other one once and if there is rejection from somebody else so it's a link it's on the edges anything else okay so we can all program this algorithm and sure enough okay so here again I thought I would need help but it's okay so it's the same but I just had so this is the algorithm the voice cluster algorithm alright this is the algorithm it's complete 14 lines I start oh yeah let me show you so now it would be really interesting to have a asynchronous system of presentation things here so anyway so I started here so now what I do okay let me go here excuse me so now what I'm doing is the following I'm using an idea that comes from a paper that I wrote with water and we call it the pocket algorithm and the thing is the following when we have we have a cluster so we are constructing the cluster there are some spins that have already been there for a long time and some spins that are newly inside the cluster you know what I mean I just added them I'm constructing this thing here so at each time there are some that just came in and they have not been checked on whether they wanted to have themselves new neighbors you get this idea and those that are kind of old folks they have been in the cluster for a while and I don't have to check again whether their neighbors want to be I already checked all the neighbors of the old folks okay you get this idea back there so now the new ones these new ones new spins in the cluster we call them the pocket it's like my right hand pocket I explain this in the algorithm here it is so now I take a random spin that is how I construct the cluster and initially I say the pocket is just that spin and the cluster is also just that spin alright following? because I just have one spin and that is the case so now I'm saying while the pocket is not empty I take one guy out of the pocket I check all its neighbors I check whether the neighbors have the same spin and they are not yet in the cluster and if they are the same spin and they're not yet in the cluster then I throw a random number between 0 and 1 check whether it's smaller than p and I add this new one into the pocket and add it to the cluster and then once I'm done with checking all its neighbors I take it out of the pocket because now it's an old fork it's an old guy alright and when the cluster is empty the construction is over I flip the cluster I flip the spins and that is the wealth cluster algorithm a loop in your eye effect where you touch the cluster again and there was one bone which was already not accepted and you are there again from the other side oh that is just no but that cannot happen because yes of course this is a counted two but I can tell you exactly how it is because it's the new spin see I take I put this in the pocket all the new spins I put them in the pocket I said they are not processed yet the new spins but each spin gets only taken once out of the pocket I take it out of the pocket I check all its neighbors so this link, this link and this link I take away the neighbors that are already in the cluster and then I have fresh links outside of the cluster and those I check but then this guy of which I'm checking the neighbors gets thrown out of the pocket so it will not come in again we can do it again but this is the 12 line wealth cluster algorithm and I think this is something that everybody should have thought about so there is no need to have this very complicated normally this is almost like poetry I find I mean I've written these programs also in 4277 they look a little different but I mean this is like it and this is the algorithm and I'm just saying here's the cluster here are the new guys here are the new guys these are the pocket they are inside the cluster but they call them the pocket side so now the algorithm is take this out take this pocket side check all its neighbors don't check those that are already in the cluster okay and then maybe add them don't add them but then take this out of the pocket and this becomes an old side okay and then this one will be in the pocket if I accept it so this again 15 line of code and it's very useful so now let me show you a movie excuse me no I don't have to thanks for the question I have another version of where I do it was an exam question last year but it's were you in Paris? no welcome anyway so that was the exam question I mean it's never a big question so the question is can we replace the random choice random choice of the pocket means I have a pocket full of sides that I have to check do I have to take a random choice or can I take just anyone so we proposed I replace this line by pop one out of the pocket and of course this algorithm is also acceptable it's the same it's a different algorithm but it's also it's too thankful question other inside this gets you have to think hard anyway so okay so that is the algorithm you know subliminal message you know there's no point in hiding these structures in 1500 thousand line codes I mean the idea is here so this again I said this is the algorithm of Uli Wolf from 1989 complete revolution one of the I would say together with the original works on molecular dynamics and on Monte Carlo this is like this is what kind of pulled off the whole revolution I can tell you there were lots of people around the question was not really for the easing model because it was already half so the question was how to use it for the XY model where this is a good idea to do and there were lots of people who almost got the good idea so I just encourage you to have a good idea almost half baked idea go through and find it find the answer and you won't be you'll be a man so now okay so now I have a movie I have a friend in Hollywood who runs them so this is the at the critical point one iteration after the other the clusters that I construct I'm colorblind so I cannot really see them very well but blue I think are the ups red are the downs and there is some kind of strange color that gives the cluster so sometimes this runs so at the critical point that was your question at the critical point sometimes you have small clusters here it was a very small cluster sometimes you have very large clusters they percolate and they have a finite proportion so in one time step you flip of the order of half of the system or one quarter of the system so this construction is extremely successful okay you see what I'm doing so I start the cluster it is actually that program or the graphics version of that program that is used and that is you can you can be sure that it is correct alright so let's marvel at this beautiful so this means that at each time step half of the system or of the order of N but sometimes very few but sometimes very many spins flip and of course this algorithm has a mixing time a correlation time which is almost independent of system size okay so this is at the critical point above the critical point the clusters are much smaller or get smaller below the critical point the clusters are the majority of the system and they only leave less than of the order of N for the best okay now I have so this finishes what I wanted to explain on the Wolff cluster algorithm again there is just metropolis hastings the only concept that you have to understand is metropolis hastings and the basic concept that any algorithm that you make P is the algorithm can be combined with the a priori probability to satisfy detailed or global balance in this case detailed balance so now in the last two hours I want to discuss another version of algorithms which are the heat bath algorithms so let's just before going into the heat bath algorithm let's just remind us what the metropolis algorithm meant the naive metropolis algorithm remember we had it for hot spheres and we had it for spin systems the naive metropolis algorithm meant that you have a probability pi of a I think everybody now understands that this is the Boltzmann distribution but Boltzmann wait for a times the a priori probability times the accepted probability is pi of b so this equation it's getting outdated because the global balance algorithms are coming up and you will see you know it would be just fantastic but the local algorithms was that the probability to move the spin from here to here was the same as the probability to move the spin excuse me the probability to move the disk from here to here to propose the move was the same as the probability to overdose the move from here to here in the local spin algorithm easing algorithm easing the probability to flip like this was the same the probability to flip like this to propose this move so in the metropolis algorithm do you understand what I mean So the proposal from here to here is the same as the proposal from here to here. The probability to move by one centimeter to the right is the same as the probability to move by one centimeter to the left. That is the DNA of the Metropolis algorithm. That is the DNA. So then the a priori probability is the same. And you can cut it off and you end up with pi of a to the formula that we all know. You cut this off and then you get back to the formula without the a priori probability. So that is the DNA of the Metropolis algorithm. Now the DNA of the heat bath algorithm is the opposite. In the heat bath algorithm you have the same equation because that is the equation that we have to satisfy unless we work in Paris and go to nice restaurants and between restaurants we work on global balance algorithms. But anyway, so in the heat bath algorithm the a priori choice is not random. You want to go from a to b with the probability pi of b. You go to this new configuration with its equilibrium probability. You go from b to a with pi of a. And you see what this does in this equation. I mean if I don't have an answer I'll go on strike like the Lufthansa pilots. What happens if, I don't look at you. What happens if I choose a priori probability from a to b like pi of b and a priori probability. It's written here. The acceptance probabilities are equal to one or one half. You see this is different. So if I move into the new configuration with its equilibrium probability rate then I have no problem with rejection. I have no rejections. That is the DNA of the heat bath algorithm. But the idea of the heat bath algorithm is to apply this to a subsystem. Not to the whole system because if we could apply to the whole system we were back to direct sampling, right? We would be back to direct sampling. So we do direct sampling on a small system. Now let me apply this heat bath algorithm in the spin system. So I chose, so for example this guy. You marvel because it's such a beautiful picture or it's beautiful. I can sign it and then send it to you. So now this one, now, so I take this spin out and now I put it into plus with the probability pi plus and I put it into minus with probability pi minus and then I can accept it, okay? So take these spins away because they don't play. So now what is the, the field on this spin is now equals to two. I have three plus one minus makes two, spin it blue. So what is the probability of the spin up? It is e to the two h beta, I would say, right? Plus h beta. What is, so if it is up then the energy is, if it's up then the energy is minus one, minus one, minus two, minus three and minus two. Then the energy is minus two, let's say that. So if, just this is just a little reminder, if I am up then the energy is minus two. If it's down then the energy is plus two, okay? All right, so this means that I have to accept pi plus. I have to go to the plus configuration with probability e to, e to the beta h. Let me just write this down. So in this configuration the field is equal to two. And the energy of, if I choose a plus is minus two. The weight, if I choose a plus is e to the minus beta energy, okay? And e down is plus two and pi minus is e to the minus beta h. So now I would be well advised exceptionally to normalize the probabilities and to normalize them with this plus this. So I have this one. So now the heat bath algorithm is I take the spin away, I compute what is the probability of plus and minus and without taking into account what it was before, I take it to plus or take it to minus. Everybody knew that heat bath ising ising.pi would come up. This is the program heat bath ising.pi. All right, it actually implements this idea. You start with initial choice here. Then I start with k, random. I take a random number between zero and one. I compute h and then I have to check e to the beta h divided by e to the beta h plus e to the minus beta h. And I divide by e to the beta h. So this makes one divided by one plus e to the minus two beta h. You see, this is the same. So this is one. So this is programmed here. And if epsilon, if the random number is smaller than one divided by one plus expansion of minus two beta h, then I put the spin to one. And otherwise I put the spin to minus one. So this is the bonafide, completely exact equivalent algorithm to the Markov ising.pi, the Metropolis algorithm. And now comes the cherry on the cake I'll show you because I'll run it. So now you see I ran it from an initial choice that was plus and minus one for all sides. So I took an initial random. And it would be easy for all of us to change this line into saying s is equal to all plus. OK? We could change this. We would probably not, should not write on this blackboard, on this board here, but we could do it on the computer. We can say s equals two. You would see one multiplied by n can be done very easily. So then we can run it from an initial configuration that is all plus. So this is exactly what is the next Pixar movie. One of my students wanted to start with Pixar, but then he decided to work with Mathematica. Now he is the big developer of the big data. Anyway, so I started with plus. You see, at time equals to zero, I compute. I take out one spin and I replace it or don't. You understand what I'm doing here? I'm just showing the simulation from the all plus. And then I run it. Maxim Berman was the cameraman. Isn't that beautiful? So this is a local algorithm. So now we are iteration 500, 6,000, 7,000, 8,000, 9,000, 10,000, 11,000. And it gets lower, see? 11,729, 3132, 35. Chuck. So for some reason we chose to run it for 10,743 steps. And this was the final configuration. Anyway, so I used it already. So now I run the same program from the all minus configuration. There will be a little trick later. So pay attention. So it started all minus, but then the minus is getting away. The plus are taking over. There's a fight between almost, and I run exactly the same time. 10,742, this is the configuration. And now let's compare the two. So this is the final configuration from the ups. And this is the final configuration from the down. I can tell you if you ever want to read a great paper, read this paper by Prop and Wilson. Because Prop and Wilson, I think it was Prop. Wilson is one of my collaborators now. Very proud. Prop wanted to, he's a mathematician. He wanted to do Monte Carlo calculation. And he said, of course I'll do it this way. I'll show you. So now let me go to the program. Did you see this little line here? Anybody see that I had a random seed? 1, 2, 3, 4, 5, 6 here. So I used, you understand what this does? It seeds the random number generator. And all the random numbers that are generated are the same. So I had the two programs. I had the two programs. And at time step one, it was spin number 753 that was updated. And the random number was 0.75348. So I used the same random numbers for the one and for the other. And it so happens that using the same, so let's say t equals to 0, I started with an all up and I started with an all down. Excuse me. So the configuration, and then at each time step, you can look at the program yourself later. At each time step one, I updated this spin here, here and here. And I used the same random number, epsilon, to update. And now it's very easy to see this function, 1 divided by 1 plus e to the beta h. As a function of h, it goes like this. This function looks like this. So if what is clear, if I chose to put this spin here, and this spin has the h here of the minus configuration, is smaller than the h of the plus configuration. Here. And especially the sigma configuration, sigma, all the sigmas is smaller or equal than the sigma of the plus configuration. Smaller means that each spin is either the same or smaller. So here it's easy. Here we have a plus and minus, plus, minus, plus, minus, plus, minus, plus, minus. So it's clear that this configuration is smaller than this one. So what I can now prove is that because the spin here, the field, the h, if the spin is small, excuse me, the spin minus, I think I should write larger for the Hawks back in the pilots. So now because the spin is smaller than the, so you know what this means, you understand? The spin configuration itself is smaller. This means that each spin is either smaller or the same. So I never have the situation that I have a plus here where I have a minus. So because it's like this, I can prove very easily you can do it yourself that the configuration at t equals one is also smaller than this one. So this configuration will always will evolve and this configuration will evolve, but it will always be smaller. But at some point, because both of them do a random walk, at some point they will couple. And at this point, they will continue to move together. So it was not just at 10,742 that I had the same configuration. For all later times, I also had the same configuration. So now I have the question, what happens? So now I prove that the all plus and the all minus merge. What happens to another initial configuration? For example, plus, minus, plus, plus, minus, plus, plus, plus, minus. So this configuration is also smaller than this configuration because it never has a plus spin, plus spin here where it has a minus spin, and it's also larger than this. So this green one will also be, will remain sandwiched in here and will probably merge with one of the other numbers there. So this is an example of what I was discussing yesterday, or the day before yesterday, of a coupling algorithm. And here, we had the coupling, it took place, coupling took place at T equals, I think it was 10,474. It depends on the choice of random numbers. But here, for this algorithm, for this choice of random numbers 1, 2, 3, 4, 5, 6, the coupling time for this, it was already in quite a large system that I showed you. The coupling was out of time. So now, what I wanted to show you, tell you is, this is really important, because in this Poppin Wilson paper, because they introduced the coupling time, or it was possible, it just goes back to a long time ago, but now we have a new time, which is the coupling time. And this coupling time is always larger than the correlation time, or in mathematical terms than the mixing time. So now, and this is the time at which all memory of the initial configuration is forgotten. At that time, doing Markov chain Monte Carlo, you are as good as doing direct sampling. So there's one detail I didn't show you. It is the coupling here has to be done from the past. We can discuss this later over beers, but so this is what I wanted to show is, you see here, I mean, do it yourself, get this program, run it once with this random seed, initial choice one, one, one, one, and once initial choice another one, and you see at some point they will couple, and they will happily evolve exactly in the same way ever after. And this means that the configuration back here down here, this is time, right, down here, will have forgotten all memory of the initial state. And this means that for this kind of problem, this means it must have this half order, it's called half order, but for the easing model, you have enormous power in Markov chain Monte Carlo methods because you can prove once you have converged. There is no burn in time. There is no saying, well, you know, you have little numerical errors and errors, they kind of, anyway, so you have a pure calculation and at the end of your simulation, you have a perfect sample. So we wrote the paper once, we wrote the paper, on these algorithms perfect was called perfect sampling, it's perfect sampling, you understand perfect sampling because it has no more influence of the initial configuration, understand that point? If you start from all plus or from all minus and get exactly the same result or from any other initial configuration get the same result, then you have really no influence, there's no influence of the initial configuration. So we wrote the paper on perfect sampling algorithms for spin glass and so on, and then we got back a referee report from physical revelators and they will say this paper has to be rejected because only God is perfect and you're not allowed to use the word perfect in the title of... So we changed the title and we called it exact sampling because this thing is called perfect sampling or exact sampling and then the paper got through. Is it the same for any given pair? No, no, this is the coupling time for everybody. All the two to the n configurations have coupled at that time. When all plus and all minus come together, they're like two shepherds. When they come together, then everybody has come together. Well, I have to run the all plus and the all minus and this gives the maximum. But then you understand that this time, how can this be compatible with the exponential decay of the correlation function? It can only be compatible if this coupling time is sometimes larger and sometimes shorter. Because if there was an upper limit for the coupling time for the easing model, then at that time the correlation function goes to zero. There's no correlation with the initial state left. So what happens is that this time, for this model it is the mixing time. In fact, what happens is the mixing time is of the same order of... The coupling time is log n larger than the mixing time. That means the correlation time. Let me put it like this, correlation. Sometimes it's larger and the way it goes, in fact, you have to run it, but this is a detail, you have to run it from the back. In fact, what you have to do is, you have to do a time t equals to zero, you have to have your perfect sample or your exact sample, and then you have to go from the back. This is an example of these new ideas on coupling where you can really control tau. You really know tau. Well, if you have this... Here you have a partial order. What's called a partial order. The way this is distributed is exponentially distributed. So it's the coupling time itself that has an exponential distribution and the mean value is the mean correlation time times the logarithm of n. You have an exponential distribution. You must have an exponential distribution, by the way. It must be exponential. This exponential distribution that we also showed, in fact, it's only... When we have this exponential distribution, it is the sum of the configurations, sum of the samples. Samples means choices of 1, 2, 3, 4, 5, 6. Exactly, exactly. Yes, yes, from the simulation. And you cannot do it in spring glasses, for example. You can do it for hard spheres only up to the density of 0.3. So there are big, big limitations because the coupling time is larger than the correlation time. And it is of the same order only if this half-order exists. For example, for spring glasses, you don't have this half-order anymore, and it can also be much larger. So you have to show that everybody is working very hard to get strict mathematical limits on what is the correlation time. So this means, for the easy model, you'll all be professors of physics or everywhere. So you don't teach metropolis algorithm anymore. You immediately teach these coupling algorithms because you want to show results in computation that are really trustworthy. So you don't discuss any burning time. It's nothing. You just do sampling and you stop once you have one sample. Then you start a new simulation. So I have 17 more slides. But then it will be over. Am I allowed to run this again? All right. So here it runs hundreds and hundreds and hundreds from the all-down configuration. And it will always be smaller. You'll never have a spin that is up while the other configuration is down. So this is the configuration up, down, coupling. So the conclusion was here for the easy model. We discussed the subject of enumeration. I didn't really discuss the connection between counting and listing. So what we did was the gray code. Gray code anybody should remember it. Gray code going through a list by changing one thing. So we did the listing. And enumeration means two things. It means either counting. Counting how many configurations are there of energy four. That is also enumeration. Or just enumerating all of them. And you can say, for example, the word solution of the easy model, the exact solution of the easy model, it's a counting algorithm, a counting enumeration of loops. Then we had the metropolis Markov chain something. Remember, what is the DNA of Markov chain because now we will soon leave each other. I have the last five minutes to teach you something. So what is the DNA of metropolis algorithm? The proposal probability. That is of the naive algorithm. So the DNA of the metropolis algorithm, the probability with which you propose this move is the same with which you propose the move back. This is overcome in the metropolis Hastings algorithm where you have an a priori probability to go from a to b and an a priori probability to go from b to a. But in that case, when computing whether you accept this move, you also in your head have to do all the algebra for the back move. We did this. We had to move b and we had to compute all the algebra. What would be the move to accept the, what would be the probability to move, to accept the move from b to a? So then we had the cluster algorithms. And this, we used, this was in the framework of the metropolis Hastings algorithm. The cluster algorithm means that you can construct, you can do anything. You can have any algorithm, any algorithm and the metropolis Hastings, the a priori probability will always recover and will always recover detailed balance. Then we had the heat bath algorithm. Heat bath algorithm is, say it again, what is the, what is the characteristic of the heat bath algorithm? It is, you, well it's exact, you accept, you, there's no ejections, that is true. And you always, you go to the new configuration with its equilibrium probability, with its probability, but you cannot do it for the whole system because then you would be doing, you would be doing direct sampling, you apply it to a subsystem. The subsystem, the spin system was enormous. We used it only for a subsystem, which was the spin and its four neighbors. But then, once we, but there were no, there was no ejection, of course. We, at the end of the day, we either put it up or put it down. So then, fantastic subject of all is the coupling. And coupling, it is clear. The coupling time is always larger than the correlation time. And when you have half order, then you have a logarithmic behavior between the two. But in spin glasses, below some temperature, for example, the coupling time can become infinite, or almost infinite, whereas the correlation time becomes finite. And then we had these nice algorithms, enumerating using the gray code, remember this? Thermoeasing, density of states, not necessary to do a calculation at any temperature if you can compute the density of states. Then we had this beautiful Markov easing with the metropolis algorithm, the cluster easing that was the wolf algorithm, and the heat bath easing, easing with the coupling. And the coupling came from the fact that I seeded the random number generator, right? So we used the same sequence of random numbers in the program that started from all minus and the program that started from all plus. And this is all I wanted to say to you, and I thank you for your attention and for your interest, and that is it. Oh, now it's a question time, question time, question time, excuse me. How many more decals in reference or do you mention a decal paper? Robin Wilson. Okay. Or not mine, yes, it's it. It didn't go that well, but you look in, I've written a book. It's on our MOOC. You just do coupling and you will find it. You can, it's, but it's easy. It's easy. I mean, it's just, you know, it's such a revolution in our concept. I mean, I always, I was brought up thinking that there's the world of direct sample, you know, where you have direct sample and Markov chain sampling can never, you know, there's some flaw in the Markov method because it can never be, it can never sample the equipment distribution. So I was brought up like this. Everybody was brought up like this. And all of a sudden these people did their first Markov chain calculation. They had not read a single paper and they thought, well, you know, I should not do, they were mathematicians. I should not do a calculation that doesn't know what, and they set it up like this. Beautiful. And so this, at that time, so it was 20 years ago, we in our community understood that finally the Markov chain methods are able to do perfect sampling and that is a real revolution. It can also apply, it's a whole industry. It's a whole industry. The problem is that sometimes, let's put it this way, it even applies for continuity, these coupling algorithms can be used to have strict limits on the convergence time, for example, of hard sphere algorithms they will be used, these are the best algorithms to give limits on the liquid failure. They have physical implications. But you have to work a little bit to, they are fantastic algorithms. I mean, go through the literature, it's really interesting. Tough, but fantastic algorithm. Okay, but so there's no separation between detail between Markov chain sampling and what was the other? Direct sampling, exactly, I forgot. Okay. You mentioned that there will be new codes that come from this global-bound idea to forget the details. Is there like anything like for spin, like for writing and so on? Yes, that is for example. For easy model, yes, so this is what I wanted to do but I have one paper from last week and one paper next week, one is on the XY model and the other one will be on the, but so we use this idea of global balance. So it's an archive, you can see it. It is not as fast as the Wolf-Glas diagram but it's an algorithm where you always, each spin always turns clockwise. So one spin turns clockwise and the other one turns and they are quite fast algorithms. They can be used in this. So you can come with me in the last term. No, no, it's just one spin that turns and then, but I didn't prepare it now but you can look it up, the paper is very nice. We didn't have many results so we wrote it more nicely. So anyway, so one spin turns and then at some point one of the neighbors will not be, the idea of this algorithm is, at some point one of the neighbors will object and then it's the one that objects instead of going back and retracting the move it's that spin that will start moving. Anyway, so we'll see whether, so these are new ideas, new algorithm, very simple to implement and we'll see whether they'll make an impact in spin glasses, for example, XY spin glasses or Heisenberg spin. We'll see, we'll have... But the idea is to speed up the actual... Of course, of course, of course. That's the idea, of course. Because they have what is tau. Any more questions, comments? Contradictions? Oppositions? All right. Thank you. Thank you.