Bill Williams (IT): Support Site
Bill Williams (IT): Support Site

[home] | [profile] | [register] | [help] | [Contact Us]

       this page
Jokes   [Append to Topic]
[Tell someone about this]
By Is life a predetermined joke?
Bill Williams

Edit MessageUploaded - 6 Aug 2001 22:44

Is life a predetermined joke?

As a result of earlier discussion on our conferencing system Cix on matters such as the meaning of life, and the improbability of men living to be 900 odd years old, I took once more to a topic I have tried before as a relaxation after a hard days work. The topic is the idea proposed that lots of monkeys working at lots of typewriters might produce the works of Shakespeare.

I've tried simulating this before with no real success, but this time I tried to use the simplest possible program, but incorporating at least a little bias towards the English language. So taking Cixen as being roughly representative (rough lot on Cix). I did a letter count of a big message download & found the following frequencies.
A=18, B=3, C=7, D=7, E=23, F=4, G=4, H=8, I=15, J=1, K=1, L=8, M=7, N=14, O=16, P=4, Q=1, R=13, S=13, T=18, U=5, V=2, W=4, X=1, Y=3, Z=0 and space=44

These numbers are the ratios giving a sum of 256, a convenient max size for a string. So I took these ratios & constructed an apparently random string of these letters, and then made the simplest possible program to select from the string at random.

Was I divinely inspired, or are our lives totally predetermined by the stars or what. I must confess I do not know, yet here is a miracle: when I run this program it does indeed seem to produce the text of "A Midsummer's Night Dream". !!!

Am I myself dreaming it, are my eyes confusing me, does it only do it on MY computer. How do I know? I beg you all please try out the algorithm, which I reproduce (shortened) below in Microsoft Qbasic (Dos 6.2), and let me know please, please please.

I dont think I am going mad......mad ..... mad. WHAT does it all mean?

Was Wil Shakespeare a basic computer ????


REM: The meaning of life and shakespeare.
REM: By some miracle, this program, which simulates lots of
REM: monkeys typing at lots of typewriters, seems to produce
REM: the text of "A Midsummer's Night Dream".

REM Author Bill Williams. (

REM set number of lines.
1 l% = 10


10 r = RND(-13!)

15 S$ = ""
16 S$ = S$ + ""
17 S$ = S$ + "ee.fff.gc.hihph.hheiihic.ii.ii.iijkuwl.l.lll.mmmmm"
18 S$ = S$ + ".nhannnn.nn.nn.oi..oooo.o.ooooh.ppq.r.rrrxgrrrrrss"
19 S$ = S$ + ""
20 S$ = S$ + "....."

30 FOR i = 1 TO l% STEP 1
40 FOR j = 1 TO 72 STEP 1
50 c% = INT(RND * (256 + 1))
54 A$ = LEFT$(S$, c%)
56 A$ = RIGHT$(A$, 1)
60 PRINT A$;
80 NEXT j
100 NEXT i



Revised by - Bill Williams on 8/6/2001 10:51:33 PM

Home Page.

Click to Add Comments.

Click Here To Close Topic, Administrators & Moderators Only.


Implemented by Bill Williams (IT)
based on ASP Forum.