1 jar1:2
2
3 jar2:3
4
5
6 jar1:2 jar2:4
7
8
9 jar2:6
10
11
12 jar1:11 jar2:3
13
14
15 1 jar1:2
2
3 jar2:3
4
5
6 jar1:2 jar2:4
7
8
9 jar2:6
10
11
12 jar1:11 jar2:3
13
14
15Yes, I really did imagine all kinds of cases involving zero time and negative time rules (or having zero time to produce anything) and tried to conform them to the spec, but most of them conflict with the output requirements. Not all, though...
BTW, the original solution yields 27 whites: 5 from the start, and then jar1 is used 2+3+3+3=11 times, yielding 22 more.
I noticed the solution in the article is in a "steady state", that can produce 6 whites every 3 steps, or 2 whites per step. The better solution by tlb produces 26 whites in 8 steps, but I didn't check whether it is sustainable (in the sense that after those 8 steps we have enough material to start over).
It's an interesting problem, and I couldn't even model it after a first glance using a graph or linear programming. Will try again later :)
Start producing 4 more (2 jars) at timestep 1.
Start producing 4 more at timestep 6.
Start producing 22 more at timestep 12.
22 + 4 + 4 + 5 = 35
I wonder how efficient people can make this. I've envisioned all kinds of test cases that crank up the branching factor, require that you find solutions even if you have to trade away white balls for them and other such things.
Just because he made them positive integers doesn't mean that there are no ways to punish solutions that won't scale or those that don't always find optimal solutions.