Thursday, November 19, 2009

Chaos from life

I really like the Logistic equation. It comes in a couple useful forms, the simplest is the iterative form that can be used to model a time discrete biological population.For instance if one has a population that produces new members at a rate “r” of the current population we can generate the new population by iterating the equation:

Where an+1 is the next years population, spawned from this years. “r” is obviously the fertility rate (or better the “fecundity” rate) . This equation just demonstrates an ever expanding population. Lets assume that there is an upper limit to the population given by some constant like “K”. Then one model of the population is given by the logistics equation:

In order to make it simpler I can define A=a/K or simply set K to 1 (which may appear weird, setting a population maximum to 1, but I can use units like “metric tones of wheat” or “boxcarloads of bunnies” so the maximum population of 1 represents more that one individual). This gives me the super simple equation:

This is the equation of a parabola. To show it is nothing special here is a plot of it. I choose a few different values for r to give a feel for what it does. It is no less elegant than any parabola.

We cannot get this equation to do interesting things until we begin using it iteratively.

What I mean by this is that we use the output of running the equation as the input of running the equation again. We do this over and over and see what happens. If we choose r-2.9 the iterations look like this:


If I clean off the first 500 iterations you can see that the oscillations shown in the fist graph have settled down to a single value. If I choose a value less than 2.d the iterations also settle down to a single number. With decreasing values for r this number decreases to 0 at r=0.

If I choose a value for r slightly higher than 3 this is what happens.

That’s right we get a stable oscillation between two values.

If I choose r=3.5 I get four values like in this graph:

If I choose an r=3.7 a bizarre thing happens here is the graph for the first 100 iterations:

It almost looks like there could be oscillations settling down to a pattern. If I just plot the iterations after say 100 you can see that they apparently do not.

This is cool. In fact there is an infinite level of complexity here. If I vary r from 0 to 4 and plot the values obtained for 100 iterations after iterating the function 1000 times I would get a picture like this.


I can stare at this picture for hours. Look at the areas where order appears to peek out of chaos. Is this a metaphor for life from the plot of an equation that rustically describes life? What about those apparent lines in chaos? I love to blow up the picture and look at the bits of it. The more it is enlarged the more complexity it reveals.

Part of the cool thing about this is that if people used the generally available computation methods available when I was born (slide rules!) then a person calculating this picture would only recently have finished. This is a pattern almost unknown to previous generations. Now one can buy a t-shirt with it printed on it.

Thursday, October 29, 2009

SLCM 2008

I signed up to run another marathon about a month back. I begin my two digit long runs in a few days and thought it would be good to remember what an actual marathon was like. I ran the Salt Lake City marathon in 2008 (it was my first marathon) and had written up a short report of it that I include bellow. (originally from 22 April 2008)

I ran the Salt Lake City Marathon this Saturday. It was my first marathon so my impressions are void of any comparisons between this and any other marathon. I’m writing this while my legs still feel the last bits of ache from the effort. I still remember the look in the eye of the volunteers who passed me half full cups of water as well as those who passed me cups that were half empty. I also wanted to write this out as an antidote to the ribbing and some heartfelt sympathy that I have gotten from people I know who do not think I finished. The timers of the Salt Lake City Marathon misfiled the results for the last 116 finishers (about 10% of the field) and have not replied to my numerous e-mails not only asking them to fix the problem but telling them how they could.


The race weather should have been perfect. Cloud cover, 50F, moderate humidity, not unlike a standard issue perfect Salt Lake City spring day. When the race started I felt a great leap of adrenaline up under the legacy bridge I could see heads begin to bob up and down. A couple of minutes later the crowd around me began to move. Then it stopped. Then it began to move again. We passed the speaker stack and the booming undifferentiated sound moved my viscera in ways indistinguishable from excitement. Still running slowly (The only speed I really run at) I passed my cheering family my oldest daughter began to run along side me on the outside of the barricades. By the time she stopped I was smiling with sense I had not achieved at any time on any training run.

The course is mostly flat feeling with one impressive mile plus drop at about mile fourish. There are some ups and downs other than the big drop but the wind that began blowing hard after mile 6 smoothed out my impressions of the terrain. If the wind was at my back (a good portion of the way after mile 15) it was as good as downhill. If the wind was blowing grit and dust into my eyes I mostly noticed the cracks and texture of the pavement. The big drop at mile fourish allowed me to just kick my legs out and pick up speed. I was flying, passing people whose memories of tortured quads kept them from flight. I was no longer bound by earth. The view across the salt lake valley and the mountains felt endless. Within an hour most views of the valley would be obscured by blowing dust that clung to every direction like an evil fog.

At the bottom of the big drop the half marathoners split off and there was no more crowd. I was back to earth. I still felt great but the sudden loss of 90% of the world’s population made me feel suspicious. Happy fit people would occasionally pass me with words of gleeful encouragement. I somehow felt that they were lining up to get a good look at me so that later they could say “you know that fat guy who died at the SLC marathon; I spoke to him just before he died”.

Then the wind started in earnest. To tell the truth the wind played a game of peek-a-boo around buildings and between other obstacles. It only came out into the open in the intersections where is waved garbage at the runners. Just after mile 14 the course turned onto the Van Winkle Expressway. I pulled off my hat to wipe my forehead and it felt like 120 grit sandpaper.

The Van Winkle expressway is a several mile segment of a four-and-more divided highway nestled into a suburban neighborhood. The runners had the road from the center grass strip to the crumbling edge of the shoulder. I wanted to run in the middle of the road, to own it for the few moments I ran down this section of the race. I kept catching myself veering off to the shoulder and toeing a clear path just to the right of the fog line. This section was perhaps the ugliest of the run and the one of the places I had the most fun. There was a place in my mind that wouldn’t just go play in the street. Most of the other runners that I could see also tended to the shoulder.

Unfortunately the neuroma in my right foot began bothering me after I left the Van Winkle expressway behind. I tried ignoring it for a couple of miles but it finally reduced me to a limp that made my walking pace appear fast. Perhaps I was paying for that marvelous downhill flight. I had to stop. I took off my shoe and massaged the bottom of my foot. The neuroma was bigger than I ever remember it being. It felt like a little gel packet of pain. I literally pushed it between the bones of my foot and it felt surprisingly better. I put the shoe back on and began to walk, then I began to run.

Even though the sun was muted by the duststorm I think the real clouds must have burned off by the time I reached mile 20. I could feel the radiant energy of the sun trying to touch me. The suburban streets in the several miles leading up to liberty park have big old trees lining them. There was real patchy shade. The warm-cool-warm of running through the shadows the trees cast was hypnotic. Unfortunately the neuroma wanted more attention. I knew what to do this time. I quickly found a seat that an apparently sagging runner made so comfortable looking with his “I’m not running another step” look on his face. I stripped off the shoe and sock, palpated the gel pack of pain, and was back on my feet in no time. I walked then ran then I saw Liberty Park. A mile or so later I passed through the 5K start and knew that I could finish.

With one more, this time protracted, stop to attend to the neuroma I was out onto the wide streets of downtown Salt Lake City. I began running faster and faster past places where I had only walked before. My neuroma began asking for more attention to which a small irritating voice in my head replied “I gonna get surgery and shut you up for good”. I began passing people, admittedly they were the struggling wounded at the far end of the race, till I turned into the final chute and performed a slow motion sprint across the finish. My wife and two kids met me past the finish. Each gave me a kiss careful to touch a little of my grimy grit encrusted coating as possible.

I had finished my first marathon. I finished it well under the six hour time limit for the race. It was kinda a big deal to me.

Within hours I could not convince myself to walk a single step. I became interested in what my finishing time was. I checked on the internet and found that AA sports had already published results for the marathon. Unfortunately my name was not on there. What had happened? Had I been disqualified for repeatedly taking off my shoe?

Since I am passingly familiar with common screw-ups in webpage maintenance I did some searching of the results server. The linked-to results were in a aptly named file called slcm08.htm in a directory called results/2008/. I found another file called slcm08.htm in a directory called results/2007/. I looked at this file and along with my results I found the results of 116 other slow runners like myself. I though all of us would like our results properly linked to so I e-mailed everyone whose e-mail address I could find associated with either the Salt Lake City Marathon or the timing company.

The next morning I asked my wife to pick up the Salt Lake Tribune when she went to the store (Sundays are a great day to get ones grocery shopping done in Utah). Every year the Tribune publishes an alphabetical list of the marathon finishers with finishing times. This list like the finisher’s medal is one of the proofs that remind people, after the pain fades, that they really did it. My name, and the names of the last 116 people, were missing. I emailed again, telling whoever would respond that they only needed to copy the file to restore the finishing times of almost one in ten of the finishers. Since it was Sunday I expected, and got, no response. I began getting sympathetic e-mails from friends who knew how long I had been training, had looked up the finisher list, and who were now telling me that there was always next year. I may have sent more e-mails to the organizers and timing company at this time.

On Monday I began getting the sympathy of my co-workers. I sent more e-mails. The only response I have gotten so far is from Scott Kerr. Scott is the president of the Marathon’s organizing group and actually the last person I expected to reply. He says that he has forwarded my e-mails to the timing company. So if you were one of the brave 10% who finished last your results exist on the timing company’s server, they just have to read some of the many e-mails they have gotten on how to fix the problem and they can fix it in about 10 seconds. If you want to see your results now go to:
http://results.racecenter.com/2007/slcm08.htm

Tuesday, October 27, 2009

Atheists suck

My Awesome Oldest Daughter (AOD) came home from her middle school yesterday so distraught she assured me repeatedly that “NOTHING IS WRONG” and that she was “OK”. Apparently one of her BFF had been told by A BOY in her carpool that AOD was “not a member of the LDS church and therefore a satan worshiper” and added that BFF should have nothing more to do with AOD. I should mention that this BFF has been on AOD to “just come and try out” a mormon Sunday service. What sane middle school student wants to sit in a mormon church for three hours on a weekend afternoon. I half believe this is a manipulative conversion plot by the BFF since a Satan worshiper turns to dust on entering a church or something.

Which leads me to say that atheists SUCK. There is not one other atheist at her middle school that she can conspire with. In fact over 95% of the student body of her school is mormon. In 1996 the mormon prophet of god who speaks directly for god to the member of the church declared that "The new battle is one against atheism.". I guess that middle school children are the foot soldiers. Who is there to protect AOD? Should she convert to avoid continued harassment and to gain a measure of social acceptance. Those of you who do not remember middle school might think these things trivial. Those of you who remember realize that middle school children would sell their soul just to eliminate a few pimples.

With all the events and outreach programs and youth ministries and etc…. The world of fantasy and religion opens their arms to the emotional and, more importantly, social needs of middle school aged kids. What do atheists offer? As far as AOD is concerned just loving parents and other useless stuff.

There is a list that I have found great pleasure in. It is called “Hundreds of proofs of gods existence”. Yet it lacks so many that would only make sence to a middle school student:

“Argument from social calendar
1) Evolution supposedly took hundreds of millions of years and god made the earth in seven days.
2)It is seven days to the dance.
3) Therefore god exists.”

Or

“Argument by crush
1) God started with just one man and one woman.
2) [Insert name here] is the only [boy/girl] that exists for me.
3) Therefore god exists”

Or (most depressing)

“Argument from teen angst
1) Mom/Dad do not really really understand me.
2) Someone who says they believe in god says they really really really understand me.
3)Therefore god exists.”