Reply to comment

How many songs are there?

"Assuming the world doesn't end, will there come a day when all the music it's possible to write has been written? It's finite isn't it?" - Claire W, via Twitter.

Excellent question. Yes, there are a finite number of songs in the universe - with the one condition that no song can last forever. Let's make it more restrictive and say no song can last for more than 5 minutes (though we could choose 20 or 30 mins and come to the same conclusions.)

Given that, though, it turns out it might not make very much difference that its a finite number...

All of these 5 minute songs could be played on a digital player. So we know all songs can be represented digitally: the waveform can be encoded in numbers. This is jolly helpful for answering this question. Digital encoding is ultimately bits: ones and zeros. So each bit can only be in one of two states, like a lightswitch. 1 - 0. If you have two bits, there are more options: 1/1 - 1/0 - 0/1 - 0/0. You have four options for how to arrange two bits. Three bits? 1/1/1 - 1/1/0 - 0/1/1 - 1/0/1 - 0/0/1 - 0/1/0 - 1/0/0 - 0/0/0. Eight options.

The pattern appearing there carries on: 2,4,8. That's 2, 2x2, 2x2x2... and the pattern carries on working for any number of bits. So the number of combinations is just 2 to the power of the number of bits you have. Which is how, incidentally, you get a byte. A byte can be a number anywhere from 0 to 255 (making 256 total options.) A byte is just 8 bits, and given what we've just said, 2 to the power of 8 is 256. You can check this by writing out eight numbers in a row: 1,2,4,8,16,32,64,128. Choose any combination of these numbers - in effect, marking it one or zero - and you can get any number from 0 to 255.

Err, hope that didn't confuse matters. Back to bits again. So: we know a) any song can be described with bits and b) we have a simple way of working out how many combinations you can get for any number of bits - if we have 100 bits, it's just 2 raised to the power of 100.

The next vital question: how many bits in a 5 minute song? Another side-note: if we're able to describe any 5 minute song with bits, we can also describe any song less than 5 minutes, since there can just be a chunk of silence. So - presuming no mp3 compression, and we just have a waveform, how many bits? It depends on how you sample the music, but supposing we're talking about CDs. This works, of course, because you could have *any* music on a CD and be able to tell what it was: having a better quality version wouldn't change the fact of what song it was. The same counts in reverse: you could probably drop the sound quality very low and still be able to identify what the song was. But let's stick to CD quality for the sake of argument.

So - CDs have samples of music taken at 44.1 kilohertz. Sampling at one hertz would be one sample per second. 44.1kHz is 44,100 samples per second. Each sample on CDs takes 16 bits to encode. Which gives 16 x 44100 bits in total per second: 705,600 bits. A 5 minute song has 5*60 seconds = 300 seconds. So - the total number of bits in a 5 minute song: 300 x 705,600 = 211,680,000. Just over two hundred and eleven million bits.

We now know that its possible to work out the finite number of combinations for 5 minutes worth of music: it's 2 to the power of 211,680,000. But how big a number is that? Well, there's the famous legend of Krishna and the King, in which Krishna, posing as a sage, asks for only a meagre prize if he wins a chess game: "One grain of rice shall be placed in the first square, two grains in the second square, four in the third square, eight in the fourth square and so on." Which is, of course, just the problem we were working out with bits. It's 2^64 since there are 64 chessboard squares. That turns out to be 18 billion billion grains - enough to cover the surface of India one metre deep.

So if that's 2^64, what might 2^211,680,000 look like? It turns out to be a number over 63 million digits long. As a comparison, the total number of atoms in the Earth is "only" about fifty digits long. One calculation of the total number of hydrogen atoms in the universe comes in at a number 80 digits long.

Another attempt at perspective: if you played 5 minute songs back to back for 1 year, you'd get through 105,120. The universe is between 13.5 and 14 billion years old - so that's about 1.4 million billion songs, back to back, if we got started at the Big Bang. That's a number 13 digits long - some way off our 63 million digit total.

But this isn't entirely accurate: the number I've described is all possible combinations of those bits. Clearly, a lot of them would just be noise. Is there any way of knowing what percentage would count as music? Well, partly that comes down to one's taste, of course! But its worth remembering that, within all the combinations that don't count as songs, you'd be able to find every other 5 minute chunk of sound that's ever existed: somewhere in that number-space, there's you as a 3 year old child talking to your parents. There's also a whole lot of stuff that never happened: you as a three year old child talking to Jeremy Paxman about cheese on toast. Paxman as a three year old child talking to *you* about cheese on toast. Etc. Anything, everything.

Which is odd, isn't it, because we know it's a finite number. What this means, I think, is that finite numbers will do us fine on a day to day basis, thank you very much. I mean - you can also digitally encode video. How many possible DVDs are there in the world? Again, somewhere in that number space there's a DVD where 3 year old Claire plays Aragorn in Lord of the Rings. "By nightfall, these hills will be swarming with orcs!"

So, to sum up: yup, there are a finite number of songs - they're a subset of the finite number of total bits on a CD. But there are soooo many of them, we could never, ever write them or listen to them in the lifetime of this or many more universes.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <sup> <div> <img> <h1> <h2> <h3> <h4>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.