Documentation for BIRTHDAY.PRG There is a famous problem in probabilities which goes as follows: 'Given several people in a room, how many people must there be for a duplicate birthday to be likely?'. Well, there could be as few as 2 or as many as 366. Assuming a 365 day year, there could be 365 different birthdays but the 366th person MUST be a duplicate of one of the 365. So a guess of 'about 180' seems reasonable. After all, that's a rough average of 2 and 366. Well, the astonishing answer is 'less than 23'! I wrote this simulation program to see if the right answer would seem more credible after seeing the simulation. You be the judge. I think the rest of this would mean more if you stopped reading this for now and ran the program. No instructions are needed. Just be sure that the .RSC file is on the same disk, (or in the same folder) as the .PRG; and then double click on the program. If you are using a color monitor you may have to set it up for medium resolution using the 'set preferences...' from the desktop. Background Many books on probabilities use this problem as a vivid demonstration of how our intuition fails us when it comes to probabilities. Many instructors demonstrate this in class by having the students give their birthdate. If the class is big enough and the instructor is lucky, the students have one sample indicating that the mathematical answer _might_ be right. Of course, that's only one sample, thus this program. I have run it many times and have seen as few as 2 people and as many as 71. The result is different each time the program is run, of course. My favorite book on probabilities is 'An Introduction to Probability Theory and its Applications, Volume I', by William Feller. He discusses this problem several places in the book with the best introductory discussion starting on page 31. His analysis shows that based on a 365 day year, _if_ birthdays were equally distributed throughout the year, that on the average the probability of a duplicate birthday is greater than 0.5 with 23 people in the sample. That analysis ignores leap year and the simulator program includes the effect of leap year so the results will be slightly different. The program The program has been compiled with level 1.0 of Personal Pascal. I have included the source code for its possible tutorial value. The program makes calls on VDI which one does not see every day. This capability is not described in the reference manual for either version 1 or version 2; but OSS did document it via a public domain upload more than a year ago. I would guess the upload is on most of the national BBS's. AES calls are also possible with a similar approach but there are no samples in this program. The program was written and debugged on a monochrome monitor and then procedures were added (notably MyLine, MyLine_To, and MyDrawString) to convert it for a medium resolution color monitor. Some other changes were also required to make color work. I tested it with OmniRes on a mono monitor and it works if the system is put in medium resolution by the user. The program includes code to internally change from low to medium res but this does not work properly with OmniRes. The graphics are offset to the left and the full screen is not drawn. My guess (and hope) is that this is a peculiarity of OmniRes. Since the code was already in place that _should_ do the change I left it in. I hope someone will post a message to me telling me what happens when you run the program from a low resolution starting environment. My address on Genie is M.L.HANSON.