Morgan Stanley Interview Question
AnalystsN=7
There are 14 songs of 2 minutes so 14 pairs.
The total number of pairs posible is 2-combinations of N. From this number we have to substract the pairs that would form with the adiacent persons. The total number of pairs standing next to each other is N.
So (N/2)*((N-1)/(2-1))-N=14 reduced looks like: N^2-3*N=28 -> N=7.
Something doesn't look right here. I've gone over this several times, and with N = 7 you end up with 15 pairs, and not 14. Say we number from 1 to 7, clockwise (not that it matters):
1-3, 1-4, 1-5, 1-6, 1-7
2-4,2-5,2-6,2-7
3-5,3-6,3-7
4-6,4-7
5-7
In the above a-b represents the pair (a,b). So, we have 5 + 4 + 3 + 2 + 1 = 15, not 14. So what am I missing? The problem states "each possible pair of persons" not adjacent to each other. AFAIK, the above 15 pairs are all the possible pairs, assuming (a,b) is the same as (b,a) of course.
Duh. Sigh. Thanks, mkhs. This "dude" is wrong. Note to other problem solvers: Watch out for skewed diagrams.
If u think critically, the Problem simplifies to number of diagonals of an N sided polygon (cuz that is when u exclude the adjacent vertices or nodes).The answer for which is N*(N-3)/2 and so the asnwer's there!
- VK July 07, 2009