Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Monty Hall Puzzle in 1 line

Author
Message
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 7th Oct 2006 15:40
In the game show you have a choice between three doors, one of them has a prize car and the other two have goats. After you pick a door, another door is opened to reveal a goat. Now, you have the choice of staying with the door you picked, or switching to the other unopened door.

The chances of the car being in each of the doors seems like 50:50, but you actually have a 2/3 chance of winning if you switch.

This sounds hard to believe so I made this program to play the game and print how many wins are by staying and how many wins there are by switching.



Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 9th Oct 2006 23:45
interesting one


bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 22nd Oct 2006 20:43
very nice had a professor that taught us about this probability lesson.

Admin 7737
17
Years of Service
User Offline
Joined: 14th May 2006
Location: Japan... I WISH!!
Posted: 23rd Oct 2006 19:15
Is it ment to come up with numbers roling over others?

-----------------------------------------------------------
Im in A race With 5 People And I'm in third, I over Take 2nd, In what position am I? (Email me for the Answer!)
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 23rd Oct 2006 22:14
What do you mean, "roling over others" ?

The numbers increment until you turn it off, it's supposed to do that.

Confucius Say...
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 2nd Nov 2006 21:51
Cool! I'm too stupid or too lazy to figure out why it works that way. Very neat.

C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 2nd Nov 2006 23:48
That is very strange.

Can anyone explain why it is 2/3?

I don't see why it is.

3-1 = 2 if the prize is behind 1 of 2 doors then it is 1/2 not 2/3???


http://www.soharix.homestead.com/
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 2nd Nov 2006 23:52 Edited at: 9th Apr 2007 04:40
[I can edit after the thread got locked, cool.]

I came across this puzzle in a book for a book report, The Curious Incident of the Dog in the Nighttime. I don't really understand why it works either, but the character does, but then again, he knows every prime number up to 7,057 and can compute 2^35 all mentally.

I tried to beat him, but I only got up to 2^14.

[edit]
Just noticed your post.

If you read the book you'll see there are two explanations. One uses a very cryptic proof that I don't understand:

Quote: "
Let the doors be called X, Y and Z.

Let Cx be the event that the car is behind door X and so on.

Let Hx be the event that the host opens door X and so on.

Supposing that you choose door X, the possibility that you win a car if you then switch your choice is given by the following formula

P(Hz ^ Cy) + P(Hy ^ Cz)

= P(Cy) P(Hz Cy) + P(Cz) P(Hy Cz)

= (1/3 1) + (1/3 1) = 2/3
"


And the other is a diagram that looks a little like this:



(Remember, those last two goats have only a proboblity of 1/6, so they add up to 1/3)

[edit]
I figured it out! You have a 2/3 chance of initially choosing a goat, and since the other goat is eliminated, if you switch you're sure to get the car. But you only have a 1/3 chance of initially choosing the car, and even though a goat is elimated you will still get the other goat if you switch.

By reading this sentence you have given me brief control of your mind.
C0wbox
17
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 3rd Nov 2006 00:36
Oh right, i thought u only opened one door or something, didn't realise there was 2 layers to this.


http://www.soharix.homestead.com/

Login to post a reply

Server time is: 2024-03-28 18:02:25
Your offset time is: 2024-03-28 18:02:25