• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Quantitative Interview questions and answers

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 !
 
Another probability Question

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
 
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.
 
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.
 
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.
 
Last edited by a moderator:
number theory problem

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?
 
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%.
 
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 ...
 
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.
 
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...
 
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
 
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?
 
10 min interview question

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
 
I still not sure if I got it right. Any ideas?
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".
 
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... :)
 
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\)
 
Back
Top