Tag Archives: mathematics

How Many Robots Does it Take to Change a Planet?

In which The Author does some calculations

I expect most of you have come across Mondrian-like artworks like this recently:

wwwarrivatrainswalescouk5

These so-called QR Codes are everywhere at the moment, from newspapers and magazines, through product packaging and point-of-sale, to advertising hoardings. For example, I found this particular example on the Arriva Trains Wales Valleys Lines Summer 2013 timetable. (It’s only valid for another week, so don’t get too excited!)
QR stands for Quick Response, and people with smartphones can use them as a short cut to associated websites. Mother pointed one out to me the last time we were in Brecon, wondering what on Earth it was (see Granotechnology.) It turned out that they’re dotted all over the place, giving visitors a handy personalized at-a-scan tourist guide to the sights and history of a fascinating city.
It’s very difficult to walk down a shopping street in 2013 without finding at least one QR code somewhere within easy zapping distance. Along with many aspects of life in the Twenty-First Century, these abstract digital badges seem to have arisen from nowhere, almost under everyone’s nose. It came as a bit of a shock last week, therefore, when I came across an early reference to QR codes in an old SF novel.
In Missing, Presumed Lost I told you how I’d been inspired to re-read Isaac Asimov’s book The Naked Sun, after a gap of three decades (at least.)
[A digression: I had a message from my old friend and regular blog follower Neil R. this morning. He’d read the list of books which have vanished from my personal library over the course of time, and he’s bought three of them as a Xmas present for me. One of them is The Caves of Steel, the prequel to The Naked Sun. He’s going to call over with them next week. How kind is that? In the meantime, I’ve thought of another half a dozen books which have vanished without trace. Swings and roundabouts…]
Anyway, to cut a medium-length novel short, Dr Asimov’s protagonist is an Earth policeman named Elijah Baley. He is seconded to investigate a murder on the planet Solaria. It’s a very long way from Earth, in terms of both distance and culture. The Earth of The Caves of Steel is hugely overpopulated, with megacities bursting at the seams with the vast burden of humanity. There’s no privacy, no sense of individuality, and no room to breathe. Everything is artificially lit, and it’s been several generations since anyone saw the sky.
On the other hand, Solaria is one of many planets where the colonists have turned their back on their collective history and decided to plough their own furrows. In particular, the Solarians have developed strange taboos and phobias about the human body. The inhabitants live alone on vast estates which make Australian sheep stations look like window boxes. The sun shines down on their huge dwellings, and there’s a pattern of day and night to which Baley is quite unaccustomed.
Any physical contact with other humans is shunned unless it’s totally unavoidable; they prefer to ‘view’ each other via real-time holograms (although the idea predates the technology by a decade or so.) Their idea of child-rearing owes much to Huxley’s Brave New World, and prefigures Ursula K. Le Guin’s The Dispossessed. Artificial insemination and in vitro fertilization are becoming the favoured methods of reproduction – and even sex only happens once the potential parents have been genetically matched. The extended lifespan of the population allows them adequate scope to pursue their interests wherever they may lie.
It should be a utopia. But it isn’t, of course. Arriving on the sparsely-populated and undeveloped planet, Baley finds himself terrified by the open spaces, endless sky, and lack of company. This culture clash provides much of the tension throughout the story.
The key feature of life on Solaria, however, lies a the heart of the novel: a planet slightly larger than Earth is home to only twenty-five thousand people.
Needless to say, Solaria could never be a thriving economy with such a tiny population (it’s smaller than that of my home town, spread across the entire globe.) The Solarians have hit upon a simple and elegant solution to this: everybody who would usually have worked on farms, in factories, in hospitals, in schools, or in the service sector, has been replaced by robots.
[A digression: I promised my pals in the band Replaced By Robots that I’d mention them in my blog again before the month was out. Well, I’ve done it – just! Their last gig of the year is tonight, in Porth. If you’re reading this afterwards, I’m sorry you missed it. You can get a taste of their sound in Robot Invasion of Earth (Phase II) in the meantime.]
It was while I was reading about Baley’s struggle to come to terms with this alien world that I came across a curious passage. The Earthman notices that each robot has a little identification plate fixed to it: a six-by-six square composed of silver and gold squares – something like this:

Asimov

So that we can see what Dr Asimov had in mind, I made this up myself, using the random number tables in H.R. Neave’s Statistical Tables to determine the distribution of yellow and grey squares. (I couldn’t be arsed to try and apply a metallic effect to the picture.)
Anyway, according to the story, Baley does a quick calculation in his head and comes up with a ball-park figure for the maximum possible number of individual robots on Solaria, based on this simple identification system. (He’s a better mathematician than I am, obviously!) It’s nothing short of staggering. In fact, I spent some time using smaller squares to prove to myself that I wasn’t imagining it.
With one square (the simplest case) it’s child’s play. If we use the figure 0 to represent silver and 1 to represent gold, we’re using binary notation. The square is 1 × 1. The number of outcomes is 2(1×1). That’s a total of two. Easy!
Let’s move up to a 2 × 2 grid and see what happens. Try it for yourself – buy some squared paper and draw little boxes, then shade them in. Start with a blank sheet (0000) and work your way through to a totally shaded grid (1111.) Remember that the orientation of the grid is significant. In other words, any asymmetrical pattern rotated through 180º, reflected vertically or horizontally, or reflected along the line y = x, counts as two different results, like these two.

0001-1

0010-1

Think about a football match – Cardiff v Swansea isn’t the same as Swansea v Cardiff. Same players, different situation. Make a cup of tea and have a potch. See you in a bit…
Welcome back. By now, if you’ve worked through the example, you should have sixteen different patterns on your piece of squared paper. We have 2(2×2) possibilities. 24 = 16. If you’re feeling brave, or foolish, or if (like me) you suffer from chronic insomnia, try a 3 × 3 grid.
Actually, don’t! There are 2(3×3) possible permutations available with just two colours. That’s 29, or 512. If you don’t believe me, leave a comment – I can email you a folder containing every last one of them. (See, I told you I wasn’t sleeping!)
I admit that I bottled out of the next step up – 216 is way too big to try and work out by hand. You get the general idea?
That brings us back to the planet Solaria, and the robots’ identification badges. Using only two colours (in other words, a binary code) in a 6 × 6 square, and bearing in mind that the orientation is significant, the total number of permutations is 236 – or 68,719,476,736! That’s about ten robots for every man, woman and child alive on Planet Earth today, with a few left over for spare parts.
Have a look at that QR code again. All the ones I’ve seen have two solid blocks at the top and one at the bottom, which I presume is Machine Speak for ‘this way up.’ Take a closer look. Count the tiny squares, each of which contains a bit (binary digit) of information. How many permutations are there? More than the grains of sand on the beach? More than the number of stars in the Milky Way? Who knows?
In Predictions (Part 2) I talked about the way the phone network keeps growing and growing, just by adding an extra number. When we start running out of QR codes, we can just add another row and another column and start again. If that doesn’t cause you a sleepless night or two, you haven’t thought about it hard enough.
Advertisement

Rules of Engagement

In which The Author has a note from his mother

Do you remember when you first started acquiring language?
I shouldn’t have thought so, in all honesty. After all, we start acquiring our mother tongue in early infancy. Our proficiency develops almost in a geometric fashion. Each new development lays the foundations for further advances. Lev Vygotsky applied this idea to his theory of childhood learning, where he came up with the idea of a scaffolding.
Each new layer is built on the previous one. It’s the role of the teacher to help the pupil to reach new heights, by enabling him/her to move into the Zone of Proximal Development. It’s the gap between the level the pupil will attain unaided, and the level the pupil reaches when pushed and stretched by a good teacher.
While we were discussing this in a Psychology lecture I pointed out something which I’d noticed on the trains for several years. The Welsh word for ‘ladder’ – ysgol – is the same as the word for ‘school’. Coincidence? After all, both of them enable you to ascend to a higher level. Maybe it’s just an accident of language. Maybe there’s more to it than that. Who knows?
 Anyway, children learn how language operates almost instinctively – until, that is, they start school. Then. as Steven Pinker says, they get taught the formal rules of grammar (Pinker, 1999). That’s where the fun starts. A small child, simply by listening to his/her parents, will learn to say ‘The dog ran around the garden.’ The same child goes to school and is taught that, in order to make the past tense of a verb, one adds -ed to the bare infinitive. Then he/she gets a row from the teacher for saying ‘The dog runned around the garden.’ He/she just can’t win. After a while, the mental confusion gets sorted out and most people achieve reasonable fluency.
I don’t think that we acquire numeracy in the same instinctive way. Although we may have an innate understanding of quantity, we have to be taught that 1 + 1 = 2, and that 2 + 1 = 3. It’s been frequently asserted that there are indigenous peoples throughout the world who only have words for one, two, few and many. However, it would seem that where there is language, a knowledge of mathematics follows almost by default (Sizer, 1991). On the face on Sizer’s evidence, a knowledge of arithmetic, geometry and basic algebra does not rely on literacy for its propagation through time. Maybe our facility for language and mathematics are in some way interconnected, and ‘hard-wired’ into the human mind.
Sadly, the same cannot be said for sport. In spite of the best efforts of Communist countries from the 1950s onwards, I very much doubt that anyone has ever been born who innately knew the rules of Association Football. Or the rules of rugby, tennis, golf, snooker, darts, bowls, basketball, rounders, hockey, track and field events, Pub Quizzes, chess, Monopoly, Scrabble, or any other popular competitive game. Let’s take an example.
To the uninitiated TV audience, cricket consists of little more than a group of grown men walking around a field. Two men with sticks occasionally run past each other while the others run in all directions, and a man wearing a dozen hats waves his hands in the air from time to time. Just when things get interesting, they all go and have a cup of tea and a cucumber sandwich. When a cloud looms into view, they call it a day and go for another cup of tea. At the end of five days, they decide that nobody has won, and go for yet more tea. In the meantime, the commentators remark on the passing buses or the occasional pitch invasion by a pigeon, and eat cakes sent in by the audience.
Could anything be more inexplicable? How the hell could you teach that to anyone? And yet (and I’m not defending Imperialism by any means) the British exported this most bizarre of ceremonies worldwide during the days of Empire. And, of course, our colonial cousins repay this debt by beating us almost every time they play us.
To the cricket fan, of course, this arcane ritual is nothing less than sacrosanct. Shanara’s father (born in Bangladesh) is a huge fan of the game. Meanwhile, she hasn’t got the foggiest idea about the whole thing. Or sport in general. That’s another thing we’ve got in common. On the couple of occasions when she joined me in the pub to watch the rugby, I even had to tell her that our team were the ones in the red shirts.
But then again, thirty years ago, I knew next to nothing about rugby. I didn’t watch the Five Nations on TV. In fact, I had no interest in sport at all. This was when we had three channels, of course. Grandstand and World of Sport were just a waste of a Saturday afternoon on television. If we were lucky, BBC2 would show an old science fiction film. Otherwise, there was nothing worth watching. I heard people talking of Grand Slams and Triple Crowns without any idea of their significance. I met Dr John Williams (aka J.P.R. Williams) when I was in my early teens. That was nothing to do with rugby, though. It was in his professional capacity as an orthopaedic surgeon. The guys in school were amazingly impressed. I wasn’t. His was just a name I’d heard on TV.
Thus it was that I spent a decade or more pretty much adrift in the state education system during the late 1970s and early 1980s. I remember a time, playing soccer in the comprehensive school, when I thought I’d actually scored a goal. I hadn’t, of course. To this day I don’t know why.
The teacher bellowed at me, ‘Haven’t you ever heard of the offside rule?’
I wish I’d had the presence of mind to reply, ‘Yes. Have you heard of the Pauli Exclusion Principle? Okay, then – you explain your bit first!’
But, of course, I didn’t say it. Anyway, he was a PE teacher. He’d probably have thought the Pauli Exclusion Principle was an arcane rule of Downhill Skeleton Bob.
PE teachers didn’t seem to have changed since the vivid portrayal of the bull-necked, bullying caveman made famous by Brian Glover in Kes. ‘Bullet’ Bronson in Grange Hill seemed to be a pretty accurate representation of our PE teachers for the most part. I had to endure the ritual humiliation every week of being amongst the last to be picked when the Hearties chose their teams. The usual protest of, ‘Oh, Sir, we had him last week!’ did little to boost my confidence as a team player. I ended up skiving the lessons more often than not.
It became a self-fulfilling prophesy. I usually ended up as goalkeeper, where I used to make a valiant effort. That was all. I’ve often wondered whether the likes of Pat Jennings, Neville Southall and Peter Schmeichel started out by being so crap at football they got shoved into the goal and hoping for the best.
My favoured events were the ones I could do with no special equipment and no technique. I was a runner. 400 m, 800 m and 1500 m were tailor-made for me – long-legged, big-lunged, and able to pace myself across the distance. Eddie Morgan, the new PE teacher, saw where I was coming from and gave me a school report which I still treasure: ‘Makes up for lack of natural ability with great energy and enthusiasm.’ He could see that I simply didn’t know the rules of most of the other games. Let’s be honest, if I’d been as behind in English or Maths as I was in PE, they’d have given me remedial lessons.
I watch rugby now, of course. I still don’t understand the finer points of the game, but I know a decent play from a missed opportunity when I see it. I’ve gathered my knowledge over fifteen years or so of watching Wales’ varying fortunes on TV. Mother’s love of tennis came the same way, by watching Wimbledon on BBC when we were in school and picking up the rules of the game. Our understanding wasn’t innate or instinctive. We took the time to pick them up.
It’s taken me a long time to get to grips with some of the UK’s most fiendish crossword setters. My interest in crosswords, as with quizzes, began with Dad. He would come home from work with the South Wales Echo and I’d sit beside him as he worked his way through. About twenty years or so ago I lapped him and left him way behind. I came to understand what was going on in the little corner of the newspaper, in the same way that Mother came to understand what was going on in a little corner of London SW19.
I still haven’t got the full measure of a couple of the current compilers. In the Guardian, Araucaria, Paul, Brummie and Boatman occasionally do things that would make people who are used to The Times or Daily Telegraph puzzles throw up their hands in despair. At least Azed in The Observer plays by the ‘rules’ laid down by his predecessor Ximenes. Even speaking as an anarchist, without some semblance of acceptable behaviour, the whole system breaks down. We’d be back to the days of Ximenes’ predecessor Torquemada, where some weeks there were no correct entries.
If you’re not interested in watching sport as a child, you don’t get the opportunity to learn the rules by assimilation. So you have to be taught the rules instead. And if you’re not taught the rules, how are you expected to abide by them? You can’t just throw twenty-two schoolboys and a football onto a playing field and expect them all to automatically know the offside rule. It’s like throwing a bunch of nursery school kids into an A level Maths lesson and expect them to do differential calculus. You have to know the foundations first.
I can’t remember anyone in school taking the time to explain the difference between a penalty and a free kick. I didn’t know why sometimes there was a scrum and sometimes a line-out. I still don’t fully understand the Duckworth-Lewis Method. I expect I’m not the only one. Yet in Wales, and especially in schools, there seems to an assumption that every boy must spend his Saturday afternoons (and a great many Sunday afternoons and weekday nights) glued to the television, watching football.
Let me assure you that I didn’t, and I know a lot of youngsters who don’t. Would it really hurt the PE teachers to sit down with the class before they even get their kit on, and explain exactly what they’re going to be doing for a few hours every week, term in and term out, for at least the next ten years? With an understanding of the object of the game, even the hopeless cases might find something which appeals to them, without being mocked by their peers and teachers alike. If this idea takes off, it could revolutionise PE teaching in schools. Maybe – just maybe – this spell of sporting success which seems to affecting Wales at the moment might not be a flash in the pan.

REFERENCES

PINKER, S. (1999) Words and Rules: the ingredients of language. London: Weidenfeld & Nicholson.
SIZER, W.S. (1991) Mathematical notions in preliterate societies in The Mathematical Intelligencer, 13(4), pp. 53-60.