Showing posts with label Mathematics. Show all posts
Showing posts with label Mathematics. Show all posts

09 March 2025

The Library of Babel (The Universal Library) (long read)


Some thoughts on the Universal Library problem

The problem was fictionalised by Luis Borges. It may be stated thus: Can we specify a procedure for writing a Universal Library? A universal library contains all texts ever written and ever to be written, in all the languages that have ever and will ever be spoken, and many more that will never be spoken by anyone. The paradoxical answer to this question is yes, and several proofs exist that such a library is not only possible, but is of a finite size, albeit a very large one. One such procedure (adapted from one described by Martin Gardner) is the following:

Suppose a book of 100 pages of 100 lines of 100 characters each. Each such book contains a total of 10^6 characters, including the space. Using the Latin alphabet in upper and lower case (52 characters), 7 punctuation marks and the space, and 10 numerals bring the total to 70 characters. The total number of books, if each contains exactly one permutation will be 70^(10^6), a very large number. It is so large that if every atom in the universe were a printing machine printing at the rate of one character per second, it would take many lifetimes of our universe to print all the books.

Clearly, very, very large library. Does this library in fact contain all possible books?

Each book in the library is a specific combination of characters. Each such combination is 10^6 characters long. Given that any printed book is a combination of characters, that combination will occur at least once somewhere in the library. A book shorter than 10^6 characters will occur many times, since there will be (100-n)^(10^6) permutations of the characters filling out the book to 10^6 characters.

The same consideration applies to books not yet written, for each such book is a combination of characters. Books that will never be written by anyone will also occur in this library. And since all spoken languages can be represented by some scheme of matching characters to sounds, books written in all possible spoken languages will occur in this library.



This summary proof shows that all books ever written, ever to be written, and never to be written occur in this library, many of them more than once. Since every book can be printed with typographical errors, all possible combinations of typographical errors will also occur. In short, not only will all possible books occur, all possible variations on each book will occur. What’s more, a very large proportion of the books will be nonsense in any language, including languages not spoken on Earth (if there are such.) That includes Klingon, and any other fictional language.

This Universal Library is too large. It’s clear that “too large” means not only “utterly infeasible”, it also means “containing too much nonsense.” But mulling over the consequences of the procedure for constructing the library is a useful exercise in handling very large numbers, numbers that are unimaginably large. The Universal Library problem shows that we can conceive of entities that we cannot imagine, and that we can reason accurately about them.


Can the Library be made smaller? Yes, by using an encoding scheme that compresses the data. One might work as follows.

Suppose we use binary code. The we use only 2 characters, and the size of the library will be 2^(10^6), still a very large number. Is it smaller than the library using 60 characters? Yes. The fraction is [2^(10^6) / 70^(10^6)], a very small fraction. 

That’s still enormous, though. Is it enormous enough to contain all possible books? Paradoxically, yes. Every character will be encoded in binary, and hence every combination of characters will occur as a combination of binary characters. What’s more, since binary code can be represented by some combination of alphabetic characters (e.g, a for 1, b for 0), this binary-coded Universal Library will be included in the alphabetic one, once for every encoding of the binary characters. For example, (a,b), or (one, zero) and their equivalent in every possible, known, and unknown language. No wonder encoding the universal library using the alphabet is so inefficient.

Hence the supposedly larger set of books containing every possible combination of 70 characters will be contained in the smaller set of books containing every possible combination of only two characters. Thus, the library utilising 70 characters encodes its information very inefficiently. Can we improve that efficiency?


Suppose we limit ourselves to English books. Since any conceivable language should be translatable into English, surely we can reduce the size of the library? Yes, we can. We need only ensure the inclusion of every combination of characters that represents an English translation of a book written in some other language. But our multilingual library would include all translations of all books into every language. Limiting ourselves to one language to represent all possible books omits those multiple translations. If there are L possible languages, then there are L! translations of all books into all languages. Thus limiting ourselves to one language, the library’s size will be  {[2^6(10^6)]/L!}. This will be a fraction of the multilingual library. But it will still be enormous.

Nevertheless, we can estimate its size. Suppose there are 500,000 English words. Suppose the average length of an English word is 10 characters, including one space. Then each of our English books of 10^6 characters will have an average of (10^6)/10 or 10^5 English words. The size of this library (in binary characters) will be 2^(10^5) books. This is still very large: it’s [2^(10^6)]/[2^(10^5)], which is 10% smaller than the complete library. Not much of a saving. What’s more, it will be this size regardless of the total number of languages.



25 June 2024

Quick Math Course (Math Hacks, Cochrane 2018)

Rich Cochrane. Math Hacks (2018) 100 math concepts and theorems present in two-page spreads showing an overview (explanation in math terms, often some history), a shortcut (some details to clarify ), and a hack (brief summary, sometimes with a pointer to related math). Nicely done graphics, good history, well done examples, and a few annoying typos.
Recommended. ***





27 January 2024

Math History: The Secret Lives of Numbers (Kitagawa & Revell)

Kate Kitagawa & Timothy Revell. The Secret Lives of Numbers (2003) A history of mathematics taking all currently known mathematical texts into account. The Eurocentric view of mathematical development is shown to be egregiously wrong-headed. Miscellaneous theorems (and some proofs) were discovered or invented in many different places at many different times well before Euclid’s demonstration of the logical coherence of all mathematics. Algorithms for solving trade and other complicated problems ditto. The notation that freed European mathematicians to discover number theory was invented in India, and brought to Europe by Arabs. The need to plan planting and seed-time prompted the study of astronomy, which was perhaps the first science to be mathematised. Either it, or geometry, needed for land surveys. Formal mathematics is at least as old as writing.
     The history of mathematics is not even a winding road; it’s a maze of paths leading in all directions with surprising shortcuts, connections in unexpected places, and backtracking. What’s constant is that whenever possible mathematicians exchanged ideas and knowledge. Powerful rulers recognised the value of mathematics and other knowledge, and sponsored the collection of texts, and their study and collation by the best minds they could attract. And ever and again, barbarians with limited insight into anything beyond their immediate goals of getting treasure and women destroyed those collections. We owe a great debt to the scholars who preserved what knowledge they could and taught their students to do likewise.
     I think that Kitagawa and Revell deprecate Euclid’s achievement. True, pretty well every theorem he proved in his books, and many of the proofs themselves, were known before him. Compilations of all known mathematics were made centuries before him. But he seems to have been the first one to organise all known mathematics into a logical system, in which rules of inference applied to a handful of axioms, carefully defined, would connect all theorems. It is the critique and emulation of his methods that has led to new mathematics.
     I also think that Kitagawa and Revell don’t examine the source of mathematics in ordinary language. As far as I know, it’s possible to express distance, time, size, weight, quantity, similarity and difference, direction, etc, in all human languages. The only variation seems to be in emphasis and detail. Mathematics is the more or less systematic formalisation of these concepts when people found it necessary to do so for some practical purposes involving trade and taxes. (Aside: Where I grew up, distance was expressed as time. A certain relative lived one hour away, for example. That’s an hour’s walk. This may be one reason why I find it easy to accept Einstein’s proposal of a space-time continuum, even though I can’t do the relevant math.)
     A keeper, worth an occasional reread. Breezy style, often cliched, which makes it seem easier to understand the math than it really is. The title is a teaser, possibly intended to attract the unnerdy.***

13 September 2021

Numbers (Andrew Hodges: One To Nine)


 Andrew Hodges. One to Nine (2007) Hodges takes each of the first ten natural numbers (including zero in the chapter about The Unloved One), and talks about their significance and meanings. It’s mostly about the math, but Hodges has a large store of cultural relevance to share as well. Again, much of that is about the math: It took a surprisingly long time moving from the practical use of negative numbers to denote debts in casting accounts to the acceptance of their places in mathematics. The same is true of complex numbers, which were still labelled “imaginary numbers” when I was in middle school.
     Hodges writes an easy style, which should give this book a wide audience. But his inclusion of real math and problems for the reader to solve will limit his audience to those with enough math background to understand his narrative, even if only vaguely. Luckily, I am one of those. I enjoyed the book, skipped almost all the problems, and followed the math far enough to get the flavour of that which was beyond me. A tasty treat. ***

21 September 2020

Once more with feeling: Climate Change (longish read)


A comment based on my current understanding of the science

     Climate is a chaotic system. It consists of a web of interconnected feedback loops. For example, cloud cover cools the ground below, which reduces evaporation, which reduces the amount of water in the air, which reduces the odds that there will be rain. However, water doesn’t cool as rapidly as the ground, so evaporation from large lakes continues, which increases the amount of water vapour in the air, which increases the odds that there will be rain. Which is why cloud cover over the Great Lakes usually signals rain, while cloud cover over the Prairies does not.

     These links between feedback loops makes it difficult to precisely model the weather and hence the climate. Some feedback loops cancel the effects of other loops, and some feedback loops enhance the effects of other loops, and all of them are entangled with one or more other feedback loops. Such systems are characterised by non-linear relations between causes and effects. Small (sometimes very small) changes in some factor can become magnified into huge effects. Hence the sometimes rapid development of afternoon thunder storms after a bright, cloudless morning.

     A chaotic system cycles through a series of states ("the seasons") that vary within some range but average out over time (average annual seasonal temperatures, etc.) This average is called the attractor. "Regression to the mean" is a common effect: Think of a baseball pitcher's performance over time. Pitching is the influenced by many factors, most of which affect each other. The pitcher's performance is a chaotic system: sometimes he's hot, sometimes he's not, most of the time he performs near his average level.

     Chaotic systems can change radically. If some factor or factors exceed some limit (too much or too little), the whole system will shift into a new series of states, some or all of which are radically different from the previous ones. Hence climate change, or global warming.

     There is no question that burning fossil fuels has increased CO2 concentration in the atmosphere, now (about 400 parts per million) coming closer to double the concentration of pre-Industrial Revolution levels (about 280 parts per million). (See this graph) This is having an effect on climate, the  annual weather cycles. The important questions IMO are:
a) How fast is this happening?
b) Is it happening faster in some climate zones than others?
c) How far will it go?


     Answer to a) Unknown, but climate models so far have understated the expected changes. This is shown in:
     Answer to b) Yes. For example, the Arctic is warming about twice as fast as the temperate zone. Predictions of the extent of summer sea ice have repeatedly underestimated the numbers. The general trend is melt beginning earlier and proceeding more quickly than predicted by the models available at the time. Thus, there is less sea ice, and it’s thinner. The last ten years or so have seen record ice loss almost every year.
     Answer to c) Nobody knows for sure how far climate change will go. Models are continually updated and tested with new data, both current and historical (from Greenland ice cores, for example). As these models get better, they imply what I think are several important conclusions:

1) Climate can change very rapidly from one normal limit to the other. For example, the Little Ice Age, a fairly sudden cooling of the northern winter, which among other things destroyed the Viking settlements in Greenland.

2) Seasonal weather patterns can change in opposite directions, for example, rainfall shifting from winter and summer, hence wetter springs and falls, and dryer summers and winters. This means flash flooding and drought when neither was common in the past.

3) Weather patterns can change from historic averages within two or three years, for example the now five-year drought on the West Coast of the USA.

4) There's a lag between the warming effects of CO2 and climate change because of heat-sinks, chief of which is the ocean: Over half of the recent rise in ocean levels is caused by the expansion of water as the oceans warmed up.

It's true that climate models aren't good enough to satisfy the non-scientist's yearning for certainty. But I think the certainty is higher than required in a civil law case ("balance of probabilities"), and close to that required in a criminal case ("beyond reasonable doubt”, emphasis on "reasonable").

(Revised 2020 09 21)

08 August 2020

Mathematics and the News

 

 

John Allen Paulos. A Mathematician Reads the Newspaper (1995) I bought this book because I’d read Paulos’s Innumeracy, a seminal book that I think every teacher should read. This book extends one of his themes, that the media are a prime source of innumeracy, and so tend to distort and misinform. Each section corresponds to a section of the paper, News, Sports, the Arts, etc. The misuse or misreporting of statistics features in all sections, but the unwarranted surprise at coincidences, and confidence in economic and sports forecasts, together come a close second.
     Once again, Paulos muses on the vagaries of voting. Every voting system ever attempted has produced results that annoy a large section, sometimes even the majority, of voters. If he were to write today, he would note the vacuousness of political polling, which always produces more or less misleading results.
     But mathematics is about patterns and processes, so even the society section, with its reports about charity balls, the doings of famous people, etc, gives opportunity for mathematical musing about relationship networks, and the interconnectedness of our social circles, which Facebook et al have made more obvious than ever in the 25 years since Paulos wrote the book.
     This was a re-read, I enjoyed the book, but not as much as Innumeracy. ***

     Update 2020 08 13: Percentages are real problem.
     One of the most common errors is to report a percentage change without reporting the base rate. For example, "XYZ increases the cancer of some obscure organ  by 150%". True, it increases the rate from 1 per 100,000 per year to 3 per 100,000 per year.
     Another egregious error is to confuse percentage points with percentages. Thus, "Unemployment rate increases 2 %". Yup, it rose  from 5% to 7%, which is an increase of 2/5, or 40%.

   Update 2020 12 22: Raw numbers vs Rates: How to misreport covid-19
     Every day now we hear the number of new cases and deaths from covid-19. Almost never the rates. For example, Ontario reported some 2100 new cases the other day, while Alberta reported about 1800. But Ontario has roughly three times the population of Alberta, so the rate in Alberta is about three times higher.
     The mistake is to treat every jurisdiction equally, which hardly ever makes sense. The same error shows up when reporting miscellaneous numbers about cities and towns. Such as crime rates. Small towns naturally have fewer crimes, but related to population, the crime rates are usually higher than in the large cities.
     Related to time, the rates are of course lower. Hence the pained astonishment when a neighbour murders his family. This suggests that we pay more attention to events along our individual time-lines, and less to events within the communtiy at large. Our preception biases mislead us.
     Rule of thumb: Do The Arithmetic! Always calculate the rates.

     

23 March 2020

Economics: dismal, and less than a science

David Orrell. Economyths: 11 Ways Economics Gets It Wrong (2017) In this revised edition of his book, Orrell adds updates on each myth. Basically, the neo-classical economics establishment snarled back at him. It seems his book touched a nerve. Not surprising, since Orrell’s thesis is that neo-classical economics is so far out of touch with reality that it’s dangerously wrong.
     Some years ago, I read an online proof that a legislated minimum wage could not possibly work, since the law of supply and demand guaranteed that the lowest wages offered represented the actual value of the work performed by those workers. I wrote a note to the author suggesting that the analysis left out of account employers’ power to set wages at almost any level they wished, and that their greed would depress wages below what the work was worth. I got no answer. Presumably, I did not understand economics.
     Fact is, I read Milton Friedman many years ago, and I thought then what I think now: the man had no understanding of how real people behave. For it’s always been clear to me that economics is a branch of social psychology. The law of supply and demand is about psychology, it’s about the perception of scarcity and desirability. “Value” is about psychology: if the seller values a ware more than a buyer, he will ask a price the buyer is unwilling to pay. Hence haggling. And so on.
     And so on. Orrell has analysed the myths much better than I have, which makes his book very much worth reading. I found it at our local dollar store on the remaindered-books rack, a sad fate for such an important work.
     His most interesting notion is that money behaves like quantum particles, because it has a dual nature: it is both material (coins etc) and abstract (numbers). I don’t buy this, because I see no obvious way for that notion to account for inflation. It may well be that quantum math will provide better models of how money behaves as an element of the economy, but inflation is an effect of psychology. Ordinary inflation is a natural effect of people charging more than a good is worth in order to make a profit and/or to pay the interest on their debts. Runaway inflation occurs when people no longer believe that money represents values well enough to be used as a generic IOU. But those observations are merely the beginnings of an attempt to account for inflation, which is fundamentally crazy: It’s as if we needed more and more meter sticks to measure the distance from here to London.
     Still, I think this book is a necessary and useful primer in economics. By showing that the notion of “utility” is empty, or that economic decisions are irrational, or that the system is inherently unstable, etc, Orrell shows that neo-classic economic theory is empty. I’ll go further than he does: he shows that it’s a mess of superstitions, a pseudoscience like astrology. ****
    Update 2020-03-28: The single biggest failure of Friedmanite economic theory is its pricing of externals. It's zero. That means that prices will understate the relative costs of goods and services. This is most obvious in the costs of raw materials. Ignoring the cost of externals underprices mineral resources, and overprices organic resources. Thus we overuse concrete, and underuse wood.
     BTW, back in the 1970s I read an article by an accountant, who "proved" that the costs of replanting forests could never be recovered. That's when I began to suspect that "generally accepted accounting principles" are somewhat removed from reality. These accounting practices are of course based on Friedmanite assumptions about costs and how to account for them.
    Update 2020-04-14. "Generally accepted accounting principles" are also designed to minimise tax obligations. The accountant also has some choice in which principles to apply: They can make a bad year look good, and vice versa, depending on whether their client wants to attract investors or distract the taxman. As long as the principles used are spelled out, that's ethical.

04 August 2019

Climate is a chaotic system


     Climate is a chaotic system. It consists of a web of interconnected feedback loops. This makes it difficult to model precisely, since some feedback loops cancel the effects of other loops, and some feedback loops enhance the effects of other loops, and all of them are entangled with two or more other feedback loops. Chaotic system are characterised by non-linear relations between causes and effects. Small (sometimes very small) changes in some factor can become magnified into huge effects.

Some chaotic systems cycle through a series of states ("the seasons") that vary within some range but average out over time (number of cycles). This average is called the attractor. "Regression to the mean" is a common effect: Think of a baseball pitcher's performance over time. Pitching is the influenced by many factors, most of which affect each other. The pitcher's performance is a chaotic system: sometimes he's hot, sometimes he's not, most of the time he performs near his average level.

However, if some factor or factors exceed some limit (too much or too little) the whole system will shift into a new series of states, some or all of which are radically different from the previous ones.

There is no question that burning fossil fuels has increased CO2 concentration in the atmosphere, now approaching double the concentration of pre-Industrial Revolution levels. This is having an effect on climate (ie, on annual weather cycles). The important questions IMO are:
a) How fast is this happening?
b) Is it happening faster in some climate zones than others?
c) How far will it go?

Answer to a) Unknown, but climate models so far have understated the expected changes. This is shown in:

Answer to b) Yes. For example the Arctic: Predictions of the extent of summer seas ice (the extent of summer sea ice melting) have underestimated the melting. The general trend is faster melting than predicted by the models available at the time.

Answer to c) Nobody knows for sure how far climate change will go. Models are continually updated and tested with new data (both historical and current). Reserach uncovers new feedback loops. As these models get better they imply several (from my POV) important conclusions:

1) Climate can change very rapidly from one normal limit to the other (look up Little Ice Age).

2) Seasonal weather patterns can change in opposite directions;

3) Seasonal weather patterns can go from one extreme to the other within a year or two.

3) There's a lag between the warming effects of CO2 and climate change because of heat-sinks (chief of which is the ocean: over half of the recent rise in ocean levels is caused by the expansion of water as the oceans warmed up).

It's true that climate models aren't good enough to satisfy the popular yearning for "near certainty" in their predictions. But the certainty is higher than required in a civil law case ("balance of probabilities"), and IMO close to that required in a criminal case ("beyond reasonable doubt, emphasis on "reasonable").


30 April 2019

Incentives and Disincentives; Superfreakonomics (2009)

Steven D. Levitt & Stephen J. Dubner.  Superfreakonomics (2009) Another excursion into the obvious but oddly unappreciated fact that humans, like other animals, respond to incentives. But it’s not aways obvious what the incentives are, in part because a policy proposer by definition doesn’t think like most people, and when most people propose or back a policy, they usually misunderstand both the problem and the solution. The former is shown in campaigns to eliminate prostitution (most prostitutes are in the business because it’s the best-paying work they can get); and the latter in the design of child safety seats for cars (for 3-year-olds an up, the adult seatbelt does as good a job as the safety seat).

     Nevertheless, the implicit thesis is worth placing front of mind: If you want to know whether a proposed policy will work, ask both what the incentives and disincentives are. Thus, Ford installed seatbelts as a safety feature, but buyers balked: they didn’t want to be reminded that driving a car is dangerous. But after several decades of ubiquitous seatbelts, buckling up has become second nature. The incentive is conformity to a social norm.
     The last chapter deals with global warming, which 10 years ago could still be considered not well enough understood for making sound policy. The doomsayers of the time have turned out to be correct: it’s real, and we should have begun mitigation and adaptation decades ago.
     A fun read, which gently teaches you to check the numbers and think hard about what people actually want. We humans rarely have simple wants: we generally want to have it all, which is impossible. So we need to compromise. Understanding the problem comes first, and that almost always requires knowing the numbers and doing the math. ***


14 May 2016

The odds that odd things will happen: The Improbability Principle (Hand, 2014)

   

David J. Hand. The Improbability Principle (2014) Say you go to Timmie’s and meet a person you haven’t seen for 50 years. “That’s a one in a million chance!” people say. Which means that in Canada it will happen to about 37 people. If you mean one in a million per year, that’s 37 this year, and about 900 or more during the 20-odd years since I turned old enough to meet someone for the 1st time in 50 years. “One in a million” isn’t such overwhelming odds for or against after all.
     And that’s Hand’s point. We are bad at estimating odds. Very bad. We react with Wows! to many things that we should expect to happen pretty often. Take the meeting a long-ago friend or neighbour: Since we travel much more than we used to, the odds are far better than they used to be that we will come across someone we knew some decades ago, and even better that that we will meet people who know people we know.
     Explaining why the improbable happens much more often than we expect, Hand provides an excellent introduction to probability and statistics. He writes clearly, with occasional glimmers of a pleasantly dry wit. Anyone who gambles should read this book. His discussion of drug testing will make the reader skeptical of pretty well all news about medical breakthroughs. Which reminds me that reporters of dramatic rate increases in something or other almost never give us the actual numbers. Reporting a 100% increase in some rare disease is much more exciting than reporting that 2 more deaths are expected this year in Ontario.
     And it’s much more thrilling to read about a traveller who changes his flight plans, and so isn’t one of the 300-odd who die when the plane crashes into a mountain. We don’t read about the hundreds of thousands of travellers who have changed their flight plans every day, but have never missed being killed in a plane crash.
     One aspect of our innumeracy that Hand doesn't mention is our difficulty imagining large numbers. That's certainly one reason we have trouble estimating odds. John Paulos says some entertaining things about that in his Innumeracy.
     Well done, recommended. ***½
 

28 April 2016

Scientific ideas we should forget

 
    John Brockman, ed. This Idea Must Die (2015) A compilation of answers to the question, “What scientific idea is ready for retirement?”, posed on https://www.edge.org/ in 2014. Brockman arranges the answers, starting with general ones, then roughly by topic, such as quantum physics, neurology, evolution, etc, and ending with math and statistics. Often, a short sequence of essays reads like a dialogue.
     Most answers are directed at a general audience, which of course includes scientists in other fields. The writers try to explicate how the target concept causes mistakes or worse, what a better understanding would look like, and sometimes what concept should replace the target. A handful read like part of an ongoing dispute between the writer and the other specialists in the field.
     I was pleased to see that many of my objections, puzzlements, and exasperations were confirmed or clarified in these essays. One of these is the wave-particle duality interpretation of some experiments in quantum physics, which I think is a holdover from the days when observations and models made a nice clean distinction between things that rippled through, and things that bumped into, each other. QM equations show that this distinction isn’t much use. It’s nonsense to say that entities are both waves and particles. It would be like arguing that because people sometimes exhibit fear and at other times exhibit joy, that human beings are somehow both fearful and joyful all at once.
     Another of my annoyances is Schrödinger’s Cat. I’m glad to see that Freeman Dyson notes that the wave function isn’t a thing, so it doesn’t collapse. It’s statement of probabilities in some specific context. (Or conversely, it’s a context defined by a distribution of probabilities). An observation measures one of the probable states. At another time, another state will be observed. To argue that somehow all probable states exist at once is like arguing that because Jack is sometimes angry and sometimes happy when he goes to a baseball game, that therefore Jack is both angry and happy until he goes to the game.
     I found some of the best entertainment in the essays dealing with psychology. One writer attacks a concept, another assumes that same concept in order to attack another one. So what’s an non-expert to do?
     However, the overall effect of reading these essays is the somewhat depressing reminder that we all hold erroneous or misunderstood scientific ideas. They appear in news reports and TV punditry hourly, and many of them have very bad effects on public understanding and thereby on public opinion, which in turn limits politicians’ beliefs about what can and should be done.
     Misunderstanding of basic math is nowhere more obvious than in news about statistics. Case in point: This morning, I heard a report on rising rates of STDs in Alberta, a roughly 40% increase overall in the last ten years, with the highest rate increases among the young and the old, and the lowest among the middle aged. Well, without the actual numbers, rate increases are pretty well meaningless. An increase of, say, from 10 to 20 per 10,000 young would be a 100% increase, while from from 100 to 150 per 10,000 middle-aged people would be only a 50% increase. 50% sounds a lot better than 100%, right? But in this example, 50% is worse, since 50 extra cases will cost five times as much as 10 extra cases.
     The final essay, by Paul Saffo, reminds the reader that the more we know, the more unknowns we encounter. Saffo refers to Teilhard de Chardin’s noosphere, the sphere of knowledge. As it expands into the unknown, its surface increases, the contact between known and unknown increases. I developed this idea on my own many years ago, when I thought of the known as an expanding circle. 2D instead of 3D, but otherwise the same. Either way, there will never be an end to the questions we can ask. Even better, there will always be more questions to ask than have already been answered. But Socrates said as much 2,500 years ago. History echoes.
     Highly recommended, as is the website. ****

24 July 2015

The Code (2012)

     The Code (2012) Presented by Marcus Du Sautoy. Three-part series about mathematics, and its role in describing the universe. An excellent overview and introduction to mathematics, clearly explained, with better than average visuals, and emphasis on everyday, real-life applications. The title alludes to Du Sautoy’s metaphysics: the code is a method of making sense of the world. The series is worth watching more than once, especially of you’ve forgotten most of your high-school math. Above all, it’s reminder of how much of our economy, our technology, our politics, our social life, even our  private lives is described and explained by the code, whether we know it or not. Understand the code, and you understand the universe.
     Or so it seems.
     Du Sautoy believes that mathematics underlies reality. I don’t. I believe that mathematics is one of many symbol systems we use to make models of our experience, models that are good enough to help us survive. We make mistakes in creating those models, and some models are more than a little off. The only check we have is that the models work. But I don’t think they answer the question of what’s really out there. If they did, then any model that works is a true representation of reality, at least insofar as it works, at least a partial truth, at least a limited glimpse of the real. Trouble is, we have models that contradict each other. When that happens we get into squabbles about which one is truer than the other. There’s no question that the religious models work in the sense that they give people a reason to get up in the morning. But they contradict each other, and they contradict mathematics.
     The mystery about mathematics is that it works so unreasonably well. Why? There is no good answer that I know of, there is none that satisfies me. But I think the observation that mathematics begins with physical interactions between us and the world around us offers a clue. Other animals do this too, sometimes so well that we want to ascribe conscious reasoning to them. It may be that a crow figuring out how to unlock a cage is reasoning consciously, but we’ll likely never know. We do know that we can devise algorithms that reason about the data that we feed in, and produce more reliable results than we do ourselves. Reasoning does not require consciousness.
     What then does require consciousness? The kind of understanding that enables us to choose the kind of reasoning we need, and more than that, to recognise and understand new problems, and devise the reasoning to solve them. It’s at this level of understanding that Du Sautoy’s belief in the underlying reality of mathematics occurs, and that I disagree.
     Not that it matters. This level is so abstract that it’s not about reality anymore, but about our images of reality. Those are all finally private. The wonder is that language enables us to share these private imaginings as well as we do. We can share mathematical models better than any other, which deepens the mystery.
     The series can be watched on TVO. ****

20 April 2015

Bigger isn't better: optimum organisation size

On the optimum size of an organisation

     I believe that for any enterprise there is a rather narrow range of effective size. Too small, and there are too few resources to accomplish the mission. Too large, and too many resources are used simply to keep the organisation functioning. Worse, as the organisation grows beyond its optimum size, the incentive for its members shifts from fulfilling the mission to creating and maintaining a secure position within the system.
     VLOs (Very Large Organisations), such as the mega-hospitals in Toronto, are too large to function effectively. An organisation is a network. As any moderately numerate person should know, the possible paths through a network increase exponentially with the number of nodes in the network. Moving information around is the essence of management. For that reason, as an organisation grows, at some point it begins to spend more resources on managing itself than it does on fulfilling its mission.
     It's no wonder that VLOs ossify, become plagued with internal politics, and find it almost impossible to shift from their course, even when everybody is aware that there's an iceberg looming ahead. It’s no wonder that people desperate to make them work propose "disruptive governance" and similar cures. Such cures merely perpetuate the disease, since they treat the symptoms, not the cause. The organisation is still too large, so it’s still spending far too much on itself, and too little on its mission. People know this, and attempt to reduce management costs. But the apparently common-sense approach of combining smaller units into larger ones in order to save on management costs assumes that management costs are concentrated at the top. In fact, management costs permeate the organisation, at every level. When two cleaners decide how to divvy up their work, they are managing their work. When unit managers construct a timetable for cleaners, they are managing. Which method costs less?
     I think that the best cure is to break up a VLO into small, effective (and therefore efficient) units. My experience as a teacher federation representative for our local bargaining unit gave me many opportunities to observe how our own small board differed from the huge ones (in the GTA, for example). I've come to the conclusion that the optimum size for a school is around 800 people, students and staff. A school board should govern one or two secondary schools and their feeders. I don't know of much research about organisation size and effectiveness in different industries, but I suspect that the optimum size for any organisation is about that of a healthy village: around 1,000 people. If more people are needed for some megaproject, bring several smaller organisations together, and parcel out the work among them.
     The notion that small units should be combined into larger ones in order to save management costs is mere superstition. Experience shows the exact opposite. E.g., the first thing that happened when Ontario elementary and secondary school boards were amalgamated in 1970 was an increase in the number of managers at the board level. In the case I lived through, we added a "supervisor of plant" and his clerical help to the board's staff complement. The board also "needed" superintendents of elementary and secondary schools. So the total board level staff increased by six or seven people, without any off-setting "efficiencies" in actual operating costs.
     We need to change how we organise our work. But unless we get rid of the superstition that bigger means better, we aren’t likely to get the results we want.

Why bigger is rarely better

      Back in February, the Montreal Gazette reported that the Quebec planned to eliminate some 1300 middle managers in their health care system. The aim was to save money. They expected to reduce the bill for health care by about $220M per year. See: http://www.longwoods.com/newsdetail/4995
      The recent riots in Quebec indicate that the government has proceeded with its austerity plans, eliminating jobs throughout the public sector. It is reducing the number managers by reducing the number of organisational units. In healthcare, some 182 care-giver agencies were to be replaced by 32 “umbrella” agencies.



     Anyone who has followed the history of rationalising a system by combining smaller units into larger ones knows that larger organisations need more, not less, management. The reason is that an organisation is an information network. We organise ourselves into teams and larger systems in order to perform work that we can’t do separately. The very essence of these systems is information flow. Goods and services flow wherever information about them directs. When information is blocked at any point in the network, the whole system slows, and if the blockage continues, it eventually stops. There are many organisational structures, but most of them are pious fictions. The functional flow of information is  more complex than the chart indicates.


     A fundamental property of a network is that the number of the possible paths through it increases exponentially with size. This means that the larger the organisation, the more effort must be expended to ensure that the information moves along the proper paths. Beyond a certain size, the organisation uses more effort to move information than to do its productive work. One symptom of this is that the productive workers must spend more and more time documenting their work.
     So, in the long run, the new system will cost more, not less.
     The wider economic effects of firing 1300 people will be felt almost immediately, and will be negative.
     Assuming the projected savings are real, some $220 million will be removed from the Quebec economy. That’s a lot of money, and will reduce economic activity in Quebec. Economists estimate that on average each dollar spent generates about five dollars of economic activity. So saving the Quebec Treasury $220M will cost the Quebec economy about $1 billion. That will of course cost the Provincial Treasury a lot of money. Probably about $220 million.  Net savings to the Treasury: zero. Net effect on the wider economy: a cost of about $1 billion.
      But it gets worse. These middle managers are the people who manage patient care, who plan. They will be replaced by senior manager from higher up the food chain who haven’t done this work for some tine, if at all. The effects of replacing experienced people with inexperienced ones can only be imagined.
     So why is the Quebec government going through this futile exercise? Because too many people believe that a government budget is the same as a household budget, and too many people think when they spend money it disappears. Too many politicians, who should know better, make the same mistake.
     They don’t understand the basic principle of a money economy: My spending is your income, and your spending is my income. If we all spend less so that we will have more money to pay down our debts, we will all earn less, and after we’ve taken care of the basics, we will all have less money to pay down our debts.

11 March 2015

The Imitation Game (2014)

      The Imitation Game (2014) [D: Morton Tyldum. Benedict Cumberbatch, Keira Knightley, Matthew Goode] A fictionalised version of Turing’s life, focussing on his work at Bletchley Park, where he improved on a Polish code-breaking machine and invented the theoretical basis of the digital computer, and ending with his arrest on charges of gross indecency and the effects of synthetic estrogen on his personality and mind.
     The script emphasises the strained human relationships and emotional costs, and strongly hints that Turing was autistic. It dramatises the research and the conflicts within Bletchley Park, portraying its Commander as a narrow-minded results-focussed martinet who despised academics. The relationship between Turing and Joan Clarke has the ring of truth, despite the use of Knightley to act the part. The producers skim over the math and logic, rightly deciding I think that too much technical detail would cause eye-glazing. But an unfortunate side-effect is a variation on the mad-scientist-geek stereotype: Turing is not normal. I think that many, perhaps most, movie-goers will on the one hand sympathise with the emotional pain Turing suffered, and on the other will feel confirmed in the attitude that science is not for ordinary folk. The victimisation of Turing as a gay man will cause similar mixed responses.
     Having seen Codebreaker (See review of February 24, 2015) I think was an advantage, since it supplied an objective framework for this film’s point of view. We can never know what it feels like to be someone else; we even have difficulty reconstructing our own early selves. Biopics like this one help us, and when a nuanced script, a uniformly high level of action, and a carefully paced narrative rhythm come together as they do in this movie, we only be grateful. It’s worth seeing, both as a great movie and as a credible and moving interpretation of a troubled man’s life. ****

24 February 2015

Codebreaker (2011)

     Codebreaker (2011) [D: Clare Beavan and Nic Stacey. Ed Stoppard, Henry Goodman, and contemporaries and family of Turing] Short documentary about Alan Turing, about his work as code breaker at Bletchley Park, his seminal papers on computing, and his conviction for gross indecency and his eventual suicide. He was sentenced to receive stilboestrol, a synthetic oestrogen, which among other things messes up the brain. The title is ambiguous: Turing broke two codes.
     Alternating between voice-over narration of Turing’s life and dramatised sessions with Franz Grünbaum, the psychiatrist who treated Turing (and who became his friend), the film is an effective indictment of the attitudes that destroyed one of the most brilliant minds we’ve been privileged to know. We are somewhat less benighted now, but there are discouraging signs of increasing acceptance of hostility towards those who depart too far from current norms. It’s depressing to watch a story about the destruction of human being.
     The movie reminded me of how the Turing Test has evolved over time. For a while, I participated in a newsgroup about artificial intelligence. We ascribe awareness, self-awareness, personality, etc, because of the  behaviours of our fellow creatures. Sometimes, we go too far: I don’t think a snail is aware of pain, even though it recoils from flame. But it is certainly capable of learning, if by that we mean changes in behaviour that depend on the history of the individual. Since learning is an essential component of intelligence, the snail has some degree of intelligence. And since we see intelligence of varying complexity in many different creatures, it’s no stretch at all to expect that machines will exhibit intelligence. It’s when we conflate intelligence with self-awareness, with consciousness, that we get into trouble. More precisely, “intelligence” as a cognitive trait is far too stretchy a term. For many people, it includes creativity, for example. For many others, it requires not only problem solving, but also awareness that one is solving a problem. And so on.
     Recently, I came across a fact I’d ignored, and a comment that reframes Turing’s Test.
     The fact is that Turing machines are incredibly inefficient compared to brains. We can compute “that’s Uncle Fred, and he’s happy” in a fraction of a second expending a few joules of energy. A machine needs longer and expends many kilojoules of energy to compute that “That’s Uncle Fred”, and it can’t (yet) compute that he’s happy.
     The comment is that the Turing Test is really about humans, not machines. It tests whether the human can be fooled by a machine. And since the program is devised by a human, it really tests whether one human can fool another one. But we already knew that.
     It’s mark of Turing’s gift to us that even as we mourn him, we want to think about the things that mattered to him. ***

03 December 2014

Douglas Hofstadter. I Am a Strange Loop (2007)

    Douglas Hofstadter. I Am a Strange Loop (2007) I’m a fan of Doug Hofstadter. I like his ability to make the most abstract and mind-bending propositions, and then bring them into one’s understanding by using a metaphor or every-day detail or experience. He loves puns, and repeatedly uses the insight-generating power of accidental similarities and equivalences. He knows that we all makes sense of the world differently because we have had different lives, so the more points of entry, the more points of view, the more points of the argument, the more likely it is that the reader will be able to share his thinking.
    Here, Hofstadter returns to the puzzle that has focussed his life: What is consciousness? He now asks it as, What is a person? Here’s how I interpret his exploration of this puzzle.
    The title supplies the short answer: A person is a strange loop. To explain that concept, he starts with feedback, first as an unwanted side effect of outputs looping back as inputs, as when a microphone screeches in the middle of the gym. He escalates that to the feedback loop we experience in a hall of mirrors, or when a video camera videos its own output on a screen. More complex is the feedback loop we use when we control home heating with a thermostat.
    More complex still are the biological feedback loops that maintain bodily function. These loops intersect in many ways; they form a feedback web. To describe life is to describe feedback loops and webs.
    But there’s more: animal life includes feedback loops within the nervous system. We focus on something we see because we want more data. The visual centre has sent its outputs to other parts of the brain which in turn send their outputs to still other parts, and one of those parts triggers the “turn your head and look more closely” action.
     In short, we are perception machines. All living things perceive their environment in the sense that they respond to those features of it that their sensors monitor. That environment includes their own internal states. These are the feedback loops that enable living things to maintain their life processes over time.
    Humans, and many other animals, not only perceive their environment, they perceive their bodies in space, and that perception becomes part of the feedback web that results in actions. Some animals perceive at another level: they perceive themselves. They know that they are not the chair that they are sitting on, nor the human who is sitting on the chair. But this self-awareness is limited: a cat does not know that what it sees in the mirror is itself, not another cat.
    Finally, some animals are able to perceive themselves perceiving themselves. This is the strange loop of Hofstadter’s title. The famous mirror test demonstrating that chimpanzees have a self-image shows what he means. Humans have an even more complex capability: we perceive ourselves perceiving ourselves perceiving ourselves. This recursion constitutes what Hofstadter thinks of as a person. In fact, there seems to be only a practical limit to how far this recursion can go. Our brains are huge and complex, but there is a limit to the amount of information included in any one moment of awareness. At the conscious level, the recursion is expressed in symbols, primarily via language, but also via all the other mediums we use to articulate our awareness and understanding of ourselves, each other, and the world around us.
    That’s Hofstadter’s thesis as briefly as I can explain it. To me, it’s the most compelling account of consciousness, of a person, that I’ve read. It has the virtue of being testable. Hofstadter himself supplies the basic test. He reminds us of animal behaviours that suggest awareness, and more importantly, of the observation that a human grows in awareness of its surroundings, its body, and of its self. Babies are born barely able to respond to external stimuli. By around 5 or 6 years of age, a human has a well-developed self: “I” means not only the body, it includes desires and impulses, abilities and skills, the recognition of the things in its environment,  memories of yesterday and the day before, and expectations of the future.
    Most characteristically, the self is the way those awarenesses are expressed,  translated into stories, songs, pictures, and so on. The child is a person because it knows itself, it has constructed a narrative of itself as an agent in the past, present, and future. And as dementia destroys the brain, it also destroys the person. The narrative that constitutes the self diminishes bit by bit, and we observe the terrifying reality that a body can be empty, a shell with no self inhabiting it.
    The extension of the self into time and space, into memories and ideas, into symbolic representations, is uniquely human. To paraphrase Hofstadter, a dog will remember that a table scrap is delicious and therefore worth begging for, but it doesn’t reminisce with other dogs about The Best Table Scraps I Ever Ate.
    Hofstadter includes a couple of chapters on how Goedel’s theorem shows how complex the strange loop really is. He argues that Goedel’s theorem is about self-reference in a symbol system, and how that enables self-reference in general, and more specifically the kind of self-perception that makes a person. You can skip this part of the book.
    His motivation for this extended meditation on the self was the death of his wife. Like many people who have lost a most-beloved one, he had the uncanny feeling that she was still in some sense present, within himself, in his memories of her, in which he re-enacted how she would have responded to a new piece of music, to a new book, to a walk in a well-loved wood. In a sense, her personality was stored within him, and trying to puzzle that out led him back to the central question of his life. I don’t think you should skip those parts of the book.
    I thoroughly enjoyed this book. Recommended. ****

See also my review of Rosenfield's The Strange, Familiar and Forgotten.

10 August 2014

Ian Stewart. Nature’s Numbers (1995)

     Ian Stewart. Nature’s Numbers (1995) A guide into the uses of mathematics, and a glance at how mathematics has changed as our understanding of the world around us has changed. Stewart doesn’t like the divide between applied and pure math, he points out that each prods the other into ever new insights. His exemplar is the calculus, a mathematics invented in order to deal with rates of change of rates of change, prompted by Newton’s insights into how things move. Newton’s model of motion was a new way of thinking about it. To formalise that he needed more math than was available to him, so he invented it. Leibniz invented it, too, using a different notation. Newton’s notation has won out, barely, because it’s somewhat easier to use.
     We now can’t get along without the calculus, which informs all our technology. I learned how to integrate and differentiate years ago, and can’t do it any more, But the way of thinking it taught me is with me still. That’s the enduring legacy of learning math that you won’t use: it changes the way you think, more precisely, it increases the ways you can think about the world. Since then, more new math has been developed.
     The book is also an attempt to change the average person’s notion that math is calculation, but that it’s about patterns. The kinds of patterns that math can deal with now may be called patterns of patterns. We can’t calculate the weather accurately beyond a few days, but we can say a good deal about what kind of patterns to expect. These patterns are the climate (Stewart doesn’t say this, I’m building on his insights). It’s the changing patterns of the weather that’s meant by “climate change”. And although we experience only weather, we also have an uneasy sense that the patterns of weather are changing. The climate models put numbers to these changes, telling us that while we may not have more rain, for example, the rain will fall less frequently and in smaller areas, so we will see more flooding. Thinking in terms of patterns of patterns is a way of dealing with many more variables than we can handle by thinking merely about patterns.
     A good book, but it lacks pictures. Stewart is a poet, he thinks in images, but many people (most?) need actual pictures to understand metaphors. Like some other popular science books, this requires some background. You have to be able to think mathematically, not merely arithmetically, in order to fully get Stewart’s theses. Nevertheless, I recommend it. **½

06 December 2013

Brian Clegg. A Brief History of Infinity (2003)

     Brian Clegg. A Brief History of Infinity: The Quest to Think the Unthinkable (2003) Well done, sometimes text-bookish, account of the history of the concept of infinity. Clegg is very good at potted biographies, and has a good grasp of the arc of developing understanding. He speculates perhaps a bit too much about the personalities and the tendency of thinkers about infinity to show signs of incipient or real madness.
     The notion of infinity has now, after the invention and development of set theory, a good logical foundation, but there are still conundrums worth pursuing. Clegg’s account of Russell’s paradox set me to thinking about the difference between sets and their elements. The questions is, does it make sense to speak of the type of a set or of its elements? If so, is the type of a set necessarily that of its elements? If not, then supersets need not be the same type as the sets that are its elements. There is perhaps a hint of this in the fact that the set of all subsets of a set is of larger size than the set itself. Anyhow, if a set and its elements are not of the same type, then Russell’s paradox dissolves. Or so it seems to me.
      More formally: define a simple set S(e) as one whose elements e are not themselves sets. Define the superset S’(S(e)) as the set whose members are S(e) and all its subsets. BTW, if S(e) is finite, then so is S’(S(e)). If S(e) is infinite, then S’(Se)) is its power set. We define the type of set as the type of its elements. Thus, a simple set is of the same type as its elements.
     The question I now ask is whether S and S’ are of the same type. I have defined the type of a set as the type of elements which are its members. Thus H(h) = “all human beings” by definition is type h, where h = “human being”. All its subsets will also be of type h. But what about its superset H’(H(h))? Is it of type h? IOW, is it true that H(h) –> H’(h)? It seems to me that this is not a necessary consequence. For while H(h) is of type H, H’ is of type “set”. IOW, I suspect (but cannot prove) that H’ is an axiomatic claim. It amounts to saying that a set may be subset of itself. Suppose we deny that. Then I think Russell’s paradox dissolves. Let S(-s) = “Sets that do not contain themselves.” Then if S’(S(-s)) does not imply S’(-s), the paradox dissolves.
     I don’t know whether this line of thought makes sense. [Note 21 Dec 2008: after some rewriting, it seems to me there’s a contradiction in it. Needs more work, but the contradiction may be fundamental.] Nor do I know whether Russell or someone else has explored the consequences of forbidding that a set may be its own subset. It does not, as far as I can tell, forbid that a subset may of the same cardinality as the set (as is the case with infinite sets).
      Footnote 1: Intersections and unions of sets will be of mixed type. Eg, if we define L(l), l=living, then intersection K of L and H will be K(h, l). Etc.
      Footnote 2: The notation needs to be worked out some more. Let H<1 n="">(h) be a set of n elements of type h. Then some subset of it would be H(h).
      Footnote 3: It’s probably all nonsense.

     Good book. **1/2 (2008)

08 August 2013

Burger & Starbird. Coincidences, Chaos, and All That Math Jazz (2005)

     Burger & Starbird. Coincidences, Chaos, and All That Math Jazz (2005) The authors are profs, so the professorial tone and terrible puns should be no surprise. All in all, a nicely done tour of those parts of modern math that seem to the authors either most relevant to Real Life, or most interesting. They believe that math is fun, stimulates the imagination, and stretches one’s worldview. Correct on all counts. Recommended to mathophobes. **½ (2007)

When Things Go Bad (Saramago, The Live Of Things, 2012)

 Jose Saramago. The Lives of Things (2012) Saramago is a Nobel P:riz winner. I have mixed feelings about the Nobel Prize for Literature. By...