Vous êtes sur la page 1sur 10

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.
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?

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?
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 p21 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.

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

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 ?

>> IF a total of 50 coins equals one dollar.


>> and one coin is lost, what's the probabi lity that it was a penny?

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?

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

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)

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)
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.
The sample space is 6^3

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.

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?

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.

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 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?

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]

3. (GS) There are 5 thieves numbered 1,..,5 trying to divide 100 gold coins using this algorithm: the
number 1 will come up with a way to divide money, if there is more than 50% agreement among them
about his method (including the dividing thief) then it's done. If not, then they will kill the first thief and
the second thief will divide money coming up with his own method. If you are the first one, what method
you will use to divide money ?
4. (SG) There is a cubic cheese 3x3x3. There is a rat eating this cheese in the following manner: it east a
corner (1x1x1) of the cubic the first day. The next day, it will eat another 1x1x1 cell which has the same
outer face as the one it eats the day before. Find an algorithm so that the rate can eat the center cell the
last day.

Here's a list of programming questions from a quantitative prop trading company in London. Credit for
VNQF
1. Write a function to print the first N Fibonacci numbers
2. You have an ordered, doubly-linked list. Write a function to insert a new, arbitrary element into the
list, maintaining the order of the list. Assume the comparison operators < and > correctly
compare elements of the list.
3. How can you prevent deadlocks in a multi-threaded application?
4. Describe the similarities and differences between blocking and asynchronous I/O.
5. Given an array of 1002 numbers in the range of 1-1000 with two numbers duplicated, write
pseudo-code with the following characteristic to determine the duplicate numbers (for clarity, there
are two different numbers that appear twice in the array). It is fine to alter the array.
o Optimized for speed
o Optimized for memory
o What is the efficiency of each of your two algorithms (Big-O notation)?
6. On an analog clock, how many degrees are between the big hand and the little hand when the time
is 5:15? At what point (to the nearest fraction of a minute) will the hands next meet?
7. Write a function to print out the data in a binary tree, level by level, starting at the top.
8. Write a function to determine if there is a cycle anywhere in a linked list.
9. Describe the similarities and differences between TCP and UDP.
10. There is a series of numbers in ascending order. All these numbers have the same number of binary
1s in them. Write a function f(m, n) that returns the nth number in the ascending series of numbers
with m 1-bits set. For example, f(1, 2) is 2.
11. Describe the similarities and differences between a thread and a process.
12. Java: How are synchronized, wait, and notify used?
13. Write a function to convert a string into a signed integer (not using library functions).
14. Write a function to convert a signed integer into a string (not using library functions).

15. Write pseudo-code to sort a file containing up to 10 million records where each record is a unique
7-digit integer.
16. In general, how would you describe your own code?

A geeky quantitative finance society in Manhattan has 500 members. One day the steering committee
decides to throw a dance party to welcome the new members. At the party (which only members can
attend), new members pay only $14 for tickets whereas long-time members pay $20. As a result, all of the
new members attend but only 70% of the old members attend.
How much ticket revenue is collected at the party?

A STRATEGY PROBLEM
There are three urns A, B and U. Urn A is initially empty. Urn B contains two identical balls, one white,
the other black. Urn U contains 2280 balls, all identical except for color. Of the balls in urn U, 1000 are
white and 1280 are black. From urn U two balls are randomly drawn, away from our sight, and placed
inside urn A. You cannot see the contents of urn A.
You are invited to play the following game that involves two stages. In the first stage you choose either
urn A or urn B to randomly draw a single ball from. You may not choose both urns. If the ball drawn is
white, then you wind $55,000 and if black, you win nothing and lose nothing. The drawn ball is returned
to the urn from which it was picked. In the second stage, you are again to choose either urn A or urn B to
randomly draw a single ball from. You many not choose both urns. If the ball drawn is white, then you win
$55,000 and if black, you win nothing and lose nothing.
What strategy do you choose to play this game with if your goal is to maximize your winnings? In the first
stage, which of the urns A or B do you choose to randomly draw a single ball from?
A strategy aims at a set of goals and actions and involves conscious choices of sequential decisions wherein
later decisions are influenced by prior results.

Prob 1.
Two points are randomly selected on the sides of a unit square. Find the probability that the distance between them is less than unity.

There are in all 10 possibilities to arrange these two points on the sides of the squareA- 4 ways to select them on the same side
B- 2 ways to select them on opposite sides
C- 4 ways to select them on adjacent sides
(Assuming that the two points are the same,i.e. putting point 1 on side 1 and point 2 on side 3 is the same
as putting point 2 on side 1 and point 1 on side 3. )
Now analyzing each of these categories,
A- In the 4 ways out of 10 to select the points on the same side, their distance will surely be less than unity.
Hence p(A) = 4/10 * 1 =0.4
B- There are 2 ways to select them on opposite sides. Their distance will never be less than unity in this
case. Hence p(B)=2/10 * 0 = 0
C- In case C when two points are on the adjacent sides, the minimum distance b/w them can be 0 and the
max distance can be sqrt(2)=1.4142.
So the chances of selecting a random distance within the range (0,1.4142) such that it is less than one is
1/1.4142 = 0.7071
Hence the calculation for case C will become p(C)=4/10 * 0.7071 = 0.2828
The answer would then be=p(A) + p(B) + p(C) = 0.4 + 0 + 0.2828 = 0.6828

Two points are randomly selected on the sides of a unit square. Find the probability that the distance
between them is less than unity."
I think this way. You have 4 out 10 chances of being both points on the same side with probability 1 and 4
out 10 times of being inadjacent times with probability Pl=Integral[SQRT(1-(1-x)^2] between 0 and 1,
which is Pi/4, being x the distance from one corner of the square to certaing point on a side. Therefore you
have.
P=2/5(1+PI/4)=71%.

Your counting method is incorrect as it blurs the distinction between the points. It is more accurate to
allow for permutation of the points by considering the points as distinct. Here's what I mean: let P denote
the first point and Q the second. Let P-1 denote the placement of point P on side 1, and Q-3 denote the
placement of point Q on side 3, for example. Once you begin to take a COMPREHENSIVE approach to
your counting method, you will leave no case missed out and you'll never over-count. So, we will consider
the following two placements as different: (P-1 & Q-3) and (P-3 & Q-1).
You will see at once that the probability that the two points will be on the same side is 1/4, exactly what
we've always known, and exactly what rocket said.
Also:
I've solved this problem already. See my post of 06-14-2008. The answer is(2+pi)/8.

2. A bug, beginning from the bottom of a 10 meter hole, crawls up at the rate of one meter per hour, but at the strike of every hour the
bug falls back one-tenth of its total displacement from the bottom. How long does it take the bug to get itself to the edge of the hole
opening?

As for the second one, I wrote an algorithm for that and after tweaking it, I believe the answer is that the
bug never quite reaches the edge of the hole. It gets infinitesimally closer for an infinitely long time, but
never reaches the ten meters. Poor critter.
Here's my source code (complete with print statements for debugging...) (On that note, I have to get used
to compile/running every so often rather than writing everything and then running it...I'm a bit spoiled by
scripting...sorry):
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!\n";
double dist;
double time;
cout<<"Dist and time declared!\n";
dist=1;
time=0;
cout<<"Dist and time initialized!\n";
while(dist<10)
{
cout<<"The loop is now running. \n";
dist*=0.9;
cout<<"This is the distance after the fall. "<<dist;

dist++;
time++;
cout<<"The time is now "<<time<<". The distance is now "<<dist<<". \n";
}
cin.get();
}
Here's quantyst's solution:
The bug can never reach the edge no matter how long or how many times it tries. Here's why:
As long as bug's position is less than the 9 meter level in the hole, it can never get to a position above or at
the level 9 meters from which it can crawl up further.
Let x denote the position of the bug at any time before it has reached the 9 meter level.
So, x<9.
Now, the bug crawls up for 1 meter to position x+1,and we have: x+1<10.
Now the bug falls back by one-tenth of this new position. Subtracting one-tenth (.1) of any number from
itself is the same as multiplying the original number by nine-tenths(.9).
So, we multiply both sides of x+1<10 by nine-tenths (.9):
(.9)*(x+1)<10*(.9)=9.
So, the new position is (.9)*(x+1) and is AGAIN less than 9.
What this proves is that as long as the bug is below the level 9 meters, it will continue to stay below level 9
meters.