The Monty Hall Problem is an interesting Maths Puzzle – with a hotly disputed answer. Monty Hall is a well known American TV Show presenter, and this particular maths puzzle gained some notoriety on his TV Show – hence the name “Monty Hall Problem”. The puzzle is quite simple to understand, but as is so often the case it is a little more tricky (and fun) to figure out the answer.
World famous mathematicians have gone to their grave disputing the answer. But I’ll explain it in easy to understand language, and demonstrate a proof using a computer simulation I wrote which played no less than 70 million games. The source code for the simulation is available here Alan Cowap GitHub so you can review it yourself 🙂
Show Me The Monty Hall Problem Puzzle!
Monty shows you 3 doors which are closed. You are told that behind one of the doors is a car, behind the other 2 doors lies a Goat. If you choose the correct door you win the car. The doors are labelled 1, 2, and 3. Let’s say you choose Door 1. In an unexpected twist Monty opens say Door 3 – behind which stands a goat! Monty then asks you “Do you want to stick with Door 1, or do you want to choose Door 2 instead?”.
So do you stick or twist? You can stick with Door 1 or try your luck with Door 2. Monty is waiting. Your heart is racing. The crowd are shouting in equal measure “Door 1” and “Door 2”, some jokers are even shouting “Door 3” ]:> 😀
Show Me The Monty Hall Problem Answer.
Not so fast. The fun is figuring out the correct answer – if there is a correct answer. What I’m going to do is put forward an answer and explanation, then I’ll write a software program to simulate this scenario 70,000,000 (70 million) times and see if it agrees with my proposed answer. Is it better to stick or to twist – or does it make any difference? I’ll share the results (and the code) of this simulation with you. In the meantime, you can try to solve the puzzle by yourself. But before that, I’ll propose an answer – spoiler alert – don’t read the next paragraph if you don’t want to see the proposed answer.
The Monty Hall Problem Answer (SPOILER ALERT)
Ok then, you’ve racked your brains and thought through all sorts of statistical slight-of-hand and complex combinations and permutations and convinced yourself you have the correct answer. Stick or twist? Well , it turns out you should have … Continue reading →
Maths Puzzles may not be everyones cup of tea, but I love puzzles and I love maths (and cups of tea). You can already see where this is going, right. Anyway I came across this simple enough puzzle and inevitably I started thinking about how to solve it. I say it’s simple because it only involves the numbers 1 to 9 with addition, subtraction, multiplication, and division. So, how hard can it be? Well…
Rules of the Puzzle
You must use the numbers 1 to 9 inclusive
Each number can only be used once
Note that : symbolises division
This type of puzzle is one of my less favoured types of puzzle because it’s solved mostly through trial and error, with just a sprinkling of inspiration. I prefer puzzles that are solved through some (optionally mind-bending) inspirational insight. Eureka moments, I like them, they’re a natural high. But what can make this simple type of puzzle more interesting is to take it to another level. How? First, you can calculate how many permutations there are, i.e. how many different ways can 9 numbers be uniquely ordered. The answer is there are 362,880 permutations for 9 numbers (where there is no repetition, and order is important). Suddenly this simple puzzle doesn’t seem so simple. Another interesting twist is to calculate how many possible solutions there are, you didn’t assume there was just one possible answer did you? Oh dear, never assume! Hint: There is more than one solution, a lot more. I found 128 solutions.
You’re probably wondering how I found that many solutions and how long it took me to find them. It took less than 200 milliseconds to find all 128 solutions. That’s the power of writing software to do the donkey work for you 🙂 Writing the code took an hour or so and that was a much more enjoyable puzzle to solve, than manually solving the puzzle.
Get the Sourcecode
You can view and use the sourcecode which I have provided on GitHub under the GPLv2. Comments welcome, especially if you can see and errors or improvements. Enjoy!
View the Solutions
Below are a list of all 128 valid solutions. First number goes in the top-leftmost square and insert the numbers in order. Easy peasy.
Ever wondered where or what is on the opposite side of Earth from where you are? Ok, maybe it’s just me, but since I’ve written the Anitpodes app, now you can find out for yourself.
“Antipodes” literally means “opposite feet”, and refers to the point on Earth exactly opposite your location.
Simply start the app, long press the Marker on the Map and drag it to your point of interest and WOOHOO it will draw a line to the other side of the Earth for you.
See if you can avoid the water, there is _lots_ of water on Earths surface 😀
If you tap a Marker it’ll popup and show you the GPS coordinates of that location.
As with all Google Maps, you can tap the ‘GPS icon’ in the top right corner and it’ll go to your current location (if available).
Long press any location on map to make it the Podes, the map will update accordingly with a new Antipodes.
If you drag the Podes or Antipodes, it’s GPS coordinates will be updated and displayed in real-time.
Android Apps Published ! With 11 Apps developed for our Client Companies I think the class of 2014 can be super proud of their achievements. 6 of the Apps are publicly available on Google Play (links below), the others are either B2B or internal use. Without further ado, here they are:
GeoPal have their own successful app and were delighted with a library contribution which led to further work for the student who authored the library. Happy days!
Live at the Marquee App developed in collaboration with Clickworks on behalf of Aiken Promotions for the annual Live At The Marquee music festival.
Bedwetting App developed in collaboration with leading global pharmaceutical giant Ferring.
Sli Nua Careers are delighted with their App and are planning to add to it.
Clearview Coaching dipped their toe in the App arena, and their support paid off with this simple and effective app.
Hartley People got more than they bargained for with this feature rich App.
Other clients included Amnesty Interational (Ireland), Slattery Communications, tech super-startup Kitman Labs, Beaumex, and Wattless.
And to think these Apps were all written in a 12 week development cycle from start to finish is all the more impressive. It was an absolute pleasure to work with 24 students who, with a heap of hard work and a dollop of tenacity, went from zero to hero. Well done guys 🙂