PDA

View Full Version : Quantitative Interview questions/answers


Pages : [1] 2

Andy
01-28-2007, 03:03 PM
1. Find x if x^{x^{x^{\ldots}}}=2

2. Find all real and complex root of x^6=64

3. The hour and minute hands of a clock meet at 12'oclock. When will be the first time they meet again ?
Answer: After 1 hour, 5 minutes 27.2727 seconds

4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?

5. A unit length is broken off into 3 pieces. What is the probability of them forming a triangle ?

6. Calculate \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}}
Answer: 2

7. There are 14 identical-looking balls. 13 of them have the same weight while one of them is heavier than the rest. What is the minimum times you can weight to identify the heaviest ball ? How do you generalize for n balls ?
Answer: With 3 weights, I can identify the heaviest ball. For n balls, I can identify the heaviest ball after x times where x is the largest integer such that 2^x \leq n

Christian
01-28-2007, 09:51 PM
For number three I got after 1 hour, 6 minutes and 27 seconds.. Any
other takers?

How much time do they give you to work out these problems? Are you allowed a pen and paper?

Andy
01-28-2007, 10:03 PM
For number three I got after 1 hour, 6 minutes and 27 seconds.. Any other takers?
After checking my calculation again, I have 1h 5m 27.27s. It's from 3927.272727... seconds. Probably you have the same number.
How much time do they give you to work out these problems? Are you allowed a pen and paper?
You have pencil and the answer sheet so people calculated mentally or scribbled anywhere they could . On average, you have 1.5-2 minutes for each question.

Christian
01-28-2007, 10:54 PM
I'm just curious, how did you approach this problem?

Andy
01-28-2007, 11:49 PM
I'm just curious, how did you approach this problem?
Here is how I approached this:
The minute hand will run a full circle in 1 hour. By then, the hour hand will be at 1. Then the minute hand will run pass 1 (meaning 5 minutes) and it will meet the hour hand somewhere after that.
This will give me a quick estimate of when they meet. The first time they meet is sometime after 1 hour 5 minutes. To find the exact time is simple calculation:
The distant the minute hand travels in t seconds will be the sum of 1 full circle and the distant the hour hand travels in t seconds. Solve for t to find t= 3927.2727...=1 hour 5 minutes 27.27 seconds

RussianMike
02-18-2007, 09:54 PM
Hi,

Not sure if anyone will ever ask this but my dad told me about this one and I thought I'd share:

You have an equation:

VIII - VII = VII

How do you change one of the "sticks" to make this correct?

V would be 2 sticks and I is 1 stick.

Lemme know what you think and if you can solve it.
:D

Andy
02-18-2007, 10:19 PM
How about moving the last I of VIII and put it under the minus sign ;)
This becomes VII = VII =VII

woody
02-19-2007, 01:00 AM
Are you sure it's not VIII - VII = VI ? 'cause then you could just make it XIII - VII = VI.

bob
02-20-2007, 01:46 PM
1. Find x if x^{x^{x^{\ldots}}}=2
Answer: x=e^{\sqrt{2}}


No, the answer to this is x=\sqrt{2}

a=x^{x^{\ldots}}=2

ln(x^{x^{\ldots}}) = ln2

x^{x^{\ldots}}lnx = ln2

a lnx = ln2

2lnx = ln2

lnx = \frac{1}{2}ln2

lnx = ln\sqrt{2}

x = \sqrt{2}

Andy
02-20-2007, 01:54 PM
No, the answer to this is x=\sqrt{2}

You are correct, thanks Bob. Fixed the answer. :)

I get rid of ln on the left side but forgot about ln on the right side. If you can, please take a look at other questions as well.

pardasani
02-20-2007, 02:36 PM
4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?
Answer: 1/2 or 50%

5. A unit length is broken off into 3 pieces. What is the probability of them forming a triangle ?
Answer: 1/8 or 12.5%


--> I think there is a slight discreepancy here .... the solutions to question 4 and question 5 here must be related as ans Q5 = 1 - ans Q4

the way i think about it is as .... we know that 3 randomly choosen line segments will form a triangle IFF the sum of any 2 sides is greater than the 3rd side....

Think of choosing points on a circle as breaking up a line segment --- choosing 3 points on a semi circle gives you 3 line segments..... if 3 of them lie on the same side of a semi circle ==> the sum of 2 of them is smaller than the third one => they cannot make a triangle....

Andy
02-20-2007, 03:32 PM
the way i think about it is as .... we know that 3 randomly choosen line segments will form a triangle IFF the sum of any 2 sides is greater than the 3rd side....
Correct. Since the sides are from a unit length, we can calculate that any side of the triangle must be strictly less than 1/2. The prob that the length of each stick being less than 1/2 is 50% and this condition must hold for all three of them. Hence I have 1/8

Think of choosing points on a circle as breaking up a line segment --- choosing 3 points on a semi circle gives you 3 line segments..... if 3 of them lie on the same side of a semi circle ==> the sum of 2 of them is smaller than the third one => they cannot make a triangle....
Not totally convinced they are related or merely coincidence but I thought of the semi-circle as follow:
Any two points on a circle will be on the same semi-circle (just connect one point to the center, the second point must be on one of the two semi-circles. Pick the one that contains two points). The problem now becomes finding the probability that the third point is on that same semi-circle. There are only 2 semi-circles to begin with so the chance is 50%

Welcome any opinions since with 1,2 minutes to come up with an answer, there are pretty good chance that I may have big holes in my reasonings. I hope to learn from my mistakes and not to repeat them again in future occasions.

Yan He
02-20-2007, 03:36 PM
One more question looking for answer:

A man speaks the truth 3 out of 4 times. He throws a die and reports it to
be a 6. What is the probability of it being a 6?
--

Andy
02-20-2007, 03:41 PM
One more question looking for answer:

A man speaks the truth 3 out of 4 times. He throws a die and reports it to be a 6. What is the probability of it being a 6?
--
My feeling is 1/8 or 12.5% of it being a 6

pardasani
02-20-2007, 04:27 PM
Correct. Since the sides are from a unit length, we can calculate that any side of the triangle must be strictly less than 1/2. The prob that the length of each stick being less than 1/2 is 50% and this condition must hold for all three of them. Hence I have 1/8


Well I dont think its that straight forward.... For starters you did not satify the condition that the sum of the 3 sides add up to 1.... In probablity terms you are using that picking up these lenghts is an independant event, whereas it is not : they are related by a constraint equantion.... for eg, consider 0.4, 0.1, 0.1 --> it satisfies your conditions...


Not totally convinced they are related or merely coincidence


well i thought about it once more, and I am preety much convinced that the triangle question, and this circle question is indeed the same issue... think about it as this way.... after all there is nothing sacred about "a unit length"....

consider a circle whose circumference is of "unit length" whatever that may be...

Now pick any 3 points on this circle ----> its equivalent to cutting the "unit length" into 3 pieces.... saying that they "lie on the same side of the semicircle" says you cannot make a triangle out of it.....


but I thought of the semi-circle as follow:
Any two points on a circle will be on the same semi-circle (just connect one point to the center, the second point must be on one of the two semi-circles. Pick the one that contains two points). The problem now becomes finding the probability that the third point is on that same semi-circle. There are only 2 semi-circles to begin with so the chance is 50%

I dont think I understand your point here....... The way I have interpreted the question is :-
" pick any 2 points on a circle ..... Now choose a third point.... what is the probability that the 3rd point will lie on the smaller arc"....

The way I started working on the problem was to choose 2 points at an angle theta ( 0<theta<180).... then calculate the probability of success given theta (I figured out that you need to break this into 2 parts theata < 90 and 90<theta <180 and then multiply the final result by 2)... and then you integrate wrt theta...

I believ the distribution of theta would be uniform between 0 and 360 .....

only problem, when i do this get a number > 1 :((

pardasani
02-20-2007, 04:31 PM
One more question looking for answer:

A man speaks the truth 3 out of 4 times. He throws a die and reports it to
be a 6. What is the probability of it being a 6?
--



Well I guess i did not understand the question..... if the question is
" what is the probability that it actually rolled 6 "

well in that case my pick of answer would be 1/6 assuming a fair die --> for me the actual result of the die and what the man reports you are independant of each other if the die is fair... hence 1/6

bob
02-20-2007, 04:40 PM
4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?
Answer: 1/2 or 50%

I'm pretty sure the correct answer to this one should be \frac{3}{4}.

EDIT:
...but it isn't.
I'm still not sure why, but a quick MC simulation has convinced me that I'm missing something here. I'll take a look at it again when my brain's working a little better.

Andy
02-20-2007, 04:54 PM
Well I dont think its that straight forward.... For starters you did not satify the condition that the sum of the 3 sides add up to 1....
I think I did
a+b > c \Leftrightarrow a+b+c > 2c \Leftrightarrow 1 > 2c \Leftrightarrow c < 1/2. Since c is arbitrary, we can get the same condition for a,b.

I dont think I understand your point here....... The way I have interpreted the question is :-
" pick any 2 points on a circle ..... Now choose a third point.... what is the probability that the 3rd point will lie on the smaller arc"....
This obviously a different question :)
Bob gave a pretty thorough writeup of his solution. I doubt I would be able to write that up in 1,2 minutes.

Andy
02-20-2007, 04:59 PM
well in that case my pick of answer would be 1/6 assuming a fair die --> for me the actual result of the die and what the man reports you are independant of each other if the die is fair... hence 1/6
Unless they throw smoke with the man's honesty (trick question), the way I read the question is that what is the probability of the man reports 6 if the dice being 6?

Dice being 6 is 1/6
Man reports 6 when he sees 6 is 3/4 so it goes 3/4 x 1/6 =1/8

Of course, we assume fair dice. If they are two independent events, then I agree it stays 1/6

pardasani
02-20-2007, 05:12 PM
I think I did
a+b > c \Leftrightarrow a+b+c > 2c \Leftrightarrow 1 > 2c \Leftrightarrow c < 1/2.

so far so good.... I agree with you completely so far.... What I am not sure is how can you treat choosing a, b, c independantly to come up with the answer ?

Andy
02-20-2007, 05:26 PM
so far so good.... I agree with you completely so far.... What I am not sure is how can you treat choosing a, b, c independantly to come up with the answer ?
It looks like I treat a,b,c independently but in hindsight, I still need the length contraint when it comes to finding out the exact length of c, knowing a,b. If not, i will run into the problem of 0.4, 0.1, 0.1 as you pointed out earlier.
Would you suggest this being 1/4 instead ? (I'm not interested in the answer but the thought process)

bob
02-21-2007, 12:16 AM
5. A unit length is broken off into 3 pieces. What is the probability of them forming a triangle ?
Answer: 1/8 or 12.5%


Actually, the answer here is \frac{1}{4}. It's easy to only consider half the possibilities when you work this one.

As Andy has said, this basically amounts to asking the question: Pick two points on the interval (0,1); what's the probability that none of the three resulting intervals is longer than \frac{1}{2}?

Consider first the circumstance where the first point--x_1--is on the interval (0,\frac{1}{2}). Where can we place the second point in order to make the desired result happen?

It's fairly clear that the interval (\frac{1}{2}, x_1 + \frac{1}{2}) is the answer to that question. This interval has length x_1. Thus, the probability of success, given x_1 < \frac{1}{2}, is x_1, since our second cut is uniformly distributed on (0,1).

The probability of success overall, then, is the integral of this probability over all choices of x_1 < \frac{1}{2}:
\int_0^{\frac{1}{2}}x_1dx_1 = \frac{1}{2}(\frac{1}{4}-0) = \frac{1}{8}

But remember that we started the problem under the constraint x_1 < \frac{1}{2}. Clearly, the problem is symmetric, so the probability of success with x_1 > \frac{1}{2} is the same again--\frac{1}{8}.

Altogether, then, the probability of success is \frac{1}{4}.

Andy
02-21-2007, 12:43 AM
Aha...looks like I'm going 0/2 this round :D

Thanks for the complete explaination, Bob. Given that you have your fair shares dealing with these kind of problems, everyone can benefit if you can kindly post similar brainteasers/quizzes here. The only requirement is that they can be solved in less than 5 minutes without a calculator ;)

Here is another question needs answer:

8. There are 100 identical looking balls, 50 red, 50 blue. How would you put them into 2 jars so that if you randomly pick one ball out of these 2 jars, the probability of picking red ball is larger than blue.

bob
02-21-2007, 01:08 AM
One more question looking for answer:

A man speaks the truth 3 out of 4 times. He throws a die and reports it to
be a 6. What is the probability of it being a 6?
--
Nifty question. My gut was to say that the answer here is \frac{1}{4}, since we're conditioning on the report of the roll, which gives us more information to work with. A closer look shows that this is a reasonable answer to the question, but not the only possible one....

This is actually a conditional probability:

P(rolls 6 | reports 6) = \frac{P(rolls 6, reports 6)}{P(reports 6)}

Here's where the assumptions begin to come in. For one thing, we assume that the roll and the decision to lie are independent; under this assumption, the numerator is easy:

P(rolls 6, reports 6) = P(rolls 6, tells the truth) = \frac{1}{6}*\frac{1}{4} = \frac{1}{24}

The denominator is trickier. This is where the biggest assumptions come in.

P(reports 6) = P(rolls 6, tells the truth) + P(rolls non-6, lies, reports 6)

We've already computed the first term, but how do we compute the second? We have to know something about how the person lies.

Are the person's lies always plausible? (That is, would the person lie by saying a 3.4 had been rolled, or a 529?) Given that they're always plausible, are they "fair?" (That is, is the person's lying strategy to choose a plausible lie at random with an equal probability of each lie, or is there some other distribution to the lies? Is the lie even random, aside from the initial throw of the die?)

For the sake of convenience, let's assume that, when the person lies, he or she does so by reporting some other plausible result at random, with equal probability of each lie. Then:

P(reports 6) = \frac{1}{24} + \frac{5}{6}*\frac{3}{4}*\frac{1}{5}=\frac{1}{24}+\frac{1}{8}=\frac{1}{6}

Overall, then:
P(rolls 6 | reports 6) = \frac{\frac{1}{24}}{\frac{1}{6}} = \frac{1}{4}, as expected.

For the sake of illustration, though, let's work the problem under a different lying strategy: suppose the person always says "6" when lying about a non-6. (We don't really care what he does when lying about a 6.) Then:

P(reports 6) = \frac{1}{24} + \frac{5}{6}*\frac{3}{4}*1 = \frac{1}{24} + \frac{5}{8} = \frac{2}{3}

Under this alternative assumption:

P(rolls 6 | reports 6) = \frac{\frac{1}{24}}{\frac{2}{3}} = \frac{1}{16}

As you can see, how you assume the person lies can have a rather dramatic impact on the answer....

bob
02-21-2007, 01:16 AM
Aha...looks like I'm going 0/2 this round :D

Thanks for the complete explaination, Bob. Given that you have your fair shares dealing with these kind of problems, everyone can benefit if you can kindly post similar brainteasers/quizzes here. The only requirement is that they can be solved in less than 5 minutes without a calculator ;)

Here is another question needs answer:

8. There are 100 identical looking balls, 50 red, 50 blue. How would you put them into 2 jars so that if you randomly pick one ball out of these 2 jars, the probability of picking red ball is larger than blue.
I've seen this question before. I assume the way we "randomly pick one ball out of these 2 jars" is first to select a jar at random, then select a ball at random from that jar.

In this case, you can get pretty close to making the probability of selecting a red ball \frac{3}{4}: Put a single red ball in one of the jars; put all the rest of the balls in the other jar. Then there's a \frac{1}{2} probability of getting a red ball just by selecting the jar, then a probability of \frac{49}{99}--nearly a half--of selecting a red ball even if you choose the other one.

A related question: How do we minimize the probability of selecting a red ball?

bob
02-21-2007, 01:28 AM
Two fun ones that are both pretty doable:

1. An airplane has N seats, and N passengers are waiting to board it, not in any particular order. Miraculously, everyone is assigned to a different seat on the airplane; however, the first passenger to board is a jerk and selects a seat at random. Thereafter, passengers board one at a time according to the following rule: If his or her assigned seat is vacant, the passenger sits there; otherwise, the passenger selects a vacant seat at random.

What's the probability that the last passenger to board gets his or her assigned seat?

2. We have two concentric circles. A chord of the larger circle is tangent to the smaller circle and has length 8. What's the area of the annulus--the region between the two circles?

Andy
02-21-2007, 01:43 AM
In this case, you can get pretty close to making the probability of selecting a red ball \frac{3}{4}
How you come up with 3/4, Bob ?
A related question: How do we minimize the probability of selecting a red ball?
Probably the same idea of maximizing red chance: by put one blue in one jar and the rest in the other jar ? then the probability of getting a red is 50/99, a bit more than half but less than 3/4. If I need to do better than that, then I first need to understand why you get 3/4 :)
1. An airplane has N seats, and N passengers are waiting to board it, not in any particular order. Miraculously, everyone is assigned to a different seat on the airplane; however, the first passenger to board is a jerk and selects a seat at random. Thereafter, passengers board one at a time according to the following rule: If his or her assigned seat is vacant, the passenger sits there; otherwise, the passenger selects a vacant seat at random.

What's the probability that the last passenger to board gets his or her assigned seat?
this sounds similar like asking what is the chance of that jerk randomly selects his assigned seat which is \frac{1}{N}. Once passenger nth where 1 < n < N got his assigned seat, the rest of them will get their assigned seats.
That the jerk who matters ;)
2. We have two concentric circles. A chord of the larger circle is tangent to the smaller circle and has length 8. What's the area of the annulus--the region between the two circles?
The area of the annulus is 16 \pi same as of the smaller circle.

bob
02-21-2007, 09:07 AM
How you come up with 3/4, Bob ?

Probably the same idea of maximizing red chance: by put one blue in one jar and the rest in the other jar ? then the probability of getting a red is 50/99, a bit more than half but less than 3/4. If I need to do better than that, then I first need to understand why you get 3/4 :)

If we select a jar first at random, then the probability that we select the jar containing only a red marble is 1/2. We will certainly draw red when we draw from this jar. Otherwise (probability 1/2), we select at random from the other jar, in which we have a probability of 49/99 of selecting a red marble. So:

P(red) = \frac{1}{2}*1 + \frac{1}{2}*\frac{49}{99} \approx \frac{1}{2} + \frac{1}{2}*\frac{1}{2} = \frac{1}{2} + \frac{1}{4} = \frac{3}{4}

If you're allowed to keep one jar empty, then the way you minimize the probability of choosing a red is to put all the marbles in one jar. Under those circumstances, the probability is \frac{1}{4}. If you're not allowed to have an empty jar, then the solution is as you suggest, and the probability is just a shade higher than that.

bob
02-21-2007, 09:12 AM
this sounds similar like asking what is the chance of that jerk randomly selects his assigned seat which is \frac{1}{N}. Once passenger nth where 1 < n < N got his assigned seat, the rest of them will get their assigned seats.
That the jerk who matters ;)

The area of the annulus is 16 \pi same as of the smaller circle.

You don't have the right answer to the airplane question.

As to the annulus question, your answer is correct--it's 16\pi--but the reasoning is not. In fact, one of the interesting things about this problem is that you can determine the area of the annulus, but not the radii of either circle: For any inner circle you choose, there's an outer circle that has a chord of length 8 tangent to the inner circle.

Andy
02-21-2007, 09:35 AM
If you're allowed to keep one jar empty, then the way you minimize the probability of choosing a red is to put all the marbles in one jar. Under those circumstances, the probability is \frac{1}{4}. If you're not allowed to have an empty jar, then the solution is as you suggest, and the probability is just a shade higher than that.
I see, I was aiming for the exact 3/4 ...:wall
So if empty jar is not allowed, I had 25/99 a bit better than 1/4 as you said.

Related question: what if we have x red balls and y blue balls. There should be a generalized method involving solving system of equations ?
You don't have the right answer to the airplane question.
Gotta work some more on it.
As to the annulus question, your answer is correct--it's 16\pi--but the reasoning is not. In fact, one of the interesting things about this problem is that you can determine the area of the annulus, but not the radii of either circle: For any inner circle you choose, there's an outer circle that has a chord of length 8 tangent to the inner circle.
Shooo. Probably we can find the ratio of radii but not the exact radii.

pardasani
02-21-2007, 11:19 AM
2. We have two concentric circles. A chord of the larger circle is tangent to the smaller circle and has length 8. What's the area of the annulus--the region between the two circles?


Well if the answer is 16 \pi isn't is just pythagoras theorem -- and indeed you cannot find the radii of either circle....

an interesting extension though might be to find the area of the annulus on the side of the division containing the smaller circle -- though my feeling is you will need more information to solve for that......

alain
02-21-2007, 12:09 PM
7. There are 14 identical-looking balls. 13 of them have the same weight while one of them is heavier than the rest. What is the minimum times you can weight to identify the heaviest ball ? How do you generalize for n balls ?
Answer: With 3 weights, I can identify the heaviest ball. For n balls, I can identify the heaviest ball after x times where x is the largest integer such that 2^x \leq n
I remember seeing this problem in an old Math Olympiad ('80s). The original problem was to find a false coin among 12 coins using a two dish weight scale. The false coin could be either heavier or lighter.
I think the reasoning is similar. There is an algorithm to find the solution. The premise of the algorithm is the following: if a coin goes up in one weigh and down in another, that coin is not false.

pardasani
02-21-2007, 12:14 PM
1. An airplane has N seats, and N passengers are waiting to board it, not in any particular order. Miraculously, everyone is assigned to a different seat on the airplane; however, the first passenger to board is a jerk and selects a seat at random. Thereafter, passengers board one at a time according to the following rule: If his or her assigned seat is vacant, the passenger sits there; otherwise, the passenger selects a vacant seat at random.

What's the probability that the last passenger to board gets his or her assigned seat?

Is the answer \frac{N-1}{N}

Here is how I approached the problem :--
Let P(N) be the probablity of success when we have N passengers...... Now we have 2 cases :-
1) the first passenger sits on his seat happens with a probability \frac{1}{N} ----- in this case everybody else will sit on his seat and hence the probability of success will be 1.
2) the first passenger DOES NOT sit in his seat happens with a probability \frac{N-1}{N} --- he sits on the seat of a person we can call person 2... Now when this person comes in its like he is the first one in, and he is sitting at random .... So we come up with a recurrence relationship like

P(N) = \frac{1}{N} + \frac{N-1}{N} P(N-1)
With a little bit of algebra it transforms to
P(N) = \frac{k}{N} + \frac{N-k}{N} P(N-k)

We have the boundary condition P(2) = 1/2 .... subistuting for P(2) and k=n-2 we get P(N) = \frac{N-1}{N}

pardasani
02-21-2007, 01:05 PM
Is the answer \frac{N-1}{N}

Just realized that the above approach is wrong, and this is the wrong answer !!!!

bob
02-21-2007, 01:28 PM
I'm pretty sure the correct answer to this one should be \frac{3}{4}.

EDIT:
...but it isn't.
I'm still not sure why, but a quick MC simulation has convinced me that I'm missing something here. I'll take a look at it again when my brain's working a little better.

It turns out that I was wrong...about being wrong. The MC simulation was the part that wasn't correct; my original reasoning was fine. The answer to this one is in fact \frac{3}{4}.

We pick the first point at random, but it's really arbitrary. We can always rotate the circle and make \theta_1=0.

Now choose the second point, and call the length of the minor arc between the first point and it \alpha. Now, clearly \alpha\epsilon(0,\pi) and is uniformly distributed. That is, P(\alpha=A) = \frac{1}{\pi} \forall A\epsilon(0,\pi).

If you draw yourself a picture, you can see that the length of the arc where \theta_3 can fall in order for all three points to be on the same semicircle is 2\pi-\alpha. Since \theta_3 is uniformly distributed, the probability of success given \alpha will be \frac{2\pi-\alpha}{2\pi}=1-\frac{\alpha}{2\pi}.

To find the total probability of success, we integrate:
\int1-\frac{\alpha}{2\pi}dP_\alpha=\int_0^\pi(1-\frac{\alpha}{2\pi})\frac{1}{\pi}d\alpha

The result of this integral is \frac{3}{4}.

jason korpics
02-21-2007, 02:27 PM
I believe the answer is 1/2. If the first person selects his own seat then everyone else sits in theirs and nth person thus gets their own seat. If the first person sits in seat n, then everyone else gets their own seat except the nth person (he/she inherits the first person's seat).

Along these lines, if the first person sits in seat x E{1,2,...n} then everyone up to person x sits in their own seat. If x then sits in seat 1, then everyone after x sits in their own seats and the nth person gets the nth seat. However, if x sits in seat 1, then everyone after x gets their own seat except for the nth person. He again inherits seat 1. Finally, if x sits in some other seat, say seat y where y>x, then everyone up until person y gets their own seat and we start this logic all over again for person y(choosing either seat 1 or seat n).

In all cases, the final person (person n) will get either their seat or seat 1. Try a permutation with 5 people.... Not sure mathematically how to approach, only logically. Any mathematical proofs of this would be nice :)

-JK

bob
02-21-2007, 03:17 PM
I believe the answer is 1/2. If the first person selects his own seat then everyone else sits in theirs and nth person thus gets their own seat. If the first person sits in seat n, then everyone else gets their own seat except the nth person (he/she inherits the first person's seat).

Along these lines, if the first person sits in seat x E{1,2,...n} then everyone up to person x sits in their own seat. If x then sits in seat 1, then everyone after x sits in their own seats and the nth person gets the nth seat. However, if x sits in seat 1, then everyone after x gets their own seat except for the nth person. He again inherits seat 1. Finally, if x sits in some other seat, say seat y where y>x, then everyone up until person y gets their own seat and we start this logic all over again for person y(choosing either seat 1 or seat n).

In all cases, the final person (person n) will get either their seat or seat 1. Try a permutation with 5 people.... Not sure mathematically how to approach, only logically. Any mathematical proofs of this would be nice :)

-JK
1/2 is correct, and your reasoning sounds pretty good to me. What makes it work is that there are only two ways the outcome can be finally decided: by someone randomly choosing the jerk's seat, or else randomly choosing the last passenger's seat. The likelihood of these two outcomes is the same at every stage of the process; the first leads to the passenger definitely getting his/her own seat, the second leads to the passenger definitely not getting his/her own seat.

You could dress the reasoning up with a proof by induction (show that it's 1/2 in the case N=2, then show that if it's 1/2 in the N-case, then it must be 1/2 in the N+1-case), but you have the kernel of why the answer is what it is.

Andy
02-21-2007, 03:32 PM
Here a few more fun and worth doing problems.

Question: Given arbitrary integer, come up with a rule to judge if it is divisible by 9. Prove it.

Question: Roll a penny around another fixed penny in the center with edges in close contact. After moving half circle around the center penny, you will find the penny in motion has rotated 360 deg. Why?

Question: very heavy wall moving at 60mph, a ball moving same direction at 120 mph. What is direction and speed of ball after ball hit wall.

Question: A square with four corners A,B,C,D. Suppose you start from corner A and have equal chance to go to neighboring corners B and D; After reaching new corner, you again have equal chance to go to its two neighboring corners. The time consumed to travel on each edge is 1, what is the mean time to come back to A.

Question: What is the properties of p^2-1 where p is prime number larger than 3

Question: A stair of 100 steps. You can either climb either one step or two steps but no more each time and you can walk up entire stair any way you like with rule above obeyed. How many possible combinations of ways to finish the walk?

Question: Given variances and covariance of X and Y. Z=a*X+b*Y. Calc variance of Z.

pardasani
02-21-2007, 04:22 PM
Question: very heavy wall moving at 60mph, a ball moving same direction at 120 mph. What is direction and speed of ball after ball hit wall.

Is the answer the ball stops?

Well lets change the reference plane, and sit on the wall....

In the reference plane of the wall, just before impact the ball was travelling towards it with a speed 60mph...

Assume no energy gets lost.... Also we are given that the wall is very heavy, and therefore it will not move as a result of this impact.... Since the wall does not move, and we need to conserve energy, the ball must be moving away from the wall, at the same speed at which it was approaching it...

ie in the reference of the wall the ball is moving away at 60 mph...

But the wall itself is moving at 60 mph wrt to the reference observor.... so the ball must be stationary with respect to the reference observor...

pardasani
02-21-2007, 04:32 PM
Here a few more fun and worth doing problems.

Question: Given arbitrary integer, come up with a rule to judge if it is divisible by 9. Prove it.


I am sure the rule says that the if the digits of the number are dn dn-1 d1 d0 then the sum of the digits must be divisible by 9....

Here is an attempt at the proof :--

Number is dn dn-1 d1 d0 where each of d0 - d9 is between 0 and 9
number = d0 + 10*d1 + 100*d2 + 1000*d3 + .....
= (d0+ d1 + d2 + d3 + .....) + 9 d1 + 99d2 + 999 d3 + ..........
= (sum of the digits) + 9 (d1 + 11d2 + 111d3 + ......)

Now the second term above is divisible by 9, and for the complete number to be divisible by 9 the sum of digits must be divisible by 9...

I guess the same proof works for divisibility by 3....

Andy
02-21-2007, 04:45 PM
Is the answer the ball stops?
This reminds me of Physics 101 where we learn about velocity, relative speed, momentum. Before hitting the wall, the ball moves at 60mph relative to the wall. After hitting, it moves back with -60mph relative to the wall so the ball will stay still relative to the wall.

As you pointed out, SP, it depends on the reference point. If you sit on the wall or move with the speed of the wall, the ball will stop relative to you. If you stands on the ground, the ball will move with the same speed and direction as the wall i.e 60mph in the same direction as before.

I don't have answers to any of these questions but I believe this is the correct answer for this specific question.

pardasani
02-21-2007, 05:05 PM
Question: A square with four corners A,B,C,D. Suppose you start from corner A and have equal chance to go to neighboring corners B and D; After reaching new corner, you again have equal chance to go to its two neighboring corners. The time consumed to travel on each edge is 1, what is the mean time to come back to A.
Another guess by me :--2

here is the working...
the first thing to realize is that at each odd step the ball is at B or D and at each even step the ball is at A or C.... The ball can be at A only at even time steps -- 2, 4, 6 ......

Lets see the probability of the ball coming back to A at time step 2k .... what this means is that at steps 2, 4, 6,.., 2(k-1) steps the ball choose to go to corner C, and at tiem step it chooses to go to A ... the net probability is therefore (1/2) ^ k ..

Hence the expected value is Summation \sum \frac{2k}{2^k} where k (1, \infty) .. the summation after a bit of algebra comes out to be 2 for me !

pardasani
02-21-2007, 05:49 PM
Well I will contribute a question :--


Suppose you have a random number generator that generates random numbers between (0,1) with a uniform distribution.... 2 consecutive generations are independant of each other...

You generate 2 random numbers x, y from this random number generator.... What is the probability that xy < 0.5

bob
02-22-2007, 09:55 AM
[U][B]

Is the answer the ball stops?

Well lets change the reference plane, and sit on the wall....

In the reference plane of the wall, just before impact the ball was travelling towards it with a speed 60mph...

Assume no energy gets lost.... Also we are given that the wall is very heavy, and therefore it will not move as a result of this impact.... Since the wall does not move, and we need to conserve energy, the ball must be moving away from the wall, at the same speed at which it was approaching it...

ie in the reference of the wall the ball is moving away at 60 mph...

But the wall itself is moving at 60 mph wrt to the reference observor.... so the ball must be stationary with respect to the reference observor...
This may be the answer they're after, but by choosing your "reference frame" the way you did, you actually assumed the answer a priori. The problem with the reasoning here is that the reference frame isn't inertial.

Imagine using the same reasoning for an elastic collision between balls of equal mass. The momentum of the system beforehand, sitting on one of the balls, will be mv toward you; the momentum afterwards will be mv away--i.e., momentum will appear not to be conserved. The reason is that your reference frame after the collision--"sitting on the ball"--isn't actually the same as the one you were using before the collision.

Assuming the collision is elastic, you can use conservation of momentum and kinetic energy to derive the correct result:

Suppose an object of mass m moves at speed v toward a stationary object with mass M. After the collision, call the object's velocity v'. Then, from conservation of momentum:

mv = MV + mv^\prime
\frac{m}{M}(v-v^\prime) = V

...and from conservation of kinetic energy:

\frac{1}{2}mv^2 = \frac{1}{2}MV^2 + \frac{1}{2}mv^{\prime2}
m(v^2-v^{\prime2}) = M(\frac{m}{M}(v-v^\prime))^2
(v-v^\prime)(v+v^\prime) = \frac{m}{M}(v-v^\prime)^2
M(v+v^\prime) = m(v-v^\prime)
Mv^\prime + mv^\prime = mv - Mv

So:

v^\prime = \frac{m-M}{m+M}v

Plugging back into conservation of momentum, we can easily see also that:

V = \frac{2m}{m+M}v

In this case, where we assume M >> m, we can treat m as approximately 0, and the result is as described above: v^\prime \approx -v, and V \approx 0.

Notice, though, that this works from the other perspective, too: where we start out "sitting on" the small ball. In that case, m >> M, so v^\prime \approx v (that is, the heavy ball keep moving at basically its initial velocity), and V \approx 2v--the helpless little stationary ball goes rocketing away at twice the heavy ball's initial velocity.

Yan He
02-22-2007, 01:11 PM
Uno, Uno :

underlying X, a floor F, a cap C

payoff 1/min(max(X, F),C)

how to hedge it with European options on X with dierent strikes.

Andy
03-01-2007, 04:27 AM
Problem: The mother is 21 years older then her child, in 6 years the mother will be 5 times older then her child.
Question: where is the father ?

dstefan
03-01-2007, 06:37 AM
Problem: The mother is 21 years older then her child, in 6 years the mother will be 5 times older then her child.
Question: where is the father ?

Currently with the mother.

No need to do the math, although that works out, too - it is the only answer that could make sense.

martin weiss
03-14-2007, 11:19 PM
I have a problem you guys may find interesting
It's pretty easy, but any way.

>> IF a total of 50 coins equals one dollar.
>> and one coin is lost, what's the probabi lity that it was a penny?

pi313
03-14-2007, 11:37 PM
80%

Andy
03-14-2007, 11:39 PM
Assuming US coin system
Both of these case make sense

(1 quarter, 2 dimes, 2 nickels, 45 pennies) => p=1/45
(0 quarter, 2 dimes, 8 nickels, 40 pennies) => p=1/40

martin weiss
03-15-2007, 11:55 AM
80%

Sorry man, but the correct answer is (1/45 +1/40)/2

martin weiss
03-15-2007, 12:08 PM
Sorry man, but the correct answer is (1/45 +1/40)/2
sorry for my mistake. you're right

the probability is 85% , however it does depend on how you look at it, so 80% is the probability for the first scenario and 90% is the probability for the second scenario. We have to assume that both are just as likely to happen, thus the probability is 85%.

pardasani
03-15-2007, 02:06 PM
Even I got a probability of 0.85....

The key to the solution is to figure out how many cases you can construct wherein a sum total of 50 coins is $1....

As Andy pointed out, there are only 2 such cases, which I think is the most important aspect to solving the problem... I came up for the number of ways by using brute force method....

Once we agree that there are only 2 cases possible, we assume that each of them is equally likely... Also we assume that in any given scenario any coin can get lost...

P[success| case 1] = 0.8 and P[success|case 2] =0.9... since each case is equally likely we get P[success]=0.85..

Here is how I worked out the problem...

In some senses we need to find all non negative integer solutions to :

x+y+z+w=50 (there are 50 coins)
x+5y+10z+25w=100 (they add up to $1)
x,y,z,w >= 0 and integer

I am sure there must be neat and clean ways (some more linear algebra ehhh :-) ) to solve the above system but unfortunately i needed to get down to case by case analysis .....

First consider at max how many quarters can you have in the solution set ----

Obviously 4 or anything more is not possible

Can we have 3 quarters :-- no because then we have to distribute 25 cents within 47 coins... Not possible

Suppose we have 2 quarters.... In that case we will have to distribute 50 cents over 48 coins.... That is not possible becasue we must have a coin other than a penny (with all pennies you get 48 cents, 2 cents too short), and even if its the next smallest dimension a nickel ( key assumption nickel = 5 cents, am never sure of that) then we have 45 cents and 47 coins ---- No solution exists...

Hence we can have only 2 cases :--
Case 1 0 quarters
----------------------
if we start out with 0 quarters we can probably have at max 5 dimes -- with 6 dimes, you are left with 40 cents and 44 more coins

So we need to find out if non negative integer solutions exist for any of the following system of equations
a) 5 dimes
x+y=45 (45 coins left)
x+5y= 50 ( 50 cents to be filled in)
no solution
b)4 dimes
x+y=46 (46 coins left)
x+5y= 60 ( 60 cents to be filled in)
no solution
c) 3 dimes
x+y=47 (47 coins left)
x+5y= 57 ( 70 cents to be filled in)
no solution
d) 2 dimes
x+y=48 (48 coins left)
x+5y= 80 (80 cents to be filled in)
voila solution :-)
40 pennies and 8 nickels
e) 1 dime
x+y=49 (49 coins left)
x+5y= 90 (90 cents to be filled in)
no solution
f) 0 dimes
x+y=50 (45 coins left)
x+5y= 100 (100 cents to be filled in)
no solution

Case 2 1 Quarter
-------------------------

Well given the size of this posting, I think I can spare the details.... There is one solution within this category....

And hence we end up with only 2 cases, in with 40 pennies, and one with 45 ...

Andy
03-15-2007, 02:19 PM
x+y+z+w=50 (there are 50 coins)
x+5y+10z+25w=100 (they add up to $1)
x,y,z,w >= 0 and integer
I am sure there must be neat and clean ways (some more linear algebra ehhh :-) ) to solve the above system but unfortunately i needed to get down to case by case analysis .....


I was able to narrow down the exact component of each case pretty quickly. What I did differently is to subtract first equation from second equation to get

24w+9z+4y=50.
given our constaints, this eliminate cases of w >=2 right away. This leaves w=[0,1]

w=0,
9z+4y=50 => z=2,y=8

w=1
9z+4y=26 ->z=2,y=2

Hope this helps.

pardasani
03-16-2007, 12:40 PM
What I did differently is to subtract first equation from second equation to get
9z+4y=50 => z=2,y=8

Nice trick to come down to w {0,1}

The only thing i did not understand though is why z=2, y=8 are the only non negative integer solutions to this equation .... how to check whether there exists other non negative integer solutions to this equaltion.... specially now that we have only 1 constraint equation in some senses...

Andy
03-16-2007, 04:22 PM
Nice trick to come down to w {0,1}

The only thing i did not understand though is why z=2, y=8 are the only non negative integer solutions to this equation .... how to check whether there exists other non negative integer solutions to this equaltion.... specially now that we have only 1 constraint equation in some senses...
Besides the original constraints you have (x,y,z,w >=0), you have the new constraints from the new equations as well.

For example, the new equation 9z+4y =50 introduces a new set of constraints for z. After all, we care more about the constraints of z than y because its coefficient (9) is more than coefficient of y (4). This will allow us to put z in a smaller intervals, hence easier to narrow it down.

The equation tells me that z must be even and between [0,5]. This gives z in {0,2,4}. We can eliminate 0,4 quickly since it will lead to y being non-integers. The only solution left is z=2.

The other equation works out much better
9z+4y=26
Constraints for z is even, in [0,2]. 0 is out so z=2

SP,
I totally agree with you that this works great for small integers but not for general, big numbers. Then, our constraints intervals are large and it's harder to find out. There should be a better way and when you find out, please let me know.

Thanks

Andy
04-05-2007, 02:18 AM
Some more easy ones

1. Sum of three numbers is 98. The ratio between 1 and 2 is 2:3. The ratio between 2 and 3 is 5:8 . Find the second no?
2. A car travels uphill at 30 km/hr and downhill at 60 km/hr. It goes 100 km uphill and 50 km downhill. Find the average speed of the car?
3. A batsman's avg in 12 innings is 24.00 . If his avg is to be double of the no of innings (15 innings), what should he score in the remaining three innings (avg)?
4. A man buys 1kg of sandalwood and 1kg of teakwood. He sells one for 10% profit and other for 10% loss. What is total profit/loss percentage?
5. In a class of 250 students, on JAN 2 15% of the girls and 10% of the boys are absent. If on 100% attendance there are 10 boys. Find the percentage present?
6. USA Scouts have to choose from 4 from 10 people. There are 3 girls, 5 boys , 2 children. What is total probability that they will choose 1G , 2B , 1C?

VladimirBunicu
04-15-2007, 06:10 PM
A friend of mine gave me this puzzle yesterday (consider it today, because it was 3am :partyman:).
He was asked this one during an interview for some hedge fund, and was requested to give answer in 10 minutes :smt017. Here is the puzzle:

Replace the # sign with the correct mathematical functions, so that all statements are accurate.

1 # 1 # 1 = 6
2 # 2 # 2 = 6
3 # 3 # 3 = 6
4 # 4 # 4 = 6
5 # 5 # 5 = 6
6 # 6 # 6 = 6
7 # 7 # 7 = 6
8 # 8 # 8 = 6
9 # 9 # 9 = 6

I solved it in somewhat more than 10 minutes; the rules initially were ambiguous (two hours in a Russian bar do show :partyman: :drinkers:) so what you see above is a rephrase. I still not sure if I got it right. Any ideas?:smt102

Andy
04-15-2007, 06:22 PM
I still not sure if I got it right. Any ideas?:smt102
My first observation would be those 18 # would be different in each equation. By mathematical functions, do you mean binary operations (+-*/) ?

This is an interesting questions. Obviously, it's being asked after 2 translators and several rounds of beer so we would like to get more clarification about "mathematical function".

VladimirBunicu
04-15-2007, 06:42 PM
My first observation would be those 18 # would be different in each equation. By mathematical functions, do you mean binary operations (+-*/) ?

This is an interesting questions. Obviously, it's being asked after 2 translators and several rounds of beer so we would like to get more clarification about "mathematical function".

The rules are still to be clarified - I'm waiting for a callback from my friend on that.
Till now I got five of those by using binary operation only, and the remaining four - using other operations and brackets - so those look more like #1#1#1#=6 where # can be a set of brackets and functions:smt102

Solving ambiguous problems is so traditional for Russians... "The one who doesn't know where he is heading, will be quite surprised when he gets to a wrong place" :) But sometimes useful things are invented/discovered in this way, i.e. penicillin, Viagra, America... :)

Andy
04-15-2007, 06:49 PM
I'm glad the hedge fund wants people to do it less than 10 minutes. Otherwise, I don't think any of us can spend more than 10 minutes this time of the semester.

This took me around 5-6 minutes. I solved 8 of them in around 2 minutes. The one with 1#1#1 took a bit of time and imagination, but oh well. With almost no rule from the guy, I can make up the definition of mathematical functions

log_3(1+1+1)^6=6

2+2+2=6

3 \times 3 -3 =6

4+4-\sqrt{4}=6

5+5/5 =6

6+6-6=6

7-7/7=6

8-(8+8)^{1/4} =6

9-9/sqrt{9}=6

VladimirBunicu
04-15-2007, 06:57 PM
The one with 1#1#1 took a bit of time and imagination, but oh well.
log_3(1+1+1)^6=6



:) 1+1+1 took me the longest, too. I used (1+1+1)!=6 though. And i had different answer for 8's, using 8^{1/3}
Anyway, Andy, you are hired :)

alain
04-15-2007, 08:10 PM
A friend of mine gave me this puzzle yesterday (consider it today, because it was 3am :partyman:).
He was asked this one during an interview for some hedge fund, and was requested to give answer in 10 minutes :smt017. Here is the puzzle:

Replace the # sign with the correct mathematical functions, so that all statements are accurate.

1 # 1 # 1 = 6
2 # 2 # 2 = 6
3 # 3 # 3 = 6
4 # 4 # 4 = 6
5 # 5 # 5 = 6
6 # 6 # 6 = 6
7 # 7 # 7 = 6
8 # 8 # 8 = 6
9 # 9 # 9 = 6

I solved it in somewhat more than 10 minutes; the rules initially were ambiguous (two hours in a Russian bar do show :partyman: :drinkers:) so what you see above is a rephrase. I still not sure if I got it right. Any ideas?:smt102

Assuming that I can change the "#" for anything I like (any kind of weird operation) we can do something like:

2+2+2=6

3*3-3=6

4+log_4 4+log_4 4=6

5/5+5=6

6-6+6=6

7-7/7=6

8-\log_8 8-log_8 8=6

9-9/\sqrt{9}=6

I haven't come up with the first one yet. I solved the rest way before 10 minutes. I will think about the first one later.

Andy
04-16-2007, 04:31 PM
If they want to be creative, they can either shorten or expand the number of elements on the left side. Instead of giving 2#2#2=6, they can make it 2#2=6 or 2#2#2#2=6. Having fewer numbers is harder to do while having more number gives you more choices. They can also replace 6 by another number.

With only 2 numbers on the left, you can do it in 5 minutes for the whole set (the one with 1#1 is again the hardest). Use the same idea as for 3 numbers.

kean
04-22-2007, 06:07 AM
This is your first date. You are going to meet Angie Jorie on this coming Sunday. Both of you agreed on the term that only wait for other party for maximum of 15 minutes. Either one will leave after 15 minutes and the date cancel. In this case, what is the probability that you will meet AJ on Sunday? (Time limit for this question is 5 minutes)

maxrum
04-22-2007, 11:12 AM
1.042% ?

woody
04-22-2007, 12:25 PM
Who's Angie Jorie?

Andy
04-22-2007, 03:11 PM
This is your first date. You are going to meet Angie Jorie on this coming Sunday. Both of you agreed on the term that only wait for other party for maximum of 15 minutes. Either one will leave after 15 minutes and the date cancel. In this case, what is the probability that you will meet AJ on Sunday? (Time limit for this question is 5 minutes)
You forget to specify the time window where they will meet. Is it a 1-hour window, say from 9-10am, etc. The larger the window, the less chance they will meet.

Let's say the window is 1 hour. The chance of them not meeting is (\frac{3}{4})^2 so the probability of them meeting is 0.4375 or 43.75%

If the window is x (in hours) then the probability of them meeting is \frac{1}{2x} - \frac{1}{16x^2}

For example, if the window is 2 hours, then the probability of meeting is down to 0.234375 or 23.4375%

You can change the wait time to 5 minutes and have a more general formula as well.

Who's Angie Jorie?
Sounds a lot like Angelina Jolie ;)

kean
04-23-2007, 09:04 AM
I asked the same question when I attended this interview. Ok, it is within one hour window. Again, none of you is correct.

The reason I put this question here is sometimes we think too much when things are easy. Markets happen in the same way sometimes. The problem is we tend to use complex solutions for simple probability question.


I give the answer tomorrow. No need to know who is A.J. She is not important.:smt006

pardasani
04-23-2007, 11:26 AM
Well under the assumption, that neither you nor AJ is more than 1 hour late, I got a answer of \frac{7}{16} ..

I am attaching a small picture, which I think explains the situation much better.... Its a square of size 60 mins X 60 mins representing possible outcomes, and a big shaded hexagon showing "favorable" outcomes....

Prob (having date) = Area of the shaded portion = 1 - 2*\frac{1}{2}*\frac{3}{4}*\frac{3}{4}

Under a more realistic scenario though, I think it does indeed matter who A.J. is --- in which case, the assumption of being late by at max 1 hour may not be true; leading to a Probability of 1 :-)

Andy
04-23-2007, 11:38 AM
Well under the assumption, that neither you nor AJ is more than 1 hour late, I got a answer of \frac{7}{16} ..
Indeed, same answer as mine.
I am attaching a small picture, which I think explains the situation much better....
Indeed, I used a similar diagram. I'm sure both of us have seen a similar question in which the time frame is 1 hour and the wait time is 5 minutes ;)

It would be interesting to see how Calvin comes up with his correct answer.

dav2fox1
04-23-2007, 02:24 PM
7/16 is a right answer, a geometry probability question

kean
04-26-2007, 12:43 PM
7/16 is correct but it is not a geometry probability instead we should look at uniform probability.

kean
04-26-2007, 12:45 PM
Sorry for the delay. I was a bit busy for the last two days. I thought using this forum to learn maths or probability is great..so many mathematician in this forum. Probability is a difficult subject!

Yuriy
04-26-2007, 12:52 PM
Yep, probability is very difficult. Especially parts that deal with measure theory. One day I hope to be able to read Billingsley book, for example, and say how easy it is :)

dav2fox1
04-26-2007, 01:44 PM
7/16 is correct but it is not a geometry probability instead we should look at uniform probability.
Hi, Calvinkean, it is a geometric probability problem. For two independent random variables, you can change it to two dimension geometric area problem, it is a typical geometric probability probelm, as pardasani did. Uniform distribution is only a speical case here.
This problem can be easily found from probability book.

kean
04-26-2007, 11:31 PM
Hi, Calvinkean, it is a geometric probability problem. For two independent random variables, you can change it to two dimension geometric area problem, it is a typical geometric probability probelm, as pardasani did. Uniform distribution is only a speical case here.
This problem can be easily found from probability book.


Hello, please don't get upset. I purposely said it not a geometry probability. I know you will "kick" back. Anyway, my reasoning is how long do we need to solve such simple question. It doesn't matter whether it is a question from any textbook. :thumbsup: Be cool, if we all want to work in the markets.

By the way, if we solve from uniform perspective and derive from probability axiom. It is much easier. I am still learning. My intention is to use this forum to harness knowledge. I hope we share the same view.

kean
04-26-2007, 11:34 PM
Hey man, you are :thumbsup:


Well under the assumption, that neither you nor AJ is more than 1 hour late, I got a answer of \frac{7}{16} ..

I am attaching a small picture, which I think explains the situation much better.... Its a square of size 60 mins X 60 mins representing possible outcomes, and a big shaded hexagon showing "favorable" outcomes....

Prob (having date) = Area of the shaded portion = 1 - 2*\frac{1}{2}*\frac{3}{4}*\frac{3}{4}

Under a more realistic scenario though, I think it does indeed matter who A.J. is --- in which case, the assumption of being late by at max 1 hour may not be true; leading to a Probability of 1 :-)

kean
04-26-2007, 11:36 PM
I like to make math simple...very simple.

kean
04-27-2007, 11:25 AM
A six-sided die is rolled three times independently. Which is more likely: a sum of 11 or a sum of 12? (5 minutes limit)\\:D/

Jonathan
04-27-2007, 12:09 PM
I say 11.

11 has .1944 chance whereas 12 has .1666 chance.

am I right?

kean
04-28-2007, 06:58 AM
Unfortunately your answer is incorrect. For one thing, I would like to clarify that I do not mean to test anyone in this forum. I just pick some look simple but tricky questions to share with members.

My intention is to help developing probability knowledge. I urge everyone not to use this intention as solving assignment questions. No good.:-ss

I will post the answer three day later. By the way, please show your calculation. Thanks.


I say 11.

11 has .1944 chance whereas 12 has .1666 chance.

am I right?

dav2fox1
04-28-2007, 12:22 PM
I found a simple way.
For x+y+z=11, the probability is sum of 1/6*P(y+z=a), a is from 5 to 10
For x+y+z=12, the probability is sum of 1/6*P(y+z=a), a is from 6 to 11
The difference: 1/6*[P(y+z=5)-P(y+z=11)]>0
so P(x+y+z=11) > P(x+y+z=12)

kean
05-04-2007, 10:46 AM
This was a famous question Pascal asked Femat in the 17th century.


A sum of 11 is obtained with the following 6 combinations:
(6, 4, 1) (6, 3, 2) (5, 5, 1) (5, 4, 2) (5, 3, 3) (4, 4, 3).
A sum of 12 is obtained with the following 6 combinations:
(6, 5, 1) (6, 4, 2) (6, 3, 3) (5, 5, 2) (5, 4, 3) (4, 4, 4).

Each combination of 3 distinct numbers corresponds to 6 permutations, while each
combination of 3 numbers, two of which are equal, corresponds to 3 permutations.
Counting the number of permutations in the 6 combinations corresponding to a sum
of 11, we obtain 6 + 6 + 3 + 6 + 3 + 3 = 27 permutations. Counting the number of
permutations in the 6 combinations corresponding to a sum of 12, we obtain 6 + 6 +
3+3+6+1 = 25 permutations. Since all permutations are equally likely, a sum of 11
is more likely than a sum of 12.
Note also that the sample space has 63 = 216 elements, so we have P(11) =
27/216, P(12) = 25/216.:D

kean
05-04-2007, 10:48 AM
Call the throw of a pair of dice lucky if the sum is 7 or 11.

Two players each toss a pair of dice (independently of one another) until each makes a lucky throw.

Find the probability that they take the same number of throw.

kean
05-04-2007, 10:51 AM
The sample space is 6^3.


This was a famous question Pascal asked Femat in the 17th century.


A sum of 11 is obtained with the following 6 combinations:
(6, 4, 1) (6, 3, 2) (5, 5, 1) (5, 4, 2) (5, 3, 3) (4, 4, 3).
A sum of 12 is obtained with the following 6 combinations:
(6, 5, 1) (6, 4, 2) (6, 3, 3) (5, 5, 2) (5, 4, 3) (4, 4, 4).

Each combination of 3 distinct numbers corresponds to 6 permutations, while each
combination of 3 numbers, two of which are equal, corresponds to 3 permutations.
Counting the number of permutations in the 6 combinations corresponding to a sum
of 11, we obtain 6 + 6 + 3 + 6 + 3 + 3 = 27 permutations. Counting the number of
permutations in the 6 combinations corresponding to a sum of 12, we obtain 6 + 6 +
3+3+6+1 = 25 permutations. Since all permutations are equally likely, a sum of 11
is more likely than a sum of 12.
Note also that the sample space has 63 = 216 elements, so we have P(11) =
27/216, P(12) = 25/216.:D

Jeriot
05-07-2007, 09:36 AM
I was just reading the first post and got different answers for these two questions. Feel free to comment :)

3. The hour and minute hands of a clock meet at 12'oclock. When will be the first time they meet again ?
Answer: After 1 hour, 5 minutes 27.2727 seconds

I got 1hour, 5 minutes, 5.0847 seconds...

12 1 2
+----------+----------+
min hour
hand hand

can be interpreted as


0 5 10
+----------+----------+
min hour
hand hand

at 1pm the minute hand is at 12 position, the hour hand is at 1 position.
The minute hand travels at 1 per minute
The hour hand travels at 1/60 per minute

at intersection, 5 + t/60 = t
Hence t=300/59= 5 min 5.0847... sec


4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?
Answer: 1/2 or 50%

There are 2 possible outcomes to this set up. But I found some are more likely than others:

Say the circle is divided into A and B and the points P1, P2, P3. Area A = Area B hence prob(each point in each semi circle) = 0.5

Hence if you draw a probability tree, you'd find the probability is 1/4.

6. Calculate \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}}
Answer: 2

Let a= \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}}
ln(a)
= 1/2 x ln2 + 1/4 x ln 2 + 1/8 x ln2 + ...
=ln2 (1/(1-0.5))
=> a=4

Andy
05-07-2007, 12:06 PM
I was just reading the first post and got different answers for these two questions.
The correct answers are discussed in later posts. I haven't updated my first posted for a while.

Let a= \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}}
ln(a)
= 1/2 x ln2 + 1/4 x ln 2 + 1/8 x ln2 + ...
=ln2 (1/(1-0.5))
=> a=4
Check your calculation. It should be
\ln a = \frac{1}{2} \ln (2 + a)
a^2=2+a \Rightarrow a =2
There are easier way to do this without using log but the idea is the same.

Jeriot
05-07-2007, 01:45 PM
Consider first the circumstance where the first point--x_1--is on the interval (0,\frac{1}{2}). Where can we place the second point in order to make the desired result happen?

It's fairly clear that the interval (\frac{1}{2}, x_1 + \frac{1}{2}) is the answer to that question. This interval has length x_1.

I don't quite agree.

If x_1 is the length of the first portion broken off, and x_2, the length of the second portion, to form a triangle, we need x_1<0.5and 0.5<x_1+x_2><1
i.e.</x_1+x_2>x_2 between 0.5-x_1 and 1-x_1<x_1+x_2><x_2><x_2><x_2>

\int_0^{\frac{1}{2}}{\int_{\frac{1}{2}-x_1}^{1-x_1}\frac{x_1}{1}*\frac{x_2}{1-x_1}dx_2 dx_1

Integrating, I got 0.2017
</x_2></x_2></x_2></x_1+x_2>

Jeriot
05-07-2007, 01:50 PM
The correct answers are discussed in later posts. I haven't updated my first posted for a while.

Check your calculation. It should be
\ln a = \frac{1}{2} \ln (2 + a)
a^2=2+a \Rightarrow a =2
There are easier way to do this without using log but the idea is the same.

*Bangs head*

Thanks :)

DominiConnor
05-12-2007, 04:30 AM
There is a large pile of Brainteaser questions at Wilmott Forums - Brainteaser Forum (http://www.wilmott.com/categories.cfm?catid=26)
They're set (and often answered) by finance types.
One very large bank has told me they've given up trying to avoid asking the ones to be found there, since their views is that anyone smart enough to be able to do that range of BTs is someone they want to hire.

Andy
05-16-2007, 02:56 AM
1. Find least number n>17 such that n^2 divides 18^n - 1.
2. Find least number n>19 such that n^2 divides 20^n - 1.
3. Find least number n>12 such that 11^n - 2 is a prime.
4. Find least number n>24 such that 23^n - 2 is a prime.

Andy
05-16-2007, 02:59 AM
JP Morgan interview question for a summer analyst position.

"Imagine you are in a room. There is a door, but in order to open it, you have to insert a table-tennis ball into the hole in the door. There is a table-tennis ball in the room, but it’s in a very deep hole in the ground so that you cannot reach it. Given a feather and an empty box of Kellogg’s corn flakes, how would you get out of the room?"

Yuriy
05-16-2007, 03:41 AM
Interesting question :)

I'm in a room and the ball is deep in the ground :) what kind of room is that?

Yuriy
05-16-2007, 03:47 AM
Put the feather in the box of corn flakes, say magic words, take it out and touch the ball, the ball will attract to the feather :)

Andy
05-16-2007, 01:18 PM
Put the feather in the box of corn flakes, say magic words, take it out and touch the ball, the ball will attract to the feather :)
If you can say such magic words, shouldn't you use it to open to door ? :D
Also, it said that the hole is too deep you can't reach it by hand so you can't even touch the ball with the feather.

Andy
05-16-2007, 02:13 PM
King has 1000 bottles of wine. One of the bottles is poisoned. He is using subjects to find out which bottle is poisoned. Objective is to minimize the number of people you use. The rule is you can't let some people drink, wait and let others drink. Everyone will drink at the same time...What is the optimal strategy to minimize the number of people used while finding the poisoned bottle?

jameshin
05-21-2007, 12:13 AM
hey guys

what is lim when x goes to infinity of [ (x^2 + 5x)^0.5 - x ]

thank you
James

pardasani
05-21-2007, 09:10 AM
what is lim when x goes to infinity of [ (x^2 + 5x)^0.5 - x ]





0 would be my pick.. the power function dies rather rapidly :-)

Jonathan
05-21-2007, 10:38 AM
I will give these brain teasers another shot, I say 2.5 after a bit of manipulation.

pardasani
05-21-2007, 11:58 AM
"Imagine you are in a room. There is a door, but in order to open it, you have to insert a table-tennis ball into the hole in the door. There is a table-tennis ball in the room, but it’s in a very deep hole in the ground so that you cannot reach it. Given a feather and an empty box of Kellogg’s corn flakes, how would you get out of the room?"


well I am not sure, but where does the question say that I was in the room with a ping pong ball -- i am infact in my own room fighting with Ito ;)

pardasani
05-21-2007, 12:14 PM
King has 1000 bottles of wine. One of the bottles is poisoned. He is using subjects to find out which bottle is poisoned. Objective is to minimize the number of people you use. The rule is you can't let some people drink, wait and let others drink. Everyone will drink at the same time...What is the optimal strategy to minimize the number of people used while finding the poisoned bottle?


My take 999.... pick at random any one bottle keep it aside, bring 999 people to drink from the rest... If someone in those 999 dies, we know which was the poisoned one... If everyone survives then the bottle left out is the poisoned one...

I guess the key statement is "every one will drink at the same time"... Now there are 1000 bottles, to be tested AT THE SAME TIME; I could not any other way to optimize the thing!

The thing that I don't like however with this reasoning is the fact that, suppose there were 2 bottles that were poisoned, and everybody had to drink at the same time -- what then !!!!...

alain
05-21-2007, 12:29 PM
I agree with SP... 999 people. :)

Vlad
05-21-2007, 03:13 PM
King has 1000 bottles of wine. One of the bottles is poisoned. He is using subjects to find out which bottle is poisoned. Objective is to minimize the number of people you use. The rule is you can't let some people drink, wait and let others drink. Everyone will drink at the same time...What is the optimal strategy to minimize the number of people used while finding the poisoned bottle?

Initially I thought that you can use dynamic programming but since all need to drink in the same time you cannot apply recursion methods on the suboptimal problems.
It is the kind of problem where you can use less people if more people will drink the poison -
like in coding : you have memopry/CPUtime trade. The solution makes the following assumptions:
the bottles are big enough an the poison is strong enough so mixing bottles is possible
and mixing takes place before everyone drinks.
Solution1 (2D) : 1000 = 31x31 + 6x6 + 3. Put the bottles in the cells inside a square with
side = 31 ( you get 961 bottles) and in another suqare of side = 6 ( another 36 bottles) and of the last 3 bottles only two people will need to drink (if noone dies than is the last unused bottle). Put the people on two sides of each square and everyone drinks a cocktail made from a mix of all the bottles in the cells in front of his position. This way you use 31+31+6+6+2=76 people. Noone dies or 2 people die, the intersection of their lines will deterimine the poisoned bottle.
Solution2 (3D) : 1000 = 10x10x10. Create a cube of (edges) side = 10 and put the bottles in the 1000 cells inside the cube and the people on the 3 edges parallel to the axes. Each person drinks the cocktail made from a mix from all the bottles in the cells inside the 2D plane in front of him (perpendicular on his edge). 3 people die and the intersection of their planes determine the point/cell where is the poisoned bottle. This way you use only 30 people but with more casualties.
This approach is possible since the problem does not ask to minimize the number of casualties . If you care about the people and you want to save them than you have to use a different approach.
Leave the 4D, 5D ... solutions out for now.

Yuriy
05-21-2007, 03:37 PM
King has 1000 bottles of wine. One of the bottles is poisoned. He is using subjects to find out which bottle is poisoned. Objective is to minimize the number of people you use. The rule is you can't let some people drink, wait and let others drink. Everyone will drink at the same time...What is the optimal strategy to minimize the number of people used while finding the poisoned bottle?

Can we pour wine from a number of bottles somewhere and then let people drink?

For example, choose N people, divide 1000 bottles among the N people, so everyone gets 1000/N bottles. Pour a little bit of every 1000/N bottles into separate bottles and let those N people drink. Assuming even tiny concentration of the poison kills the tester :)

One of the N dies, take the suspicious 1000/N bottles and divide them among the N-1 remaining, so everyone gets 1000/N/(N-1) bottles. Pour a little bit of every 1000/N/(N-1) bottles into separate bottles and let those N-1 people drink.

One of the N-1 dies ...

Repeat the process (rounding up the numbers) until we are down to 1 bottle. Then calculate the smallest possible N.

My answer is N=6.
First, each of 6 people drinks a little bit from 166 or 167 bottles (max 167). One dies.
Second, each of 5 survived people drinks a little bit from 33 or 34 bottles (max 34). One dies.
Third, each of 4 survived people drinks a little bit from 8 or 9 bottles (max 9). One dies.
Fourth, each of 3 survived people drinks a little bit from 3 bottles. One dies.
Fifth, each of 2 survived people drinks a little bit from 1 or 2 bottles (max 2). One dies.
Sixth, if the one who drank from 2 bottles survived, he/she drinks from one of the remaining two.

jameshin
05-22-2007, 05:00 AM
that's true
2.5 i think they told me is the right answer
but how to get tehre

thanks

Jonathan
05-22-2007, 10:54 AM
I got 2.5 by:

fist rearranging the equation --> (x^2 + 5x)^.5 - x = ((x+2.5)^2 - 6.25)^.5 - x
then I thought as x-> infinity, the 6.25 becomes negligible,
therefore the equation becomes ((x+2.5)^2)^.5 - x = x+2.5 - x = 2.5

I am a newbie here, I'm sure there is a more elegant method, unless of course, I am correct.

quantrecruiter
05-24-2007, 11:45 AM
Hello users,
I am an IT recruiter in the Chicago area representing several financial institutions in the area. I am always looking for qualified candidates with skills such as strong C++, MBS, Fixed Income, Quantitative development/Analytics, Sybase experience, and a strong mathmatics background.
Shoud anyone be interested in a great opportunity, you can send your resume to cchiovatero@osgglobal.com and you can call me at 847-954-8063.
I hope to hear from some of you. Make it a great day.
Craig Chiovatero

jameshin
05-27-2007, 12:03 AM
Hey Jonathan, thanks for the explanation.. Well it may be a correct method but I heard we may need to use expansion around x.

does anyone have an idea for a simpler and more elegant solution?

thanks

James

rohitbansal
07-13-2007, 03:07 PM
This how i did
Multiply and divide [ (x^2 + 5x)^0.5 + x ]
-> {[ (x^2 + 5x)^0.5 - x ] * [ (x^2 + 5x)^0.5 + x ]} / [ (x^2 + 5x)^0.5 + x ]
-> {x^2+5x - x^2}/ [ (x^2 + 5x)^0.5 + x ]
-> 5x/[ (x^2 + 5x)^0.5 + x ]
Now taking numerator x down we get
-> 5/ [(x^2 + 5x)^0.5 + x ]/x
-> 5/ { [(x^2 + 5x)/x^2]^0.5 + 1 }
-> 5/ { [1+5/x]^0.5 + 1}
->as x->infinity 5/x tends to 0, so we have
-> 5/ {1+1}
-> 2.5 The answer

Correct me if I am wrong




hey guys

what is lim when x goes to infinity of [ (x^2 + 5x)^0.5 - x ]

thank you
James

Ed
07-14-2007, 02:36 PM
One of the N-1 dies ...

Repeat the process (rounding up the numbers) until we are down to 1 bottle. Then calculate the smallest possible N.

My answer is N=6.
First, each of 6 people drinks a little bit from 166 or 167 bottles (max 167). One dies.
Second, each of 5 survived people drinks a little bit from 33 or 34 bottles (max 34). One dies.
Third, each of 4 survived people drinks a little bit from 8 or 9 bottles (max 9). One dies.
Fourth, each of 3 survived people drinks a little bit from 3 bottles. One dies.
Fifth, each of 2 survived people drinks a little bit from 1 or 2 bottles (max 2). One dies.
Sixth, if the one who drank from 2 bottles survived, he/she drinks from one of the remaining two.

Yuriy, I like your answer, but it seems to violate the requirement that all drink at the same time.

Andy
09-23-2007, 09:46 AM
Here are two bona-fide job interview questions, as reported by two frazzled interviewees.

[Microsoft] Your boss wants you to design a calendar that she will place on her desk right next to the promotion forms. She gives you two plain wooden cubes that will fit side-by-side in a wooden holder like so (front view):

http://img225.imageshack.us/img225/9551/untitled1of1.gif

Your job is to place a single digit between 0 and 9 on each of the twelve faces of the cubes so that any day of any month can be displayed. Can you do it?

VladimirBunicu
09-23-2007, 02:00 PM
I think this one works
0 1 2 7 8 9
1 2 3 4 5 6
but this solution assumes that one cube can be used by itself (for example, -8 instead of 08 etc)

VladimirBunicu
09-23-2007, 02:23 PM
The actual solution has its trick, haha. ;)
form a calendar with two cubes (answer) - Quantnet.org - Financial Engineering Forum (http://www.quantnet.org/forum/blog.php?b=23)

Andy
11-25-2007, 04:58 PM
1. There are 3 computers. One always tells the truth, one always tell the opposite of the truth and the third one sometimes tells the truth, sometimes tells the opposite of the truth. We do not know which computer is the one that tells the truth, which is the one that tells the opposite of truth etc. We have only one opportunity to ask a question to one computer. Based on the answer, we want to pick the computer that sometimes tells the truth and sometimes doesn't. We do not need to find out which computer is the one that always tells the truth or which is the one that always tells the opposite of the truth. What question should we ask to one computer?

2. We buy a bag of candy. In the bag, there are 5 candies. Each candy can be one of 50 different candy types, being equally likely from each type. What is the expected number of types of candy we will have in the bag? As an example, if there are two orange candy, two apple candy and one strawberry candy in the bag, then there are 3 types of varieties.

3. X1, X2,...,Xn are independent random variables, uniformly distributed on [0,1]. What is the probability that X1+X2+...Xn<1.
4. x_0 =1
x_n =1+\frac{2}{3x_{n-1}^2}
x_1 = \frac{5}{3}
x_2 = \frac{31}{25}
x_3 = \frac{4133}{2883}

Can you find a closed form for x_n

ramnik
11-27-2007, 04:04 PM
4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?
Answer: 1/2 or 50%

CLEARLY WRONG!!!
I will prove it for n points ie: What is the probability that n point chosen randomly lie on a semi-circle.
Let us choose randomly the points P(one), P(two)..... P(n). Now define events
E(one)=all the n points lie in the clockwise semi-circle, clockwise of P(one) ie: P(one) is one end point of semi circle.
///y E(n)= all the n points lie in the clockwise semi-circle, clockwise of P(n) ie: P(n) is one end point of semi circle.
Now clearly :
E(i) intersection E(j)= phi (since if all points lie to clockwise semi-circle of i, then i is the end point of semi-circle. ///y for E(j) and therefore intersection is null).
We need:
P(E(one)UE(two)U....E(n))=P(E(one)) + P(E(two)) + .... P(E(n))
#using the fact that E(i's) are disjoint and probability measure is sigma additive(here only using finite additivity)

P(E(i))=1/2^(n-1)
Thus P(n points lie on semi circle)= n/(2^(n-1))

I'm sorry I have had to use words to describe(haven't learnt the use of TEX in the reply box)

I'll try to think why the previous arguments are flawed. Btw the answer for n=3 is 3/4.

Matthew M
12-11-2007, 03:10 PM
1. Find x if x^{x^{x^{\ldots}}}=2
Answer: x=\sqrt{2}

2. Find all real and complex root of x^6=64
Answer: x_1,\ldots,x_6 =\{\pm 2,\pm 1 \pm \sqrt{3} \}

3. The hour and minute hands of a clock meet at 12'oclock. When will be the first time they meet again ?
Answer: After 1 hour, 5 minutes 27.2727 seconds

4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?
Answer: 1/2 or 50%

5. A unit length is broken off into 3 pieces. What is the probability of them forming a triangle ?
Answer: 1/8 or 12.5%

6. Calculate \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}}
Answer: 2

7. There are 14 identical-looking balls. 13 of them have the same weight while one of them is heavier than the rest. What is the minimum times you can weight to identify the heaviest ball ? How do you generalize for n balls ?
Answer: With 3 weights, I can identify the heaviest ball. For n balls, I can identify the heaviest ball after x times where x is the largest integer such that 2^x \leq n

The answers to 2 and 4 are incorrect. 5 is an ill-posed question.

Edit: there is a possibility that the answer to two is merely a typo. If you insert an i after the \sqrt{3} then it becomes correct. The real question is why you would put it in a+ib notation instead of exponential notation (where the answer is obvious).

Matthew M
12-11-2007, 06:48 PM
King has 1000 bottles of wine. One of the bottles is poisoned. He is using subjects to find out which bottle is poisoned. Objective is to minimize the number of people you use. The rule is you can't let some people drink, wait and let others drink. Everyone will drink at the same time...What is the optimal strategy to minimize the number of people used while finding the poisoned bottle?

The answer is 10.

Label the bottles 0,1,2,...999

Line the 10 people up in a row. They are going to act like digits of a binary number. Pour a bit of bottle X in the glass of each of the people for whom the binary representation of X sets their digit to 1. Repeat for all X.


In other words, pour wine from bottle 0 into nobody's glass. Pour wine from bottle 1 into the first person's glass only (counting from the right). Pour wine from bottle 746 into the glasses of the tenth, eighth, seventh, sixth, fourth and second people's glasses (because the binary rep. of 746 is 1011101010). Write down the binary number given by the people who die after drinking. This is the number of the poisoned bottle.

In other words, the guy at the left end has wine from bottles 512 to 999 in his glass. The guy immediately to his right has wine from bottles 256 to 511 and 768 to 999 in his glass, etc.

Matthew M
12-11-2007, 06:57 PM
3. X1, X2,...,Xn are independent random variables, uniformly distributed on [0,1]. What is the probability that X1+X2+...Xn<1.



Easy enough. It's the volume of an n-dimensional right polyhedron with height is 1 and whose base is the (n-1)th dimensional polyhedron which solved the problem for n-1. The forms are: a line, an isosceles right triangle of base/height 1, a right pyramid with the previous isosceles right triangle as its base, etc.

Unless I'm mistaken (I didn't check) this is 1/n! (proof by induction...after inserting the inductive hypothesis, you integrate x^{n-1}/(n-1)!dx from x = 0 to 1)...

Andy
12-11-2007, 11:04 PM
The answers to 2 and 4 are incorrect. 5 is an ill-posed question.
They are wrong. Haven't had time to update.
But I hope the questions are interesting enough ;)

Matthew M
12-16-2007, 03:56 PM
They are wrong. Haven't had time to update.
But I hope the questions are interesting enough ;)

Those ones are pretty standard high school math competition questions. Some of the later ones in the thread are more interesting.

Matthew M
12-16-2007, 04:03 PM
4. x_0 =1
x_n =1+\frac{2}{3x_{n-1}^2}
x_1 = \frac{5}{3}
x_2 = \frac{31}{25}
x_3 = \frac{4133}{2883}

Can you find a closed form for x_n


This is the only one I can't figure out. I spent a good half hour on it, but it doesn't lend itself to any tricks I've seen before (it's not linear recursive, so I can't write down a linear operator and diagonalise it, it doesn't become more tractable if I write down x_n in terms of x_{n-2} or even earlier entries, I don't see an obvious way to do a "boomerang integration" type trick, and the pattern is not obvious enough that I can write down the answer and prove using induction).

Oh well. :(

Andy
12-22-2007, 07:59 PM
These are questions asked at some banks for front office or research quant position.

1.If a is a column vector, then how many non-zero eigenvalues does the matrix aa' have? what are the eigenvalues? What are the corresponding eigenvectors? What are the eigenvectors corresponding to the zero eigen values?
2. if w is an standard brownian motion, is w^3 a martingale?
3. prove that the price of a call option is a convex function of the strike price.
4. Suppose you are throwing a dart at a circular board. What is your expected distance from the center? Make any necessary assumptions. Suppose you win a dollar if you hit 10 times inside a radius of R/2, where R is the radius of the board. You have to pay 10c for every try. If you try 100 times, how much money would you have lost/made in expectation? Does your answer change if you are a pro and your probability of hitting inside R/2 is double of hitting outside R/2?
5. Suppose you have an old machine, which does not have a capability to multiply two numbers, but does have a capability to square a number. It also has addition and bit shift operators. Implement multiplication and division (integer division only)
6. Again the previous question, now you dont even have the squaring capability, but only bit shift, and addition. Implement multiplication
7. what do you know about const.
8. What is the problem with virtualization from the point of view of optimization. What can a compiler do when a function is not virtualized?
9. How is virtuality implemented in C++
10. integrate log^n x.
11. prove, from first principles, the differential of e^cos(x).
12. given the matrix A=(5 -3;-3 5), find a matrix M, such that A=M*M. Now find a matrix M such that A=M'*M
13. Suppose x_1, x_2...x_n are IID from [0,1] uniform interval. What is the expected value of the maximum. What is the expected value (max-min).
14. Suppose I have a routine that can sort n numbers in O(n) time. Prove me wrong.
15. Suppose you have the implied vol curve for call options. What is the arb free price of a digital struck at k given this implied vol curve.
16. Pricing a barrier option with a discrete barrier.
17. Distribution of the max of a brownian motion. Use it to price digital american and european call options.
18. Explain put call parity.
19. At one interview, I was asked to explain, in great detail, whatever I knew about the current credit problem (for about 25 mins). I did well only because I was reading the WSJ.
20. Given a fair coin, what is the expected number of trials you need to go to get 2 consecutive heads. 3 consecutive heads. generalize to N.
21. What is the variance on the number of trials in the question above?

DominiConnor
12-23-2007, 06:07 AM
One well known firm went through a phase of asking candidates to prove Pythagoras theorem.
A surprising % floundered, in illuminating ways.

Some tried to remember the proof, and rather in the way of remembering the words of pop songs you liked when you were 15, there were gaps where candidates simply could not remember, as in "Baby we're on our way, we gonna mumble until the mumble gets high..."
Mumbling works better at retro pop concerts than mathematical proofs.

I would hope that people around here could work it out from first principles, and that is the way forward.

I'd also pick up on what Bob is saying. It is worth talking through your reasoning as you work these puzzles. It is very easy to hear a probability puzzle in a such a way that it is "A and B", rather than "A or B", which of course will lead you very astray.
Thus reflecting your interpretation, allows the interviewer to spot this and stop you drifting off track.

msj
12-25-2007, 10:21 PM
These are questions asked at some banks for front office or research quant position.

1.If a is a column vector, then how many non-zero eigenvalues does the matrix aa' have? what are the eigenvalues? What are the corresponding eigenvectors? What are the eigenvectors corresponding to the zero eigen values?
2. if w is an standard brownian motion, is w^3 a martingale?
3. prove that the price of a call option is a convex function of the strike price.
4. Suppose you are throwing a dart at a circular board. What is your expected distance from the center? Make any necessary assumptions. Suppose you win a dollar if you hit 10 times inside a radius of R/2, where R is the radius of the board. You have to pay 10c for every try. If you try 100 times, how much money would you have lost/made in expectation? Does your answer change if you are a pro and your probability of hitting inside R/2 is double of hitting outside R/2?
...



hmm, i wonder where you got that list.

We are actually working on a book of questions and answers.

So i'd appreciate any contributions via Mark Joshi's Home Page (www.markjoshi.com) or by e-mail.

Andy
12-30-2007, 03:43 AM
1) I have a well-shuffled deck of n red cards and n black cards, all facing down. I let you draw one card at a time. If you draw a black card, I pay you $1. If you draw a red card, you pay me $1. You can stop the game at any time. (As long as you want to play, I'll accommodate.)

1. What's the expected payoff of this game to you?

2. What's your optimal stopping rule?

[was asked at a Goldman Sachs on-site interview]

2) Three horses are in a race. Horse A is twice as likely to win as horse B, which in turn is twice as likely to win as horse C. What is the probability that horse A will not win the race?

3) Two princes are racing their horses. Each prince owns three horses, one in each "weight class." In every weight class, prince A's horse outruns prince B's, but a horse in a higher weight class always outruns a horse in a lower weight class. There will be three pairwise races, and each prince can enter any one of his horses into a race. The prince whose horses win 2 out of the 3 races gets the bragging rights.

How can prince B win?

[Adapted from a classic Chinese story]

4)Three horses are in a race. Horse A is twice as likely to win as horse B, which in turn is twice as likely to win as horse C. What is the probability that horse A will not win the race?

5) There are five bags containing the same number of coins. Four of the bags contain gold coins while the last bag contains silver coins coated with gold, and you are told that each gold coin weighs 10 oz. and each silver coin weighs 2 oz. less. You have a weighting scale (minimum=8 oz., maximum=large enough so you can weigh all five bags of coins) and you can take coins out of the bags. What's the minimum number of weighings you need to do in order to tell which bag has the silver coins?
[was asked this question at a State Street on-site a few years ago]

dcifrths
12-31-2007, 05:31 PM
My feeling is 1/8 or 12.5% of it being a 6

thats gotta be right. conditional probability of it actually being a six and him reporting it to be a six.

Barron

dcifrths
12-31-2007, 06:01 PM
1) I have a well-shuffled deck of n red cards and n black cards, all facing down. I let you draw one card at a time. If you draw a black card, I pay you $1. If you draw a red card, you pay me $1. You can stop the game at any time. (As long as you want to play, I'll accommodate.)

1. What's the expected payoff of this game to you?

E[game]= 0. trivial to prove.

2. What's your optimal stopping rule?

this is less clear to me. i'd think that it would be as soon as you are up. so if you win $1, you should stop and you should play until you are up $1.

that begs the question though, given the variance of the game, why not stop with more money? i don't know how to figure out the optimal stopping rule but would be curious to see it.


2) Three horses are in a race. Horse A is twice as likely to win as horse B, which in turn is twice as likely to win as horse C. What is the probability that horse A will not win the race?

P(C wins) = c.
P(B wins) = 2c.
P(A wins) = 4c.

c+2c+4c=1,
c=1/7.

P(A not wins) = 1-P(A wins) = 1 - 4*(1/7) = 3/7


3) Two princes are racing their horses. Each prince owns three horses, one in each "weight class." In every weight class, prince A's horse outruns prince B's, but a horse in a higher weight class always outruns a horse in a lower weight class. There will be three pairwise races, and each prince can enter any one of his horses into a race. The prince whose horses win 2 out of the 3 races gets the bragging rights.

How can prince B win?

A1 B1
A2 B2
A3 B3

3 = highest weight class

A(n) > B(n), but B(n+1) > A(n), so prince B can win if B(n+1) races A(n). that leaves A3 racing B1 while B2 and B3 race A1 and A2 respectively.


5) There are five bags containing the same number of coins. Four of the bags contain gold coins while the last bag contains silver coins coated with gold, and you are told that each gold coin weighs 10 oz. and each silver coin weighs 2 oz. less. You have a weighting scale (minimum=8 oz., maximum=large enough so you can weigh all five bags of coins) and you can take coins out of the bags. What's the minimum number of weighings you need to do in order to tell which bag has the silver coins?
[was asked this question at a State Street on-site a few years ago]

well the simple answer is at most it takes 5 weighings...but that is definitely wrong.

you can weigh sets of bags.

weighing 1: 3 bags.
weighing 2: 2 bags.

from there, you can tell which set of bags has the silver coins.

if it is set #2, it only takes 3 weighings,

if it is set #1, it takes 4 weighings...but both less than 5 weighings.

so minimum it takes via this methodology is 3 weighings.

Barron

alain
12-31-2007, 08:31 PM
well the simple answer is at most it takes 5 weighings...but that is definitely wrong.

you can weigh sets of bags.

weighing 1: 3 bags.
weighing 2: 2 bags.

from there, you can tell which set of bags has the silver coins.

if it is set #2, it only takes 3 weighings,

if it is set #1, it takes 4 weighings...but both less than 5 weighings.

so minimum it takes via this methodology is 3 weighings.

Barron

here is my answer. let's take a single coin from every bag and market A, B, C, D and E so we know which coin belongs to which bag.

1) weigh 3 coins (ABC), if the weight is 30 oz, the silver coin is not here -> Go to step 2a. If the weight is less than 30oz, the silver coin is here, go to step 2b

2a) weigh one of the other coins D and leave E out. If D weighs 8 oz, D is the silver coin (and its bag is full of silver coins). If D weighs 10 oz, E is the silver coin. Total weighs 2.

2b) weigh 2 of the 3 coins (AB). If the weight is 20 oz, C is the silver coin. If not, do step 2a with A and B.

So, the minimum number of weighs to guarantee finding the false coin is still 3.

nbzxroro
01-15-2008, 01:12 PM
To Andy`s original question:

1. Ans=sqrt(2).

let x^x.....=I=2. From the recursive feature we can see x^x^x.....=x^I. so x^I=x^2=2 (because I=2). then x=sqrt(2). The same technique is used to solve 6. let left hand side=I. Then sqrt(2+I)=I. so 2+I=I^2, two solutions, but you can only use the one bigger than 2 as the solution.

2. simple.

3. 1hr 5.4545 min.

At 1 O`clock, the angle between the two legs is pi/12. so the time it takes for the minute leg to catch the hour leg is: pi/6/(pi/30-pi/360)=5.4545 minute. Because the hour leg moves pi/6 in an hour(60 minute) and the minute leg moves 2pi in an hour (60 min).

4. 3/4.

The first and second points can be anywhere, only the third point matters. Let alpha be the angle determined by the two radius connecting the first and two points with the central point of the circle. The probability of the three points being different semicircle is that the third point lies in the area with angle alpha, so the probability is alpha/(2pi). alpha is uniformly distributed between 0 and pi, so the density is 1/pi. So the probability is the expectation of alpha/(2pi) with respect to the pdf 1/pi. By doing a simple integral the p is 1/4. So the probability of being in the same semicircle is 3/4.

5. 1/4.

Can be solved by figure. let x, y both uniformly distributed in [0,1], the sample space is a unit square. first assume x<y, so the probability is P(x<y, y>1-y, 1-x>x, 1-y+x>y-x) (the sum of any two is larger than the other), this corresponds to a triangular with an area of 1/8. For symmetry where x>y, you get another triangular with an area of 1/8. So the total probability is 1/4.

nbzxroro
01-15-2008, 01:32 PM
To he yan's question:

Following the Bayesian Theorem: P=(1/6*3/4)/(1/6*3/4+5/6*1/4)=3/8

juicyj
01-18-2008, 07:03 PM
1.If a is a column vector, then how many non-zero eigenvalues does the matrix aa' have? what are the eigenvalues? What are the corresponding eigenvectors? What are the eigenvectors corresponding to the zero eigen values?

Since aa’ is a rank 1 matrix, there is only one nontrivial eigenvalue. If the eigenvalue is denoted c, then aa’v=cv. Also, taking the transpose of both sides, (aa’v)’=(cv)’ meaning v’a’a=cv’. However, this time, a’a is a constant, so eigenvalue c=a’a. Now to find the associated eigenvector. Recall that a(a’v)=cv. Since a’v and c are both scalars, the equation may be rewritten (a’v)a=cv, and a is a multiple of v. Also, replacing v with a gives (a’a)a=(a’a)a, an equality. So a must be the eigenvector.

As for the eigenvectors, corresponding to 0, if a=[a_1 a_2 … a_n], then the eigenvalues are of the form

[a_2+…+a_n ] [-a_1]
[-a_2 ] [a_1+a_3+…+a_n]
[-a_3] [-a_3]
. .
. and . and so forth.
. .
[-a_n ] [-a_n]

Keep in mind there are n of these.

12. given the matrix A=(5 -3;-3 5), find a matrix M, such that A=M*M. Now find a matrix M such that A=M'*M
M=[ a b ] where a=-3sqrt(2)/2,b=sqrt(1/2) (took long time, though)
[ b a ]

Represent M as [a b] multiply M^2=A out and do algebra. You'll find a=d and c=d. After
[c d]

plugging this back into M^2=A, multiply out again. a^2+b^2=5 and 2ab=-3. Substitute and solve.

For the second part, M is symmetric, so M=M'. Thus, the same M applies. (sad part is it took me almost as much time to figure out 2nd than first.)

13. Suppose x_1, x_2...x_n are IID from [0,1] uniform interval. What is the expected value of the maximum. What is the expected value (max-min).

E[max_i {X_i}]= int_0^1 int_0^1 … \int_0^1 max_i {X_i} dx_1 dx_2 … dx_n

We have to split up the n-dimensional space [0,1]x[0,1]x…x[0,1] into sections. One section will have x_1 be the maximum, another section with x_2 the maximum, and so forth. By symmetry, we can just consider the space where x_1 is the maximum Without loss of generality and multiply by n at the end. So assuming x_1 is the max, we can use the conditional probability

E[max_i {X_i}| X_1 is max]= int_0^1 int_0^x_1 … \int_0^x_1 [x_1] dx_1 dx_2 … dx_n
= [int_0^1 … [x_1] [int_0^x_1 dx_2] … [\int_0^x_1 dx_n] dx_1]
= [int_0^1 … [x_1] [x_1] … [x_1] dx_1]
= {[1]^(n+1)}/(n+1)
=1/(n+1)

There are n of these, so E[max_i {X_i}]=n/(n+1). Off the bat, you can see that at least for n=1, this formula is true.

As for the max-min, I’m gonna make the assumption that E[max-min]=E[max]-E[min] since the integral can be parsed. Through the same argument as above,

E[min_i X_i| X_1 is the min ]= \int_0^1 x_1(1-x_1)^(n-1)dx_1=1/[n(n+1)]. Multiplying by n yields

E[min]=1/n+1, which again makes sense at lease for n=1. Thus, E[max-min]=(n-1)/(n+1).


20. Given a fair coin, what is the expected number of trials you need to go to get 2 consecutive heads. 3 consecutive heads. generalize to N.

2(1/4)+3(1/8)+4(2/2^4)+5(3/2^5)+6(5/2^6)+7(8/2^7)+8(13/2^8)+9(21/2^8)+…

I don’t have a closed form, but the formula is \sum_{i=1}^{infinity} (i+1)(F_{i-1}/2^{i+1}), where F_i are the Fibonacci numbers.

Explanation: The first two are easy. There is a ¼ chance of getting two heads on the first two flips. There is a 1/8 chance you will get THH on three rolls. From henceforth, it’s just a matter of finding the different ways you can end the sequence in THH, where the previous terms have no HH’s. This is where the Fibonacci terms come in to play. I’m too tired to generalize to N (or even 3 for that matter). Variance, forget it.

zonquan
01-22-2008, 09:55 PM
Interesting question , learn more.

Andy
01-23-2008, 01:16 AM
From GS interview
Suppose the stock S follows a geometric Brownian motion. Assume zero interest rate and dividend. Consider the two options:

Option A: Pays $1 at the end of 2nd year if stock > 100, nothing otherwise
Option B: Pays $1 at any time from now until the end of 2nd year when stock > 100. Once this is paid it terminates.

Assume that the initial stock price is strictly less than 100, what is the no-arbitrage price of option B relative to option A?

Andy
01-23-2008, 07:41 PM
I was asked this questions a while ago and I had no clue then.

Find the next 3 numbers in the sequence 183, 176, 170, 167,...

Erica
01-23-2008, 11:59 PM
minus 2 sequentially? WRONG! ans pls.

Muting
01-24-2008, 03:49 AM
From GS interview
Suppose the stock S follows a geometric Brownian motion. Assume zero interest rate and dividend. Consider the two options:

Option A: Pays $1 at the end of 2nd year if stock > 100, nothing otherwise
Option B: Pays $1 at any time from now until the end of 2nd year when stock > 100. Once this is paid it terminates.

Assume that the initial stock price is strictly less than 100, what is the no-arbitrage price of option B relative to option A?

I think the price of B under no-arbitrage argument is a little higher than A. First, B has higher probability finishing in the money(the price path can be above 100 during some period of 2 year and then go below 100 at 2 year end). And the payoff is just 1 dollar when it is in the money and there is no upside benefit. Finally, there is no cost of carry (interest rate and dividend rate are both zero). Hence early getting back the money makes no difference. So the difference is raised by the risk neutral probability of in the money. Andy, do we need to quantify for this problem?

Muting
01-24-2008, 03:51 AM
To he yan's question:

Following the Bayesian Theorem: P=(1/6*3/4)/(1/6*3/4+5/6*1/4)=3/8


I would agree with nbz's answer.

Muting
01-26-2008, 03:54 PM
1/2 is correct, and your reasoning sounds pretty good to me. What makes it work is that there are only two ways the outcome can be finally decided: by someone randomly choosing the jerk's seat, or else randomly choosing the last passenger's seat. The likelihood of these two outcomes is the same at every stage of the process; the first leads to the passenger definitely getting his/her own seat, the second leads to the passenger definitely not getting his/her own seat.

My reasoning is slightly different. Consider the last person (but not the 100th person) whose seat is taken by someone before him. Then this person has two choices: One is choose a seat which belongs to someone before him, the other is to choose the 100th person's seat. In this case, the probability is 1/2. The last person can be anyone from 2th to 99th. In all these cases, the probability is 1/2. If only the first person chose the wrong seat, he can only choose 100th person's seat. The probability is still 1/2.

Andy
02-08-2008, 01:18 PM
1. (BOfA, ML) There are a cup of milk and a cup of water. Take one teaspoon of milk,
put into the water cup; mix well. Take one teaspoon of the mixture in the water cup and put into the milk cup then mix well.
Which is higher: the percentage of water in the milk cup or the percentage of milk in the