100 a variety of ideas on black-and-white ball problems

Source: Internet
Author: User
The probability of the beauty of programming: a bucket with white balls, black balls each of 100, now according to the following rules to take the ball:
    I, each time from the inside out two balls; II, if you take out two of the
    same color ball, then put a black ball,
    II, if the removal of two different colors of the ball, And put a white ball in it.
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 ball is taken out, the white ball is reduced by 2.
    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 white ball is 2,0,0, so spin placed struck will only exist even, there will not be
a single white ball, so there is no white ball left. Then the possibility of the black ball is 0
or 100%100, because these three cases are taken two to put one, actually only take one,
then finally there will be a ball, which is reduced by one, so the possibility of excluding 0, then
The possibility of the last black ball in the bucket is 100%100, isn't it good to understand?
extension:
    If the bucket has black balls and a white ball each 101.
    first of 100 black ball and 100 white ball in the first solution to the remaining black ball, then there are
    still 2 black ball and 1 white ball, or 1 Black 1 white Take two times, the last remaining white,
    or 2 black, black and white, the remaining 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: The
    Black Ball is assumed to be 0, and the white ball assumes 1.
    i. Black (0) ^ White Ball (1) = white Ball (1)
    Ii. Black (0) ^ Black (0)  = (black) 0
    ii. 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:
    (101 Black Ball)
0^0^0^0^0^0....1^1^1^1^1^1=?
0 ^ 1 = 1 (spin placed struck), the result is a white ball.
re-expansion: The same is
    easy to get.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.