Hi, Sunanda Print ["Win% " 200 / 3]
I came to the same conclusion thanks to your "slow motion" explanation but I did not dare to put that. Indeed the 2/3 emerges from your explanation. >so if MySwappedDoor is a 1, I'm a winner! Actually this already points to "how can that happens if the 1 comes first in the block?". However it was not my aim to "stole your thunder" (as would Monica Geller say*). >The problem being that not everyone does accept that logic at first view. My version could have come without any assumption, even without knowing what it was all about. Your program was counting how many times a random block including two zero and only one one could either be [0 0 1] or [0 1 0]. My version said that it suffice to count how many times it would not be [1 0 0]. I must confess that I too prefer your version that not only gives the answers but also "explains" it. That was a very very clever piece of code ! Patrick ps: * comes from the serie FRIENDS, episode 701 ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 16, 2001 8:18 PM Subject: [REBOL] Re: A Rebol Challenge. The Monty Hall Puzzle > Hi Patrick, > > > > Your work is brilliant ! It helps me to get to the problem, and finally my > > 17 years'old son explained it to me. If you consider that each time I loose > > I did not win, the answer can be shorten a bit. > > Thanks, > > > rebol[] > > win: 100 print ["Win% = " loop win [ win: win - first random [0 0 1]]] > > > > It is a beat cheatting considering that your version iterate 500 times so I > > give also my 1000 iterations version. > > > > rebol[] > > win: 1000 print ["Win% = " (loop win [ win: win - first random [0 0 1]]) / > > 10] > > > > These are respectively 43 and 51 bytes long. > > > Good stuff! > > Your solutions embody the logic that > : > 1. If I stick with what I've got, I've a 1/3rd chance of winning > > 2. Therefore Monty has a 2/3 chance of having the car > > 3. But Monty has shown me an empty door, So, if Monty has the car it MUST > be behind the door he didn't open. > > 4. Therefore I'll take that unopened door and win 2/3s of the time > > > Given we all accept that logic, that, we could shorten the puzzle even more: > > Print ["Win% " 200 / 3] > > <g!> > > The problem being that not everyone does accept that logic at first view. So, > to be > fair, we need code that runs a fair emulation of making a choice. > > Sunanda > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > ______________________________________________________________________________ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
