Saturday, August 15, 2009

Problem: Measure 10 liter with containers of capacity 19, 13 & 7

Today I was challenged to a liquid-measuring problem by my brother. Given two containers full of water, with capacity of 13 and 7 liters respectively, and an empty container of capacity 19 liters, how does one measure 10 liters of water (without spilling any amount)?

After spending 10-15 minutes, I finally reached a solution. It's possible that this solution has some amount of redundancy, and thus isn't canonical.

The schema followed in this solution is this: X-Y, where X denotes the amount inside the container, the Y denotes the remaining capacity.
  1. 0-19, 13-0, 7-0 Starting configuration
  2. 13-6, 0-13, 7-0
  3. 13-6, 7-6, 0-7
  4. 6-13, 7-6, 7-0
  5. 6-13, 13-0, 1-6
  6. 19-0, 0-13, 1-6
  7. 19-0, 1-12, 0-7
  8. 12-7, 1-12, 7-0
  9. 12-7, 8-5, 0-7
  10. 5-14, 8-5, 7-0
  11. 5-14, 13-0, 2-5
  12. 18-1, 0-13, 2-5
  13. 18-1, 2-11, 0-7
  14. 11-8, 2-11, 7-0
  15. 11-8, 9-4, 0-7
  16. 4-15, 9-4, 7-0
  17. 4-15, 13-0, 3-4
  18. 17-2, 0-13, 3-4
  19. 17-2, 3-10, 0-7
  20. 10-9, 3-10, 7-0 Solved
Click to read my idea about a fuel-saving car-AC

2 comments:

  1. The idea is to fill A and empty it to C then transfer the same to B and do it recurrsively.

    ReplyDelete