PDA

View Full Version : Top Companies Interview Problems/ Puzzles


huilinchin
26-12-2003, 05:06 PM
In recent years, as the world moves on towards creating cutting-edge technology, the ever-shifting global marketplace continues to impose a creative and startup mentality in the corporate and professional world. In many job interviews, we are faced with many puzzles and IQ questions. This includes companies from the computer industry, banks, law firms, armed forces, insurance industry, investment & consulting firms and many more.

We have no choice but to adapt and to be prepared to answer these brainteasers.

It is part of ReCom's objective to contribute and to help fellow Malaysian students who are graduating and preparing for job interviews.

I will be posting real interview questions from top companies like Microsoft, Morgan Stanley, silicon valley companies, and etc every alternate days. Answers will be provided 1-2 days after the questions have been released to give chance to everyone to try.

If you have questions to share, please do NOT post them here. Instead, please email them to me at huilin@<hidden> or send me a private message in ReCom with the following details.


1) Name of Submitter:
2) Nickname of Submitter in ReCom:
3) Country currently in:
4) Source of Question: (can be from your interview, friends, conference, book, etc)
5) Name of company (where the puzzles come from):
6) Complete Puzzle/Question:
7) Answer to the Puzzle:
8) Complete explanation of the answer:


Acknowledgement will be given to all submitters and the source.

Alright, I will now post two simple questions for a start. Please feel free to post your solutions and explanation of your answer(s) in this thread.
Remember, your explanation is much more valuable than your answer.
Challenge yourself NOW!

Question 1:
MICROSOFT INTERVIEW QUESTION
Source: Microsoft Recruiter in Vancouver
Question:
Suppose you have 8 billiard balls. One of them is slightly heavier while the rest have the same weight. The only way to tell which is the heavier ball is by putting it on the scale against the others. What is the fewest number of times you'd have to use the scale to find the heavier ball?

Question 2:
From: A start-up company in Palo Alto, Silicon Valley, California, USA.
Question:
There is a tennis tournament with one hundred twenty-seven players . There are one hundred twenty-six people paired off in sixty-three matches, plus one player as a bye. In the next round, there are sixty-four players and thirty-two matches.
How many matches in total, does it take to determine a winner?
Every match will decide either a player wins or lose. There is no draw.
Hint: No calculation needed.


Thank you.

-Hui Lin ^_^

chenchow
26-12-2003, 05:37 PM
For those who would like to try first, then do NOT read on...



I think for Q2, my answer would be 126. Why I think so?
First, this is like if you lost once, you are out of the competition right?

So, there are 127 players. To have the eventual winner, there must be 126 players who have lost once right? So, there must be 126 matches.


p/s: Thanks Hui Lin for sharing all these questions. Hopefully all those who have experience in this could share the questions with Hui Lin and eventually many could get the benefits.

Good job, Hui Lin!

sueyi
26-12-2003, 05:39 PM
>There is a tennis tournament with one hundred twenty-seven players.
>There are one hundred twenty-six people paired off in sixty-three
>matches, plus one player as a bye.

err .. what is a bye?

chenchow
26-12-2003, 05:46 PM
Sueyi, bye means the player do not have to play in first round, so move forward directly to 2nd round. This is usually given to seeded player to move to 2nd round. Usually to solve the problem of odd number of players etc.

I am attempting Q1 below. So, if you are going to try, do not look on.




For Q1, I would think that it is 3 times. Because you have 8 balls right? So, put 4 balls in a side and another 4 in another side. As there is only a heavier ball, the ball must be on the heavier side. Then with 4 balls left, put 2 balls in a side and another 2 in another side. Here, again the ball must be on the heavier side. With 2 balls left, just put 1 ball on a side, and the heavier ball is the heavier ball. So, 3 times, I would propose...

bachok83
27-12-2003, 05:54 AM
Q1. i agree with chenchow... i was thinking of the same method.. (b4 i read the whole thread.. :D)

well i think that's the fewest, i dont think there are any other method..

others, any comments?

huilinchin
27-12-2003, 09:32 AM
Bachok and Chen Chow, maybe give question 1 another thought?
Keep trying until you manage to convince yourself that it is the fewest.

For others who are just viewing but not replying, try it! It does not matter if the answer is incorrect. :D

If you have not registered in ReCom yet, it's time!! :D
Join us and have fun!

I will post answers after more members have replied and tried these questions. If you have puzzles to contribute from your job interviews, even scholarship interviews, email me (huilin@<hidden>) or send me a private message in ReCom. Please do not post it here so that we are able to organize this forum thread better. Thank you.

-Hui Lin ^_^

Schye
27-12-2003, 01:15 PM
Well, for the Q1, I think I may sort it out by 2 times.

1) Put 3 balls on each side.
a) If they weight are same, then put the heavier balls will be one of the
2 left out.
b) If the weight is different, go to 2.

2) Put 2 of the balls from the heavier side on each side of the scale.
a) If one of them is heavier, then it will be the heavier ball.
b) If they are same weight, then it will be the ball that is not being put
on the scale.

qedx
27-12-2003, 01:33 PM
oo lateral thinking at its best. i applaud you.

Schye
27-12-2003, 01:42 PM
8)
I just got another though that may solve in one step if we can use other methods - not using the scale.

Tie all those balls in to a circle and just hang it on any places.
The shape of the circle will incline where the heavier ball is tied to ---- not sure if this really works ;) but should be able to know which ball is heavier because of the gravity force and the shape of a circle

chenchow
27-12-2003, 04:12 PM
Schye, good one! Yeah, lateral thinking at its best... Thinking of Edward de Bono.

topdog
27-12-2003, 04:18 PM
Not attempting to answer here. Just wanted to point out that the 8 ball question requires that a scale be used...right?

huilinchin
29-12-2003, 11:57 AM
Topdog, yeap, it requires a scale as mentioned in the question (The only way to tell which is the heavier ball is by putting it on the scale against the others.)

Answers for Question 1 and 2 as below:

Big applause to Schye for Question 1:
Answer: 2 times
Explanation of answer quoted from Schye:
Well, for the Q1, I think I may sort it out by 2 times.

1) Put 3 balls on each side.
a) If they weight are same, then put the heavier balls will be one of the
2 left out.
b) If the weight is different, go to 2.

2) Put 2 of the balls from the heavier side on each side of the scale.
a) If one of them is heavier, then it will be the heavier ball.
b) If they are same weight, then it will be the ball that is not being put
on the scale.

However, I would like to point out that it is very important to answer the question as asked by the interviewer. It was mentioned in the question that "The only way to tell which is the heavier ball is by putting it on the scale against the others"
So, weighing it by other methods is not good.

But, it was a good thinking when Schye suggested once by looking at the shape of the circle. The interviewer would have mentioned that their shape are the same and reiterate the question.

Big applause to Chen Chow for Question 2:
Answer: 126 matches
Explanation of answer quoted from Chen Chow:
I think for Q2, my answer would be 126. Why I think so?
First, this is like if you lost once, you are out of the competition right?

So, there are 127 players. To have the eventual winner, there must be 126 players who have lost once right? So, there must be 126 matches.

The next question will be posted shortly.
Thanks for trying. :D

-Hui Lin ^_^

huilinchin
29-12-2003, 12:27 PM
There could be many variations to this question. But this is a real Microsoft interview question. Think out of the box. If you have heard of this puzzle, please give a chance to others to attempt.

Question 3:
MICROSOFT INTERVIEW QUESTION
Source: will be revealed with the answer 2 days later.

Four guys want to cross a bridge in the dark of night. They have one flashlight and the bridge can hold only two people at once.
Their walking speeds allow them to cross in 1, 2, 5, and 10 minutes, respectively. Is it possible for them to all cross in 17 minutes in such a way that no one walks in the dark?

Thanks,
Hui Lin ^_^

luke
29-12-2003, 01:10 PM
I think I'll try this ... first I'll consider how long might the bridge be ... so since the fastest walking speed is 1 minute so I assume the bridge is not so long (the 10-minute walker is just too slow) ... so I can assume that the light from the flashlight can reach half the length of the bridge ... based on these two assumptions I put the two slowest walkers to cross the bridge first while the flashlight is held by the slowest (10 minutes) ... as the 5-minute walker reaches the other side, the 10-minute walker is at half the length of the bridge ... now the 1-minute and the 2-minute walkers can cross the bridge, one at each time, while the 10-minute walker in the middle points the flashlight to their path ... and then he can safely finish his halfway journey crossing the bridge ...

total time taken: 13 minutes

some problems: maybe the first 2 have to walk side-by-side so the first person (5 minute) will have to take 7.5 minutes to cross the bridge (5 minutes to the middle, 2.5 minutes to the other side) ... this would make the total time 15.5 minutes ...

one-zero
29-12-2003, 02:33 PM
Hi Luke,

Nice one. Just thought I'd add on to your answer since the question asks for 17 minutes specifically.

Under Luke's assumptions (and assuming constant walking speed for each person), we can let the 2-minute guy hold the flashlight, and crosses the bridge together with the 1-minute guy.
After 1 minute, the 2-minute guy reaches the midpoint and continue to stay there, lighting the path for the others. Then the 5-minute and 10-minute guy takes turn to cross the bridge. Conclude with 2-minute guy fnishing the rest of his journey. This takes exactly 17 minutes. (of course as Luke has demonstrated we could do it much faster than 17 minutes under these assumptions.)

At any point in time the distance between the person holding the flashlight and the person crossing the bridge is less than half the distance of the bridge. So as long as the flashlight can cover that distance the answer to the question is YES it's possible.

Any other assumptions that can be made?? hmm..

silverblue
29-12-2003, 07:42 PM
Hello everyone... sorry for my long absence in Recom. First it was finals, then it was my return home and catching up with family, friends n shopping! lol...

But anyway, I think this is a really interesting thread. It surprises me though that companies actually use these IQ-sorta questions as interview questions.... isn't this merely IQ testing more than anything?

By the way, Luke and One-Zero's solutions were pretty creative. But somehow I dont think that the interviewer wants us to make assumptions about the length of the bridge and I dont think this has to do with how far the flashlight can shine since we weren't given any infomation about that (correct me if i am wrong though).

silverblue
29-12-2003, 07:46 PM
Ok.. I think I figured out the solution.

1) The 1 minute and 2 minute guy crosses first
= 2 minutes total
2) Then the 2 minute guy walks back
= 4 minutes total
3) Then the 5 minute guy and 10 minute guy walks over
= 14 minutes total
4) After that, the 1 minute guy walks back to fetch the 2 minute guy
= 15 minutes total
5) Lastly, the 1 minute and 2 minute guy walks across the bridge
together!!
= 17 minutes total!!!

huilinchin
29-12-2003, 11:23 PM
But somehow I dont think that the interviewer wants us to make assumptions about the length of the bridge and I dont think this has to do with how far the flashlight can shine since we weren't given any infomation about that (correct me if i am wrong though).

silverblue is correct. We cannot make those assumptions since there isn't any information about that. But it's good thinking and assumption during interview. Keep up the good work! :D
Anyone else wants to attempt to answer?

-Hui Lin ^_^

luke
30-12-2003, 01:00 AM
lol I was trying to really "think outside the box" that I forgot to think inside it ... damn!

mpalanieppan
30-12-2003, 09:41 AM
This is what i got. The numbers refer to the ppl whose walking duration is that numer

1 and 2 goes to the other side, 1 comes back. Total time: 2+1 = 3 mins
1 passes the light to 5 and 10, they go to the other side pass the light to 2. Total time: 3+10 = 13 mins
2 gets the light from 5 and 10, comes back and gets 1 and both of them go back. Total time = 13+4 = 17 mins.

So it is possible.

M.Palanieppan

mpalanieppan
30-12-2003, 09:43 AM
oh damn...i did not see the second page....i thought this answer has not been published yet...really sorry....

mpalanieppan
30-12-2003, 09:47 AM
wow, you guyz even don't allow mild bad words?....

littlebigone
30-12-2003, 10:06 AM
doesn;t anyone remember this from cornell comm zero?

Schye
30-12-2003, 12:30 PM
I have done that question before on a website.
However there were 6 people which will use 1,2,6,8,12 minutes to cross the road while the time limit was 30 minutes.
However the logic is the same.
I will try to find the site again and post it --- if i can find it again.

silverblue
30-12-2003, 01:29 PM
doesn;t anyone remember this from cornell comm zero?

Nope. Not really...

huilinchin
30-12-2003, 02:04 PM
I think littlebigone could be correct because this question originally came from Prof Steven Rudich. The Head Teaching Assistant of Prof Rudich told us that Steven shares his materials with Cornell CS Profs and a couple of Profs from India too. Steven is involved with Microsoft research.

Answer for Question 3:

Big applause to silverblue and mpalanieppan for answering the question!
Answer: Yes, it is possible to cross in 17 minutes.
Source:
http://www2.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15251/Site/Materials/Lectures/Lecture15/slide/slide4.html
Explanation of answer quoted from silverblue:
1) The 1 minute and 2 minute guy crosses first
= 2 minutes total
2) Then the 2 minute guy walks back
= 4 minutes total
3) Then the 5 minute guy and 10 minute guy walks over
= 14 minutes total
4) After that, the 1 minute guy walks back to fetch the 2 minute guy
= 15 minutes total
5) Lastly, the 1 minute and 2 minute guy walks across the bridge
together!!
= 17 minutes total!!

Keep up the good work!
The next question will be posted in a while.
Thanks for trying!

-Hui Lin ^_^

huilinchin
30-12-2003, 02:23 PM
Great job so far. We shall continue with the next question. It does not matter if someone has answered. Please feel free to answer. Some questions may have more than 1 answer and explanation.

I am sorry I could not come up with more variety of questions from other companies besides Microsoft and silicon valley companies. We hope you can contribute interview questions from other companies. It can be any type of questions and do not have to be IQ or puzzles.

If you have interview questions to contribute, please do not post it here, but email the interview question, answer, explanation and source to huilin@<hidden> so that we can organize this forum thread better. Thanks.

Alright the next question is being asked during an interview for Microsoft prospective interns.

Question 4:
MICROSOFT INTERVIEW QUESTION
Source: Carnegie Mellon University senior who interned for Microsoft
There are n number of lightbulbs with light switches numbered from 1 until n, all in a row and all turned off.
Now, you do the following:
Toggle all switches that are multiples of 1.
Then, toggle all switches that are multiples of 2.
Then, toggle all switches that are multiples of 3.
...
...
...
Continue doing that until you toggle all switches that are multiples of n.
When you are done, which light bulbs are on and which are off?
Do prove your answer if you can.


Happy trying!!

-Hui Lin ^_^

moonnaire
30-12-2003, 05:14 PM
i dont really come out with reasons for my answer..but i propose this sequence or pattern of numbers on the bulb would be on:

1,4,9,16,25,36,49.....

and the rest of the bulbs would be off...

luke
30-12-2003, 05:39 PM
I summarize the answer as below:

- for all numbers that have odd number of factors - ON
- for all numbers that have even number of factors - OFF

so the bulb with number 65 is off (factors=1,5,13,65 -> even) while the one numbered 25 is on (factors=1,5,25 -> odd) ...

this leads on to another summary that square numbers are the only bulbs that are on in the end ... and they are 1,4,9,16,25,36,49 ... so moonnaire is right :) ... if I am right, that is ...

that was easy ...

qedx
30-12-2003, 08:03 PM
why odd factors on, even factors off?

huilinchin
30-12-2003, 09:28 PM
Well done luke and moonnaire!!
Both of you gave a correct answer. Luke gave a good explanation! :D

qedx, we see that the number of times the state of a bulb at position n changes is equal to the number of divisors of n. So, a bulb remains on if and only if it has an odd number of divisors.

Big applause to luke and moonaire for answering question 4!!

Answer for question 4:
The bulbs at positions 1, 4, 9, ..., i^2, ... remains on while the rest are off. As explained above, a bulb remains on if and only if it has an odd number of divisors. One of the ways to solve this is:

1) For any divisors d of n, n/d is another divisor of n. Hence, each divisor can be paired off with another divisor, unless n is a square in which case, d and n/d become identical for d = square root of n


Thanks for trying. The next question will be posted shortly.

-Hui Lin ^_^

polarized
31-12-2003, 05:24 AM
http://www.plastelina.net/games/game3.html



hope this can help u solve the puzzle..
good luck!

huilinchin
31-12-2003, 11:36 PM
polarized, that was interesting! After playing the game, I am sure most have gotten the idea. Thanks for sharing the url. I personally love it!

Now, another real interview question that I obtained when I took a course in CMU in early 2002.

Question 5:
Source: Ian Kash, teaching assistant of 15-251, Spring 2002 Carnegie Mellon University

Suppose that I have two identical bowling balls and a 64 story building. I want to determine the least k for which a bowling ball will break when I drop it from the kth story (in other words, it should not break when I drop it from k-1). The balls might break if dropped from the 1st story and will definitely break if dropped from the 64th. Being identical, the balls will behave identically when dropped. When dropped from any given height, a ball will either smash (in which case, it can't be used) or bounce (and be perfectly fine, unaltered).
What sequence of experiments will allow you to determine the mystery smash coefficient k, while using the minimum number of drops that could take place in the experiment in the worst case?

Prove your answer.


Happy trying and happy new year!

-Hui Lin ^_^

luke
01-01-2004, 12:31 AM
I'd like to try ... I think we can try using this method:

(1) Drop one of the balls from level 2,4,6,8,10 etc etc until it breaks.
(2) Drop the remaining ball from one floor below it
(3) If the last ball breaks, k=the floor number in (2). If it doesn't then k=the floor number in (1)

for example, if the 1st ball breaks at 12th floor and the 2nd ball doesn't break when dropped from 11th floor then k=12 but if the 2nd ball breaks then k=11.

so, in the worst case, the minimum number of drops is 33, that is if the 1st ball only breaks at level 64. It would be less if the ball breaks earlier.

littlebigone
01-01-2004, 12:18 PM
i think we can actually improve on this. This is my idea:


We should make bigger intervals between the drops, that is more than 2.
Then if the ball breaks, we take the unbroken ball and go from the floor just above the previously tested floor.

Say we do by 5. so we test on floor 5, 10, 15, 20, 25... Then if say we break on floor 20, we will need to take the unbroken ball and test on floor 21, 22, 23, and 24. Obviously we would stop as soon as that ball breaks and that would be the floor.

Using this idea, all that is left is to come up with the correct interval. It cannot be too big or we will have too many to test with the second ball.

The formula is as follows, with x as the size of the interval.

Max tests = floor(63/x) + x - 1
if there is a remainder it doesn't matter... i think ...as if we have to test to that far, the testing with the second ball isn't as costly so that won't be the worst case.

and so from trial and error, x should be 7. This will give us a maximum test of 15. Actually i think 6, 7, 8 and 9 give the same answer.

Anyway this is my try. I think i got my logic right...can't really expect much after all the new year partying. oh yeah....Happy new Year

luke
01-01-2004, 12:57 PM
Then if say we break on floor 20, we will need to take the unbroken ball and test on floor 21, 22, 23, and 24. Obviously we would stop as soon as that ball breaks and that would be the floor.
and obviously if the ball breaks on floor 20, it will break if dropped from level 21,22,23 or 24 :roll: ... the higher, the harder it will hit ..

you should choose floor 19, 18, 17 and so on for the 2nd ball .. but what if the 2nd ball breaks on floor 19? can we conclude that k=19? No! We know the ball doesn't break on floor 15 but what about floor 16, 17 and 18? We don't know if the ball also breaks if dropped from those floors but unfortunately we only have 2 balls (yes some of us do :lol: ) and both of them are gone (oh no!) .. so how?

luke
01-01-2004, 01:23 PM
I use parts of Kevin's logic to get an answer of 15 (like his) but my method is slightly different:

(1) Drop the 1st ball from floor 8,16,24, ... , 64 until the it breaks
(2) Call the last floor from which we dropped the ball and it didn't break as m
(3) Now drop the ball from level m+1, m+2,....,m+7 until it breaks ... the level on which it breaks is k.
(4) If the ball doesn't break at floor m+7 then k=m+8 (the floor in (1))

so, in the worst case we have to try 8 times for step (1) and 7 times for step (3) .. total = 15 ...

so, given any number of floor N, we can use an interval of M where M is the square root of the previous/next square number (or square root of N if N is a square number) ..

actually the number of M's we can use varies on N but in that range of numbers, square root of the previous/next square number or of N will be near to the center of the range .. for example, for N=20, M=3,4,5,6,7 but for N=3600 (a building that reaches the Mars), M=53,54,55 ... 66,67,68 .. hehe just a crazy mind of mine ...

hehe actually quite the similar to Kevin's answer except for the sequence of dropping the ball .. I didn't notice that we are similar because I didn't read Kevin's answer thoroughly for the 1st time ... when I reread Kevin's post, eh? serupa rupenye .. it's just that I use the term "the square root of the next square number" while Kevin uses "floor(N/x)" ..

huilinchin
01-01-2004, 02:57 PM
Good thinking, luke and littlebigone.
Maybe I should have emphasized on the proof of the question.

Below is the link for the answer and the proof in pdf. Please refer to question 2 in the pdf file.

Answer for question 5:
http://www.andrew.cmu.edu/~hlc/15251_assn7.pdf

Thanks for trying!

-Hui Lin ^_^

huilinchin
01-01-2004, 03:21 PM
Another interview question. Easier than question 4 because you do not have to prove it.

Question 5:
Source: A friend in CMU
There are 5 jars of pills. All the pills in only one jar is contaminated. The only way to tell which pills are contaminated is by weight. A good pill weighs 10 grams while a contaminated pill weighs 9 grams.
You are given a scale and allowed to make only one measurement with it. How do you tell which jar is contaminated?

Happy trying!

-Hui Lin ^_^

luke
01-01-2004, 04:23 PM
the scale - is it the one that have two plates on the ends of a rod and we hold in the middle ( a.k.a balance) .. or is it the one that gives you the reading of the weight in grams? if the latter then this is easy ..

just get one pill from jar 1, 2 pills from jar 2, 3 pills from jar 3 .. continue for jar 4 and jar 5 .. then put all those pills on the scale and get the reading .. the jar with contaminated pill is (150-reading) .. so if the reading is 148 then the contaminated jar is jar 2 ... if it's 149 then it's jar 1 ... if it's 150 then the scale is broken and should be replaced, or all the pills are safe and you are overcautious :lol:

man, I can work for microsoft :P

btw, what't the answer for question 4 ? .. the pdf just gives formulas and a statement "Therefore the worst case is at least k - 1 + 1 = k .. " :?: did Kevin and I get the correct answer?

silverblue
01-01-2004, 04:30 PM
This is a smart question! I am not sure but lemme try...

I guess bcos the contaminated pill weighs 9 grams, we can find the answer by looking at the multiples of 9 as the total weight of the scale. But we have to take 1 pill from the first jar, 2 from the 2nd, 3 from the 3rd, 4 from the 4th and 5 from the 5th.... so that we know that the last digit of the total weight of these pills gives away which jar is contaminated. Example, if the last digit is 9, u know it's from jar 1. If the last digit is 8, it is jar 2. If the last digit is 7, it is jar 3. If the last digit is 6, it is jar 4 and if the last digit is 5, it is the last jar...

just trying.. :)

silverblue
01-01-2004, 04:34 PM
Opps, I think Luke got to it a few mins faster than I did... but I'm glad we got the same concept! :P

luke
01-01-2004, 04:53 PM
I'd like to modify Question 5 and propose this question:

There are 5 jars of pills. All the pills in two of the jars are contaminated. The only way to tell which pills are contaminated is by weight. A good pill weighs 10 grams while a contaminated pill in one jar weighs 9 grams while a contaminated pill in the other jar weighs 8 grams.
You are given a scale and allowed to make only one measurement with it. How do you tell which jars are contaminated? If possible point out which one is 8 grams and which one is 9 grams.

There.

Hint: The solution is similar to the answer of the original question where you take a certain number of pills from each jar and weigh them. However, in this question the number of pills from each jar is not 1,2,3,4 and 5 but more discrete. You have to figure that out. To make life easier, you can use this javascript I created to test your answer : http://anatilmizun.homeip.net/pills.php

littlebigone
01-01-2004, 09:19 PM
Then if say we break on floor 20, we will need to take the unbroken ball and test on floor 21, 22, 23, and 24. Obviously we would stop as soon as that ball breaks and that would be the floor.
and obviously if the ball breaks on floor 20, it will break if dropped from level 21,22,23 or 24 :roll: ... the higher, the harder it will hit ..

you should choose floor 19, 18, 17 and so on for the 2nd ball .. but what if the 2nd ball breaks on floor 19? can we conclude that k=19? No! We know the ball doesn't break on floor 15 but what about floor 16, 17 and 18? We don't know if the ball also breaks if dropped from those floors but unfortunately we only have 2 balls (yes some of us do :lol: ) and both of them are gone (oh no!) .. so how?

oops....meant to say 16, 17, 18, 19...hehehe...which now means that the max tests should be 14

mpalanieppan
02-01-2004, 11:33 AM
for luke's question i think instead of 1,2,3,4,5 subs with 2,3,5,11,29. This sequence has the property that the answers produced by 2a+b, a+2b for any a and b from those 5 numbers have distinct answers for all a's and b's and thus eliminate ambiguity


Btw, usually how much time would be given to answer these questions during interview?

huilinchin
03-01-2004, 02:53 PM
Sorry for the long absense. I have been busy at home and will be flying back to the US in less than a week.

I think not more one minute will be given to answer most of the questions. However, we do not need to answer the questions at once, but do it step by step by reasoning. Explanation and reasoning are more important although a correct final answer will be impressive.

Bear in mind that this is only one small session of the interviews. I am very glad that there are many ReCom members here who can answer the puzzles here accurately and are potential employees of top companies.

Actually, my main reason for creating this thread is not only to create awareness of such a test in job interviews, but also to encourage and cultivate logic and creative thinking in everyone. I feel fortunate to be given the chance to learn these puzzles and hope that others who have been reading this thread will contribute by sharing interview questions/ puzzles that they have encountered in interviews.

Thanks, luke for modifying the question, making it more challenging. I hope others can do the same by posting edited questions that have been asked.

Please feel free to email new questions to huilin@<hidden> so that we can organize this forum thread better.

Big applause again to luke and silverblue for correctly answering the Question 5.

Answer for Question 5 quoted from luke:
just get one pill from jar 1, 2 pills from jar 2, 3 pills from jar 3 .. continue for jar 4 and jar 5 .. then put all those pills on the scale and get the reading .. the jar with contaminated pill is (150-reading) .. so if the reading is 148 then the contaminated jar is jar 2 ... if it's 149 then it's jar 1 ... if it's 150 then the scale is broken and should be replaced, or all the pills are safe and you are overcautious

Thanks for trying!

-Hui Lin ^_^

huilinchin
03-01-2004, 03:07 PM
I come across a book called "How would you move Mount Fuji" recently by William Poundstone and find it pretty interesting.
I am going to share a couple of questions from the book.

Question 6:
Source: One of the assignment problems given by Steven Rudich in CMU.
Also appeared in the book quoted above.

5 pirates on an island have one hundred gold coins to split among themselves. They divide the loot as follows:
The senior pirate proposes a division, and everyone votes on it. Provided at least half the pirates vote for the proposal, they split the coins that way. If not, they kill the senior pirate and start over. The most senior (surviving) pirate proposes his own division plan and they vote by the same rules and either divide the loot or kill the senior pirate, as the case may be. The process continues until one plan is accepted. Suppose you are the senior pirate. What division do you propose? (The pirates are all extremely logical and greedy and all want to live)

Happy trying!

-Hui Lin ^_^

jiinjoo
03-01-2004, 03:46 PM
I thought the question used to say that the pirates were splitting gold bars instead of coins and they all have a computer science degrees from CMU? :twisted:

Not fair for me to solve this - just thought it was one of those questions that kept me awake at night to work on it without avail, but after good long sleep, I'll wake up and say to the world "Ahah!!" and suddenly my world has changed. This is really a classic mind teaser.

chenchow
03-01-2004, 06:04 PM
Personally I would think that we need to get the votes from at least 2 of the pirates, since if I am the senior, I will vote for it, and that would give the majority of vote.

So, I think a division of 33 each for 3 of the pirates, including ownself will be sufficient. Since, these 3 votes will be sufficient right? but it may be a little bit too cruel...


Thanks a lot, Hui Lin for sharing all these questions!

luke
04-01-2004, 10:25 AM
chenchow is being greedy ... he even takes the remaining 1 percent :roll:

mpalanieppan
04-01-2004, 04:32 PM
I might be wrong here but i think if the pirates are ranked from 1 to 5 then #1 just have to give 1 coin to no #5 and 2 coins to #4 and take 97 coins for himself

luke
05-01-2004, 04:38 AM
I might be wrong here but i think if the pirates are ranked from 1 to 5 then #1 just have to give 1 coin to no #5 and 2 coins to #4 and take 97 coins for himself
what if the 4 other pirates don't agree with this plan? they'll kill you and take those 97 coins away ...

mpalanieppan
05-01-2004, 06:49 AM
My bad, i should have explained why i chose the above answer. Sorry...

My reasoning is along the following line: (Assume pirates ranked 1-5 - descending seniority)

Consider only 3 pirates (i.e#1,2 dead somehow) :The best deal for the most senior, i.e, #3 is to give 1 coin to #5 and take 99 coins for himself. Certainly #4 will disagree since he is next in line (i.e he will have the chance to propose a division if #3 dies). But #5 will agree since if he disagrees to this deal, 2 out of three pirates against this proposal, and #3 will be killed. Next will be #4's turn and by then only 2 ppl left. #4's vote counts as half; #4 can choose to take all 100 coins for himself and #5 gets nothing.

Now consider 4 pirates(i.e just #1 dead): If the most senior now, #2, were to die, in the next level, that is when #3 is the most senior, #4 gets nothing, only #5 gets one coin and #3 takes 99 coins, as seen above. Now, there are 4 pirates, so for #2 to secure his proposal, he just have to get the vote of one more person. Hence, the best deal for him is to give 1 coin to #4 and takes 99 for himself; #4 certainly must agrees to this deal because if he disagrees, 3 out of 4 pirates against this proposal, #2 will be killed, it goes to the next step and #4 will then get nothing.

Now consider 5 pirates (as is our question): If #1 were to die, in the next step as described above, it turns out that #3 and #5 gets nothing - only #4 gets one coin and #2 gets 99 coins. So , if #1's proposal is not accepted by majority and he is killed, #3 and #5 gets nothing. So both of them will vote if they get at least something - so #1 just has to give #3 and #5 each one coin and take 98 coins for himself.

This solution is slightly different from the one i proposed above. In the above, I just added one more to the maximum #4 and #5 will get if #1 were to die. But i missed out this line of reasoning, which seem to give more for #1.

Of course, this is based on the fact that all of the pirates are both very greedy and very logical.

littlebigone
05-01-2004, 08:40 AM
wah...good thinking pala...you've got me convinced

huilinchin
05-01-2004, 12:07 PM
woa, mpalanieppan, I am curious to know how long you took to solve this question. Excellent and well done!!!!!!!!!!!!!! :D

Recursion is definitely the way to go for this question. This question illustrates how we can solve big problem by solving tiny parts of it.
Prof Rudich used to say that anyone can solve this types of problems as long as they have practice and it is not true that only intelligent people can do it.

So, I urge everyone who read this forum thread to try. For those who have been answering the questions, I hope you will continue trying the coming questions.

BIG BIG applause to mpalanieppan for correctly explaning and answering question 6.

Answer for question 6:
If the pirates are numbered from #1 to #5, and the senior pirate is pirate #1, the senior pirate will give no coin to #2, one coin to #3, no coin to #4 and one coin to #5. The senior pirate will get 98 coins for himself.

Explanation quoted from mpalanieppan:
Consider only 3 pirates (i.e#1,2 dead somehow) :The best deal for the most senior, i.e, #3 is to give 1 coin to #5 and take 99 coins for himself. Certainly #4 will disagree since he is next in line (i.e he will have the chance to propose a division if #3 dies). But #5 will agree since if he disagrees to this deal, 2 out of three pirates against this proposal, and #3 will be killed. Next will be #4's turn and by then only 2 ppl left. #4's vote counts as half; #4 can choose to take all 100 coins for himself and #5 gets nothing.

Now consider 4 pirates(i.e just #1 dead): If the most senior now, #2, were to die, in the next level, that is when #3 is the most senior, #4 gets nothing, only #5 gets one coin and #3 takes 99 coins, as seen above. Now, there are 4 pirates, so for #2 to secure his proposal, he just have to get the vote of one more person. Hence, the best deal for him is to give 1 coin to #4 and takes 99 for himself; #4 certainly must agrees to this deal because if he disagrees, 3 out of 4 pirates against this proposal, #2 will be killed, it goes to the next step and #4 will then get nothing.

Now consider 5 pirates (as is our question): If #1 were to die, in the next step as described above, it turns out that #3 and #5 gets nothing - only #4 gets one coin and #2 gets 99 coins. So , if #1's proposal is not accepted by majority and he is killed, #3 and #5 gets nothing. So both of them will vote if they get at least something - so #1 just has to give #3 and #5 each one coin and take 98 coins for himself.

Thanks for trying!

-Hui Lin ^_^

huilinchin
05-01-2004, 12:32 PM
We have been trying questions from the computer-related companies only. It's now a good time to explore the interview process of the finance and banking industry.

Big thanks to Chen Chow for sharing the interview process of CAPITAL ONE.

Sample question of Case Interview from Capital One:

You have just been appointed the manager of the Cross Sells team at Capital One, which evaluates opportunities to market non-credit card products to our credit card customers. These cross sells usually involve building relationships with outside vendors who sell us products that we, in turn, can sell to our customers at a premium.
One potential cross sell opportunity that is sitting on your desk right now is the Prepaid Phone Card -- a piece of plastic you can use to pay for long distance telephone calls. You use the card by calling in to a 1-800 number, entering the card's PIN number, and then entering the destination telephone number. The minutes left on the card are kept track of by the outside vendor -- your only responsibility is to market the product in a way that maximizes profit for Capital One.
Take a few moments to consider some of the most important factors that will influence your decision on whether to pursue the Phone Card cross sell.

Question:
Luckily, the vendor who wants to sell us the Phone Cards has already provided a lot of the information you need in an introductory e-mail. The e-mail has several key points:
The card may be sold at any price, and other companies have sold the cards for up to $0.75 per minute.
The card may be sold with any number of minutes on it.
Capital One must pay $0.20 per minute sold.
Capital One must pay $2.00 per card sold for account set-up, which includes card materials, the vendor's system programming, and postage.
The vendor notes that the Phone Card could be a good addition to Capital One's cross sell program, which ordinarily offers products in the $5 to $30 price range.
Let's assume that Capital One has decided to sell 60-minute Phone Cards at a price of $30 each. How much profit do we make on each card sold?

Source: Capital One
Answers are provided in the sub-links of the url below. Try to attempt the question before looking at the answer.
http://www.capitalone.com/careers/interviewtips.shtml

You will also get a lot of recruiting information besides the interview process.

Thanks to Chen Chow again for sharing the useful link! :D
Hope more members can send me a private message in ReCom if you have new questions to share. It can be anything related to the work-industry.

-Hui Lin ^_^

mpalanieppan
05-01-2004, 02:19 PM
I spent about one hour plus for this question, but actually it came in stages. The original answer i gave first was slightly diff (97). But i asked the same question to my friend here and when we were discussing whether we can improve, we realized that the same process applied earlier can be done again at the final stage and get a better answer......

And, thank you hui lin for collecting and posting these questions for everybody's benefit....

luke
05-01-2004, 02:38 PM
I don't know if I understood it wrongly or what .. but Question 7 is too straight that I wonder if there's any trick in it ... the answer I got is $16 per card sold ...

we get $30 for a card ... then we have to substract $2 for the price of the card ... and then substract (60 minutes x $0.20 =) $12 more .. so in the end we have to pay the vendor $14 per card .. that leaves us with $16 ...

mm is there any trick in it?

huilinchin
06-01-2004, 09:44 AM
luke, according to the website, that is the first answer. I am glad you did not take a peep at the answer.

Step 4 (of 6) - First Answer
Capital One's profit per card is $16. For your reference, the equation is shown below.
X = Profit per card sold
X = (Revenue per card) - (Expense per card)
X = $30 - (($0.20*60) + $2.00)
X = $16

But does anything big seem missing from this equation? Click here when you think you know what we've left out.

Source: http://www.capitalone.com/careers/firstanswer.shtml
(Don't click the next page of the above link if you want to try what is missing).

Now, read the following and then try again.

Step 5 (of 6) - Other Factors
The thing that we haven't considered yet is marketing costs. (In reality, we haven't considered several things, but the lack of marketing expense has the biggest impact by far.) Basically, it will cost Capital One some money to tell our customers about the Phone Card offer, but we didn't include any of that expense in the equation on the previous page.
But how should we market this product? There are several different distribution channels we could use.

Statement Inserts - Little slips of paper we put inside customers' monthly statements, which they return to us when they mail us their payments.

Bangtails - Slips of paper that are attached to the backs of the envelopes that customers use to mail in their payments. If they are interested in buying the product, they can rip off the stubs and put them inside the envelopes.

Statement Messages - A line or two of text typed on the remittance stub of each statement (the part a customer rips off and mails back with the check). It might say something like, "Check this box if you would like to purchase a Capital One Phone Card, good for 60 minutes of long distance calling, for only $30!"

Direct Mail - We could send our customers a letter?separate from their monthly statement?describing the Phone Cards in detail.

Outbound Telemarketing - We could place telephone calls to our customers describing the cards and asking them if they would like to purchase one.

Please take a few moments to think about the distribution channels above. How are they similar? How are they different?

What factors would be most important in determining which distribution channel you should use? In other words, what additional information would you need to know about each channel to decide which is best? For the purposes of this case, you do not need to think about all the variables for every distribution channel?just try to think of the two main variables that apply to all of them.

Answer: http://www.capitalone.com/careers/factorsexp.shtml

Final Answer for the question:
http://www.capitalone.com/careers/finalanswer.shtml

There are other sub-links on the website that is worth looking at.

-Hui Lin ^_^

huilinchin
06-01-2004, 10:06 AM
I am publishing this question a bit later to give time to everyone to try the banking and finance question. I learn new financial terms myself by only reading the case interview. Try to go through the banking and finance question first before trying this question.

You are most welcome, pala. Thanks for trying the questions.
Glad that more members are contributing their questions and hope that more can participate. If you have one, do share. It can be anything related to the work-industry.

Question 8:
Source: From the book, "How to move Mount Fuji?"

There are three switches in a hallway. One switch controls a light fixture in a room at the far end of the hall. The door to the room is closed, and you can't see whether the light is on or off. You need to find out which of the three switches controls the light. How can you be certain of finding that out, making just one trip to the room?

Happy trying. :D

-Hui Lin ^_^

laplace
06-01-2004, 10:47 AM
Turn on 1 of the switch for few minutes, then OFF the switch. Turn on the 2nd switch and go to the room with lights. The light that still warm but OFF is controlled by first switch, the light that cold and OFF is controlled by the 3rd switch and the light still ON is controlled by the 2nd swtich.

laplace..

Schye
06-01-2004, 02:06 PM
yeah,
i think Laplace answer is the right one.
I was being asked by one of my friends last week about this question and in fact i have no idea until he gave me the hint that it is all about the light.

huilinchin
07-01-2004, 01:01 AM
Well done, laplace!
This is an example of question where no calculation is needed and you can convince yourself that you need two bits of information to obtain the answer. So, it is impossible to find out which switch belongs to which light by making only one trip to the room unless we use our five senses.

Answer for Question 8 quoted from laplace:

Turn on 1 of the switch for few minutes, then OFF the switch. Turn on the 2nd switch and go to the room with lights. The light that still warm but OFF is controlled by first switch, the light that cold and OFF is controlled by the 3rd switch and the light still ON is controlled by the 2nd swtich.

Thanks for trying!

-Hui Lin ^_^

huilinchin
07-01-2004, 01:14 AM
oppps...sorry, I meant the book, "How would you move Mount Fuji" by William Poundstone...typo...

Another question from the book:

Question 9:
Every man in the village of fifty couples has been unfaithful to his wife. Every woman in the village instantly knows when a man other than her husband has philandered, but not when her own husband has. The village's no tolerance adultery statute requires that a woman who can prove that her husband is unfaithful must kill him that very day. No woman would dream of disobeying this law. One day, the queen, who is known to be infallible, visits the village. She announces that at least one husband has been unfaithful. What happens?

Happy trying!

-Hui Lin ^_^

huilinchin
07-01-2004, 01:36 AM
I will login again on Saturday Eastern US Time to post solutions to questions 9 and 10.

Question 10:

An evil demon captures a large, unspecified number of dwarfs. At each dwarf's entry interview, the demon plants a red or green gem in the dwarf's forehead. The demon informs the new recruit that he, the dwarf, has an unremovable red or green jewel in his forehead; that he, the demon, is not going to tell him which color, nor will anyone else (the dwarfs are strictly forbidden to speak); that one of the colors denotes sniveling company spies and the other color denotes those particularly luckless captives who are not even sniveling company spies; that the demon does not choose to tell him which color denotes which, nor will he tell him, ever. End of entry interview.

Every day, the dwarfs line up in formation so that the demon can count them, just to make sure no one has escaped. One day, the demon gets tired of the dwarfs and decides to get rid of them. He announces that he will set the dwarfs free, provided they all deduce the color of their gems. As a hint, he tells them that there is at least one dwarf with a red gem, and at least one dwarf with green gem. To earn their collectice freedom, the dwarfs must signal wordlessly at the daily lineup. All of the dwarfs with red gems are to step one pace forward, while the dwarfs with green gems remain behind. If they are correct, then all the dwarfs are free to go back to their homes in the coal mines. If they are not correct, all the dwarfs will be slaughtered on the spot.

The dwarfs are free to take as long as they want to determine the colors of their gems. They are all perfectly logical and all are dying to go back to their homes. What should they do?

Happy trying!
Hope to get more variety of interview questions from everyone!

-Hui Lin ^_^

huilinchin
07-01-2004, 01:39 AM
btw, I recommend the book, How would you move Mount Fuji by William Poundstone.

-Hui Lin ^_^

huilinchin
07-01-2004, 08:19 PM
Do email me at huilinchin@<hidden> if you have questions to share so that we can organize this forum thread better. I will be less active in ReCom as the new semester is starting next Monday, but do send me email and I will respond asap.

Hope the questions so far have increased your self-esteem for you coming job interviews and have learnt a bit about the types of logic questions being asked. I will continue to contribute questions that are relevant.
Thanks for participating in this forum thread.

-Hui Lin ^_^

topdog
08-01-2004, 11:53 AM
in response to ques #9:

really shooting in the dark here... maybe the queen has to kill the king (her husband)? since no woman can prove that her own husband has philandered, all the men are safe. assuming the queen's husband main kayu tiga, she will know about it and since she's infallible, she has to be right. so she'll have to kill him.

huilinchin
08-01-2004, 02:50 PM
topdog, try again maybe? "all the men are safe."?
...hehe...I can guess you are a man...

Hope more members can try. These are good questions.
I am taking a flight soon. See you guys around later.

-Hui Lin ^_^

luke
09-01-2004, 07:16 AM
I'm also shooting in the dark here ... if anyone got shot, sorry .. I didn't mean to :P ..

Q9: the queen just have to ask 2 of the wives ... the 1st will 'list down' all unfaithful husbands except hers .. the 2nd one will determine if the 1st's husband also philandered ...

Q10: weren't the dwarves only disallowed to speak? they can use any other methods to signal if others' gem is red or green ... for example all the dwarves can signal the dwarf on the right of each of them whether to step forward or not ..

I'm not confident I got the correct answers ... ^_^0

chiunlin
10-01-2004, 11:09 AM
Question 8 is very familiar to me, with me here is a modified(and harder) version of the question. Anybody here care for a try?

Modified question#8
There are FOUR switches in a hallway. One switch controls a light fixture in a room at the far end of the hall. The door to the room is closed, and you can't see whether the light is on or off. You need to find out which of the FOUR switches controls the light. How can you be certain of finding that out, making just one trip to the room?

huilinchin
10-01-2004, 11:28 PM
Thanks for trying, topdog and luke.
I am releasing only the answer without explanation for question 9, but do think about the reasoning why that is the correct logical answer.
Hint: Recursion again like the pirates and gold question.

Answer for question 9:
Nothing at all happens for forty-nine days. Then on the fiftieth day, all fifty wives kill their husbands.


Answer for question 10 (quoted from the book):
What can a perfectly logical dwarf deduce in this situation? Probably nothing. Most likely a typical dwarf sees some fellows with green gems and others with red gems. He still hasn't got a clue about his own gem.

But suppose there's a dwarf who sees only red gems or only green gems on the other dwarfs' foreheads. Since the demon has informed that thre is at least on red gem, a dwarf who sees only green gems can conclude that he is the lone dwarf with a red gem and vice versa. Consider a hypothetical dwarf who sees only green gems. He knows he's got a red gem. All that dwarf has to do is to step forward on the first lineup after the demon's announcement. He can be confident that his logical fellow dwarfs, with green gems, will remain in line. This will be the correct response the demon has requested.

Why the other dwarfs remain in line? Is it because they know they have green gems? No. Each of these dwarfs sees one red gem (on the fellow who is about to step out of line) and lots of green gems (on everyone else). That does not permit them to deduce their own gem's color. There has to be at least one gem of each color, and they see at least one gem of each color. Their own gem could be either color. These dwarfs remain in line because they are clueless. Remember, if anyone makes a wrong move, everyone dies. Being logical, the only safe course is to remain in line until and unless one can deduce that one has a red gem.

This does not solve the puzzle. It is one scenario, that is easy to analyze. That does not mean it is actually the case. We're told only that there are a large, unspecified number of dwarfs with a mix of red and green gems.

If the above scenario does not play out on the first lineup, then all the dwarfs can conclude that there are at least two gems of each color. This may well been obvious all along (because the dwarfs can see other dwarfs' gems). But should there be any dwarf who sees just one gem of a given color, he can, at the second lineup, conclude that he is the other guy with that color of gem. He and the other dwarf of that color (who reasons identically), will both step forward on the second lineup.

This chain of reasoning and metareasoning continues until the number of lineups corresponds to the actual number of dwarfs with the less common color of gems. Then, that many logical dwarfs step forward and if the demon keeps to his words, all the dwarfs will be set free.


Thanks,
Hui Lin ^_^

11-01-2004, 10:34 AM
Wow, so many problems and replies. Well done, Hui Lin!

Any unsolved problems so far?

Here's my contribution:
You have two card, one blue the other red, identical in all other attributes.
How can you convince a color-blind person that two cards are of different color?

Hint: You can interact with the color-blind person, i.e. talk to the person and ask for a response etc.

Shien Jin

chiunlin
11-01-2004, 11:36 AM
This is a very tricky question, I'll make an attempt to solve it using mathematical induction. First, I'll make the assumption that all fifty wives have a very logical brain.

Now, suppose that only ONE man has been unfaithful to the wife. Every other woman in the village will know about it except the wife of the man who has philandered. When she hears about the rumor that a man has philandered from other women, she'll think, since I'm the last person to know about this and the only person who doesn't realise this immediately is the wife, this means that my husband has philandered. She will then kill her husband.

Now assume that when x men have been unfaithful to their wives. They will all be killed on the x th day.

When there is x+1 men who are unfaithful to their wives, the wife of the man who philandered know that how many men(x men) have been unfaithful to their wives but they do not know that her husband has philandered. Nothing happens on the x th day, which means that there are x+1 husbands who philandered and that additional person must be her husband. Hence, since she knows that 49 men have philandered but nothing happens on the 49th day, this means that her husband is also guilty and she will kill her on the 50th day. Every woman in the village does the same thing and thus, all 50 men are killed.

huilinchin
12-01-2004, 02:11 AM
Excellent explanation, chiunlin!! :D Yeap, it's all about induction.
I think the highest level in computer science is all about mathematics.

Explanation of answer for question 9 quoted from chiunlin:
This is a very tricky question, I'll make an attempt to solve it using mathematical induction. First, I'll make the assumption that all fifty wives have a very logical brain.

Now, suppose that only ONE man has been unfaithful to the wife. Every other woman in the village will know about it except the wife of the man who has philandered. When she hears about the rumor that a man has philandered from other women, she'll think, since I'm the last person to know about this and the only person who doesn't realise this immediately is the wife, this means that my husband has philandered. She will then kill her husband.

Now assume that when x men have been unfaithful to their wives. They will all be killed on the x th day.

When there is x+1 men who are unfaithful to their wives, the wife of the man who philandered know that how many men(x men) have been unfaithful to their wives but they do not know that her husband has philandered. Nothing happens on the x th day, which means that there are x+1 husbands who philandered and that additional person must be her husband. Hence, since she knows that 49 men have philandered but nothing happens on the 49th day, this means that her husband is also guilty and she will kill her on the 50th day. Every woman in the village does the same thing and thus, all 50 men are killed.


-Hui Lin ^_^

huilinchin
12-01-2004, 02:20 AM
Big thanks so far to chenchow for Capital One questions, luke for modifying question 5, mpalanieppan for one bulb question, jiinjoo for Amazon and Oracle question (to be posted soon), chiunlin for modifying question 8 and prince for question 11.

Hope more and more members can contribute. :D
It can be anything related to the work-industry and interesting questions/ puzzles that you have heard of that are potential interview questions of top companies.

If you have questions to share, please do NOT post them here. Instead, please email them to me at huilin@<hidden> or send me a private message in ReCom with the following details.

1) Name of Submitter:
2) Nickname of Submitter in ReCom:
3) Source of Question: (can be from your interview, friends, conference, book, etc)
4) Name of company (where the puzzles come from):
5) Complete Puzzle/Question:
6) Answer to the Puzzle:
7) Complete explanation of the answer:

This will help us a lot in organizing this forum thread better and allow everyone to try the current questions.
Acknowledgement will be given to all contributors and the source.

As you may have already noticed, questions will be in red while answers will be in blue.

Thanks,
Hui Lin ^_^

huilinchin
12-01-2004, 02:35 AM
Shien Jin, thanks a lot for your contribution!!

There are 2 unsolved questions. Hope more members can give it a shot. It's the practice thinking that is most important and not correct answers.

Modified question#8 from chiunlin:
There are FOUR switches in a hallway. One switch controls a light fixture in a room at the far end of the hall. The door to the room is closed, and you can't see whether the light is on or off. You need to find out which of the FOUR switches controls the light. How can you be certain of finding that out, making just one trip to the room?

A very popular theoretical and logical CS question quoted from prince:
Question 11:
You have two card, one blue the other red, identical in all other attributes.
How can you convince a color-blind person that two cards are of different color?

Hint: You can interact with the color-blind person, i.e. talk to the person and ask for a response etc.


-Hui Lin ^_^

laplace
12-01-2004, 08:45 AM
To answer the modified question #8:

Take an example of the switch name as Switch A, Switch B, Switch C and Switch D.

Turn ON Switch A and B in the same time for few minutes, then OFF Switch B. Turn ON Switch C. Go to the room and check the status below:

If light is HOT and ON - Switch A
If light is HOT and OFF - Switch B
If light is COLD and ON - Switch C
If light is COLD and OFF - Switch D

Thank you.

laplace..

littlebigone
12-01-2004, 08:01 PM
er...for question 11, could we use outside props?

if yes, then I would suggest using a red buld to shine on the cards in the dark. Only one card will be illuminated. The other should be close to black.

Right?

something like that.

laplace
12-01-2004, 08:24 PM
Maybe I am so dumb but I found an article from the net, it said that colorblindness most commonly cannot distinguish Red and Green. There are certain cases for colorblindness of Blue and Yellow but it is very rare.

http://www.toledo-bend.com/colorblind/aboutCB.html

If this color blind is a common color vision deficiency patient, he/she should be able to see the Blue card. Why should we convince them about the color?

Correct me if I am wrong.

laplace..

Schye
12-01-2004, 10:08 PM
er...for question 11, could we use outside props?

if yes, then I would suggest using a red buld to shine on the cards in the dark. Only one card will be illuminated. The other should be close to black.

Right?

something like that.

Good idea but that will only be applied if you are allowed to tell him what color of light you are using.
If we can tell them the color of other things, then we could just compare the cards to anything with similiar color, and they wil know the answer.

topdog
12-01-2004, 10:22 PM
i think the key is that we don't have to prove that the cards are red and blue. just demonstrating that the colors are different is enough...i guess we need clarification on how color blind he is.

13-01-2004, 02:34 AM
the person is totally color-blind i.e. cannot tell the difference between any two different colors, and in addition cannot tell the difference between dark shades and brighter shades. so, shining a light wouldn't work.

topdog is right that "just demonstrating that the colors are different is enough"

wwhong
13-01-2004, 09:02 AM
are we allowed to use more than 2 cards or have to convince him that's 2 different colors using only 2 cards?

huilinchin
13-01-2004, 06:20 PM
The question actually suggest that you have a conversation with the color-blind person and ask him random questions (in the hint given by Shien Jin).
This question concerns zero-knowledge (search in google), something that you learn in theoretical computer science.
This is an original problem created by prince (Shien Jin). It is not an interview problem, but it could be in the future :roll:

Don't read on if you want to try the question.





Answer for question 11 contributed by Shien Jin:
Source: http://www.wisdom.weizmann.ac.il/~oded/poster03.html

Persuasion is both an art and a science - particularly if you want to disclose the least possible information to the person you're trying to convince.
How, for instance can one persuade a person who is color-blind that the two cards in his hand are of a different color? One way would be to rely on a device that measures wavelength (color), but that would be expensive and inconvenient. Prof. Oded Goldreich of the Computer Science and Applied Mathematics Department suggests a more efficient method - a dialogue that includes random questions.
The first step would be to write the names of the colors (say, red and green) on the back of the cards. Then the color-blind person would show us the front of one of the cards, selected at random, and ask us what the color was. If this process is repeated enough times and we consistently identified the color as the one written on the card's back, then the person would be persuaded that the cards' colors are different. It is a simple method, which relies on randomized interaction between the two parties. In addition, essentially, it doesn't disclose any information other than the claim itself (that the cards' colors are different). Thus it is called a zero-knowledge proof.
Goldreich's studies have shown that randomness, a factor usually viewed as an impediment to precise computation, can assist proof systems, especially zero-knowledge systems. Such proofs play an important role in the protection of privacy and confidential information in computational systems.

Thanks.

-Hui Lin ^_^

chenchow
10-02-2004, 06:15 AM
Since it is interview season, those who are applying for internship or have friends who are applying for internship, please feel free to utilize this resources over here and also hope that you can help supply the questions to Hui Lin at huilin@<hidden> and she would post it over here!

chenchow
10-02-2004, 06:15 AM
Since it is interview season, those who are applying for internship or have friends who are applying for internship, please feel free to utilize this resources over here and also hope that you can help supply the questions to Hui Lin at huilin@<hidden> and she would post it over here!

huilinchin
10-02-2004, 08:02 AM
I am re-posting the old Questions 12, 13 and 14 and their answers that were lost due to bad web hosting. All these 3 questions are Amazon questions contributed by Jiin Joo.

Question 12:
You have two boxes and some equal number of white balls and black balls. You'll decide on how many balls you want to put into both the boxes but all the balls must be put into the box and each box must have at least one ball (for me to pick). After that, I'll randomly chose a box and I'll randomly pick a ball.
If I get a black ball I win, white ball I lose. How do you maximize your chance of winning?


Don't read if you want to try first :D

Answer:
Put one white ball in a box, and the rest of the balls in the other.
If I pick the single ball box you win 100%.
If I pick the other, then you have almost 50% chance
(the larger the number of balls, the closer it is to 50%) of winning.


Question 13:
You play a game with me, using coins, take turns, place them on a round table. No coins can overlap one another.
The first person who fails to put a coin on the table loses.
Is there a definite way to win this game?
If so, what are the preconditions you must have to win?
(* hint: no calculation involved *)


Answer below...


Answer:
You will need a good geometric knowledge for this problem.
Play mirror.
Precondition: To win, player must go first.
Way to play: Put the first coin in the middle of the table and
then simply mimic the opponent. You'll always have a place to mimic the move.


Question 14:
A rabbit wants to hop up a ladder. the ladder has n steps. the rabbit can hop up 1 or 2 steps at a time. How many different ways can the rabbit hop up the stairs?

(*Hint: need knowledge of some special math sequence *)


Answer below...


Answer:
Fibonacci numbers



Enjoy! :D

-Hui Lin ^_^

huilinchin
10-02-2004, 08:02 AM
I am re-posting the old Questions 12, 13 and 14 and their answers that were lost due to bad web hosting. All these 3 questions are Amazon questions contributed by Jiin Joo.

Question 12:
You have two boxes and some equal number of white balls and black balls. You'll decide on how many balls you want to put into both the boxes but all the balls must be put into the box and each box must have at least one ball (for me to pick). After that, I'll randomly chose a box and I'll randomly pick a ball.
If I get a black ball I win, white ball I lose. How do you maximize your chance of winning?


Don't read if you want to try first :D

Answer:
Put one white ball in a box, and the rest of the balls in the other.
If I pick the single ball box you win 100%.
If I pick the other, then you have almost 50% chance
(the larger the number of balls, the closer it is to 50%) of winning.


Question 13:
You play a game with me, using coins, take turns, place them on a round table. No coins can overlap one another.
The first person who fails to put a coin on the table loses.
Is there a definite way to win this game?
If so, what are the preconditions you must have to win?
(* hint: no calculation involved *)


Answer below...


Answer:
You will need a good geometric knowledge for this problem.
Play mirror.
Precondition: To win, player must go first.
Way to play: Put the first coin in the middle of the table and
then simply mimic the opponent. You'll always have a place to mimic the move.


Question 14:
A rabbit wants to hop up a ladder. the ladder has n steps. the rabbit can hop up 1 or 2 steps at a time. How many different ways can the rabbit hop up the stairs?

(*Hint: need knowledge of some special math sequence *)


Answer below...


Answer:
Fibonacci numbers



Enjoy! :D

-Hui Lin ^_^

huilinchin
10-02-2004, 08:11 AM
The next 2 questions are contributed by Chen Chow, taken from his friend's interview. These are Microsoft interview questions, one is a logic question, the other is a programming question.

Question 15:
One day, you were staying at a hotel. When you woke up, you turned on the hot water at the shower and the water was immediately hot; whereas when you went to shower at the evening and you turned on the hot water at the shower, the water was initially cold, slowly cool down and then gradually lukewarm and then only become hot. Why is it happen?


Question 16:
Write the pseudocode for the First 50 prime number.


(* I think you should try your best to find the shortest algorithm that will have short running time or small cache. There are many ways we can calculate prime numbers and you may want to think about the many possible ways so that you can compare and mention the advantages and disadvantages of it. I have heard from a MS recruiter before that they sometimes just want to know if you are applying the alternatives you have learnt from the Computer Science courses. *)


For these 2 questions, I think MS people just want creative answers with logical reasoning. As long as you can describe the solution well, you are good to go :D

So, give it a try!!! :D


-Hui Lin ^_^

huilinchin
10-02-2004, 08:11 AM
The next 2 questions are contributed by Chen Chow, taken from his friend's interview. These are Microsoft interview questions, one is a logic question, the other is a programming question.

Question 15:
One day, you were staying at a hotel. When you woke up, you turned on the hot water at the shower and the water was immediately hot; whereas when you went to shower at the evening and you turned on the hot water at the shower, the water was initially cold, slowly cool down and then gradually lukewarm and then only become hot. Why is it happen?


Question 16:
Write the pseudocode for the First 50 prime number.


(* I think you should try your best to find the shortest algorithm that will have short running time or small cache. There are many ways we can calculate prime numbers and you may want to think about the many possible ways so that you can compare and mention the advantages and disadvantages of it. I have heard from a MS recruiter before that they sometimes just want to know if you are applying the alternatives you have learnt from the Computer Science courses. *)


For these 2 questions, I think MS people just want creative answers with logical reasoning. As long as you can describe the solution well, you are good to go :D

So, give it a try!!! :D


-Hui Lin ^_^

z
10-02-2004, 09:01 AM
for some starting hints for the prime number problem, read the C++ thread.

z
10-02-2004, 09:01 AM
for some starting hints for the prime number problem, read the C++ thread.

Schye
10-02-2004, 09:51 AM
Question 15:[/b]
One day, you were staying at a hotel. When you woke up, you turned on the hot water at the shower and the water was immediately hot; whereas when you went to shower at the evening and you turned on the hot water at the shower, the water was initially cold, slowly cool down and then gradually lukewarm and then only become hot. Why is it happen?


I think it maybe cause by the usage of water by other customers in the hotel.
As we all know, hotel is a place for us to stay overnight(I mean the most common purpose) and I think there should be more than 90% of the customers will stay in the hotel they have booked. The time of them waking up will be nearly the same too which means the hot water in the pipe lines will be flowing/changing from time to time hence the temperature of the pipe and the water will be maintain at a certain temperature.

Where else in the evening, the water usage will be rather low compared to morning as not many will be using water at the same time. The time of coming back will be differs from one another too which will cause the time of hot water stays in the pipe for sometime. This will finally cause the temperature of the hot water to have the same temperature with the pipelines that usually being placed between ceilings/floors etc (most of them will be out side the room which usually have lower temperature compared to indoor) that will absorb the heat. So, when you turn on the tab, the water at first will be the water from the pipe lines in your room (which is least being used and may stay the same water as long as you don?t use it) then followed by the pipelines from the same floor and then from the main pipe which the usage differs from one another that cause the difference of the temperature.

Just some logics that cant be proved :roll:

Schye
10-02-2004, 09:51 AM
Question 15:[/b]
One day, you were staying at a hotel. When you woke up, you turned on the hot water at the shower and the water was immediately hot; whereas when you went to shower at the evening and you turned on the hot water at the shower, the water was initially cold, slowly cool down and then gradually lukewarm and then only become hot. Why is it happen?


I think it maybe cause by the usage of water by other customers in the hotel.
As we all know, hotel is a place for us to stay overnight(I mean the most common purpose) and I think there should be more than 90% of the customers will stay in the hotel they have booked. The time of them waking up will be nearly the same too which means the hot water in the pipe lines will be flowing/changing from time to time hence the temperature of the pipe and the water will be maintain at a certain temperature.

Where else in the evening, the water usage will be rather low compared to morning as not many will be using water at the same time. The time of coming back will be differs from one another too which will cause the time of hot water stays in the pipe for sometime. This will finally cause the temperature of the hot water to have the same temperature with the pipelines that usually being placed between ceilings/floors etc (most of them will be out side the room which usually have lower temperature compared to indoor) that will absorb the heat. So, when you turn on the tab, the water at first will be the water from the pipe lines in your room (which is least being used and may stay the same water as long as you don?t use it) then followed by the pipelines from the same floor and then from the main pipe which the usage differs from one another that cause the difference of the temperature.

Just some logics that cant be proved :roll:

huilinchin
15-02-2004, 04:36 AM
good try, schye!
the answer is good enough for me...

any more thoughts?

-Hui Lin ^_^

huilinchin
15-02-2004, 04:36 AM
good try, schye!
the answer is good enough for me...

any more thoughts?

-Hui Lin ^_^

littlebigone
28-02-2004, 12:29 PM
I got an interview question that I think is really interesting. If you know this one, then let others try before posting the answer.

So, you have 12 balls and a balance scale. 1 of the 12 balls is defective. Since it's defective, it's either lighter or heavier than the rest of the balls. You can use the scale 3 times to determine which ball it is.

littlebigone
28-02-2004, 12:29 PM
I got an interview question that I think is really interesting. If you know this one, then let others try before posting the answer.

So, you have 12 balls and a balance scale. 1 of the 12 balls is defective. Since it's defective, it's either lighter or heavier than the rest of the balls. You can use the scale 3 times to determine which ball it is.

huilinchin
29-02-2004, 12:03 PM
Good good!
Hope more members participate and share questions =)

-Hui Lin ^_^

huilinchin
29-02-2004, 12:03 PM
Good good!
Hope more members participate and share questions =)

-Hui Lin ^_^

huilinchin
06-03-2004, 10:46 AM
Question 17:
So, you have 12 balls and a balance scale. 1 of the 12 balls is defective. Since it's defective, it's either lighter or heavier than the rest of the balls. You can use the scale 3 times to determine which ball it is.

I hope it is fine that I answer since no one has answered this. This is a very interesting question! May I ask which company asked this question?

I think the biggest trick is we do not know if the defective ball is lighter or heavier although we have the most important knowledge that the rest of the balls must have the same weight. The idea is to keep track of as many bits of information as possible after each optimum weighing process. Keep at least 2 bits of information for each ball after each weighing. *Thus, we want to keep track of balls that are heavier than other balls at each weighing.* Now, break the problem into smaller problems.

Answer:
Always, safest thing to do first is to label all the balls ={1,2,3,...,12}.
Notation:
WLOG = Without Loss of Generalization
{1,2} VS {3,4} = weigh Balls 1 & 2 against Balls 3 & 4

STEP A: {1,2,3,4} VS {5,6,7,8}
There are only 3 results, either EQUAL, LESS or GREATER:

Result A_1 - EQUAL
This means that 1,2,..,8 are good balls since all the 8 balls have equal weights. Thus, either one of 9,10,11,12 is a bad ball.
I'll leave it to you to detect the bad ball among {9,10,11,12} in 2 steps.

Result A_2 - LESS
Since they are not equal in STEP A, this means that 9,10,11,12 are good balls since we only have one bad ball, which is now one among {1,2,...,8}.
WLOG, let {1 + 2 + 3 + 4} < {5 + 6 + 7 + 8}
*Store extra information:
Label {1,2,3,4}=LOW
Label {5,6,7,8}=HIGH

STEP B: {1,3,7} VS {4,5,9}
There are only 3 results, either EQUAL, LESS or GREATER:
Result B_1 - EQUAL
If they are equal in STEP B, this means that 1,3,7,4,5,9 are good balls and one of 2,6,8 is a bad ball. Note that it does not matter if 9 is replaced by 10, 11 or 12 because we just want to weigh 3 balls vs 3 balls.
I'll leave it to you to detect the bad ball among {2,6,8} in 2 steps.

Result B_2 - LESS
Since they are not equal in STEP B, this means that either 2,6,8 is bad. Now to determine which one is bad:

STEP C: {2,6} VS {4,5}
Result C_1 - EQUAL
If they are equal in STEP C, then 8 is the bad ball.

Result C_2 - LESS
If {2+6} < {4+5}, then we assign
{2,6} = LOW
{4,5} = HIGH
Note: we already know from Result B_2 that 4,5 are good balls.
So, it's either 2 or 6.
We observe a contradiction that 6 cannot be LOW in Result C_2 and HIGH in Result A_2 at the same time. So, 2 is the bad ball.

Result C_3 - GREATER
If {2+6} > {4+5}, then we assign
{4,5} = LOW
{2,6} = HIGH
Note: we already know from Result B_2 that 4,5 are good balls.
So, it's either 2 or 6.
We observe a contradiction that 2 cannot be HIGH in Result C_2 and LOW in Result A_2 at the same time. So, 6 is the bad ball.

Result B_3 - GREATER
Symmetrical with Result B_2. They are the same WLOG.

Result A_3 - GREATER
Symmetrical with Result A_2. They are the same WLOG.


Sorry if I am not being clear enough.

-Hui Lin ^_^

huilinchin
06-03-2004, 10:46 AM
Question 17:
So, you have 12 balls and a balance scale. 1 of the 12 balls is defective. Since it's defective, it's either lighter or heavier than the rest of the balls. You can use the scale 3 times to determine which ball it is.

I hope it is fine that I answer since no one has answered this. This is a very interesting question! May I ask which company asked this question?

I think the biggest trick is we do not know if the defective ball is lighter or heavier although we have the most important knowledge that the rest of the balls must have the same weight. The idea is to keep track of as many bits of information as possible after each optimum weighing process. Keep at least 2 bits of information for each ball after each weighing. *Thus, we want to keep track of balls that are heavier than other balls at each weighing.* Now, break the problem into smaller problems.

Answer:
Always, safest thing to do first is to label all the balls ={1,2,3,...,12}.
Notation:
WLOG = Without Loss of Generalization
{1,2} VS {3,4} = weigh Balls 1 & 2 against Balls 3 & 4

STEP A: {1,2,3,4} VS {5,6,7,8}
There are only 3 results, either EQUAL, LESS or GREATER:

Result A_1 - EQUAL
This means that 1,2,..,8 are good balls since all the 8 balls have equal weights. Thus, either one of 9,10,11,12 is a bad ball.
I'll leave it to you to detect the bad ball among {9,10,11,12} in 2 steps.

Result A_2 - LESS
Since they are not equal in STEP A, this means that 9,10,11,12 are good balls since we only have one bad ball, which is now one among {1,2,...,8}.
WLOG, let {1 + 2 + 3 + 4} < {5 + 6 + 7 + 8}
*Store extra information:
Label {1,2,3,4}=LOW
Label {5,6,7,8}=HIGH

STEP B: {1,3,7} VS {4,5,9}
There are only 3 results, either EQUAL, LESS or GREATER:
Result B_1 - EQUAL
If they are equal in STEP B, this means that 1,3,7,4,5,9 are good balls and one of 2,6,8 is a bad ball. Note that it does not matter if 9 is replaced by 10, 11 or 12 because we just want to weigh 3 balls vs 3 balls.
I'll leave it to you to detect the bad ball among {2,6,8} in 2 steps.

Result B_2 - LESS
Since they are not equal in STEP B, this means that either 2,6,8 is bad. Now to determine which one is bad:

STEP C: {2,6} VS {4,5}
Result C_1 - EQUAL
If they are equal in STEP C, then 8 is the bad ball.

Result C_2 - LESS
If {2+6} < {4+5}, then we assign
{2,6} = LOW
{4,5} = HIGH
Note: we already know from Result B_2 that 4,5 are good balls.
So, it's either 2 or 6.
We observe a contradiction that 6 cannot be LOW in Result C_2 and HIGH in Result A_2 at the same time. So, 2 is the bad ball.

Result C_3 - GREATER
If {2+6} > {4+5}, then we assign
{4,5} = LOW
{2,6} = HIGH
Note: we already know from Result B_2 that 4,5 are good balls.
So, it's either 2 or 6.
We observe a contradiction that 2 cannot be HIGH in Result C_2 and LOW in Result A_2 at the same time. So, 6 is the bad ball.

Result B_3 - GREATER
Symmetrical with Result B_2. They are the same WLOG.

Result A_3 - GREATER
Symmetrical with Result A_2. They are the same WLOG.


Sorry if I am not being clear enough.

-Hui Lin ^_^

huilinchin
06-03-2004, 10:53 AM
The next question is contributed by DecentMerson. Thanks!!!
Hope more will post and reply.

Details:
1) Name of Submitter: Lai Voon Seng
2) Nickname of Submitter in ReCom: DecentMerson
3) Country currently in: Malaysia
4) Source of Question: Friends
5) Name of company (where the puzzles come from): not mentioned
6) Complete Puzzle/Question:

Question 18:
There are 2 identical metal spheres(same size and same physical apperance). One of the ball is solid and the other is hollow but filled with liquid. The weight of the 2 spheres are the same. How do you recognize which one is filled with liquid while the other is solid?


Try try try!!! Hope more and more ReComers will contribute. Remember to include the details as mentioned in the first page of this forum thread when you message or email me. :D

-Hui Lin ^_^

huilinchin
06-03-2004, 10:53 AM
The next question is contributed by DecentMerson. Thanks!!!
Hope more will post and reply.

Details:
1) Name of Submitter: Lai Voon Seng
2) Nickname of Submitter in ReCom: DecentMerson
3) Country currently in: Malaysia
4) Source of Question: Friends
5) Name of company (where the puzzles come from): not mentioned
6) Complete Puzzle/Question:

Question 18:
There are 2 identical metal spheres(same size and same physical apperance). One of the ball is solid and the other is hollow but filled with liquid. The weight of the 2 spheres are the same. How do you recognize which one is filled with liquid while the other is solid?


Try try try!!! Hope more and more ReComers will contribute. Remember to include the details as mentioned in the first page of this forum thread when you message or email me. :D

-Hui Lin ^_^

__earth
06-03-2004, 11:30 AM
Does the density of the liquid equal the density of the metal?

__earth
06-03-2004, 11:30 AM
Does the density of the liquid equal the density of the metal?

huilinchin
06-03-2004, 11:41 AM
I think the density of the liquid differs from the density of the metal. Otherwise, I am not sure how the puzzle can be solved. I am really poor in Physics. DecentMerson, any comment?

-Hui Lin ^_^

huilinchin
06-03-2004, 11:41 AM
I think the density of the liquid differs from the density of the metal. Otherwise, I am not sure how the puzzle can be solved. I am really poor in Physics. DecentMerson, any comment?

-Hui Lin ^_^

__earth
06-03-2004, 11:48 AM
if the density of the liquid and the metal differ, how could the mass of both spheres equal each other?

__earth
06-03-2004, 11:48 AM
if the density of the liquid and the metal differ, how could the mass of both spheres equal each other?

luke
06-03-2004, 11:55 AM
if the sizes and the weights of both metal spheres are the same, and the densities of the the metal and the liquid are different, one of the possibilities is the liquid doesn't actually fill up the hollow in the sphere and the liquid is denser than the metal ... the sphere containing liquid can be determined by shaking it .. you'll feel it right away ...

luke
06-03-2004, 11:55 AM
if the sizes and the weights of both metal spheres are the same, and the densities of the the metal and the liquid are different, one of the possibilities is the liquid doesn't actually fill up the hollow in the sphere and the liquid is denser than the metal ... the sphere containing liquid can be determined by shaking it .. you'll feel it right away ...

__earth
06-03-2004, 12:00 PM
if the sizes and the weights of both metal spheres are the same, and the densities of the the metal and the liquid are different, one of the possibilities is the liquid doesn't actually fill up the hollow in the sphere and the liquid is denser than the metal ... the sphere containing liquid can be determined by shaking it .. you'll feel it right away ...

I could be but tThe question says the masses are the same. if its not fully filled, the mass of the hollow sphere would be reduced - unless the density of the liquid is higher than the metal.

i have a feeling that the spheres in the question are "physically" impossible. no pun intended.

__earth
06-03-2004, 12:00 PM
if the sizes and the weights of both metal spheres are the same, and the densities of the the metal and the liquid are different, one of the possibilities is the liquid doesn't actually fill up the hollow in the sphere and the liquid is denser than the metal ... the sphere containing liquid can be determined by shaking it .. you'll feel it right away ...

I could be but tThe question says the masses are the same. if its not fully filled, the mass of the hollow sphere would be reduced - unless the density of the liquid is higher than the metal.

i have a feeling that the spheres in the question are "physically" impossible. no pun intended.

luke
06-03-2004, 12:11 PM
didn't I say the liquid is denser than the metal???

luke
06-03-2004, 12:11 PM
didn't I say the liquid is denser than the metal???

__earth
06-03-2004, 12:17 PM
aah yes. I didn't read it properly.
So, we have an answer then.

__earth
06-03-2004, 12:17 PM
aah yes. I didn't read it properly.
So, we have an answer then.

DecentMerson
06-03-2004, 12:30 PM
sorry for not being clear enough.... I'll make it to be more specific next time....

The DENSITY of the LIQUID = The DENSITY of the METAL
It is physically possible to have a liquid as dense as the metal....
(for instance, u can have oil, or u can mix the liquid or dilute some salt into the liquid to make it as dense as the metal...)but no matter wat, the liquid is filled up the hollow, completely, in the core......

so, by shaking, as there won't be any space for the liquid to move around, there won't be any sound or any feeling to contraST the 2 spheres...

nice try luke, but it is not the answer.... :twisted:

DecentMerson
06-03-2004, 12:30 PM
sorry for not being clear enough.... I'll make it to be more specific next time....

The DENSITY of the LIQUID = The DENSITY of the METAL
It is physically possible to have a liquid as dense as the metal....
(for instance, u can have oil, or u can mix the liquid or dilute some salt into the liquid to make it as dense as the metal...)but no matter wat, the liquid is filled up the hollow, completely, in the core......

so, by shaking, as there won't be any space for the liquid to move around, there won't be any sound or any feeling to contraST the 2 spheres...

nice try luke, but it is not the answer.... :twisted:

__earth
06-03-2004, 12:42 PM
could you cut the sphere in half? :twisted:

could you heat the thing up and then measure the radius of both sphere with a micrometer? :P

__earth
06-03-2004, 12:42 PM
could you cut the sphere in half? :twisted:

could you heat the thing up and then measure the radius of both sphere with a micrometer? :P

luke
06-03-2004, 12:45 PM
heh now i get the picture .. have you guys heard about the trick to know if an egg is boiled or not? spin the egg (or the sphere) and stop it with your hand .. when you release the object, if it starts spinning then it contains liquid inside .. else it's solid .. haha how bout that?

luke
06-03-2004, 12:45 PM
heh now i get the picture .. have you guys heard about the trick to know if an egg is boiled or not? spin the egg (or the sphere) and stop it with your hand .. when you release the object, if it starts spinning then it contains liquid inside .. else it's solid .. haha how bout that?

DecentMerson
06-03-2004, 01:09 PM
you cannot cut the spheres into halves.....

am i suppose to tell who got the right answer, or huilin is going to tell it....

DecentMerson
06-03-2004, 01:09 PM
you cannot cut the spheres into halves.....

am i suppose to tell who got the right answer, or huilin is going to tell it....

luke
06-03-2004, 01:13 PM
hey what about my answer? are you trying to avoid it? spin the spheres, stop them and then immediately release them .. the one who starts re-spinning is the one filled with liquid ..

luke
06-03-2004, 01:13 PM
hey what about my answer? are you trying to avoid it? spin the spheres, stop them and then immediately release them .. the one who starts re-spinning is the one filled with liquid ..

DecentMerson
06-03-2004, 01:18 PM
you cannot cut the spheres into halves.....

am i suppose to tell who got the right answer, or huilin is going to tell it....

i thought u can get my hint!!!! :D

DecentMerson
06-03-2004, 01:18 PM
you cannot cut the spheres into halves.....

am i suppose to tell who got the right answer, or huilin is going to tell it....

i thought u can get my hint!!!! :D

luke
06-03-2004, 01:21 PM
owh .. hahahaha ..

luke
06-03-2004, 01:21 PM
owh .. hahahaha ..

huilinchin
06-03-2004, 11:03 PM
oppss...sorry sorry...answered the question wrongly...
DecentMerson, please feel free to post the answer if you like as long as the answer is posted in "blue" and labelled.

Luke and earth, thanks for participating! And DecentMerson's hint tells us that Luke's answer is correct :D

Well done, Luke!!!
Answer for Question 18 quoted from Luke:
spin the spheres, stop them and then immediately release them .. the one who starts re-spinning is the one filled with liquid ..

Hope more will participate :wink:
I will post the next question shortly. Stay tuned. :D

-Hui Lin ^_^

huilinchin
06-03-2004, 11:03 PM
oppss...sorry sorry...answered the question wrongly...
DecentMerson, please feel free to post the answer if you like as long as the answer is posted in "blue" and labelled.

Luke and earth, thanks for participating! And DecentMerson's hint tells us that Luke's answer is correct :D

Well done, Luke!!!
Answer for Question 18 quoted from Luke:
spin the spheres, stop them and then immediately release them .. the one who starts re-spinning is the one filled with liquid ..

Hope more will participate :wink:
I will post the next question shortly. Stay tuned. :D

-Hui Lin ^_^

huilinchin
06-03-2004, 11:18 PM
Hope more and more ReComers, other than anchors, will try. :D
The more you try, the more confidence you will have and the more you will be convinced that all problems can be broken down into smaller pieces. Correct answer is not as important as the thinking process. It's not easy to search for good questions and hope that everyone will treasure the opportunity to try. :idea:

Here's a question that I bumped into:

Question 19:
This puzzle was apparently written by Einstein in the last century. He said that 98% of the people cannot solve the quiz.

Facts:
F1. There are 5 houses in 5 different colors.
F2. In each house, lives a person with different nationality.
F3. These 5 owners drink a certain beverage, smoke a certain brand of cigar and keep a certain pet.
F4. No owner has the same pet, smoke the same brand of cigar or drink the same drink.

Hints:
H1. The British lives in a red house.
H2. The Swede keeps dogs as pet.
H3. The Dane drinks tea.
H4. The green house is on the left of the white house (it also means that they are next door to each other).
H5. The green house owner drinks coffee.
H6. The person who smokes Pall Mall rears birds.
H7. The owner of the yellow house smokes Dunhill.
H8. The man living in the house right in the center drinks milk.
H9. The Norwegian lives in the first house.
H10. The man who smokes Blend lives next to the one who keeps cats.
H11. The man who keeps horses lives next to the man who smokes Dunhill.
H12. The owner who smokes Blue Master drinks beer.
H13. The German smokes Prince.
H14. The Norwegian lives next to the blue house.
H15. The man who smokes Blend has a neighbour who drinks water.

The question is: Who keeps the fish?

Try Try try. If you already know the answer, let others try. Otherwise, give you best shot at the answer!!
Again, hope to see more people participate.

I am less likely to reply within 24 hours since I am taking a flight later today.

-Hui Lin ^_^

huilinchin
06-03-2004, 11:18 PM
Hope more and more ReComers, other than anchors, will try. :D
The more you try, the more confidence you will have and the more you will be convinced that all problems can be broken down into smaller pieces. Correct answer is not as important as the thinking process. It's not easy to search for good questions and hope that everyone will treasure the opportunity to try. :idea:

Here's a question that I bumped into:

Question 19:
This puzzle was apparently written by Einstein in the last century. He said that 98% of the people cannot solve the quiz.

Facts:
F1. There are 5 houses in 5 different colors.
F2. In each house, lives a person with different nationality.
F3. These 5 owners drink a certain beverage, smoke a certain brand of cigar and keep a certain pet.
F4. No owner has the same pet, smoke the same brand of cigar or drink the same drink.

Hints:
H1. The British lives in a red house.
H2. The Swede keeps dogs as pet.
H3. The Dane drinks tea.
H4. The green house is on the left of the white house (it also means that they are next door to each other).
H5. The green house owner drinks coffee.
H6. The person who smokes Pall Mall rears birds.
H7. The owner of the yellow house smokes Dunhill.
H8. The man living in the house right in the center drinks milk.
H9. The Norwegian lives in the first house.
H10. The man who smokes Blend lives next to the one who keeps cats.
H11. The man who keeps horses lives next to the man who smokes Dunhill.
H12. The owner who smokes Blue Master drinks beer.
H13. The German smokes Prince.
H14. The Norwegian lives next to the blue house.
H15. The man who smokes Blend has a neighbour who drinks water.

The question is: Who keeps the fish?

Try Try try. If you already know the answer, let others try. Otherwise, give you best shot at the answer!!
Again, hope to see more people participate.

I am less likely to reply within 24 hours since I am taking a flight later today.

-Hui Lin ^_^

topdog
07-03-2004, 12:10 AM
The German keeps fish?

topdog
07-03-2004, 12:10 AM
The German keeps fish?

huilinchin
07-03-2004, 12:20 AM
Well done, topdog!
However, can you explain how you arrive at the answer?
Also, what are the other facts related to the German guy:
1) Which house is he living?
2) Color of his house?
3) Types of beverage that he drinks?
4) Smokes what brand?

There should be an organized way to approach this problem.
Again, well done and hope to hear your explanation :D

-Hui Lin ^_^

huilinchin
07-03-2004, 12:20 AM
Well done, topdog!
However, can you explain how you arrive at the answer?
Also, what are the other facts related to the German guy:
1) Which house is he living?
2) Color of his house?
3) Types of beverage that he drinks?
4) Smokes what brand?

There should be an organized way to approach this problem.
Again, well done and hope to hear your explanation :D

-Hui Lin ^_^

topdog
07-03-2004, 12:22 AM
heh...if i can solve it i seriously doubt it was something thought up by einstein. :) i just made a table and filled in the rows and columns...

anyways...German + Green House + Coffee + Prince + Fish

topdog
07-03-2004, 12:22 AM
heh...if i can solve it i seriously doubt it was something thought up by einstein. :) i just made a table and filled in the rows and columns...

anyways...German + Green House + Coffee + Prince + Fish

huilinchin
07-03-2004, 12:25 AM
It was meant to frighten candidate during interview. :P

One comment: For me, questions with more bits of information can be solved more easily than questions with fewer information. So, never panic when you are asked such a long question during interviews. Just relax :D

Anyway, good job, topdog!

-Hui Lin ^_^

huilinchin
07-03-2004, 12:25 AM
It was meant to frighten candidate during interview. :P

One comment: For me, questions with more bits of information can be solved more easily than questions with fewer information. So, never panic when you are asked such a long question during interviews. Just relax :D

Anyway, good job, topdog!

-Hui Lin ^_^

huilinchin
07-03-2004, 12:31 AM
Answer for Question 19 quoted from topdog:
The German keeps fish.
Explanation:
i just made a table and filled in the rows and columns...
anyways...German + Green House + Coffee + Prince + Fish

hmm...so far each question that I have selected is meant to address different interview scenarios, like this case, don't panic when faced with a problem that was claimed to be Einstein's.

let me think of more and post the next question shortly.

-Hui Lin ^_^

huilinchin
07-03-2004, 12:31 AM
Answer for Question 19 quoted from topdog:
The German keeps fish.
Explanation:
i just made a table and filled in the rows and columns...
anyways...German + Green House + Coffee + Prince + Fish

hmm...so far each question that I have selected is meant to address different interview scenarios, like this case, don't panic when faced with a problem that was claimed to be Einstein's.

let me think of more and post the next question shortly.

-Hui Lin ^_^

huilinchin
07-03-2004, 12:43 AM
Question 20:
There are 3 wise men in the room: A, B and C.
You decide to give them a challenge. Suspecting that the thing they care about most is money, you give them 100 bucks and tell them that they are supposed to divide this money observing the following rule: they are to discuss offers and counter-offers from each other and then take a vote . The majority vote wins.
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?

Please explain your answer clearly. :D
It sounds like a Nash Equilibrium question from an AI class where it involved the concept of Tragedy of the Commons - where everyone have the same wish and they are all selfish, but in the end, they gain lower than expected. Hint is how to avoid Tragedy of the Commons such that there exists an equilibrium.

Another hint: Similar with the method used for previous questions - RECURSION.

By the way, so far, 90% of the questions are real interview questions from top companies in different fields. If you try, you may be in luck to get similar questions or at least the concepts to solve different question.

Happy trying! :D

-Hui Lin ^_^

huilinchin
07-03-2004, 12:43 AM
Question 20:
There are 3 wise men in the room: A, B and C.
You decide to give them a challenge. Suspecting that the thing they care about most is money, you give them 100 bucks and tell them that they are supposed to divide this money observing the following rule: they are to discuss offers and counter-offers from each other and then take a vote . The majority vote wins.
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?

Please explain your answer clearly. :D
It sounds like a Nash Equilibrium question from an AI class where it involved the concept of Tragedy of the Commons - where everyone have the same wish and they are all selfish, but in the end, they gain lower than expected. Hint is how to avoid Tragedy of the Commons such that there exists an equilibrium.

Another hint: Similar with the method used for previous questions - RECURSION.

By the way, so far, 90% of the questions are real interview questions from top companies in different fields. If you try, you may be in luck to get similar questions or at least the concepts to solve different question.

Happy trying! :D

-Hui Lin ^_^

littlebigone
07-03-2004, 03:25 AM
can u clarify how they discuss and make offers?

littlebigone
07-03-2004, 03:25 AM
can u clarify how they discuss and make offers?

luke
07-03-2004, 10:28 AM
and unlike the previous 'recursion' questions, there's no killing in this question right?

luke
07-03-2004, 10:28 AM
and unlike the previous 'recursion' questions, there's no killing in this question right?

huilinchin
10-03-2004, 12:09 PM
Sorry for the late reply, littlebigone and luke. I just got a chance to go online. There is no killing in this question and I think it's pretty similar to the pirates and gold problem in a way that 2 people can try to leave one out because the majority vote wins, but remember that this puzzle has different conditions, thus they have different answers.

More hint is to think of what one person would do when they assume what the other would. An example of offer would be A offers B to split halfway if they leave C out while an example of counter-offer is C offers B $70 bucks if they were to leave A out. After making offers, all of them will take a vote.

Hope this makes it clearer. Remember, the majority vote wins and we have only 3 people involved.

-Hui Lin ^_^

huilinchin
10-03-2004, 12:09 PM
Sorry for the late reply, littlebigone and luke. I just got a chance to go online. There is no killing in this question and I think it's pretty similar to the pirates and gold problem in a way that 2 people can try to leave one out because the majority vote wins, but remember that this puzzle has different conditions, thus they have different answers.

More hint is to think of what one person would do when they assume what the other would. An example of offer would be A offers B to split halfway if they leave C out while an example of counter-offer is C offers B $70 bucks if they were to leave A out. After making offers, all of them will take a vote.

Hope this makes it clearer. Remember, the majority vote wins and we have only 3 people involved.

-Hui Lin ^_^

wwhong
10-03-2004, 12:53 PM
is it something like the game theory ?

wwhong
10-03-2004, 12:53 PM
is it something like the game theory ?

littlebigone
10-03-2004, 03:43 PM
i think this is a really weird question. I think the solution is going to be divide evenly between the 3 people.

For any offer that you can make to someone, I can better that offer to the person who gets the lesser deal and get the person to gang up with me. So if we go on like this, there will never be a solution. I think a solution can only be achieved if we all get equal shares.

Anybody else got any suggestions?

Thinking about this for too long...need to do work now

littlebigone
10-03-2004, 03:43 PM
i think this is a really weird question. I think the solution is going to be divide evenly between the 3 people.

For any offer that you can make to someone, I can better that offer to the person who gets the lesser deal and get the person to gang up with me. So if we go on like this, there will never be a solution. I think a solution can only be achieved if we all get equal shares.

Anybody else got any suggestions?

Thinking about this for too long...need to do work now

DecentMerson
11-03-2004, 08:47 PM
as only 3 ppl are involved....then as long as u can get another vote to side u, then u will be safe....

so.... i think the best way is too wait for others to make an offer and u offer a better counter offer...

or , try to be the middle man, let the other two to make offer...
in order to win ur vote, the offers will definitely benefits u more...

hehehe... not really sure, but, i think the better solution is to offer the last...always have the last word in the argument... :twisted:

DecentMerson
11-03-2004, 08:47 PM
as only 3 ppl are involved....then as long as u can get another vote to side u, then u will be safe....

so.... i think the best way is too wait for others to make an offer and u offer a better counter offer...

or , try to be the middle man, let the other two to make offer...
in order to win ur vote, the offers will definitely benefits u more...

hehehe... not really sure, but, i think the better solution is to offer the last...always have the last word in the argument... :twisted:

littlebigone
12-03-2004, 01:46 AM
offer last?
there's no limit to the number of offers and counter offers that you can make rite?

say you decide to be smart and be the middle man and wait for offers. So the first offer from A is like 50 50. Then B says I'll give you 70 30. Then A comes and says I'll give you 90 10. Then B says what the hell and goes to A and says 50 50. So you're now forced to come into play by making an offer or you don't get anything. So you make and offer to A and say 60 40. And then B makes his offer. and the offers never end because for whatever offer you can make to another person, I could come up with a better offer to the person who gets the lesser deal.

The only stable agreement is if everyone just accepts the equal share.

Can we get more hints from the person who posted this question?

littlebigone
12-03-2004, 01:46 AM
offer last?
there's no limit to the number of offers and counter offers that you can make rite?

say you decide to be smart and be the middle man and wait for offers. So the first offer from A is like 50 50. Then B says I'll give you 70 30. Then A comes and says I'll give you 90 10. Then B says what the hell and goes to A and says 50 50. So you're now forced to come into play by making an offer or you don't get anything. So you make and offer to A and say 60 40. And then B makes his offer. and the offers never end because for whatever offer you can make to another person, I could come up with a better offer to the person who gets the lesser deal.

The only stable agreement is if everyone just accepts the equal share.

Can we get more hints from the person who posted this question?

__earth
12-03-2004, 01:56 AM
somehow, i think everybody will get less than 1/3. This problem sounds similar to public good problem in microeconomics. There exists a nash equilib but its an inefficient outcome.

but forgeting microecon of which i dont remember right now, i think an equilib will be reached if A offers an acceptable offer to B, B to C and C to A.

The winner will be the one that cheats. Of course, everybody has the incentive to cheat. If everybody cheats, an inefficient outcome prevail. If one cheats and the others played it fair, the cheater wins.

__earth
12-03-2004, 01:56 AM
somehow, i think everybody will get less than 1/3. This problem sounds similar to public good problem in microeconomics. There exists a nash equilib but its an inefficient outcome.

but forgeting microecon of which i dont remember right now, i think an equilib will be reached if A offers an acceptable offer to B, B to C and C to A.

The winner will be the one that cheats. Of course, everybody has the incentive to cheat. If everybody cheats, an inefficient outcome prevail. If one cheats and the others played it fair, the cheater wins.

littlebigone
12-03-2004, 01:59 AM
if they get less that 1/3 does this mean they waste the resource? What happens to the leftover money?

littlebigone
12-03-2004, 01:59 AM
if they get less that 1/3 does this mean they waste the resource? What happens to the leftover money?

__earth
12-03-2004, 02:02 AM
leftover is leftover. That's why it is called an inefficient outcome.

anyway, forget about less than 1/3 outcome. I totally can't remember how the argument goes.

sorry about the edit above. I was adding some more stuff before i saw your post.



to come to think of it, an equilib is where nobody wins.

consider this.

A offers 50/50 to B
B offers 50/50 to C
C offers 50/50 to A

at the same time

A offers to C,
C to B
B to A

of course ppl will counter offer but they will reach a point where counteroffering is impossible (ie 0/100) . but who with a sane mind gonna offer 0/100?
therefore, the number of counteroffering has a limit. that's one problem solved.

Assuming nobody cheats, and everybody accepts the offer, each will get all votes.

A will get B and C's vote
B will get C and A's
C will get A and B's

but that's impossible since everybody has only one vote. So somebody has to cheat by breaking his/her promise.

Since this is a one time game, someone will cheat. but everybody knows someone will cheat. therefore, everybody will cheat and everybody will get one vote - each will vote for themselves. collusion is almost impossible. Only a naive person would stick to his/her promise.

Therefore, there's one equilib. In equilib, there is no winner.

quoting myself :D

If one cheats and the others played it fair, the cheater wins.

but that's not an equilibrium.

__earth
12-03-2004, 02:02 AM
leftover is leftover. That's why it is called an inefficient outcome.

anyway, forget about less than 1/3 outcome. I totally can't remember how the argument goes.

sorry about the edit above. I was adding some more stuff before i saw your post.



to come to think of it, an equilib is where nobody wins.

consider this.

A offers 50/50 to B
B offers 50/50 to C
C offers 50/50 to A

at the same time

A offers to C,
C to B
B to A

of course ppl will counter offer but they will reach a point where counteroffering is impossible (ie 0/100) . but who with a sane mind gonna offer 0/100?
therefore, the number of counteroffering has a limit. that's one problem solved.

Assuming nobody cheats, and everybody accepts the offer, each will get all votes.

A will get B and C's vote
B will get C and A's
C will get A and B's

but that's impossible since everybody has only one vote. So somebody has to cheat by breaking his/her promise.

Since this is a one time game, someone will cheat. but everybody knows someone will cheat. therefore, everybody will cheat and everybody will get one vote - each will vote for themselves. collusion is almost impossible. Only a naive person would stick to his/her promise.

Therefore, there's one equilib. In equilib, there is no winner.

quoting myself :D

If one cheats and the others played it fair, the cheater wins.

but that's not an equilibrium.

littlebigone
12-03-2004, 04:12 AM
I don't get that part about there being a limit to the counteroffering. Are they making their offers out loud or are they only conferring between the two people involved in the offer?

Anyway, I'm assuming that they do it out loud, so everyone knows what the offers are and that way can make counteroffers that are better. That is why I keep saying that there is always a better offer.

for example.

A offers 50/50 to B
C knows of this 50/50 offer and to attract B makes a 40/60 offer to B
A too knows about this offer and thus makes B a better offer (30/70)
So they go on ping poinging in this fashion till say A makes the last possible offer to B (0.01/99.99)
At which A is quite happy to get some benefit out of the deal and B is very happy.
But C is definitely screwed in this plan. So he makes an offer to A that is better than the .01 that he currently gets. Say 0.02/99.98.
Then B says screw that, I'll offer A 0.03/99.97.

This process can go on foever and ever. That is why I say that the only stable equlibrium is if they all agree to take 1/3 of the 100.

---------------------------------------------------------------------------------
Say we take your view of things and say that they finally make some vote that results in all of them getting nothing because they cheat. I think this contradicts the notion of their "wise"ness. I think that they should have taken this factor into account and would have acted to avoid it. That is, the offers they make should be good enough such that the other person is not compelled to cheat.

More hints please!!!!

littlebigone
12-03-2004, 04:12 AM
I don't get that part about there being a limit to the counteroffering. Are they making their offers out loud or are they only conferring between the two people involved in the offer?

Anyway, I'm assuming that they do it out loud, so everyone knows what the offers are and that way can make counteroffers that are better. That is why I keep saying that there is always a better offer.

for example.

A offers 50/50 to B
C knows of this 50/50 offer and to attract B makes a 40/60 offer to B
A too knows about this offer and thus makes B a better offer (30/70)
So they go on ping poinging in this fashion till say A makes the last possible offer to B (0.01/99.99)
At which A is quite happy to get some benefit out of the deal and B is very happy.
But C is definitely screwed in this plan. So he makes an offer to A that is better than the .01 that he currently gets. Say 0.02/99.98.
Then B says screw that, I'll offer A 0.03/99.97.

This process can go on foever and ever. That is why I say that the only stable equlibrium is if they all agree to take 1/3 of the 100.

---------------------------------------------------------------------------------
Say we take your view of things and say that they finally make some vote that results in all of them getting nothing because they cheat. I think this contradicts the notion of their "wise"ness. I think that they should have taken this factor into account and would have acted to avoid it. That is, the offers they make should be good enough such that the other person is not compelled to cheat.

More hints please!!!!

huilinchin
12-03-2004, 09:51 AM
Just arrived in Pittsburgh...Sorry, maybe I made it sounded too complicated. Initially, I just want to know how people would explain the simple answer to this problem and how they think about this problem...but yeap, littlebigone's answer is correct and so is his explanation! :D

Well done, littlebigone and everyone else who tried (wwhong, DecentMerson, and _earth).

Answer for Question 20 quoted from littlebigone:
A offers 50/50 to B
C knows of this 50/50 offer and to attract B makes a 40/60 offer to B
A too knows about this offer and thus makes B a better offer (30/70)
So they go on ping poinging in this fashion till say A makes the last possible offer to B (0.01/99.99)
At which A is quite happy to get some benefit out of the deal and B is very happy.
But C is definitely screwed in this plan. So he makes an offer to A that is better than the .01 that he currently gets. Say 0.02/99.98.
Then B says screw that, I'll offer A 0.03/99.97.

This process can go on foever and ever. That is why I say that the only stable equlibrium is if they all agree to take 1/3 of the 100.

I believe the intuitive idea is each person gets 1/3 but the thinking and explanation is more important. Good job again, littlebigone!

-Hui Lin ^_^

p/s: All questions that I do not quote the name of contributor are from me. So, please feel free to shout your doubts and questions at me :D

huilinchin
12-03-2004, 09:51 AM
Just arrived in Pittsburgh...Sorry, maybe I made it sounded too complicated. Initially, I just want to know how people would explain the simple answer to this problem and how they think about this problem...but yeap, littlebigone's answer is correct and so is his explanation! :D

Well done, littlebigone and everyone else who tried (wwhong, DecentMerson, and _earth).

Answer for Question 20 quoted from littlebigone:
A offers 50/50 to B
C knows of this 50/50 offer and to attract B makes a 40/60 offer to B
A too knows about this offer and thus makes B a better offer (30/70)
So they go on ping poinging in this fashion till say A makes the last possible offer to B (0.01/99.99)
At which A is quite happy to get some benefit out of the deal and B is very happy.
But C is definitely screwed in this plan. So he makes an offer to A that is better than the .01 that he currently gets. Say 0.02/99.98.
Then B says screw that, I'll offer A 0.03/99.97.

This process can go on foever and ever. That is why I say that the only stable equlibrium is if they all agree to take 1/3 of the 100.

I believe the intuitive idea is each person gets 1/3 but the thinking and explanation is more important. Good job again, littlebigone!

-Hui Lin ^_^

p/s: All questions that I do not quote the name of contributor are from me. So, please feel free to shout your doubts and questions at me :D

huilinchin
12-03-2004, 10:12 AM
Ok, this will be my last question since my break is ending in 2 days.

Question 21:
There are 26 constants, from A to Z.
We assign a value to each constant the following way:
Base case: A = 1
Then,
B = 2^(A's value) = 2^1 = 2
C = 3^(B's value) = 3^2 = 9
D = 4^(C's value) = 4^9
E = 5^(D's value)
...
...
Z = 26^(Y's value)

Note: * means multiply
What is the answer for this expression?
(W-A) * (W-B) * (W-C) * ... * (W-Y) * (W-Z)

Have fun trying! Please do not spend too much time on this question. It's meant to increase your self-esteem, though it's just a little tricky :D

-Hui Lin ^_^

huilinchin
12-03-2004, 10:12 AM
Ok, this will be my last question since my break is ending in 2 days.

Question 21:
There are 26 constants, from A to Z.
We assign a value to each constant the following way:
Base case: A = 1
Then,
B = 2^(A's value) = 2^1 = 2
C = 3^(B's value) = 3^2 = 9
D = 4^(C's value) = 4^9
E = 5^(D's value)
...
...
Z = 26^(Y's value)

Note: * means multiply
What is the answer for this expression?
(W-A) * (W-B) * (W-C) * ... * (W-Y) * (W-Z)

Have fun trying! Please do not spend too much time on this question. It's meant to increase your self-esteem, though it's just a little tricky :D

-Hui Lin ^_^

topdog
12-03-2004, 10:19 AM
heheh...it's zero right? (W-W)*blablabla = 0.

topdog
12-03-2004, 10:19 AM
heheh...it's zero right? (W-W)*blablabla = 0.

DecentMerson
12-03-2004, 11:16 AM
yup.... i second that.......hehehe

the question is trying to poke u with the complicated intro....

but the last part of the question is asked too many times...

.....*(w-w)(w-x)(w-y)(w-z)= ......*0 = 0

hehe

DecentMerson
12-03-2004, 11:16 AM
yup.... i second that.......hehehe

the question is trying to poke u with the complicated intro....

but the last part of the question is asked too many times...

.....*(w-w)(w-x)(w-y)(w-z)= ......*0 = 0

hehe

__earth
12-03-2004, 12:37 PM
There are 3 wise men in the room: A, B and C.
You decide to give them a challenge. Suspecting that the thing they care about most is money, you give them 100 bucks and tell them that they are supposed to divide this money observing the following rule: they are to discuss offers and counter-offers from each other and then take a vote . The majority vote wins.
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?

I'm concerned with the previous question. what happened to the votes?

__earth
12-03-2004, 12:37 PM
There are 3 wise men in the room: A, B and C.
You decide to give them a challenge. Suspecting that the thing they care about most is money, you give them 100 bucks and tell them that they are supposed to divide this money observing the following rule: they are to discuss offers and counter-offers from each other and then take a vote . The majority vote wins.
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?

I'm concerned with the previous question. what happened to the votes?

luke
12-03-2004, 01:48 PM
we already have the answer .. do scroll up plz ..

luke
12-03-2004, 01:48 PM
we already have the answer .. do scroll up plz ..

__earth
12-03-2004, 01:51 PM
there was a distribution of resources but the votes were never mentioned in the answer.

__earth
12-03-2004, 01:51 PM
there was a distribution of resources but the votes were never mentioned in the answer.

luke
12-03-2004, 02:01 PM
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?
Read the question again ... Does it require the answer to explain about the votes? :)

luke
12-03-2004, 02:01 PM
Now, the question is: Assuming each person is motivated to take the largest amount possible, what will the outcome be?
Read the question again ... Does it require the answer to explain about the votes? :)

budakkerek
13-03-2004, 03:02 AM
*Gasp*
Maths questions! 8O
Not my turf...8)
*budakkerek backs out of room, and run far far away*
:wink: :lol: :wink: :lol:

budakkerek
13-03-2004, 03:02 AM
*Gasp*
Maths questions! 8O
Not my turf...8)
*budakkerek backs out of room, and run far far away*
:wink: :lol: :wink: :lol:

huilinchin
14-03-2004, 02:17 AM
Good job topdog and DecentMerson for getting the answer so fast...you guys have good concepts... :D

Answer for Question 21 quoted from topdog:
(W-W)*blablabla = 0

_earth, thanks for the question. Luke is correct, we just need the outcomes, that is, each person gets one-third of the total money. But you brought up a good question, which analyzes how the votes are distributed before we can come to an answer. Remember littlebigone's explanation on how the offer and counter-offer can go on and on until everyone agrees to share everything equally to achieve an equilibrium.

Have a good Spring break and do take care :D

Cheers,
Hui Lin ^_^

huilinchin
14-03-2004, 02:17 AM
Good job topdog and DecentMerson for getting the answer so fast...you guys have good concepts... :D

Answer for Question 21 quoted from topdog:
(W-W)*blablabla = 0

_earth, thanks for the question. Luke is correct, we just need the outcomes, that is, each person gets one-third of the total money. But you brought up a good question, which analyzes how the votes are distributed before we can come to an answer. Remember littlebigone's explanation on how the offer and counter-offer can go on and on until everyone agrees to share everything equally to achieve an equilibrium.

Have a good Spring break and do take care :D

Cheers,
Hui Lin ^_^

bingzhang
28-06-2004, 04:18 AM
Hi everyone,

I got these questions during my interview for position of casual web programmer to drive sales to the website as well as develop some marketing strategies for them.

Just wanna see how you guys go with the answers below.

1)Give me a specific example of how you have driven a site to number one or two position on Google

2) Please tell me how you would develop an affiliate programme.


p/s: This is my first post, nice to meet all of you~~

Cheers
bingzhang

masterof_none
28-06-2004, 11:49 AM
Thanks Bingzhang for contributing the questions to us.

let me try this:



1)Give me a specific example of how you have driven a site to number one or two position on Google

provides more links to the site, since search engine like google using the 'bot' that would search from link to link.


2) Please tell me how you would develop an affiliate programme.


I would say that we should provide
1. content. what kind of content do we want our affiliate to have.
2. system : how we display it. (php? javascript? xml ?etc)
3. terms and agreement.
4. sending affiliates emails about updates, maybe, around monthly.

anyway, these are all experience drawn when I set recomNN, when I join the NSTP affiliate program.

check out recomNN: http://recom.homelinux.org:8000/~recom/modules.php?name=recomNN.
I guess that's what they mean by affiliate program.

Randomphantom
28-06-2004, 08:53 PM
question 1 - google bomb

digimushu
29-06-2004, 01:40 AM
Interview questions huh?

try this scenario on for size...

You go to an interview with an American company. First an american guy asks u some technical questions as well as manages rough intro. After that, he leaves and a Chinese lady comes in with a list of english technical terms and ask u to translate it to Chinese.

Since my engineering education is in English...i think u know how much my score is on that impromptu test. Btw..i did not get the job
:)

lol

Moral of the story: Learn all your technical terms in Chinese/Malay/korean, etc

janewai
29-06-2004, 01:46 AM
Interview questions huh?

try this scenario on for size...

You go to an interview with an American company. First an american guy asks u some technical questions as well as manages rough intro. After that, he leaves and a Chinese lady comes in with a list of english technical terms and ask u to translate it to Chinese.

Since my engineering education is in English...i think u know how much my score is on that impromptu test. Btw..i did not get the job
:)

lol

Moral of the story: Learn all your technical terms in Chinese/Malay/korean, etc

*shrug*
Language issues again!! :roll:

Randomphantom
20-07-2004, 08:36 AM
It does depend on the company in question, that said I think English is sufficient for most companies, while extra languages are a bonus. Maybe the job itself warrants translating technical terms to chinese.
Wait till u try translating chemistry terms to chinese... ouch!

mrngorickets
06-05-2011, 04:05 PM
Hi,

Thanks very much for this comment. It help me to think about my ideals.

Tks again and pls keep posting.

If you want to get more materials that related to this topic, you can visit: Hotel interview questions and answers (http://interviewquestionsandanswers.biz/hotel-interview-questions-and-answers/)

Best regards.