### Expected length of Last Straw - Breaking the back of a camel

**Source:**Puzzle Tweeter who took it from Mind your decisions

**Problem:**A camel is loaded with straws until it's back breaks. Each straw has a weight uniformly distributed between 0 and 1, independent of other straws. The camel's back breaks as soon as the total weight of all the straws exceeds 1. Find the expected weight of the last straw that breaks the camel's back.

Update (18th June 2014):

Solution posted by me (Pratik Poddar) in comments

Solution posted by me (Pratik Poddar) in comments

[My first (incomplete) solution here so forgive me if there I missed a specific process that is followed for posting a solution]

ReplyDeleteUsing a bit of geometric probability here, but I can do that for 2D and 3D, 4D becoming a bit challenging.

The probability of the camel's back breaking after the first straw (1D Geometric probability) is 0 since it is a uniform distribution between 0 and 1.

Now moving to 2D on the second straw. The back will break depending on what was draw and the first straw and the second straw. If the first straw drawn was very close to 1 then almost any draw of the second straw breaks the back and the reverse is true for the 1st straw being drawn being close to 0. So If we plot draw 1 weight on 1 axis and draw 2 weight on the second axis we have the lower triangle formed between (0,0), (1,0) and (0,1) as the situation where the back will not break the area of the triangle is 1/2 so the probability of the back breaking after 2 draws is 1/2. In this case the likely value of the 2nd straw is corresponding to the 2nd axis centroid of the triangle (corresponding to the area where the back would break and not the triangle I mentioned before) which is 2/3. Therefor for half the probability the most likely value of the second straw drown is 2/3.

Now moving to 3D, for the case where the 3rd straw is drawn. We add axis 3 which is the weight of the third straw drawn. And the probability that the back did not break after the 3rd straw is the volume of a tetrahedron defined by (0,0,0),(1,0,0),(0,1,0 and (0,0,1) which is 1/6 and the probability that the back breaks after 3rd draw is (1-1/6 = 5/6) And the last drawn straw is the centroid of the 3D body that is defined by (a 1x1x1 cube - tetrahedron mentioned).

I see a infinite series here happening here that limits to a number but I am not able to establish the solution because I am not able to move from the geometry realm to the arithmetic and probability realm. Surely I can't imagine this in 4D, I blame by Mechanical Engineering background for this.

Let the combined weight of all the straws except for the last straw be x. (x lies between 0 and 1).

ReplyDeleteX is uniformly distributed between 0 and 1.

The weight of the last straw should be > 1 - x.

So, the weight of the last straw can be w for x lying in the range (1- w , 1), ie. a range of w.

Then the expected weight of the last straw is, (integration (limit of x lies from 0 to 1) of x^2)/(integration (limit of x lying from 0 to 1) of x).

=(1/3)/(1/2)

=2/3.

X need not be (and as it turns out, indeed is not) uniformly distributed.

DeleteIs the answer 2/3?

ReplyDeleteAnswer is: 0.641

ReplyDeleteLet f(x) be the expected weight of the back-breaking straw given that the camel is already carrying weight x. Integrating over the weight y of the next straw, we have: f(x) = integral [y=0 to 1-x] of f(x+y) dy + integral [y=1-x to 1] of y dy. Differentiating this with respect to x, we have: f'(x)=-f(x)+1-x. Solving this differential equation with initial condition f(1)=1/2 gives f(x)=2-x-exp(1-x)/2, so f(0) = 2-e/2.

Can you explain the logic behind your integral?

ReplyDeletee.

ReplyDelete