Forums  > Careers  > Re: some interview question  
     
Page 1 of 7Goto to page: 1, 2, 3 ... 6, 7 Next
Display using:  

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-28 20:02

    Consider the following C program for producing Fibonacci numbers

Int Fibonacci(int n)

{ if (n <=011 n==1) return 1;

else  return Fibonacci(n-1)+Fibonacci(n-2);}

If for some large n, it takes 100 seconds to compute Fibonacci(n), how long will it take to compute Fibonacci(n+1), to the nearest second?


Energetic
Forum Captain

Total Posts: 1381
Joined: Jun 2004
 
Posted: 2004-09-28 21:08
162 seconds.

Pirate Flag Quote me as saying I was misquoted.

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-28 21:51
Kinda of (1+sqrt(5))/2 * 100 , right?

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-28 22:06
what about this one? Suppose that 2 cylinders each with radius 1 intersect at right angles and their centers also intersect. What is the volume of the intersection ?

Energetic
Forum Captain

Total Posts: 1381
Joined: Jun 2004
 
Posted: 2004-09-28 22:22

a. You got it.

b. I certainly was able to solve this stuff in high school but now I'm afraid to get a headache in the process. Run a MC simulation Smiley


Pirate Flag Quote me as saying I was misquoted.

drews


Total Posts: 276
Joined: Jun 2004
 
Posted: 2004-09-28 22:47

Intersecting cyllinders problem can be solved by a very simple integration, google for 'Steinmetz solid'. Crossections of that object by 3 perpendicular planes are: 2 circles and a square


Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-29 18:11
Here is another one, consider X_t = m*t+ B_t where B is a standard Brownian motion, what's the probability of X_t hit 3 before it hit -5?  I know a very nice way of this for m=0, but for m<>0, is there a elegant answer?

chiral3
Founding Member

Total Posts: 4345
Joined: Mar 2004
 
Posted: 2004-09-29 18:21
Martingale, that one was all you, considering your background.  Is the elegant way doob?

What do you mean by **drag** the range"? If you just mean expand the column width, that doesn't work. NUM!

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-29 18:27
Yes, Doob' way, for m=0 you have a neat answer, but what about for m<>0?

Energetic
Forum Captain

Total Posts: 1381
Joined: Jun 2004
 
Posted: 2004-09-29 19:28
Now, for the rest of us, doob it out, pls.

Pirate Flag Quote me as saying I was misquoted.

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-29 20:22

Let's just stick to m=0 case where X_t is a standard BM.

Let tau =inf{t: X_t = 3 or X_t = -5}, tau1 = {t: X hit 3 before -5}, tau2={t: X hit -5 before 3}

Consider the martingale M_t = X_min{tau, t}, by Doob's sampling theorem E X_tau = X_0 =0. X_tau = 3 on {tau = tau1} and X_tau = -5 on {tau = tau2}; we get two equations

 P{tau=tau1}+P(tau=tau2) = 1

E X_tau = 0 can be written as

3P{tau = tau1} +(-5)*P{tau=tau2} = 0

you get P{X hit 3 before -5} = P{tau =tau1} = 5/8.


monkeyA
Mr. Ass to you

Total Posts: 834
Joined: Apr 2004
 
Posted: 2004-09-29 20:57
very neat!  I like.

If there was problem, Yo I'll solve it

chiral3
Founding Member

Total Posts: 4345
Joined: Mar 2004
 
Posted: 2004-09-29 21:03
admittedly I don't know how to do the m<>0 case

What do you mean by **drag** the range"? If you just mean expand the column width, that doesn't work. NUM!

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-29 21:10
I am wondering if there's some neat way, but after all, we know the joint distribution of minimum, maximum and BM itself for some linear barrier, we can do something from there, just wonder if there's any other short cut............

silverside


Total Posts: 866
Joined: Jun 2004
 
Posted: 2004-09-30 01:38

I remember seeing this (I think in mj's book) - the derivation took a few pages and involved 2 applications of Girsanov, one to remove the drift, one to put it back in.

Yeah the doob trick is neat, easy once you know how, and it did come up in an interview!


Energetic
Forum Captain

Total Posts: 1381
Joined: Jun 2004
 
Posted: 2004-09-30 16:24

Very neat!

It's a great problem for a take-home test or, maybe, for an open book test (though a big stretch, IMHO). But I'll tell you one thing. I don't want to work for a sonofabitch who throws in this sort of shit during regular interview. There can be no purpose other than to humiliate the candidate.


Pirate Flag Quote me as saying I was misquoted.

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-30 16:30
I have thought about the Girsanov trick, yet to pull all things together. E, I was thown problems like this even at Phone interviews...oh well....

Energetic
Forum Captain

Total Posts: 1381
Joined: Jun 2004
 
Posted: 2004-09-30 17:07

M, I'm serious: don't deal with the phuckers. You'll be unhappy with them.

 

 


Pirate Flag Quote me as saying I was misquoted.

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-30 17:12
I know....  in fact , I have spoke to quite some big names and they never torture people like this over the phone, but some phuckers enjoy this and they always wanted to kill you....

kr
Founding Member
NP Raider
Total Posts: 3560
Joined: Apr 2004
 
Posted: 2004-09-30 20:37

I'm wondering if there is a clever way to do this using Fourier transforms... initially I thought one could quickly work out the case where you have to hit the barriers before a finite time T_0, then figure out how to piece a couple of these together. Then take the limit and see how the thing turns out.  But for this one needs the distribution of starting points for the second segment conditional on staying in the channel - I think this is not too pleasant. 

This is a problem I've been interested in b/c I was thinking that views on the trajectory of the underlying could be quickly translated into a kind of option valuation... I.e. guy says: I am 101% sure that X will go up 5% in the next 2 months.  But, in the -1% chance that it falls by 10%, I'm gonna close out and eat my hat... Anyhow, translate these views into some ugly knockout option, which you're not actually going to buy, but which you are going to value in a risk-neutral way... i.e. Market says prob(this guy wins) is 50-50, he is a dumb analyst, don't listen to him. 


my bank got pwnd

Martingale
NP House Mouse

Total Posts: 2527
Joined: Jun 2004
 
Posted: 2004-09-30 22:55
Yes, unfortunately for general case, we have to resort to Laplace transform sheah to get the density and so on, see for example: http://users.ox.ac.uk/~newc1186/finance/pel_2000_dble_laplace_analytics.pdf

BigApple


Total Posts: 1
Joined: Oct 2004
 
Posted: 2004-10-01 06:51
The driftful BM problem does have an elegant solution basically following the martingale method that Martingale outlined above. Just 3 or 4 lines more! Certainly not a few pages nor Girsanov theorem involved!

On my way to provide the reference or even a refined solution right here, but this whole thread sounds like being taken from a screening (take-home) test of Goldman Sachs. (Fibonacci, two cylinders, and this m0 BM one. Wouldn't be surprised if the best-of-seven game series question pops up here tomorrow.) For your knowledge, I wouldn't mind to tell you the details; but for your job interview where your true abilities are under test, it'll be unethical if I do so. Sorry... A close friend of mine was even let to struggle with these questions when he ran into Goldman, despite that I prepared him from his resume to interview practice. Anyhow, good luck!

Energetic, the Goldman test was take-home, although some sadists out there take great joy humiliating (out of revenge, perhaps???)

Patrik
Founding Member

Total Posts: 1043
Joined: Mar 2004
 
Posted: 2004-10-01 14:11

Everyone seems to have stories about tougher-than-hell interviews with Goldie Sticks. Are they really that bad or is there an element of myth involved here?

From the stories I've read here and at the other place it sounds like they have a 100 people grilling candidates for days, without any food or water, ask hard things, etc. You almost get the feeling that they have a dark room and one of these very bright lights in your eyes etc - sort of like the strategies carried out by the bad guys in a movie when they are trying to get information from some poor hero Smiley

 


Paper Trading - Capital Structure Demolition, LLC Radiation

DW


Total Posts: 504
Joined: Jun 2004
 
Posted: 2004-10-01 14:25
Having placed a number of guys in their quant groups I can say that all the stories are true! Their IRD and Credit groups seem to be slightly tougher than Equities. Also, there are members of this forum who have successfully made it through the hoops, perhaps they can shed some light on whether they thought it was tough or not.

Johnny
Founding Member

Total Posts: 4331
Joined: May 2004
 
Posted: 2004-10-01 15:06

Everyone seems to have stories about tougher-than-hell interviews with Goldie Sticks. Are they really that bad or is there an element of myth involved here?

I heard about a guy that had to spent his entire summer there from morning til night in a darkened room having to programme weird commodities sheaaa in a weird homemade script. Terrible. I don't know why anyone would put themselves through that. Maybe Patrik you heard a story like that too?

 

 


Stab Art Radiation Capital Structure Demolition LLC
Previous Thread :: Next Thread 
Page 1 of 7Goto to page: 1, 2, 3 ... 6, 7 Next