The probability of the beauty of programming: a bucket with white balls and black balls -, now take the ball according to the following rules: I, each time from the inside out two balls, II, if the two is taken out of the same color ball, then put a black ball, II, if the two different colors of the ball, then put a white ball. Q: What is the probability that there is only one black ball left in the last bucket? The first scenario (focusing only on one ball change): I. If the two white balls are taken out, the white ball decreases2A. II. If the two black ball is taken out, the white ball does not change. III. If you take out a black and white, and then put a white ball, causing the white ball to change. In general, the change of the white ball is2,0,0, so the spin placed struck will only have an even number, there will not be a single white ball, so there is no white ball left at the end. Then the possibility of the black ball is0or -% -, because these three situations all take two to put one, actually only took one, then finally certainly will have left a ball, this is presses a decrement, so excludes0possible, then the possibility of remaining black balls in the last bucket is -% -, isn't it good to understand? Extension: If the bucket contains black balls and white balls each101it? The first -a black ball and -a white ball. By the first scenario, the remaining black ball is left.2a black ball and1a white ball, or1Black1White takes two times, the last remaining white, or2black, black and white, the remaining is still white ball, so the remaining is the white ball. Re-expansion: Even for black ball spin placed struck the last remaining is the black ball, the odd pair of black ball spin placed struck the last remaining is the white ball. The second scenario: black balls are assumed to be0, the white ball is assumed to be1. I. Black (0) ^ White Ball (1) = White Ball (1) Ii. Black (0) ^ Black (0) = (black)0II. White (1) ^ White (1) = (black)0 ^0^0^0^... 1^1^1^1^1 = ? 0 ^ 0 = 0(Black Ball), the result is black ball. Extensions: (101Black Ball)0^0^0^0^0^0....1^1^1^1^1^1=?0 ^ 1 = 1(spin placed struck), the result is the white ball. Re-expansion: The same is easy to get.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
100 a variety of ideas on black-and-white ball problems