$Step=%v$

$k=%v$

$ 重複組合 $

$分球的過程是$
$ 控制紅色的點，\;移動至上方 $

1

$顯示提示 $

$ 決定球的個數 $

$ 想想看，\;有幾種分法？ $

$+$

A = (0.56, 0.2)
B: A + (6, 0)
s = 0 (slider from 0 to 6, step 1)
k = 1 (slider from 1 to 10, step 1)
list1 = Sequence(Sequence[A + (j, -k), j, 1, 10], k, 1, 4)
Poly1 = PolyLine(A, A + (12, 0), A + (12, 6), A + (0, 6), A)
a_1 = Segment(A + (4, 0), A + (4, 6))
a_2 = Segment(A + (6, 0), A + (6, 6))
a_3 = Segment(A + (10, 0), A + (10, 6))
list2 = Sequence(Sequence[A + (4 + j, k), j, 0, 1], k, 0, 5)
list3 = Sequence(Sequence[A + (10 + j, k), j, 0, 1], k, 0, 5)
list = Union(list1, Union[list2, list3])
list5 = Sequence(Segment[A + (4, j), A + (6, j)], j, 1, 5)
list6 = Sequence(Segment[A + (10, j), A + (12, j)], j, 1, 5)
b_1 = Segment(A + (5, 0), A + (5, 6))
b_2 = Segment(A + (11, 0), A + (11, 6))
list7 = Union({b_1, b_2}, Union[list5, list6])
a = false
list4 = Sequence(Translate[p0, (j, 0)], j, 0, k - 1)
list8 = Sequence(A + (j, -3), j, 1, k + 1)
J = Point(list8)
j_a = Segment(J, J + (0, 1))
D_1: A + (1, -3)
D_2: A + (2, -3)
D_3: A + (3, -3)
D_4: A + (4, -3)
D_5: A + (5, -3)
D_6: A + (6, -3)
D_7: A + (7, -3)
D_8: A + (8, -3)
D_9: A + (9, -3)
D_0: A + (10, -3)
C_0 = Point(list)
C_1 = Point(list)
C_2 = Point(list)
C_3 = Point(list)
C_4 = Point(list)
C_5 = Point(list)
C_6 = Point(list)
C_7 = Point(list)
C_8 = Point(list)
C_9 = Point(list)
text6: "$ \frac{(" + (LaTeX[k]) + "+1)!}{" + (LaTeX[k]) + "!}=" + (LaTeX[k + 1]) + " $"
q = If(s ≤ 5, s ≟ s + 1)
r = If(s ≤ 5, s ≟ s + 1)
t = If(s ≤ 5, s ≟ s + 1)
u = If(s ≤ 5, s ≟ s + 1)
v = If(s ≤ 5, s ≟ s + 1)
lista = Sequence(Translate[p0, (j, 0)], j, 0, k - 1)
b = IndexOf(J, list8)
E: A - (4.5, 1.2)
poly1, g, h, i, j = Polygon(E + (1.26, -0.1), E + (1.26, 0.5), E + (0, 0.5), E + (0, -0.1))
poly2, c, d, e, f = Polygon(E + (2.55, -0.1), E + (2.55, 0.5), E + (1.29, 0.5), E + (1.29, -0.1))
poly3, k_5, l, m, p = Polygon(E + (2.58, -0.1), E + (2.58, 0.5), E + (3.84, 0.5), E + (3.84, -0.1))
poly4, c_1, d_1, e_1, f_1 = Polygon(E + (3.87, -0.1), E + (3.87, 0.5), E + (5.13, 0.5), E + (5.13, -0.1))
poly5, g_1, h_1, i_1, j_1 = Polygon(E + (5.15, -0.1), E + (5.15, 0.5), E + (6.41, 0.5), E + (6.41, -0.1))
poly6, k_1, l_1, m_1, n_1 = Polygon(E + (6.44, -0.1), E + (6.44, 0.5), E + (7.7, 0.5), E + (7.7, -0.1))
poly7, p_1, q_1, r_1, s_1 = Polygon(E + (7.74, -0.1), E + (7.74, 0.5), E + (9, 0.5), E + (9, -0.1))
poly8, t_1, c_2, d_2, e_2 = Polygon(E + (9.05, -0.1), E + (9.05, 0.5), E + (10.31, 0.5), E + (10.31, -0.1))
poly9, f_2, g_2, h_2, i_2 = Polygon(E + (10.36, -0.1), E + (10.36, 0.5), E + (11.62, 0.5), E + (11.62, -0.1))
poly10, j_2, k_2, l_2, m_2 = Polygon(E + (11.65, -0.1), E + (11.65, 0.5), E + (12.92, 0.5), E + (12.92, -0.1))
o: k ≟ 10
polya, n_2, p_2, q_2, r_2 = Polygon(E + (1.47, -0.1), E + (1.47, 0.5), E + (0, 0.5), E + (0, -0.1))
polyb, s_2, t_2, b_3, c_3 = Polygon(E + (1.54, -0.1), E + (1.54, 0.5), E + (2.8, 0.5), E + (2.8, -0.1))
polyc, d_3, e_3, f_3, g_3 = Polygon(E + (2.84, -0.1), E + (2.84, 0.5), E + (4.1, 0.5), E + (4.1, -0.1))
polyd, h_3, i_3, j_3, k_3 = Polygon(E + (4.14, -0.1), E + (4.14, 0.5), E + (5.4, 0.5), E + (5.4, -0.1))
polye, l_3, m_3, n_3, p_3 = Polygon(E + (5.44, -0.1), E + (5.44, 0.5), E + (6.7, 0.5), E + (6.7, -0.1))
polyf, q_3, r_3, s_3, t_3 = Polygon(E + (6.73, -0.1), E + (6.73, 0.5), E + (7.99, 0.5), E + (7.99, -0.1))
polyg, a_4, b_4, c_4, d_4 = Polygon(E + (8.02, -0.1), E + (8.02, 0.5), E + (9.28, 0.5), E + (9.28, -0.1))
polyh, e_4, f_4, g_4, h_4 = Polygon(E + (9.33, -0.1), E + (9.33, 0.5), E + (10.56, 0.5), E + (10.56, -0.1))
polyi, i_4, j_4, k_4, l_4 = Polygon(E + (10.6, -0.1), E + (10.6, 0.5), E + (11.86, 0.5), E + (11.86, -0.1))
polyj, m_4, n_4, p_4, q_4 = Polygon(E + (11.9, -0.1), E + (11.9, 0.5), E + (13.16, 0.5), E + (13.16, -0.1))
polyk, r_4, s_4, t_4, a_5 = Polygon(E + (13.2, -0.1), E + (13.2, 0.5), E + (14.73, 0.5), E + (14.73, -0.1))
text8: "" + (LaTeX[If[k ≟ 1, "1+0,0+1", If[k ≟ 2, "2+0,1+1,0+2", If[k ≟ 3, "3+0,2+1,1+2,0+3", If[k ≟ 4, "4+0,3+1,2+2,1+3,0+4", If[k ≟ 5, "5+0,4+1,3+2,2+3,1+4,0+5", If[k ≟ 6, "6+0,5+1,4+2,3+3,2+4,1+5,0+6", If[k ≟ 7, "7+0,6+1,5+2,4+3,3+4,2+5,1+6,0+7", If[k ≟ 8, "8+0,7+1,6+2,5+3,4+4,3+5,2+6,1+7,0+8", If[k ≟ 9, "9+0,8+1,7+2,6+3,5+4,4+5,3+6,2+7,1+8,0+9", "10+0,9+1,8+2,7+3,6+4,5+5,4+6,3+7,2+8,1+9,0+10"]]]]]]]]]]) + ""
list9 = Sequence(Translate[p0, (1.5 * j - 5, 1.5)], j, 0, k - 1)
text1: "$ 將\;" + (LaTeX[k]) + "\;個相同的球分給$
$\;" + (LaTeX[If[s ≤ 6, "2", "3"]]) + "\;個人，\;求方法數. $"
text5: "$ 結論 $
$我們考慮將" + (LaTeX[k]) + "個球排成一列，$
$用\;" + (LaTeX[If[s ≤ 6, "1", "2"]]) + "\;個格板(+號)分開$"
text10: "將\;" + (LaTeX[k]) + "\;個相同的球分給\;3\;個人有幾種方法?"
text3: "$ " + (LaTeX[If[k ≟ 1, "0+1\;1+0", If[k ≟ 2, "0+2\;1+1\;2+0", If[k ≟ 3, "0+3\;1+2\;2+1\;3+0", If[k ≟ 4, "0+4\;1+3\;2+2\;3+1\;4+0", If[k ≟ 5, "0+5\;1+4\;2+3\;3+2\;4+1\;5+0", If[k ≟ 6, "0+6\;1+5\;2+4\;3+3\;4+2\;5+1\;6+0", If[k ≟ 7, "0+7\;1+6\;2+5\;3+4\;3+4\;5+2\;6+1\;7+0", If[k ≟ 8, "0+8\;1+7\;2+6\;3+5\;4+4\;5+3\;6+2\;7+1,8+0", If[k ≟ 9, "0+9\;1+8\;2+7\;3+6\;4+5\;5+4\;6+3\;7+2\;8+1\;9+0", "0+10\;1+9\;2+8\;3+7\;4+6\;5+5\;6+4\;7+3\;8+2\;9+1\;10+0"]]]]]]]]]]) + " $"