Bear in mind, this is a logical maths puzzle... You're taking all the fun away when you throw in the physics and calculus and such... Have you heard of the term "discrete maths"?

If you want to consider error and such, even the 1st customer's solution doesn't guarantee an accurate answer... When you want to "fill up the container", in fact the liquid level could be 1mm away from the top which gives you a discrepancy of several mls...

Plus, I assumed the floor was "perfectly level and flat", and the containers were "perfectly cylindrical"... In a practical real world these things don't exist (the Earth is an almost-spherical body)...

So I meant to have everything done in a "theoretical world" rather...

I don't like your solution because you're doing round-offs which gives us "theoretically definite inaccuracy" in our no-physics-only-pure-logical-mathematics-imaginary-utopia...

In a practical world it could be what people do, because the margin of errors is acceptable. But as an answer to a brain teaser it's not acceptable because theoretically it couldn't give you a definitely accurate answer...

For example in the last example you gave:

JPF wrote:Ex : 733

1000=625+375

X=625

375=234+141

141=88+53

X=X+88=713

53=33+20

X=X+20=733

When you had 375=234+141, in fact it should be

375=234.375+140.625... So all the subseqent moves are all inaccurate and are no good...

To get a "theoretically accurate" result, we could do this:

- Code: Select all
`3/3 + 0/5`

0/3 + 3/5

3/3 + 3/5

1/3 + 5/5

1/3 + 0/5

0.375/3 + 0.625/5 -> give 0.625 to customer

0/3 + 5/5

3/3 + 2/5

0/3 + 2/5

2/3 + 0/5

2/3 + 5/5

3/3 + 4/5

0/3 + 4/5

1.5/3 + 2.5/5

3/3 + 2.5/5

0.5/3 + 5/5

0.5/3 + 0/5

0/3 + 0.5/5

0.3/3 + 0.5/5

0.3/3 + 0/5

0/3 + 0.3/5

0.18/3 + 0.3/5

0.18/3 + 0/5

0/3 + 0.18/5

0.108/3 + 0.18/5 -> give 0.108 to customer

There's probably a shorter solution...