Blog

Friday, March 29, 2013

How To count sheep in binary

Have you ever counted sheep, or maybe clouds to fall asleep?

Chances are the answer is -Yes. It is a customary to many cultures to ask someone trying to get asleep or suffering from light insomnia to visualize a large space (like a green, wide field) and start counting objects in it (like white curly sheep). The goal is to occupy one's mind with repetitive and rhythmic task, which presumably introduces boredom, and that will make one fall asleep sooner.

I have been told to try this when refusing to go to bed many times as a kid. However the boredom trick never worked for me, starting to count sheep actually got me more awake, trying to come up with the optimized ways of sheep counting... See, counting them one-by-one would get me confused on which sheep were already counted, and I felt responsible for not counting the same sheep twice. One of the things I envisioned was building a gate in the middle of the field starting with all sheep on one side and none on the other, and send sheep to the empty side of the gate and increment the sheep count, maybe with a digital sign (like modern day parking lots showing the number of available spaces). 

Of course there was still lot to do: instead of counting one-by-one you can be sending a pair of sheep trough the gate at once counting the evens only 2, 4, 6, etc sheep helping to save time! You don't need to stop here,  you can go by the increments of 5 or better yet 10. This was already enough, at this point there is no point already of thinking about falling asleep. My complains to my parents that I reached ten-thousand sheep after two minutes would surprisingly leave them disapproving. 

***

As a graduate student at University of Michigan, I found myself at the same dilemma getting more and more anxious about not being able to fall asleep for the few precious hours before the final exams. I would spend hours on the typical task of counting if I fall asleep this exact second how much time would I be sleeping before the alarms start buzzing... This is by far the worst way of trying to fall asleep besides maybe drinking Red Bull right before going to bed.

Then, one day I recalled the sheep counting task from my childhood. It wouldn't work in the original version, since it never did, so it needed to be updated to make any sense at all... I "reinvented" a slightly geeky version of Sheep in the Field. By counting sheep in binary! Counting goes as 00001, 00010, 00011, 00100, 00101, 00110, ... Boring and confusing enough, isn't it?

This is how I envision the field with sheep: 






















There is a possibility that I made a mistake the sheep counting/numbering on this picture already. Additionally  coming up with this wonderful picture on MS Paint really bored me. The morale of this story - counting sheep in binary(*) worked for me. You should try it out as well!

(*) Binary numbering system:

Decimal (base 10)
Binary (base 2)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

17
...
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
10000

10001
....


No comments:

Post a Comment