Date: 5 4 月 2013

$隔板數=%v$

$球數=%v$

重新設定

重複組合

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

j = 10 (slider from -5 to 10, step 1)
k = 4
s = 1.1112222222222E13
s01: floor(s / 10000000000000)
s02: floor(s / 1000000000000) - s01 * 10
s03: floor(s / 100000000000) - s01 * 100 - s02 * 10
s04: floor(s / 10000000000) - s01 * 1000 - s02 * 100 - s03 * 10
s14 = Mod(s, 10)
s13: floor(Mod[s, 100] / 10)
s12: floor(Mod[s, 1000] / 100)
s11: floor(Mod[s, 10000] / 1000)
s10: floor(Mod[s, 100000] / 10000)
s09: floor(Mod[s, 1000000] / 100000)
s08: floor(Mod[s, 10000000] / 1000000)
s07: floor(Mod[s, 100000000] / 10000000)
s06: floor(Mod[s, 1000000000] / 100000000)
s05: floor(Mod[s, 10000000000] / 1000000000)
y1 = If(s14 < 1.5, 1, If[s13 ≟ 1, 2, If[s12 ≟ 1, 3, If[s11 ≟ 1, 4, If[s10 ≟ 1, 5, If[s09 ≟ 1, 6, If[s08 ≟ 1, 7, If[s07 ≟ 1, 8, If[s06 ≟ 1, 9, If[s05 ≟ 1, 10, 11]]]]]]]]])
x1 = If(k > 0, y1 - 1, j)
y2 = If(s13 ≟ 1 ∧ (y1 < 2), 2, If[s12 ≟ 1 ∧ (y1 < 3), 3, If[s11 ≟ 1 ∧ (y1 < 4), 4, If[s10 ≟ 1 ∧ (y1 < 5), 5, If[s09 ≟ 1 ∧ (y1 < 6), 6, If[s08 ≟ 1 ∧ (y1 < 7), 7, If[s07 ≟ 1 ∧ (y1 < 8), 8, If[s06 ≟ 1 ∧ (y1 < 9), 9, If[s05 ≟ 1 ∧ (y1 < 10), 10, If[s04 ≟ 1 ∧ (y1 < 11), 11, 12]]]]]]]]])
x2 = If(k > 1, y2 - y1 - 1, j - x1)
y3 = If(s12 ≟ 1 ∧ (y2 < 3), 3, If[s11 ≟ 1 ∧ (y2 < 4), 4, If[s10 ≟ 1 ∧ (y2 < 5), 5, If[s09 ≟ 1 ∧ (y2 < 6), 6, If[s08 ≟ 1 ∧ (y2 < 7), 7, If[s07 ≟ 1 ∧ (y2 < 8), 8, If[s06 ≟ 1 ∧ (y2 < 9), 9, If[s05 ≟ 1 ∧ (y2 < 10), 10, If[s04 ≟ 1 ∧ (y2 < 11), 11, If[s03 ≟ 1 ∧ (y2 < 12), 12, 13]]]]]]]]])
x3 = If(k > 2, y3 - y2 - 1, j - x1 - x2)
y4 = If(s11 ≟ 1 ∧ (y3 < 4), 4, If[s10 ≟ 1 ∧ (y3 < 5), 5, If[s09 ≟ 1 ∧ (y3 < 6), 6, If[s08 ≟ 1 ∧ (y3 < 7), 7, If[s07 ≟ 1 ∧ (y3 < 8), 8, If[s06 ≟ 1 ∧ (y3 < 9), 9, If[s05 ≟ 1 ∧ (y3 < 10), 10, If[s04 ≟ 1 ∧ (y3 < 11), 11, If[s03 ≟ 1 ∧ (y3 < 12), 12, If[s02 ≟ 1 ∧ (y3 < 13), 13, 14]]]]]]]]])
x4 = If(k > 3, y4 - y3 - 1, j - x1 - x2 - x3)
b = 4 (slider from 0 to 4, step 1)
a = 10 (slider from 1 to 10, step 1)
A = (13, 0)
B = (12, 0)
C = (11, 0)
D = (10, 0)
E = (9, 0)
F = (8, 0)
G = (7, 0)
H = (6, 0)
I = (5, 0)
J = (4, 0)
K = (3, 0)
L = (2, 0)
M = (1, 0)
N = (0, 0)
m = 0
n = 0
x5: j - x1 - x2 - x3 - x4
text5: "" + (LaTeX[x1]) + ""
text6: "" + (LaTeX[x2]) + ""
text8: "" + (LaTeX[x3]) + ""
text9: "" + (LaTeX[x4]) + ""
text10: "" + (LaTeX[x5]) + ""
text4: "(x,y,z,u,w)=(" + (LaTeX[x1]) + "," + (LaTeX[x2]) + "," + (LaTeX[x3]) + "," + (LaTeX[x4]) + "," + (LaTeX[x5]) + ")"
text3: "(x,y,z,u)=(" + (LaTeX[x1]) + "," + (LaTeX[x2]) + "," + (LaTeX[x3]) + "," + (LaTeX[x4]) + ")"
text2: "(x,y,z)=(" + (LaTeX[x1]) + "," + (LaTeX[x2]) + "," + (LaTeX[x3]) + ")"
text1: "(x,y)=(" + (LaTeX[x1]) + "," + (LaTeX[x2]) + ")"
text0: "x=" + (LaTeX[x1]) + ""