Date: 4 4 月 2013

$n=%v$

$k=%v$

重複組合

x=

y=

z=

u=

w=

一組非負整數解恰好對應到一種球和隔板的排列情形

n = 5 (slider from 1 to 5, step 1)
k = 10 (slider from 1 to 10, step 1)
x1 = 0
x2 = 0
x3 = 0
x4 = 0
x5 = 0
A = (-2.2458607136934985, 0.16354252145772796)
inputBox1 = Textfield(x1)
inputBox3 = Textfield(x3)
inputBox2 = Textfield(x2)
inputBox4 = Textfield(x4)
inputBox5 = Textfield(x5)
t = If(x1 + x2 + x3 + x4 + x5 ≟ k ∧ (x1 ≥ 0) ∧ (x2 ≥ 0) ∧ (x3 ≥ 0) ∧ (x4 ≥ 0) ∧ (x5 ≥ 0), 1, 0)
text2: "" + (LaTeX[x2]) + ""
text1: "" + (LaTeX[x1]) + ""
text3: "" + (LaTeX[x3]) + ""
text4: "" + (LaTeX[x4]) + ""
text5: "" + (LaTeX[x5]) + ""
pic2' = Translate(pic2, (x1, 0))
pic2'_1 = Translate(pic2, (x1 + x2 + 1, 0))
pic2'_2 = Translate(pic2, (x1 + x2 + x3 + 2, 0))
pic2'_3 = Translate(pic2, (x1 + x2 + x3 + x4 + 3, 0))
list1 = Sequence(Translate[pic1, (i - 1, 0)], i, 1, x1)
list2 = Sequence(Translate[pic1, (i - 1, 0)], i, x1 + 2, x1 + x2 + 1)
list4 = Sequence(Translate[pic1, (i - 1, 0)], i, x1 + x2 + x3 + 4, x1 + x2 + x3 + x4 + 3)
list5 = Sequence(Translate[pic1, (i - 1, 0)], i, x1 + x2 + x3 + x4 + 5, x1 + x2 + x3 + x4 + x5 + 4)
list3 = Sequence(Translate[pic1, (i - 1, 0)], i, x1 + x2 + 3, x1 + x2 + x3 + 2)
Ans: "\frac{(" + (LaTeX[k]) + "+" + (LaTeX[n]) + "-1)!}{" + (LaTeX[k]) + "!×(" + (LaTeX[n]) + "-1)!}"
Question: "$求方程式$
$x" + (LaTeX[If[n > 1, "+y"]]) + "" + (LaTeX[If[n > 2, "+z"]]) + "" + (LaTeX[If[n > 3, "+u"]]) + "" + (LaTeX[If[n > 4, "+w"]]) + "=" + (LaTeX[k]) + "$
$的非負整數解$"
t_{input}: "請輸入x" + (LaTeX[If[n > 1, ",y"]]) + "" + (LaTeX[If[n > 2, ",z"]]) + "" + (LaTeX[If[n > 3, ",u"]]) + "" + (LaTeX[If[n > 4, ",w"]]) + "之正確值"