3 added 42 characters in body edited Aug 15 '14 at 10:12 Neil G 10.1k11 gold badge3232 silver badges7373 bronze badges Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0, 0), (0, 1, 0, 0), (0, 2, 0, 0), (1, 1, 0, 0), (1, 2, 0, 0), (2, 2, 0, 0), … I think there are 2448 important states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3,1) by iteratively filling the probabilities of arriving at the other 2347 states. In computer science, this technique is called dynamic programming. I.e., P(0,0,0,0) = 1 P(0,1,0,0) = 1/4 P(1,1,0,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0) = 1/8  etc. Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 1, 0), (1, 2, 0), (2, 2, 0), … I think there are 24 states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3) by iteratively filling the probabilities of arriving at the other 23 states. In computer science, this technique is called dynamic programming. I.e., P(0,0,0) = 1 P(0,1,0) = 1/4 P(1,1,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0)  etc. Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0, 0), (0, 1, 0, 0), (0, 2, 0, 0), (1, 1, 0, 0), (1, 2, 0, 0), (2, 2, 0, 0), … I think there are 48 important states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3,1) by iteratively filling the probabilities of arriving at the other 47 states. In computer science, this technique is called dynamic programming. I.e., P(0,0,0,0) = 1 P(0,1,0,0) = 1/4 P(1,1,0,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0) = 1/8  etc. 2 edited body edited Aug 14 '14 at 5:43 Neil G 10.1k11 gold badge3232 silver badges7373 bronze badges Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 1, 0), (1, 2, 0), (2, 2, 0), … I think there are 24 states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3) by iteratively filling the probabilities of arriving at the other 23 states. In computer science, this technique is called "dynamic programming"dynamic programming. I.e., P(0,0,0) = 1 P(0,1,0) = 1/4 P(1,1,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0)  etc. Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 1, 0), (1, 2, 0), (2, 2, 0), … I think there are 24 states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3) by iteratively filling the probabilities of arriving at the other 23 states. In computer science, this technique is called "dynamic programming". I.e., P(0,0,0) = 1 P(0,1,0) = 1/4 P(1,1,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0)  etc. Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 1, 0), (1, 2, 0), (2, 2, 0), … I think there are 24 states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3) by iteratively filling the probabilities of arriving at the other 23 states. In computer science, this technique is called dynamic programming. I.e., P(0,0,0) = 1 P(0,1,0) = 1/4 P(1,1,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0)  etc. 1 answered Aug 14 '14 at 5:36 Neil G 10.1k11 gold badge3232 silver badges7373 bronze badges Write the problem as a Markov chain with nodes representing the different states of the system: how many balls are in each bucket (considering that you can exchange the first two buckets): (0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 1, 0), (1, 2, 0), (2, 2, 0), … I think there are 24 states. Calculate the edge probabilities of going from one state to another. Then, calculate the probability of hitting state (2,2,3) by iteratively filling the probabilities of arriving at the other 23 states. In computer science, this technique is called "dynamic programming". I.e., P(0,0,0) = 1 P(0,1,0) = 1/4 P(1,1,0) = 1/4 P(1,0,0) + 1/4 P(0,1,0)  etc.