Icon ASCII : A Love Letter


Icon My Neural Network isn't working! What should I do?


Icon Phase-Functioned Neural Networks for Character Control


Icon 17 Line Markov Chain


Icon 14 Character Random Number Generator


Icon Simple Two Joint IK


Icon Generating Icons with Pixel Sorting


Icon Neural Network Ambient Occlusion


Icon Three Short Stories about the East Coast Main Line


Icon The New Alphabet


Icon "The Color Munifni Exists"


Icon A Deep Learning Framework For Character Motion Synthesis and Editing


Icon The Halting Problem and The Moral Arbitrator


Icon The Witness


Icon Four Seasons Crisp Omelette


Icon At the Bottom of the Elevator


Icon Tracing Functions in Python


Icon Still Things and Moving Things


Icon water.cpp


Icon Making Poetry in Piet


Icon Learning Motion Manifolds with Convolutional Autoencoders


Icon Learning an Inverse Rig Mapping for Character Animation


Icon Infinity Doesn't Exist


Icon Polyconf


Icon Raleigh


Icon The Skagerrak


Icon Printing a Stack Trace with MinGW


Icon The Border Pines


Icon You could have invented Parser Combinators


Icon Ready for the Fight


Icon Earthbound


Icon Turing Drawings


Icon Lost Child Announcement


Icon Shelter


Icon Data Science, how hard can it be?


Icon Denki Furo


Icon In Defence of the Unitype


Icon Maya Velocity Node


Icon Sandy Denny


Icon What type of Machine is the C Preprocessor?


Icon Which AI is more human?


Icon Gone Home


Icon Thoughts on Japan


Icon Can Computers Think?


Icon Counting Sheep & Infinity


Icon How Nature Builds Computers


Icon Painkillers


Icon Correct Box Sphere Intersection


Icon Avoiding Shader Conditionals


Icon Writing Portable OpenGL


Icon The Only Cable Car in Ireland


Icon Is the C Preprocessor Turing Complete?


Icon The aesthetics of code


Icon Issues with SDL on iOS and Android


Icon How I learned to stop worrying and love statistics


Icon PyMark


Icon AutoC Tools


Icon Scripting xNormal with Python


Icon Six Myths About Ray Tracing


Icon The Web Giants Will Fall


Icon PyAutoC


Icon The Pirate Song


Icon Dear Esther


Icon Unsharp Anti Aliasing


Icon The First Boy


Icon Parallel programming isn't hard, optimisation is.


Icon Skyrim


Icon Recognizing a language is solving a problem


Icon Could an animal learn to program?




Icon Pure Depth SSAO


Icon Synchronized in Python


Icon 3d Printing


Icon Real Time Graphics is Virtual Reality


Icon Painting Style Renderer


Icon A very hard problem


Icon Indie Development vs Modding


Icon Corange


Icon 3ds Max PLY Exporter


Icon A Case for the Technical Artist


Icon Enums


Icon Scorpions have won evolution


Icon Dirt and Ashes


Icon Lazy Python


Icon Subdivision Modelling


Icon The Owl


Icon Mouse Traps


Icon Updated Art Reel


Icon Tech Reel


Icon Graphics Aren't the Enemy


Icon On Being A Games Artist


Icon The Bluebird


Icon Everything2


Icon Duck Engine


Icon Boarding Preview


Icon Sailing Preview


Icon Exodus Village Flyover


Icon Art Reel




Icon One Cat Just Leads To Another

Counting Sheep & Infinity

Created on May 5, 2013, 7:10 p.m.

The Count from sesame street was my first introduction into the magical world of counting. By primary school I thought I had it all covered. So when I had a mathematics course at university titled simply "counting" I was somewhat surprised. I was hoping the exam would be as easy as the course title implied. Or even better - that it would be run by a Muppet.

Turns out counting is actually pretty fascinating. One example is this mathematical fable which explains what counting really is. It goes something like this:

Back before The Romans, before numbers, and even before counting, nomadic shepherds roamed the mountains and plains. In the winter they would let their sheep out to graze. In the summer they would gather their flock together for shearing and milking. In the spring, again they would gather their flock for lambing.

But the shepherds were faced with a problem. Because numbers and counting had not been invented they had no way of knowing when they had collected all of their sheep together to be sheared. They could not find out if some had gone missing or been left behind. With no way to monitor their flock, wolf attacks and encounters with other herds were incredibly troublesome.

Then one shepherd came up with a brilliant idea. In the autumn he collected many rocks and stones into a large pile. Come winter, as he let his sheep out to graze, he paired each one up with a stone. Each stone he moved over onto a new pile. Once all his sheep were out in the field he discarded any remaining stones. His new pile then had exactly the same number of stones as in his herd.

On rolls the summer. It was time to bring the sheep in. As he rounded up each sheep he paired it with one of the stones from his pile - moving it onto yet another pile. If he managed to pair each stone up with exactly one sheep he could be sure he had the correct number. If he was left with stones he knew that some sheep were missing, and if he was left with extra sheep, somehow had gained new members to the flock.

His success spread to the rest of the shepherds. Soon they adapted his system, making improvements and modifications. Giving names to small sets of stones, or using big stones to represent many small ones. Counting had been invented.

To this day this is still how we understand counting. The root idea is the same. That you can find out the size of some set, my comparing it to another set of a known size.

While useful for counting sheep it also lets us count the size of some other weird things. One example is infinite sets. For example...

Consider all of the positive integers: 0, 1, 2, 3, 4, 5, 6, 7, 8 ...

Consider all the even positive integers: 0, 2, 4, 6, 8, ...

There are an infinite number of both of these things, but are the sets the same size?

Under initial examination one might say "no", because, well - in the second set half the numbers are missing, right?

But what if we consider the same question using our previous rule about counting. If we can find some one-to-one pairing like the stones and the sheep then we know they are the same size. Thinking about it this pairing is easy we just multiply each number in the first set by two. Therefore these two infinite sets are the same size.

But there are some infinite sets which are not the same size. For example the positive integers are not the same size as every number including decimals (the Real numbers). There is no mapping between each decimal number and each positive integer. Although the proof is not simple. It is clear that there is no obvious pairing - and it should be somewhat intuitive that there cannot be. For example there are an infinite number of decimals just between 0 and 1. In fact there are an infinite number of decimals between 0 and 0.0001. There are so many decimals that it is a struggle to comprehend.

So different sizes of infinity do exist. We call this cardinality. Even cooler is that it isn't just infinite sets of numbers that can be compared in this way. There are an infinite number of possible texts in a language, or computer programs that could be written, or musical compositions to be composed. We can even compare the sizes of these too! Finding new and interesting relationships between them. And The Count never covered that.

github twitter rss