## Why Pi?

Based on Image:P math.png (Photo credit: Wikipedia)

If you measure the ratio of the circumference to the diameter of any circular object you get the number Pi (π). Everyone who has done any maths or physics at all knows this. Some people who have gone on to do more maths knows that Pi is an irrational number, which is, looked at one way, merely the category into which Pi falls.

There are other irrational numbers, for example the square root of the number 2, which are almost as well known as Pi, and others, such as the number e or Euler’s number, which are less well known.

Illustration of the Exponential function (Photo credit: Wikipedia)

Anyone who has travelled further along the mathematical road will be aware that there is more to Pi than mere circles and that there are many fascinating things about this number to keep amateur and professional mathematicians interested for a long time.

Pi has been known for millennia, and this has given rise to many rules of thumb and approximation for the use of the number in all sorts of calculations. For instance, I once read that the ratio of the height to base length of the pyramids is pretty much a ratio of Pi. The reason why this is so leads to many theories and a great deal of discussion, some of which are thoughtful and measured and others very much more dubious.

Menkaure’s Pyramid (Photo credit: Wikipedia)

Ancient and not so ancient civilisations have produced mathematicians who have directly or indirectly interacted with the number Pi. One example of this is the attempts over the centuries to “square the circle“. Briefly squaring the circle means creating a square with the same area as the circle by using the usual geometric construction methods and tools – compass and straight edge.

This has been proved to be impossible, as the above reference mentions. The attempts to “trisect the angle” and “double the cube” also failed and for very similar reasons. It has been proved that all three constructions are impossible.

English: Drawing of an square inscribed in a circle showing animated strightedge and compass Italiano: Disegno di un quadrato inscritto in una circonferenza, con animazione di riga e compasso (Photo credit: Wikipedia)

Well, actually they are not possible in a finite number of steps, but it is “possible” in a sense for these objectives to be achieved in an infinite number of steps. This is a pointer to irrational numbers being involved. Operations which involve rational numbers finish in a finite time or a finite number of steps. (OK, I’m not entirely sure about this one – any corrections will be welcomed).

OK, so that tells us something about Pi and irrational numbers, but my title says “Why Pi?”, and my question is not about the character of Pi as an irrational number, but as the basic number of circular geometry. If you google the phrase “Why Pi?”, you will get about a quarter of a million hits.

Animation of the act of unrolling a circle’s circumference, illustrating the ratio π. (Photo credit: Wikipedia)

Most of these (I’ve only looked at a few!) seem to be discussions of the mathematics of Pi, not the philosophy of Pi, which I think that the question implies. So I searched for articles on the Philosophy of Pi.

Hmm, not much there on the actual philosophy of Pi, but heaps on the philosophy of the film “Life of Pi“. What I’m interested in is not the fact that Pi is irrational or that somewhere in its length is encoded my birthday and the US Declaration of Independence (not to mention copies of the US Declaration of Independence with various spelling and grammatical mistakes).

Pi constant (Photo credit: Wikipedia)

What I’m interested in is why this particular irrational number is the ratio between the circumference and the diameter. Why 3.1415….? Why not 3.1416….?

Part the answer may lie in a relation called “Euler’s Identity“.

$e^{i \pi} + 1 = 0$

This relates two irrational numbers, ‘e’ and ‘π’ in an elegantly simple equation. As in the XKCD link, any mathematician who comes across this equation can’t help but be gob-smacked by it.

The mathematical symbols and operation in this equation make it the most concise expression of mathematics that we know of. It is considered an example of mathematical beauty.

 View image | gettyimages.com 

The interesting thing about Pi is that it was an experimental value in the first place. Ancient geometers were not interested much in theory, but they measured round things. They lived purely in the physical world and their maths was utilitarian. They were measuring the world.

However they discovered something that has deep mathematical significance, or to put it another way is intimately involved in some beautiful deep mathematics.

English: Bubble-Universe’s-graphic-visualby paul b. toman (Photo credit: Wikipedia)

This argues for a deep and fundamental relationship between mathematics and physics. Mathematics describes physics and the physical universe has a certain shape, for want of a better word. If Pi had a different value, that would imply that the universe had a different shape.

In our universe one could consider that Euler’s Relation describes the shape of the universe at least in part. Possibly a major part of the shape of the universe is encoded in it. It doesn’t seem however to encode the quantum universe at least directly.

English: Acrylic paint on canvas. Theme quantum physics. Français : Peinture acrylique sur toile. Thématique physique quantique. (Photo credit: Wikipedia)

I haven’t been trained in Quantum Physics so I can only go on the little that I know about the subject and I don’t know if there is any similar relationship that determines the “shape” of Quantum Physics as Euler’s Relation does for at least some aspects of Newtonian physics.

Maybe the closest relationship that I can think of is the Heisenberg Uncertainty Principle. Roughly speaking, (sorry physicists!) it states that for certain pairs of physical variables there is a physical limit to the accuracy with which they can be known. More specifically the product of the standard deviations of the two variables is greater than Plank’s constant divided by two.

English: A GIF animation about the summary of quantum mechanics. Schrödinger equation, the potential of a “particle in a box”, uncertainty principle and double slit experiment. (Photo credit: Wikipedia)

In other words, if we accurately know the position of something, we only have a vague notion of its momentum. If we accurately know its velocity we only have a vague idea of its position. This “vagueness” is quantified by the Uncertainty Principle. It shows exactly how fuzzy Quantum Physics.

The mathematical discipline of statistics underlay the Uncertainty Principle. In a sense the Principle defines Quantum Physics as a statistically based discipline and the “shape” of statistics determines or describes the science. At least, that is my guess and suggestion.

 View image | gettyimages.com 

To return to my original question, “why Pi?”. For that matter, “why statistics?”. My answer is a guess and a suggestion as above. The answer is that it is because that is the shape of the universe. The Universe has statistical elements and shape elements and possibly other elements and the maths describe the shapes and the shapes determine the maths.

This is rather circular I know, but one can conceive of Universes where the maths is different and so is the physics and of course the physics matches the maths and vice versa. We can only guess what a universe would be like where Pi is a different irrational number (or even, bizarrely a rational number) and where the fuzziness of the universe at small scales is less or more or physically related values are related in more complicated ways.

 View image | gettyimages.com 

The reason for “Why Pi” then comes down the anthropological answer, “Because we measure it that way”. Our Universe just happens to have that shape. If it had another shape we would either measure it differently, or we wouldn’t exist.

 View image | gettyimages.com 

## How do I get from A to B?

Ngaio Tree; Português: Mulateira. Portimão, Portugal. (Photo credit: Wikipedia)

We had reason to visit another suburb today. It wasn’t until I was sitting waiting for some traffic lights to change that I thought about how I was navigating from home to destination.

We just got into the car and drove there. I didn’t consider the route in advance, and it seemed that I just pointed the car and we got there. Obviously I knew the way, as we had been there or through there a number of times in the past. But I didn’t have the destination in mind from start to finish, at least not consciously. I’m not sure that I had it in the forefront of my mind at all.

English: Driving Route 40 to El Chalten was pure driving pleasure. (Photo credit: Wikipedia)

I knew that it was in that direction though, and that did not leave a lot of route options. I did have a general feeling that I should go south, in this instance and that really only leaves two options, the back road, or the motorway. The back road is a lot prettier!

I made the choice to take the back road but it was not, as I said, at the forefront of my mind, as I was doing other things at the time, like finding my keys, my phone, my wallet and these things occupied the forefront, while the decision about which route to take was more background.

English: Mind the dip Looking down the road is a hidden dip. The farmers are busy with the harvest while the weather stays dry. (Photo credit: Wikipedia)

So the route was chosen more of less in the background, but not subconsciously. Much the same process happened on the way there, and at each junction or turning point, I didn’t have to consider at the front of my mind which direction I should drive. I just did it. Some part of my mind knew that to get to our destination I had to turn right, or go straight on or whatever.

This is good because the front of my mind was doing the driving, keeping the car on line, signalling, accelerating or braking, keeping us safe on the road. Except that it wasn’t right at the front mind, since I was also talking to my wife about various things. Christmas things from memory.

English: Two motorcycle trailing off the brakes through Tooele Turn at Miller Motorsports Park. Rider on the white bike is Warren Rose, Rider of the green bike is Dave Palazzolo (Photo credit: Wikipedia)

I’ve been driving for many years and I’m confident that if needed the driving part of my mind can instantly oust the things currently in my mind should the unexpected happen. Many year ago, when I used to smoke, I was driving with a friend and an emergency happened. When it was over I realised that I was no longer holding my cigarette. Meantime my friend was scrabbling between his legs where my cigarette had ended up when the driving part of my mind grabbed precedence and the cigarette holding part was temporarily ousted.

The route planning part of my mind would not suddenly get control like that, fortunately. That would be highly dangerous. I could if I had wanted have brought the route planning part of my mind to the front, but it wouldn’t say much except “turn left at the next junction”.

Turn Left, Turn Right (Photo credit: Wikipedia)

I have on occasion made a navigating mistake. I’m going to A and the route to B is the same in part. Suddenly I realise that I have missed a junction and will have to backtrack. It seems that the route finding part of my mind spends much of the time dozing and checks in only infrequently, sometimes missing the turning point or ritually following a more usual route.

It also seems that the information it keeps is like an instruction to take an action at each decision point rather than the whole route from home to destination as well as a general direction, less well specified. GPS guidance systems seem to work this way too in that they instruct you to take an action at each junction without setting out the whole route each time.

 #136567158 / gettyimages.com 

The model of the mind that I’ve used above, of various parts of the mind at various levels of “forefrontness” or consciousness is nothing new. The need to make a part of the mind the one at the top of the conscious levels, suddenly as a result of a danger, or selectively by choice, as in route following reminds me of the way that computer programs

Computers have several methods for navigating through programs and reacting to things that happen when they are running. One big part is called “handling errors”. Dividing by zero is an error and if the computer reaches a point where it has to divide by zero something needs to be done. The program can report the error and gracefully stop, or it can take some action to fix the error and then carry on.

English: A Texas Instruments TI-86 graphing calculator displaying an error message, indicating that the user or a running program has attempted to divide by zero. (Photo credit: Wikipedia)

Computers handle error by means of “interrupts”. Whether the errors is software (eg divide by zero) or caused by hardware connected to it (eg input/output errors) the computer stops what it is doing and runs a bit of program that handle the errors by sending a message or fixing things up. The bits of program that were running are suspended and after the error is handled the bits that were running may be given back control.

The mind seems to work in a similar way. When an emergency arises the current part of the mind that is at the forefront gets suspended and the emergency is handled by another part of the mind. A pedestrian steps into the road and you react by standing on the brakes “before you know it” as the saying goes. As soon as the emergency is over, the conscious mind takes over again.

a short .gif of the Taiwanese animated pedestrian road crossing sign (Photo credit: Wikipedia)

You do indeed react “before you know it”, one might say instinctively. But humans have not been driving cars for much more than one hundred years, so it appears that the reaction is not instinctive in itself, but is an instinctive reaction to a danger that has been learned. We seem to have this fast reaction to events which is instinctively based but can be applied to learned situations, which is much more flexible than hard-wired instincts would be.

So, pondering on how I get from A to B has led me to conjecture that there are parts of the mind which are forefront in our minds and other parts which are not directly in the forefront but which can be brought to the forefront in an instant, when an event happens. It is evident that these parts are only partially backgrounded as the mind as a whole has some aware of the location at the time, but they do act semi-autonomously, that is until the pedestrian steps out onto the roadway.

 #120534487 / gettyimages.com 

Evidently there are parts of the mind that are less foregrounded and more backgrounded. When the part of the mind that is concerned with driving wants to signal or change gear, another part of the mind which controls the arms and legs wakes up and make the limbs move as needed.

I’ve spoken above as if all these different levels are discrete states, but I think it more likely that is a continuum from the foreground of the mind to the background or a least the series of levels of consciousness are close enough togerther to appear so.  The mind is a complex and wonderful thing.

 #460689429 / gettyimages.com 

[Comment: After finishing this post I went looking for other discussions of the same topic. I first found this Wikipedia article which has the issues mentioned in the article’s header. Interestingly the implication in the article is that there is a single level of consciousness at any one time. This I do not agree with. Another article I found was a little better, I feel, but only because it acknowledges that several levels may be active at the same time, but divides them into three levels with well defined scopes. I feel that it is a lot more complex than that, with all sorts of sections of the mind at all sorts of levels being active at the same time. Neither article deals with the issue of one section of the mind apparently seizing the highest level when an external event triggers it.]

## Dis-Continuum

English: The Clump looking from the Redhouse (Photo credit: Wikipedia)

Where ever one looks, things mostly seem to be in lumps or clumps of matter. We live on a lump of matter, one of a number of lumps of matter orbiting an even bigger lump of matter. We look into the sky when the bigger lump of matter is conveniently on the other side of our lump of matter and we see evidence of other lumps of matter similar to the lump of matter that our lump of matter orbits.

We see stars, in short, which poetically speaking float in a void empty of matter. We can see that these stars are not evenly distributed and that they gather together in clumps which we call galaxies. Actually stars seem to clump together in smaller clumps such as the Local Cluster of a dozen or so stars, and most galaxies have arms or other features that show structure at all levels.

Ancient Galaxy Cluster Still Producing Stars (Photo credit: Wikipedia)

The galaxies, which we can see between the much closer stars of our own galaxy, also appear to be clustered together in clumps, and the clumps seem to be clumped together. Of course, the ultimate clump is the Universe itself, but at all levels the Universe appears to have structure, to be organised, to be formed of lumps and clumps, variously shaped into loops, whorls, sheets, arms, rings, bubbles, and so on.

OK, but in the other direction, towards the smaller rather than the larger, our planet has various systems, weather, orogenic, natural, social and evolutionary. All sorts of systems at all levels, from global scope to the scope of the smallest element.

 #130866183 / gettyimages.com 

In other personal worlds, below the level our interactions with our families, we have all the systems that make up our own bodies. The system that circulates our blood, the system that processes our food, the system that maintains our multiple systems in a state homeostasis.

That is, not a steady state, but a state where all the individual systems self-adjust so that the larger system does not descend into a state of chaos, leading to a disruption of the larger whole. Death.

The main pathways of metabolism in humans, showing all metabolites that account for >1% of an excreted dose. ;Legend PNU-142300, accounts for ~10% of excreted dose at PNU-142586, accounts for ~45% of excreted dose at steady state PNU-173558, accounts for ~3.3% of excreted dose at steady state (Photo credit: Wikipedia)

By and large most systems in our environment are made up of molecules, which are in turn made up of atoms. Atoms are a convenient stopping point on the scale from very large to very small. They are pretty “well defined”, in that they are a very strong concept.

Atoms are rarely found solo. They are sociable critters. They form relationships with other atoms, but some atoms are more sociable than others, forming multiple bonds with other atoms. Some are more promiscuous than others, changing partners frequently.

 #121842236 / gettyimages.com 

These relationships are called molecules, and range from simple to complex, containing from two or three atoms, to millions of atoms. The really large molecules can be broken down to smaller sub-molecules which are linked repeatedly to make up the complex molecules.

To rise higher up the scale for a moment, these molecules, large and small are organised into cells, which are essentially factories for making identical or nearly identical copies of themselves. The differences are necessary to make cells into muscles or organs and other functional features, and cells that make bones and sinews and other structural parts of a body.

A section of DNA; the sequence of the plate-like units (nucleotides) in the center carries information. (Photo credit: Wikipedia)

As I said, atoms are a convenient stopping point. Every atom of an element is identical at least in its base state. It may lose or gain electrons in a “relationship” or molecule, but basically it is the same as any other element of the same sort.

Each atom consists of a nucleus and surrounding electrons, a model which some people liken to a solar system. There are similarities, but there are also differences (which I won’t go into in this post). The nucleus consists a mix of protons and neutrons. While the number neutrons may vary, they don’t significantly affect the chemical properties of the atom, which makes all atoms of an element effectively the same.

An early, outdated representation of an atom, with nucleus and electrons described as well-localized particles on well-localized orbits. (Photo credit: Wikipedia)

Each component of an atom is made up of smaller particles called “elementary” particles, although they may not be fundamentally elementary. At this level we reach the blurry level of quantum physics where a particle has an imprecise definition and an imprecise location in macroscopic terms.

Having travelled from the largest to the smallest, I’m now going to talk mathematics. I’ll link back to physics at the end.

Nucleus (Photo credit: Wikipedia)

We are all familiar with counting. One, two, three and so on. These concepts are the atoms of the mathematical world. They can be built up into complex structures, much like atoms can be built into molecules, organelles, cells, tissues and organs. (The analogy is far from perfect. I can think of several ways that it breaks down).

Below the “atomic” level of the integers is the “elementary” level of the rational numbers, what most people would recognise as fractions. Interestingly between any two rational numbers, you can find other rational numbers. These are very roughly equivalent to the elementary particles. Very roughly.

Half of the Hadron Calorimeter (Photo credit: Wikipedia)

One might think that these would exhaust the list of types of numbers, but below (in a sense) the rational numbers is the level of the real numbers. While many of the real numbers are also rational numbers, the majority of the real numbers ate not rational numbers.

The level of the real numbers is also known as the level of the continuum. A continuum implies a line has no gaps, as in a line drawn with a pencil. If the line is made up of dots, no matter how small, it doesn’t represent a continuum.

Qunatum dots delivered by ccp (Photo credit: Wikipedia)

A line made up of atoms is not a continuum, nor is a line of elementary particles. While scientists have found ever more fundamental particles, the line has apparently ended with quarks. Quantum physics seems to indicate that nature, at the lowest level, is discrete, or, to loop back to the start of this post, lumpy. There doesn’t seem to be a level of the continuum in nature.

That leaves us with two options. Either there is no level of the continuum in nature and nature is fundamentally lumpy, or the apparent indication of quantum physics that nature is lumpy is wrong.

Pineapple Lumps (240g size) (Photo credit: Wikipedia)

It’s hard to believe that a lumpy universe would permit the concept of the continuum. If the nature of things is discrete, it’s hard to see how one could consider a smooth continuous thing. It’s like considering chess, which fundamentally defines a discontinuous world, where a playing piece is in a particular square and a square contains a playing piece or not.

It’s a weak argument, but the fact that we can conceive the concept of a continuum hints that the universe may be fundamentally continuous, in spite of quantum physics’ indications that it is not continuous.

 #114936123 / gettyimages.com 

 #155288014 / gettyimages.com 

I have currently got computer issues so this week’s posting has not been written.😱 I’m writing this as a placeholder until I can catch up. The subject will be, as above, “upgrades”.

One of the joys of using a computer is applying the updates that come out for the operating system and applications. With a multitude of computing devices that a person has these days, this can be time consuming.

 #171171414 / gettyimages.com 

On desktop computers running the Windows operating system, this can be made pretty much invisible, but on phones and tablets, and on other operating systems this can be a chore.

Most updates are for applications and not for the operating system itself, but often a user may have no idea of the difference. A tech-savvy person asks what operating system a user is using, expecting to hear “8.1” or “7” or even “Vista” or “XP” he/she is surprised to be told “Internet Explorer” or even “GMail”.

Screenshot of Android 4 on Galaxy Nexus (Photo credit: Wikipedia)

An application upgrade is usually benign and the user will not notice any difference as the changes will be behind the scenes, but now and then a user visible change is made and the user often thinks that his machine is broken.

Geeks often have a quiet snigger at this but it is a bit unfair. The user is using the computer as a tool, and tools as a rule do not change. A spanner doesn’t suddenly overnight change from Imperial sizes to Metric sizes and the computer user is not unreasonable in expecting his/her computer to not suddenly change.

 #166007593 / gettyimages.com 

Some updates however are far from benign, causing data loss or serious computer issues. Those not of the “Windows World” frequently blame Microsoft for such issues, but when there are billions of users out there, using different hardware configurations, it is not surprising that things occasionally break. Nastily!

When I talk about the “Windows World”, I am talking about the users of the Microsoft Windows operating system, by far the largest group of computer users. Until recently the other major groups of users were the “Mac World” and the “Linux World”, but more recently these have been joined by the “Apple World” and the “Android World”.

 #167271603 / gettyimages.com 

Since Macs are made by Apple, arguable the “Mac World” and the “Apple World” are the same, but by the “Apple World” I mean those users of iPads, iPhones and even the iPod. The “Mac World” refers to users of desktop and laptop Macintosh computers.

The application updates are arguably more visible on handheld devices and owners of such devices may be notified two or more times a week that such and such an app needs updating or has been automatically updated. It’s not too much of an issue, but naive users may not be performing the necessary couple of clicks to update the apps.

 #175823371 / gettyimages.com 

Of course, by taking this course they may be missing out on security and stability fixes or fixes for serious bugs, to them the risk of fiddling with their devices may seem higher, and I can understand that.

Computer users, especially naive users, develop a pattern of working, a “workflow” if you like that suits them and works around any bugs or issues in their apps. No wonder they get furious when their workflow is disrupted! In one case, (reputedly) a computer user who had her machine updated was outraged that her icon had “gone”, when in fact it had moved to a different line.

 #163602797 / gettyimages.com 

It’s easy to laugh at such happenings, but really, one should try to see here point of view. The icon did something when she clicked. It had moved and even if it looked the same in its new position, she could not be sure that it would do the same thing.

If a more sophisticated user were to notice that an icon had moved, they would probably assume that it would work the same, and in 99.99…. per cent of the time they would be correct. But the naive user did not know the odds and of course, she was correct in that there was a non-zero possibility that the icon would behave differently.

 #459776297 / gettyimages.com 

There is a subtle difference between an update and an upgrade, I believe. I don’t know if it is an official definition, but when updates are mentioned I feel that such changes should be minor and with little visible impact. Updates may be changes made to applications and to the operating system itself, but the key feature is that they do change functionality or user workflow fundamentally, and would predominately be bug fixes or small enhancements.

Upgrades on the other hand, would be more fundamental changes and may result in majorly changed functionality and workflows, like the changes between Windows 7 and Windows 8. The change between Windows 8 and Windows 8.1 would probably be an update rather than an upgrade, but this one is marginal.

Tux, the Linux penguin (Photo credit: Wikipedia)

I’m in the “Linux World” and my desktop runs Ubuntu. I’ve recently upgraded to version 14.10 (also known as Utopic Unicorn) and I had a number of issues, none of which was a show stopper, but some of which were annoying. I’ve previously upgraded successfully with few issues, but maybe I accumulated too much junk.

I definitely don’t think that the issue is with Utopic Unicorn as the forums don’t have posts which relate to my issues, which they would if it were a general issue, so it is something related to my own setup, most likely.

Official Ubuntu circle with wordmark. Replace File:Former Ubuntu logo.svg. Español: logo de Ubuntu + marca denominativa Français : Logo officiel d’Ubuntu. Remplace File:Former Ubuntu logo.svg. (Photo credit: Wikipedia)

So I’ve reinstalled, which has taken some time. There is one niggly issue that should be fixed shortly, but I was without access to some essentials, like Facebook and GMail on my desktop machine, for a day or two. Fortunately I was able to access these absolute essentials on my tablet (Android) and phone (also Android).

During this time I had to fix my daughter in law’s Windows laptop and upgrade the iPad to the newest version of IOS. Now my Android phone wants to upgrade to Android version 5.0 (also known as “Lollipop”). I think that I will wait for version 5.0.1 or 5.1!

 #136644924 / gettyimages.com 

## Fractals

A Julia set, a fractal related to the Mandelbrot set (Photo credit: Wikipedia)

Now and then I fire up one of those programs that displays a fractal on the screen. These programs use mathematical programs to display patterns on the screen. Basically the program picks the coordinates of a pixel on the screen and feeds the resulting numbers to the program. Out pop two more numbers. These are fed back to the program and the process is repeated.

There are three possible outcomes from this process.

Firstly, the situation could be reached where the numbers being input to the program also pop out of the program. Once this situation is reached it is said that the program has converged.

Convergent light beam passing through a square hole (Photo credit: Wikipedia)

Secondly, the numbers coming out of the program can increase rapidly and without bounds. the program can be said to be diverging.

Thirdly, the results of the calculation could meander around without ever diverging or converging.

English: The Markov chain for the drunkard’s walk (a type of random walk) on the real line starting at 0 with a range of two in both directions. (Photo credit: Wikipedia)

A point where the program converges can then be coloured white. Where it diverges, the point or pixel can be coloured black. A point where the program seems to neither converge nor diverge can then be coloured grey. A pattern will then appear in the three colours which is defined by the equation used.

Anyone who has seen fractals and fractal programs will realise that a three colour fractal is pretty boring as compared to other published fractal images. Indeed the process that I have described is pretty basic. A better image could be drawn by colouring points differently depending on how fast the program converges to a limit. This obviously requires a definition of what constitutes convergence to a limit.

Fractal Art (Photo credit: Wikipedia)

Convergence is a tricky concept which I’m not going to go into, but to compute it to say in a computer program you have to take into account the errors and rounding introduced by the way that a computer works. In particular the computer has a largest number which it can physically hold, and a smallest number. Various mathematical techniques can be used to extend this, but the extra processing required means that the program slows down.

[Fractal] (Photo credit: Wikipedia)

I’m not going to explain how this difficulty is circumvented, since I don’t know! However the fact is that the computer generated fractals are fascinating. Most will allow you to continually zoom in on a small area, revealing fantastic “landscapes” which demonstrate similar features at all the descending levels. Similar, but not the same.

fractal landscape (Photo credit: Wikipedia)

The above far from rigorous description describes one type of fractal of which there are various sorts. Others are described on the Wikipedia page on the subject.

Another interesting fractal is created on the number line. Take a fixed part of the number line, say from 0 to 1, and divide it into three parts. Rub out the middle one third. This leaves two smaller lines, from 0 to 1/3 and from 2/3 to 1. Divide these lines into three parts and perform the same process. Soon, all that is left is practically nothing. This residue is known as the Cantor set, after the mathematician Georg Cantor.

English: A Cantor set Deutsch: Eine Cantor-Menge Svenska: Cantordamm i sju iterationer, en fraktal (Photo credit: Wikipedia)

This particular fractal can be generalised to two, three, or even higher dimensions. The two dimensional version is called the Sierpinski curve and the three dimensional version is called the Menger sponge.

One of the fractal curves that I was interested in was the Feigenbaum function. This fractal shows a “period doubling cascade” as shown in the first diagram in the above link. If you see some versions of this diagram the doubling points (from which the constant is determined) often look sharply defined.

English: A very old ficus tree in São Paulo, Brasil. Deutsch: Ein sehr alter Feigenbaum in São Paulo, Brasilien. Português do Brasil: Uma figueira muito antiga nas ruas de São Paulo, Brasil. (Photo credit: Wikipedia)

I was surprised the doubling points were not in fact sharply defined. You can see what I mean if you look closely at the first doubling point in the Wolfram Mathworld link above. Nevertheless, the doubling constant is a real constant.

English: Bifurcation diagram Česky: Bifurkační diagram Polski: Zbieżność bifurkacji (Photo credit: Wikipedia)

Another sort of fractal produces tree and other diagrams that look, well, natural. A few simple rules, a few iterations and the computer draws a realistic looking skeleton tree. A few tweaks to the program and a different sort of tree is drawn. The trees are so realistic looking that it seems reasonable to conclude that there is some similarity between the underlying biological process and the underlying mathematical process. That is the biological tree is the result of an iterative process, like the mathematical trees.

Русский: Ещё одно фрактальное дерево. Фрактальное дерево. (Photo credit: Wikipedia)

I’ve mentioned natural objects, trees, which show fractal characteristics. Many other natural objects show such characteristics, the typical example which is usually given is that of the coastline of a country. On a large scale the coastline of a country is usually pretty convoluted, but if one zooms in the art of the coastline that one zooms in on stays pretty much as convoluted as the large scale view.

Mandelbrot fractal. Rendered as an island with Terragen, a fractal-based landscape generator. (Photo credit: Wikipedia)

This process can be repeated right down to the point where one can see the waves. If you can imagine the waves to be frozen, then one can take the process even further, but at some point the individual water molecules become visible and the process (apparently) reaches an end.

If you want a three dimensional example, clouds, at least clouds of the same type, probably fit the bill. Basically what makes the clouds fractal is the fact that one cannot easily tell the size of a cloud if one is simple given a photograph of a cloud. It could be a huge cloud seen from a distance or a smaller cloud seen close up. Of course if one gets too close to a cloud it becomes hazy, indistinct, so one can use those clues to guess the size of a cloud.

 #165590047 / gettyimages.com 

Fractals were popularised by the mathematician Benoit Mandlebrot, who wrote about and studied the so-called Mandlebrot set, wrote about it in his book, “The Fractal Geometry of Nature”.  I’ve read this fascinating book.

English: Topological model of Mandelbrot set( reflects the structure of the object ) Polski: Topologiczny model zbioru Mandelbrota ( pokazuje strukturę obiektu) (Photo credit: Wikipedia)

While I was searching for links to the Mandlebrot Set I came across the diagram which shows the correspondence of the period doubling cascade mentioned above and the Mandlebrot set. This correspondence, which I did not know about before, demonstrates the interlinked nature of fractals, and how simple mathematics can often have hidden depths. Almost always has hidden depths.

English: Paths of correspondence between scientists (Photo credit: Wikipedia)

## A Programmer’s Lot is Not a Happy One?

 #103918187 / gettyimages.com 

Well, I don’t know really. Most programmers that I know seem about as happy as the rest of the population, but I was thinking about programming and that variation on “A Policeman’s Lot” from the Pirates of Penzance appealed to me.

Programming in often presented as being difficult and esoteric, when in fact it is only a variation of what humans do all the time. When you read a recipe or follow a knitting pattern, you are essentially doing what a computer does when it “runs a program”.

Unix program to display running processes (Photo credit: Wikipedia)

The programmer in this analogy corresponds to the person who wrote the recipe or knitting pattern. Computer programs are not a lot more profound than a recipe or pattern, though they are, in most cases, a lot more complicated than that.

It’s worth noting that recipes and patterns for knitting (and for weaving for that matter) have been around for many centuries longer than computer programs. Indeed it could be argued that computers and programming grew out of weaving and the patterns that could be woven into the cloth.

English: Pattern of traditional Norwegian Setesdal-sweater. The pattern is created to be used on a punch card in a knitting machine. Svenska: Klassiskt mönster från lusekofta från Setesdalen, Norge. Mönsterrapporten är skapad för att användas på hålkort i stickmaskin. (Photo credit: Wikipedia)

In 1801 Joseph Marie Jacquard invented a method of punched cards which could be used to automatically weave a pattern into textiles. It was a primitive program, which controlled the loom. I imagine that before it was invented the operators were giving a sheet to detail what threads to raise and which drop, and which colour threads to run through the tunnel thus formed. I can also imagine that such a manual process would lead to mistakes, leading to errors in the pattern created in the cloth. It would also be time consuming, I expect.

Jacquard’s invention, by bypassing this manual method would have led to accurately woven patterns and a great saving in time. Also, an added advantage was that changing to another pattern would be as simple as loading a new set of punched cards.

English: Jacquard loom in the National Museum of Scotland, Edinburgh. Nederlands: Weefgetouw met Jacquardmechanisme in het National Museum of Scotland, Edinburgh. (Photo credit: Wikipedia)

At around this time, maybe a little later, the first music boxes were produced. These contained a drum with pins that plucked the tines of a metal comb. However the idea for music boxes goes back a lot further as the link above tells.

The only significant difference between Jacquard’s invention and the music boxes is that Jacquard relied on the holes and music boxes relied on pins. They operated in different senses, positive and negative but the principle is pretty much the same.

A PN junction in thermal equilibrium with zero bias voltage applied. Electron and hole concentrations are reported respectively with blue and red lines. Gray regions are charge neutral. Light red zone is positively charged. Light blue zone is negatively charged. Under the junction, plots for the charge density, the electric field and the voltage are reported. (Photo credit: Wikipedia)

Interestingly there is a parallel in semiconductors. While current is carried by the electrons, in a very real sense objects called “holes” travel in the reverse direction to the electrons. Holes are what they sound like, places where an electron is absent, however I believe that in semiconductor theory, they are much more than mere gaps, and behave like real particles.

It’s amazing how powerful programming is. Microsoft Windows is probably the most powerful program that non-programmers come into contact with, and it does so many things “under the hood” that people take for granted, and it is all based on the absence or presence of things, much like Jacquard’s loom and the music boxes. While that is an analogy, it is not too far from the mark, and many people will remember having been told, more or less accurately that computers run on ones and zeroes.

 #154744099 / gettyimages.com 

When a programmer sits down to write a program he or she doesn’t start writing ones and zeroes. He or she writes chunks of stuff which non-programmers would partially recognise. English words like “print”, “do”, “if” and “while” might appear. Symbols that look like maths might also appear. Depending on the language, the code might be sprinkled with dollar signs, which have nothing directly to do with money, by the way.

The programmer write in a “language“, which is much more tightly defined than ordinary language, but basically it details at a relatively high level what the programmer wants to happen.

Logo for the Phoenix programming language (Photo credit: Wikipedia)

The programmer may tell the program to “read” something and if the value read is positive or is “Baywatch” or is “true”, do something. The programmer has to bear in mind that often the value is NOT what the programmer wants the program to look for and it is the programmer’s responsibility to handle not only the “positive” outcome but also the “negative” one. He or she will tell the program to do something else.

When the programmer tells the program to “read” something, he or she essentially invokes a program that someone else has written whose only job is to respond to the “read” command. These “utility” program are often written in a more esoteric language than the original programmer uses (though they don’t have to be), and since they do one specific task they can be used by anyone who programs on the computer.

 #107885297 / gettyimages.com 

This program instructs other, lower level programs to do things for it. Again these lower level programs do one specific thing and can be used by other programs on the computer. It can be seen that I am describing a hierarchy of ever more specialised programs doing more and more specific tasks. It’s not quite like the Siphonaptera though, as the programs eventually reach the hardware level.

At the hardware level it will not be apparent what the programs are intended for, but the people who wrote them know the hardware and what the program needs to do. This is partially from the hierarchy of programs above, but also from similar programs that have already been written.

English: CPU (Photo credit: Wikipedia)

Without going into detail, the low level program might require a value to be supplied to the CPU of the computer. It will cause a number of conducting lines (collectively a “bus”) to be in one of two states, corresponding to a one or a zero, or it might cause a single line to vary between the states, sending a chain of states to the CPU.

In either case the states arrive in a “register”, which is a bit like a railway station. The CPU sends the chains of states (or bits) through its internal “railway system”, arranging for them to be compared, shifted, merged and manipulated in many ways. The end result is one or more chains of states arriving at registers, from whence they are picked up and used by the programs, with the end result being whatever the programmer asked for, way up in the stratosphere!

Modelleisenbahn im Hauptbahnhof Wiesbaden (Photo credit: Wikipedia)

This is monumental achievement, pun intended, and is only achievable because at each level the programmer writes a program that performs one task at that level which doesn’t concern itself at all with any other levels except that it conforms to the requests coming from above (the interface, technically). This is called abstraction.

Data abstraction levels of a database system (Photo credit: Wikipedia)

## Legalistic Stuff

Marooned (Photo credit: Wikipedia

Suppose two men are marooned on a remote island somewhere. At first each is unaware that the other is there, but eventually they meet. Suppose that for some reason they don’t want to join up, but they do want to interact. So they set about working out ways to share the island, and obviously they want to live amicably until they are rescued.

So they might draw an imaginary line across the island. A can only go into B’s half as long as B is aware and approves, and vice versa. Maybe it turns out that food is easier to come by in B’s half, but there is plenty for both. B allows A to venture into parts of his half of the island and A drops off a few items that he has gathered as thanks.

The upper part of the stela of Hammurapis’ code of laws (Photo credit: Wikipedia)

Later on they find that A’s part of the island has the best spots to catch fish or something, and they come to an agreement about that. Slowly but surely they build up a set of rules on how to behave and live on the island in harmony.

One can imagine that an arbitrarily complex set of rules may be developed, and these rules could be further complicated if a third man, C, were to join them on the island.

 #136801649 / gettyimages.com 

You can probably see where I am going with this. As the population of the island rises, more and more rules will become necessary, or if not necessary, useful, and at some stage someone will have the idea of writing them down. The rules become laws and eventually attract all the mechanisms of a full legal system.

While browsing around while thinking about this sort of thing, I came across a review of “Day Z”, which the author of the review describes as “A Video Game Without Rules”. The author describes how the ability to do nasty things to others leads to characters in the game, especially established players doing nasty things to other players, usually new spawned players.

English: Uppercase and lowercase Greek letter zeta, the 6th letter of the Greek alphabet. Times New Roman font. (Photo credit: Wikipedia)

It’s possible that the behaviour of players in the game is merely an early stage in its evolution, and it may be that later on stronger players may band together to help the newly spawned players and the people who treat new players badly will be marginalised or persuaded to change their ways. One can hope.

Another dismal view of the island scenario was that of William Golding who wrote “The Lord of the Flies”, where a group of English schoolboys are marooned on an island, perhaps as the result of an atomic war. They soon revert to savagery and murder, overriding the civilised urgings of Piggy and Ralph. As Piggy says “Which is better—to have rules and agree, or to hunt and kill? … law and rescue, or hunting and breaking things up?” The rest of the boys obviously want to hunt and kill.

Pig head for sale at Cleveland’s West Side Market (Photo credit: Wikipedia)

Nevertheless, the process of generating laws by discussion and agreement was probably along the lines that I have suggested above. No doubt there were many tries to achieve this process which failed in the manner that things appear to have failed in the video game and how they were depicted as failing in “the Lord of the Files”, before a working system of laws was achieved.

It’s possible that the magic ingredient was the evolution of system of magistrates and a method of enforcing the laws. With a supposedly impartial system to decide the rights of a matter, and a special force or police system to enforce the laws, the weak individual would be protected against the stronger.

English: Hammurabi code. One of the first law sets in the world. Now it is in the Louvre museum, Mesopotamia section. Asia. Español: Código de Hammurabi. Uno de los primeros conjuntos de leyes del mundo. Se encuentra en el museo de Louvre, sección de Asia antigua. Mesopotamia, Babilonia. (Photo credit: Wikipedia)

In early days, the system of laws and the enforcement of them would have been vested in the priests and spiritual leaders, who would have controlled the enforcement system, probably “Temple Guards” or similar.

Where do kings fit in? The rulers were often not priests themselves, but the rulers were seen to rule by divine right, so there was a tight link between the rulers and the religious leaders. Kings such as Hammurabi supposedly led the way in law making, though no doubt there was much political to and fro between the kings and the priests.

English: Priest Mongaku’s forty-five article rules and regulations (文覚四十五箇条起請文〈藤原忠親筆／, mongaku yonjūgokajō kishōmon). Document requesting the restoration of Jingo-ji temple from Emperor Go-Shirakawa. Located at Jingo-ji, Kyoto, Japan. The scroll has been designated as National Treasure of Japan in the category ancient documents. (Photo credit: Wikipedia)

These days, in many countries the law has been secularised and in many laws are decided by the government of the country, and are arbitrated by a separate branch of the administration called the justice system, and the enforcement is carried out by the police and retribution by the prisons system.

Lawmaking, justice and enforcement are in many countries legally independent of one another so that, for example, the government cannot manipulate the system for its own advantage. The principle is that justice should be independent of lawmaking and the enforcement systems.

English: The courthouse of Tours. Français : Le palais de justice de Tours. (Photo credit: Wikipedia)

How does all this affect the man in the street? Well, in practise, not very much, usually, at least not directly. When driving along the road, a motorist is aware that the speed limit is so-and-so, and usually keeps to it, more or less. He or she treats it as an advisory rather than a restriction, in that it is taken as the top speed that is safe for that road.

The man in the street also uses laws for his own protection. He will assume that the consumer protection laws back him up when he purchases something which it transpires is defective and will feel confident in returning it. In most cases the retailer would not be too upset by someone returning a defective product as in most cases the retailer would want a happy customer and can return the product to the manufacturer.

 #169814593 / gettyimages.com 

In general, laws work best when they conform with the principle of “natural justice” or what would generally be considered fair. It is not fair for example for someone to keep others awake by holding noisy all night parties, and in most cases the law will support the sleepless neighbours over the noisy one, but it could come down to a matter of perception.

Things like disputes about access to properties can hinge on such matters and are very often cannot easily be settled. The law has been evolving for thousands of years, but it can’t solve every dispute, although we would be worse off without it. It has to change as the world is changing, so it is constantly evolving. We cannot expect it to be perfect.

At the Law Rock, or Lögberg, a rocky outcrop on which the Lawspeaker, or lögsögumaður, took his seat as the presiding official of the Icelandic Althing (Alþing), at Thingvellir, or Þingvellir, Iceland. assembly. (Photo credit: Wikipedia)