Thursday, January 25, 2007

发信人: haotianqi2 (jacky), 信区: Quant
标 题: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 02:54:15 2007)

CS NYC quant exam

Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
Heard on the St), Finance, Computing. Each section has about 8 questions,
choose any 3 sections and only 3 section will be graded. Total 1 hour, so
approximately 4 minutes per question. Very difficult to finish every problem
in chosen 3 sections.Below is for Full-Time version exam.
Seeking solutions to a lot of questions below. You may add more questions
you remembered.

Q1.
Dice game. You get the amount of $ as the points on the upface of the dice.
If you are not satisfied with outcome, you can choose to have second round
of game and get $ according to what you got on 2nd round, if you are still
not satisfied, you can proceed to 3rd round. For such a game with 2 optoins,
how much you should charge gamblers to enter the game?
A: See “heard on the street”.

Q2.
You have a stick of length 1, then break it up into 3 pieces. What is the
probability that you can make a triangle with the three pieces.
A: Seeking solution.
Let a, b, c be the length of the 3 pieces after breaking up. Want P(a+b>c) ?
Looks like a linear programming problem but do not know how to solve (in 4
minutes).

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: Seeking solution

Q4.
Solve ODE x’=4-2x with boundary condition x(0)=1

Q5.
Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2)
known

Q6.
PDF f(x) known, F(x) is CDF , solve E[F(x))

Q7.
I have 6 coins, 3 with double Head, 1 with double Tail, 2 are normal with
Head and Tail. Pick one coin and flip it 10 times and got all Heads, what is
probability of the coin is double Head.

Q8.
One sequence a1,a2,…..an, x and another sequence b1,b2….bn, y. How to
find x, y in O(n) time. (Cannot remember exactly, someone can correct
statement?)
A: Seeking solution

Q9.
What will the following code print.
Class Base {
Base {count<< “base()”<~Base {count<< “~base()”<}

Class Member {
Member {count<< “Member ()”<~ Member {count<< “~ Member ()”<}


Class Derived: Class Base {
Member m_member;
Derived {count<< “Derived ()”<~ Derived {count<< “~ Derived ()”<}


Main {
Derived d;
Return 0;
}

A: seeking solution.
My answer is that all constructors and destructors will be called and
displayed except Base destructor since it is not claimed virtual.

Q10.
Two versions of sum of all elements in a 2D arrary using double FOR loops.
First go through all the rows, Second go through all the columns. Ask what
is better and why?
A: missed this one. Friend remind that by row is better since in a 2D array
is stored in memory by rows in sequence. For example a(2,3) is like this (
(a11, a12,a13) (a21 a22 a23) )

Q11.
Difference in pointer and reference
A: 1. pointer can point to NULL while reference cannot
2. reference point to fixed memory and cannot be changed, but pointer
value can change.
….. more?

Q12.
Given array A(n). write peudo code to compute y=A(1)x+A(2)x^2+A(3)x^3…….
That will minimize amount of multiplication
A: seeking optimal solution

Q13.
What is wrong with code below. (hint: it works, but with a number of
inefficiencies)

String AddrLookup (list l, String name) {
For (i=list.::iterator l.begin(); i!=l.end(), i++) {
{
If ( *i==name{
Return (*i).Addr ;
}
}
Return ‘ ‘;
}

A: Seeking solution.
Seems that pass by reference is better, and ……..inefficiencies?

Q14.
A question very similar to (or identical to) Question 4.8 of “Heard on the
St”) 50 yellow/blue marbles put in 2 bins…….






--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 156.111.]

我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 2 ] document.write('发信人: robertt (陈龙川), 信区: Quant
'); document.write('标 题: Re: CS NYC quant exam questions
'); 发信人: robertt (陈龙川), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 03:16:11 2007)

3 sections with 8 questions in each section, the average time for each
question should be around 2.5 mininutes, not 4 minutes.

【 在 haotianqi2 (jacky) 的大作中提到: 】
: CS NYC quant exam
: Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
: Heard on the St), Finance, Computing. Each section has about 8 questions,
: choose any 3 sections and only 3 section will be graded. Total 1 hour, so
: approximately 4 minutes per question. Very difficult to finish every
problem
: in chosen 3 sections.Below is for Full-Time version exam.
: Seeking solutions to a lot of questions below. You may add more questions
: you remembered.
: Q1.
: Dice game. You get the amount of $ as the points on the upface of the dice
.
: ...................



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 69.110.]
wms
身份:用户 上站次数:631 发表文章:537 篇 经验值:1651 表现值:15 生命力:365 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 3 ] document.write('发信人: wms (sigh), 信区: Quant
'); document.write('标 题: Re: CS NYC quant exam questions
'); document.write('发信站: BBS 未名空间站 (Thu Jan 25 04:00:30 2007)
'); 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 71.236.]
'); 发信人: wms (sigh), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 04:00:30 2007)

Q3,4,5 估计总共用不了四分钟。
【 在 haotianqi2 (jacky) 拇笞髦刑岬? 】
: CS NYC quant exam
: Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
: Heard on the St), Finance, Computing. Each section has about 8 questions,
: choose any 3 sections and only 3 section will be graded. Total 1 hour, so
: approximately 4 minutes per question. Very difficult to finish every
problem
: in chosen 3 sections.Below is for Full-Time version exam.
: Seeking solutions to a lot of questions below. You may add more questions
: you remembered.
: Q1.
: Dice game. You get the amount of $ as the points on the upface of the dice
.
: ...................



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 71.236.]
身份:版主 上站次数:3879 发表文章:16095 篇 经验值:29607 表现值:56 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转来源:·BBS 未名空间站 mitbbs.com·[FROM: 212.202.]
'); 发信人: netghost (Up to Isomorphism), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 04:52:00 2007), 转信

...........
With so many brain dump on the internet,
I think these tests are just memory tests.
【 在 robertt (陈龙川) 的大作中提到: 】
: 3 sections with 8 questions in each section, the average time for each
: question should be around 2.5 mininutes, not 4 minutes.
: problem
: .



--

※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 212.202.]
wusuowei 身份:用户 上站次数:44 发表文章:83 篇 经验值:152 表现值:40 生命力:120 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 发信人: wusuowei (wuxuowei), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 05:32:49 2007)

thanks for sharing.

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: sqrt(2)

Q4.
Solve ODE x’=4-2x with boundary condition x(0)=1
A: x(t)=2-exp(-2*t)

Q5.
Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2)
known
A: 2f'(2)-f(2)+f(0)

Q6.
PDF f(x) known, F(x) is CDF , solve E[F(x))
A: 1/2

Q7.
I have 6 coins, 3 with double Head, 1 with double Tail, 2 are normal with
Head and Tail. Pick one coin and flip it 10 times and got all Heads, what is
probability of the coin is double Head.
A: 1/(.5^10+1)

Q12.
Given array A(n). write peudo code to compute y=A(1)x+A(2)x^2+A(3)x^3…….
That will minimize amount of multiplication
A:
{
sum=0;
xp = 1;
for (i = 1 to n ) {
xp *= x;
sum += a(i) * xp
}
}



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 146.121.]
acar
身份:用户 上站次数:1348 发表文章:324 篇 经验值:3590 表现值:7 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 6 ] document.write('※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 128.12.]
'); 发信人: acar (心中的阳光), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 05:48:53 2007), 转信

How do you solve Q3? There must be some trick, right?
【 在 wusuowei (wuxuowei) 的大作中提到: 】
: thanks for sharing.
: Q3.
: Solve X from ((((((((X^X)^X)^X)^X…………)=2
: A: sqrt(2)
: Q4.
: Solve ODE x’=4-2x with boundary condition x(0)=1
: A: x(t)=2-exp(-2*t)
: Q5.
: Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2
)
: known
: ...................


--

※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 128.12.]
stillsea 身份:用户 上站次数:2032 发表文章:1889 篇 经验值:5670 表现值:16 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转 发信人: stillsea (Sunny Blue), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 06:54:43 2007)

Just to give it a shot. Correct me if you may.

Q1.
Dice game. You get the amount of $ as the points on the upface of the dice.
If you are not satisfied with outcome, you can choose to have second round
of game and get $ according to what you got on 2nd round, if you are still
not satisfied, you can proceed to 3rd round. For such a game with 2 optoins,
how much you should charge gamblers to enter the game?
A: 4.625?

Q2.
You have a stick of length 1, then break it up into 3 pieces. What is the
probability that you can make a triangle with the three pieces.
A: 1/8

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: 2^(1/4)


--
发信人: haotianqi2 (jacky), 信区: Quant
标 题: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 02:54:15 2007)

CS NYC quant exam

Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
Heard on the St), Finance, Computing. Each section has about 8 questions,
choose any 3 sections and only 3 section will be graded. Total 1 hour, so
approximately 4 minutes per question. Very difficult to finish every problem
in chosen 3 sections.Below is for Full-Time version exam.
Seeking solutions to a lot of questions below. You may add more questions
you remembered.

Q1.
Dice game. You get the amount of $ as the points on the upface of the dice.
If you are not satisfied with outcome, you can choose to have second round
of game and get $ according to what you got on 2nd round, if you are still
not satisfied, you can proceed to 3rd round. For such a game with 2 optoins,
how much you should charge gamblers to enter the game?
A: See “heard on the street”.

Q2.
You have a stick of length 1, then break it up into 3 pieces. What is the
probability that you can make a triangle with the three pieces.
A: Seeking solution.
Let a, b, c be the length of the 3 pieces after breaking up. Want P(a+b>c) ?
Looks like a linear programming problem but do not know how to solve (in 4
minutes).

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: Seeking solution

Q4.
Solve ODE x’=4-2x with boundary condition x(0)=1

Q5.
Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2)
known

Q6.
PDF f(x) known, F(x) is CDF , solve E[F(x))

Q7.
I have 6 coins, 3 with double Head, 1 with double Tail, 2 are normal with
Head and Tail. Pick one coin and flip it 10 times and got all Heads, what is
probability of the coin is double Head.

Q8.
One sequence a1,a2,…..an, x and another sequence b1,b2….bn, y. How to
find x, y in O(n) time. (Cannot remember exactly, someone can correct
statement?)
A: Seeking solution

Q9.
What will the following code print.
Class Base {
Base {count<< “base()”<~Base {count<< “~base()”<}

Class Member {
Member {count<< “Member ()”<~ Member {count<< “~ Member ()”<}


Class Derived: Class Base {
Member m_member;
Derived {count<< “Derived ()”<~ Derived {count<< “~ Derived ()”<}


Main {
Derived d;
Return 0;
}

A: seeking solution.
My answer is that all constructors and destructors will be called and
displayed except Base destructor since it is not claimed virtual.

Q10.
Two versions of sum of all elements in a 2D arrary using double FOR loops.
First go through all the rows, Second go through all the columns. Ask what
is better and why?
A: missed this one. Friend remind that by row is better since in a 2D array
is stored in memory by rows in sequence. For example a(2,3) is like this (
(a11, a12,a13) (a21 a22 a23) )

Q11.
Difference in pointer and reference
A: 1. pointer can point to NULL while reference cannot
2. reference point to fixed memory and cannot be changed, but pointer
value can change.
….. more?

Q12.
Given array A(n). write peudo code to compute y=A(1)x+A(2)x^2+A(3)x^3…….
That will minimize amount of multiplication
A: seeking optimal solution

Q13.
What is wrong with code below. (hint: it works, but with a number of
inefficiencies)

String AddrLookup (list l, String name) {
For (i=list.::iterator l.begin(); i!=l.end(), i++) {
{
If ( *i==name{
Return (*i).Addr ;
}
}
Return ‘ ‘;
}

A: Seeking solution.
Seems that pass by reference is better, and ……..inefficiencies?

Q14.
A question very similar to (or identical to) Question 4.8 of “Heard on the
St”) 50 yellow/blue marbles put in 2 bins…….






--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 156.111.]

我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 2 ] document.write('发信人: robertt (陈龙川), 信区: Quant
'); document.write('标 题: Re: CS NYC quant exam questions
'); 发信人: robertt (陈龙川), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 03:16:11 2007)

3 sections with 8 questions in each section, the average time for each
question should be around 2.5 mininutes, not 4 minutes.

【 在 haotianqi2 (jacky) 的大作中提到: 】
: CS NYC quant exam
: Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
: Heard on the St), Finance, Computing. Each section has about 8 questions,
: choose any 3 sections and only 3 section will be graded. Total 1 hour, so
: approximately 4 minutes per question. Very difficult to finish every
problem
: in chosen 3 sections.Below is for Full-Time version exam.
: Seeking solutions to a lot of questions below. You may add more questions
: you remembered.
: Q1.
: Dice game. You get the amount of $ as the points on the upface of the dice
.
: ...................



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 69.110.]
wms
身份:用户 上站次数:631 发表文章:537 篇 经验值:1651 表现值:15 生命力:365 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 3 ] document.write('发信人: wms (sigh), 信区: Quant
'); document.write('标 题: Re: CS NYC quant exam questions
'); document.write('发信站: BBS 未名空间站 (Thu Jan 25 04:00:30 2007)
'); 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 71.236.]
'); 发信人: wms (sigh), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 04:00:30 2007)

Q3,4,5 估计总共用不了四分钟。
【 在 haotianqi2 (jacky) 拇笞髦刑岬? 】
: CS NYC quant exam
: Four sections: Maths(heavily probability), Puzzle(Brainteezer, some from
: Heard on the St), Finance, Computing. Each section has about 8 questions,
: choose any 3 sections and only 3 section will be graded. Total 1 hour, so
: approximately 4 minutes per question. Very difficult to finish every
problem
: in chosen 3 sections.Below is for Full-Time version exam.
: Seeking solutions to a lot of questions below. You may add more questions
: you remembered.
: Q1.
: Dice game. You get the amount of $ as the points on the upface of the dice
.
: ...................



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 71.236.]
身份:版主 上站次数:3879 发表文章:16095 篇 经验值:29607 表现值:56 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转来源:·BBS 未名空间站 mitbbs.com·[FROM: 212.202.]
'); 发信人: netghost (Up to Isomorphism), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 04:52:00 2007), 转信

...........
With so many brain dump on the internet,
I think these tests are just memory tests.
【 在 robertt (陈龙川) 的大作中提到: 】
: 3 sections with 8 questions in each section, the average time for each
: question should be around 2.5 mininutes, not 4 minutes.
: problem
: .



--

※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 212.202.]
wusuowei 身份:用户 上站次数:44 发表文章:83 篇 经验值:152 表现值:40 生命力:120 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 发信人: wusuowei (wuxuowei), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 05:32:49 2007)

thanks for sharing.

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: sqrt(2)

Q4.
Solve ODE x’=4-2x with boundary condition x(0)=1
A: x(t)=2-exp(-2*t)

Q5.
Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2)
known
A: 2f'(2)-f(2)+f(0)

Q6.
PDF f(x) known, F(x) is CDF , solve E[F(x))
A: 1/2

Q7.
I have 6 coins, 3 with double Head, 1 with double Tail, 2 are normal with
Head and Tail. Pick one coin and flip it 10 times and got all Heads, what is
probability of the coin is double Head.
A: 1/(.5^10+1)

Q12.
Given array A(n). write peudo code to compute y=A(1)x+A(2)x^2+A(3)x^3…….
That will minimize amount of multiplication
A:
{
sum=0;
xp = 1;
for (i = 1 to n ) {
xp *= x;
sum += a(i) * xp
}
}



--

※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 146.121.]
acar
身份:用户 上站次数:1348 发表文章:324 篇 经验值:3590 表现值:7 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转贴] [ 6 ] document.write('※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 128.12.]
'); 发信人: acar (心中的阳光), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 05:48:53 2007), 转信

How do you solve Q3? There must be some trick, right?
【 在 wusuowei (wuxuowei) 的大作中提到: 】
: thanks for sharing.
: Q3.
: Solve X from ((((((((X^X)^X)^X)^X…………)=2
: A: sqrt(2)
: Q4.
: Solve ODE x’=4-2x with boundary condition x(0)=1
: A: x(t)=2-exp(-2*t)
: Q5.
: Solve integral int(xf’’(x)dx from 0 to 2. with f(0) f(2) f’(0) f’(2
)
: known
: ...................


--

※ 来源:·BBS 未名空间站 mitbbs.com·[FROM: 128.12.]
stillsea 身份:用户 上站次数:2032 发表文章:1889 篇 经验值:5670 表现值:16 生命力:666 我的博客 [回复文章] [回信给作者] [本篇全文] [进入讨论区] [返回顶部] [删除文章] [转寄] [转 发信人: stillsea (Sunny Blue), 信区: Quant
标 题: Re: CS NYC quant exam questions
发信站: BBS 未名空间站 (Thu Jan 25 06:54:43 2007)

Just to give it a shot. Correct me if you may.

Q1.
Dice game. You get the amount of $ as the points on the upface of the dice.
If you are not satisfied with outcome, you can choose to have second round
of game and get $ according to what you got on 2nd round, if you are still
not satisfied, you can proceed to 3rd round. For such a game with 2 optoins,
how much you should charge gamblers to enter the game?
A: 4.625?

Q2.
You have a stick of length 1, then break it up into 3 pieces. What is the
probability that you can make a triangle with the three pieces.
A: 1/8

Q3.
Solve X from ((((((((X^X)^X)^X)^X…………)=2
A: 2^(1/4)


--

Thursday, December 28, 2006

Dec 28th, 2006

1. figure out the random number generator
2. bar cap application

Monday, December 25, 2006

Dec 25th, 2006

Done :

1. briefly read out the interest rate model in Financial Calculus
2. think out the plan of coding practice provided by HH.

Plan to do:

1. carefully read the interest rate model chapter
2. check out hull's monte carlo simulation chapter
3. review what I have done yesterday.
4. think of a new brain teaser:http://mitbbs.com/article_t/Programming/14682363.html