 Right now, I'm delighted to ask our chair of our advisory council, James Tanton, to come up and introduce our speaker tonight, Stephen Wolfram. Thank you. And good evening. It is my absolute pleasure and delight to introduce tonight's speaker for math encounters, Dr. Stephen Wolfram. We're in for a real treat and we're here at one of our MoMAFs to do fabulous celebratory math. Stephen is the creator of Mathematica, of Wolfram Alpha, and of the Wolfram Language, which each, in turn, have instigated historic paradigm shifts in the fields of computation, artificial intelligence, and complexity theory. Moreover, each have, and quite simply and profoundly, brought the power of accessible deep knowledge to the world. Stephen's commitment to education and personal intellectual growth for all at all levels is actually profoundly moving to me. Stephen was born in London and was educated at Eaton and Oxford in the UK to then receive his PhD in theoretical physics at Caltech. He's always had a deep interest in scientific computing. Stephen is MacArthur Fellow and is the author of the groundbreaking text, A New Kind of Science. And he is a devoted father to his four children. I first got to know Stephen when a young lass by the name of Catherine signed up for one of my extracurricular math research courses up in Boston. Each week, Catherine sat up in front of the room, drawing edge identification patterns for polygons, while her chauffeur, Stephen, sat back at the room, observer was going on, and enjoyed the mathematical fun Catherine was clearly experiencing. And I just have to add, just a few months back I was touched to receive an email from Catherine showing with me her undergraduate research paper continuing that work from those years before. Mathematics is indeed about play and discovery and pushing new ideas into new realms. And we're in for that sort of treat tonight. So without further ado, I present Dr. Stephen Wolfram for a hands-on adventure in experimental mathematics. Thanks very much. Well, this is a completely unscripted adventure. So because of the way this is set up, I'm getting to do the second talk. And often I think the second talk is necessarily better than the first one because everybody's practiced. But since I'm doing something that's completely unscripted, it's a high-risk thing because the first one of these we discovered something really quite interesting. So now I'm going to look at a completely different topic. If this topic horribly fails, I'll show you what we discovered in the previous version here. But I was excited at what we managed to figure out. So what I'm going to do is I'm going to do some experimental mathematics. I'm going to use Wolfram language as a tool to explore a particular mathematical question that I thought about 15 minutes ago. Well, let me get started anyway. We don't actually need... I can work around this, perhaps even completely. So what I wanted to... As I was saying, what I want to do is do some mathematical experiments using Wolfram language. Let me just get started. Some of the really coolest things require me to be able to access the network. But I can do some other things. Let's make sure that we can actually get nothing to work. Okay, there we go. So maybe we can work out... Instead of that, let's work out a thousand digits of pi, for example. Maybe we can just take... Let's do this. Let's find the digits of pi in base 10. Let's find a thousand of those digits. And then let's take those digits. And for example, let's say we want to take those digits. Let's say we want to work out... Let's make a plot. Let's make a histogram that shows... So a histogram will show how many of each kind of digit occur. So this is showing that in the first thousand digits of pi, roughly the different digits occur with roughly equal frequency. People have thought that's the case for pi for a couple of hundred years, although nobody's ever been able to prove that it's true for pi, eventually that all digits will occur with equal frequency. But we can start to do these kind of experiments in mathematics. We can also do all kinds of computation. We could say, I don't know, let's make a 3D plot or something of some function here. Then we can say, okay, let's make this a plot that we can manipulate. Let's manipulate that with a... I don't know, some parameter here. Say something like this. So now we'll get a little user interface. We can go and wiggle that around, all those kinds of things. So let's try... Let's say we do... I just want to kind of give you some sense of what kinds of things we can do in this language, and then we'll start launching into a particular experiment to try. So for example, we might say, let's make a random graph. Let's say we have a graph with 400 nodes, 800 edges or something. So that will make a big messy graph that gets laid out there. Maybe let's make a less messy graph. Let's say we make a table of relationships where, let's say, I goes to, let's say, something like this. We'll say, this will say for every variable, every value integer I will say, map that to this function I squared mod 200. And then let's take that. So that defines a kind of a set of mappings. We can say, show that as a network, and that will... Now we can do that, and then we'll get the result. Maybe we can just combine a couple of things here. So this is now, we can say, manipulate that, make a parameter n here, put that there, say manipulate that with n goes from 2 to 200 in steps of 1 or something. And now each time, the kind of the idea is to sort of have everything be as automatic as possible. So every time I'm moving the slider, we're automatically figuring out kind of how to make a nice layout for these graphs that represent this particular relation here. Well, we can go ahead and do other kinds of, all sorts of other kinds of computation. Let's say we pick up a, let's pick up an image here. Let it go, there's an image. Okay, now we can go ahead and manipulate that image. So for example, let's say we, let's do something weird here. Let's make, let's partition this image. Let's take that image and partition it into little blocks of size 10. Okay, so there's me kind of broken into little pieces. Let's say I can take, let's take each one of those rows and let's sort that into order by some sorting criteria that's probably based on color. Let's say we image assemble, let's assemble those images together. And let's get this, okay, there we have this really messy version of me and we could, we could just, just for fun, we could just make the whole thing dynamic. We could say put in a current image there, put the current image in there and make this whole thing dynamic. And then we can go and, okay, now we have, oops, I probably should scroll this up. We have, you know, we have some really mixed up bizarre version of me there. Let me show something else which actually just occurred to me. Let's take those images, the pieces of this image. One thing we can do, let's start using some sort of fancier technology here. Okay, so here's a bunch of little fragments of me, so to speak. Let's flatten that out. We've got a big list of these random little pieces of image. And let's just try doing something, let's try making a feature space plot. So this is using kind of modern machine learning ideas and see how long this will take. Okay, so what this just did is it made, it decided, it tried to figure out what are the different kinds of blobs that existed in that image, and it then tried to group those blobs into regions of feature space. And what it was doing here, each one of these dots corresponds to one of those blobs, and it was kind of labeling some fraction of those blobs to show. So these are probably the light-colored blobs. These are the darker blobs. Okay, that seems to be an eye there. There's probably some other blobs around there that have eyes in them. This is kind of just an example of using kind of modern machine learning techniques on, in this case, this random sample of data. The thing I also like to show is some things about real-world data. So now we can start to do things like, say, what's the population of New York City? So this is not the kind of thing you usually see in a computer language to know about a thing like New York City. But in our language, one can do things like that. We could say, what's the distance between New York City and, I don't know, Sydney or something. And we'll get some answer. Or we, I hope we'll get an answer. Or we could say something like, let's do this. Let's just do something a little bit mathy. Let's say capital cities in Europe. Let's see what we can get here. Come on. Okay, so that's going to give us capital cities in Europe. So now let's say we, for each one of those, the first of all we can say, just like, let's say, make a plot of all those cities on the globe. Okay, there they are. Now an interesting mathy thing to try to do would be to take those cities and let's say, let's get the geo-positions of all those cities. So that was on line three. So I'm now going to just ask for geo-positions there. Come on, wake up. There we go. And now let's say find shortest tour. So we can, there's this kind of traveling salesman problem which is, you know, go visit all these cities using the minimum distance going between all of these. So this is giving us an order in saying there's a 14,000 mile traveling salesman tour. Let's say, let's take the last of those and let's take that list of cities. Where was it up here? Line three. And let's order those cities by the thing which turned out to be the traveling salesman tour. Then let's say, geo-list plot of that and then say, join those points together. And so now that should give us, there we go. So that should now give us a traveling salesman tour of the capital cities in Europe. Well, it's a tour, so it's a cycle. So I told it to just make a cycle going through all the cities. So there's just kind of examples of things we can do. We could take, actually here's a thing we could try doing. Let's see what happens if I do this. Let's say, well, you know what? I'm going to get distracted if we start doing this. I'll do one more thing here. Let's say, countries in Europe, for example, and let's just get a list of countries in Europe. And then I could say something like, let's say, let's do this. Let's say, let's just get flag images for countries in Europe. This just occurred to me. Okay, so here are a bunch of flag images. So now I could, for example, I could say something like chromaticity plot. So this would take the colors of those flag images. So that's showing me where in color space the colors of those flags are. Now the thing that just occurred to me is let me take those flags and let me do a feature space plot of line 10. Let's see what happens here. See what, okay, so there we go. So what this is now doing is it's giving, it's sort of arranging these flags in feature space. And I guess there are the vertical countries, there are the horizontal countries, and then there I guess the cross countries and so on. It's kind of interesting to see that kind of analysis done there. So, and you know, we can do all kinds of things like that. We could say something like, let's take, let's say we take word translations, let's take mathematics. I wonder what, let's say we want to say, let's look at translations of mathematics into a bunch of different languages. Okay, so there's, I hope, mathematics in various different languages. Actually, one thing I'm curious about now, if I take all those languages and I take, let's just take the first element there. Oops, no, I want to take the first, the languages are ordered here in order of a number of native speakers. So let's say, let's say line 13, so let's do this. And now let's say, for example, let's just take the first letter in each of these things. So let's do a string take of that comma one. I think that will do it. Oh, no, it won't. Let me do this. So this will now give me the first letter in the word for mathematics in all these different languages. Now, for example, I could say something like, let me do a word cloud of the values here. So this will now show me what letter, oh, look at that, M is definitely the most common first letter for the words for mathematics in all these different languages. Actually, if I want to do it better, let me go ahead and say 17. Okay, so let's say values percent 17 and then let me transliterate all those things. So a lot of these are in non-transliterate. If I spelled it right, there we go. Okay, so now this will now, most of those can be transliterated. So now let me do the word cloud again and see I bet M is going to be the, yeah, M is the absolute hands down winner of that competition. Okay, so anyway, the point here is just to see kind of what it looks like when you kind of mix real world data together with sort of mathy kinds of things. But what I really wanted to do was an actual sort of math experiment and here's the experiment I thought about doing. So let's do our math experiment. Okay, so here's the thing I was thinking about and it was sort of based on James Tanton's presentation from a little while ago where he was dealing with digits and numbers and things you can do with digits and numbers. Okay, so here's my thing and it has to do with doing something crazy with digits and numbers. So we can take a number, let's take the number 456 and we can say, we can take those digits and we can just say integer digits of that and we'll get a list of digits there and now we could say something like reverse those digits. Okay? And we get a number. Now, here's a crazy thing we could do. We could take the reverse, the digit reverse number and we can make that an integer again and then we could say, let's take that integer and let's like add it to the original number we had. Now this is a somewhat classic kind of recreational math thing to take a function to nest doing that. So what we're doing is we're repeatedly taking a number, let's say we take the number 123 and we're taking that number and adding it to the digit reversal of that number. Okay? So one question is, what happens, so let's just do this, let's go ahead and do this for 100 steps and then let me, then I guess what I want to do is I want to take all these digits, let's do this, let's say integer digits of each of those and so this is all working base 10 and then I want to say, let's see what this does let me just check it's doing the right thing. Yes. Okay, so let me say pad left of that, so what that's going to do is it's going to line things up, I hope. Yeah, there we go. So it's going to line things up with a bunch of initial zeros and now what I can do is I can say make an array plot. Okay, so what this is now doing is it's taking all those, it's starting off, so the colors of the squares are determined by the values of those digits. So the darker the square is, the higher the digit. So this is starting off from the number 123 and 100 times it's iterating this operation of doing, finding the reversal of the digits, et cetera, et cetera, et cetera. Okay, so we can ask questions about what happens in the end when we do this. If we just keep doing this, will the thing eventually die out? Will it always grow? What will happen? I think this particular case of reversing, taking a number and adding it to the digit reversal, there's been some study of that. So I thought we would do something a little bit different here. Let's do some other operations on these numbers. So for example, one thing we could do is instead of reversing the digits, let's just take the digits and again, this may not be a good idea, but let's take the digits and let's cycle them around. So let's treat the numbers. So let me look at a function like rotate left. So rotate left will take, let's say, something like ABCD and rotate left of that it will make BCDA. So let's say we do that on the digits of this number. So let's say we say rotate left of the digits of that number. Okay, oh, that's weird. So this is the result of doing a rotation of the digits of the number. So I want to, because I think it's going to be easier to see what's going on, I want to use not base 10, but base 2. So you can take any number, take some number, whatever it is, and that's what that number is. You can think of it as some, the integer digits of that in base 10 are, you know, the 10s column, the 1s column, 10s column, et cetera. In base 2, that's the 1s column, the 2s columns, the 2s squads column, et cetera, et cetera, et cetera. Okay, so we can do the same thing here. Instead of taking this in base 10, let's take it in base 2 here and let's go ahead and let's see the from digits, we also need to do in base 2. So let's see what happens if we do this. Okay, so what we should get here, did I do something crazy and wrong? Let me just check what happened here. What we should have got is something which only has digits, did I do something wrong? Let's go ahead and just do it for 10 steps. Oh, those are integers, right. And I forgot this, this, yes, that one there, I forgot that the digits there needed to be comma 2. Okay, there we go. So now we've got something in base 2. Okay, so let's go ahead and run this a little bit longer, see what it looks like. I don't know what this is going to do at all. Okay, so this is pretty weird. So this is what we get by just starting from, we're just rotating digits by one step at everything. So let's just try seeing what happens if we start off with just a single 1 here. Now, that's pretty weird. So this is just starting with a single digit 1 and taking, let's just look at what we get out from this. So this is saying we start with a single 1 and we're just doing, let's just do it for 10 steps, we're just getting, okay, so this is the sequence that we get by taking a single digit 1 and then, actually I'm now curious whether this sequence, does anybody recognize anything interesting about this sequence? I have no idea, but there's a function that can feed that sequence to and it will try and tell us whether there's something, whether it recognizes that sequence as being some kind of mathematical construct that's like a Fibonacci sequence or something like this. It's thinking for a long time. That's okay, it didn't manage to find anything. So this is a sort of de novo sequence that isn't a recognizable thing that we've seen before. Well, let's take that sequence, okay. So what we're seeing on the digits is quite strange here. Let's try and look, let's just look at a few different cases and just see whether we happen to see whether there's anything, whether it's always this kind of very irregular structure that we're getting. Notice that there is, if we look inside here, let's just make this picture bigger, we notice that there is some, you know, there are some definite, if you can see, there are some definite kind of triangles, black and white triangles and so on that are there. It's not completely random and actually if we look on the right-hand edge here, in fact, if I were to take this number and I were to only look at the last few digits, in fact, let's do that. Let's look at, well, one thing we could do is instead of taking just, well, okay, let me do a couple of things here. So first thing is, let's see whether it always looks like this. Let's see whether for every initial number here, whether we always get this kind of mess. So let's go ahead and make a parameter n here. Let's just do it for 100 steps here. Let's go ahead and make a table for n goes up to, I don't know, let's just say n up to 20 of different things. Okay, so these are, okay, so these all look pretty, pretty similar. There's not, let's try, I'll tell you what, let's try doing something where we, just because I want to see whether we can start off with something where nothing interesting happened. Let me just change that. Instead of a rotate left, I don't know whether it'll make a difference. Let's try using rotate right. Let's see whether that makes any difference to what we get. Absolutely no, no difference. Okay, except that actually the right-hand edge, in the case of rotate left, the right-hand edge seems to be quite regular. In the case of rotate right, the left, the right-hand edge doesn't seem to be regular at all. So we could, for example, let's go ahead, let's try and get to something where we can see some regularity in all of this. So one idea that I have is can we just take something where we take these numbers and we just look at the last few digits. Usually it's difficult to find, I should say that, you know, what we're doing here is we've got a very simple rule for how to make these numbers and we're sort of immediately getting really complicated stuff coming out. And that's something, when you kind of look at the sort of computational universe of all possible programs, one of the big things that I've spent some part of my life discovering is that in the sort of computational universe of all possible programs, you often don't have to go very far before you start seeing very complicated things happening. I think that's highly relevant to a lot of what we see in the natural world where nature seems to sort of effortlessly make all sorts of complex behavior and I think it's sort of the same general kind of thing that we're seeing here. But now I'm really curious what, let's try, let's see. What I was thinking of doing was taking these things and instead of looking at the, instead of looking at this thing for an arbitrary length number, I'm going to try and just take this and at every step I'm going to take mod, so let's say mod, let's say 2 to the 20th or something. So what that's going to do, I hope, if I do this correctly. Yeah, okay. So what this does now is it takes these things and it says I'm only going to look at the, I'm only going to allow this number to grow to 20 digits and then I'm going to see what happens. So what will happen here is if we've done that, then it's pretty, it's guaranteed that after a while this thing has to repeat. Because it's a definite rule and after, because we've only got 20 digits there are only 2 to the 20th possible configuration so it's got to repeat somewhere. So let's see if we can figure out how that repetition stuff works. So what we're going to see is for each one of these we're going to see, let's take a look here. Hold on. I am looking, okay. Let me just, okay. So what we're going to find is for every state, for every possible value, so there are 2 to the 20th possible configurations. There are 2 to the 20th sequences of bits here and so we could just say, let's do range, let's say 2 to the n, actually it's 0 to 2 to the n minus 1 and I'm putting a parameter n in here so we could say, with n equals 5 or something we could say what are the possible configurations? Okay, there are these numbers here. So now what I'm going to do is I'm going to say for each of these numbers I'm going to say this is mod 2 to the n. I'm going to say I want to take that and I want to say take this thing, map to that, okay. So what this should be doing here if I've got this right is I'm going to take for every possible configuration I'm going to say what does, let's say with n equals 5, for every possible configuration what is the mapping of, so this is saying if we start off with all zeros then applying this transformation we'll just get a thing with all zeros. If we start off with a 1 then rotate right plus the original thing for just a 1 will give us a 2. Start off with a 2 we get a 3, etc. Okay, so we've got this whole network here. Now I can just go ahead and say graph and now what I'll get is this network that shows me what, so each one of these things here so let's say vertex labels goes to automatic. Okay, so for each value here for each possible configuration of my kind of length 20 or length 5 thing here this is showing how it maps on to another thing. So this is showing, this shows that after a while with this length 5 thing it will always just go to a fixed point. So let's try looking at that. We can say, so this means that if I tried size 5 here let's try size 5 here and it's going to say that things will get very boring with size 5, the claim is. Let's see, how are we doing this? Yeah, okay, should work. Okay, so what this is saying is that for most of these size 5 things that I did do size 5 correctly, mod 2 to 5, I get this wrong. It's saying what did I do wrong here? I don't think I did anything wrong. Okay, so the point here is that what this is implying is that the thing will always, it will start off from state 1 and eventually it will evolve down here it will just follow the arrows and eventually evolve to state 47 at which point it will just stay constant. Okay, so what this is hopefully going to do, there we go. This shows how boring this gets. This shows that most of the time this will just evolve. I don't even need to go for 100 steps. I can go for like 30 steps. Most of the time this will just repeat. Okay, so this is saying if I make the thing, so now this is giving me a map of, let me see what's happening here. This is, I don't want to go from 0 here. I want to go from, I want to do that. I think I want to do, actually I can go to 2 to the n. Okay, so this is showing, this is showing what happens. Most of the time for most initial conditions it just evolves to a fixed state and then stops there. So let's see. We have this here and what this is doing, okay. So this is the danger of an actual live experiment is that things don't, okay. So what we've got here, this is the actual sequence of numbers that we're getting out, okay. So what we're seeing here is something which as you might expect, if I say find transient repeat on that, oops, find transient repeat, let's see what do I have to do here. Let's see, at least n times. So let's say find transient repeat four times on that, let's do this. So this is now going to turn this into something, okay, let's run this a little bit longer. Let's run it 300 steps and let's say find transient repeat on that. So this is going to find us. This says it has a 1, 2, 3 transient and then it repeats in the cycle going 6, 9, 21, et cetera, et cetera, et cetera. So that I think is the correct behavior. Now the question is why were we not seeing that in the previous thing that we were doing? So what should be happening there is we should be going, I think I should just do it this way. So I should take each one of those numbers and I should say map that to this and then I should say go across range 2 to the 5 here and then I get a bunch of mappings there and now I say graph that, okay, this is much better. This is what I would expect it to look like. But what this is showing is that with this rule we're just rotating one thing, we're getting a cycle here and the thing is after a while it's just going into this one cycle and what this is saying is from any initial condition there's just one thing that can end up happening. There's just one cycle that it goes into. So let's just try trying something slightly different here. Let's do the same thing. Let's go ahead and just say for size n here. Let's do that for size n and let's say we make a table of the graphs for size n with n going from, let's say, 2 to, I don't know, let's say to 10. So now what this is going to do is it's going to make that corresponding plot. Okay, this is kind of interesting. So this is showing that, I think that was the case we were already looking at, this is now making a cycle. So a bunch of different initial conditions are all leading to this one cycle. This is a case where different initial conditions have different results and what happens at the end is that the thing just goes to a fixed point. It doesn't cycle anymore. And so here, okay, so there's some, there's somewhere there are fixed points as in it just evolves for a while and then it gets stuck and others where it goes into a cycle. So what we're seeing is, okay, we're seeing a bunch of different things going on here, bunch of different cases. These are, so what we're seeing, it's again remarkably complicated given how simple the thing that we were doing was. It's remarkable how complicated these pictures end up being. They correspond to asking the question given starting from, I'm actually really surprised at how messy this already looks. But let's see if we can get a case. Let us try, gosh, what can we try here? We can try, well, does anybody have an idea? Yes, please. Is there a pattern that the prime numbers in the cycle let's find out? Let's find out. Let's see. I mean, so let's just, the first very minimal thing we can do is just to label these pictures so we know which one is which. And, okay, so four, no, failure and the outset. No, seven is a non-cycling one. So there's nothing, there's nothing exciting about that. We could try looking at, yeah, let's look at what these actual fixed points are. So let's actually run, so what we were doing up here, let's see, we want to do this kind of thing. So we want to take each of these numbers and we want to say, for each of these, let's go ahead and, let's try this, find, transient, repeat. So let's look at what the things end up going to. Let's say comma four here. Let's run it for a thousand steps just so we get a little bit more data. Let's see, this wants to go to, okay, so what I'm doing here is I'm just starting from the single one. So I'm not starting from all possible initial conditions, I'm just starting from a single one and I'm asking it to find the, let's go up to n equals five here, for example. Okay, so what this is doing is, for each of these, let's put them in a column so we see what's happening here. So for each of these, this is the transient, this is saying we start with a one and then it goes to a zero and then it keeps cycling with zero. We start from a one, it goes to two, three, it keeps cycling with that. In this case, it just cycles, one, two, three, six, one, two, three, six. So what we're doing here, so let's go ahead and do this up to a slightly bigger number. Okay, so what we're seeing is these are, so here we're seeing the cycles. So these cycles, so for example, if we start off with a number 102, for example, and that is some one, two, three, four, five, six, seven. With 102, the claim is that this will be on, if we start with a number 102 and we do the case of seven here, hold on one second, do the case of seven and we start with, instead of starting with n, we start with 102 here and now we make that an array plot, get rid of this. Okay, so the claim is that that will cycle, so that cycles with a certain cycle, with a certain period. All right, let's just see what's surprising me here, again, is that this is, it kind of follows the thing that I've studied a lot in my life, which is really simple rule, really complicated behavior. Let's just try what happens if, let's try something utterly trivial. Let's just say instead of, instead of adding the number to, let's try something, because I just want to get to something where nothing interesting happened, and then we can work back up from that. Okay, so let's try, instead of doing this, let's just try, and maybe the answer to this is completely obvious and somebody can say if it is, instead of adding it to the original number again, let's just do, let's just add one to the number. So let's do the, let's cycle, let's do the cycling of the digits. Okay, that was trivial. So we cycle the digits and we added one to the original number. Okay, let's try adding, let's just try adding n, where n can go from, let's just try n goes up to 20 or something. Let's see whether it's always trivial to do that. Okay, yes, it's always trivial. So what we're doing here is we're just adding a fixed constant at each step and then we're doing this rotate left thing. Okay, well let's try doing, so that turned out to be trivial. Good, now let's try, how about this? How about we say, we multiply that by two here. So we say two times, oops, we do the from digits of that, we do two times that from digits. Let's try that. Okay, so there what's happening is for some numbers that multiplication by two is causing it to produce the number one, one, one, one, one, one, one, one, one, one, and others it's staying fixed. So we can probably figure out for which numbers at C. So what we want to do there, if we want to figure out just for which numbers it's going, getting big like that, let's just go ahead and say, what are we going to do here? I just want to say last of pad left of that. So this is now going to figure out which numbers, so this is just going to make a table of the, okay, so this is showing for some, in the case of some numbers we're getting a whole bunch of ones, in the case of other numbers we're getting nothing much happening. So let's go ahead and figure out for each of these what's the length of the output. Okay, so there we go. So now for some numbers, for some initial numbers, we're getting a bunch of, we're getting something really long happening. So it appears to be the case that every fourth one of these numbers has something large happening and for other numbers, so when we add something which is a multiple of, which is equal to one mod four, it looks like, what's that? Mod three, yes, one mod three. For some reason, this is then giving us a big number. Actually, let's try, okay, so instead of putting a two in there, let's try and change this a bit. Let's put a three in there instead and let's see whether that does anything different. So let's say we put a three there. Okay. Oh, okay. Now it's getting stripy. Let's see what happened. Let's see what happened. So what we're doing here is we're multiplying that by, let's see what happens if we just again change this function a little bit. Instead of adding one to that, let's just say three times that whole thing. See whether that does anything different. No, very similar. Okay. Now I'm curious. Okay. So what, oh, that's kind of fun. So what's happening here? Let's try just doing this. Let's try doing, okay, still nothing interesting going on. So let's see what happens if we, so the question really is we're taking a number, we're multiplying, we're rotating its digits a bit, we're multiplying by some fixed number. The question is, will anything interesting ever happen with this kind of structure? So let's go ahead and try and answer that question. I don't know the answer, obviously. Let's say we take that, and the thing that can happen with these things is that you get a tremendous surprise. Nothing interesting will happen for a while and then suddenly something bizarrely different will happen. Okay. So we're changing the thing that we're multiplying by. And again, oh, weird. Okay. So, oh my gosh. Okay. Okay. I didn't know at all this was going to happen. Okay. So, okay, so most of these were pretty boring. They were just repetitive type behavior and suddenly we have one here that just went wild. Okay. So, wow. Okay. All right. Let's find out which number that is. The first thing, of course, I forgot to label any of these things, which was silly. So let's go ahead and just put labels around them. Okay. So for some reason, 13 is our unlucky number here where instead of getting nice regular behavior we suddenly start to get something weird happening and 17, 19 the same way. Curiously, they are primes. Let's just, let's just for fun, let's just go up to 50 and just see whether that pattern by any chance continues. Okay. So 13, 17, 19, 21. Sorry. No. 22. Okay. So definitely we're losing on the primes idea but it's getting more common apparently to get something weird happening when we get up to these larger numbers. So let's, wow. Okay. So let's try, let's just try looking at this, at this one, 13. Yeah, we could try that but I want to dig into 13 because I'm sort of wondering what an earth is going on there. Oh, those numbers in binary. Interesting question. All right. Well, that would require us to, yes, that's a really good question. Okay. So what we need to do then is we need to automatically analyze. Okay. Let me see if I can use something really high-tech here. Okay. Let me try something that, let's live really dangerously here. Let's try doing the following. Let's make those images. Okay. This may be an utter disaster. Okay. These are images but let me get rid of the labeling for a moment. I just want to see whether something is going to happen that uses some kind of high-tech thing. Okay. So there are a bunch of these images. Now let's use the very new, let's use this and see what happens here and see what it does. Okay. So what that's doing is that's kind of fun. So the feature space plot which is just using, I mean this is using features which are visual features that are based on distinguishing pictures and turtles and things. So it's not to be sure that that will be, but what it's doing here is it is separating out. Okay. So it didn't do a great, oh yeah it did actually. All the ones that have complex behavior are showing up in this side of the feature space plot and so that's kind of interesting. I don't think this is a perfect way to do it. We would have to train, we could use a fancy neural net and train it to do this but I think we might have an easier heuristic. Let's see whether we've got an easier heuristic. I think the easier heuristic is going to be, let's just look at these pictures. I think the easier heuristic is just did it repeat because all these things here are, well did the right hand side, no, no, did the right hand side repeat is not going to do it for us because these ones here have the right hand side repeating. So we need a heuristic for when we've got complex behavior. Maybe what we need to do, let me think about this for a second, how are we going to get, we could do, okay there's a really disgusting heuristic we could use which is to try doing image compression on these things and see which ones are easily compressible. That's really grotesque but we can try that. Let's try that. So let's say we've got these images here and so you know when you do something like take something like this, okay this is just super grotesque but maybe actually we can just try doing an entropy measure. We might be able to do that. Let's just try, let's get this down here. Let's say images of this is equal to images of that. Okay now let's say I think there's a thing, image entropy, no let's just try saying entropy. Okay, I don't know what this does so we can, let's just see whether the, okay it gives a number. Let's see what happens if we say apply entropy to all those images. Oops, well that's kind of weird. So let's just look, let's just make a histogram of those entropies just to see whether we see any structure in this. Well okay there is some structure so there are ones that appear to have lower entropy but I don't know whether this is, but entropy is kind of a measure of how much randomness there is in the image and a lot of them seem to have entropies. I'm a little surprised. Okay the thing I was going to try doing hump. Let me think about this for a second. Anybody got an idea what to do here? Did we, we could? We could. I don't know how useful that will be but we can certainly, let's take a random image here and let's take, oops, now what we want to do there I think we want to say, I predict this is going to be absolutely useless but, okay now we have to take, yeah I mean I predict this is just going to give garbage. This is, now we just say, so I'm taking, that's hopeless. The, I think what we want to, let's just see. I'll tell you what, let's just take just a couple minutes and take a look at the case of 13 and see whether we can just see something interesting might happen there. Yeah. Can you do a, look at four pixel blocks and you do, so the stripe you want. Good point. That's a good point. We'll have some regularity. Right. We'll have regularity. Right. The stripe you want to have only straight up and down. They don't have. Exactly. Exactly. Let's break great idea. Okay, so let's take, let's take this. So what we're going to do here is instead of turning this into images let's just get our data again. Okay, so John's idea there was, let me illustrate the idea. So let's try, that was the case, well let's just take the case of 13 just to have one to experiment on and let's take size 20 here. Okay, so this is a grid. We can make this as a grid of numbers. Fine, that's what it'll look like. So the idea is take that grid of numbers and break it into two by two blocks. Okay, so I'm going to break it into, I don't think that it doesn't really matter whether they're overlapping or non-overlapping two by two blocks I believe. I think we just have to break this into two by two blocks. Okay, so now what this is going to do is it's going to make us a collection of two by two blocks. Okay, so now what I'm going to do is I'm going to, because this is now a block, a two dimensional grid of two by two blocks I'm going to do one thing here which is flatten this out and then what I'm going to do is I'm going to count the number of times each of those two by two blocks occurs. Okay, so what this is showing is the two by two block zero zero zero zero occurs 132 times. So what we're seeing is the number of times each of these types of two by two block occur. And so what should be the case is in those patterns that have a lot of complicated stuff going on we'll see a much broader distribution of types of two by two blocks that occur. So let's take this thing. So this is showing, so there are, let's see, we've got two to the, we've got 16 possible two by two blocks and so what we're seeing here is for each of those 16 possible two by two blocks we're seeing how the frequency with which that block occurs is. So what this is saying is in this particular case if we just do a, if we do like a histogram of the values here it's saying that a bunch of different values, no, that's not what I want to say. Sorry, I just wanted to do a bar chart of this which is just going to say let's try another case. Let's try a case that was just a pure stripy case. So let's take the case, where did we have one that's nicely labeled. Well let's take the case of, what's that, five or something. Let's take the case of five. Instead of the case of 13 let's do the same analysis for the case of five. Where was it? Five there. Okay, so now, okay. So what we're finding in this case is we basically only get most of the two by two blocks never occur. So the thing we want to do then is to take, even we could just do a very basic analysis which is how many two by two blocks, how many distinct two by two blocks occur. Right? And so that, we could get that, actually we don't even need to do this counts thing. We can just say the union of what is the, the union gives us the, let's see where we go here. I think that's right. Okay, so that's showing us which two by two blocks occur. So now we want to, want to know how many distinct two by two blocks occur. So that's the number of distinct two by two blocks that occur. And let's make that parameter A then again and let's make a table of A goes up to 20 and let's see how many distinct two by two blocks occur. Let's make a list, list line plot of that and that will show us for, okay, that's showing us for each, for each one of those cases how many distinct two by two blocks occur and this is not quite as good as I would have liked because it's showing that there are some peaks here but it's not showing that there's a kind of a, a terrible trough. So I think we would do better here to look at, instead of looking at how many occur, let's actually look at the, okay, let's do this. Yeah, I think it might be just do all 16 occur which is the first one that had all 16 occur which is what we want. Oh. Oh, yeah. You're absolutely right. Yes. Good, good idea. Okay. We've got a winning idea there. Okay. So let's just do this, okay, great. So let's go ahead and just get this and let's go up to like 50 or something here and then let's say, so that's going to give us, okay, so now let's say position of 16 in there, position in that of 16. Okay. So actually let me just say, flatten that out. Okay. So here is our sequence of cases where complex behavior occurs and now let's see, what can we see about that sequence of numbers? We could try doing find sequence function I am not hopeful but I'll be amazed if this comes back with something but an alternative to that is just start looking at, for example, how frequent are those numbers? Let's take a look here. Come on. You see, if it's failing, it's going to think very hard before it gives up so it takes it all the world to decide that it can't do it. But so this is giving us kind of, this is sort of interesting because it's kind of giving us the density of complex behavior in the space of systems and well, okay, it's trying really hard for us but okay, it gave up. So let's just try looking, okay, yeah, that's nothing simple. That's the sequence of differences so how far do you have to go between these things to get to an all 16? Let's just try this, I don't know, I'm not thinking about just how much computation is involved in this but let's try a bigger case of this. Oh, that was really fast, okay. So given that that was really fast so after a while, it looks like they're all winners so to speak. Everything is a 16. So that means that after a while somehow it's escaping from the zone where it just has simple behavior and let's see if there are any non six, oh my gosh, that's so weird, there's a non 16 even out far out in this thing. So let's make a plot, let's make a list, oops, I don't know what I wanted to do. Let's just make a plot here of gosh, go down here, sorry, where are we? Okay, that is totally weird so what that's saying is as you go at the very beginning you don't get very complicated behavior but after a while it starts getting complicated and then most of the time it's complicated but just occasionally it isn't. Very weird. Alright, we should probably wrap up here because I'm going way over time but this is experimental mathematics so to speak and what's interesting is okay, the main probably take away from this is there's a lot of very low hanging fruit it's really pretty easy to find things where I'm sure there's been no analysis ever made of the things that we just looked at and we just discovered a bunch of stuff and if we spent another few hours we probably have the raw material to write some paper about this cool kind of system and that's pretty neat and I think the thing that I want to sort of emphasize is this is anybody can do this so to speak this is not, I'm reasonably fluent in the tool I just spent 30 years building but actually the really scary thing is I've now seen kids probably the scariest thing I've seen is a bunch of 11 year olds who've learnt our language and who can do something that I absolutely can't do which is they can speak the language like it's like nest list of hash of this and that and the other and they can speak it at more or less standard output speed and I can't understand it and I have to type it to be able to get it but the thing that I've noticed of people learning language I noticed it with one of my kids actually there comes this moment when you can kind of think about what you're you can think about some problem computationally and start typing before you could explain what you're thinking about so to speak much as when you learn a human language you get to the point where you can be starting to speak French I almost got to that point without kind of thinking about the English first and then translating it and that's kind of an exciting thing because it's really a step up for what us humans so to speak can do and we get to the point where we can kind of be close enough to our computers to sort of think computationally and make use of kind of all of the the knowledge that we've now built into built into these systems. Let's give a round of applause for Stephen Willfram.