Showing posts with label puzzle. Show all posts
Showing posts with label puzzle. Show all posts

Monday, 14 October 2024

The Unexpected Result of Twisting on the Magic Paving Stones

At the end of Twisting on the Magic Paving Stones, I noted that there was something unexpected.  Please look back over previous articles to see the full details but, in short, what I was discussing is a scenario in which, in each round of a sort of game, a number of magic paving stones (2) are inserted at random locations (with an evenly distributed likelihood) into a path, then a monster takes a step from one paving stone to the adjacent one closer to you (starting at one step closer to you than the last paving stone in the path) and then you eliminate one paving stone of your choice (and since you don’t want the monster to get you, you are going to eliminate one behind it, further away from you).

Set the number of randomly inserted paving stones to 2, the initial pathlength to a sufficiently large value (for which I choose 120, so the monster starts on paving stone number 119) and plot the output once every 200 rounds and you get this:

It might not be immediately obvious, but we’ve seen something like this before (or at least those of us who looked at the OE curve).  To emphasise this, here is that monster location curve with the OE curve below it – noting that smoothing has been turned off.

This is rather curious and was in fact something that I was struggling with – having previously posted two articles on the same sort of thing before retracting them (soon to be reinstated at Observable Events Curve - Is Double Dipping Essential? and Observable Events Curve - Not Quite a Drunkard's Walk).

Note that the time (or number of rounds) that is taken for the monster to get you (or “capture time”) is not set, there’s something akin to chaos happening in that the capture time very much depends on slightly different conditions early in the scenario, which – after the first round – are randomly imposed.

The OE Curve line in red above is based on time it takes for the separation to reach zero, t0 (with a relatively insignificant offset to account for the fact that the initial separation is not zero, but rather an offset that we can call xi).  The final equation becomes:

x'=ct((ct0+xi)-ct)/(ct0+xi)

If ct0>>xi and ct=x, this approximates, of course, x'=x(ct0-x)/ct0.

Sunday, 13 October 2024

Twisting on the Magic Paving Stones

In Why the Magic Paving Stones Puzzle is a Paradox I provided the solution to the Magic Paving Stones puzzle. 

What I want to do now is to introduce a slight twist.

Once again, you are standing on one end of a path of paving stones.  At the other end of the path is the monster.

Once again, you have the choice again about how many magic paving stones will appear randomly (as previously defined) along the path every round, prior to the monster taking each step from one paving stone to the next towards you.

However, before things start, you are offered the option to give one free step that the monster can take towards you (so before any magic paving stones are activated) in exchange for the ability to destroy one paving stone of your choice every round, so long as the sum of additional paving stones per round is greater than zero.

I know this is complicated, so I will try to clarify using an illustration.

What choices do you make in this instance?  Can you prevent the monster from getting you?

---

Note that there’s something unexpected involved here, but it’s not actually in the solution to the puzzle.

Saturday, 12 October 2024

Why the Magic Paving Stones Puzzle is a Paradox

The puzzle posed in Magic Paving Stones may or may not be a paradox.  It might come down to expectations and definitions.  If you don’t have any expectations, or you work out the right answer straight away, then there’s no paradox at all.  If there’s a lack of clarity in definitions of key terms, then … well, it’s still a sort of paradox.  Alternatively, it might be one of Quines’ “veridical” paradoxes.

The crux of the puzzle is how many extra steps you must make a monster take in order that it never reaches you.  If you can ensure that there is an extra paving stone inserted between you and the monster for every step it takes then it can never reach you, so the problem then becomes how many extra paving stones across the whole range need to appear (at random, as defined in the puzzle) every time the monster is about to take a step.

It's not 1, as suggested by one respondent (at r/paradoxes).  If only one step is added, then, as soon as the monster takes one step, there is a (possibly very small) chance that any step that appears (by means of an additional paving stone) will be behind it – on the other side from you, allowing the monster to get closer to you and thus increasing the chance that the next paving stone that appears will also be behind it.  That leads, quite quickly, to a situation in which the monster is bearing down on you steadily and remorselessly like the antagonist in “It Follows”, but you can’t run!

It's not 2 either, as I have heard suggested.  This is, I think, a quite intuitive answer – there is one paving stone to counteract the step that the monster is about to take and another to push it further away.  The problem is that there is a vanishingly small, but non-zero chance that both additional paving stones will appear behind the monster (at some time after it has taken its first step) and it therefore gets closer to you.  Again, this will increase the likelihood, in future rounds, that both additional paving stones will appear behind the monster.  Sure, the time taken for the monster get to you increases, but never is very long time (to paraphrase Roxette and the Red Hot Chili Peppers).

The other intuitive option, which only seems to be suggested when I use an actual number of paving stones for the initial path, is to set the number to equal the number of existing paving stones or number of slots available.  So, say I suggested (as an example) that you start off with 12 paving stones, it seems intuitive to some that the answer is either 11 or 12.  I think there is a tendency to think of the slots being filled evenly, but that was not what was specified in the puzzle.  The likelihood of a paving stone going into any specific slot is equally distributed across all slots, which does not prevent multiple paving stones appearing the one slot.  Once the monster has taken one step towards you, there is a possibility that future magic paving stones will appear behind it and eventually it becomes quite likely that all of them will, allowing monster to get closer to you and eventually get you.

I wrote a program to simulate this, allowing me to adjust the total number of rounds, the initial location of the monster, path length and the preset number of magic paving stones.  As an extreme, I set the monster at paving stone 2 of 2, and then set the number of magic paving stones to 12.  Then I charted the output:

Note that this is isn’t always the precise outcome quantitatively, sometimes the number of rounds was at least eight times that, sometimes as little as half of it.  But in every single instance when I ran the numbers, it turned out that – eventually – the monster gets you.

So, the answer to the puzzle appears to be that you need an infinite number of paving stones to appear each round in order to prevent the monster ever getting you.

I don’t think that this is an intuitive answer, nor the answer that most people will expect.  So, in the soft sense at least, I do think that this is a paradox.

--- 

There’s another sense in which this is a paradox – based on the vagueness of the term “never”.  The question was posed like this: what is the minimum number of magic paving stones do you have to preset for activation each round to ensure that the monster never reaches you?

If I had said “ensure that the monster cannot reach you”, then perhaps not even an infinite number of magic paving stones would suffice.  As soon as we start throwing around infinite numbers, we must sure accept also the possibility of an infinite number of rounds – after which the monster does reach you.  The way I think of it is that either the monster gets you, and the game is over, or there’s another round with an infinitesimal likelihood that that monster will get slightly closer to you.  If there’s no end of rounds, then the only way it stops when the monster gets you.

This seems like a weird variation of the Hilbert paradox, which is a veridical paradox, not because it involves set theory, but because it involves a conflict of infinites.

In the first round, you effectively put an infinite number of paving stones between you and the monster. In the second round, you have an infinite number of paving stones that appear across a range that is infinite, but split between single paving stone behind the monster (that it just stepped away from) and the infinite number between you and the monster (noting that it is a slightly larger infinity, since it is the infinite number of new paving stones plus the original number of paving stones – let’s call this infinity+).  There’s a one over infinity+ likelihood that any one of the infinite number of paving stones will appear behind the monster, but there’s the preset and slightly smaller infinite number of them.  The likelihood of any one paving stone appearing behind the monster is infinitesimally small (against what is effectively a 100% chance of appearing between you and the monster, since infinity/(infinity-1)=0.99999…=1). But with an infinite number of paving stones appearing – all possibilities no matter how unlikely will surely be expressed. 

Now there are two infinities of paving stones, with some tiny proportion of them being behind the monster.  With each round another infinite number of paving stones appears, each with a slightly greater proportion of them appearing behind the monster, but the monster is still getting further away.  It seems that it is impossible that it will ever reach you.  However, if we use any arbitrarily large number, N, as the number of magic paving stones, we can see that – eventually – the monster does get you.  Adding one, or two, or any other arbitrarily large number to N doesn’t save you and there’s no reason to think that that would ever change and, logically, we could add an arbitrarily large number times an arbitrarily large number and it would make no difference, so neither should adding infinity.  And thus the monster gets you, eventually, even though it seems quite impossible that it should.

---

So, I ask again, is this a known paradox?  Or a variation of a known paradox?  (Or just silliness when you take it to extremes and get infinities involved?)

---

It has been pointed out (by u/crescentpieris) that there is a very similar mathematical puzzle that appears paradoxical, thus falling into the soft paradox category – Ant on a Rubber Rope. I do have one more twist to it though, as per the next article.

Thursday, 10 October 2024

Magic Paving Stones

This is a sort of a puzzle, sort a paradox (in the soft sense of running contrary to expectation, rather than involving explicit self-contradiction).

Imagine you are standing the first paving stone of a path that consists of an arbitrary number of paving stones.  At the end of the path is some vague monster that you don’t ever want to reach you.  As happens in a nightmare, your feet are firmly stuck to the paving stone that you are standing on and you can’t run.  Fortunately, you have two facts in your favour.

Fact one: the monster moves at a rate of one paving stone per round.

Fact two: you have a singular (once-off) choice to preset the number of magic paving stones that will be activated per round – just before the monster moves.  These magic paving stones will appear between existing paving stones, at random.  More specifically, the likelihood of the paving stone appearing between any two existing paving stones is evenly distributed across the whole path.  For example, if there are three paving stones, there are two locations where a new paving stone could appear – between #1 and #2 (slot #1#2) and between #2 and #3 (slot #2#3), with equal likelihood of P=0.5.  Like this:

For even more clarity, each magic paving stone is inserted between existing paving stones with equal and independent likelihood.  So, if the number of magic paving stones per round that you preset is two, and there are three paving stones, then each magic paving stone could appear in either slot #1#2 or slot #2#3, with an independent likelihood of P=0.5.  This would lead to a likelihood distribution of P=0.25 for both to appear in slot #1#2 or both in slot #2#3, and P=0.5 for one each in slots #1#2 and #2#3 (because there are two variants of this outcome as shown below).


The apparently simple question is: what is the minimum number of magic paving stones do you have to preset for activation each round to ensure that the monster never reaches you?

---

Note that your only decision involves the preset number of magic paving stones that appear each round.  You don't place those stones, they just appear.  Once you set the number, that's it, you can't change it.  Since we are after the minimum number, and we are talking about magic paving stones, we could also add that if you choose a number to be the minimum that is wrong, the stones won't activate at all and the monster gets you.

Thursday, 4 October 2018

The Messiness of Layered Spheres

Below is what I wrote earlier in Layered Spheres (repeated because it was such a short thing):

---

Say you have a standard solid, rigid sphere like a ball bearing.  Surround that sphere with as many identical spheres as you possibly can.  Hint: the maximum number of equal sized spheres that you can put around a single sphere is 12, according to sphere packing geometry.


You can see how that works here, if you imagine removing the top orange and adding three oranges below, so you have three above, three below and six surrounding the central orange in the middle, for a total of twelve.

Call this the first layer, or Layer 1, and then keep adding more layers.

How many spheres in total will you have when you reach Layer 100?  For bonus points, how many spheres will there be in Layer 100?

---

When I originally wrote this, I had an inkling what the answer was but I thought that someone might have the staff answer, which despite looking for it, I could not find.  That may well still be the case, but I’ve not had anyone provide me with the answer (or a link to the answer).  I did have someone tell me about packing geometry which, while it wasn’t really my question, did lead me to conclude that my solution wasn’t right.

The answer I had was that for layer x surrounding a seed sphere with other spheres, there are ((2x)2-1).4 spheres.  The problem is that I wasn’t considering all the implications of packing, and how you can’t really fit as many spheres in the second layer, because it’s not smooth.  I suspect that what the equation might be telling me is that if I put putty in the gaps of each layer, making it a new smooth, larger sphere with a radius of 2x+1, then that new sphere could be surrounded by ((2x)2-1).4 spheres.  It seems to work for the second layer at least (when you get 60 spheres fitting nicely around a new sphere of radius 3r, where the standard sphere has a radius r).

If we work on that basis (which I accept isn’t what I asked) then there will be, in the 100th layer, 159996 unit spheres.

I was thinking, as you get more and more layers, that the created sphere becomes more and more smooth, even if I don’t fiddle around with hypothetical putty – because the deviation from perfectly smooth becomes relatively smaller – but in thinking that way, I was perhaps not properly taking into account the fact that the spheres that I am using in the new layer have the same sort of dimensions as the deviations from smooth that exist throughout the process.

That said, I do think that the deviation from ((2x)2-1).4 spheres in the outer layer will become increasingly small as the created sphere increases in size.  There will always be a deviation, but I suspect that when you get to thousands or millions of layers, that deviation will be neglible – even if it’s not zero.  In other words, as x approaches infinity the number of spheres in the xth layer divided by ((2x)2-1).4 approaches unity.

So now my answer to my original question is “approaching 1.6x105 but probably short of that by about 10-20%”.  I’ve hedged this quite a bit because it’s messy.

One of the problems is that what I asked and what I was thinking were slightly different.  I was actually thinking of an expanding notional sphere, and then thinking about how many unit spheres of radius r fit into that expanding sphere.  That made me think about layers, because I was basically thinking in steps of 2r.  However, if you do do that, you will find that with some increments of 2r, you can fit in more spheres than you would if you were merely adding a new layer – basically because a dodecahedron isn’t quite a sphere, and the shape you end up with when you slot in a more spheres into the gap isn’t quite a sphere and so on.  The shape you create this way becomes increasingly spherical – but never quite makes it.

Thinking about it another way, if you used very small increments on an expanding sphere (notionally infinitesimal), then you would just be putting in new spheres into dimples on the surface of the created shape whenever possible, which would create new dimples, which would be filled in turn.  You wouldn’t just add a whole new layer at a time.  And that’s messy.

Saturday, 8 September 2018

An image to help with Spherical Layers

This relates to the previous post, Spherical Layers.


Each new colour is a new layer.

Of course this is just about layering circles, but the concept of circular layers applies also to spherical layers.  Imagine an incrementally larger circle and how many circles can fit into that circle, or an incrementally larger sphere and how many spheres can fit into that sphere.  As your circle or sphere gets larger, the resultant approximation of the layers gets closer and closer to a circle or a sphere.  In between approximations of circles or spheres, you do get approximations of hexagons or dodecahedrons (which in themselves could be thought of as rough approximations of circles and spheres).

Note that the red and light green layers are also approximations of a dodecagon.  Note also that, when considering polygons, the best approximation of a circle is a regular ∞-gon (or apeirogon), but do note that a circle doesn't have sides per se, it has one curved side (singular, not plural) and is not a polygon.

Thursday, 6 September 2018

Spherical Layers


Say you have a standard solid, rigid sphere like a ball bearing.  Surround that sphere with as many identical spheres as you possibly can.  Hint: the maximum number of equal sized spheres that you can put around a single sphere is 12, according to sphere packing geometry.


You can see how that works here, if you imagine removing the top orange and adding three oranges below, so you have three above, three below and six surrounding the central orange in the middle, for a total of twelve.

Call this the first layer, or Layer 1, and then keep adding more layers.

How many spheres in total will you have when you reach Layer 100?  For bonus points, how many spheres will there be in Layer 100?

(And for extra extra points, is there a formula to calculate the number of spheres with N layers that is more than the just the summation of all spheres in all the layers plus one [for the first sphere]?)

Sunday, 16 October 2016

The Most Valuable Solution to the Four Doors Problem

A few days ago, I posted the Four Doors Problem.  So far, no-one has had a go at solving it.  I'm guessing that some would be far happier critiquing my solution anyway, so here it is!

---

Most will recognise the problem as a complicated variation of the Two Doors Problem, for which a solution is readily available.  What are less readily available are the two other solutions to the two doors problem.

Briefly, in the two doors problem, there are only two doors which may be sentient and able to answer questions themselves, or there may be two identical guards who answer on behalf of the doors.  A classic version has one guarding the door to hell, while the other guards the door to heaven.  The heaven guard always tells the truth, while the hell guard always lies, but other than that you know nothing meaning that there are no visual clues as to which is which.  You're given one question to find out which door leads to heaven (which contains magic chocolate, or some such nonsense).

The standard answer is to ask one of the guards which door the other guard would say led to hell.  Then you go through that door, because it goes to heaven.

Another option is to ask a guard whether both doors lead to heaven.  If she says yes, then she's the hell guard so take the other door.  If she says no, then she's the heaven guard so take her door.  This relies on the additional fact that the liar guards the hell door.  If you were told no more than one lies and one tells the truth, then you'd still not know which door was which but you would be able to ask another direct question to the truth telling guard (and thus avoid being stabbed by the third guard).

The third option would risk the ire of any third guard because it's a bit tricky.  You could ask "if I had asked you earlier which door leads to heaven, which door would you have pointed to?"  The heaven guard always tells the truth, so she would have pointed to the heaven door.  The hell guard always lies, so will lie about having lied before and thus will point to the heaven door.  So no matter which guard it is, you can go through the door pointed to.

The benefit of this method (third guards aside) is that not only do you no longer need to worry about whether the guards are located in front of "their" door, the solution will work even if the heaven guard had a night off and an off-duty hell guard had taken her place (so that both lie), or vice versa (so both tell the truth).  In other words, it's the right solution if the problem were to be rephrased as "you only know that guards come in two varieties, they either tell the truth all the time or lie all the time, but you don't know what the guards in front of you are, both truth-tellers, both liars or one of each".

So, with four doors and the type of responses that Monty can give, we can ask a similar question - albeit a little more complex:

If with a third question I asked you which door would you have indicated in response to a first question had I - with the first question - asked which door had the money behind it?

Breaking it down a little:

If it's the truth-telling platform, then the door pointed to will have the money behind it because Monty will tell the truth about having told the truth before.

If it's the lying platform, then the door pointed to will have the money behind hit because Monty will lie about having lied.  Now, this needs some clarification, if you asked the first question, rather than asking about the first question, then Monty would have three options to lie.  Then, when answering the third question, he would have three options to lie (by pointing to any door other than the one he had actually pointed at).  But in the abstract, having not actually pointed at a door with an actual first question, Monty is obliged to lie and thus he is obliged to point at the door that he could not have pointed to if there had been a first question.  (This does assume that given an obligation to lie, Monty will choose from the three goat doors at random, making it a little bit equivalent to the Monty Hall problem where he has two goat doors to choose from.  I've imported that assumption on the basis of indifference.  For the purposes of this solution, if you don't like that I've made the assumption, just work on the basis that I had clarified that, when lying, Monty picks a goat door at random.)

I specify first and third questions to account for the flip-flop platform (lie-truth-lie-truth, etc).  In both these questions, Monty will be in the same phase, either telling the truth both times or lying both times and he will therefore point to the money door, following the same logic above.

The last platform introduces an issue because Monty's response will be random and the tricky nature of the question posed to him will not affect how random his response was.  Fundamentally, he's being asked to point at one of four doors, he'll choose one totally at random.  So there's only a 25% probability of his pointing at the money door.

If you asked the question twice, on two different platforms and the answers were the same, you'd have certainty that the door indicated was the money door and you'd have locked in $250,000.  However, you'll only get this if you avoided the random platform (or, while on the random platform, Monty pointed at the money door).  If you didn't avoid the random platform, and Monty didn't point at the money door, then you'll have two different answers and not know which was which, so you're left with a 50-50 decision which has less value (due to risk) than asking another question to be certain of $125,000.  While I've not calculated it, the value of asking two questions (and potentially three) is less than just taking a punt without asking any, namely $250,000.

The optimum is achieved by asking one question and one question only, on one platform only, then taking the door indicated.  25% of the time it'll be the right door because Monty was on the truth-telling platform, 25% of the time it'll be the right door because Monty was on the lying platform, 25% of the time it'll be the right door because Monty was on the flip-flop platform (and he was restrained to either telling the truth twice or lying twice) and 6.25% of the time it'll be the door because Monty was on the random platform and he pointed at the right door at random (25% of 25% = 6.25%).

So the probability that you take the correct door, with half a million behind it, is 81.25% - a value of $406,250.

---


If there is a more valuable solution, I'd be interested to hear it.

---

If you want to know for certain that you're picking the right door, then you must be prepared to ask the question three times while Monty stands on different platforms although you might only need to ask twice.  When you have two answers that are the same, then you've got the right door - with $250,000 as the prize, about 81.25% of the time.  18.75% of the time Monty will answer randomly and not point to the right door, which means that you'll get two different answers, one right and one wrong, and you will not know which is which.  So you need to ask again with Monty standing on a third platform.  Whichever door is pointed to again is the right door, but after three questions you'll only be winning $125,000.

So, if you are after certainty, you need to ask a maximum of three questions and a minimum of two.

If there's a better way, getting certainty with two questions for example, I'd be keen to know (but I doubt that it's possible with the potential for random answers).

Tuesday, 11 October 2016

Four Doors Problem (Not Really Monty)

I'm revisiting Monty because he's so much fun!  That said, the scenario isn't really related to the Monty Hall problem, other than it involves doors (four rather than three) and there is a preferred prize … who wouldn't want the chance to win a goat?

This time, Monty has four doors, each with a little platform in front of it.  Three of the doors have goats behind them and the other one has a large sum of money, a million dollars.  Monty knows which door has the cash behind it.  For ease of reference, the doors are labelled 1, 2, 3 and 4 while the platforms are colour coded: Red, Green, Yellow and Blue.

Rather than selecting a door and being offered the chance to switch, you now have the opportunity to question Monty.  The problem, as it is explained to you, is that Monty can only answer you when standing on one of the four platforms and, depending on which platform he is standing on, he will give you a different sort of answer:

the truth,

a lie,

the truth or a lie - but alternating, so a 50% probability of starting with a lie and then alternating, and

a totally random answer (with a uniform distribution, so 50-50 on a yes-no question, 33-33-33 on an x-y-z question and so on).

Each time you ask Monty a question, the amount of money behind the door is halved.  While you can move him to any platform you like without affecting the prize value, you don't know which colour platform triggers Monty to respond in which way.

So, the metaquestions are these:

What is the optimal number of questions to ask (see below)?

What is the value of your final position (see below)?

What would your questions be? and

How many platforms do you get Monty to stand on?

---

By value, I mean that a 25% chance of winning a million would be worth $250,000.  By optimal, I mean the number of questions that result in highest value.  Note that while they strictly are of equal value in a sense, I'd still put a certainty of winning $250,000 above the 25% chance of winning a million for psychological reasons - because we tend to prefer certainty over risk.  We are inherently loss averse which means that the 25% probability of winning a million has to be balanced against the 75% probability of having given away the certainty of $250,000.  If you need to choose between two otherwise equal "values", consider the one with less risk as (closer to) optimal.  (Alternatively, think about the fact that you'll have a goat to deal with if you open the wrong door!  Let's assume that you don't want a goat and would consider winning one as an impost.)

Note that if you could only reach absolute certainty after four questions, then the start position of a 25% chance of taking home a million (along with a 75% chance of winning a goat) would have about four times as much "value" as $62,500 in the bank.  Hint: you can get there in less than four questions.

---


If you like, you can just forget about the goats.  They really aren't important.

A sad goat.

Thursday, 12 March 2015

Saving Monty Fall

As pointed out by KaySen, there is a treatment of Jeff Rosenthal’s Monty Fall scenario by Christopher Pynes which suggests, amongst other things, that in a Monty Fall scenario the correct answer is still 2/3.  Interestingly enough, Pynes is making precisely the kind of error that I was accusing everyone of making when I was first defending my arguments first raised in The Reverse Monty Hall Problem – that is by treating a single instance, one shot game as if it were part of a series.

I am now persuaded that the intent of this argument was misguided in terms of both the Monty Hall Problem and the Reverse Monty Hall Problem, but I consider it to be entirely valid with respect to the Monty Fall scenario.

The whole concept that Rosenthal is trying to convey is that the host accidentally falls against a door, thereby revealing a goat, rather than deliberately selecting a door to open.  This entails that the accident is a one-off.  There is no implication that the host repeatedly slips and falls against a door, and that in each case a goat is revealed – as implied by Pynes:

In cases where the contestant picks the door with the prize behind it in the first place, Monty never reveals it, but reveals another door: in these cases one wins by staying and loses by switching—1/3 and 2/3 respectively. In the case where the contestant doesn’t initially pick the prize door, Monty’s fall reveals the only door it can that isn’t the prize—win 2/3 of the time by switching. This makes Monty Fall and Monty Hall the same in all instances; they are logically equivalent, and thus must have the same probabilities.

There is no “never”, there are no other instances required to make “all instances” a meaningful concept.  It happens once, whoops, and it’s entirely possible that it never ever happens again.  Pynes, I believe, is the one being seduced by his familiarity with the Monty Hall Problem.

There is, however, a way in which Monty Fall can be saved in so much as it can be reliably repeated.

---

Monty de Sade was continuing to cast about for a more devious variant of the three doors, two goats and a car game.  He heard about the use of coins to discuss the Reverse Monty Hall problem and a new idea formed in his evil little mind.

His new game goes like this:

There are three doors, with two goats and a car distributed behind them at random just like before.

The contestant is offered one door to choose from, just like the classic Monty Hall Problem.

Monty then offers a more complex continuation.  If the contestant agrees to proceed, Monty will toss a coin and then open one of the unselected doors on the basis of the result.  If the car is revealed, the contestant will automatically lose.  If the car is not revealed, then the contestant will be offered the opportunity to switch doors.

What is the likelihood of benefitting from a switch?

There are three decisions here on the part of the contestant:

The selection of a door, which we take to be random

Whether to risk losing the car on the basis of a coin toss

Whether to switch

As far as I can tell, noting that I have been wrong before, there is a 1/3 likelihood of selecting the car from the outset.  This means that there is a 2/3 likelihood of the car being behind one of the two unselected doors.  However, when Monty tosses a coin, there is 1/2 likelihood of revealing the car, if the car is behind one of those doors, and a 0/1 likelihood of revealing it if the car is behind the selected door.

This means there is a 1/3 likelihood of having the car already and a 1/3 likelihood that the contestant will lose the car in the coin toss and a 1/3 likelihood that the car won’t be lost in the coin toss, but will be behind the one remaining unselected and unopened door.

This means that the likelihood of benefitting as a result of switching, after surviving the coin toss, would be equal to the likelihood of benefitting as a result of not switching.  In which case, there was no point in going through the charade, was there?

This seems counter-intuitive.  It seems to me that if the contestant bothered to go ahead with the coin toss then, once a goat is revealed, if a goat is revealed, she is essentially committed to switching.  By why, if it’s 50-50?  Some might suggest that it’s not 50-50, but the probability tree below indicates that it is – unless I’ve made an error somewhere.


That said, there are two perspectives one could take, and they seem to have equal weight:

Perspective One:

At the beginning the contestant picks one door, the likelihood of having selected the car is 1/3, so there is a 2/3 likelihood of not having selected the car.  If she has the car, then she loses nothing by having Monty toss the coin and open a door.  If she doesn’t have the car, then she gains nothing by sticking with her selection.  So she should proceed.

Then Monty tosses the coin and, phew, doesn’t reveal the car.

Given that there was 1/3 likelihood of the car being behind the selected door and a 2/3 likelihood of it being behind one of the other two doors, it’s more likely that the car is behind the remaining unselected and unopened door and the contestant should therefore switch.

Perspective Two:

The contestant selects a door.  If she has selected the door with the car, then she loses nothing by having Monty toss the coin and open a door.  If she hasn’t selected the car, then she gains nothing by sticking with her selection.  So she should proceed.

Monty tosses the coin and, phew, reveals a goat.  The likelihood of Monty revealing a goat when there are two goats behind the unselected doors is twice that of revealing a goat when there is only one goat that could be revealed.

Given that Monty revealed a goat, it’s more likely that the car is behind the selected door and the contestant should therefore stay.

So, I throw the question out there: what is the best strategy for the contestant (not to switch or stay, but to take the coin toss or not)?

Note that this time I have no firm answer of my own beyond a gut feeling that the rational contestant should risk a coin toss to make use of the 2/3 likelihood of not having selected the car and switch if a goat is not revealed, having dodged an automatic loss entirely by chance.  I do recognise that the probability calculations don’t seem to support this gut feeling but perhaps someone has some better probability calculations.

---


And how, precisely, does this save Monty Fall?  If my 50-50 solution is correct, then it is possible to run the scenario over and over again, as many times as you like, and then extract one iteration of the game in which Monty reveals a goat.  This then represents the single instance involved in the Monty Fall scenario, it’s just that the “luck” is now based on a coin toss rather than a humorously placed banana peel.

Saturday, 7 March 2015

From Two Balls One Urn to the Reverse Monty Hall Problem

So, some might be thinking, how on Earth did I get in this state with The Reverse Monty Hall Problem?  Especially when, only two short weeks or so ago, I was a definite 2/3 answer person.  How did I manage to spend more than two weeks convinced that the answer was 1/2?

It started with balls.  Well, it started with a little thought experiment associated with the Anthropic Principle, but it involved balls.  There are some who think that “Fine Tuning” is an argument for the existence of a god.  Even some closer to normality think that it is something that ought to be explained (or explainable).  I go along with the anthropic principle, because I agree wholeheartedly that, given we are here to observe the universe, the universe must be suitable for beings like us to observe it.  In other words, the posterior likelihood that the universe being suitable for beings like us to observe the universe is 1/1, not 1 in whatever ridiculously large number some apologists come up with.

So, I started thinking about balls.  What, I wondered, would someone say if, after a sequence of 999,999 black balls from a barrel, having been taken at random one by one, I stopped them and asked them to assess the likelihood of the last ball, the one millionth, being white.  It seems ridiculously unlikely, right?  This would mean that every single ball before then had a chance of being a white ball, but they selected a black ball every time.  So, it would have to be 1 in a very large number.  Well, it’s not that large, I thought.  It’s one in a million.  Say that there’s a black ball in the barrel, one black ball, and the balls are removed at random.  It’s a sequence and, if the black ball’s position in the sequence is random, that ball is equally likely to be in the 1,000,000th position as it is to be in the 456,978th position, or the first, or any other specific position.   So, it’s one in a million.

However, I thought, that’s not quite right.  Balls aren’t limited to black and white.  The millionth ball could be a red ball, or a green ball, and so on.  So, it’s more accurate to say that the likelihood of that last ball not being white is one in a million.  So, I came up with another scenario, which is at Two Balls One Urn.  This was a little too complicated, so I adapted it at Two Balls One Urn, Revisited.  In this scenario, there are two million balls in a barrel which is in a pitch black room.  The balls are all various shades, colours and patterns including two that are just white.  Someone goes into the room with an urn, picks a ball at random from the barrel and puts it in the urn.  Then they pick another ball at random from the barrel and puts that in the urn as well.  Then they pick a ball from the urn at random and hold it in their hand.  Finally they leave to the room, they look at the ball in their hand and see that it is white.  What is the likelihood that the ball in the urn is also white?

It works out to be 1/(n-1) = 1/1,999,999 where n=2,000,000 is the number of balls in the urn.

One of the commenters, Anonymous B, suggested doing this with n=3 and pointed out that the answer in this case must be 2/3.  In my response I indicated that, at the time, I didn’t think that an n=3 version of Two Balls One Urn and the Monty Hall Problem can be equivalent scenarios, if one comes up with an answer of 1/(N-1)=1/2 and the other comes up with 2/3.

Then I thought about it some more and cognitive dissonance kicked in.

So, because I still find this difficult, I shall go through the Two Balls One Urn with three balls, just to make it perfectly clear what I was doing:

I have an enormous barrel in a pitch black room and I know that in the barrel there are three balls, two of which are entirely white, the other being black.  I take an urn into the pitch black room and, completely at random, I take out two balls from the barrel and place them in the urn.  

Because it is so dark in the pitch black room, I cannot see either of the balls when I do this.

Then, while still in the pitch black room, I reach into the urn and, completely at random, I draw out one ball.  Because it is so dark in the pitch black room, I cannot see either of the balls when I do this.

Finally I walk out of the pitch black room and I look at the ball I drew out of the urn.  It is white.

What is the probability that the second ball - the one still in the urn - is white?

Now, following precisely the same logic as when n=2,000,000, the answer should be 1/2.  The white ball in my hand means that either:

the first ball I took out of the barrel was white, and when I took the second one out, I was randomly selecting from two, one white and one black, or

the second ball I took out of the barrel was white, and when I took the first one out, I must have taken one at random from the other two, one of which was white with the other being black.

Therefore, the ball in the urn has a 1/2 likelihood of being white and a 1/2 likelihood of being black.

Now, if the white balls are goats, the black ball is the car, the barrel represents the three doors, the urn represents the selected door, and the ball taken at random from the urn is the opened door, then we have a scenario that is analogous to a variation of the Monty Hall Problem.  And the answer in the Monty Hall Problem is widely accepted to be 2/3 rather than 1/2.

This was a problem.  I thought that it must be wrong, and then I looked up the history of the Monty Hall Problem and saw that prior to 1990, pretty much everyone who thought about it was convinced that the answer was 1/2 (despite the fact that Steve Selvin had written a paper giving the correct answer as far back as 1975, a fact I discovered only quite recently).  I also stumbled across the Monty Falls variation of the Monty Hall Problem in which the answer is 1/2.

There is clearly something strange going on.  So, as is my wont, I looked to see if there was a middle path.  Is it possible that the answer is 2/3 in one sense and 1/2 in another sense?  I thought that it was quite possible, and an answer came to me when I was thinking about the white ball in my hand.

In my scenario, I had "forced" the situation.  In a real situation, it wasn’t guaranteed that the white ball in my hand was going to be white.  It could have been black.  However, in my scenario it quite explicitly states that the ball in my hand is white.

In the Monty Hall Problem, in the treatments of it I had seen, this was not so explicitly stated.  There is plenty of talk about how, before the door is opened, the host might have opened another door, or the contestant might have selected different doors, or the goats and car might have been arranged differently.  But, I reasoned, this is not the situation that the contestant finds herself in once the door has been opened.  Once the door is opened, the goats and car have been placed, the doors have been selected and the host has already opened the door.  Therefore, I thought, this makes the Monty Hall Problem, as posed by Craig F. Whittaker, analogous to me standing there with one white ball in my hand.

Some might argue that in my situation, the decision of the host is not taken into account.  However, I tried to be very explicit in my wording of the Reverse Monty Hall Problem, the host is forced to reveal a specific goat in those circumstances where by not doing so he would reveal the car and otherwise the goat revealed is selected entirely at random.

This, I thought, was directly analogous to my selection of the ball from the urn.  If there is a black ball left in there, then the white ball I removed was the only white ball I could have selected.  If there is a white ball left in the urn, then I could have equally likely have selected that one.  I don’t know which situation I am in, of course, but it is (or rather was) apparently equivalent to the situation that the contestant is in a Reverse Monty Hall game.

And then I wrote about it …

So, now you know how I got to the point that I was at when I posted The Reverse Monty Hall Problem, being pretty much convinced that an answer that the vast majority of mathematicians are certain is the correct answer must be wrong.

Soon I will try to summarise why I was wrong, in what way I was wrong, why so many could not convince me that I was wrong and why something quite short and apparently innocuous eventually convinced me that I was wrong.