iggymyniggyNonsense and Imbecility
themoosum
read my profile
sign my guestbook

Visit themoosum's Xanga Site!

Name: John
Country: United States
State: California
Birthday: 12/9/1984
Gender: Male


Interests: origami, tai chi, politics, and ice-skating
Expertise: not being there for at least another forty minutes
Occupation: Military
Industry: Entertainment


Message: message meEmail: email me
Website: visit my website
AIM: themoosum


Member Since: 4/17/2004

SubscriptionsSites I Read

Blogrings
UC Berkeley Bears 2007
previous - random - next

Cal Foothill 2003
previous - random - next

UC Berkeley
previous - random - next


Posting Calendar

|<< oldest | newest >>|
view all weblog archives

Get Involved!

Suggest a link

Recommend to friend

Create a site


Monday, October 13, 2008

Here's a couple probability problems I created recently.  I don't claim that they're particularly good, but they did manage to stump some smart people.

First, from late June...

Define n and k as positive integers.  Suppose you have a poolcontaining infinite painted balls of n colors, each ball paintedexactly one color, such that the probability of randomly drawing eachone color is equal to the probability of randomly drawing each otherone color .  Suppose you draw k balls from this pool at random, withthe k balls now constituting pool K.

Now, let's define two different types of drawing a ball from apool.  To perform a Ryazanov draw, take one ball from the pool atrandom and do not return it.  This type is named for Dima Ryazanov'sinsistence on keeping anything he can get his hands on.  Each Ryazanovdraw reduces by one the number of balls in the pool.

To perform a Dingus draw, take one ball from the pool at random,then return it to the pool.  This type is named for Dingusman'stendency to reject whatever he encounters.  Each Dingus draw preservesthe balls in the pool.

Find the probability of drawing the same color twice 1) for twoRyazanov draws from pool K and 2) for two Dingus draws from pool K.

And then, the answer:

Well, a few people responded with correctsolutions, and some others responded with not-so-correct solutions--butfor the most part, people didn't respond at all.    Anyway, here'smy take on it.  You may be surprised that I required so littlecomputation in reaching my conclusions.  But remember what I said--thisproblem tests concepts.  The key is to trust the principles ofprobability and not get bogged down in specific, unnecessarycalculations.

1) For the Ryazanov draws, since pool K israndomly selected and has no interaction with balls once they are drawnfrom it, we should question whether pool K has any relevance to thisscenario.  In fact, it does not.  If you draw k balls at random fromthe infinite pool, and then two balls at random from those, it isequivalent to drawing two balls at random from the infinite pool.  Inthis case, indifference dictates that the probability of drawing a ballof a certain color is simply 1/n, so the probability that the secondRyazanov draw yields the same color as the first is 1/n.  The Ryazanovdraw scenario does not depend on k, except by being undefined when k=1.

2)  For the Dingus draws, the probability of a second drawyielding the same color as the first is increased due to the fact thatthe ball drawn first may possibly be drawn again.  On the secondDingus draw, we have pool K consisting of 1 ball that was previouslydrawn and k-1 balls that were not.  The probability of drawing thepreviously drawn ball is 1/k, in which case the probability of the twodraws yielding the same color is 1.  The probability of drawing one ofthe other balls is (k-1)/k; these have no special relation to the balldrawn on the first Dingus draw, so the probability of a color match inthis case is 1/n as for the Ryazanov draws.  Putting this together, theprobability of the second Dingus draw (actually, the second drawdoesn't even have to be Dingus) yielding a ball of the same color asthe first Dingus draw is (1/k)*1+(k-1)/k*(1/n), or 1/k+(k-1)/(kn).  Wecan also rearrange this expression in the following suggestive way: 1/k+(k-1)/(kn)=n/(kn)+(k-1)/(kn)=(n-1+k)/(kn)=((n-1)/n)*(1/k)+1/n. Now it may be interesting to study some limiting cases.  When k=1, thecolor match probability is 1, since the same ball is necessarily drawnboth times.  As k approaches infinity, the probability approaches 1/n,as it is with the Ryazanov draws.  This also makes sense, since as kapproaches infinity, the probability of drawing the first ball on thesecond draw approaches zero--i.e., the Dingus draw's redrawingadvantage diminishes as k grows, and it decays into a Ryazanov draw. When n=1, the probability is 1--obviously, if there's only one color,all draws will be of the same color.  And lastly, as n approachesinfinity, the probability approaches 1/k--if each ball is uniquelycolored, the only way to draw the same color both times is to draw thesame ball both times.

Looks pretty nifty!

And here's one from a week ago:

greetingsall.  I made up another probability problem that some of you mightenjoy.  as always, it is pretty conceptual, with minimal computationrequired.  if you want to see my answer, let me know; otherwise, I'llsend it to everyone in a few days (of course, a lot of you will figureit out on your own and may think of improvements to make it moreinteresting--keep me posted).
 
anyway, say you have a fair, n-faced die.  to help us keeporganized, let's say each face is uniquely identified by an integerfrom 1 to n, so we have face 1, face 2, etc., all the way up to facen.  also, we are given two positive integers, j and k, such that j+k isless than n.  lastly, there is an integer m which is greater than j+kand less than or equal to n.
 
okay, here's the question:  suppose you roll the die an infinitenumber of times.  given that the first time you roll face m comes afteryou have already rolled each face from face 1 to face j at least once,what is the probability that you have also rolled each face from facej+1 to face j+k at least once when this first roll of face m occurs?

And the answer:

as before, there were some rightanswers and some wrong ones, but mostly just silence.    I know, Iknow--this is probably more interesting to me than anyone else. anyway, please let me know if you agree with this solution (assumingyou read it) and if you have any suggestions or observations.  I wouldbe grateful.  :-*
 
so, I think we can solve thisproblem easily if we have a couple basic insights.  the first insightis that n doesn't matter as long as it's bigger than j+k.  we are onlyconsidering the occurrence of faces 1 through j+k and face m relativeto each other; all the other faces are merely spectators.  the presenceof more or fewer additional faces will affect the absolute probabilityof a given face coming up, but not the probability of that face comingup relative to the probability of other faces within the subset we havechosen to consider.

the second thing is that we can further simplify our investigationby realizing that we only have to consider the first instance of eachface.  so, for example, face 3 comes up one or more times before thefirst face 5 if and only if the first face 3 comes up before the firstface 5--the two situations are equivalent.  therefore, we are examiningpermutations of j+1 or j+k+1 elements:  the first instance of face 1,the first instance of face 2, the first instance of face 3, all the wayup to the first instance of face j or j+k, and also the first instanceof face m.  now, to consider the j+1 case, we have j+1 faces, each ofwhich is equally likely to come up on a given roll.  therefore, wecannot make any argument that the first instance of one face is morelikely to occupy any particular position than the first instance of anyother face.  the question we are asking is, what is the probabilitythat the first face m occurs after the first instances of all the otherj faces?  well, face m will have the same chance of this as the other jfaces; that's j+1 probabilities, all equal to each other and summingto 1 (since one of them necessarily comes last), so the sought afterprobability is 1/(j+1); and in the j+k+1 case, 1/(j+k+1).

now then, the probability of a occurring, given that b hasoccurred, is the probability of both a and b occurring divided by theprobability of b occurring (this becomes particularly clear byconsidering the equation with both sides multiplied by thedenominator).  so the probability that the first instance of face mfollows the first instances of faces j+1 through j+k, given that itfollows the first instances of faces 1 through j, is 1/(j+k+1) dividedby 1/(j+1), which works out to (j+1)/(j+k+1), our answer.
 
this makes good sense--the largerj is, the more information we have to suggest that face m first appearslate in the sequence, which in turn increases the probability thatother faces will have come up before it as well; and indeed,(j+1)/(j+k+1) grows as j grows, reaching some maximum that depends onk.  this all seems straightforward, but it actually leads to someconclusions that may be counterintuitive.  for instance, if we have asix-faced die, and we are given that face 3 first comes up after face 1has already come up, what is the probability that face 2 has alsoalready come up?  one might be tempted to say 1/2 by the principal ofindifference or something, whereas the correct probability is(1+1)/(1+1+1)=2/3.  then again, 1/2 is clearly screwy if you take it toits "logical" extreme:  the chance of any given number appearing afterthe other five would be 1/2^5=1/32, meaning the probability that thereeven is a last face is only 3/16--utter garbage, though biblicalscholars and professional wrestling fans may appreciate the reference. so I don't know, perhaps the correct answer is also the more intuitiveone.  the lesson learned, if there is one:  don't assume independence!





Friday, September 19, 2008

Here's another e-mail thread, possibly of some interest.

Me: 
hey friends,

recently someone asked me for a riddle, and so I started to describe one dima told me and datskosman a while back, and as I did this, I realized that it's not totally airtight.  okay, the riddle, in brief, is as follows:  a dead, naked guy is found in the middle of the desert, with some clothes strewn about (corresponding to more than one person), and a piece of straw near his hand.  there are no tire tracks or footprints.  what happened?  the answer:  he and some other people were in a hot-air balloon that was starting to sink.  desperate to stay afloat, they first threw their clothes overboard and, when that failed, drew straws to decide who would jump.  when I first heard this, I was focused enough on the riddle aspects to not worry about the physical details, but now I've been thinking.  the problem as stated is vague enough that it cannot technically be unsound; however, I am skeptical that it would have actually been necessary to jettison a passenger (unless it was dingusman).

consider:  your velocity after a constant acceleration a over a distance h works out to (2ah)^(1/2).  if we are talking about falling to the earth, a will of course be g, 9.8 m/s^2--this corresponds to the case where your weight pulls you downward and there are no other forces.  but that is not what happens here, because the weight of the passengers is partially countered by the buoyant force of the hot-air balloon.  now evidently this buoyancy is not enough, but it must be fairly close, if tossing one person is enough to keep the balloon afloat.  just how close is a matter of some importance.  let's say that the balloon is 2000 meters up, and the passengers observe that after one minute of sinking, they are proceeding downward at the somewhat disconcerting rate of .6 m/s.  how bad is this really?  well, the acceleration is .01 m/s^2, and the velocity at the bottom would thus be (2*.01*2000)^.5=6.3 m/s.  this is equivalent to the landing speed from a fall of about two meters--it wouldn't be comfortable, but everyone should survive, perhaps with no injuries.  of course, larger-but-still-small accelerations would eventually necessitate ejection, but it's a tough call to make.  were the passengers making precise measurements?  or did they just decide to err sort of on the side of caution?  it's been bugging me.

I also just remembered another funny thing dima said.  after he'd explained his riddle, the conversation turned to parachutes and terminal velocity, a rather unrelated issue.  dima correctly pointed out that even with a parachute, one hits the earth fairly hard.  in fact, he said, a skydiver with a correctly functioning parachute will strike the earth with a speed equivalent to having fallen from a height of four units of distance.  when we heard dima's units, george and I did a bit of a double-take--surely he meant four feet, which seemed logical.  a fall from four feet would be challenging yet manageable.  but dima insisted on the figure he thought he'd heard.  not four feet.  four stories.

Dima: 
A few comments...
1) I never mentioned clothes - you kinda made that up, and I'm pretty sure they wouldn't have made a difference
2) What do your calculations mean? They show that in one specific situation, they will land ok. Well, suppose that was with three people. Add a fourth person, and see how that affects the velocity. But of course you won't be able to calculate that - you'll have to deal with the buoyant force of the balloon (which is probably decreasing with time), air resistance, and so on, and you simply don't have enough information here.
3) The terminal velocity of the parachute - that was something I heard "back in the USSR" - so it might not be very accurate here and now. (And it might not have been accurate to begin with.)

Me: 
uncle dimasman,
 
I am sorry if I have offended you in any way.  I know I have been teasing you a little bit lately, but this e-mail was sincere.  the thing about falling from four stories--that was just a funny thing to say, and it so happens that you're the one who said it.  but it doesn't mean anything about you personally.  everyone on this list (even frank, who hardly knows you, and kieran, who doesn't know you at all) is aware of your vast intellectual powers, and I would never attempt to call them into question.  as for the clothes, I was pretty sure you said that, but perhaps I am mistaken.  it wouldn't be the first time my brain inserted nudity into an anecdote that did not initially include it.  there are, however, versions of this riddle floating around online that mention the clothes part.  in any case, throwing them out would make a small difference--anything would--but probably not enough of a difference to make a difference, if you will.
 
regarding number 2:  actually, we can make some pretty good guesses about a lot of this stuff.  one theme of my e-mail is that this sort of problem can be enriching if you're willing to delve into details.  the buoyant force should actually increase with time, due to the increasing density of the atmosphere.  any air resistance would also favor the passengers, but I think both of these effects would be pretty slight.  one important unknown is why the balloon is inadequate--if it has been torn to shreds by shrapnel, then yeah, everyone is screwed.  but since we are dealing with a problem that can apparently be remedied by ejecting one person, I am assuming it is a relatively small, stable disability.  the scenario you allude to, with three people vs. four people--I don't dispute this.  yeah, let's say the basket and apparatus are equivalent to about two people, and let's say that with three people, buoyancy and weight just cancel out.  add a fourth person, and your downward acceleration is g/6, which is certainly intolerable for any meaningful height.  I did not intend to claim that sacrificing a passenger is automatically unneccesary, just that there are perfectly plausible scenarios where it's unneccessary.  in particular, the situation as often described online (and even in your account, as I recall it, though I may be wrong) indicates that any unstoppable downward movement automatically spells doom.  and that definitely isn't the case.  this is a quantitative matter, not a qualitative one, and while the g/6 acceleration would be obviously hopeless, there are plenty of smaller accelerations, near the threshold of tolerability, that would call for detailed analysis.  I just wonder if people in this situation would actually try to make the measurements and calculations, or if they'd play it safe by tossing the most annoying passenger.  I guess I should probably avoid hot-air balloon rides with you guys. 


Monday, May 26, 2008

Oh, one other thing before I forget.  I think you should all check out Ragnus's livejournal:

http://ragnus.livejournal.com/


This entry is particularly good.


Okay, okay.  I know those thread excerpts I just posted were long and rambling.  Actually, I genuinely believe that some of the material buried in there is interesting, but I have to be realistic:  Probably no one wants to read all that.  I apologize. 

This next e-mail (and the last, for now) is a return to classic moosum.  It's a reply to a self-described "cyber-tin-man" who sent me a long, complicated message in which he analyzed my humor scientifically.

Me, May 24th:

Thank you, Mr. Besher.  I read your message, and then read it again, just to make sure.  Well done!  You have out-Bertinetti'd the Bertinetti himself.  I firmly agree with everything you said, especially the parts I did not understand.  And I am glad to see that someone is actually thinking about humor, instead of just briefly submitting to that respiratory spasm known as laughter and then moving on.   Analyzing humor from social, philosophical, logical, and mathematical perspectives is a worthwhile task, as you clearly realize.  I have enjoyed the fruits of your rumination, Alexander. I now invite you to enjoy mine.
 
First, humor often arises from statements that are clearly false yet follow quite logically from whatever is being said, so much so that we might accept them almost automatically if we are not paying close enough attention.  We are also likely to be amused by that which we do not expect, even if it has no salient comedic intent.  This latter tendency may explain the oft-observed phenomenon of movie audiences laughing uproariously at the sudden, tragic death of a central character.

Another sure-fire way to be funny is by making cultural references.  Any mention of a well-known person, event, or location is automatically hilarious.  This explains why Family Guy is the funniest show in all history.  Oh, did I mention that sarcasm is funny?    

There is also a different kind of referential humor that does not draw on external entities.  A joke may derive its humor from a reference to itself--indeed, if there is absolutely no other content, the reference can be to the very fact of referencing.  Naturally, you cannot understand this recursive brand of humor without first understanding this recursive brand of humor; but skeptics take note:  This sentence is funny.

Anyway, Mr. Besher, you have proven that you are much funnier than a tin man, even a tin man shaped like Woody Allen who juggles pecan pies in the Oval Office while Jimmy Stewart plays the musical saw--as an eventual episode of Family Guy will surely demonstrate.



Here's Part II of the recycled e-mail series.  Yi Ding never replied, which was a big disappointment.

Me, May 8th: 
I was thinking about something today, inspired by a real-life situation I have often been in.  so, let's say you and two friends go to a restaurant and sit at a booth with a two-person bench on either side.  no matter what, two people will end up on one side and one person on the other.  let's assume (and we should all agree on this) that sharing a bench is undesirable, and let's identify people in this situation as "screwed."  now, two people will always be screwed, and one person not screwed, so the total screwedness probability is always 200%; but how it is distributed among the three friends varies based on whether or not they sit randomly.  let's start with the non-random scenario.  friend 1 chooses a side.  friend 2 automatically chooses the other side.  whichever side friend 3 chooses, he's screwed.  meanwhile, 1 and 2 each have an equal chance of being joined by 3.  so that's a 50% chance of being screwed for 1 and 2, and 100% for 3.  now, let's assume that, instead, all friends sit randomly.  this time, friend 2 has a 50% chance of sitting on the same bench as friend 1, leaving the other bench empty.  in that case, friend 3 must take the empty bench, so he only has a 50% chance of being screwed this time.  meanwhile, friends 1 and 2 have a 50% chance of being screwed by friend 2 as above, and even when that doesn't happen, there's still the usual 50% chance for each of being joined by 3.  so 1 and 2 each have a 50%+50%*50%=75% chance of being screwed in the random scenario.  thus, while friend 3 has the highest chance of being screwed when people behave non-randomly, random behavior actually gives him the lowest chance--lower than, and not merely equal to, that of 1 and 2.
 
what interests me here is how a position (in this case, being the third person to sit down in a four-person booth) that is disadvantageous when people are making intelligent decisions actually becomes advantageous when the decisions are random.  it leads me to wonder if the guy who has appeared to "beat the odds" in more complex scenarios--and whose unlikely success we credit to brilliant decision-making--actually didn't do anything meaningful and merely profited by the fact that everyone else's decisions were just as random and uninformed as his own.  I invite everyone to comment on this, or share other examples you think of.  presumably, the most insightful response will come from the almighty dingusman.

Me, May 10th:  a concerned citizen recently expressed doubts about my method of assigning probabilities.  for the "random" scenario, I claim friend 2 is as likely to take the bench with one open seat as he is the bench with two open seats.  this may distress those who are drawing analogies to gas molecules and chambers with different volumes, but I think that human "randomness" still has a certain order to it, and that direct analogies to thermodynamics are not valid.  so I guess I was wrong to use the word "random" without explaining myself.  read on:
- Hide quoted text -


under the random condition, I am assigning probability as a function of seating direction rather than available number of seats.  here are the assumptions:  first, the probability of sitting in a bench with two people is 0, because that bench is full; second, the probability of sitting in a bench with one person (under the random condition) is the same as the probability of sitting in a bench with no person.  according to this second assumption, the probability of a bench's occupation is not proportional to the number of available seats it has.  this may be controversial, but I think it can be defended.  we must keep in mind that we are dealing with organisms subject to psychological impulses and not just physical ones.  consider an analogy.  suppose someone is facing north with open doorways of equal area facing east and west.  one doorway leads to a square room of wall length 10 m; the other leads to a square room of wall length 10.5 m.  now, if this person were a hydrogen molecule, then he would indeed be more likely to end up in the larger room, simply because that room contains more space for a molecule to exist in.  but I don't think we would find this for a human being--I think the prejudice favoring the larger room would be imperceptible or nonexistent.  the human would turn one direction or the other, enter the room before him, and stay there.  presumably, whether he is right-handed or left-handed would have more influence over his decision than anything else.  or maybe he would glance at both rooms before making a decision, but he wouldn't perceive a size difference and wouldn't care enough to make a rigorous measurement, so he would end up choosing randomly anyway.  or maybe he would call out "hello" into each room and see which gave a louder echo--this would depend on which length, 10.5 m or 10 m, is closer to an integral multiple of the wavelength of that speaker's voice, something varying from person to person and certainly not favoring 10.5 m over 10 m.  we can conceive of numerous factors that might influence the person's room choice, none of which give preference to the larger room.  so they should all "balance out," so to speak, and I think if we tried this experiment on a million people (half the time with the larger room on the left, and half the time with the larger room on the right, to rule out the handedness effects--which I suspect would be more noticeable than anything else), we would not find a statistically significant difference between the respective frequencies of large room and small room occupation.
 
my point here is that random human behavior is not quite the same as random thermodynamic behavior--the random human will still make decisions grounded in some kind of logic, just a logic that is irrelevant, inadequate, or false.  a person standing in an airport would never randomly fly to a city by rolling around and bouncing against walls until he landed inside an airplane.  however, he might make a "random decision" by flying to a city that he had seen a photo of the day before, or that starts with the same letter as his first name, or something equally silly.  returning to the original question, I propose the following mechanism for booth bench entry in the random scenario.  the booths in the restaurant are laid out so that one accesses them from the side; there's not enough room to come in from behind or something.  so, friend 1 has just entered the booth, and now friend 2 is approaching it.  to access one bench, he would rotate his body a little to one side; to access the other bench, he would rotate his body a little to the other side.  I propose that he makes this minor rotation "at random"--based on handedness, or which path seems less obstructed at that moment, or something else we cannot very well predict that does not relate to the actual seating situation in the booths.  once he arrives at a bench, he stays there.  he doesn't bounce about the three possible seats, as a gas molecule would--under which circumstances the empty bench would indeed enjoy a 2-to-1 advantage.  instead, he remains faithful to the decision he made when he first rotated his body.
 
here's another analogy I just thought of (sorry to be so long-winded) which may help this seem sensible.  suppose you balance a ball perfectly on top of a crest that slopes down symmetrically on either side.  on one side is one single hole; on the other side are two holes.  now suppose you perturb this system so that the ball will roll down; where will it end up?  we might say it has a 1/3 chance of going into each hole, but this is an oversimplification.  it has a 1/2 chance of going down either side.  that means 1/2 for the single hole, and 1/4 for each of the holes on the other side.  the key feature here is that the ball will take a committal, irreversible step--rolling down the slope under the influence of gravity--that immediately determines which set of holes it can reach (a set of two on the one side, or one on the other).  it is the sets whose probabilities are equal, not individual holes.  so, comparing the ball and crest to the restaurant booth scenario, I am considering heading towards one booth or the other to be a committal, irreversible step, where human resistance to causelessly undoing an action (even a weakly motivated action, as in this case) plays the role of gravity, and where the two-seat bench is like the pair of holes, essentially functioning as a single entity in the decision-making.

I guess the most controversial aspect of my analysis is this so-called "human randomness."  humans never behave in a truly random way.  however, they make decisions that are essentially random in that they use criteria which cannot possibly optimize anything important.  recall my airport example.  what I am arguing in the restaurant booth case is that, for the "random" scenario (in which we bar the friends from recognizing the detrimental effect a neighbor has on one's dining experience), the human tendency will be to perceive two sides as basically equivalent, regardless of properties that might seem more significant from a strictly physical standpoint, and to choose based on criteria which treat the two sides equally.  I was discussing this with a friend, and he proposed the following situation:  if there is a one-seat bench on one side of a table, and a 100-seat bench on the other, do I really think a person is as likely to sit on the one-seater as on the 100-seater?  I told him I wasn't sure, but that I was sure of this:  his chances of sitting on the small bench are definitely much greater than 1/101.  and I firmly believe that.

admittedly, much of what I have said rests on unproven assumptions about human psychology--though I'm willing to bet they're mostly correct.  when I wrote my initial message it hadn't occurred to me that perhaps this is more of an experimental rather than theoretical matter...



Next 5 >>