Thursday 25 June 2020

Counting pebbles

Figure 1

Contents

Introduction
Bricks
Fabrics
Counting pebbles
Counting the pebbles you can see
There is no right answer
A novel counting strategy
Some experiments
Consciousness
Conclusions
References

Introduction

I have posted on a number of occasions about counting things, most recently at reference 1. These posts were about one-dimensional counting, where the things to be counted were in a stack – like courses of bricks or the storeys of tower blocks – or in a row – like beads on a string. 

Here I think some more about the much more difficult problem of counting two dimensionally – things like the pebbles on the beach – something that some people, possibly challenged in other ways, are said to be able to manage. 

Figure 2
 
I have already set out some preliminaries at reference 6, where I introduced count sets (which pebbles are to be counted), count paths (what route shall we take across the two-dimensional beach for the purpose of one-dimensional counting) and count lists (the choices we make about vocalising the count). People do not behave in the orderly way suggested in the figure above – but it does serve to get us away from the idea of there being a right answer. The count is what you come to on the day; the count is what you choose to count on the day.

We start with a glance at two other two-dimensional counting opportunities, bricks and coarsely woven fabrics. With bricks easy compared with pebbles and fabrics intermediate.

Bricks
 
Figure 3

Two dimensional counting of the bricks in a wall is not too difficult, leaving boundary problems aside for the moment. Provided the bricks have been laid reasonably neatly, it is possible to scan the rows of bricks, known in the trade as courses, counting as one goes. Traversing one row from right to left, then dropping a row and traversing back from left to right. So long as one can hold one’s attention on the current brick and remember in which one direction one is going, the thing can be done. Getting into a rhythm seems to help, perhaps nodding the head slightly in time with the count, and one needs to proceed at a steady, even pace, otherwise one is apt to forget in which direction one is going. One might allow a short pause at the end of each row, to give the eyes and brain something of a rest – but not so much of a pause that one loses track of the next row.

In terms of the count sets and count paths of reference 6, there is little to do: we count the bricks by rows. We might do better with some count list designed for the job, but will we stick with regular count list, the numbers we learned as children and have used ever since. But if we ever get up to speed, maybe the auction people at references 7 and 8 would be worth another look.
 
Figure 4

Counting is still possible when the bricklaying gets a bit ragged, as the rows survive, but damage to the bricks can easily result in mistakes. Count set problems have not vanished.

Figure 5
 
But it gets much harder when the rows get longer, such as that snapped above. Much concentration is needed to keep one’s attention on the current row, concentration which is hard to maintain for any length of time.

Fabrics
 
Figure 6

Counting the squares on this fabric is much the same as counting bricks, although the lack of variation make it harder to keep one’s place – although counting chequerboard fashion or missing out every other row and column seem to help with that.

Figure 7
 
This one is quite a lot harder, with the rows and columns being badly degraded. One might do better counting some subset, perhaps the vertical red stitches, although one then has the boundary problem of red stitches morphing into red blobs, and reds morphing into purples and blues.

Figure 8a
 
I found this one harder still. Rows and columns degraded and not much else to go on.

Figure 8b

And it does not get any better when magnified.
 
Figure 9

Here we are back with something more like the bricks, but with the individual elements too small to keep track of with any comfort.

Note that in the first and last of these five examples, there is, in some sense at least, a right answer. 

There is very little fudging of the count set variety. But this is not the case in the second example. The third and fourth examples – the latter being a magnified version of a portion of the former – are intermediate in this respect.

Clearly, different materials present different problems, possibly requiring different techniques and strategies to count their features. The weave at Figure 7 above, for example, comes close to pebbles on the beach, while that at Figure 6 above comes close to bricks in a wall. But our present interest is pebbles on the beach.

Counting pebbles

I turn back now to those pebbles, the sort of smooth, rounded stones, mostly flints, that one gets on beaches, where there are no rows, ragged or otherwise, although counting is made a lot easier than it might otherwise be by the pebbles sorting themselves out, with sensible sized, washed pebbles sitting on top of the sand below (or whatever else might be below), rather than being mixed up with it. At least most of the time.

We do a sum to give us an order of magnitude. Suppose 100 metres of beach, on average 10 metres deep, promenade to sea, and 1 metre thick. 1,000 cubic metres. Suppose 50^3 pebbles to the cubic metre. Which gives us 125 times 10^6 or 125 million pebbles – which is a large number, but not unmanageably so. Maybe roughly twice the number of people who live in England. And very small indeed when compared with things like the number of molecules or atoms in a cubic metre of air – which Bing suggests might be of the order of 3 times 10^25.

Figure 10

One approach would be to take a digger to the beach. Dig it all up. Put the pebbles through some screens and sieves to get rid of all the unwanted material – small stones, sand, litter and debris of one sort or another. Perhaps wash them. So we now have all the pebbles in the qualifying size band – say around one centimetre to ten centimetres in diameter – and we can put them through a counting machine. Which we suppose can deliver a reliable count; that you get the same answer if you put them through again and two such machines always give us the same answer.

So we can count what we dig up, but what exactly is it that we are digging up? How do we know when to stop the diggers? And the answer is, on a real beach, that we don’t know. There are always going to be grey areas at the margins, perhaps at the edge of the sea, perhaps where the beach washes over onto the promenade, or over onto the shelves of flat bedded rock which bound part of the beach. Possibly grey areas which only disturb the count in proportion to the area of the beach, rather than disturb the count in proportion to its volume. But disturbance nonetheless. 

And then are we really counting what we dig up? How replicable is the business of moving the pebbles to the screening machinery? In hundreds of digger loads or lorry loads, how many odds and ends are there going to be? I associate to the nice, simple fact that there is supposed to be exactly one national insurance number for everybody, for the twenty million or so people of working age – and to all the odds and ends that exist at the margins of that system. And then there is the screening process itself. What about, for example, all the pebbles near the permitted margins of one centimetre and ten centimetre? Given the numbers involved it seems unlikely that this process is replicable, that one is going to get exactly the same count every time.

Furthermore, our count is destructive. Although we could put the pebbles back on the beach, the boundaries will have been disturbed, the grey areas will have been disturbed, some pebbles will have been lost or damaged – and any recount is likely to come up with a different answer. The count is not replicable.

In any event, in what follows we concentrate on what can be done in the way of non-invasive counting. The sort of counting you can do by looking without touching, or even standing. We suppose our beach to be static in the sense that the pebbles are not moving about and that two such non-invasive counts should, in principle, give the same answer. A count which is replicable – at least, that is what we hope.

All a bit unrealistic but it is a place to start our count.

Counting the pebbles you can see

The first question is which pebbles are to be counted, in the jargon of reference 6, what or where is the count set, with the first answer being that one counts the pebbles that one can see. And the second answer being that there must be a boundary. Perhaps the concrete promenade at the top, the sand at the bottom and two wooden groins at the sides. Bearing in mind that groins may not run all the way from sea to dry land and they are often partially covered, as can be seen by asking Bing or Google for ‘beach groins’.

Figure 11

Another answer might be that one counts a roughly circular, growing patch of pebbles, centred roughly at one’s feet. There may be no end point, but there is a start and there is growth. So in the middle panel of the figure above the count has proceeded, is proceeding, in an anti-clockwise spiral. The count path is spiralling outwards. And even if one does not know when to stop, one does know how many pebbles one has counted so far. And one has done away with the problem of short, covered or missing groins. As they used to tell us at school, it is playing the game that is important, not who wins, who comes top. Who counts all the pebbles. What counts is the process, not the result.

However, just for the moment, we suppose that the task is to count something like all the pebbles in the left hand panel of the above. Perhaps the area has been staked out with pegs and string, as suggested in the right hand panel. String which brings boundary problems of their own, but which are hopefully small relative to the number of pebbles so enclosed. 

Note that by counting we mean counting, not estimating. Not, for example, taking the product of an estimate of the number per cubic metre and multiplying it by an estimate of the volume, which is what we did above, albeit rather crudely. Or an estimate of the number per square meter and multiplying it by an estimate of the area. The latter being more or less equivalent to counting what can be seen, which is what we are after.

Counting with a computer is, at one level at least, straightforward. With the big advantage of the computer being that it can mark up its image of the beach as it goes, something the average brain certainly can’t do in a conscious way. It might do the job in two passes of the image. In the first pass it overlays the image with something like the count set of reference 6, perhaps expressed as a large array of pixels, with each pixel taking one of two values: 1=region and 0=null, with all the regions being separated, one from another, by null pixels. 

Figure 12

Regions do not touch and they certainly do not overlap. The count proceeds by finding a region pixel, incrementing the count and then setting all the pixels for this region to null, easy enough to code as the regions will have the property that one can get from one pixel to any other without leaving the region. The counts stops when all the pixels are null. A process which will work well enough when the pixels are small relative to the pebbles, to the regions. The figure above is a sketch of an array of pixels, towards the end of this destructive counting process. Note that it is only the representation of the count set which is being destroyed, not the underlying image, which can be reused.

Note also that the red blobs do not need to be very accurate. It is probably good enough if they are maximal within the region they represent. With good enough meaning that there is enough there to relate regions back to the raw image of the pebbles, to be sure that one has got a reasonable count set.
Turning back from the computer to people, I recall reading about a chap who, if on the beach and bored, would count the pebbles there to give himself something to do. Sadly, I cannot now find him: there are plenty of curious ‘savant’ skills out there, but I have not yet found this particular one, although I have found a chap who, with what was not much more than a glance, could count the matches which had been emptied out onto the floor. See for example, references 2 and 5.

But the average human brain cannot manage these tricks. Perhaps there is a problem with the amount of working memory needed – sometimes said to be less than ten chunks of information – even leaving aside the various tricky boundary problems, knowing whether or not a given bit of image is to count as a new pebble or not.

There is no right answer

Figure 13
 
As with Figures 1 and 13 above, the problem here is knowing which pebbles, which parts of the beach are to be counted. Anything in the snap which can honestly be made out with the naked eye? Including all the pebbles which are underwater? And even supposing one made such a count, how replicable would it be? Would one person get the same result a second time? What about a second person? To which question, the emerging answer seems to be that counting pebbles is not going to be replicable. And given that probabilities are creeping into the answers given at reference 6, even doing it by computer may not give a replicable count.

Figure 14

In the left hand panel of the snap above we have clear boundaries, in the form of a box. And the pebbles have been selected, washed and cleaned. No marginal bits and pieces of dead crab, other debris, sand, slate or anything else.

But there is still room for doubt. What about what is lurking down below, in the zone highlighted in purple, bottom right? What about the two, possibly more, pebbles lurking down there? With the answer depending on where the eyes are, on the state of the pebbles – are they wet and/or shiny? – and on the lighting conditions. We are probably going to get a slightly different answer every time we do the count, every we time we make, we build the count set.

And even if we had a complete description in our computer of the sizes, shapes and positions of all the pebbles involved, deciding exactly which ones were to count as potentially visible would be reasonably complicated and would involve setting several, more or less arbitrary visibility-flavoured thresholds. There is no canonical answer to the question ‘how many pebbles can you see’. All we can be sure about it is that the number you see cannot be more than the number that there are, which can be determined in this case by tipping them out of their box and spreading them out.

At reference 6, we avoided these problems, to some extent, with the notion of a count set of regions. This what was available to be counted on the day, on this particular occasion. Accepting that on a different day, even with the same beach, with the identical configuration of pebbles (in practise rather unlikely), one might have a different count set. And even if one had the same count set, the rules for count path, the vagaries of count paths, do not deliver the same count on each occasion.

A novel counting strategy

Figure 15
 
In the linear, one dimensional case maintaining the cursor, maintaining one’s position, is manageable, certainly with practise. Two dimensional bricks are harder, but possible, as illustrated above. Two dimensional pebbles, of irregular size, shape and position, are much harder – but maybe there is something that can be done, short of memorising the whole picture and ticking off the pebbles, in the way of a computer, as sketched above.

Trying to count the pebbles by rows works after a fashion, in the way that we previously counted rows of bricks, provided the rows are reasonably short. But even then, one is soon defeated by the pebbles not being in tidy rows, by not being sure whether one has already counted a pebble or not.

Maybe a savant, one of these people with special skills, either could – or could train himself to – unconsciously maintain a record of his moves, the zig-zag red line in the right hand panel of the figure above, moving slowly up the beach, with the front end of the record growing piecemeal as pebbles are counted and marked off and with the back end of the record fading away. The savant holds his (these savants are more commonly men) attention on this front end and knows which pebbles he has counted recently and where he needs to count next. With the count being maintained as long as the record is rolling slowly but steadily forward. A device which means he only needs to hold the recent past in memory, not the all the past. A device which does not look too bad to a normal in the example shown above, where the width of the patch of pebbles to be counted is small – but which will rapidly get hard as the width gets large.

Maybe a savant could do it, could slowly pan up a bounded beach, unconsciously maintaining this sort of rolling image in memory, counting the pebbles and ticking them off as he went.

I note that some savants can train themselves to do very improbable mental feats and that some footballers (for example) can train themselves to do very improbable things with footballs. Zen archers who can shoot at a distant target with their eyes shut. Australian aborigines who can do improbably well at throwing stones, feats like throwing a pebble into a waste paper bin thirty metres away – a loose translation of the paper at reference 4. Plus I have seen YouTube clips of footballers doing much the same sort of thing. The brain does respond – in some mysterious way – to sustained effort at such things. Provided there is feedback, as there is in these cases, mostly from the eyes. 

Quite different would be an approach which might be helpful if one was doing the job with statistical clerks. Cut the image into rectangular blocks of modest size. Phase 1: delete the smaller parts when a pebble appears in two or more blocks. Phase 2: dish out the blocks to be counted, one block to the clerk. Phase 3: pass the blocks around and count again, just to be on the safe side. Phase 4: add up the blocks. All of which seems a bit complicated for a general purpose brain to tackle.

Some experiments

In the light of the foregoing, I tried some experiments.

Experiment 1

Figure 16
 
In this experiment, I tried counting the pebbles – known to the trade as inch and a half shingle – outside our back door, where the beach, as it were, is neatly bounded by concrete and the problem of what pebbles to count in large part vanishes. The idea being to start at the bottom of left hand panel of the snap above and to work up. With the result that the counting was easy enough; it was easy enough to lock onto a pebble, to increment the count and then to move on, to left or right. What I found more or less impossible was knowing which pebbles I had already counted when I came back again the other way.

A variation was just to count, but without attempting to count all the stones, in the spirit of the count paths of reference 6. The task was to maintain the count, fixing and counting one pebble after another, with the only rule being that one did not count any one pebble more than once, with the process being illustrated in the snap above. The aim was to count a band of pebbles, and while the band might be a bit ragged at the edges, the idea was that in the middle of the band one counted everything, the count was exhaustive. This is sketched in the right hand panel of the snap above.

The problem here was that even the business of fixing on the next pebble, even when one was not too fussy about exactly which pebble, used up brain resources and it was quite easy for the count to go astray, to miss a number out or to use a number twice.

Experiment 2

Figure 17
 
Here the idea was, rather than counting real stones, to see how one got on with the computer where one was able to mark the image up as one went along. So the raw image was loaded into the Microsoft Snip & Sketch tool. I then used the highlighter tool therein to mark off stones as I counted them. It was not as easy as I had first thought and one needed to get the right colour and width of highlighter and to develop a convention for marking the stones. One needs to try various colours, it not being obvious which colour is going to work best given the strength and variety of colours in the raw image. I think the idea should be to mark right across the width of the stone at it widest point, in one stroke. Then, inter alia, the count should be the number of strokes, in the top right hand panel of the snap above, around sixty.

But in order to cope with the more difficult cases it needed to be done carefully and neatly, which required concentration – which meant in turn that one was apt to lose the count. Not enough brain cycles available to do both.

Bottom left, the idea was to draw around each stone, counting as I went. Which worked quite well, but which was quite tiring, both for hand and brain. Working in the rather organic way shown seemed easier than trying to do it in regular lines.

A weakness was a tendency to obscure the smaller pebbles in the gaps between the large pebbles, which resulted in some of them getting left out. In some cases there was doubt about whether one was seeing a new pebble at all. Was it just the shadow of one which had already been counted? Furthermore, after the event, one could not check the count as one could no longer always distinguish small stones from spaces which were intentionally left blank.

A slight refinement was to draw around the pebble when it was large and to fill it in when it was small. Which worked even better – except that it was more or less impossible to check after the event. The colouring in was a prop during the proceedings, not a record which would be worked on after the event.

Consciousness

Some sorts of simple counting, like counting the steps up a long staircase, like counting the down strokes on the pedals on a bicycle, can be done more or less unconsciously. If one is a habitual counter, one does not even need to turn the count on as a conscious decision, or (on another view of agency) as a conscious registration of a decision already taken by the unconscious.

Counting the storeys of a tower block does not come so easily and requires both the conscious decision to count and conscious attention to maintain the count. I have, for example, never found myself in front of a tall building, half way through the count, not having much idea how I got there. Something which can happen, for example, when one is driving, perhaps while composing the dinner menu for the day following. One suddenly realises one has got somewhere without any memory of the business of getting there. Nor, incidentally, can I remember ever having dreamed that I was counting either steps or storeys.
Note that driving monopolises the vision system, of which we have just one. And counting monopolises the speaking system, of which we have just one again, even if the speaking in question is silent. While computers are not constrained in either way.

We seem to have here another example of the tricky link between attention and consciousness: they do seem to be linked – but one can attend to something (for example, driving the car) while not being conscious of it – while we do seem to need to attend to something in order to be conscious. One has to be conscious of something, even if one is trying to reach, to touch the void – something which I believe Buddhists aspire to. Or, slightly off-message here, some high altitude mountaineers. While for some activities, like taking a tricky shot at golf, one really does try to empty one’s mind, while maintaining one’s visual attention on the ball below. To try to stop consciousness getting in the way of unconscious performance. Rather oxymoronically, to consciously try not to be conscious.

Counting the bricks on a wall or the pebbles on a beach is much harder again than counting the floors of a tower block and I doubt whether either count could proceed without a conscious start or while doing anything else. And either count would be fatally disturbed by almost any kind of interruption, almost any kind of stimulus.

Which is not to say that the heavy lifting involved in counting pebbles is conscious. What is conscious is maintaining visual attention on the bit of beach being counted. But there is no need to be aware of how that visual stimulation is converted into a count – although it may well be that this conversion can be learned, trained or improved with practise and feedback. 

Conclusions

We have poked around in various aspect of the beach counting problem.
 
Figure 18
 
The bad news is that, given the nature of the beast, there is no right answer, even if we had some way of checking the counts. The concept of ‘the number of pebbles on the beach’ is not well defined. One just can’t count the pebbles on the beach. 

The good news is that one can certainly do some counting, using the pebbles as a prop, but one cannot be sure that one has not missed some pebbles out and counted other pebbles more than once. And if the count goes on for a long time, the count itself may become a bit ragged, one cannot be sure than one has not missed out some numbers and used other numbers more than once.

Maybe my recollection of a pebble counter is a little off the mark, in that maybe what the chap in question was doing was estimating rather than counting, perhaps using some of the unusual mathematical skills pointed up in reference 2 – for example the ability to do large sums, to calculate day of the week of a date and to calculate intervals in days from two dates – in both these last two cases taking proper account of leap years – with reference 3 being about a lady who can do some of this. In her case, more of a problem than a gift, at least for the first half of her life. 

Given that neither Bing nor Google turned up much that was relevant for the search key ‘counting pebbles beach’, maybe the best one can do is hope that someone comes forward who can count the pebbles on a beach.

One better, I am encouraged by a report in chapter 3 of reference 5, of a pair of twins, George and Charles, severely handicapped in other ways, who, when a box of matches was dropped on the floor, were both able to count the matches, without doing much more than seem to glance at them, and shout out the number – which turned out to be correct.

Figure 19

And then there are the people, again severely handicapped in other ways, who, by dint of studying something like the perpetual calendar (from Wikipedia) snapped above, seem to be able to train their brains to say the day of the week dates for great chunks of years – with a weakness being the rather odd bounds that these chunks tend to have, perhaps 50 years, perhaps 500. And I don’t think any of them can cope with the switch from Julian to Gregorian calendars in 1582. Puzzling out the calendar above is left as an exercise for the reader.

So maybe a relatively easy next step – for someone with the right equipment – would be to try to train a  neural network to count the pebbles in something like the left hand panel of Figure 15 above. If a brain can train itself to do far-fetched things of the savant variety, a modern neural network ought to manage to count pebbles. We could worry about exactly how it was doing it afterwards.

Figure 20

PS: both Bing and Google turned up lots of hits about aids to teaching children to count and about collecting interesting pebbles. Slightly nearer the mark, Google turned up something about sampling pebbles on the beach at Robin Hood’s Bay in order to produce an analysis of roundness. A place we last visited perhaps thirty years ago. Top right here. A place perhaps better known for the distinctive white domes of the nearby RAF Fylingdales, on the right as to head up to Whitby. Bottom left here.. A place which I was able to run down as Wikipedia provided me with the coordinates to feed into gmaps. Wikipedia also alleges that Serco are mixed up in this bit of critical national infrastructure, the people who try to do tracking & tracing, although you would not guess that from the write up on the RAF web site. But I have learned that the station commander is a Wing Commander, Commander in senior service terms, one down from a captain. Very much a hot seat should the cold war start to run hot again.

References


Reference 2: The savant syndrome: an extraordinary condition. A synopsis: past, present, future - Darold A. Treffert – 2009.


Reference 4: A Dynamical Analysis of the Suitability of Prehistoric Spheroids from the Cave of Hearths as Thrown Projectiles - Andrew D. Wilson, Qin Zhu, Lawrence Barham, Ian Stanistreet, Geoffrey P. Bingham – 2016.

Reference 5: Extraordinary People: Understanding savant syndrome – Darold A. Treffert – 1989.



No comments:

Post a Comment