+ 4

Challenge :: Simulation of probability. (The Monty-Hall Problem)

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? Answer :Yes. Can u simulate this problem using a program? One part of the program changes decision . Other one doesn't.

12th Nov 2017, 1:54 PM
AlphaCoder
AlphaCoder - avatar
5 ответов
+ 12
Classic Monthy Hall problem! ❤ sayan have done a great job! Perhaps you can ask some of the great web coders @ SoloLearn to illustrate the problem and I believe it would gain high enough attention. 😉
12th Nov 2017, 3:25 PM
Zephyr Koo
Zephyr Koo - avatar
+ 2
herezz itt....all combination and full proof of "" why switching is good "" https://code.sololearn.com/chkh44QPtz6w/?ref=app
12th Nov 2017, 3:21 PM
sayan chandra
sayan chandra - avatar
+ 2
Good solution. But not what i wanted. Though, its very close. I am trying to get a statistical solution. And thanks for reminding the name. ☺
12th Nov 2017, 5:10 PM
AlphaCoder
AlphaCoder - avatar
+ 1
Monty - Hall problem is also known as bartrand's box paradox and prisoners problem #@@ Alphacoder... in what way you want the program?? make it clear please
13th Nov 2017, 3:11 AM
sayan chandra
sayan chandra - avatar
+ 1
https://code.sololearn.com/c9Z0xnAJ54AQ/?ref=app I have tried to simulate this problem. It gives close answer to the original probability of 2/3.
13th Nov 2017, 7:49 AM
AlphaCoder
AlphaCoder - avatar