球有編號

紅球先取完

綠球先取完

藍球先取完

Next

Reset

r = 5 (slider from 1 to 9, step 1)
b = 3 (slider from 1 to 9, step 1)
g = 4 (slider from 1 to 9, step 1)
a = true
textQ: "$" + (LaTeX[r]) + "個紅球，\;" + (LaTeX[g]) + "個綠球，\;" + (LaTeX[b]) + "個藍球，\;每次取一球，\;取後不放回，$
$★★★" + (LaTeX[If[a ≟ false, "無編號時視為相同物\;⇒不盡相異物的排列", "有編號時視為相異物⇒直線排列\;"]]) + "★★★$
$有\fgcolor{red}{" + (LaTeX[If[a ≟ false, "\frac{" + (r + g + b) + "!}{" + r + "!\cdot" + g + "!\cdot" + b + "!}=" + ((r + g + b)! / (r! * g! * b!)), r + g + b + "!=" + ((r + b + g)!)]]) + "}種不同排法$"
n = 0 (slider from 0 to 9, step 1)
A: (x(Corner[1] + 1), y(0.5 * Corner[1] + 0.5 * Corner[4]) - 0.6)
A_1: A + (1, 2.9)
A_3: A + (1, -2.9)
A_2: A + (1, 0)
u_1 = Vector(A, A_1)
u_2 = Vector(A, A_2)
u_3 = Vector(A, A_3)
B_2: A_2 + (2.3, 0)
B_1: A_1 + (2.3, 0)
B_3: A_3 + (2.3, 0)
C_2: B_1 + (1.5, -0.7)
C_1: B_1 + (1.5, 0.7)
C_3: B_2 + (1.5, 0.7)
C_4: B_2 + (1.5, -0.7)
C_5: B_3 + (1.5, 0.7)
C_6: B_3 + (1.5, -0.7)
u_4 = Vector(B_1, C_1)
u_5 = Vector(B_1, C_2)
u_6 = Vector(B_2, C_3)
u_7 = Vector(B_2, C_4)
u_8 = Vector(B_3, C_5)
u_9 = Vector(B_3, C_6)
t4: "\underline{最後位置是綠球}的機率：\frac{1·C^{r+g+b-1}_{g-1}·1·\frac{(r+b-1)!}{r!·(b-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{g}{r+g+b}·\frac{b}{b+r}=\fgcolor{red}{" + (LaTeX[SurdText[(b * g) / ((r + g + b) * (b + r))]]) + "}"
t5: "\underline{最後位置是藍球}的機率：\frac{1·C^{r+g+b-1}_{b-1}·1·\frac{(r+g-1)!}{r!·(g-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{b}{r+g+b}·\frac{g}{g+r}=\fgcolor{red}{ " + (LaTeX[SurdText[b * g / ((r + g + b) * (g + r))]]) + "}"
t6: "\underline{最後位置是紅球}的機率：\frac{1·C^{r+g+b-1}_{r-1}·1·\frac{(g+b-1)!}{g!·(b-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{r}{r+g+b}·\frac{b}{b+g}= \fgcolor{green}{ " + (LaTeX[SurdText[(r * b) / ((r + g + b) * (b + g))]]) + "}"
text4: "\underline{最後位置是綠球}的機率：\;\frac{C^g_1·P^{r+g+b-1}_{g-1}·C^b_1(r+b-1)!}{(r+g+b)!}=\frac{g}{r+g+b}·\frac{b}{b+r}=\fgcolor{red}{" + (LaTeX[SurdText[(b * g) / ((r + g + b) * (b + r))]]) + "}"
text5: "$\underline{最後位置是藍球}的機率：\;\frac{C^b_1·P^{r+g+b-1}_{b-1}·C^g_1(r+g-1)!}{(r+g+b)!}=\frac{b}{r+g+b}·\frac{g}{g+r}=\fgcolor{red}{" + (LaTeX[SurdText[(b * g) / ((r + g + b) * (g + r))]]) + "}$"
text6: "$\underline{最後位置是紅球}的機率：\;\frac{C^r_1·P^{r+g+b-1}_{r-1}·C^b_1(g+b-1)!}{(r+g+b)!}=\frac{r}{r+g+b}·\frac{b}{b+g}=\fgcolor{green}{" + (LaTeX[SurdText[(b * r) / ((r + g + b) * (b + g))]]) + "}$"
text7: "$\underline{最後位置是藍球}的機率：\;\frac{C^b_1·P^{r+g+b-1}_{b-1}·C^r_1(g+r-1)!}{(r+g+b)!}=\frac{b}{r+g+b}·\frac{r}{r+g}=\fgcolor{green}{" + (LaTeX[SurdText[(b * r) / ((r + g + b) * (r + g))]]) + "} $"
text8: "$\underline{最後位置是紅球}的機率：\;\frac{C^r_1·P^{r+g+b-1}_{r-1}·C^g_1(b+g-1)!}{(r+g+b)!}=\frac{r}{r+g+b}·\frac{g}{g+b}=\fgcolor{blue}{" + (LaTeX[SurdText[(r * g) / ((r + b + g) * (g + b))]]) + "} $"
text9: "\underline{最後位置是綠球}的機率：\;\frac{C^g_1·P^{r+g+b-1}_{g-1}·C^r_1(b+r-1)!}{(r+g+b)!}=\frac{g}{r+g+b}·\frac{r}{r+b}=\fgcolor{blue}{ " + (LaTeX[SurdText[(r * g) / ((r + g + b) * (r + b))]]) + "}"
t7: "\underline{最後位置是藍球}的機率：\frac{1·C^{r+g+b-1}_{b-1}·1·\frac{(g+r-1)!}{g!·(r-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{b}{r+g+b}·\frac{r}{r+g}=\fgcolor{green}{  " + (LaTeX[SurdText[(b * r) / ((r + g + b) * (r + g))]]) + "}"
t9: "\underline{最後位置是綠球}的機率：\frac{1·C^{r+g+b-1}_{g-1}·1·\frac{(b+r-1)!}{b!·(r-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{g}{r+g+b}·\frac{r}{r+b}=\fgcolor{blue}{ " + (LaTeX[SurdText[(g * r) / ((r + g + b) * (r + b))]]) + "}"
t8: "\underline{最後位置是紅球}的機率：\frac{1·C^{r+g+b-1}_{r-1}·1·\frac{(b+g-1)!}{b!·(g-1)!}}{\frac{(r+g+b)!}{r!·g!·b!}}=\frac{r}{r+g+b}·\frac{g}{b+g}= \fgcolor{blue}{  " + (LaTeX[SurdText[(g * r) / ((r + g + b) * (b + g))]]) + "}"