- Pham Xuan Hieu

- Nov 28
- 2 min read
Updated: 1 day ago

Answer
(x,y) represent the volume in each containers. For example, (5,4) means 5L in container A and 4L in container B.
9 L using 12 L (A) and 15 L (B)
(12,0) — Fill A.
(0,12) — Pour A → B.
(12,12) — Fill A.
(9,15) — Pour A → B until B is full. ( 12+3=15 => 12-3=9 )
Result: A = 9 L
23 L using 6 L (A), 10 L (B), 15 L (C)
6+15=21 => aim to get 2L
(6,0,0) — Fill A.
(0,6,0) — Pour A → B.
(6,6,0) — Fill A.
(2,10,0) — Pour A → B until B is full. ( 6+4=10 => 6-4=2 )
(2,0,0) — Empty B.
(0,2,0) — Pour A → B.
(6,2,0) — Fill A.
(6,2,15) — Fill C.
Result: 6 + 2 + 15 = 23 L
6 L using 8 L (A) and 13 L (B)
(8,0) — Fill A.
(0,8) — Pour A → B.
(8,8) — Fill A.
(3,13) — Pour A → B until B is full. ( 8+5=13 => 8-5=3 )
(3,0) — Empty B.
(0,3) — Pour A → B.
(8,3) — Fill A.
(0,11) — Pour A → B.
(8,11) — Fill A.
(6,13) — Pour A → B until B is full. ( 11+2=13 => 8-2=6 )
Result: A = 6 L
36 mL using 126 mL (A) and 432 mL (B)
(0,432) — Fill B.
(126,306) — Pour B → A.
(0,306) — Empty A.
(126,180) — Pour B → A.
(0,180) — Empty A.
(126,54) — Pour B → A.
(0,54) — Empty A.
(54,0) — Pour B → A.
(54,432) — Fill B.
(126,414) — Pour B → A until A is full.
(0,414) — Empty A.
(126,288) — Pour B → A.
(0,288) — Empty A.
(126,162) — Pour B → A.
(0,162) — Empty A.
(126,36) — Pour B → A.
Result: B = 36 mL
Interesting Math behind it
Soon😅. End-of-term exams and RD are coming 😭. I'll come back right when I can.
Bezout’s identity
Euclidean algorithm
Free talk
I've probably spent more time on this puzzle that I should have. The questions I'm putting in this one isn't particularly hard (the bonus one might be a bit more challenging) but the interesting part is the math going on behind it.
There is a way to determine whether a volume can be measured using a given set of containers. (Keep in mind that we're only using intergers and all volumes are in Liter). Without doing any testing, we can know for sure that a 146L with a 47L jug can measure all volume less than or equal 193L (193=146+47), but 12L with 345L can't measure 56L.
I spent quite a while learning about the number theory behind it , but in the end, I can't really ask harder questions than the one above - if I pushed harder, it would become a math problem and that's against my puzzle philsophy. Nevertheless, the exploration was really really fascinating 🐳



all i can say is sigma