Jump to content
BrainDen.com - Brain Teasers

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/12 in all areas

  1. Everyone thinks I look semi-spherical. But that's just how I roll.
    4 points
  2. Seems like I'm going to need loads of Rit to keep me from just mod-killing everyone out of frustration that inevitably follows curr3nt like an obediant puppy.
    3 points
  3. This is what we in the mafia world call the "curr3nt effect".
    2 points
  4. One time, I got late to school because I was searching my closet for Narnia.
    2 points
  5. Most people who meet me think I'm a sweet and innocent young girl, but that's just how I fool them into trusting me. That way, when I carry out my various nefarious plots, no one suspects me.
    2 points
  6. I was not the last to sign in .. i just chose that nr ... for what good it did me .. but no worries .. i have never died N1 before.. so it was also an experience i liked to have.. and the ghost thread as well.. it's good knowing everything.. but it's bad that you cannot tell , or SHOUT!!
    2 points
  7. I'll smile as long as it's sunny I'll cry as long as it rains With smiles I'll greet you Whenever I meet you As long as it's snowing Or windy and blowing And the dark is as long as its day
    2 points
  8. I believe Miki is hiding something, but that's just how I think because I play mafia a bit.
    1 point
  9. What nefarious plots?
    1 point
  10. 1 point
  11. I always put my butter on the top of my toast but that's just how I have done it all my life.
    1 point
  12. Minecraft has creepers.
    1 point
  13. Your simulation is flawed, specifically at the point where you query if( family.Child1 || family.Child2 ) The 'or' condition encapsulates the condition that the family has at least one girl, but it does not encapsulate the restriction that once a girl has been observed, we need to definitively assign this girl as "sibling #1" or "sibling #2". Consider the corrected code, which honours the constraint that the observed child must be either child 1 or child 2 (I wrote it in javascript, and you can run it by simply pasting it into a site such as this one: (function() { var BOY = 0, GIRL = 1; var FIRST = 0, SECOND = 1; var second_girls = 0, second_boys = 0; for( var i = 0; i < 100000; i++ ) { var family = { child1: Math.random() < 0.5 ? BOY : GIRL, child2: Math.random() < 0.5 ? BOY : GIRL }; var child_we_happen_to_see = Math.random() < 0.5 ? FIRST : SECOND; var gender_of_child_we_see = (child_we_happen_to_see == FIRST) ? family.child1 : family.child2; if( gender_of_child_we_see == BOY ) continue; /* this is our conditioning; omit any trial where a boy is observed */ var gender_of_other_child = (child_we_happen_to_see == FIRST) ? family.child2 : family.child1; if( gender_of_other_child == BOY ) second_boys++; else second_girls++; } alert( "Number of boys is " + second_boys + ".\n" + "Number of girls is " + second_girls + ". This is " + (new Number( 100*second_girls/(second_girls + second_boys))).toFixed( 2 ) + '%.' ); })(); In my run, I get "Number of boys is 25020. Number of girls is 24799. This is 49.78%." This makes intuitive sense. The number of included trials is approx. 50,000--all those cases where we happened upon a family and happened to observe a girl child with them. And of those families, approximately half have a boy as the second child. I believe somebody mentioned this earlier, but an excellent analog that helps make sense of "why you need to constrain the observed child to either child 1 or child 2" is called the "Gambler's Ruin" problem. Consider I have two boxes, A and B. I tell you that there is some non-zero amount of money in the boxes, and that one box contains exactly twice the amount of money as the other one. But I don't tell you which one is which. Suppose you pick box A. It has some unknown amount of money, X, in it. But then you think: wait a minute, there's a 50% chance that box B has twice as much money, or 2X, and a 50% chance that it has half as much money, or X/2. So if we calculate the expected value for the amount of money in box B we get E(B) = 0.5*(2X) + 0.5*(X/2) = 1.25X Or, roughly 25% more money than in box A. So we decide to swap. But now we let our (slightly larger) amount of money be X and the same logic applies to swapping back to box A. Hence, by simply swapping A with B again and again, we can make our amount of money grow to infinity! We're rich! Of course, we can disprove this fallacy by honouring the "our box must be only one of either A or B" constraint. That is, the calculation E(B) = 0.5*(2X) + 0.5*(X/2) assumes that the box we're holding is in a fuzzy state of simultaneously being both the greater AND the lesser money box (X/2 is only valid if the former is true, and 2X is only valid if the latter is true). In the same way, "if( family.Child1 || family.Child2 )" assumes the child we've observed is in a fuzzy state of simultaneously being both the first AND second child. But it has to be one or the other.
    1 point
  14. First off.... THE CAKE IS NOT A LIE. Secondly... You lost the game. Thirldy.... *shot* Crap. We're screwed. CURR. HOW DARE YOU LIE. 'Sup? Fourthly.... If weekends are scum, I'm good. Let the mafia begin!!! Okay, I'm done now.
    1 point
  15. 1 point
  16. 1 point
  17. I know absolutely nothing about any of these teams... but seeing the Panthers... yeah, couldn't help myself As for the others - I like hawks, and vikings seem stupid... there you go, my amazing logic ++ Carolina Panthers + Seattle Seahawks -- Minnesota Vikings NFC TEAMS Green Bay Packers - 19 Carolina Panthers - 18 Washington Redskins - 17 Seattle Seahawks - 16 Atlanta Falcons - 16 Arizona Cardinals - 15 Chicago Bears - 15 Detroit Lions - 15 New Orleans Saints - 15 New York Giants - 15 Philadelphia Eagles - 15 St. Louis Rams - 15 San Francisco 49ers - 15 Dallas Cowboys - 14 Minnesota Vikings - 9 Tampa Bay Buccaneers - 9
    1 point
  18. That is correct, EDM!
    1 point
  19. Again...lemme remind you that...eh, nvm... Ok, back to work...*runs off to Narnia*...
    1 point
  20. what about the tazer?... But that's just how I realized that everyone's out to get me... :help:
    1 point
  21. Eh? Prepare to throw reason out the window. It no longer applies. . .
    1 point
  22. Let mine be one more vote for itsclueless's correct (also, rational ) answer. The probability of the "other child" being a girl is 1/2. The answer offered by brainden.com is incorrect, and even the cusory consideration that observing one sibling changes the probability of the other's gender should set off red flags in people's minds. The proof that I give to people is as follows: The two facts we know are: two children have been born (fact A) at least child is female (fact B) Fact A gives us the four possible populations (male/female configurations): M-M M-F F-M F-F It then also seems logical to eliminate any combination where at least one female is not present (i.e. M-M), leaving, M-F F-M F-F and then concluding a 67% probability of 2M and 1F. The problem is that these three remaining combinations are not equally likely. That is, we've botched the application of Bayes' rule. The correct approach is to start with as our four equally-likely populations: M-M M-F F-M F-F We now sample randomly from one of these four possible populations. We sample a 'F'. (This sampling process is completely equivalent to the statement "there is at least one female in the population". No more and no less information is gained.) Since we know the a priori probabilities of each of the four configurations (populations) and the probability of sampling an F given each configuration, Bayes' rule tells us what the (conditional) probability of each configuration is after we've observed an 'F'. I turns out that prob( M-M ) = 0, as expected (i.e. you can't sample a male from female-only population), but for the remaining three, prob( M-F ) = 1/4 prob( F-M ) = 1/4 prob( F-F ) = 1/2 Or stated more intuitively: the fact that we sampled a female member gives us a higher probability that we sampled it from a female-rich population. In this case, the probability of the F-F config is exactly the same as the combined probabilities of the F-M and M-F configs, giving 50%/50% as expected. Hence, to summarize, we started out with four populations of equal a priori probability: M-M : probability 1/4 M-F : probability 1/4 F-M : probability 1/4 F-F : probability 1/4 We observed that at least one of the two children is female, which, through a straightforward application of Bayes' rule, yields our post-observation probabilities: M-M : probability 0 M-F : probability 1/4 F-M : probability 1/4 F-F : probability 1/2 In configurations 2 and 3, the "other child" is always male. In configuration 4 (which is twice as likely given our observation), the "other child" is always female. Hence: probability( second child is male ) = 1/4 + 1/4 = 1/2 probability( second child is female ) = 1/2 = 1/2 Q.E.D.
    1 point
  23. Correction. Let h(k,m) be the height that can be handled with k eggs and up to m drops. Above I used a recursion of h(k,n) = h(k,n-1) + h(k-1,m) when I should have used a slightly different formula. Let the base at any time be the highest known safe floor. With k eggs and m drops left we can afford to skip h(k-1,m-1) floors and do our next drop at base + h(k-1,m-1) + 1. When an egg breaks the base remains the same and both k and m decrease by 1. If the egg doesn't break, increase the base by h(k-1,m-1) + 1 and then decrease just m by 1. h(1,m) = m where start dropping at the lowest floor and work upwards one at a time. h(2,m) = (m-1)+1 + (m-2)+1 + ... + (m-m)+1 = SUM of m, m-1, m-2, ...1 = m(m+1) / 2 h(3,m) = (m-1)m/2 +1 + (m-2)(m-1)/2+1 + ... = SUM (1/2)j^2 - (1/2)j +1 for j from 1 to m and we get (1/12)m(m+1)(2m+1) - (1/4)m(m+1) + m = (1/6)(m^3 -m) + m = (1/6)(m-1)m(m+1) + m. so 8 is not enough bu 9 drops would let us go as high as 120 + 9 which is enough.
    1 point
  24. WHAT WAS THAT? I COULDN'T HEAR YOU OVER MY SHOUTING!!!!!
    1 point
  25. Alright. Who wants to come to my party?
    1 point
×
×
  • Create New...