Well, this is one of the recurring problems we've probably all seen, time and time again, with various "obvious!"-style solutions as well as a nice wall of text explaining away the paradoxes by claiming that it was all a case of confusing phrasing -- with an inspiredly sneaky re-expression of the problem, the paradox dissolves! However, there is more or less no true escape from the true Mathematics of this problem. Wikipedia has a nice and technical exposition on the various "solutions" and solutions of the paradox, and equally sneaky reformulations of the problem to expose the holes in the "solutions". You should read it if you actually want a formal explanation, but I believe mine follows the Wikipedia article somewhat faithfully, up to at least somewhere in the middle.
The first thing to state is the question in a text-wall format, so that we can demolish it later for clearer insight. Well, here I go: Two envelopes are on a table. One contains twice as much money as the other, and there is no way to tell the contents of the envelope until you open it. You choose one, taking extreme caution not to open it (and cleverly avoid revealing the contents of the other as well, you sneaky person). You think to yourself: If I open this envelope and find X dollars, then the other envelope could contain X/2 dollars or 2X dollars. Those two outcomes have equal chance, since I pick either the larger or the smaller (contentwise) envelope randomly. My expectation of money in the other envelope is hence 5X/4 dollars. This does not make sense, since the expectation of money in my envelope is now also 5Y/4 dollars, where Y is the amount contained in the other envelope. We get X=25/16*X. That's depressing, since it solves to 0. :( In my depression, I claim a paradox!
Well well, not the most accurate formulation of the problem, but at least somewhat intelligible. Now I shall point out an interesting feature of this problem which is usually ignored in discussion for being somewhat impossible to prove -- Consider, in a train of thought very far removed from the original paragraph, the following paradox: "X is 1. X is 2. Therefore 1=2. Contradiction?!". This is clearly a matter for the logicians out there to name. I'd personally file it under the classification of "Lies" and trash it. But, the thing is... our problem seems self-consistent... up till the paradox. So now let's rephrase it without the envelopes:
I pick a number (call it X), and map IDs #1 and #2 randomly to the two positive numbers X and 2X. Now, you pick either #1 or #2 and we define the number it maps to be Y. Now the other number could either be Y/2 or 2Y with equal probability, and the expectation is 5Y/4. The problem statement is clearly sound, since these are more or less mathematical formulations, and if a contradiction exists, the subject would fall apart and all I learnt in school would be totally useless!!!!! We therefore call it a confusing argument and try to explain it away.
Clearer (albeit somewhat spoilt by the ending). So now for "solution" 1. We notice that Y can either be X or 2X. As such, Y is inconsistently defined. We therefore redefine it in terms of X and 2X and it all works out to an expectation of 3X/2. The world is saved!
Clearly this violates the principle of the matter. It's like saying: "Why don't I get dough when I mix flour with kerosene?" and answering it with "Everything is well if you just buy the dough directly from the supermarket, you twit. After all, they've derived the dough from flour as well.". This resolves the paradox by more or less ignoring it, so let's just make the paradox more annoying and harder to sidestep:
Both the number mapped from #1 and #2 have equal expectations by symmetry, and the smaller of which is further defined to be a random positive real number. You pick #1. It maps to X. Now, the expectation of the value of #2 is (X/2 + 2X)/2=5X/4, since the probabilities of the pairs [X/2,X] and [X,2X] are equally probable. The problem is: the expectation of the other number is always higher than your no matter what it is, so on average, knowing a number causes the other number's expectation to be 5X/4, which is 5/4 times its own expectation. Based on that, before you even know what #1 maps to (ok call it f(1), and similarly define f(2) -- this is getting tedious), you know that f(2) is on average 5/4*f(1). OMG contradiction!
The resolution for this is a one-liner (Note: see Zagier's one sentence proof for an idea of how a mathematical line might look): X*5/4=X, where X is the cardinality of positive real numbers (commonly known as infinity, though not the only infinity). Well the thing is that since positive reals stretch indefinitely, the chance of choosing a finite number is infinitesimal. And for infinities, the statement f(1)=5/4*f(1) can make perfect sense.
One last sneaky trick to throw in (and a solid text wall to help obfuscate matters just that little bit more):
"We shall now be so nice, going out of the way to help you define just a specific case of the problem, and we'll even babysit you by stating precisely how we chose the numbers. More formally, we shall enlighten you as to the probability distribution of the amounts in the envelopes. We have an old friend here, called Mr. Fair Coin, who is a truly erratic fellow at the best of times and completely random at the worst of times. Now, we all know that Charles Dickens once famously said "It was the best of times, it was the worst of times", but you see, truly erratic and completely random are consistent with each other, so you're not getting a paradox for free. We first choose the smaller number by setting it as 1, and then tossing Mr. Fair Coin until he lands on his head (that clumsy fellow!). For each toss where he does not land on his head, we double the value of our numbers (the charitability in me!). Oh and I unconsciously neglected to mention, since it was so banally trivial, that since Mr Fair Coin is so fair, he does not have a preference to landing on heads, nor does he have a preference to landing on tails, and is most assuredly not inclined to land on sides, but lands on one of the three with equal probability. Then we double our number to generate the second number."
--Awkward seconds pass--
"That's quite close to a random number generator, isn't it?"
Disregarding the disconnect in common sense, he makes a fair point. Let's list the argument in point form:
P1.1: If the number you choose turns out to be 1, the other is 2, which is truthfully larger than 1.
P1.2: If the number you choose turns out not to be 1, but instead is X, the expectation is 3/5*X/2 + 2/5*2X = 11X/10. The other number is expected to be larger anyway!.
P1.conclusion: CE[f(2)]>f(1) for all possible values of f(1), where CE denotes conditional expectation.
P2: The chance of f(1) being infinite is limit (2/3)^n as n --> infinity = 0. Therefore f(1) is finite, and CE[f(2)] is finite as well. Therefore the previous argument regarding infinities does not hold.
Final resolution (for this post): (highlight for spoilers below)
The number of real numbers between 0 and 1 is a humongously huge infinity, infinitely (lol) greater than the number of positive integers. If we were to pick a random number from 0 to 1, therefore, the probability that it is any particular number is in fact 0. But this does not mean that it is impossible, i.e. P(A)=0 does not mean A is impossible, since the number randomly generated from the first try between 0 and 1 will have occurred, despite having 0 probability of occurring.
Wednesday, October 9, 2013
Sunday, August 4, 2013
Shame
[Sente "benzoicacid"]
[Gote "sszx"]
[Date "2013.08.04"]
[Event "?"]
[Round "-"]
[Result "1-0"]
[SenteGrade "1162"] (me)
[GoteGrade "1289"]
1. P2g-2f P3c-3d 2. P2f-2e B2b-3c 3. P7g-7f P4c-4d 4. S7i-6h R8b-4b 5. S6h-7g
K5a-6b 6. P9g-9f P9c-9d 7. S7g-6f G4a-5b 8. B8h-7g S3a-3b 9. B7g-6h S3b-4c 10.
P9f-9e P9dx9e 11. L9ix9e P*9c 12. N8i-7g S7a-8b 13. P5g-5f R4b-2b 14. K5i-4h
P4d-4e 15. P4g-4f P4ex4f 16. B6hx4f S4c-5d 17. S6f-5e R2b-4b 18. P*4g G6a-7b
19. S5ex5d P5cx5d 20. P2e-2d P2cx2d 21. B4fx2d R4b-2b 22. B2dx3c+ R2bx2h+ 23.
S3ix2h R*9h 24. G6i-5h N2ax3c 25. R*2a S*5a 26. B*4d K6b-6a 27. N7g-6e B*8d 28.
K4h-3h G7b-6b 29. S*5c P7c-7d 30. S5cx5b+ G6bx5b 31. N6e-5c+ K6a-7b 32. +N5cx5b
N3c-4e 33. R2ax5a+ N4e-5g+ 34. +N5b-6b K7b-7c 35. G*7b K7c-6d 36. +N6bx6c
K6d-6e 37. S*6f B8dx6f 38. P6gx6f K6ex7f 39. P6f-6e P*6f 40. +R5ax5d +N5gx5h
41. +R5dx7d K7f-6g 42. B*8i P*7h 43. B8ix9h +N5hx4i 44. B4dx6f K6gx6f 45. R*6h
P*6g 46. G*7g K6fx5f 47. G7gx6g K5f-4e 48. P4g-4f K4e-3e 49. P3g-3f K3e-2e 50.
N2i-3g K2e-2d 51. K3hx4i S*4g 52. P3f-3e K2dx3e 53. G6g-5g S*4h 54. R6hx4h
S4gx4h+ 55. K4ix4h R*6h 56. N*5h R6h-6i+ 57. P*3f K3e-2f 58. S*3e P3dx3e 59.
+R7d-2d 1-0
[Gote "sszx"]
[Date "2013.08.04"]
[Event "?"]
[Round "-"]
[Result "1-0"]
[SenteGrade "1162"] (me)
[GoteGrade "1289"]
1. P2g-2f P3c-3d 2. P2f-2e B2b-3c 3. P7g-7f P4c-4d 4. S7i-6h R8b-4b 5. S6h-7g
K5a-6b 6. P9g-9f P9c-9d 7. S7g-6f G4a-5b 8. B8h-7g S3a-3b 9. B7g-6h S3b-4c 10.
P9f-9e P9dx9e 11. L9ix9e P*9c 12. N8i-7g S7a-8b 13. P5g-5f R4b-2b 14. K5i-4h
P4d-4e 15. P4g-4f P4ex4f 16. B6hx4f S4c-5d 17. S6f-5e R2b-4b 18. P*4g G6a-7b
19. S5ex5d P5cx5d 20. P2e-2d P2cx2d 21. B4fx2d R4b-2b 22. B2dx3c+ R2bx2h+ 23.
S3ix2h R*9h 24. G6i-5h N2ax3c 25. R*2a S*5a 26. B*4d K6b-6a 27. N7g-6e B*8d 28.
K4h-3h G7b-6b 29. S*5c P7c-7d 30. S5cx5b+ G6bx5b 31. N6e-5c+ K6a-7b 32. +N5cx5b
N3c-4e 33. R2ax5a+ N4e-5g+ 34. +N5b-6b K7b-7c 35. G*7b K7c-6d 36. +N6bx6c
K6d-6e 37. S*6f B8dx6f 38. P6gx6f K6ex7f 39. P6f-6e P*6f 40. +R5ax5d +N5gx5h
41. +R5dx7d K7f-6g 42. B*8i P*7h 43. B8ix9h +N5hx4i 44. B4dx6f K6gx6f 45. R*6h
P*6g 46. G*7g K6fx5f 47. G7gx6g K5f-4e 48. P4g-4f K4e-3e 49. P3g-3f K3e-2e 50.
N2i-3g K2e-2d 51. K3hx4i S*4g 52. P3f-3e K2dx3e 53. G6g-5g S*4h 54. R6hx4h
S4gx4h+ 55. K4ix4h R*6h 56. N*5h R6h-6i+ 57. P*3f K3e-2f 58. S*3e P3dx3e 59.
+R7d-2d 1-0
Sunday, July 7, 2013
Wednesday, June 12, 2013
Saturday, May 25, 2013
Sunday, May 12, 2013
xkcd what if?
First of all, if you haven't been reading xkcd, I recommend you start reading it soon! It's an awesome webcomic, perfect for people who actually bother to research on the multitude of references inside, ranging from movies to quantum physics!
Next of all (after you've convinced yourself of the worth of reading the main strip of comics), do check out the sideline series of articles by the same author (Randall Munroe) "what if?".
Today's article will randomly make comments on the 44th what if? issue: High Throw. Here's the link: http://what-if.xkcd.com/44/ . I'm not of the opinion that what if? is substandard. In fact, I do think it's awesome and enjoy reading it. But that shouldn't stop me from commenting about it and trying my very best to poke loopholes... right? :)
Quote: "A timing error of half a millisecond in either direction is enough to cause the ball to miss the strike zone... To put that in perspective, it takes about five milliseconds for the fastest nerve impulse to travel the length of the arm."
Comment: This might have something to do with systematic errors being cancelled out: since the time to throw the baseball is determined beforehand by the pitcher, possibly in the brain (and if it's reflexive enough maybe part of it is generated in the spine), there is a fixed amount of delay between giving the signal to swing the arm around and the signal to release the ball in order to hit the strike zone, and this is possibly learned through trial and error, since nobody is THAT good when they were first introduced to baseball. An example of a similar phenomenon can be observed when timing the timespan between two of the same events with no warning (eg. 2 lightning flashes), where the reaction times tend to cancel each other out almost completely (In my experience, my reaction time varies less than 0.03 seconds when doing the "drop a ruler to find out reaction time" test, whereas my reaction time is close to 0.2 seconds. Note that this is still out of the 0.5 millisecond range mentioned by about 3 times. Maybe that's why I don't play baseball.)
Quote:"But we could also sidestep the whole problem by using a device like this one:
It could be a springboard, a greased chute, or even a dangling sling—..."
Comment: This is actually unlikely to be efficient. The first problem is that the entry angle is unlikely to be sufficiently exact for it to just slide up as depicted in the picture. It's likely to bounce around a bit, which tends to lose energy quite well. The second difficulty to overcome is, as in most physics problems, friction. No I'm not talking about air resistance, that has already been (somehow) accounted for in the what if? comic. I'm talking about friction with the deflector. Firstly, let's talk about an instantaneous deflector (eg. a stiff, hard 45-degrees-to-horizontal board). This will cause a great big bounce, which loses energy according to the coefficient of restitution (COR). "Generally, the COR is thought to be independent of collision speed...(except when collision speeds are in the range of 1cm/second)". The highest permissible COR for a tennis ball, according to the international Table Tennis Federation, is about 0.92, on a standard steel block (Wikipedia). This means that about 8% of the energy is lost in one bounce, or about 8% of the height is lost (with an uncertainty of a factor of 2, considering air resistance). This is close to half a giraffe of height. For a baseball, this is likely to be much more, although to be fair, colliding with a board at 45 degrees will probably lessen the impact.
The second kind of energy loss through friction with the velocity converter is the friction that comes when the ball slides along the (for brevity) chute. Usually, when dealing with such dynamic (or kinetic) friction, we can use a formula:
"The coefficient of friction (COF), often symbolized by the Greek letter ยต, is a dimensionless scalar value which describes the ratio of the force of friction between two bodies and the force pressing them together." -- Wikipedia, yes again.
Lubricated steel on steel has a coefficient of 0.16, again from Wikipedia (what a glaring testimonial to the unreliability of this article!). So, where does the normal force come from? It turns out that there has to be normal force acting on the ball, since it changes its velocity, and hence this means it accelerates, and using the standard F=ma, we can see that the Kinetic friction is Fric= ma = m(v^2/r), where r is the radius of the chute (Yes that's the formula for centripetal acceleration). So how much energy is lost? We shall make the simplifying estimate that velocity is somewhat constant throughout the ride (else it would be a bad idea anyway). We get:
Work done (against friction) = 2(pi)m*v^2
Well, not quite. After all, can't the ball roll? (The coefficient for rolling friction tends to be a lot lower, which is why cars are even remotely efficient) Turns out that even if it rolls, it won't go as high anyway, because the kinetic energy will be converted into rotational kinetic energy, which doesn't really cause the ball to go higher. (Note that this is in particular because it is a ball; projectiles such as bullets are typically given spin so that they stabilise in an aerodynamic position, a phenomenon known as the gyroscopic effect)
As an aside, note that r is not quite the radius of the chute (I lied.). r is actually the difference between the chute and the ball (Details are left as an exercise to the reader, but rest assured everything tends to cancel out.). There is an interesting special case, which will probably lead to the discussion of a bounce, which I shall not discuss due to its theoretical complexity (i.e. r=0.). And I've been using ".)." too often (Right.).
Yet another point he neglected to discuss (probably too boring) was whether we could thin out the air resistance, for example by climbing to the top of Mount Everest, where the air is thinner (minus some power to account for altitude sickness), or possibly from a hovering helicopter even higher up (Baseball probably would instantly fall downwards from the downwash of the helicopter's rotors or just plainly crash into it).
And one last thing: I don't get the caption for the last comic drawing.
Sunday, May 5, 2013
Runescape skills and their applicability to real life
To start off, I just checked the skills present in Runescape, having unconsciously drifted away from the game for quite some time. As it turns out, the f2p (free to play) world has recently gotten access to p2p (pay to play, aka members) skills up to level 5. This isn't a very significant level, but it is a significant step in the expansion of f2p, since updates to the f2p world are as rare as my blog posts. It turns out there are 25 skills, namely *draws deep breath* Attack, Defence, Strength, Constitution, Ranged, Prayer, Magic, Cooking, Woodcutting, Fletching, Fishing, Firemaking, Crafting, Smithing, Mining, Hebrlore, Agility, Thieving, Slayer, Farming, Runecrafting, Hunter, Construction, Summoning and Dungeoneering.
That's a lot to process.
Firstly, I will begin with a few observations on those skills which will eventually save me time.
Observation 1: Dungeoneering and slayer are very forced skills, i.e. skills for the sake of having more skills.
Observation 2: There are a few almost exclusively combat skills, which can be lumped together to save discussion. These are Attack, Defence, Strength, Constitution and Ranged (as well as the combative part of Magic, but hey, Magic is a dual-purpose beast).
Observation 3: Runecrafting is... specific. Let's disregard this for the sake of a glimmer of hope at conciseness.
So we shall begin with the resource gathering skill. Ah... still uncomfortably many: woodcutting, fishing, mining. Out of these, woodcutting and mining are ridiculously industrialised, and are unlikely to be useful unless you happen to work in one of aforementioned industries. Fishing, on the other hand, is an incredibly useful skill, as I have found out personally. It is one of the most effective ways of countering boredom I know, boasting one of the highest used time to productivity ratio. And unlike staring at chess puzzles, people actually pretend to understand why you're doing it.
Next up, resource processing, the monstrous group of skills. This includes: Cooking, Fletching, Crafting, Smithing, Herblore and Construction. We shall do this in a list form, as any prose will result in an unwieldy paragraph that I have learned to shun.
Cooking: One of the useful skills in life, with applications starting from preparing instant noodles, which can save precious seconds and snag you the unbuyable you never wanted! (See: Neopets restocking) This obviously extends to more complex procedures such as barbeques when you happen to be stranded in a forest! (This has been happening surprisingly often to me; sadly I have yet to acquire such mighty levels of this skill)
Fletching: Another important form of entertainment in abovementioned stranded-in-forest situation. Note: Suitable arrows may actually be tougher to find, would do good to prepare those before getting stranded.
Crafting: The rings I know best are tend to exhibit resonance. I shall pass upon detailed discussion.
Smithing: Despite the apparently relation to fletching, smithing is not a viable option due to the disappointing lack of workable metals in forests. Tools may also be disgustingly unimprovisable.
Herblore: Definitely a useful skill, from forest survival to staying awake mugging the dynamics of Neopets using the power of ginseng (anecdotally proven to work).
Construction: Useful insofar as it relates to making a DIY computer. Speaking of which, it might be time to borrow skills from certain friends to improve on this artefact of a computer (a.k.a. mine). Further uses of this include the design of fantastic physical contraptions to do work such as strategically hold down a specific key on your keyboard for various sneaky purposes ranging from games such as Anti-Idle: The Game to Guitar Hero III (TTFAF intro anyone?)
Next up: combat. As somebody who is low in attack, strength and defence (and ranged too, unless it's badminton), I must say I do prefer agility.
This leaves a mere handful of skills that I have left out, probably by accident: Firemaking, Thieving, Farming, Summoning and Prayer, and last but not least, Magic.
Firemaking: This blog does not advocate arson.
Thieving: This blog does not advocate theft of any physical sort, but *borrowing* puzzles, ideas and questions are always encouraged. After all, information is a public good, defined as one which is non-rivalrous and (to a large extent) non-excludable.
Summoning and Prayer: Prayer can be useful in a wide variety of situations, ranging from international chess to chinese chess to shogi to RJT chess to even unexpected niches such as reversi, Go, Connect Five, Transfer Chess and even crazy things like double board RJT chess! (Do try: you'd probably be too befuddled to regret it!). Also, in a last-ditch attempt to make this post remotely relevant, we shall offer a last-minute prayer and invoke the spirit of U+3374 to offer us insights on the uses of magic.
Magic: Coming next^x *next* Thursday, where 1<=x<=3 is a positive integer.
That's a lot to process.
Firstly, I will begin with a few observations on those skills which will eventually save me time.
Observation 1: Dungeoneering and slayer are very forced skills, i.e. skills for the sake of having more skills.
Observation 2: There are a few almost exclusively combat skills, which can be lumped together to save discussion. These are Attack, Defence, Strength, Constitution and Ranged (as well as the combative part of Magic, but hey, Magic is a dual-purpose beast).
Observation 3: Runecrafting is... specific. Let's disregard this for the sake of a glimmer of hope at conciseness.
So we shall begin with the resource gathering skill. Ah... still uncomfortably many: woodcutting, fishing, mining. Out of these, woodcutting and mining are ridiculously industrialised, and are unlikely to be useful unless you happen to work in one of aforementioned industries. Fishing, on the other hand, is an incredibly useful skill, as I have found out personally. It is one of the most effective ways of countering boredom I know, boasting one of the highest used time to productivity ratio. And unlike staring at chess puzzles, people actually pretend to understand why you're doing it.
Next up, resource processing, the monstrous group of skills. This includes: Cooking, Fletching, Crafting, Smithing, Herblore and Construction. We shall do this in a list form, as any prose will result in an unwieldy paragraph that I have learned to shun.
Cooking: One of the useful skills in life, with applications starting from preparing instant noodles, which can save precious seconds and snag you the unbuyable you never wanted! (See: Neopets restocking) This obviously extends to more complex procedures such as barbeques when you happen to be stranded in a forest! (This has been happening surprisingly often to me; sadly I have yet to acquire such mighty levels of this skill)
Fletching: Another important form of entertainment in abovementioned stranded-in-forest situation. Note: Suitable arrows may actually be tougher to find, would do good to prepare those before getting stranded.
Crafting: The rings I know best are tend to exhibit resonance. I shall pass upon detailed discussion.
Smithing: Despite the apparently relation to fletching, smithing is not a viable option due to the disappointing lack of workable metals in forests. Tools may also be disgustingly unimprovisable.
Herblore: Definitely a useful skill, from forest survival to staying awake mugging the dynamics of Neopets using the power of ginseng (anecdotally proven to work).
Construction: Useful insofar as it relates to making a DIY computer. Speaking of which, it might be time to borrow skills from certain friends to improve on this artefact of a computer (a.k.a. mine). Further uses of this include the design of fantastic physical contraptions to do work such as strategically hold down a specific key on your keyboard for various sneaky purposes ranging from games such as Anti-Idle: The Game to Guitar Hero III (TTFAF intro anyone?)
Next up: combat. As somebody who is low in attack, strength and defence (and ranged too, unless it's badminton), I must say I do prefer agility.
This leaves a mere handful of skills that I have left out, probably by accident: Firemaking, Thieving, Farming, Summoning and Prayer, and last but not least, Magic.
Firemaking: This blog does not advocate arson.
Thieving: This blog does not advocate theft of any physical sort, but *borrowing* puzzles, ideas and questions are always encouraged. After all, information is a public good, defined as one which is non-rivalrous and (to a large extent) non-excludable.
Summoning and Prayer: Prayer can be useful in a wide variety of situations, ranging from international chess to chinese chess to shogi to RJT chess to even unexpected niches such as reversi, Go, Connect Five, Transfer Chess and even crazy things like double board RJT chess! (Do try: you'd probably be too befuddled to regret it!). Also, in a last-ditch attempt to make this post remotely relevant, we shall offer a last-minute prayer and invoke the spirit of U+3374 to offer us insights on the uses of magic.
Magic: Coming next^x *next* Thursday, where 1<=x<=3 is a positive integer.
Subscribe to:
Posts (Atom)