Am I good enough to be a programmer?

Pages: 123
Nope. In the Monty Hall case, what occurs is that, when the prize is not in the originally chosen window, the game show host opens whichever of the other two windows that does not contain the prize. It is this 'whichever of the two' which produces the superficially strange result that changing is twice as good a gamble as sticking with the original.
More specifically: Let us imagine the three doors are A, B and C and that you choose A.

When you choose A, then:
- if the prize is behind A, the host opens B or C at random.
- if the prize is behind B, he opens C.
- if the prize is behind C, he opens B.

Two doors now remain: A and D, where D is the door of B and C which he did not open.

Let's look at the cases:

Case 1:
Prize is behind A. Therefore the prize is behind A.
Case 2:
Prize is behind B, so the host opened C and the prize is behind D (=B).
Case 3:
Prize is behind C, so the host opened B and the prize is behind D (=C).

So in two of the three cases the prize is behind door D and you should switch.

Try to make it work where the host does not know where the prize is...
It applies the same way. The only difference is you don't know whether or not the revealed door is the correct one or not, but since it's revealed, it's moot.

Monty hall problem:
- You select door A
- Host reveals door B as incorrect
- A = 33% odds, C = 67% odds

Lightswitch problem:
- You select switch A
- You "reveal" switch B (by turning it on, going to the other room)
- if 'B' was the incorrect switch, Monty Hall applies: A = 33%, C = 67%
- if 'B' was the correct switch, it's moot because you found the right switch, so you have 100%.

But drucifer found the solution to this problem anyway =P so it's immaterial.
No:

Let us imagine the three doors are A, B and C and that you choose A.

When you choose A, then:
- if the prize is behind A, the host opens B or C at random.
- if the prize is behind B, the host opens B or C at random.
- if the prize is behind C, the host opens B or C at random.

Since the host does not know where the prize is he might open the prize door. So the possibities are:

Let's look at the cases:

Case 1A:
Prize is behind A, and host opened B. Well, since the prize is behind A, it would be best not to switch.
Case 1B:
Prize is behind A, and host opened C. Well, since the prize is behind A, it would be best not to switch.
Case 2A:
Prize is behind B, and host opened B. It doesn't matter if you switch or not, since neither A nor C have the prize.
Case 2B:
Prize is behind B, and host opened C. You should switch.
Case 3A:
Prize is behind C, and host opened C. It doesn't matter if you switch or not, since neither A nor B have the prize.
Case 3B:
Prize is behind C, and host opened B. You should switch.

So in two of the four cases where the prize has not been revealed, you should switch. Ie the probability of the prize being behind the door you chose is 50%.

(Disclaimer: I teach logic, this is a problem that we pose in the introduction course. If you still don't believe me, check wikipedia. Students coming away believing what Disch and wtf are claiming are so common that there we even use a 'reverse problem' to catch them out.)
Addition: It is also the case that where the host does not know where the prize is and opens a door at random that happens not to contain the prize that the odds remain 50/50.
By the by, I do not think that being able to solve these problems or not important to the question of whether you would make a good programmer. It is not important in becoming a good logician. We use these problems as brain teasers that help students to think in the right way and to translate into formal language problems posed in natural language. Once you know how the formal language works you use it to solve the problems.
Well, if the host doesn't know where the prize is, then that changes things, no? However, what if he does know, Aussie?

-Albatross
If he does know, and opens an empty door... change.

But you can't use the MH problem to reason about the given lightswitch problem in the way wtf was claiming.
Ah, indeed there is that catch. I think I'll sit back and watch you lot duke it out when someone earlier had a solution that would've worked much better if the lightbulb warmed up to a notable degree.

-Albatross
OK OK... drucifer solved the problem!

I just got excited about seeing someone actually debate such a problem outside a Logic 101 class :)
 Since the host does not know where the prize is he might open the prize door.

Which does nothing but improve your odds, because the revealed door might be the prize door.

 (Disclaimer: I teach logic, this is a problem that we pose in the introduction course. If you still don't believe me, check wikipedia.

No, see... I was an advocate of the 50/50 thing when the Monty Hall problem was brought up on the boards before. I was extremely stubborn until it hit me that I was wrong, and that switching doors does in fact give you better odds.

Wikipedia confirms this. If you switch, you have 67% odds of picking the prize door.

 But you can't use the MH problem to reason about the given lightswitch problem in the way wtf was claiming.

But you can.... that's my point.

EDIT: I'll have to check wikipedia again.. as maybe it says something about whether or not the host knows where the prize door is makes a difference. But I really don't see how it could (then again, this problems fooled me in the past, so you never know)

EDIT2: actually now that I think about it I think you're right.

The 100% odds of accidentally revealing the right door would detract from the odds of switching after the door was revealed.

So yeah, I agree.

Damn Monty Hall problem.
Last edited on
 Which does nothing but improve your odds, because the revealed door might be the prize door.

Only if you get to have the prize in the opened door. I was assuming that you did not.

 Wikipedia confirms this. If you switch, you have 67% odds of picking the prize door

No:
 "Monty Fall" or "Ignorant Monty": The host does not know what lies behind the doors, and opens one at random that happens not to reveal the car (Granberg and Brown, 1995:712) (Rosenthal, 2008). Switching wins the car half of the time. The host knows what lies behind the doors, and (before the player's choice) chooses at random which goat to reveal. He offers the option to switch only when the player's choice happens to differ from his. Switching wins the car half of the time.

 I was an advocate of the 50/50 thing when the Monty Hall problem was brought up on the boards before. I was extremely stubborn until it hit me that I was wrong,

If the debate turned to questions outside the artifical MH setup then it just goes to show that you should have stuck with your insticts :)
Last edited on
Although wtf's guess was close, there is a more efficient way to tell PRECISELY, which was on. (And EverBeginner, yes, there is a roof. And as a matter of coincidence there is a floor too. :P)

Spoiler:
If you turn on Switch 1 and wait for 5 minutes, the lamp would have heated up if it were that switch. Then turn 1 off and switch 2 on. Start walking (time it takes is 0, so it would not be able to gain some "serious heat" from the fact that 2 is on, if it were 2 that was "the one"). Now start checking:
Is the light bulb warm? Yes? The switch is 1.
Is it not warm?:
Is it on? It is 2.
Is it off? It is 3.

EDIT:
Nevermind, found that drucifer answered it already. :P
Last edited on
 Damn Monty Hall problem.

Don't worry - A huge number of people are fooled twice :)
@Kyon: That's a pathetic solution. What if the bulb doesn't heat up? What if you can't touch it? I say the only way to get it for sure is:

1) Flip on all the switches.
2) Walk around the corner.
3) Set up the video camera that you took earlier, pointing it at the light.
4) Make sure you bribe anyone who objects to what you're doing to let it slide.
5) Establish a live-video feed to your computer just around the corner where the switches are.
6) Now that you can actually see the results of your switch flipping without any further walking, flip them off one by one.

A more unorthodox solution that's a bit riskier is:

1) Flip on all the switches.
2) Take your chainsaw and demolish a section of the wall just large enough for you to see if the light's on or off.
3) Flip off the switches one by one.
4) Call your mother for a last goodbye before you're hauled off for destruction of property.

-Albacheater
You might as well just use mirrors or question: "Who needs lights anyways, there ain't any in room #1, now is there?". :P
Of course there's a light in room 1. There's a computer with an LCD monitor that you smuggled in, and those usually have backlights.

EDIT: :P

-Albatross
Last edited on
Whooping crane. .. .

.. whoop, whoop.
:P

EDIT:
Another problem.. (I solved it, on the most lame-o way ever :P)
 ``123456789`` `````` Gas 1 2 3 Water Electricity ``````

Grab a piece of paper and write Gas, Water and Electricity on it, like here. Make 3 circles, or houses in the midst of that triangle. (Indicated with numbers 1 till 3 here) Now. The problem is as follows, every house should be supplied with G, W and E, these connections are indicated with lines. However, these lines may not cross.. Good luck solving it, as I said, I already did, on a really lame way. :P
Last edited on
 And as a matter of coincidence there is a floor too.

High,

None of these are not on your room plan nor in the text form and
elsewhere
Your example is having a scent of self-imprisonment for hell knows
sake for, isn't it?
High,

The latter is practically calling The Disaster in a quite smart way under a mask of the trainer.
Really it would have been funny if there is the education but not that kind billions follow.
Pages: 123