Mark:
CORRIDORS
Oct 13
I appear stuck in a time machine.
X AND Y
no - consider the distribution:
P(1) = 2/3
P(-2) = 1/3
P(X+Y is negative) = 5/9
5/9 or 4/9 who cares.
The answer is no. Consider the random variables that take the positive value 1/p with probability p, and the negative value -1/q with probability q=1-p (thus the mean is 0). Since we know that the variables are more likely to be positive than to be negative, we know that p > 1/2 > q, thus 1/p - 1/q < 0. Therefore, for the sum X+Y to be positive, both variables must be positive, X=Y=1/p, which happens with probability p*p, which does not have to be bigger that 1/2 when p > 1/2.
E.g., when p=2/3, P(X+Y>0) = 4/9 < 1/2.
((m - 1) & (- m - 1)) + 1 == m & -m
Both sides seem to be the largest power of 2 that divides m.
Both sides are equal to the largest power of 2 which divides m, call it M=M(m)=2r(m) where r(m) is the ruler function. To see this, write m in binary, then it ends with a 1 and some (possibly none) 0s (this 1 and these 0s are exactly the binary representation of M). -m, written in Two's Complement, is the same sequence inverted (i.e., 1 is replaced with 0 and 0 with 1) and 1 added, i.e., it ends with the same number of 0s as m (which should not be too surprising since, obviously, M(-m)=M(m)), thus, when you take m & -m, you get M. Similar logic works for the left hand side as well.
JUST FOR FUN
almonds - true
butterflies - true
A couple is determined to have at least one son and at least one daughter. What is the expected total number of children they will have
You have two (2) identical glass balls and a 100-storey building. If you drop such a ball from the a certain floor, it might break (obviously, if it breaks when dropped from the ith floor, it will also break when dropped from all floors above it.
You have to find such a floor that the balls do not break when dropped from the floors below it, but do break when dropped from it and floors above it. You may expend both balls.
What is the minimum number of drops you will have to make
There are 1000 lockers (all locked) and 1000 kids, who lock the unlocked lockers and unlock the locked ones.
The first kid touches (i.e., opens) each locker. The second kid touches (i.e., locks) all even lockers.
The third kid touches (i.e., opens the locked ones and closes the unlocked ones) all lockers with number divisible by 3.
The fourth kid touches the lockers number 4, 8, 12 etc. After the 1000th kid locks (or unlocks, if it was locked already) the locker number 1000, how many lockers are open
TRUE or FALSE
February 1865 is the only month in recorded history not to have a full moon.
In the last 4,000 years, no new animals have been domesticated.
If the population of China walked past you, in single file, the line would never end because of the rate of reproduction.
If you are an average American, in your whole life, you will spend an average of 6 months waiting at red lights.
It's impossible to sneeze with your eyes open.
Leonardo Da Vinci invented the scissors.