Saturday, December 30, 2006

Constellation Energy Strategist Group on-site interview Questions

标 题: Constellation Energy Strategist Group on-site interview Questions
发信站: BBS 未名空间站 (Sat Dec 30 15:49:26 2006)

I spent a super Friday at Constellation’s headquarter at Baltimore with
their strategist groups people. Each of us (candidates) was put in a small
room and 14 people divided in 7 groups rotated and talked to us each for
like 40 minutes.
Try to answer below questions but there is no guarantee.

Q1
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.
A: Use Binary tree. You will find 50% chance coming back to A at 2n th round
move (thus consume time 2n) from previous round move. So
S=2*(2*1/4+4*1/16+6*1/64+…)=sum(n/2^n) n from 0 to inf.

Q2
Given arbitrary integer, come up with a rule to judge if it is divisible by
9. Prove it.
A: sum up digits of the integer, if sum is more than 10, digits of the sum
again, till you have a single-digit number. If it is 9, then it is divisible
by 9.
Prove: Use induction.
Say you have a number in (100.999) and let it be 100H+10*T+D=99H+9*T+ (H+T+D
), apparently last term (sum of digits) is what we need to prove. It is 3-
digits and true for arbitrary digits.
It is true for 9(n=1, n is number of digits). Then suppose it is true for
arbitrary n, and then prove it is true for n+1.

Q3
What is the properties of p^2-1 where p is prime number larger than 3
A: Divisible by 24. p^2-1=(p+1)(p-1). Consider p-1,p and p+1. They are
consecutive, so one of them is divisible by 3 and it cannot be p. p is odd,
so both p-1 and p+1 are even. Also they are two consecutive even numbers, so
at least one of them is divisible by 4 and the other by 2. Put all together
, the number is divisible is 3*2*4=24

Q4.
There are 100 balls in a bin. Pick one out and number it, then put it back.
Then pick one ball again from bin. If it is numbered already, just put it
back, otherwise number it then put it back. Continue the process till all
balls in the bin are numbered. What is mean numbers of picks needed?
Evaluate the expression numerically.
A: S=100/100+100/99+…..100/1)=100*sum(1/n) n from 1 to 100

Q5.
Evaluate integral of exp(-x^2) from –inf to inf.
A: Expression integrated is similar to Normal distribution PDF, so come out
to be 1 times a factor.

Q6.
There are two targets on a wall. You have n balls. Every time you shoot a
ball on the target, you get $1. Develop a strategy to max your earn.
A: Think of two targets as two circles in a big rectangle (wall). By
symmetry you should center on the line connecting centers of two circles. To
fix a target shooting center, come up with an assumption of the
distribution of landing point of your ball around that center. (ball will
have equal chance to land on circle of certain radius centered around your
target point). Then develop expression of money earned (as function of
distance to center of one target circle), take derivative wrt variable, u
can decide the target point.

Q7.
Given a series X. Find y such that S=sum(abs(xi-y)) is minimized. xi is ith
element of X.
A: S actually is sum of distance of y to all elements of X (1D). So y must
be in (xmin, xmax). And S is constant if X has even number of elements. y
should be median of X if X has odd number of elements.

Q8.
Dice game. One dollar for one point. If you have option to continue to play
second round, what is min points you need to see in order to continue (
expectation of earning with one option). If you have 2nd option to play
third round, what is min point for second round you need to see at 2nd round
((expectation of earning with two options). Program to find mean gain of nth
round game. 一个fair dice掷三次,你有两次机会可以喊停,一旦喊停,色子上给出
几,你就得几块钱。求最佳策略。
A: See “heard on the street”.

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

Q10.
If a nonhomogenous string can burn and last 30 mins and another string can
last 60 minutes. It is burning at constant rate of materials but not
constant speed since strings are not even along length. How can you time 45
mins.
A: Connect two and burn from both ends.

Q11.
5 Pirates share golden coins problem.

Q12.
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?
A: Use induction. S(n)=S(n-1)+2*S(n-2). If you finished 99 steps, there is
only one way to finish the last step to finish all 100 steps; If you
finished 98 steps, there are 2 possible ways to finish two remaining steps:
either 1+1 or 2.

Q13.
A 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.
A: Principal of momentum. Ball will move back same speed (as relative speed
before hitting the wall) after hitting relative to wall. Before hitting
relative speed is 60, so after hitting relative speed is -60. Since wall is
moving at 60, so ball will stay still after hitting.

Written questions:
There are 8 questions, 4 for maths and 4 for programming. Need to finish in
1 hour.
Q1. Solve an ODE.
Q2. Given variances and covariance of X and Y. Z=a*X+b*Y. Calc variance of
Z.
Q3. Develop a function to return a list that is inverse order of given
singly linked list.
Q4. Given an array of length m and ask to develop another array containing
average of n consecutive numbers moving rightward in original array with
most efficient algorithm.
A: When calculate moving average of the next n consecutive numbers, you want
to reuse the previous computed moving average. Just multiply that average
by m, minus first number and add a new number, then divide by m again.

Thursday, December 28, 2006

问个统计问题

发信人: AliYoung (老汗~), 信区: Statistics
标 题: 问个统计问题
发信站: BBS 未名空间站 (Thu Dec 28 09:03:58 2006), 站内

变量z有N个观测数据,且已知z=x+w,w为白噪,均值0,方差R,
现在要估计这一段观测数据的信噪比(\sum x^{2}/\sum w^{2}),
请问有什么好方法?
我用下面的方法看起来是无偏估计,但是好像估计的可信度太差,
SNR的估计=(\sum z^{2}-NR)/NR,
问题:E(SNR的估计-SNR)^{2}的值是多少?即这个估计的方差是多少?

Thursday, December 21, 2006

covariance QR 矩阵

covariance matrix是对称矩阵,用QR分解,逆序相乘可以很快求得近似解
对于很大的矩阵没有必要通过解线性方程得到精确解,可以用收敛比较快的方法得到相
对精确的近似解,比如用matlab的QR函数

a=[.....];

for i=1:10
[q,r]=qr(a);
a=r*q;
end

target = qr(a)


太大的矩阵不知道有效果没。。。

Sunday, December 10, 2006

从《肖申克的救赎》看一个人成功需要的素质zz

发信人: 米兰王朝 (redeem), 信区: movie
标 题: [转载] 从《肖申克的救赎》看一个人成功需要的素质zz
发信站: 两全其美网 (Sat Dec 9 13:13:48 2006), 本站(lqqm.net)

【 以下文字转载自 In70s 讨论区 】
【 原文由 米兰王朝Sat Dec 9 13:13:40 2006 发表 】
发信人: liuxi (帅得想毁容), 信区: Movie
标 题: 从《肖申克的救赎》看一个人成功需要的素质(原创)
发信站: 一塌糊涂 BBS (Tue Jun 1 12:52:45 2004), 本站(ytht.net)

《肖申克的救赎》确实是一部不可多得的好片,看了以后感触良多。很多人都发表了对《肖申克的救赎》的见解,但我有些自己的观点想和大家探讨。
很多人在介绍上都说,安笛是在看到了监狱的黑暗才计划出逃的,我不这么认为。
我认为自安笛一进监狱就没打算“安分守纪”地待着(这我觉得也是这个人物的一
个个性魅力所在),即使安分也是一种无奈。当他看到墙的质地以后,即使还没有
发生后面那些使他绝望的遭遇,他就开始挖洞酝酿出逃了。

电影给我们的启发在于:
1.在极度艰苦绝望环境下的坚强。
当主人公被冤判两个终生监禁,从人生的高峰跌入低谷以后,并没有怨天由人,
只是默默忍受,积蓄力量,等待那个不知何时才能到达的机会。甚至被毒打,
*奸,种种从身体到心灵的折磨。这与我们现实的一些思维不是很相似吗?
现实中很多人都在抱怨,抱怨自己的学历,遭遇,自己的工作。难道我们的情
况比安笛还惨?要知道,成功的前提是坚强和忍耐。

2.培植自己的朋友
主人公进监狱以后,就和red搭上关系,red也很照顾安笛。一起修屋顶就是red搞
来的好差事。当然安笛马上抓助了帮狱警队长继承遗产这件事,回报了red一伙,
使他更加熔入到red一帮人中。他帮了狱警队长,而没有提个人要求,而是请red
他们喝酒这点很值得思考。我们做人的时候,可能为了一点小利益就抛弃了朋友,
这样的人是最傻的。因为你永远也无法知道朋友什么时候能帮上你。而实际上,
帮上按笛的人其实只是red,而且是小忙,那个按笛用来挖洞的锤就是red帮忙搞的。
但是别忘了,没了这个小小的东西,如何才能实现后面的计划?而且重要的是,
没有这些朋友从精神上的支持,他如何度过这些岁月?

3.结识或利用有权的人(这个我自己都觉得这个标题太功利了,但不知道怎么改好、
呵呵)
但是安笛帮忙狱警队长继承遗产,帮狱长洗黑钱,帮监狱里面的警察报税。也不
能说他故意巴结,他要么是被迫,要么是利人利己,搞好关系,自己后来也得到
很多好处。

4.看到机会的存在
人生至少有一次改变你命运的机会,但大部分人却抓不住。这好象是郑渊洁说的。
为什么抓不住,我看还是大部分人看不见那就是个机会。机会蕴藏在小事中。当
安笛在墙上刻字的时候,掉了一块土下来。他马上预料到这是个机会。还有他帮
狱长洗黑钱时,也看到这是机会,才留了一手。我怀疑狱长的黑钱计划是不是安
笛策划的,要不然狱长以前怎么没想到呢?
原来看过一个真实的故事,一个捡易拉罐卖的(名字忘了)。这样的人到处都有
把,一般人就是踩扁,然后卖掉,换点小钱。他就不同,他想这个罐子是什么材
料做的?然后花600块钱到金属研究所化验,得知这是一种比较贵的合金。他就
把别人的易拉罐收来,化成金属块,然后高价卖出,很快就有了好几百万。

5.有预见性,未雨绸缪
安笛开始挖洞时,并没有打算出逃,因为时机还未成熟。他就有先见,
静静等待。也许狱长没叫他洗黑钱,他就没有那么容易出逃。这个时机未来之前,
他等了很多年。有时要问问自己有没有这个先见之明和耐性。机会永远关照有准备的人,
这是千古真理。

这些道理其实大家早就听说过,但还是要佩服这个故事《肖申克的救赎》里面的
主人公,他把这些素质都天衣无缝得发挥出来了。从那种绝望的环境中获得新生。
可以说这个人伟大,体现出了一种真正的强者气息。影片中安笛对red说人始终
要有希望,这对red来说几乎是不敢想的。这简单的话说出了何种的自信,何种
的王者风范,因为他为自己的希望准备了19年。初次看这部片的时候被深深得震
撼了,所感慨的不是上面的什么成功之道,而是一个人的人格魅力,一个看似平凡
的强者。但那种感觉我无法用语言形容。

Wednesday, December 06, 2006

关于面试的一些感触

标 题: 关于面试的一些感触
发信站: BBS 未名空间站 (Tue Dec 5 17:20:53 2006)

看了waitingGC 的大作,有一些同感。趁着今天有空,
写下一些,希望能够有点帮助。我是搞IT的,有几年经
验,但是这里谈的基本都是比较通用的东西。
我今年换工作,之前已经几年没有认真面试过了。这一
轮面试了不少公司,从大家耳熟能详的,到名不见经传
的,东西两岸的和中部的,纯IT的,传统银行的到IB的
都有。谈了很多家,见到各个级别的人加起来也有好几
十个。到了新公司,又马上被拎出来面试别人。每个星
期电话或者On Site的总有一两个。到现在也见了好
些。老中,老印,老美都有。这样的转换也很有意思,一
个问题两个方面来仔细地看,感触更深一些。

1、充分准备。这包括对技术问题的准备,对对方公司,
小组的了解等等。看似简单,但是到我们这里来面试
的人中充分准备的很少。技术问题本来是大家每天都
搞的,应该没有问题。但越是这样想,越容易有问题,
尤其是有很多经验的。我碰到不止一个,问到概念性
问题回答得很好。最后让他写一段小程序,比如把链
表翻转之类最基本的东西,居然黄了,十几分钟半个
小时写不出来。另外一些被面试的人,连基本的功课
也不做。大大咧咧地问,你们公司是做什么的。你可以
问我们组是做什么,你可以问我最近的项目做什么,
甚至可以说我在网上找过来着,没找到,能不能请你
介绍一些。但是最好不要问对方公司是做什么的。你
既然来面试,就说明你对这个公司感兴趣,你至少到
这个公司的网页上看看About Us。面试就是
dating。你上来对妹妹先说我爱你,然后接着问你
是干啥的。人家不扇你才怪。其实在面试中,你能把
对方公司的情况说得越多,机会越大。招人的宁可招一
个技术弱一点,但是对公司工作兴趣大的,也不会乐意
把offer给一个连我们公司网页也没有时间看的人。
给了offer这人也不一定来,犯不着浪费双方的时间。
2、不卑不亢,积极热情。面试就是dating。你一副臭脸,
人家也不待见。你太谄媚了,人家就容易看不起你。你
如果进入这个公司,同事跟你待的时间并不比跟自己
老婆待的时间短。如果合不来,大家受罪。所以你希望
你的同事是什么样子,你自己最好也作成那样。面试的
过程中,你应当表现出对这个工作有兴趣,人家才知道
你将来会积极面对这些工作。你也犯不着说你对这个
工作方方面面都喜欢得不得了,谁都知道那是撒谎。但
是你至少要表现出对其中的一些部分有兴趣。我面试过
一个人,经验丰富,属于要深度有深度,要广度有广度
的那种。他倒也没有任何架子,只是让我觉得不是很有
热情。我当时觉得这个问题不是我考核的范围,我犯不
着难为他,我就没在这点上吱声。最后果然被HR灭了,
就是这个理由。准备面试的时候,不妨对着镜子自问自
答几个问题,看看自己到底是个什么样子。该改得就
改改。
3、善于听。为什么要搞面试,不直接笔试放榜?要的就是
双向交流。除了尽量向对方展现自己,也要善于从中获
得信息。所以在面试中,不仅仅是把对方的问题回答完
了就了事。要善于把自己的信息有针对性地传递出来。
来面试的很多,真正在这点上smart的很少。对方介绍
情况的时候,脑子别闲着。仔细琢磨有没有跟自己
skill沾边的。如果有,在适当的时候搭两句。如果对
方有兴趣,很可能请你讲讲。一来二去,大家的话匣子就
都打开了。公司请一个人,是希望你能够对公司的成功
有贡献。如果你能让对方知道你的知识经验能够跟对方
的工作联系起来,那就比简单地回答问题进了一大步。
每次我介绍完情况对方一言不发,或者只是礼貌性地附
和一下,我心里就忍不住说:我想帮你美言几句也不知道
说什么。
4、善于问。道理跟上面一样。在听的同时也要问。不要睁着
天真无牙的眼睛乱问。要么让人家听到问题就知道你是
懂行的,要么问出自己想得到信息。工作其实是你最大的
投资之一。你一天睁着眼睛时间,有一多半都投在里面。
干得不开心,或者工作没前途,最后吃亏的都是自己。公
司最多浪费几张pay check。面试是你搞清楚这些问题
的最佳时机。一定要实现列一列自己希望知道信息。找到
机会就问。也可以通过提问,把对方吸引到你自己有话
要说的topic上来。有一次我被面试的时候,对面一个是
Hiring Manager,一个是Architect,真的被我引着
在一些大家都感兴趣我又有点底子的问题上很轻松谈了
很久他们才发现上当了,时间用完了。
5、掌握主动,把自己的长处兜售出来。回答对方的问题是
你赢得胜利的必要不充分条件。有时候甚至连必要条件
也不是。 面试前要想想自己有哪些长处对方会感兴趣。
面试的时候要寻找机会兜售出来。这可以是技术上的强
项,也可以是为人处世方面的长处。以前毕业找工作的
时候,大家交流面试心得,谈到如何对付自己回答不上
的问题时,一个同学说那我就谈我懂的。当时我不以为
然,心想不懂就还是乖乖承认,回来再看书吧。后来慢慢
地才体会到,这才是真知灼见。再牛的人也有不懂的东
西,没有什么大不了的。重要的是要让对方知道你长处
所在。有一次,组里另外一个人告诉我他喜欢一个
candidate,因为他谈到他在工作中如何主动根据用
户提出的问题寻找改进他们系统的地方。这就给人感觉
这人不是被动完成任务,而是能够用脑子的人。尺有所
短,寸有所长。如果能够让对方看到你的长处,即使你有
些方面没有能够达到要求,对方还是会认真考虑的。面
试就是dating。对方如果对你的长处都不感兴趣,那
就是没有缘分,不要也罢。不然你辛苦积累起来的东西
没有用处,对于自己的发展往往不是好事。
6、回答要有条理。
我们经常说某人说话有水平,说起来一套一套的。要的
就是这个效果。懂只是第一步。接下来要说的系统,清
晰有条理。在工作中,不懂可以学。但是如果说都说不
清楚,那就麻烦了。所以在面试中,所有人都会考察你的
沟通技巧。说白了就是说话能不能说清楚。说清楚的关
键就在于条理。比如我喜欢问一些problem solving
的问题。有些说得很干巴。有些人分析起来头头是道:
如何approach这个问题,有那些解决问题的办法,各
有什么利弊,如何根据情况取舍。马上让你觉得这人有
两把刷子,不是来骗饭吃的。
7、从容镇定。正如waitingGC提到的。问得难往往不是刁
难。有些人,往往是老中,喜欢问的很细,容易让人发怵。
要沉住气。这往往就是他的特点,换一个人来面试,他
也会这样。只要他不偏心,他的上司在参考他的意见时也
会注意的。在面试高一些职位尤其是Lead或Manager,
要镇得住,不要太学徒心态。动不动就点头哈腰说我会学。
虚心是好,如果不是很自信,对方就会担心给你个团队你
镇不镇得住。

工夫在平时,多一分准备,多一分机会。
1、有些面试的书还是可以看看的。101 Great Answers
to the Toughest Interview Questions是一本
不错的书,教你如何得体地回答问题。也教你如何问问题。
我看了以后是有点相见恨晚。以前面试太被动了。没有好
好利用机会搜集自己应该搜集的信息。以至于每个工作开
始的时候都是很有热情,慢慢就发现很多问题。这些问题
很多都是能够在面试的时候发现的。这本书里讲了很多
大家通常答不好的软问题,非常有启发。建议找来看看。
2、好好准备技术问题。工作中一个技术往往只用其中一小部
分。面试的时候却要对付整个topic里面的问题。是有一定
跨度的,不要过于自信。要象复习考试一样系统准备。有些
网站,象brainbench,就有很多自测题。可能要收钱。
但是题目多,也很系统。就是有些时候过于细了点。还有很
多免费的网页, Google一下就好了。
3、从周围的人身上学习。三人行必有我师。比方我发现很多
人喜欢背地里骂自己的小老板。不是觉得蠢,就是觉
得他是靠搞政治上去的。其实他既然生存下来就一定有点
本事。在前面的公司里有一个中层,所有他手下的人私下
对他都是劣评如潮:蠢,啥也不懂,在上司面前象哈巴狗,
转过身来压下面的人,等等。我跟他组里的人常喝咖啡,我
也奇怪这样蠢的人怎么生存下来的。骂多了,我也就搞明
白了。他啥也不懂,但他懂得贯彻上面的意思,他总能让手
下的人把上面要的东西捣鼓出来。这叫什么,这叫执行力,
execution。虽然没有vision,作不大,但是上面还是
很赏识他在这个位子上的工作的。这种被大家骂得头臭的
人都有东西可以琢磨,其他就更不用说了。

祝大家都能找好工作,而不只是找到工作。标 题: 关于面试的一些感触
发信站: BBS 未名空间站 (Tue Dec 5 17:20:53 2006)

看了waitingGC 的大作,有一些同感。趁着今天有空,
写下一些,希望能够有点帮助。我是搞IT的,有几年经
验,但是这里谈的基本都是比较通用的东西。
我今年换工作,之前已经几年没有认真面试过了。这一
轮面试了不少公司,从大家耳熟能详的,到名不见经传
的,东西两岸的和中部的,纯IT的,传统银行的到IB的
都有。谈了很多家,见到各个级别的人加起来也有好几
十个。到了新公司,又马上被拎出来面试别人。每个星
期电话或者On Site的总有一两个。到现在也见了好
些。老中,老印,老美都有。这样的转换也很有意思,一
个问题两个方面来仔细地看,感触更深一些。

1、充分准备。这包括对技术问题的准备,对对方公司,
小组的了解等等。看似简单,但是到我们这里来面试
的人中充分准备的很少。技术问题本来是大家每天都
搞的,应该没有问题。但越是这样想,越容易有问题,
尤其是有很多经验的。我碰到不止一个,问到概念性
问题回答得很好。最后让他写一段小程序,比如把链
表翻转之类最基本的东西,居然黄了,十几分钟半个
小时写不出来。另外一些被面试的人,连基本的功课
也不做。大大咧咧地问,你们公司是做什么的。你可以
问我们组是做什么,你可以问我最近的项目做什么,
甚至可以说我在网上找过来着,没找到,能不能请你
介绍一些。但是最好不要问对方公司是做什么的。你
既然来面试,就说明你对这个公司感兴趣,你至少到
这个公司的网页上看看About Us。面试就是
dating。你上来对妹妹先说我爱你,然后接着问你
是干啥的。人家不扇你才怪。其实在面试中,你能把
对方公司的情况说得越多,机会越大。招人的宁可招一
个技术弱一点,但是对公司工作兴趣大的,也不会乐意
把offer给一个连我们公司网页也没有时间看的人。
给了offer这人也不一定来,犯不着浪费双方的时间。
2、不卑不亢,积极热情。面试就是dating。你一副臭脸,
人家也不待见。你太谄媚了,人家就容易看不起你。你
如果进入这个公司,同事跟你待的时间并不比跟自己
老婆待的时间短。如果合不来,大家受罪。所以你希望
你的同事是什么样子,你自己最好也作成那样。面试的
过程中,你应当表现出对这个工作有兴趣,人家才知道
你将来会积极面对这些工作。你也犯不着说你对这个
工作方方面面都喜欢得不得了,谁都知道那是撒谎。但
是你至少要表现出对其中的一些部分有兴趣。我面试过
一个人,经验丰富,属于要深度有深度,要广度有广度
的那种。他倒也没有任何架子,只是让我觉得不是很有
热情。我当时觉得这个问题不是我考核的范围,我犯不
着难为他,我就没在这点上吱声。最后果然被HR灭了,
就是这个理由。准备面试的时候,不妨对着镜子自问自
答几个问题,看看自己到底是个什么样子。该改得就
改改。
3、善于听。为什么要搞面试,不直接笔试放榜?要的就是
双向交流。除了尽量向对方展现自己,也要善于从中获
得信息。所以在面试中,不仅仅是把对方的问题回答完
了就了事。要善于把自己的信息有针对性地传递出来。
来面试的很多,真正在这点上smart的很少。对方介绍
情况的时候,脑子别闲着。仔细琢磨有没有跟自己
skill沾边的。如果有,在适当的时候搭两句。如果对
方有兴趣,很可能请你讲讲。一来二去,大家的话匣子就
都打开了。公司请一个人,是希望你能够对公司的成功
有贡献。如果你能让对方知道你的知识经验能够跟对方
的工作联系起来,那就比简单地回答问题进了一大步。
每次我介绍完情况对方一言不发,或者只是礼貌性地附
和一下,我心里就忍不住说:我想帮你美言几句也不知道
说什么。
4、善于问。道理跟上面一样。在听的同时也要问。不要睁着
天真无牙的眼睛乱问。要么让人家听到问题就知道你是
懂行的,要么问出自己想得到信息。工作其实是你最大的
投资之一。你一天睁着眼睛时间,有一多半都投在里面。
干得不开心,或者工作没前途,最后吃亏的都是自己。公
司最多浪费几张pay check。面试是你搞清楚这些问题
的最佳时机。一定要实现列一列自己希望知道信息。找到
机会就问。也可以通过提问,把对方吸引到你自己有话
要说的topic上来。有一次我被面试的时候,对面一个是
Hiring Manager,一个是Architect,真的被我引着
在一些大家都感兴趣我又有点底子的问题上很轻松谈了
很久他们才发现上当了,时间用完了。
5、掌握主动,把自己的长处兜售出来。回答对方的问题是
你赢得胜利的必要不充分条件。有时候甚至连必要条件
也不是。 面试前要想想自己有哪些长处对方会感兴趣。
面试的时候要寻找机会兜售出来。这可以是技术上的强
项,也可以是为人处世方面的长处。以前毕业找工作的
时候,大家交流面试心得,谈到如何对付自己回答不上
的问题时,一个同学说那我就谈我懂的。当时我不以为
然,心想不懂就还是乖乖承认,回来再看书吧。后来慢慢
地才体会到,这才是真知灼见。再牛的人也有不懂的东
西,没有什么大不了的。重要的是要让对方知道你长处
所在。有一次,组里另外一个人告诉我他喜欢一个
candidate,因为他谈到他在工作中如何主动根据用
户提出的问题寻找改进他们系统的地方。这就给人感觉
这人不是被动完成任务,而是能够用脑子的人。尺有所
短,寸有所长。如果能够让对方看到你的长处,即使你有
些方面没有能够达到要求,对方还是会认真考虑的。面
试就是dating。对方如果对你的长处都不感兴趣,那
就是没有缘分,不要也罢。不然你辛苦积累起来的东西
没有用处,对于自己的发展往往不是好事。
6、回答要有条理。
我们经常说某人说话有水平,说起来一套一套的。要的
就是这个效果。懂只是第一步。接下来要说的系统,清
晰有条理。在工作中,不懂可以学。但是如果说都说不
清楚,那就麻烦了。所以在面试中,所有人都会考察你的
沟通技巧。说白了就是说话能不能说清楚。说清楚的关
键就在于条理。比如我喜欢问一些problem solving
的问题。有些说得很干巴。有些人分析起来头头是道:
如何approach这个问题,有那些解决问题的办法,各
有什么利弊,如何根据情况取舍。马上让你觉得这人有
两把刷子,不是来骗饭吃的。
7、从容镇定。正如waitingGC提到的。问得难往往不是刁
难。有些人,往往是老中,喜欢问的很细,容易让人发怵。
要沉住气。这往往就是他的特点,换一个人来面试,他
也会这样。只要他不偏心,他的上司在参考他的意见时也
会注意的。在面试高一些职位尤其是Lead或Manager,
要镇得住,不要太学徒心态。动不动就点头哈腰说我会学。
虚心是好,如果不是很自信,对方就会担心给你个团队你
镇不镇得住。

工夫在平时,多一分准备,多一分机会。
1、有些面试的书还是可以看看的。101 Great Answers
to the Toughest Interview Questions是一本
不错的书,教你如何得体地回答问题。也教你如何问问题。
我看了以后是有点相见恨晚。以前面试太被动了。没有好
好利用机会搜集自己应该搜集的信息。以至于每个工作开
始的时候都是很有热情,慢慢就发现很多问题。这些问题
很多都是能够在面试的时候发现的。这本书里讲了很多
大家通常答不好的软问题,非常有启发。建议找来看看。
2、好好准备技术问题。工作中一个技术往往只用其中一小部
分。面试的时候却要对付整个topic里面的问题。是有一定
跨度的,不要过于自信。要象复习考试一样系统准备。有些
网站,象brainbench,就有很多自测题。可能要收钱。
但是题目多,也很系统。就是有些时候过于细了点。还有很
多免费的网页, Google一下就好了。
3、从周围的人身上学习。三人行必有我师。比方我发现很多
人喜欢背地里骂自己的小老板。不是觉得蠢,就是觉
得他是靠搞政治上去的。其实他既然生存下来就一定有点
本事。在前面的公司里有一个中层,所有他手下的人私下
对他都是劣评如潮:蠢,啥也不懂,在上司面前象哈巴狗,
转过身来压下面的人,等等。我跟他组里的人常喝咖啡,我
也奇怪这样蠢的人怎么生存下来的。骂多了,我也就搞明
白了。他啥也不懂,但他懂得贯彻上面的意思,他总能让手
下的人把上面要的东西捣鼓出来。这叫什么,这叫执行力,
execution。虽然没有vision,作不大,但是上面还是
很赏识他在这个位子上的工作的。这种被大家骂得头臭的
人都有东西可以琢磨,其他就更不用说了。

祝大家都能找好工作,而不只是找到工作。

Tuesday, December 05, 2006

Quant面试问题

发信人: luoge (纯净水), 信区: Quant
标 题: Quant面试问题
发信站: BBS 未名空间站 (Mon Dec 4 20:23:29 2006)

今天拿到了口头offer, 在quant版学习了不少东西,也希望贡献一点力量,所以把记得
的面试问题写出来。祝大家都找到满意的工作。

I got all the questions in interviews. I am trying to make all answers/hints
accurate but can not guarantee.

Brainteasers

1. a normal dice with 6 sides with numbers from 1 to 6, toss it at most
three time. After each toss, you get a number x, you can either continue or
get x dollars. What is the game worth?

2. the same rule as question 1, What would you like to pay to play the game?

3. a coin, toss a number times until you get a head, say N. You will get
paid with 2^N, what is the game worth?

4. The same rule as question 2, what would you like to pay to play the game?

5. three pieces of pizzas, 1 with both sides burned, 1 with 1 side burned, 1
with 0 side burned. Stack them together blindly, you see the top surface is
burned, what is the probabilty for the other side of the top pizza being
burned?

6. a normal dice, two players, X and Y. X starts tossing the coin first, if
a
6 is shown, the game stops and X wins, otherwise, Y tosses and so on. What
is the probability for x to win?

7. A pile of 1000 stones, split it to two piles x and y, you get a number xy
. Split x and y further, you a number for each of them. repeat the process
until there are 1000 piles of 1 stone, add all the numbers together, what is
the sum? Why do you always get the same answer even your splitting is
arbitrary?

8. A string of length 1, cut it to two strings of length x and y, you get a
number xy. Then you do similar splitting and add all the numbers up. what is
the limit of the sum?

9. couples shaking hands, forget details, please google.

10. answer this question in 10 sec: a ball with a radius 2 weighs 80 ouces,
how much does a ball with a radius 3 weigh?

11. There are 100 statements, the nth statement says: among the 100
statement, at most (n-1) are true. How may are true?

math

1. what is the distance from the origin to the surface 2x+3y+4z=12?
2. what is i^i
3. If x is a gaussian variable N(0,1), what is E{x^n}
4. What is type I and II errors? what is the power of test? Central limit
theorem, estimator theory.
5. what makes a valid correlation matrix?
6. how to generate correlated random walk series?
7. What schemes to solve PDEs?
8. What is Quasi-random number and why?
9. do you know how to find minimum value of a function?
10. what is monte carlo simulation/integration?
11. 50

C++/algorithm

what is virtual function/inheritance, public/private/protected member/
inheritance, static member/function, dynamic/static cast, template?
STL quesitons: how to use sort, map? How to implement map idea with vector?
what is an initializatoin list and in what situation such an list must be
provided
what is design pattern, any examples?
how to sort an array? the order of complexity.
how to define a tree and vist all elements of the tree?

finance
1. an vanilla bond has a positive convexity, what security may have a
negative convexity?
2. what is the distribution of correlation coefficient of two random stocks
like?
3. how many stocks should be appropriate in a portfolio?
4. how to ensure that your portfolio has a 60% probability of having a
return >10%
5. time-series: what is ar/ma/arch/garch, why? how to test non-constant
volatility


behavioal

Give an example to illustrate how to deal with deadline/bad collaborator/bad
project/mistake and so on.

answers or hints

Brainteasers

1. work backwards, like an american option, get asked about this question
serveral times, this seems a must-ask question for interviewers.
2. if you are risk-neutral, you get the same answer as in 1, not otherwise.
3. Infinity
4. if you are risk-neutral, you get the same answer as in 3, not otherwise.
5. 2/3
6. 6/11
7. 1000*999/2
8. 1/2, use geometrical method, xy is like area of a square.
10. 270 ouces

math
1. get the normal vector to the surface or minimize x^2+y^2+z^2
2. write the base i as e^(2N*Pi+1/2*pi)
3. use moment-generating function and do taylor expansion
4. consult a statistics book.
5. symmetrical semi-definit
6. Chelosky decomposition or diagnalization
7-10 see numerical recipe


C++/algorithm

All C++ questions can be answered by reading Stroustrup's book except design
pattern, for which you need google
sort: know at least 3 sorting algorthm and say how it works
tree: pre-order, post-order

finance
1. callable bond
2. positive skewed
3. ~200? not sure
4. no idea

Saturday, December 02, 2006

Investment framework with a buzz

Investment framework with a buzz

By Kate Burgess

Published: November 6 2006 02:00 | Last updated: November 6 2006 02:00

A couple of years ago, it would have been hard to find anyone in the UK's financial services industry muttering "liability driven investment". Now everyone is at it. LDI, as it is known, has become a buzzword for pension fund managers and trustees, investment banks and investment consultancies.

Most companies involved in UK pensions are offering clients access to LDI in some form of product or service.

ADVERTISEMENT

In essence, LDI is an investment framework that seeks to match, wholly or in part, pension fund assets to the promises made to employees and pensioners.

In most cases, it involves some use of swaps and derivatives to hedge out the risks such as changes in inflation and interest rates that can eat into a pension scheme's ability to keep these promises.

Exponents of LDI say the need for a new approach became acute after a combination of falling equity markets and changes to the accounting rules on pension funds crystallised big and volatile gaps between equity-dominated portfolios of assets and pension plans' liabilities. The industry, it emerged, had been focusing on matching the performance of peers or a benchmark without close reference to liabilities.

And low inflation and low interest rates meant there was little hope of the value of assets ever catching up - as managers had hoped - with these liabilities. Meanwhile, the UK's new Pension Regulator made it clear he wanted companies to clear these deficits within 10 years.

At first, LDI was a popular term bandied around at conferences with few funds actually adopting it. But a report last month by consultants Hymans Robertson said in the past six months LDI was "beginning to gain traction". It forecast a 20 per cent increase in LDI business by 2010.

Interest is also growing in the US where the Financial Accounting Standards Board now requires companies to value pension fund deficits on balance sheets by December in much the same way that UK companies do. A survey last year by JP Morgan Asset Management found that half of US retirement plans view the need to hedge against swings in liabilities as a reason to change investment strategies.

Leaders in the field of LDI, such as Barclays Global Investors, State Street, Legal & General and Insight, have spent millions developing new products and services, channelling resources to building LDI expertise, recruiting investment consultants and bankers, and bringing in experts on derivatives and alternatives sometimes at the expense of mainstream equityanalysis.

As more product providers enter the fray, the meaning of LDI is expanding and blurring.

At one extreme, LDI is interchangeable with liability-matching, where managers try to replicate the cash flows needed to pay benefits. This involves buying a series of fixed-income bonds or using interest rate and inflation swaps.

The industry argues, though, that LDI is a long-term investment discipline looking at risk in new ways and placing a plan's liabilities at the heart of the investment process.

Things have moved on since WH Smith pension fund - a pioneer of LDI - last year switched almost its entire investment portfolio into swap contracts designed to last 50 years with Goldman Sachs. The company's and trustees' goal was to eliminate all the risks posed by interest rates, inflation and stock markets that might endanger the scheme's ability to pay its pension promises. WH Smith kept only a small proportion of the fund in equity call options.

However, this is too expensive a process for most companies.

Switching to bonds and swaps locks funds into low-return assets that limit funds' flexibility should markets change. They also lock company sponsors into paying higher contributions to make up for the lower-risk/lower-returnprofile of the assets. WH Smith agreed pension contributions of £52m over three years to shore up the pension fund deficit.

Increasingly, therefore, pension fund trustees and sponsoring companies have turned to a model of LDI that has fixed income and swaps on the one side with a high-return portfolio on the other designed to deliver above-market returns to help funds close their pension deficits.

The likes of Schroders and BGI's strategic solutions group claim their aim is to restructure portfolios with a clear risk budget, replacing unintentional risks that are not properly rewarded with a range of risks across different asset classes that are properly rewarded.

Mercer Investment Consulting estimates that "one in 10 UK pension funds will consider introducing some kind of liability benchmarked strategy, split equally between those implementing a passively managed swap strategy (either an overlay strategy or in place of traditional bond mandates) and those implementing actively managed liability benchmarked strategies, or 'LDI plus'-typemandates".

BGI has about 40 clients with about £25bn in assets using LDI strategies and not one of them is the same, says Andy Hunt, senior strategist in LDI at BGI. Last year more than 125 funds made inquiries about LDI.

Inevitably, the explosion of LDI products is fostering a certain level of cynicism with observers who worry that LDI brings with it a new set of risks. Changes to assumptions on longevity, for example, will put tremendous strains on the model. So, too, will a sudden shift in interest rate or inflation expectations. It is important that funds keep some kind of exposure to assets that can deliver some kind of capital appreciation over the longer term, they say.

But despite these anxieties, LDI is here to stay, says Mr Hunt. "LDI is not a cottage industry any more. It has become mainstream."