Probability of Algorithm Research

Source: Internet
Author: User

There are two kinds of probabilities:

Multiplication rules: A process takes several steps. The subsequent steps can only be performed after the previous steps are completed. The probability of completing the process is the product of the probability of the previous steps. Imagine that if the probability of a process in the middle is 0, the final step cannot be completed, and the probability must be 0. This is of course a multiplication relationship, the addition operation will not get the result of 0.
Addition Rules: One of multiple methods can be used to complete a process (any method can be used). The probability of completing this process is the sum of the probabilities of these methods.
For example:
To retrieve 3D numbers from 0-9, first retrieve the hundred digits, then retrieve the ten digits, and finally retrieve the single digit. This means that the 3D number is complete. You can score three steps and cannot complete any step if it is missing, then the probability of 3D completion is the sum of the probability of completing, 10, and 3 steps: P (3D) = P () * P (10) * P (count)
If the number is obtained for a hundred bits, you can get 0, 1, and 9. So the probability of getting a hundred bits is summed up. For example, the probability of getting a hundred bits to {14568} is P (1) + P (2) + P (5) + P (6) + P (8) = (1/10) * 5 = 5/10.

Now we can combine the multiplication rules to obtain the probability that all 10 million codes are within {14568} (5/10) * (5/10) * (5/10) = 125/1000 = 1/8.

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.