Looking back: 2001

The 1968 film 2001: A Space Odyssey suggested that we would have extensive space flight in 2001. That turned out not to be the case. What we did get was the September 11 attacks on the USA and the military conflicts which followed. Nevertheless, NASA commemorated the film with the 2001 Mars Odyssey orbiter.

Films of 2000 included the superb The Lord of the Rings: The Fellowship of the Ring, several good animated films (including Monsters, Inc., Shrek, and Hayao Miyazaki’s Spirited Away), the wonderful French film Amélie, some war movies (Enemy at the Gates was good, but Black Hawk Down distorted the book too much for my taste), the first Harry Potter movie, and an award-winning biographical film about the mathematician John Nash.

In books, Connie Willis published Passage, one of my favourite science fiction novels, while Ian Stewart explained some sophisticated mathematics simply in Flatterland.

Saul Kripke (belatedly) received the Rolf Schock Prize in Logic and Philosophy for his work on Kripke semantics, while Ole-Johan Dahl and Kristen Nygaard (also belatedly) received the Turing Award for their work on object-oriented programming languages (both these pioneers of computing died the following year).

The year 2001 also saw the completion of the Cathedral of Saint Gregory the Illuminator in Armenia, which I have sadly never visited.

In this series: 1978, 1980, 1982, 1984, 1987, 1989, 1991, 1994, 2000, 2001, 2004, 2006, 2009.


Cycles

The Tropical Year: 31.6888 nHz

One of the most important cycles we live by is the tropical year, measured from equinox to corresponding equinox (or solstice to corresponding solstice). The tropical year lasts, on average, 365.2422 days (365 days, 5 hours, 48 minutes, 45 seconds), which means that it is an oscillation with a frequency of 31.6888 nanohertz (nHz). This is the cycle of the seasons.

Spring, summer, autumn, and winter are the conventional seasons, but the tropical year may be split up into more than or less than four seasons, and these need not be of equal length. In northern Australia, a frequent division is “the dry” (May to September), “the build up” (September to December), and “the wet” (December to April). Local Aboriginal people, however, may recognise as many as six seasons.

The Sidereal Year: 31.6875 nHz

A sidereal year is the time taken by the Earth to orbit the Sun once with respect to the stars. This is the time that it takes for the sun to move through the “signs of the zodiac.” Because of the precession of the equinoxes, the sidereal year is 365.2564 days, which is about 20.4 minutes longer than the tropical year. As a result, ancient rules assigning dates to the signs of the zodiac are now completely wrong. The sidereal year corresponds to an oscillation of 31.6875 nanohertz.

The Synodic Month: 391.935 nHz

A synodic month is a cycle from new moon to new moon or full moon to full moon. This period actually varies by several hours, but it averages out to 29.530588 days (29 days, 12 hours, 44 minutes, 3 seconds).

In 432 BC, Meton of Athens noted that 235 synodic months (6939.7 days) is almost exactly equal to 19 years (6939.6 days). This period is called the Metonic cycle, and is used for predicting solilunar events such as the date of Easter.

The synodic month is also strangely similar to the average menstrual cycle (28 days), and this is reflected in the word (“menstrual” derives from the Latin mēnsis = month).

The Week: 1.65344 µHz

The week has an origin among the ancient Hebrews. It also has a Babylonian origin (the relationship between the two origins is unclear). The Babylonians related the 7 days of the week to the sun, moon, and 5 visible planets. They also related them to various gods. Our days of the week derive from the Babylonian week, via Greece and Rome: Sunday (Sun), Monday (Moon), Tuesday (Tiw, god of war = Mars), Wednesday (Woden = Mercury), Thursday (Thor = Jupiter), Friday (Frigg = Venus), and Saturday (Saturn).

Early Christians related the two week concepts together, pointing out that the day of the Resurrection (the day after the Jewish Sabbath) corresponded to the day of the Sun in the Roman system. The week corresponds to an oscillation of 1.65344 microherz.

The Sidereal Day: 11.6058 µHz

A sidereal day is the time that it takes the earth to rotate once around its axis. It often surprises people to discover that this time is 23 hours, 56 minutes, 4.1 seconds. It can be measured by the time to go from a star being overhead to the same star being overhead again.

The Solar Day: 11.5741 µHz

A solar day (24 hours, give or take some seconds) is the time from noon to noon. It is longer than a sidereal day because, while the earth is rotating around its axis, it is also moving around the sun. To put it another way, the sun is not a fixed reference point for the earth’s rotation. The difference between the sidereal and solar days mean that the stars seem to rise about 3 minutes and 56 seconds earlier every night.


Fast Fibonacci numbers

There was some discussion on reddit recently of the Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1,597, 2,584, 4,181, 6,765, 10,946, 17,711, 28,657, 46,368, 75,025, 121,393, 196,418, 317,811, 514,229, 832,040, …) and efficient ways of calculating them.

One way of doing so is using numbers of the form a + b σ where  σ is the square root of 5. Multiplication of such numbers satisfies:

(a + b σ) × (c + d σ) = ac + 5bd + (ad + bc) σ.

We can define the golden ratio φ = (1 + σ) / 2 and also ψ = 1 − φ = (1 − σ) / 2, in which case the nth Fibonacci number Fn will be exactly (φn − ψn) / σ. This is known as Binet’s formula.

We can use this formula to calculate Fibonacci numbers using only integer arithmetic, without ever evaluating the σ. We will have:

(2 φ)n − (2 ψ)n = (1 + σ)n − (1 − σ)n = 0 + p σ

for some integer p, and division by a power of two will give Fn = p / 2n.

I am using the R language, with the gmp package, which provides support for large integer matrices, and this allows us to use the relationship:

If we call this matrix A and calculate An−1, the first number in the resultant matrix will be the nth Fibonacci number Fn. The following R code calculates F10 = 55 using a combination of multiplication and squaring:

n <- 10

A <- matrix.bigz(c(
	1, 1,
	1, 0), 2)

p <- function(n) {
	if (n == 1) A
	else if (n %% 2 == 1) A %*% p(n-1)
	else {
		b <- p(n/2)
		b %*% b
	}
}

p(n-1)[1,1]

This same code will calculate, for example:

The time taken to calculate Fn is approximately proportional to n1.156, with the case of n = 1,000,000,000 (giving a number with 208,987,640 digits) taking about a minute.


Rods and cones in the human eye

I already posted these images (click to zoom) on Instagram. They illustrate the sensitivity to colour of the rods (lower right) and the three types of cones in the human eye. Cone sensitivity data is from CVRL.

Notice that red light is pretty much invisible to the rods. This is why red light does not interfere with night vision, and is used in e.g. this aircraft cockpit:


Greenhouse emissions in Australia

I thought I would take the opportunity today to talk about energy production and greenhouse gas emissions in Australia. The chart below shows the populations (blue bars) and population densities of the six Australian states plus the Northern Territory. Note that New South Wales, Victoria, and Queensland have the highest populations (8.2, 6.7, and 5.2 million respectively), while the Northern Territory has the lowest. However, given its smaller area, Victoria has the highest population density (29.4 people per sq km), while Western Australia and the Northern Territory have the lowest population densities (1.1 and 0.2 people per sq km respectively).

The next chart shows the per capita electricity production of the six Australian states and the Northern Territory, by type. These figures are adjusted for net electricity transfer between states. For example, Tasmania imports some mainland coal-fired power.

Notice that the totals are high in the less densely populated regions (Western Australia and the Northern Territory). The total is also high in Tasmania, because of the widespread use of hydro-electrically produced electricity for heating there.

Total per capita electricity production is lowest in Victoria, in part because of the widespread use of natural gas for heating and cooking (total gas use in Australia generally is about 4 times its use in electricity production). Victorian electricity is the dirtiest, however, with heavy use of brown-coal-fired production. Brown coal is by far the dirtiest fuel; it produces about 47% more greenhouse gases per MWh than black coal, and triple the greenhouse gases per MWh of natural gas.

South Australia has achieved 50% renewable energy, but this is not without its problems:

  • Wind and solar power are more expensive, so that South Australians pay about $360 per MWh for their electricity: 44% more than the two large states
  • The sun does not always shine and the wind does not always blow: this means that, in the absence of massive-scale energy storage, South Australia has to “borrow” coal-fired power from the East, although this is eventually repaid with interest
  • Solar and wind power cause substantial grid stability and grid synchronisation issues, which become very apparent at the 50% renewable level – good solutions are needed for this; South Australia currently copes by turning solar power off

To avoid “borrowing” electricity, massive-scale energy storage is required. South Australia would need several days worth of demand, at 40 GWh per day. Their famous Tesla battery has been expanded to a capacity of just 0.2 GWh, which is about a thousandth of what is needed. Batteries appear inadequate for energy storage at the required scale, and hydrogen storage is probably what we want.

Tasmania operates at a 92% renewable electricity level, thanks to multiple hydroelectric dams, which do not suffer from the problems of wind and solar (and availability is only an issue during lengthy droughts). In addition, hydroelectric dams can also provide energy storage for solar and wind power, simply by pumping water uphill. It is unfortunate that environmental groups in Tasmania have campaigned heavily against hydroelectric power.

The last chart shows the per capita CO2-equivalent emissions for state electricity generation, plus other emissions (including agriculture, other energy use, industrial processes, waste, forestry, and land use change). Agricultural emissions are highlighted in green. A note of caution, however: the electricity generation data is for 2019, but the total greenhouse emissions are for 2018 (the latest I could find). These numbers cannot be compared to those of other countries, unless the numbers for other countries are equally recent and also include the full range of emissions, per UNFCCC standards (some comparable national averages are shown on the left).

Note that net greenhouse emissions for Tasmania are negative, largely due to tree-planting. Per capita emissions for the large, less densely populated areas are higher than those for New South Wales and Victoria; in part due to transportation requirements (shifting commuters and freight from road to rail would help here). Agricultural emissions per capita are particularly high in the Northern Territory, because the impact of cattle farming is being divided among a tiny population of just 0.2 million people. The overall Australian average of 21.2 tonnes per capita is quite significantly affected by the inevitably high emissions for the large, less densely populated areas. There is also the question of whether emissions due to mining and agriculture should be attributed to the producing country, or to the country of final consumption.

Economically and geographically, Australia is in many ways more like a Central Asian country than a European one, given its large size and its heavy reliance on mining and agriculture (Australia’s greenhouse emissions are comparable to those of Kazakhstan, which produces 21.7 tonnes per capita). However, progress could be made in Australia with more energy-efficient housing and transportation.

It should also be emphasised that, given its small population, Australia’s greenhouse emissions make a neglible contribution to the global and regional climate. If increasing atmospheric CO2 has an effect in Australia’s region, that is due primarily to emissions by the large countries of the world, particularly China (which produces about a third of the world’s CO2). Australia should, no doubt, reduce its greenhouse emissions, but whether Australia does so or not will make no measurable difference to the global or regional climate.


Personality Types and Social Media

Following some discussion with friends, I made a chart comparing the general prevalence of MBTI personality types with their prevalence on Facebook (using data from this report). The first of each pair of bars is general prevalence, and the second is prevalence on Facebook.

It can be seen that extroverted types are more likely to be on Facebook than introverted types. However, the IN-J types swim against the tide. The chart below provides a bit of a summary.

The third chart shows the results for Twitter. Here extroverts are also over-represented, especially the EN-P and ESTJ types, but not the other ES– types. Among the introverts, the ISTJ type swims against the type, and is in fact the most common personality type on Twitter.


Houston, we have a problem

Some years ago, I posted the chart above, inspired by a classic XKCD cartoon. The infographic above shows the year of publication and of setting for several novels, plays, and films.

They fall into four groups. The top (white) section is literature set in our future. The upper grey section contains obsolete predictions – literature (like the book 1984) set in the future when it was written, but now set in our past. The centre grey section contains what XKCD calls “former period pieces” – literature (like Shakespeare’s Richard III) set in the past, but written closer to the setting than to our day. He points out that modern audiences may not realise “which parts were supposed to sound old.” The lower grey section contains literature (like Ivanhoe) set in the more distant past.

The movie Apollo 13 has now joined the “former period piece” category. Released in 1995, it described an event of 1970, 25 years in the past. But the ill-fated Apollo 13 mission of 11–17 April 1970 is now 51 years in the past; the movie is closer to the event than it is to us (although the phrase “Houston, we have a problem” – in real life, “Houston, we’ve had a problem” – has become part of the English language).

The image shows the real-life Apollo 13 Service Module, crippled by an explosion (left), together with a poster for the 1995 movie (right). Maybe it’s time to watch it again?


GameStop and the Flat Earth

The recent GameStop saga seems to me to be more or less the economic equivalent of flat-earthism. The enthusiastic people going “all in” on GameStop seem to be frighteningly ignorant of such basics as how the stock market works, how options work, why trades in batches of 100 occur, and how Robinhood can offer “free trades” (after all, TANSTAAFL).

When helpful people offer sensible advice, or when an inaccurate model of the world clashes with unfolding empirical data, the discrepancies are all too often explained using conspiracy theories or ignored in a self-reinforcing “echo chamber,” rather than being seriously addressed. I’m thinking specifically of certain corners of reddit.

At the same time, with GameStop, people seem overly greedy for profit and/or for revenge against “evil hedge funds” (both motivations appear to be in play). So much so that the impossibility of pushing GameStop stock up to the desired $1 trillion or so (i.e. 2% of the total US stock market) is simply not recognised. I very much fear that it will all end in tears for many people.


2 + 2 = 4 and mathematical models

One of the strangest aspects of 2020 was a number of people arguing that 2 + 2 = 4 wasn’t necessarily true, and that it might be the case that 2 + 2 = 5. In fact, 2 + 2 = 4 is not only true throughout the universe, it is true in every possible alternate universe as well. A great many silly arguments were made by people trying to defend 2 + 2 = 5. But there is a deeper response here that relates to how applied mathematics works, and a few people have been trying to express that.

In general, applied mathematics questions have the form A → B, where A is some real-world situation, and B our desired but unknown answer. We abstract our real-world situation A to the mathematical object X, so that X → Y is the mathematical analogue of our real-world A → B. Mathematical questions have clearly-defined answers (although finding them is not always easy). We can then take our mathematical answer Y and reverse-translate it to the real world, giving something that we claim is a good approximation to B.

In the mathematical world of X and Y, everything is crisp and clear (and 2 + 2 = 4). In the real world, things are messy and ill-defined. Furthermore, in going from A to X we introduce simplifications and approximations which may mean that the mathematical answer Y is not “fit for purpose.”

For example, our real-world question might be “what is the distance from Melbourne to Sydney?” There are three ambiguities here: What is “Melbourne”? What is “Sydney”? And what is “distance”?

The conventional location marker for the city of Melbourne, Australia is the Old Melbourne General Post Office (now a shopping centre, at 37°48′49″S, 144°57′48″E). Likewise, the conventional location marker for the city of Sydney is the Sydney General Post Office (at 33°52′4″S, 151°12′27″E). Let’s use those coordinates. But what is “distance”? If “distance” means “as the crow flies,” then a simple answer might be to find the great-circle distance on a sphere approximating the Earth (let’s use the equatorial radius of 6,378.137 km). This distance can be calculated fairly easily as 714.2 km, which might be a close enough answer for many purposes.

A better mathematical model might be distance on the WGS reference ellipsoid model of the Earth. This gives the slightly lower value 713.8 km (according to Google Earth or raster::pointDistance).

Alternatively, “distance” might mean “by road,” in which case we need a computer representation of Australia’s road network. For this question, Google Maps reports a distance of 878 km via the M31. The expected travel time by car (9 hours and 7 minutes when I looked) might be even more useful.

It may therefore be the case that out of various mathematical answers Y, many are not “what you wanted.” But that failure to abstract correctly does not invalidate the mathematical truths involved in X → Y. In particular, it does not invalidate 2 + 2 = 4. It just means that you picked up the beautiful crystal knife of mathematics and cut yourself with it.

As Korzybski liked to say, “the map is not the territory.”


No, it is not true that 2 + 2 = 5

The year 2020 was an unusual year. One of the strangest aspects was a number of people arguing that 2 + 2 = 4 wasn’t necessarily true, and that it might be the case that 2 + 2 = 5. This is an idea that had been mentioned by George Orwell in his dystopic novel 1984:

All rulers in all ages have tried to impose a false view of the world upon their followers, but they could not afford to encourage any illusion that tended to impair military efficiency. So long as defeat meant the loss of independence, or some other result generally held to be undesirable, the precautions against defeat had to be serious. Physical facts could not be ignored. In philosophy, or religion, or ethics, or politics, two and two might make five, but when one was designing a gun or an aeroplane they had to make four. Inefficient nations were always conquered sooner or later, and the struggle for efficiency was inimical to illusions.

In fact, 2 + 2 = 4 is true regardless of your culture or your skin colour (although you might represent the fact using an alternate set of symbols, like  +  = ). If there are aliens out there, it is true for them too. What’s more, 2 + 2 = 4 is true in every possible alternate universe as well as in this one.

Some defenders of 2 + 2 = 5 have appealed to modular arithmetic, and (to take one example) modulo 3 we have 2 = { −1, 2, 5, … } and 1 = { −2, 1, 4, … }, using overbars to distinguish congruence classes from integers (in order to be precise). Consequently, 2 + 2 = 4 = 1. However, we never get 2 + 2 = 5 in such systems, other than in the trivial case where all integers are equivalent (the proof of this is actually quite straightforward). We certainly do not get 2 + 2 = 5.