An urn initially contains 5 white and 7 black balls. Each time a ball is selected, its color is noted and it is replaced in the urn along with 2 other balls of the same color. Compute the probability that a. the first 2 balls selected are black and the next 2 are white; b. of the first 4 balls selected, exactly 2 are black.
时间: 2023-02-18 18:58:31 浏览: 69
a. 首先选出两个黑球和两个白球的概率是:7/12 x 6/13 x 5/14 x 7/15 = 0.1044
b. 首先选出正好两个黑球的概率是:7/12 x 6/13 x 5/14 x 4/15 + 7/12 x 6/13 x 4/14 x 5/15 = 0.2089
相关问题
Show the result of inserting 10, 12, 1, 14, 6, 5, 8, 15, 3, 9, 7, 4, 11, 13, and 2, one at a time, into an initially empty binary heap.
插入10后,堆为:10
插入12后,堆为: 12
/
10
插入1后,堆为: 12
/ \
10 1
插入14后,堆为: 14
/ \
10 12
***堆为: 14
/ \
10 12
/ \ / \
1 6 5 8
/
10
插入5后,堆为: 14
/ \
10 12
/ \ / \
1 6 5 8
/ \
10 5
插入8后,堆为: 14
/ \
10 12
/ \ / \
1 6 5 8
/ \
10 5
/
8
插入15后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
插入3后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \
3 10
/ \
8 5
插入9后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \
3 10
/ \ \
8 5 9
插入7后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \ /
7 10 9
/ \ /
8 5 3
插入4后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \ / \
7 10 9 4
/ \ /
8 5 3
插入11后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \ / \
7 11 9 4
/ \ /
8 5 3
插入13后,堆为: 15
/ \
10 14
/ \ / \
1 6 5 8 12
/ \ / \
7 11 9 4
/ \ / \
8 5 3 13
For which kind of loop this statement is true?The condition is tested before it enters into the loop A. While loop B.Do-While loop
The statement is true for loop A, i.e, the while loop. In a while loop, the condition is tested before entering into the loop body, and if the condition is false initially, the loop body will not be executed at all. In contrast, in a do-while loop, the loop body is executed at least once before checking the condition.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)