The Monty Hall Paradox with More Doors

After exploring the 3 door Monty Hall Problem, I wanted to explore what happens with more doors and various numbers of doors shown. For example, what happens with ten doors and you show five? So I created a new version of the program that does exactly that: MonteyHall20. This new version defaults to the usual 3 doors and 1 shown, but it also can have up to 100 doors with the number shown between 1 and the number of doors minus 2.

It is also a Windows command line program written in very simple C that could easily be ported to Unix/Linux or even MacOS. There were actually only a few changes necessary to create the multi-door program - the whole task took less than an hour. I spent far more time making the command line input user friendly and reworking the help message. The results were right in line with what I expected them to be given my new understanding of the original Monty Hall Paradox.

The source code is here. You can download the source code and executable from here. Below is the help message:

Here is some sample output:


Back to the original paradox
View or Download C source code
Download both the source code and the executable (zip file)
Back to Leigh's Home Page Site Map   Site Search 


Permalink https://leighb.com/montyhall/montyhall20.htm [] Hosted by Host
Leigh Brasington / EmailAddr / Revised 16 Jan 25