Some principles of network epidemiology

Lockdowns and “flattening the curve” are very much in the news right now, so I thought it was timely to post about some principles of network epidemiology. The charts below (click to zoom) show the simulated spread of a disease (in a small “toy” population of 2000) subject to certain assumptions. The blue lines show the total number of cases over time (adding up those infected, recovered, and dead). This total number is important because some percentage of the final total will die, and we want to minimise that (if we can). The red lines show the number of current infections over time. This is important because some percentage of the red numbers are in hospital, and the red peak therefore represents peak load on the medical system.

In the top row, we have connections happening at random, with increasing social distancing happening from left to right. Moderate social distancing doesn’t change the fact that almost everybody gets the disease, but it does delay and reduce the peak, thus taking strain off the medical system. Extreme social distancing saves many lives, but only if social distancing is continued for a long time (in real terms, until a vaccine is available, which is almost certainly not sustainable).

In the middle row, we have the same number of contacts happening as in the top row, but most of the contacts are within limited social circles. Such contacts, between family members and close friends, are less serious than contacts with strangers. If Peter is your close friend, and you catch the virus, then there’s a reasonable chance that Peter caught it the same way, and so there’s a reasonable chance that your contact with Peter makes no actual difference. If Peter is a spouse, child, or flatmate, that’s quite a good chance. Contacts with strangers, however, can spread the disease from one social circle to another, and so are far more serious.

In the bottom row, we again have the same total number of contacts happening, but a few “super spreaders” have many more contacts than average (while the majority have slightly less than average, to compensate). This third scenario is significantly worse than the top row – higher, earlier, red peaks, and many deaths even when there is extreme social distancing. Unfortunately, experience has shown that medical personnel, in spite of the fantastic work that they do, have the potential to be serious “super spreaders,” because:

  • they have contact with many patients;
  • the patients are strangers; and
  • the patients are more likely than average to be elderly and/or vulnerable.

This is why personal protective equipment (PPE) for medical personnel is so critically important, as are good testing protocols for medical personnel. Other kinds of “super spreaders” also occur, of course, and it is important to identify them, test them, and provide them PPE (or stop them doing what they’re doing, if it’s non-essential – some jurisdictions with supposedly strict rules are still allowing prostitutes to operate, for example).

Overall, if we look at columns in the picture (all three charts in each column have the same total number of contacts), we see that the kind of contact is just as important as the number of contacts. Isolation regulations in some jurisdictions don’t always recognise that fact, unfortunately.

The Lost World by Michael Crichton: a book review

The Lost World, by Michael Crichton (1995)

Recently, because this is the season for extra reading, I re-read The Lost World by Michael Crichton (which was made into a 1997 film). This novel turns 25 years old in September. Its main plot needs no explanation, of course. Just like Jurassic Park, there’s action, there’s excitement, and there’s dinosaurs chasing people.

As with all Crichton novels, there are technical and scientific themes that do not make it into the film. I had forgotten, for example, that the original mobile laboratory is solar powered: “He wants them light, I build them light. He wants them strong, I build them strong – light and strong both, why not, it’s just impossible, what he’s asking for, but with enough titanium and honeycarbon composite, we’re doing it anyway. He wants it off petroleum base, and off the grid, and we do that too. … The Explorer with the black photovoltaic panels on the roof and hood, the inside crammed with glowing electronic equipment. Just looking at the Explorer gave them a sense of adventure…” (pages 64 & 94)

Velociraptor skeletal cast at the Dinosaur Journey museum in Colorado (original photo by Jens Lallensack)

Another theme, naturally, is the changing scientific view of dinosaurs, and indeed other things, over time (in fact, the book and film are already out-of-date in some respects): “Back in the 1840s, when Richard Owen first described giant bones in England, he named them Dinosauria: terrible lizards. That was still the most accurate description of these creatures, Malcolm thought. … the Victorians made them fat, lethargic, and dumb – big dopes from the past. This perception was elaborated, so that by the early twentieth century, dinosaurs had become so weak that they could not support their own weight. … That view didn’t change until the 1960s, when a few renegade scientists, led by John Ostrom, began to imagine quick, agile, hotblooded dinosaurs. Because these scientists had the temerity to question dogma, they were brutally criticized for years, … But in the last decade, a growing interest in social behavior had led to still another view. Dinosaurs were now seen as caring creatures, living in groups, raising their little babies.” (page 83)

Tortuga Islands, Costa Rica (original photo by “rigocr”) – is this the mysterious Isla Sorna?

As with many Crichton novels, scientific hubris is a major theme. Other themes include the education of children (both dinosaur children and human children), information systems design, the theories of Stuart Kauffman about self-organisation and evolution, and the importance of what is now called the complex systems view.

Overall, this is a good solid action novel, with several scientific and philosophical themes to think about. Goodreads rates it 3.78. I’m giving it only 3½ stars, in part because it’s a little too much like Jurassic Park. But it’s certainly well worth a read.

The Lost World, by Michael Crichton: 3½ stars

Topic Analysis on the New Testament

I have been experimenting recently with Latent Dirichlet allocation for automatic determination of topics in documents. This is a popular technique, although it works better for some kinds of document than for others. Above (click to zoom) is a topic matrix for the Greek New Testament (using the stemmed 1904 Nestle text, removing 47 common words before analysis, and specifying 14 as the number of topics in advance). The size of the coloured dots in the matrix shows the degree to which a given topic can be found in a given book. The topics (and the most important words associated with them) are:

A better set of topics can probably be obtained with a bit more experimentation. Alternatively, here (as a simpler form of analysis) are the relative frequencies of some Greek words or sets of words, scaled to the range 0 to 1 for each word set (with the bar chart showing the total number of words in each New Testament book). Not surprisingly, angels appear more frequently in Revelation than anywhere else, while love is particularly frequent in 1 John:


The triboelectric effect was discovered 2600 years ago by Thales of Miletus. When items in this illustrated (incomplete) list are rubbed together, the low-numbered item gains a positive charge, and the high-numbered item gains a negative charge.

For example, glass rubbed with silk (or, even better, polyester) gains a positive charge, once called “vitreous electricity.” Amber rubbed with wool gains a negative charge, once called “resinous electricity.” Indeed, our word “electron” comes from the Greek ἤλεκτρον, meaning “amber.”

Chemistry can be beautiful: the classic flame test

The flame test occasionally comes up in classic detective fiction: “He snapped off the lights, and we were left with only the sodium flame. In that green, sick glare a face floated close to mine – a corpse-face – livid, waxen, stamped with decay…” (Dorothy L. Sayers & Robert Eustace, The Documents in the Case)

Spectral lines in the image are taken from Kramida, A., Ralchenko, Yu., Reader, J., and NIST ASD Team (2019). NIST Atomic Spectra Database (ver. 5.7.1), [Online]. National Institute of Standards and Technology, Gaithersburg, MD. Photographs in the image are public domain, from Wikimedia Commons.

Dune by Frank Herbert: a book review

Dune by Frank Herbert (1965)

I recently re-read the classic 1965 novel Dune by Frank Herbert. This is Frank Herbert’s best book, and one of the best science fiction novels ever written. It won the Hugo Award in 1966 (jointly with Roger Zelazny’s This Immortal) and won the inaugural Nebula Award. It became a quite terrible 1984 film and a somewhat better miniseries.

Parts of the novel are reminiscent of the work of Cordwainer Smith, notably the idea of a desert planet producing spice, and the idea that navigating a faster-than-light ship requires a guild of unusual navigators who can see into the future. However, most of the novel was so original that it became a huge hit when it first appeared. Themes that are particularly notable are those of planetary ecology, intergalactic politics, and unusual human skills.

I have always been moved by Herbert’s idea of a symbolic ecological language that can “arm the mind to manipulate an entire landscape” (Appendix 1), and the idea of making ecological literacy a key part of education:

At a chalkboard against the far wall stood a woman in a yellow wraparound, a projecto-stylus in one hand. The board was filled with designs – circles, wedges and curves, snake tracks and squares, flowing arcs split by parallel lines. The woman pointed to the designs one after the other as fast as she could move the stylus, and the children chanted in rhythm with her moving hand.
Paul listened, hearing the voices grow dimmer behind as he moved deeper into the sietch with Harah.
‘Tree,’ the children chanted. ‘Tree, grass, dune, wind, mountain, hill, fire, lightning, rock, rocks, dust, sand, heat, shelter, heat, full, winter, cold, empty, erosion, summer, cavern, day, tension, moon, night, caprock, sandtide, slope, planting, binder. …’
” (Chapter 22)

The unusual ecology of the desert planet Arrakis encourages us, of course, to think more deeply about our own planet (and Arrakis was apparently inspired by the Oregon Dunes here on Earth).

Also fascinating is the idea that the human race has turned away from computers and the Internet, and gone back to training human minds to remember, calculate, and think:

‘Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.’
‘Thou shalt not make a machine in the likeness of a man’s mind,’ Paul quoted. […]
‘The Great Revolt took away a crutch,’ she said. ‘It forced human minds to develop. Schools were started to train human talents.’
” (Chapter 1)

The most obvious theme, and the source of the novel’s action, is the galaxy-wide intrigue between the noble House Corrino, House Atreides, and House Harkonnen; the resulting warfare between them; and the resistance of the desert Fremen to occupation (inspired by Lawrence of Arabia):

Paul took two deep breaths. ‘She said a thing.’ He closed his eyes, calling up the words, and when he spoke his voice unconsciously took on some of the old woman’s tone: ‘ “You, Paul Atreides, descendant of kings, son of a Duke, you must learn to rule. It’s something none of your ancestors learned”.’ Paul opened his eyes, said: ‘That made me angry and I said my father rules an entire planet. And she said, “He’s losing it.” And I said my father was getting a richer planet. And she said. “He’ll lose that one, too.” And I wanted to run and warn my father, but she said he’d already been warned – by you, by Mother, by many people.’” (Chapter 2)

Goodreads rates this classic science fiction novel 4.2. I’m giving it 4½ stars (but be aware that the sequels are not nearly as good).

Dune by Frank Herbert: 4½ stars

American Solar Challenge Late March Update

It is not much more than three months until the American Solar Challenge. Scrutineering begins on July 10th, assuming that the coronavirus pandemic doesn’t interfere.

Kansas (785) have finished their battery pack, Illini (22) have cancelled their car-reveal event [no image], as have Esteban (55), Michigan (2) have withdrawn from the event entirely (citing coronavirus reasons), and UBC (26) have made fantastic progress on their Daybreak.

See also my updated illustrated list of teams. At present we have 33 teams registered, but some teams are obviously in trouble, and some cars are not going to get built before July. On the other hand, other teams are making good progress. Nevertheless, the shadow of the coronavirus pandemic lies over the whole event.

Coronavirus diary #1

The SARS-CoV-2 coronavirus is changing the world. Ridiculous and selfish panic-buying is stripping supermarket shelves, in Australia as elsewhere. Everyone I know is catching up on their reading, and people are being persuaded to practice social distancing and to wash their hands.

It seems to me that if you’re under 50 and healthy, there is absolutely no need to panic. But it’s really important not to pass on the disease, if and when you catch it, to other people. Listen to your local medical advice, people!

Virus photo from NIAID Rocky Mountain Laboratories; supermarket photo by Christopher Corneschi, 9 March 2020; painting by Marguerite Gérard; hand-washing photo by Michelle Gigante/USAF.

Skylark DuQuesne by E. E. Smith: a book review

Skylark DuQuesne by E. E. “Doc” Smith (serialised 1965)

I recently re-read E. E. “Doc” Smith’s Skylark DuQuesne, the final story of Smith’s Skylark series. Smith, of course, is famous for the Lensman series, which is a bit annoying in places, but which is still full of all kinds of interesting ideas. This book is another matter. It’s just bad. Now poor writing may forgivable in “space opera,” and age may play a factor here too – the novel was serialised beginning in June 1965, when Smith was aged 75, and was published as a book in 1966 (Smith died during the serialisation). This novel has so many flaws, in fact, that I can only mention some of them.

To begin with, the sexual titillation for teenage boys is just over the top. Is there any reason why the characters need to be naked quite so often? Or for one of them to be a stripper? It’s a trifle creepy, to be frank.

The mathematics depicted in the book is also disappointing: “‘Hold it!’ Seaton snapped, half an hour later. ‘Back up – there! This integral here. Limits zero to pi over two. You’re limiting the thing to a large but definitely limited volume of your generalized N-dimensional space. I think it should be between zero and infinity—and while we’re at it let’s scrap half of the third determinant in that no-space-no-time complex. Let’s see what happens if we substitute the gamma function here and the chi there and the xi there and the omicron down there in the corner.’” (Chapter 24: DuQuesne and Sleemet)

Smith is describing simple high-school calculus (integrating a function on a single real variable). Even by the standards of the time (never mind the future!) there was a lot more mathematics out there. Robert Heinlein had no trouble getting that fact across in 1952 in The Rolling Stones / Space Family Stone: “Their father reached up to the spindles on the wall, took down a book spool, and inserted it into his study projector. He spun the selector, stopped with a page displayed on the wall screen. It was a condensed chart of the fields of mathematics invented thus far by the human mind. ‘Let’s see you find your way around that page.’ The twins blinked at it. In the upper left-hand corner of the chart they spotted the names of subjects they had studied; the rest of the array was unknown territory; in most cases they did not even recognize the names of the subjects.” (Chapter IV: Aspects of Domestic Engineering).

And hinting at new, future, mathematics is quite possible too. Isaac Asimov did it in 1942 in the first part of Foundation: “‘Good. Add to this the known probability of Imperial assassination, viceregal revolt, the contemporary recurrence of periods of economic depression, the declining rate of planetary explorations, the…’ He proceeded. As each item was mentioned, new symbols sprang to life at his touch, and melted into the basic function which expanded and changed. Gaal stopped him only once. ‘I don’t see the validity of that set-transformation.’ Seldon repeated it more slowly. Gaal said, ‘”But that is done by way of a forbidden sociooperation.’ ‘Good. You are quick, but not yet quick enough. It is not forbidden in this connection. Let me do it by expansions.’ The procedure was much longer and at its end, Gaal said, humbly, ‘Yes, I see now.’” (Chapter 4)

In contrast, Smith’s novel seems to have the goal of making his teenage readers feel good about what they know, rather than encouraging them to grow (and that applies to both intellectual and moral growth).

A PDP-8 computer of 1965

A related problem (common to Smith’s novels, and indeed to much early science fiction) is the failure to imagine how computers might be used. The novel assumes powerful computers (“brains”) which can both sense and influence the physical world. Yet manual information processing is still the order of the day: “Tammon was poring over a computed graph, measuring its various characteristics with vernier calipers, a filar microscope, and an integrating planimeter, when Mergon and Luloy came swinging hand in hand into his laboratory” (Chapter 9: Among the Jelmi)

Finally, the antagonist Marc DuQuesne (the name is a Genesis 4:15 reference, since the surname is pronounced duːˈkeɪn) is a rather unpleasant kind of Nietzschean Übermensch, and the protagonist (Richard Seaton) is not much better. Julian May, in her excellent Saga of Pliocene Exile (and even better Galactic Milieu Series) apparently based her character Marc Remillard in part on Smith’s Marc DuQuesne. But Marc Remillard repents of his crimes, and atones for them, and is actually interesting to read about. Smith’s novel finishes with DuQuesne as arrogant, as unrepentant, and as banal as ever.

Goodreads rates Smith’s novel 3.8, and some old-school science fiction fans still seem to enjoy it. It was even nominated for the Hugo Award for Best Novel, back in 1966, although it can hardly be compared to the other nominees – Dune and This Immortal (tied winners), The Squares of the City, and The Moon Is a Harsh Mistress (which was re-nominated, and won, in 1967). I give Smith’s novel just one star – but if you are nevertheless intrigued, it is now public domain in Canada and is online there.

Skylark DuQuesne by E. E. “Doc” Smith: 1 star

A planetary fruit salad

Here is a planetary fruit salad – a scale model of objects in the solar system (click to zoom). The Moon and the smaller planets are on the top left saucer. The lower right saucer represents the rings of Saturn.

On this scale (roughly 1 to 2 billion), the Moon is 19 centimetres from the Earth, the Earth is 73 metres from the Sun, Jupiter is 380 metres from the Sun, and Pluto is around 3 kilometres from the Sun.

Object Diameter Scaled Diameter Model
Sun 1,392,700 km 68 cm Beach ball (not shown)
Mercury 4,879 km 0.24 cm Mustard seed (yellow)
Venus 12,104 km 0.59 cm Chickpea
Earth 12,756 km 0.62 cm Chickpea (coloured blue)
Moon 3,475 km 0.17 cm Mustard seed (black)
Mars 6,792 km 0.33 cm Peppercorn (black)
Jupiter 142,984 km 7 cm Orange
Saturn 120,536 km 5.9 cm Lemon
Saturn’s Rings (up to F) 280,360 km 14 cm Saucer
Uranus 51,118 km 2.5 cm Grape
Neptune 49,528 km 2.4 cm Grape
Pluto 2,377 km 0.12 cm Poppy seed