- Joined
- 4/14/12
- Messages
- 90
- Points
- 18
I worked on a few interview questions, but not sure if my following answers are correct. Hope someone can help me with them Here they are:
1. If all trains in Grand Central have fewer cars than there are trains in the station, then:
A. All trains must have an odd number of cars.
B. At least two trains must have the same number of cars.
C. Both A and B
D. Neither A nor B
My answer: B.
The solution is following:
Let the number of train in the station be n, and number of cars in train 1,2,...,n is \(x_1, x_2,...,x_n \)(x_i are non-negative integers), respectively. From the given condition, we have: \(x_1+x_2+....+x_n<n\).
Now if all \( x_i>=1\), then \(x_1+x_2+...+x_n>=n\) (contradiction!). So at least one of \(x_i\) must be \(0\). W.L.O.G, assume \(x_1=0\). Thus we have: \(x_2+....+x_n<n\). Consider the case when \(x_2+...+x_{n-1}=n-1\). If none of \(x_j\)(j from \(2\) to n-1)\(=0\), then one of x_j must be equal 2. Assume \(x_3=2\). Then \(x_2+x_4+...+x_{n-1}=n-3\). So either \((x_2,x_4,...,x_{n-1})=(1,1,...,1)\) or one of these remaining numbers is equal to \(0\)(\(=x_1\)). Therefore, in both cases, we all have at least two trains that must have the same number of cars.
2. Let's roll the die. If the outcome is 1, 2, or 3, we stop; otherwise, if it is 4, 5, or 6, a corresponding number of dice are rolled. For example, if the first roll gives 5, then we roll 5 dice, and so on. This procedure continues for every rolled dice whose outcome is 4, 5, or 6. Let N denote the N-th round of rolls. What is the total expected value at the end of the N-th
round of rolls
A. \((11/3)*((5/2)^N+1)\)
B.\((7/3)*((8/2)^N+1)\)
C.\((7/3)*((3/2)^N-1)\)
D.\((8/3)*((6/4)^N-1)\)
E.\((7/3)*((5/2)^N-1)\)
My answer: E. However, I solved this by plugging in N=1 into the given formulas and compare the result to the the total expected value at the end of the 1st-round, which I compute by hand. I couldn't solve for the general case though. I'm thinking of building recursion formula for the case of rolling 4,5 or 6, but still unsuccessful
3. You need to guess a number that will be drawn from a continuous distribution between \(0\) and \(20\). If you overestimate you will be charged 3 dollars. If you underestimate, you will be charged 1 dollar. If you guess correctly, then you will not be charged at all. What is the best number to guess?
A.\(0\)
B. \(5\)
C.\(10\)
D.\(15\)
E.\(20\)
My answer: A
My solution: We need to find the smallest expected value of the money charged from each of the 5 given numbers. We have: E(money charged if \(0\))\(=1*(-1)=-1\), \(E(5)=1/4*(-1)+3/4*(-3)=-5/2\), \(E(10)=1/2*(-1)+1/2*(-3)=-2\), \(E(15)=15/20*(-1)+5/20*(-3)=-3/2\), \(E(20)=1*(-3)=-3\). Thus \(0\) is the best number to guess since it gives us the smallest expected value of the money charged.
1. If all trains in Grand Central have fewer cars than there are trains in the station, then:
A. All trains must have an odd number of cars.
B. At least two trains must have the same number of cars.
C. Both A and B
D. Neither A nor B
My answer: B.
The solution is following:
Let the number of train in the station be n, and number of cars in train 1,2,...,n is \(x_1, x_2,...,x_n \)(x_i are non-negative integers), respectively. From the given condition, we have: \(x_1+x_2+....+x_n<n\).
Now if all \( x_i>=1\), then \(x_1+x_2+...+x_n>=n\) (contradiction!). So at least one of \(x_i\) must be \(0\). W.L.O.G, assume \(x_1=0\). Thus we have: \(x_2+....+x_n<n\). Consider the case when \(x_2+...+x_{n-1}=n-1\). If none of \(x_j\)(j from \(2\) to n-1)\(=0\), then one of x_j must be equal 2. Assume \(x_3=2\). Then \(x_2+x_4+...+x_{n-1}=n-3\). So either \((x_2,x_4,...,x_{n-1})=(1,1,...,1)\) or one of these remaining numbers is equal to \(0\)(\(=x_1\)). Therefore, in both cases, we all have at least two trains that must have the same number of cars.
2. Let's roll the die. If the outcome is 1, 2, or 3, we stop; otherwise, if it is 4, 5, or 6, a corresponding number of dice are rolled. For example, if the first roll gives 5, then we roll 5 dice, and so on. This procedure continues for every rolled dice whose outcome is 4, 5, or 6. Let N denote the N-th round of rolls. What is the total expected value at the end of the N-th
round of rolls
A. \((11/3)*((5/2)^N+1)\)
B.\((7/3)*((8/2)^N+1)\)
C.\((7/3)*((3/2)^N-1)\)
D.\((8/3)*((6/4)^N-1)\)
E.\((7/3)*((5/2)^N-1)\)
My answer: E. However, I solved this by plugging in N=1 into the given formulas and compare the result to the the total expected value at the end of the 1st-round, which I compute by hand. I couldn't solve for the general case though. I'm thinking of building recursion formula for the case of rolling 4,5 or 6, but still unsuccessful
3. You need to guess a number that will be drawn from a continuous distribution between \(0\) and \(20\). If you overestimate you will be charged 3 dollars. If you underestimate, you will be charged 1 dollar. If you guess correctly, then you will not be charged at all. What is the best number to guess?
A.\(0\)
B. \(5\)
C.\(10\)
D.\(15\)
E.\(20\)
My answer: A
My solution: We need to find the smallest expected value of the money charged from each of the 5 given numbers. We have: E(money charged if \(0\))\(=1*(-1)=-1\), \(E(5)=1/4*(-1)+3/4*(-3)=-5/2\), \(E(10)=1/2*(-1)+1/2*(-3)=-2\), \(E(15)=15/20*(-1)+5/20*(-3)=-3/2\), \(E(20)=1*(-3)=-3\). Thus \(0\) is the best number to guess since it gives us the smallest expected value of the money charged.