Thousands of virtual monkeys have taken to Bard habits. The result is comic and tragic, says Tech Sunday.
Tech Sunday’s law states that if someone comes up with a theory, even if ba-nal, sooner or later, someone else will try and prove it.
Which explains why US software engineer Jesse Anderson set out to prove the infinite monkey theorem, which states that an infinite number of monkeys bashing keyboard keys randomly for an infinite amount of time will almost surely type the complete works of Shakespeare.
Thankfully, Anderson did not use real monkeys, as this would have put our furry friends and relatives right at the top of the endangered species list.
Instead, Anderson used computer programmes uploaded to Amazon’s EC2 cloud computing system. These virtual monkeys generate a random sequence of nine-character strings – each string of characters is then checked to see if it appears anywhere in Shakespeare’s works. If not, then that sequence is discarded.
To facilitate his task, Anderson removed all spaces and punctuation from the sample text, but the experiment was still challenging. Just consider that there are about 5.4 trillion possible nine-letter strings using the English alphabet.
Still, Anderson is almost there and at the last count, his virtual monkeys have managed to complete 99.99 per cent of Shakespeare’s works.
Of course, this exercise would be impossible to replicate using real monkeys. In fact, in 2003, at Paignton Zoo, UK, a keyboard connected to a PC was placed inside a cage with six monkeys. After a month, all that the monkeys had produced were five pages of the letter ‘S’, to which they had taken a particular liking. Then they broke the keyboard.