My understanding and formalization are as follows:

Assume you are in state

`[x, y, z]`

. Here are the possible transitions:Fill 12 -> [12, y, z] Fill 8 -> [x, 8, z] Fill 3 -> [x, y, 3] Empty 12 -> [0, y, z] Empty 8 -> [x, 0, z] Empty 3 -> [x, y, 0] 12 to 8 -> [x + y - 8, 8, z] or [0, x + y, z], depending on x + y >< 8 8 to 12 -> [12, x + y - 12, z] or [x + y, 0, z], depending on x + y >< 12 12 to 3 -> [x + z - 3, y, 3] or [0, y, x + z], depending on x + z >< 3 3 to 12 -> [12, y, x + z - 12] or [x + z, y, 0], depending on x + z >< 12 8 to 3 -> [x, y + z - 3, 3] or [x, 0, y + z], depending on y + z >< 3 3 to 8 -> [x, 8, y + z - 8] or [x, y + z, 0], depending on y + z >< 8

There are potentially 13 x 9 x 4 different states (maybe not all achievable). You should consider a state graph rather than a state tree, given that there can be loops.

You can build the complete graph, starting from state [0, 0, 0] and trying all 12 transitions recursively, depth first or breadth first.

Specifically, a bit more about the successor function:

"1) add e i" is pretty vague (I don't think you mean that "e" is the base of the natural log, or "i" is sqrt(-1))

"2)pour to another one: ..." still unclear

ALSO, is your actual question about solving the problem or drawing the state tree?