Mathematical Games Hosted by Ed Pegg Jr. [Episode 11: 13000+ Demonstrations]

Recording of Ed Pegg Jr.’s “Mathematical Games” episode discussing the Wolfram Demonstrations Project (over 13,000 demonstrations). Pegg gives a guided tour of many example demonstrations (geometry, combinatorics, physics, cellular automata, Voronoi diagrams, Banach–Tarski, tetrahedra, etc.), highlights interactive/manipulate features, occasional playback errors, and invites contributions via repository templates.
Chapters
Hello, everyone. Hello, everyone.
We're gonna wait a few seconds here, and then we'll get started. It looks like my screen there, so.
Welcome to another episode of Mathematical Games. I'm Ed Pegg Jr. I run the Wolfram demonstration site, and I thought I would talk a bit about the Wolfram demonstration site since we've recently gone over 13,000 demonstrations. I call this series Mathematical Games as a homage to Martin Gardner, who wrote the column Mathematical Games for scientific American for 25 years. Many of the items in the demonstrations project deal with these things in recreational mathematics, which I usually define as something that you can explain to something in 30 seconds or less. However, even though something is simple to explain, usually there can be a lot of deep mathematics within an item. So I'll wait for things to calm down again. Again, I'm Ed Peg, Jr. This is the Mathematical Game series, and today we're going to be discussing the Wolfram Demonstrations project. So.
Make sure I'm on the right screen here.
Here's the demonstration site, demonstrations.wolfram.com and currently we're at 13,080 demonstrations. So you can go to the site and take a look at any of them. And if, if there's any particular demonstration that people would like to see, go ahead and post that into chat. And perhaps at the end of what I've Got prepared, we can go to some of the demonstrations people have suggest. So the project started in 2007, and this was my introduction to it. Our. Our boss, Stephen Wolfram, called me up and said that he was writing a series of these demonstrations to show off simple principles. For example, here's a simple leverage. And he wrote the code for this while I was on the phone with him. While he was. While he was explaining this, he was also writing this code. So we can visit this.
Let me see here.
Here's the. The item on the site, and we can take a look at the code for this.
So let's open this up here.
So here's. So here's the code that he was writing while I was on the phone with him. He wrote this in five minutes while he was talking to me. Stephen is. Is a pretty amazing programmer for, especially for. For simple things like this. He can just flat out do it perfectly. It's the more complicated stuff that. That causes both him and pretty much anybody else problems.
But he's a very good coder. So let's see.
So this was my introduction to it, and since then I've been writing demonstrations, trying to show how these various science and math concepts can be done within a simple adjustable manipulatable program. So here's another one that Steven wrote with Michael Trott. You've got these movable points and you want to see how they will work together within the three body problem. And there's code for this at planar three body problem, if you'd like to.
Take a look at it.
If you change the masses of these, you get different, different behaviors. Another one that, that Steven helped to write, he used some code by Lyman Herd, modified it some Joe Balti, then added some different items to it. But.
Oops, not sure why that didn't work. That shouldn't have been an error.
So here's the Penrose tiles and there seems to be some problem here. This, this code is the, the earliest parts of this code is almost 20 years. So I should probably go in and see if there's anything that needs to be tweaked for this old code.
But it seems to be working mostly okay.
Lattice points on a circle as you, as you pick out circles of a certain radius. For example, here's a circle of radius 10. There are various points on the lattice exactly that distance from the center. So this is some simple code to do that. And certain numbers work better than others since, since he's written this code, we now have the, the function Powers representation.
So let me see if we can do this here.
So 35 squared. 35. Yeah. 35 squared as the sum of two squares. So 21 and 2128 is what these vertices are.
See if we can.
I remember 90 is one that has.
Or maybe there's one 92.
Not sure what the number is. But there are certain numbers that lead to a lot of lattice points.
That's one what one was that?
75.
That was what it is.
75 has three values that are powers representations. The sum of two squares. Basic statistics of movable points. So we can add root mean squared, geometric mean, harmonic mean. And I had to remind myself of what these were. The arithmetic mean is the. In red is the. Is the sum of the points over n. So that's here the median. I forgot to write down what the definition was. The root mean square is the square root of the sum of squares divided by n. The geometric mean is the nth root of the product. And the Harmonic mean is N times the sum of the reciprocals. And they have this relationship to each other. The green, red, pink and purple points are usually in this sort of line as, as you do them. I think we can add another point here. Yes. If we do Alt click We can add more points. And we can also get rid of.
Them with with Alt click.
So these demonstrations have a easy way of of changing items so that in a classroom you could talk about an item but also provide real time updates or what you're discussing. Largest disk and a convex pentagon. So this is by Jamie Jamie Rangel Mondegren. If we have a convex polygon, there is always a largest disk that you can inscribe within the figure. This. This stops working for. For concave items. So it has to be convex for this particular algorithm to work. I thought this was very interesting. I I am not familiar with this algorithm, so I should probably take a look at this to see how it works. I imagine you're. We're just basically combining triples of the sides and seeing which one will provide the largest object without going outside. But the code we can just go to the LANC large tick and a convex polygon and it will have the full code for how to do this. A square passing through four points. So given four points anywhere, it's always possible to draw a square so that its sides are on the four points as shown in this demonstration. We can move the points around and we get a square that is on the sides if the sides are extended. Even if the points are in a straight line. Oscillase porism. If you have a a circle, you can use Fusses formula to figure out for the the based on the distance from the center of the circle to the edge. There's Fuss's formula Will will let you draw a circle so that if you start at any point on the circle you will get a quadrilateral if you build a series of tangents and that's a ponss tourism. Once one quadrilateral closes up like this, it will always close up no matter where you start on the circle. Bisectors of quadrilaterals. If you bisect the quadrilaterals and build these intersection points, they will always be concentric. So in a way this is one way of developing a a a quadrilateral center for any quadrilateral based on where this where the center of this circle is. Something one, one project I plan to work on sometime soon is to is to come up with a list of quadrilateral and polygon centers. There's been a lot of work on triangle centers, but these larger ngons there isn't a lot compiled for the different types of centers that exist. So I wanted to tackle that the visible points in a polygon. This is Also known as the art gallery problem. If you have a odd polygon and a light, what can you see in the polygon based on where the light is? For the art gallery gallery problem, you basically have a very complicated polygon and you want to know the minimal number of guards you could post so that with their flashlights they could be able to see everything within the art gallery. When we used this problem in numbers, I think 15 years ago, the art gallery problem hadn't yet been solved. But I think more recently the art gallery problem has been solved. There's all these mathematical problems that are of interest and I try to keep on top of all of them. Unfortunately, I don't remember the full details. I have to write them down. Bisecting the area and perimeter of a triangle. This was a challenge problem in an Olympiad. Is it possible to draw a line that bisects both the area and the perimeter of a triangle? It's not too difficult to, to show that a, this, this line exists, but it's more tricky to actually draw it. And these are some. This is one, one of the lines that works, I believe there's always three lines that are solutions and they intersect at the end circle of the triangle. Here's another geometry item. If you divide a quadrilateral up into, by the, by the diagonals and then take the centroids of each of the four triangles, you'll get a quadrilateral at the center. And this quadrilateral has an area of 1/9 the area of the original quadrilateral. You can see that up here we've got nine times the area of EFGH as an area of 140. And the area of the original quadrilateral quadrilateral is 140. And that is for any quadrilateral. You have that property. Also. This side is, is parallel to that side. This side is parallel to that side. This side is parallel to that side. And FG is, is parallel to ab. So I thought that was very interesting. For larger quadra quadrilaterals in 3D space, it happens that if you take the midpoints of that quadrilateral, no matter how you work or change things, the midpoints will always, always make a two dimensional quadrilateral that is parallelogram and that's called the spatial midpoint quadrilateral theorem. If you divide all the edges of a quadrilateral into thirds, you also get a parallelogram for any quadrilateral, even if it's concave. As, and so you can get the code for this at Wittenberg's Parallelogram. Von Owdl's theorem states that if you take a quadrilateral and build squares on each side, you'll get and connect the centers. You'll get two lines of the same length that are perpendicular to each other. So this intersection point could be considered another quadrilateral center. And this also works for quadrilaterals that are concave as well. These two lines are always perpendicular to each other and the same length. More difficult is to find the shortest connecting path. This happens with road construction all the time. You've got these four towns and you basically want to construct roads that connect all the towns together. It turns out that if you want to minimize the length of the four roads, you need to build these two points and then connect them together. This is called the Steiner network. And for four points, you start by. See, you.
Let me remember, right.
Oh, you build a, an equilateral triangle on each of the. You take the two largest lengths that are opposite each other, build equilateral triangles on each of those segments. So we've got this point making an equilateral triangle and these two points making the equilateral triangle. You draw a connecting line between the points of the equilateral triangle. Then draw the circumcircles through the equilateral triangle vertex and the two vertices to get a fourth point. And it's on the line between the vertices that you, that you find the Steiner network. So these are also seen in soap bubbles. If you look at froth with a point where three soap bubbles come together, they will always make a series of three 120 degree angles when three soap bubbles come together, because that's minimizing the surface area of soap film. So these Steiner networks are often seen in, in, in soap bubbles because they minimize, minimize surface area for these for the soap films. So one way, if you, if you took these four points on nails and dip that into soap soap film and pulled it out, it would make this network as a soap film. We can also do combinatorics. There are 50 ways of folding a strip of five stamps. And this shows all the different ways of doing that. If we go to six stamps, there are how many 144 ways of folding the four stamps. So this is a nice combinatorics realization by Robert Dickow. And for seven stamps, there's 462 ways of, of folding these stamps together. People have probably seen Fibonacci numbers. If you start here 1, 1, 2, 3, 5, 8, 13, 21, 34. That's the Fibonacci sequence. But less well known, if you do the same thing with triangles, you get what's called a Padavan sequence. 1, 1, 1, 2, 2, 3, 4. And it grows from there. Padavan sequence is seen of the. The Fibonacci sequence is, is related to the golden ratio or phi squared equals phi plus one, where phi is the golden ratio. Padavan sequence is related to the plastic constant.
What is it?
Rho to the third equals rho plus one, where rho is the plastic constant, about 1.38. So the Fibonacci sequence and the Fibonacci spiral and the Padavan sequence and the Padavan spot spiral. Based on the plastic constant, We can build a Tamari lattice on how a polygon can be diagonalized into triangles. So, so here are the.
Let's see.
1, 2, 3, 4, 5, 6, 7.
8, 9, 10, 11, 12, 13, 14.
Ways of dividing a hexagon into triangles. And you can connect up the triangulations which share two triangles. Yes, all these are connected when they share two triangles. And when you connect them up together you get this. I believe this is called a plesiohedron. Whenever something is, whenever a, a polychorin or polyhedron is determined by a combinatorial property, proper property, there's this particular name for that type of polyhedron or polychron in order seven, we get a more complicated layered graph plot. And the object is a polychoron. It's four dimensional. So it's very simple for the quadrilateral and the square. Things get more interesting when you get to the hexagon and heptagon and these continue. You can, you can go to the octagon, but then the graph gets very complicated at that point. Six sphere coordinates for any point, you can convert from the XYZ system to what's called the six sphere coordinate system. Basically for xyz, you sum those, the sum, the squares of those X squared plus Y squared plus Z squared and X is divided by that sum, Y is divided by that sum and Z is, is divided by that sum. And that converts into a system of, of six spheres within, within 3, 3D. And that generates A, un, U, V and W coordinates in the normal presentation. And this is basically showing for any coordinate point what the spheres look like in that system. We don't just have geometry, although this, this does turn into geometry. If you have a aircraft that needs to go into a holding pattern, one thing that Pilots and air traffic controllers need to learn is how you're supposed to handle the holding pattern. And there's three different types there. You can do a parallel approach, a teardrop approach or direct approach for the holding pattern. And. We can the. So for this one we've got a radial course of 339. The course is 340. I'm going to guess that's a direct approach. Nope, a teardrop approach was needed. So maybe I wasn't. Wouldn't be a too good of a pilot. See Radial 134. I'm going to guess parallel. No, with that one I needed a direct approach. So obviously I don't know too much about flying or air traffic control, but this is a test for air traffic controllers. Basically they need to get 100% accuracy in order to pass the air traffic control test. And this thing about holding patterns is just one of many items in the air traffic controller test. Let's see Jules, Experiment. How much heat is generated by a given number of energy. So Joule did this experiment where he took a weight and let it fall. And while that weight was falling, it would turn a crank which, which sent these paddles through water and it would heat up the water. And he could measure how much a given weight would heat up the water as the weight dropped. So with that Joule was able to show how kinetic energy could be converted into heat energy by raising the temperature of a fluid by mechanical agitation caused by a weight dropping. And so we use Joule to express this, this, this phenomenon.
Now.
Based on Joule's original experiment, this is to Mitchell's question, this is sort of a, a random medley of demonstrations that, that I picked out. The Miller indices for a cube. I was going through these demonstrations and I just been recently working with cubes and I forgot that these were called Miller indices and they deal with crystallography. Hash diagrams of power sets. If you take subsets of an item, for example, there's four order three subsets of, of 1, 2, 3, 4. You get these has diagrams and so we could build, I believe plesiohedra out of these as well. A U a way of finding the determinant of a matrix using diagonals. This is how to do it. If you, if you multiply these three numbers, you get 144, these three, you get 400 minus 400 and these four 140. You're just basically repeating the numbers alongside and taking the diagonal products. And then if you add the lower sum and subtract the Higher sum, you get the determinant of the matrix, which is something I haven't done in a while. I just, I just, I've done that enough times so I just use determinant now. Ober's paradox. What color is the night sky? Well, it's mostly black with some bright points for stars. But if the universe were infinite, then there should be a line of sight for any point to intersect the star. And based on what we've seen with the new James Webb Space Telescope, it does seem like there, there's galaxies everywhere. The reason why the sky is black instead of bright is known as Ober's paradox, the dark night sky paradox. If, if we increase the stars, we sort of should see this. It's, it's thought that the expansion of the universe is the reason why it's dark. If the universe was contracting, it would be bright. But even that's not not known. There's still not a resolution for this paradox. Rhoni diagrams this is used to be a much longer set of code. The code is much shorter now.
I forget what it is now. Let me see if I can find it here. I'm going to download the code here.
So here's the original notebook and now we just do list density plot. So there's the complete code for this and we can change the colors in various ways. And the Voronoi diagram is for each set of points that are neighboring, we draw a line and then do the perpendicular bisector. And once you do a series of perpendicular bisectors like this, you get the diagram for the area that each point dominates for fast food food chains. If you say wanted to add another McDonald's somewhere within this town, you could look at this diagram and see where might be good points for putting a, another fast food restaurant. You basically wouldn't want to put it right next to another one because that would dilute the, that would dilute the brand because they have to compete directly with each other. But if you put it like say over here, that would basically be providing a lot of, a lot more customers for people in this area where the nearest restaurants are too far away. So Varoni diagrams are frequently used in analysis of where to place stores.
Oops, I don't want to do that one. I want to do this one.
The Banach Tarski paradox basically says you can divide a. If you're using the hyperbolic plane, you can divide up a circle into three parts and then take, throw away one third of the items and reassemble the circle completely with just One third of the points and basically they do it here. Oops.
And for some reason that's not working now. Let me try this again. Oh, system doesn't want to work.
It was working earlier.
Let me try deleting this and redoing it.
Oh, it doesn't want to work now. But basically this shows how you can use the point car disc to, to reproduce this paradox. So let me just try grabbing this one.
Let me see if I can get it to work in the original source.
So here's all the code for it. It's somewhat extensive code. So if we move one point away, we basically get rid of one color. And now it's just orange and blue and it divides in half. Exactly. The, the inverse of blue here is orange and vice versa. We've basically gotten a, gotten rid of all the colors generated by these other lines here. And if we move this, we get divided into the three parts. And here's an alternative form. You start with this triple tip triplet. And as you move in time you get two parts instead. So this is a illustration of the Banach Tarski paradox. See I think I had some other things here. Yes, we can use triangles. Every. Probably everybody's familiar with with.
Let me see what's here first. Yes, we'll come back to that.
Probably everyone's familiar with Pythagorean triples where the sum of squares gives the sum of the sides of a right triangle. The edges will equal the sum of the square of the hypotenuse with. Eisenstein noticed something similar with 60 degree angles and 120 degree angles. And these are called Eisenstein triples. He also did. There's also Eisenstein numbers on the complex plane also built on the concept of 60 degrees and 120 degrees. So here are two triangles which either have 120 degree angles or 30 degree angles. And there's an easy way of making these. And this method was developed by Eisenstein in the last century. 120 degree angle here. And yes, 30 degree angle here and a 120 degree angle here. These are always in pairs. This is always a way of getting a 180 degree angle out of 120 and 60. These are the Isenstein triples. Here's a interesting property of a. Of a regular polygon. If it has an edge length of two. If you then divide the polygon into and departs by by horizontal diagonals, then the heights of each section, if you square them, the total will equal the number of sides of the polygon, for example, with five each side here is length two. And this height is that you square that and add it to this squared. This value plus this value equals five. And for any regular polygon, this is true. The sum of these heights squared equals 11. Some of these, these values squared equals 13 and so on. It's for a dodecagon. The heights are 1, 3, 4, 3, 3 and 1. And if you, or that's, those are the squared values. If you, the squares are 1, 3, 4, 3 and 1. If you add those up, you get 12. And I thought this was a very interesting property of a particular type of polygon.
Let's see here.
In a talk recently, I mentioned that the rational sporadic tetrahedra had been enumerated. There's 59 of them. What that means is all of the dihedral angles of this tetrahedron are fractions of PI. So a, a complete circle would be 2 PI, half a circle or the sum of the angles of a triangle would be PI. So this, this happens to be a right angle on this one here. This one is a, a 45 degree angle dihedral angle on this edge. And this, this edge here is a 60 degree angle. This edge here is a 120 degree angle. So one question that John Conway had is when is it possible for a tetrahedron to have all edges be rational dihedral angles? And it turns out there's 59 ways of doing it. And this demonstration has all 59 of them. These are the 59 sporadic rational tetrahedra. Now one interesting item is if you know these dihedral angles and you take their sum, multiply that by two and then subtract the sum of the solid angles at the vertices. So this angle here, the Solid angle is 1/5 PI. This is 1/10 PI. The twice the sum of the dihedral angles minus the sum of the solid angles is 4 PI. So if you add up these fractions, if you add up the light fractions the dihedral angles, multiply by two and subtract the vertex angles, you'll get four. And that applies to all of these. That applies to any tetrahedron. But these are the only, only tetrahedra that have all rational values for, for their edges and solid angles. Another cute thing I did was you have a fraction here or you've got this big number on the top, big number on the bottom. Well, parts of the number here are repeated. So if you frost them out by a bad method of simplification, you get four fifths. Well, it happens that this is correct. If you just cross out the like numbers on top and bottom, like so, or for any of these.
Let's see if we can find one here.
Here we go. Here's another one. Here's another easy to see bad simplification. Well, it happens that if this is possible, then the value here is a repeating decimal for a related fraction. And there's a way of going from a. For any value, you can come up with a paired fraction whose repeating decimal will allow you to create a bad fraction simplification. Not all values, but most values. One doesn't have one. But for example, well, that's just a humongous one. It's scrolling off screen but here we've got for 5542 there's a 656 long length number that you can append at the end and at the beginning of 55 and 42 to make that work. And it turns out that 55 blah over blah 42. If you cross those out, it does equal 55 over 42. Some of these are numbers. Or just use, use those though. 77 over 14. You can get this number here. One recent thing in the news is that life is. Life is omniperiodic. For any period you can come up with a life sequence, an oscillator with that length. Oscillator, I believe 19 was the last one found. Let's see what that one was. Yes, here's 19. This was the last oscillator found. This one was. This one was known back in the 70s, the penta decathlon. But other values such as. I think 43 was another one that was very hard to find. Yes, this was a very difficult one to find. And after 60 they managed to come up with a general process for creating everything. So as of five years ago, there were two values that were not known. And then earlier last year the last two oscillators were found. And this demonstration has oscillators of all of these lengths from 2 to 60.
See, I have one more in back here.
Here's something else that was found relatively Recently, I believe 10 years ago. It's possible to have seven cylinders all touching each other. And this is a way of doing it. And you can adjust the angle for these rons. This is the, this is the nice part of having it in a manipulate format. Calculating these is a bear. But when you have it done into a program you can just make the adjustments very easily. So the. All of these cylinders touch each other. And this was just found relatively recently. That they figured out how to solve this problem.
Let's see.
Roulette. If you have a polygon, you can make that a bicycle wheel that nicely rolls on that surface. This is a demonstration by Stan Wagon and at the Museum of Mathematics you can write on a bicycle that's built on this principle. They've got the track and they've got a square wheel bicycle that you can ride around on the special track. And the. I don't even know how to say that but for. Oops. And this one's not working.
Let's see if we can get that one to work.
Yes, here we go. For a Taurus, there are four circles through a point. There's the two obvious ones around the. The long and short way for the torus. But there's also these two other circles at an angle and these are the. However that word is pronounced villar. So circles, which I probably mispronounced. So that is what I had prepared. If you have a demonstration, let's see, we can. Let me see if I can bring one up here.
If we.
Go to file new file new repository item, you can get the template for a demonstrations project or for a data repository or for a function repository. So for example, here is the demonstration project template. If you have an idea for a demonstration, feel free to put it into one of these templates and feel free to mail it to me and I can get it added to the demonstration site. We try to add new demonstrations every day. And if you go to the actual site.
Let me see if I can find it here. For some reason I can't drag this.
If you go to the actual site, demonstrations.wolfram.com you can see all of these demonstrations. So if anybody has any questions, I'll be glad to answer them. And if you have any ideas you'd like to see for demonstrations, feel free to. Feel free to post them. If anybody has any questions for me, I have a pretty good idea of what all the demonstrations are because I've seen all of them at least two or three times, but I don't perfectly remember all details of all 13,000 of them. Oh, if there's no questions, I think we can wrap that up here.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






