Guest User

The box problem

a guest
Dec 30th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Let's make T the total number of boxes on the table. Large(L), Medium(M) and Small(S):
  2.  
  3. L + M + S = T (the total we need to find).
  4.  
  5. For each size box, large, medium and small, we have two states - empty and full. Make them Le/Lf, Me/Mf and Se/Sf respectively.
  6. We can say right now that there are no full Small boxes, they are all empty:
  7. Sf = 0 --> Se = S.
  8.  
  9. We know that we have 11 large boxes in total:
  10. Le + Lf = 11
  11.  
  12. The total number of Medium boxes is Me + Mf, which can also be expressed as the number of Large boxes that are full, times 8 (since we put 8 medium in each):
  13. M = Me + Mf = 8 * Lf
  14.  
  15. Similarly, the total number of Small boxes can be expressed as the number of full Mediums, times 8:
  16. S = Mf * 8
  17. And we know from the spec that the total number of all empty boxes (Large, Medium and all the Small ones) is 102.
  18.  
  19. Awesome, we now have an equation:
  20. Le + Me + S = 102, let's substitute:
  21. { Le = 11 - Lf, }
  22. { Me = M - Mf = 8 * Lf - Mf,} --> (11 - Lf) + (8 * Lf - Mf) + 8 * Mf = 102
  23. { S = 8 * Mf }
  24.  
  25. Simplify:
  26. 7 * Lf + 7 * Mf = 102 - 11 --> 7 * (Lf + Mf) = 91
  27.  
  28. And voila,
  29. Lf + Mf = 13.
  30.  
  31. In other words, *the sum of all full Large and Medium boxes is 13*
  32. And we know that ALL small boxes are empty, which means
  33. *the Total number of all boxes is the sum of FULL Large and FULL Medium boxes plus all the empty ones*.
  34. We just found the sum of all full ones, and we were given the number of empties. So there we have it folks:
  35.  
  36. T = (Mf + Lf) + 102 = 13 + 102 = 115.
  37.  
  38. The end.
Advertisement
Add Comment
Please, Sign In to add comment