Pages

Sunday, April 1, 2012

Hussman Interview Q3

Please see solutions to Q1Q2.

3) A vehicle is filled with fuel. One gallon of fuel can propel every 10 pounds of vehicle weight a
distance of 2 miles (5 pounds of weight 4 miles, etc). A gallon of fuel weighs 8 pounds.


a) Write a general expression for the distance traveled by the vehicle

b) If f0 is the starting amount of fuel, write an analytic equation for the total distance traveled

c) If the vehicle weighs 100 pounds when empty, and has traveled 1 mile after expending half
of its starting amount of fuel, what is the starting amount of fuel, and how far does it
ultimately take the vehicle (round to 4 decimal places)?


d) Suppose you didn’t discover that an analytic solution to this problem requires calculus (now
there’s a hint!). Write a short program in C++, Basic, Matlab or pseudocode to approximate
the amount of fuel required to move the vehicle (100 pounds when empty) 5 miles.


Weight of Vehicle = V; Weight of Fuel/Gallon = F; Gallons of Fuel = G; Distance Travelled = D; Weight of Vehicle and Fuel = W

I am not sure the difference between part a and b but here is my attempt.

a) D is directly proportional to G and inversely proportional to W
D ~ G/W => D = KG/W, where K is proportionality constant
In this case when D = 2; G = 1; W = 10. Therefore, K = 20.
Thus, when W = 5; D = 20*1/5 = 4

b) W = V + F*G => D = KG/(V+FG)
Total distance travelled is tricky because as soon as you burn a little fuel the weight reduces and the further you can travel.
Therefore, to find distance travelled we first need to know what happens when fuel changes by small amount i.e. differentiate the above equation with respect to G
clip_image002[10]
Now to find total distance travelled we have to integrate when fuel G ranges from f0 to 0
Let us first solve indefinite integral
clip_image002[20]
Now adding limits total distance travelled is
clip_image002[22]
 
c) Weight of Vehicle = V = 100lbs; Weight of Fuel/Gallon = F = 8lbs/g; Gallons of Fuel = G = f0 –> f0/2; Distance Travelled = D = 1 and K = 20
clip_image002[24]
Substituting,
clip_image002[26]
10000+1200f0+32f02 = 250*(-4f0)
32 f02 + 2200f0 + 100 = 0
f0 ~ –63.8562 & –4.8938
The equation has 2 roots and both negative. So, it is clear I have made a mistake. However, my calculus is a little rusty and I will leave the solution so that the internet can explain the mistake Smile
 
d) This will only make sense if I have the correct equation. So, I will not attempt to solve it.

No comments:

Post a Comment