RubyConf 2015

Las matemáticas detrás de Mandelbrot

David Bock  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

- Well, thank you for coming to my talk. I know it's a tough choice. There's a bunch of good stuff I'd love to be seeing right now. This is not just a talk about the Mandelbrot set and the math behind it. I would just describe this as kind of the Discovery Channel version of this talk, there's not a lot of heavy math at all.

But this is also a talk about why this talk exists. And it starts about three years ago with my boys. These are my triplets, and I volunteer at their. . . They're in third grade now. I volunteer at their elementary school quite a bit. Through a program called Watchdog Dads.

I'd love to encourage everybody, the sequence I'm about to show here is about how I've gotten involved in some education in my county, and I'd love to be an inspiration, love to have this a call to action to you as well. Through Watchdog Dads I volunteer at the school occasionally and two years ago I took a week off of work and ran about 400 third, fourth, and fifth graders through the Hour of Code for Computer Science Education Week And let me tell you something, that was a blast.

That was so beneficial to me, not just to the kids but I got a great quote from a fifth grade girl who said, "Oh, so computers aren't smart, they're just dumb really, really fast. " And that was so awesome to have that kind of influence over kids and I got some great material for talks, didn't I? After I did this Hour of Code, the principles talked to me about volunteering at the high school level through a program called TEALS.

This is a nationwide organization where they're taking computer science professionals, just like us, and putting us in classrooms with math teachers who are not necessarily educated in computer science, to bring the math teachers, and the students up to speed over a year or two, to the point where the math teachers can take it over.

In my county we already have a pretty active computer science department in high school. So I have a great teacher that I get to work with. One morning, before school I'm there an hour before classes begin a couple days a week so we can go over homework and people can ask questions.

A student of mine comes in and asks the math teacher, from a previous class, another topic the day before, he goes, "What is i good for anyway? Is it something useful?" And you could see the teacher with that deer-in-the-headlights look going "Oh no, the student's asking me a real world question, what do I do?" So I jumped in, I'll tell that story in a minute.

But the encouraging thing, another thing I'm doing in the county, last year we had 20 of my high school students volunteer to go back to their elementary schools and do the Hour of Code. So we had influence over some 2,000 kids in my county last year. This year, Computer Science Education Week is doing an Hour of Code with Star Wars characters.

The kids don't need to know anything, all they need is a browser. It's a little thing where you drag and drop blocks of code together and control stuff on graph paper. And it is so much fun. I'd encourage all of you to try to get involved in doing something with this with a local school.

So the student asked, "What is i good for anyway?" And the teacher was like, "Uh, well it's used in some real-world engineering, mathematics stuff. " And I jumped in, I was like, "Oh, well first of all, if you do anything with analog circuitry, you need to know i, imaginary numbers is what this is about, to calculate some of the wave forms, some of how the way the circuitry evolves over time.

It's used in real time weather navigation, to do the calculations based on Doppler radar, things like that, and of course, my favorite topic, the reason we're here, to talk about the Mandelbrot set. " But I was like, "But you know, there's not enough time to talk about that now, it'd take me a little bit of time to talk about it.

" And the math teacher said, "Well, Friday we have our computer science club, do you want to talk about it there?" And it was Wednesday. And I was like, "Uh, okay, I'll throw something together. " That's where this talk came from. First I want to show a few slides and talk about just the concepts we're going to go into.

The Mandelbrot set, the reason it's fascinating, is because there are a few simple rules that we're going to talk about to generate it. But it generates infinite complexity. If you saw that video that was playing as you walked in, you can keep zooming, and zooming, and zooming, and there is never a bottom.

There's a top, which is this, and we'll talk about where that comes from. But as we zoom in, you see just more and more rich detail. And you see the same shapes reappear in mixed up ways. Like you see this thing this is called the Mandelbrot Beetle that shape up top, or the Bulb.

The various parts of the diagrams have names we'll go over. And as you zoom in, you just find these shapes all over and over. I mean, we're looking at something, well you'll understand what we're looking at in a minute. But this is the notion of self-similarity, and this is the fractal geometry of nature.

If you look at something like a galaxy, right? That has a lot in common, even though it's completely different forces at work, to create a hurricane. And again, looks very similar but completely different forces at work to create the foam in the top of our latte.

It's the fractal geometry of nature controls how plants grow, controls how the shape of broccoli happens to look a little bit like your lungs and the way it branches out. All that stuff is the fractal geometry of nature. There are three, three concepts I want to talk about.

One is trending, from zero to infinity. The other's imaginary numbers. And the other is mapping to a plane. So let's talk about trending, 2*2, what's that? Okay. Multiply it again, what's that? Eight. We keep doing that over and over, we trend towards infinity.

Right? That's third grade math. Interesting degenerate case here is at 1. We can multiply by one forever and it just stays at 1. What happens if we. 5*. 5, over, and over, and over? That trends to zero. Does it ever get there? No. We just get smaller and smaller numbers.

So let's talk about velocities. . 9, where does that trend? So on this side of 1 it trends towards zero, over and over. . 9,. 9 goes to. 81,. 73 something, blah, blah, blah. What about. 99999? That also trends to zero but it does it more slowly. If we were to somehow take into account how many times it takes to cross some threshold.

Again, slower still. What about that one? That's trending towards infinity, but very slowly. So here's the concept of trending, numbers other than 1 will trend towards 0 or infinity at different velocities. And for real numbers, like,. 5, 1. 2, 7. 3, it's pretty straightforward, right? I can, now that we know 1 is the boundary condition I can throw a number out and you'd know what it is.

So let's set that aside for a minute. That's the first idea we need to know. Let's talk about squaring numbers. So 2*2 is 4. We can also write that little mathematical notation here. We can say 3 squared is 9. - 3 squared is also 9. That's interesting, we'll come back to that.

Let's talk about square roots. We have 9, of course 3 squared, we saw that written the other way a second ago. But we have the reverse notation, just like we can add and subtract, you know as kind of an undo button for math. We can multiply and divide as kind of an undo button for math.

[ ... ]

Nota: se han omitido las otras 3.701 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.