# Posts Tagged ‘math/science’

## Synthetic Biology

Posted by Patrick on November 30, 2012

Last week, Quirks and Quarks had a segment about synthetic biology [1]: a new branch of science whose goal is to design and construct new biological functions and systems not found in nature. [2]

The explicit assumption of this branch of science is that DNA is a kind of computing code.  Indeed, Canadian researcher Andrew Hessel says that DNA is a “tremendous medium for encoding information: it’s far more robust and compact than even electronic data storage, and it’s really the code of life.  So we’re looking at it through the lens of computing [...], which I think is a remarkable shift. [1, 2:17]  Seen through this lens, these researchers want to reprogram living organisms to make them do new and useful things.  Imagine, for example, “bacteria that breath CO2 and pee straight diesel fuel” [1, 2:58].  These researchers believe that this technology could save the world.

Whether or not you get excited by the possibilities that we may finally live in harmony with nature (by controlling it even more drastically), two things concern me.  The first is implicitly outlined in one of Hessel’s comments:

“I think this is the most powerful technology we’ve ever made.  The only thing that I think compares to it is electronic computing.  And really, we’ve seen how electronic computing has revolutionized and continues to revolutionize the world.  I think this is even more powerful because now we’re talking about programming not electronic processors, but living processors.”  [1, 3:48]

This technology is the most powerful we’ve ever made… Are we wise enough to foresee all the consequences of reprogrammed organisms?  At one level, DNA works like computer code and new (and better programs) can be written, but biological organisms also interact with one another and evolve.  Do we seriously think we’re smart enough to understand all these interactions?  Taken as a whole, this new field would be orders of magnitudes more complex than the entire Internet, which is by no means simple.  This time though, programming “bugs” may be more dangerous than simple computer glitches.

Maybe you think that spreading FUD is not the most compelling line of reasoning.  After all, the same has been said about other fields of science before.  Nuclear physics was supposed to lead to global planetary destruction, and we’re still here.  Fare enough.  Maybe we are (or will become) smart enough…

My second concern is not so much about the technology itself but the legal infrastructure surrounding it: we live in a world where companies like Apple Inc. patent things like “rectangle with rounded corners”. [3]  Patents on software are just as ridiculous and detrimental for innovation since:

[They] block individuals from taking part in [...] development and distribution [...]  This may not seem relevant to most people but it’s the same as the freedom to write a book. Most people will never write a book, but some people will and society as a whole benefits from what is made by the few [...]  [4]

If the evolution of synthetic biology is inevitable, I hope it doesn’t follow the insane route that commercial software and electronic devices have taken.  Exploring such a powerful science requires openness, collaboration, and governmental oversight, not secrecy and commercial control.  If we are going to engage in geo-engineering and massive biological reprogramming, the legal model of the Free Software Foundation [5] is probably the best place to start, if not the only one that will be safe and sustainable.

1. Quirks and Quarks: Using DNA to Save the World,
<http://www.cbc.ca/quirks/episode/2012/11/24/november-24-2012/#4>
2. Wikipedia: Synthetic Biology,
<https://en.wikipedia.org/wiki/Synthetic_biology>
3. The Verge: Apple finally gets its patent on a rectangle with rounded corners,
<http://www.theverge.com/2012/11/7/3614506/apple-patents-rectangle-with-rounded-corners>
4. End Software Patents,
<http://endsoftpatents.org/>
5. Patrick Truchon, Free Software,
<http://ptruchon.pagekite.me/wiki/doku.php?id=freesoftware>

## Math Games: Simulators and Instruments

Posted by Patrick on September 6, 2012

I’m in the process of changing my mind about a topic I don’t know much about: the gamification of learning, in particular, the gamification of mathematics learning.

Here’s my preconceived idea about math games: it’s sugar coating.  There’s something you have to practice; it’s hard, and you’re not very interested. So to make it less painful, we’ll add points you can earn for each correct answer (or better yet, monsters you can defeat by factoring polynomials, with cool graphics and stuff).  Hopefully, you’ll want to sit in front of your computer 10 minutes longer than with your textbook to practice your math.  In my opinion:

• The math in these games has nothing to do with the context of the game (which is often true of textbook questions too mind you [2]).
• These games do nothing to foster internal motivation and appreciation of mathematics.
• They focus on skills, not mathematical and conceptual thinking.
• They are really just fancy worksheets with blinking lights and noise to keep you awake.

I’m realizing now that that idea is a bit of a Straw Man.  In a Webinar [1] he presented back in January, Keith Devlin (@profkeithdevlin) clarifies what math games have been, are, and can be.  He uses the analogy of a flight simulator, or a music instrument to convince us that well designed math games could be invaluable tools to help students investigate abstract ideas in a world that makes them more concrete.  He doesn’t want math games to replace instructions, instead he wants them to be a complimentary tool of discovery, where students can think mathematically without having to worry about the notation.

In one of his previous books, Devlin argues that what makes math hard is its level of abstraction.  The logic is often simpler than that of a soap opera. [3] Now to extrapolate a little bit from Devlin’s presentation, it seems to me that a good  way to teach mathematics would be to:

1. Use well designed games to explore mathematical thinking and logic in a context that is intuitive and non-symbolic.
2. Slowly introduce symbols and layers of abstraction.
3. Practice on synthesizing these two aspects.
4. Repeat with new concepts…

There’s a catch though, which Devlin mentions briefly: It makes no sense to test students on the second part if they are still on the first part.  Can you imagine if part of the assessment process was to have students play a game so we could see what they struggle with?

1. Keith Devlin, Game-Based Learning Webinar Recording
<http://www.instantpresenter.com/WebConference/RecordingDefault.aspx?c_psrid=E955DD80854D>
2. Dan Meyer, [PS] Critical Thinking,
<http://blog.mrmeyer.com/?p=12582>
3. Keith Devlin, The Math Gene,
<http://www.amazon.com/The-Math-Gene-Mathematical-Thinking/dp/0465016197>

## Driving Me Nuts

Posted by Patrick on February 16, 2012

Yesterday, Peter (@polarisdotca) asked this question:

Why does tying knot in strip of paper form a regular pentagon? Why not 6, 7,…? Why regular? Anyone have intuitive explanation? #wcydwt [1]

Being a rock climber, I like knots; I DEPEND on knots!  Being a math and physics teacher, I like puzzles; I DEPEND on puzzles.  So naturally, this one peaked my interest.  Here’s what I’ve got so far:

The first step was to recreate the experiment, so I started by making a regular knot (actually called the “Overhand knot” [2]) with a strip of paper:

Then, I tried to flatten it as tightly as possible without breaking it:

It’s a little loose at the “exit points”, but we can easily imagine that the “ideal case” would indeed be a regular pentagon (regular because all sides are the same lengths; pentagon because it has five sides).  So now: why is that?

Intuitively, I think there can only be five sides because there are three folds and two exit points, for a total of five.  That’s how the knot is made, by folding the rope three times onto itself:

Here’s what it looks like when unfolded:

Three of the sides are from folding, and two of the sides are just the edge of the strip of paper, which correspond to the exit points.

Why does it have to be regular though?  Is it because that’s the most compact configuration?  Is this shape the solution to some optimization problem (like greatest ratio of SurfaceArea-to-Perimeter, which minimizes some energy function or something…)

My next question was: how would a Figure-Eight knot [3] behave?  I was not only interested in this knot because I probably use it more often than the overhand knot, but because my trick to make it is to start it like an overhand knot, then finish it an extra half turn later (ie. that would add an extra fold in the strip of paper!)  Could this lead to a 6-sided figure?
Here it is loose:

And flattened:

Yeap: four folds and two exit points.  Here’s the weird thing though: one of those exit point is not even “connected” to the other sides:

Why is that?!  Also if I could make it perfectly, would it also be a regular polygon? or is it intrinsically elongated?  Thanks Peter!  This puzzle is driving me nuts!

1. Peter Newbury’s Tweet:
2. Animated Knots, Overhand Knot,
<http://www.animatedknots.com/overhand/index.php>
3. Animated Knots, Figure 8 Bend,
<http://www.animatedknots.com/fig8join/index.php>

Posted in Uncategorized | Tagged: | 1 Comment »

## CO2 Levels (a depressing story)

Posted by Patrick on November 27, 2011

A few days ago, I listened to an ABC radio podcast on All in the Mind entitled “The case for moral enhancement”. [1] I was expecting the ethical minefield of eugenics to be discussed (which it was), but I was surprised by the turn of the conversation towards the end: 0ne of the reasons why we’d want to enhance our moral compass is because we didn’t evolve to deal with problems that affect the entire population of the planet.  In particular, one of the professors grimly said that “it’s wishful thinking to think that people are going to voluntarily deal with climate change”.  Heavy stuff!

Today it was CBC radio’s Quirks and Quarks turn to tackle the issue of climate change. [2] Again, it was nothing short of depressing.  Very…  Depressing…  One of the guests said that our inability to deal with the problem not only means that we’ll face catastrophic repercussions, but it also says something pretty grim about ourselves: “Can we not deal with an ethical issue about the lives of billions of people around this planet?”

Because I like to understand the information contained in graphs, I clicked on the one posted on the Quirks page [2], which led me to its source on wikipedia [3], which lead me to the source of the raw data [4].  I decided to import that data into a spreadsheet to see what information I could extract from it.

Using two simple functions, and a method called “least squares” [5] to scale them properly, I managed to find the proper parameters that model the CO2 concentration as a function of time.  Visually, the orange graph (the model) follows the blue graph (the data) pretty well, so the model I found is pretty good (within that range of time anyways).

I found the equation of the model (the orange graph) to be:

$\LARGE \text{C} = 270+2.7\sin\big(2\pi(t-0.06)\big)+45 \cdot 2^{(t-1958.208)/37}$

It looks complicated, but there’s basically three pieces to this function, each with their own particular meaning.

The first part is just the number 270.  What it means is that if we go back in time by more than a few hundred years, the average CO2 concentration in the atmosphere would have been around 270 ppmv (compare that to today’s 390 ppmv !)

The second part is responsible for the oscillation of the concentration due to seasons.  The number 2.7 in front of the sine function means that the concentration increases from its average value by 2.7 ppmv in the winter and decreases by 2.7 ppmv in the summer.  So the total variation (of about 5.4 ppmv) is pretty small (compared to the average increase).

The third part is what we’re responsible for.  It says that the difference in CO2 from the ancient average of 270 ppmv will double every 37 years.  This is a bit tricky so here it is again: if you look at the concentration of CO2 today and subtract that from what it was hundreds of years ago, that difference will double in 37 years time.  For example:

• The concentration was around 315 ppmv in 1958, which is a difference of 45 ppmv from 270 ppmv.
• 37 years later (in 1995), the concentration was 360 ppmv, which is a difference of 90 ppmv from 270 ppmv (double the previous difference of 45 ppmv)
• Another 37 years later (in 2032), the concentration should be (if the trend continues) 450 ppmv, because there should be a difference of 180 ppmv from 270 ppmv ( double the previous difference of 90 ppmv)
• And in 2069? 720 ppmv, because it’ll be 360 ppmv more than 270 ppmv…

So according to this model, if the trend continues (ie, we keep doing what we’re doing now), the atmosphere will reach levels of CO2 comparable to that of the Eocene–Oligocene extinction event 34 million years ago (which were around 760 ppmv) [3] in a time scale of a few 37-year periods!  And I thought the podcasts were depressing…  The next graph shows this extrapolation in both direction.  The model (in orange) is graphed (without the seasonal variations) between 1750 and 2100 with the actual data (in blue).  The future looks completely crazy, but other data suggest that the past is actually pretty spot on. [3]

Now, to be fair, the assumption that “we keep doing what we’re doing now” implies at least two things that are very unlikely:

1. Our population will continue to grow exponentially.
2. Our resources of fossil fuels will continue to match our growing demands.

In reality, we’ll either find ways to turn this around, or we’ll suffer from other problems that will curb our population explosion and our ability to consume so much fossil full.  One thing is certain: we can’t let that orange curve go that high.

1. All in the Mind, The case for moral enhancement,
<http://www.abc.net.au/rn/allinthemind/stories/2011/3360688.htm>
2. Quirks and Quarks, The Rocky Road to Durban,
3. Wikipedia, Mauna Loa Carbon Dioxide-en.svg
<https://en.wikipedia.org/wiki/File:Mauna_Loa_Carbon_Dioxide-en.svg>
4. NOAA ESRL DATA,
<ftp://ftp.cmdl.noaa.gov/ccg/co2/trends/co2_mm_mlo.txt>
5. Wikipedia, Least Squares,
<https://en.wikipedia.org/wiki/Least_squares>

Posted in Uncategorized | Tagged: , | 1 Comment »

## Conceptualizing Physics

Posted by Patrick on June 27, 2011

The following two videos address one of the questions that I ponder the most: what are the best ways to help students understand concepts in mathematics and physics?  Although both speakers reach similar conclusions, they each reveal many other insights that are also very important.  Here are a few lessons that I take from each.

Derek Muller (@veritasium) shows that:

• Students new to physics come with misconceptions they think are true (about the world of physics).
• Because of this, they don’t pay their utmost attention to the videos (which might as well be traditional lectures).
• Which causes them to think that what is being presented is the same as what they think.
• So they don’t learn anything.
• While getting more confident in their misconception.

But his interviews with the students also showed something else:

• Students are bad at judging how much a video (or lecture) is helping them learn.

This part I found very interesting.  Indeed, the “clear” videos didn’t help them learn as much as the “confusing” ones.  Although Derek doesn’t make that leap, I think this applies equally well to traditional classroom lectures.  Further more, it also suggests that students’ evaluations of teachers are (at best) an incomplete metric of teachers effectiveness, if not a completely bad one.  Of course, it doesn’t mean that the way to help students is to be as confusing as possible, but now I’m wondering if the good feedback I tended to get about my teaching was such a good thing…

In essence, Derek says that for students to really learn physics, they have to engage and struggle with the concepts on their own terms.  Delivering information is not sufficient for learning.  Dr. Eric Mazur (@eric_mazur) also comes to the same conclusion but in the context of the lecture hall:

This time, Dr. Mazur breaks down learning into two parts [3]:

1. Delivery of information
2. Synthesis of information

Traditionally, classroom lectures have focused on the first part, but it is the second part that constitute true learning.  Thus, he assigns readings ahead of time (or finds other ways for students to get the information before they enter the classroom) so that students can spend more time in class synthesizing information instead of being passive recipients.

Dr. Mazur also reaches a second conclusion: Conceptual understanding leads to good problem solving abilities, but good problem solving abilities doesn’t necessarily implies conceptual understanding.  This strikes at the heart of traditional assessment methods.  Simply giving problems to solve doesn’t discriminate between those who understand what’s going on, and those who have memorized an algorithm they don’t really understand.

In my practice, I always try to emphasize the “why” of things over the “how” (mainly because I have a bad memory myself).  It’s encouraging to see research that validates that philosophy, and enlightening to see the various methods used by these inspiring educators.

• Update: I added a reference relating to Howard Gardner that is very relevant to this post. [4]
• Update 2: I added a reference to an article describing the results of team of researchers at UBC that supports what Dr. Mazur is doing. [5]

1. Veritasium, Khan Academy and the Effectiveness of Science Videos ,
2. Eric Mazur, Memorization or understanding: are we teaching the right thing?
3. Mazur Group Publication, Peer Instruction: Making Science Engaging,
<http://mazur.harvard.edu/publications.php?function=display&rowid=538>
4. The Daily Riff, Misconceptions About Learning & Teaching
<http://www.thedailyriff.com/articles/howard-gardner-shares-his-just-released-97.php>
5. ScienceNOW, A Better Way to Teach?
<http://news.sciencemag.org/sciencenow/2011/05/a-better-way-to-teach.html>

## How to Imagine More Than 3D

Posted by Patrick on August 18, 2009

This summer, a friend of mine and I were talking about science fiction, and how one interpretation of quantum mechanics (as we understand it) says that everything that can happen does in parallel universes. In his book, “The Elegant Universe”, Brian Green attempts to explain in layman terms the ideas of String Theory. Green also made a good documentary about this subject.

In the “Multiple Dimensions” segment of the documentary [1], he explains that the mathematics of String Theory requires 6 extra dimensions to the 3D of space and 1D of time that we feel, and that the only difference between these extra dimensions and the three we know is their “shape”.

I’ve watch this documentary several times over the past few years, and I’ve never really been able to “picture” these extra dimensions in my mind, until (maybe) today. Rob Bryanton, author of “Imagining the Tenth Dimension” has this really clear animation on his website [2]. Basically:

• Then draw another point somewhere else and connect them to get a line in 1D.
• Then draw another point somewhere off the line to get a different direction thus creating a 2D space.
• Then instead of imagining “height”, stay in this flatland and imagine a “worm whole” that takes you from one point on this sheet to another without traveling on the sheet. You’d have to travel in the 3rd dimension to do that.
• Now imagine this 3D environment as if it were a point traveling in a straight line (through time), that’s the 4th dimension, which looks like the 1D line from above except the “points” it connects are actually 3D spaces. (Now we’re in 4D)
• If you imagine an alternate future to the one you actually have, you’re imagining a different ending point which is off the line your drew, so you’re creating a 2D space of possible universes (We’re now in 5D).
• If you jump from any of those points in these possible universes without traveling in this 2D space of possibilities, you’d need an extra dimension (We’re now at 6D).
• Now imagine all of these possible universes with all their different endings as a single point. It seems that we can’t imagine much more than that. I mean, what else is there than the sum of all possible universes? Well, all these universes started from the same Bigbang, so now we can imagine a different Bigbang with all its different possible endings. We draw a line between these two sets of universes to get a line in 7D.
• We imagine another Bigbang and its endings off that line to get a 2D space of different Bigbang-with-alternate-endings points (Now we’re in 8D).
• Again, if we travel from one of these points to another without touching the surface of that 2D space, we’re using an extra dimension to do it (Now we’re in 9D)
• Finally, we’re done. We have imagined all possible beginnings, with their respective possible endings, and every ways to travel between them as a 9D space. We can step back and look at that space as if it were a point now residing in 10D.

This seems to be a very different picture than the one Green tried to explain in the Nova documentary, but in the “Parallel Universes” segment Green explains how the extra dimensions maybe used to contain the other universes. Maybe, they’re all talking about the same thing then…

I really have no idea though. As much as I love thinking about all that stuff, I really have no expertise in any of it. So, if any of you ever become string theorist, please invite me for lunch one day to tell me what’s really going on.

1. Nova, The Elegant Universe, <http://www.pbs.org/wgbh/nova/elegant/program.html>
2. Imagining the Tenth Dimension, <http://tenthdimension.com/medialinks.php>

## Ideas Too Powerful to Handle?

Posted by Patrick on June 17, 2009

Pre-reflection

Today in Math 11 we will be watching a documentary [1] about four scientists who had such powerful ideas that they went crazy (some of them even committed suicide). Before we find out more about what these people saw, I’d like you to think about the following questions.

• Scientific laws govern (or describe?) how the universe operates. These laws are expressed mathematically. What do you think is the relationship between mathematics and the universe we live in?
• Do you think mathematics is discovered or invented? Think of the slope of the tangent at a point (using the slope of a secant when we let ∆x -> 0). This idea is at the centre of Calculus. Was it invented or discovered? Think of a computer algorithm (which is just a complicated set of logical operations). Are computer programs invented or discovered?
• Do you believe there is an built-in limitation to mathematics’ ability to explain (or describe?) the universe? Do you think there’s a built-in limitation to what computer programs can do?
• Do you believe there is an built-in limitation in our (human) ability to understand mathematics and its consequences.
• Do you think a perfectly logical being could deduce all the laws of mathematics, or does it take something more (intuition, imagination, etc…)
=============================================
=============================================

Preview of five great mathematicians, physicists, and philosophers:

Georg Cantor (1845-1918) [2] realized that there are different “sizes” of infinities. In fact, he proved that there is an infinity of infinities. For example, there are an infinite number of integer numbers, but between any two intergers, there’s an infinite number of fractions, and between any two fractions, and infinite number of irrational numbers… Cantor tried his whole life to find the relationship between the sizes of infinite sets in the form of what is now called the “continuum hypothesis”. He never succeeded to prove or disprove it.

Ludwig Boltzmann (1844-1906) [3] was the founder of statistical mechanics and thermodynamics. He shook the world of physics because instead of assuming a deterministic model of the universe, he allowed for probabilistic laws. He pioneered the concept of entropy, and his theories gave time a direction. “Boltzmann had in essence, captured mortality in an equation”.

Kurt Gödel (1906-1978) [4] came up with two “incompleteness theorems” which prove that any complex systems of arithmetic has inherent limitations. In these systems, there will always be true statements which can’t be proven true, and it’s impossible to know which one they are.

Alan Turing (1912-1954) [5] made Gödel’s abstract ideas more concrete by thinking about the inherent limits of computers (since they are bound by logic).

All four of these men felt a deep connection between the abstract questions they were investigating and the big questions of consciousness and “ultimate reality”.

In contrast, Richard Feynman (1918-1988) [6], one of the greatest quantum physicists, was very comfortable with the unknowable and didn’t do physics to discover the “ultimate reality”, but simply to “find out more about the world”. [7]

The videos:

Watch BBC’s Dangerous Knowledge [1] first and end with Feynman’s. [7]

• How are your opinions about mathematics, logic, and human consciousness clearer, or more confused now?
• Compare and contrast Cantor, Boltzmann, Gödel, and Turing’s *attitude* about their questions with Feynman’s. What is your opinion on how a “good scientist” should approach a problem?

2. Wikipedia: Georg Cantor, <http://en.wikipedia.org/wiki/Georg_Cantor#Continuum_hypothesis>
3. Wikipedia: Ludwig Boltzmann, <http://en.wikipedia.org/wiki/Boltzmann>
4. Wikipedia: Incompleteness Theorem, <http://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems>
5. Wikipedia: Alan Turing, <http://en.wikipedia.org/wiki/Alan_Turing#University_and_his_work_on_computability>
6. Wikipedia: Richard Feynman, <http://en.wikipedia.org/wiki/Richard_Feynman>

Posted in Uncategorized | Tagged: | 2 Comments »

## I, Robot and Game Theory

Posted by Patrick on April 8, 2009

Cover of I, Robot illustrates the story “Runaround”.

I, Robot
, by Isaac Asimov [1], is a collection of nine short stories where robots and positronic computers follow three laws [2] supposed to protect humans:

1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey orders given to it by human beings, except where such orders would conflict with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

The theme of the movie was probably based mostly on the last story, called The Evitable Conflict [3]. In this story, powerful positronic computers around the world have the task of optimizing the world’s economy. Naturally, such a complex problem cannot be solved without making trade offs and sacrificing the well being of some individuals for the greater good. As such, the machines come to generalize the First Law to mean: “No robot may injure humanity or, through inaction, allow humanity to come to harm.” The three laws, which were supposed to prevent robots from taking over, in essence, dictate them to do so (for our own good).

In the movie, the detective uncovers this scheme soon enough, and with the help of a non-three-laws robot, manages to shutdown the main computer in time. In the book, however, humans realize that the solutions the machines are implementing are the best, and any deviation from their scheme would leave us worse off overall. And so, they come to accept the benevolent (and selfless) dictatorship of the machines.

When I read this story, I wondered if a “best solution” could exist to such complex problems as “optimizing the world’s economy”. I was recently reminded of this question after watching political scientist Bruce Bueno de Mesquita speak at TED [4] about how game theory [5] can be used to predict the most likely outcome of a situation where many players are trying to optimize their own self interest.

In the language of game theory, it seems that Asimov’s machines were finding some kind of equilibria. But with all the machines cooperating not for their own self interest, but for that of humanity, would game theory be the proper tool to use?

Finally, Cory Doctorow puts a spin on things with his I, Robot [6], and imagines a world divided into two: In the West, robots are bound by the three laws; in the East, the are not. Maybe because of this division, his three-laws-bound robots don’t seem to generalize the first law. His non-three-laws robots, however, open up a whole new set of possibilities…

1. Wikipedia: I, Robot, <http://en.wikipedia.org/wiki/I_robot>
2. Wikipedia: Three Laws of Robotics, <http://en.wikipedia.org/wiki/Three_Laws_of_Robotics>
3. Wikipedia: The Evitable Conflict, <http://en.wikipedia.org/wiki/The_Evitable_Conflict>
4. TED: , <http://www.ted.com/index.php/talk/bruce_bueno_de_mesquita_predicts_iran_s_future.html>
5. Wikipedia: Game Theory, <http://en.wikipedia.org/wiki/Game_theory>
7. Wikimedia File, <http://en.wikipedia.org/wiki/File:I_Robot_-_Runaround.jpg>

## Hiding money…

Posted by Patrick on March 12, 2009

How much money do you think you’d be able to hide in your room? What do you think 1 million US$looks like compared to 1 billion US$ or even 1 trillion US\$ ?

1. Pagetutor, <http://www.pagetutor.com/trillion/index.html>

## Mandelbrot Set (the song)…

Posted by Patrick on February 26, 2009

This started with a song by Jonathan Coulton [1] that I didn’t really understand. After exploring a few wikipedia and youtube pages, I thought I’d share my results so that you too can appreciate the talent of this geeky musician…The idea is simple: What is the shape below, where does it come from, and how is it drawn?

Picture of the Mandelbrot Set from Wikimedia Commons [2]

First, here are a few things to notice about this picture: it’s a fractal, which means that if you zoom in on the edge of the shape, you’ll always see some kind of spiky “structure”, no matter how close you get. The animation that follows illustrates this very well. From Wikipedia:

Regardless of the extent to which one zooms in on a Mandelbrot set, there is always additional detail to see. During the twelve-second zoom in the animation [below], the set becomes magnified eleven-million fold. Thus, assuming the first frame is life-size at 45 mm across, a carbon atom would comprise 36 pixels in the final frame. [3]

11 million fold zoom in. From Wikipedia [3]

Also, you’ll notice that the axes are not the typical x-axis and y-axis we are used to seeing in a Cartesian coordinate plane. While the horizontal axis holds the good ol’ real numbers we all know, the vertical axis holds weird imaginary numbers. These numbers are called imaginary because they are no-where to be found on the real number line, but they are still useful (somehow). Indeed, these numbers arise from trying to find what number multiplied by itself gives -1 ? The same question could be framed algebraically as: What is x so that:

$x^2 = -1$

Clearly, x = 1 doesn’t work, but neither does x = -1 since two negative numbers multiplied together give a positive number. So, since no real numbers answer that question, mathematicians invented (or discovered?) an imaginary number that would do it, and they called it “i”. So now we have:

$i^2 = -1$

meaning that:

$i = \sqrt{-1}$

To understand how the Mandelbrot fractal is painted, we have to understand how to multiply and add imaginary and real numbers together. By adding real and imaginary numbers (as if they were different terms) we can make complex numbers that can be plotted in the complex plane. For example, the number 3 + 2i would be plotted as the point (3, 2).﻿To multiply two complex numbers together, we use the same algebraic rules, but we keep in mind that i squared is -1. For example:

$i (a+ib)^2 = (a+ib)(a+ib)$

$i (a+ib)^2 =a^2 + 2iab + i^2b^2$

$i (a+ib)^2 = a^2 - b^2 - 2iab$

Now we are ready to describe the rule that governs the drawing of the Mandelbrot Fractal. The

idea is to ask if individual points should be painted black, or left white (ie, ask if the point is in the Mandelbrot set or not). To find out, take the point you want to test (let’s call it “c”) and square it. Then you add c to the result, and square it again. Then add c and square again. And so on. If you can do this forever without the answer going to infinity, then that point is in the Mandelbrot set and should be painted black.

Mathematically, I think this could be said like:let:

$z_1 = c$

$z_n = z_{n-1}^2 + c$

If $\left| z_\infty \right| < \infty$ , then c is in the Mandelbrot set.

After you’ve “tested” all points in the plane, you get the Mandelbrot Fractal… An easy example of this would be to start with a real number. Imagine c = 0.2

$z_1 = 0.2$

$z_2 = z_1^2 + 0.2 =0.24$

$z_3 = z_2^2 + 0.2 = 0.2576$

$z_4 = z_3^2 + 0.2 = 0.2664...$

$z_5 = z_4^2 + 0.2 = 0.271...$

$z_6 = 0.273...$

$z_7 = 0.275...$

$z_8 = 0.276...$

$z_9 = 0.276...$

and so on… Since the sequence doesn’t blow up to infinity, the point 0.2 is in the Mandelbrot set.

The point i is also in the Mandelbrot set:

$z_0 = 0$

$z_1 = i$

$z_2 = i^2 + i = -1 + i$

$z_3 = (-1 + i)^2 + i = \left( (-1)^2 - 2i - 1 \right) + i = -i$

$z_4 = (-i)^2 + i = -1 + i = z_2 ...$

But the point 1 isn’t:

$z_1 = 1$

$z_2 = 1^2 + 1 = 2$

$z_3 = 2^2 + 1 = 5$

$z_4 = 5^2 + 1 = 26$

$z_5 = 26^2 + 1 =$ BIG

Finally, it’s time to appreciate the song. To further help visualize the lyrics, a Cornell University student made a really cool “black board animation” . Enjoy!

*Discretion Advise: The following song contains some coarse language.*
“Mandelbrot Set” by Jonathan Coulton [1], is licensed Creative Commons [4]