Monday, May 18, 2009

Complexity Lab Manual Introduction version8

back to top


If the question is, can life be simply a property of chemistry, then lets start off by exploring how complex life is. Lets go out there into a field or a park or woods or roadside and look at the plants. There are different kinds! I challenge you: can you find me 100 different kinds in an hour?

We can! In order to keep track we will tape some representative samples of each to pages in our plant press and in order to tell whether one is different from another, we will have to look closely. The leaves are arranged on the stems differently. some leaves have teeth or lobes. some are hairy, some smooth, some waxy.

Some of the plants are flowering, some have 4 petals, some 5, some 6.. some just a whole lot. some have 2 stamens, some have 3 or 5 or 10. there is every which way combinations. some have hairs below the flowers. some of the hairs (look REALLY closely with a hand lens) have sticky blobs on the tips!

Some of the plants are in seed, the seeds also have details, some have bumps, some have stems attached to them, some have hairs attached to the stems, some of the hairs (hand lenses again) are barbed... (6) Key Out 100 Plants In A Local Park

So far, we've found and described over 2 million different kinds of living plants, animals and microorganisms on this planet Earth. We can distinguish SO MUCH variety because there are SO many details in each organism to see. As far in as we look, with hand lens, with microscope, there are more and more details.

How does life become so detailed?

Surely one of the most interesting details is how animals behave. Lets go find some insects and keep them in a terrarium and play with them and let them eat and hop, fly around and watch how complex their behaviors are (lab2). You can do an ant colony, or a grasshopper or watch an observation beehive.

Don't be afraid to spend months or years watching and taking notes! Scientists have done this. For instance as of 1980, we've found 260 different behaviors in honeybees alone! In our own lives too, we have complex and subtle behaviors, but we don't usually give it much thought.
(4.5) List of 260 Skills That a Honeybee Has

To bring these observations to stark light, lets ask the question this way: what if i wanted to make a little robot that could mimic a honeybee with all those 260 amazing behaviors that a honeybee is capable of?


In the last 60 years, since WWII, we've begun to attempt mimicking life, by building computers to do computations that we are good at. We've even expanded to writing programs for things that no animal can do. We've even begun to build robots to physically mimic the capabilities of animals.

The levels of organization, complexity needed to do this is immense. Lets start off by looking at a digital electronics manual and notice how we can build a logic gate out of a few transistors, from 2 to 10 of them. Logic gates can do things like turn on only if two of its inputs are on (AND gate), or turn on only if its two inputs are different (XOR gate), or turn on if its input is off, and turn off if its input is on (NOT gate). Clever. We can build things out of these:

if we hook up a NOT gate to a piezoelectric crystal and capacitor so that the output of the NOT gate feeds back into its input with a delay. We get a logical inconsistency: if the gate through random static turns on, the signal is fed to its input and turns the gate off! This signal will feed back through and turn the gate back on and that...

It oscillates, the crystal helps it keep precise time, now we have a clock.

We can hook up more gates together and get a simple memory, if we signal it while it's input is on, it will remain on, if we signal it while its input is off, it will remain off.

now we can hook up a bunch of these together with more logic gates and put the clock input in and we can build a counter which in binary can count up to 8: 000, 001, 010, 011, 100, 101, 110, 111, 000, each digit feeds back to the input of the next digit with some xor gates to make that digit flip...

On and on it goes. we can build an addition circuit, a circuit that tells us whether binary number is bigger than another... the possibilities are endless.

we can put lots of memory bits together with decoders and make a long computer memory.

we can take our addition and comparison circuits and combine them with decoder circuits and the clock circuit to make a central processing unit for a computer

Notice the hierarchical levels. look at the pictures. a modern microprocessor CPU will have 1000s of circuits in it, millions of memory bits and gates...
(8) from logic gates to computer

The complexity doesn't stop there. Once we have our computer we can start programming it. Programming is easier than hooking circuits together and less technical so that we can build even more complexity.

Lets write a program in the machine code of our computer to sort a list of numbers. lets write a program to do a binary search for a number in the list and that tells us if it's there and how far along the list it is. we will explore a few of the basic building blocks of programs.
(61.2) write simple computer programs in machine code:

Now lets write longer programs. Notice that we will do it by 'chunking' them up into simpler processes which we've already written. This hierarchy is similar to the one we used to build up our computer from transistors. at each stage we have more complex parts to work with. (This process will become important if we want to discuss the origins of life from simple chemistry, simple atoms and molecules...)
(61.3) program John Horton Conway's game of life, Mandelbrot set, and Lorenz attractor

After you've gotten this taste, we will look at Lego Robots programmed to do complex tasks like chase each other, look for wall outlets to plug into or even play a game of soccer! Notice that the programs for these critters are THOUSANDS of lines long. They are made of HUNDREDS of smaller subroutines.
9) show them well programmed Lego bots

So can we program a Lego robot to even attempt to do what a honeybee can do? No. Well, at least we have some hints as to HOW COMPLEX a honeybee must be inside.


Scientists have dissected honeybees and have found that it IS complex inside. There are thousands of parts in there. WOW.

Imagine the process, the factories involved to build honeybee robots!
But honeybees aren't built in factories, they seem to develop from eggs, and when they hatch they get fed some pollen and presto, in 15 days a pristine complex honeybee. HOW? Well, we've managed to watch how animals develop, lets watch a video.
(16) watch videos of animal development

What did we learn from the video? The honeybee starts off as a cell. And then that cell splits into two, and then 4 and then 8 and then... 1024 of them. by now the cells are a little different than each other because that original cell was not simple, it had structures inside it. And now the cells start moving around and sensing each other and eating yolk and splitting some more, and soon they arrange themselves into more and more complicated structures, tissues, organs (more hierarchy) until we have a honeybee.

And even in adult animals, cells are still crawling around sensing things that are out of place and fixing things. Did you know that as you sit there and work on these labs, your neurons are sending out pseudopods all over your brain looking for new neurons to chat with? Is that how your personality grows and changes?

So we see that what makes us animals and plants marvelous is that we are colonies of living celled beings. And now the question: What are they?


Well, lets watch some. Some animals are made entirely of a single cell only. When it reproduces and splits apart, the two cells don't stay joined to make an animal, but go off on their own separate ways.

There are lots of single celled critters in pond water, lets look (lab 22). These cells are small, calculate how small, calculate how many would fit inside a honeybee. Yet, they are complex. See how many of the insect behaviors or honeybee behaviors you can catch some of these little guys carrying out. Searching for food, exploring, eating, swimming from trouble, swimming from or towards light, finding a place to settle.
(22) watch single cell pond creatures

But the real complexity lies in the behavior inside: digesting, calculating, regulating water concentration, growing, finding mates, etc...

So how do cells work? what are they? The bigger ones seem to have fluids flowing inside, and parts too, can we watch with a higher magnification? It's difficult, but scientists HAVE taken them apart and looked, here's an animated video of SOME of what's going on inside (lab 27). Notice the video leaves out the most important part! All those crazy molecules are surrounded by and interacting with little water molecules and water molecules help give the whole cell it's structure and help bounce all the parts around into their right places.
27) molecular video "inner life of cell"

What REALLY is all that made of? How do cells get it all in there? Lets grow some algae in only distilled water in a glass jar and see what happens. (lab 25) It grows! what on earth does it make itself out of? water? air bubbles? glass? where does the green come from? where does all the machinery come from?
25) grow oscillatoria in water and glass jar

We are going to have to go in yet another level! molecules, chemistry!

We will watch for two things: where does the dynamism come from and where does the structures come from?


When the question arises "how can life be JUST chemistry" I realize how little about chemistry the average person out of school knows. It is not JUST chemistry at all, but AMAZINGLY CHEMISTRY. Lets look. The first surprise is how MANY molecules there ARE in a single celled critter to make him work. Now we are beginning to observe physics without life in it, what can it do?

lets dump a few finely crushed paint flakes into water and boil it to kill all possible life in it and then watch under the microscope. What we will see after it all settles is that the tiny flakes are suspended in the water and are jiggling all around in crazy paths in what is called (after its discoverer) Brownian motion.

What's making them move? If we cool the water do they move less and as we heat the water do they move more (of course if we heat too much it will boil but that's another lab (34)) What we ultimately learn in physics is that heat is the motion of molecules and the paint fleck is jiggling around because many many tiny water molecules are banging into it. (lab 72.3)

Einstein showed how we can calculate the number of water molecules by observing this jiggling and Perrin did the observations and did the calculation: about 6X10^24 molecules in a cup of water! that's: 6,000,000, 000,000,000, 000,000,000!! 6million billion billion. too much to think about, so calculate how many would fit in one of the single celled critters you watched. do some division.

Still 10 billion billion in the largest cells! and a 100 billion in the smallest. you can try lab 18 to try to imagine a how much a billion is.

Another way to find out how small molecules are and how many there are is to spill a tiny drop of cooking oil onto a large bowl of still water. how small a drop do you need to cover the whole bowl? hard to do, might have to use a swimming pool indoors with no wind or waves. (lab 73.3)

from the Brownian motion experiment we realize also not only that there are so many molecules but that they are bouncing into each other 10^10 times a second so that's a lot of activity we get for free, before we even do any biology or chemistry or get energy flowing through things.

So what are molecules like? If we learn organic chemistry we find out that even a simple one like ethanol (alcohol) has complex behavior, it is like a little fuzzy sensing, calculating machine that can sense other molecules, distinguish between them and calculate how to interact with them in different temperatures, solvents, pH... Based on these calculations, It can absorb energy, connect with the other molecule, come apart, give off energy... (lab 72.2)

In fact we can watch a simulated movie of how these tiny machines can wiggle around each other with Brownian motion to come together and perform complex tasks. We can put a dozen different kinds of molecules together and they will be able to self assemble membranes into cages which catch food packets in cells and bring them inside. These are the Clathrin coated pits (31.2) Distributed Brownian Motion Machinery: Clathrin Coated Pits

Finally, if we get can tear a few electrons off of some molecules with intense heat and put them in oxygen, we can get a candle flame going. Play with it a little while and we will look at the complex set of reactions that are occurring. Even without life, we get a system of chemical reactions reminiscent of cellular metabolism! (lab 44)


Now that we know that the molecular clay is is so different than what we think of us clay to be sculpted or blocks to be built with, that the molecular world is intensely detailed and fluid, we are ready to ask: what kind of things are living cells. for if they are not made of inert motionless bricks, not inert dumb clay already they are interesting.

Now the Brownian motion is completely random, complete chaos, trillions of molecules doing their own thing, not coordinated. Where does the coordination come from, the order? Energy flow! When energy flows through a system it causes work to be done, patterns to form out of chaos and stability to happen.

Lets start with an obvious kind of energy flow. lift a bucket of water off the ground to a height of 4 feet. That took work on your part, you burned food to do it, and now that bucket of water has potential energy in it. It can do work. We will build water wheel below it on a bicycle wheel and let falling water spin the wheel. that's the work it does and the pattern it creates. As long as there's still water in the bucket, the wheel will spin. (lab 64.2.1)

Another example is a thermostat. build a waterwheel out west, and instead of spinning a bicycle wheel, spin an electric generator and create electricity. let that electric energy flow through a heater and we get warm. but wait, TOO warm, it needs some control. Let's look at our thermostat.

We Put a bimetallic strip controlling a mercury switch in the path of the electric current. when the heat heats the two metals they bend differently and the strip expands, tilting the mercury which falls away from it's electric contact, and the current is cut.

now the heater is off and the room cools, the strip cools, and thus contracts and the mercury then tilts the other way falls into the contact and starts the heater again. This system will oscillate back and forth (hopefully in smaller and smaller oscillations) till it zeros in on the temperature we set it at by our initial tilt of the whole system.

This is an example of a system far from thermodynamic equilibrium. It has energy flowing through it. some energy is dissipated as heat even in the thermostat (useless heat). And it maintains itself in a state of order.

It does so by a process called negative feedback. MORE heat than required makes the circuit go off creating LESS heat. if we had hooked up the mercury ball the opposite way so that as it heats up it tilts further towards the contact or as it cools off it tilts away then the system would either get hotter and hotter... or colder and colder, that would be POSITIVE feedback, or runaway, instead of the system zeroing in on it's goal. (the goal we set for it) (lab 64.2.2)

Another system that works like this with negative feedback is a door buzzer. the same negative feedback controlling a switch turning it off is involved. this time we design it so that it achieves a steady state of oscillation and makes a sound. Many musical instruments work this way also. (lab 64.2.3)

One more interesting twist as these are really kind of boring repetitive behaviors. Back to our waterwheel. we will poke holes in the bottom of the cups of our waterwheels and see what happens. Interesting chaos! (lab 64.2.4)
(64.2) chaotic waterwheel, thermostat and heater, door buzzer

Back to heat flow. Almost all visible activity on Earth is due to heat flow. The sun is about 5700degrees (that's Celsius, in Fahrenheit it's about 10,000 degrees) hot at the surface (enough vaporize any substance) and that temperature causes it to glow white light at us. This light shines on the Earth and causes it to warm up. It is a common misconception that what enables life on earth to exist, to act, is that it is bathed in this sunlight. Our next lab will show that this misconception is GROSSLY untrue.

Lets take this mini steam engine and light a fire under it. There it goes pumping away! You might suppose that the heat of the fire is what makes it run. But if i were to put it in an oven so that the whole engine is at the temperature of the fire, you might think, more heat even better!

NO. it stops running. On further investigation you find that your engine has TWO pistons one in contact with the hot flame, the other in contact with the cool air outside. It is the alternation of expansion of one piston (in the flame) and compression of the other piston (in the cold) that makes the work happen. essentially heat energy is flowing from the flame to the cold air.

And the same on earth. the only reason your air is cooler than the sun is that the earth is not totally surrounded by suns! there is much cooler outer space surrounding most of the earth. (if the earth were surrounded completely by suns it would eventually become as hot as the sun and completely vaporize!)

And of course we could hook this rotating engine to all sorts of machines, even a loom, and make interesting patterns with it. This is the essence of far from equilibrium systems, which we also call dissipative systems (since they all dissipate heat), that energy must flow THROUGH them from a source of high potential energy to a sink of low potential energy. In between interesting stable pattern occurs.
(33) show steam engine

We can reduce this to the simplest system without machinery: Benard convection. We will set up a shallow petri dish of water (or some more appropriate fluid) and heat it from below. the water will begin to warm on the bottom and thus expand and become less dense and flow to the top higgledy piggledy. Of course that displaces the water at the top which must sink. Note that in order for any of this to happen there must again, be TWO temperatures, hot and cold.

As we keep increasing the temperature of the flame below you would expect the water to move more and more violently till it's a roiling boil. Correct... except for one thing! at a certain range of optimal temperatures you get the benard convection cells arranging themselves into a stable interesting hexagonal pattern. water in the centers rises and then flows out and falls at the edges. You can play with the cells, mess 'em up, they are stable.
(34) Then Benard convection

All the interesting weather patterns on earth are formed because of convection (and rotation of earth see labs 35-39)

Heat and electricity are not the only forms of energy flow, there is also chemical energy flow. energy is passed from molecule to molecule as they react and move around in their brownian motion. In this example, the Bellousov Zhazotinsky reaction (lab 42) we will see that as energy flows from the molecules of high energy potential ( ) to a set of simpler molecules at low potential ( ) an interesting visual pattern of cycles proceeds. Energy flow can produce ORDER!
(42) The Beloussov Zhabotinsky reaction

Now this begins to approach what is happening in life, at root, life is a system of oxidation reduction reactions similar to these that are organized into patterns by chemical energy flow. It is important to note that the souce of the patterns is NOT the DNA! without energy flow running complex chemical reactions to replicate and repair the DNA, the DNA itself will decay as do all things eventually at equilibrium.

We can even combine heat energy flow: convection, with chemical energy flow and we get a flame (lab 44). Note the diagram of the complex cycles of chemicall reactions that occur in even the simplest methane flame.
(44) play with a flame

And finally lets go back to our waterwheel and add in some funcky feedbacks. poke holes in the bottom of our cups mounted to the bicycle wheel. what happens? crazy chaos! (lab 64.2)

Now, these labs bring us to the essence of complexity lab. We start with simple systems with random motions and let something simple like energy flow throgh them and we get complex patterns. Is this really possible to go from the simple to the complex? Throughout much of human intellectual history the answer was NO! The universe for early people's begins most complex, most perfect from an eternal MIND and THEN slowly runs down to simpler and messier patterns.

Now this certainly seems to be the case in most ordinary situations, things run down. And it is correct that we even have the 2nd law of thermodynamics to formalize it: In a closed system (no energy coming in or out, no things coming in or out) all order eventually runs down to randomness. And that is in fact what happened with our engines and convections and BZ reactions. In the TOTAL system of fuel, cold air, and game in between, the system DID in fact eventually run down to less ordered state. instead of fuel vs cold air, we got ashes and carbon dioxide in luke warm air.

BUT.. for a PERIOD of time in a SUBsystem of that closed system (our engine or candle flame or the convecting fluids, or the patterns in the BZ reaction) which was open to energy flow from and to the larger system, became MORE ordered. That is possible under the 2nd law. While the whole system runs down, an open subsystem with energy flowing through it can become more ordered for a while. In fact the increase in order of the subsystem is OFFSET by a LARGER decrease in order in the larger system.

So here we begin to see examples of systems that can become more complex from simple beginnings. We see that even the evolution of complex beings from simpler beings does NOT contradict the 2nd law of thermodynamics that in the LONG run the entire system of sun, earth space will run down to less complex.


Now those were difficult processes to set up and analyse. The flame alone is still not completely analysed in terms of all the reactions involved, and we've certainly only begun understanding how cells work in all their detail. So next we go to paper and pencil (and computer) math games.

And again we will ask: if we start off with a simple set of rules and let them automatically follow each other, can we get something more complex than the simple set of rules? The ancients certainly had the ability to play many of the simple games we are about to explore, and surprisingly they did not. Perhaps their firm believe that complexity could not come from simplicity prejudiced them from even trying.

So lets dive into John Horton Conway's game of life, (lab 48), Stepen Wolframs rule 30 linear cellular automata (lab53), collatz's 3n+1 game (lab 56) , and my own even odd fibonaci game (57) and see what kind of glorious patterns can come out from simple pencil and paper calculations of simple rules.
(48) John Horton Conway's Game Of Life
(56) 3n+1: a simple number game with complex behavior

You will see that some of the rules create much order like 3n+1, others create extremely chaotic complexity like rule 30! and others create a subtle mix between some complexity and total chaos as in conway's life and my fibonacci game.

Another way to look at these games is to see them as simulations for the complex systems we played with above. In fact scientists are trying to gain insight into complex systems of chemical reactions like flames and life by simulating them with cellular automata.

Another kind of game that also can be used to simulate systems like the Benard convection and the Bz reaction are systems pleayed not with integers or discrete cells, but on the continuous real numbers. Get a load of what we can build from the simple iterated logistic equation (lab 58). Blow your mind from the Mandelbrot set created by simple iterations of a similar system (lab 58.2)
58) Iterated logistic equation to Mandelbrot set

Finally play with the lorenz attractor, best done with computer. It actually has similar properties to both Beneard convection and our crazy chaotic waterwheel. Do you see? (lab 60)


So why is the Earth so interestiing, with it's rocks and minerals and weather and life? Well, we saw most of the mechanics that give us interesting weather, but where does all the DETAILS of life come from? those 100 different plants with all their parts. Those crazy complex molecular machines we saw inside living cells? The fact is that even without energy flow forming patterns, physics, chemistry, mathematics itself, still gives us complex patterns for free. No evolution required, no mind required.

Lets start out with a trip to a mineralogy exhibit at a museum (lab 70). these are all structures at equilibrium, they are not like the BZ reaction (though SOME of the formations you will see ARE the results of far from equilibrium processes that became frozen in as they developed). All this mineral diversity (there are more than 4000 different kinds) did NOT come from evolution, it comes from phsysics and chemistry! It comes from the capabilities of different kinds of atoms in the periodic chart (lab 74). Explore the radically different behaviors of protons, neutrons and electrons, just becase there are different nuumbers of them. Or different geometries, or different solutions to differential equations?

Again when we take water molecules and separate them into vapour in our breath and then we exhale and they drift about into clouds and come down as rain (a different state as vapour) and the raindrops take on a distinct shape because of intermolecular bonds)... or even more drastically when we breath on a cold window pain we get those cool complex jack frost patterns... How? (lab 75)

At this stage in our labs, we are getting close to the heart of the matter: Mathematics. before chemistry, before physics, there is math:


Now, we've already seen crazy examples of order from simple mathematical rules, but those were kind of complicated since we had to keep iterating the system to build up the complexity, but what about just proposing a simple system of logical rules and see what must be true about a system that follows them?

The definition of a prime number is simple: any number who's only factors are itself and one is a prime number. 7=7*1 is prime, 12=6*2 or 3*4 is not. well lets list the prime numbers:

2 3 _ 5 _ 7 _ _ _ 11 _ 13 _ _ _ 17 _ 19 _
_ _23 _ _ _ _ _ 29 _31 _ _ _ _ _ 37 _ _ _
41 _ 43 _ _ _ 47 _ _ _ _ _ 53 _ _ _ _ _ 59_

Is there any pattern to them? The gaps are funny. Is it chaotic or is there a pattern? It seems chaotic, but not totally so... The number of primes less than N tends to N/ln(N) (lookup the "prime number theorem") and look there seem to be pairs 5;7, 11;13, 17;19, 29;31, 41;43... as far as we've looked these pairs happen, but no one can prove that they keep occuring...

Lets create some more exciting patterns out of simplicity, lets enumerate the finite graphs out of balls of clay and toothpics (lab 87)

the rules: a ball of clay at each end of the toothpick. all toothpicks same length, can't bend them, can't connect two toothpicks together at BOTH ends like O====O.

what happens? the shapes we get. we get loops, we get interlocked loops, we get 2 dimensions, we get 3 dimensions.... note that this doesn't require OUR MINDS to construct. this is pure math. If you don't believe it, i suppose we could build an experiment to shake these parts and sort the results by weight and get all these patterns.

This creativity of mathematics shows you where the creativity to make all those crazy states of matter and minerals from simply protons, neutrons and electrons comes from.

A more involved example of this type of interesting but not chaotic complexity coming from simple rules is the classification of all finite simple grouups.
(81) classification of finite simple groups



No comments:

Post a Comment


About Me

almost native to new york state. teacher and storyteller. email: