in reply to Re^5: Challenge: N Jugs Problem
in thread Challenge: N Jugs Problem

For comparison:

$ time perl min_supply.pl 1 4 3 Required supply: 3 6 steps: S->X X->Z S->X X->Z S->X X->Z real 0m0.011s user 0m0.016s sys 0m0.000s $ time perl min_steps.pl 1 4 3 3 steps: S->Y Y->Z Z->X real 0m0.011s user 0m0.008s sys 0m0.004s $ time perl -e1 real 0m0.002s user 0m0.000s sys 0m0.000s

Note that I got a different solution that yours for min steps, but it's has the same number of steps.

Update: I seemed to have imagined that you said yours was slow. Ignore this post.