$n=%v$

$k=%v$

$Step=%v$

$ 直線排列 $

Next

Reset

n = 7 (slider from 1 to 7, step 1)
lista = Shuffle(Sequence[j, j, 1, n])
A = (0, 4)
B: A - (0, 4.5)
listd = Sequence(B + (2 * Element[lista, j] - 2, 0), j, 1, n)
k = 2 (slider from 1 to n, step 1)
a_0 = -1.7 (slider from -5 to 5, step 0.1)
s = 0 (slider from 0 to k, step 1)
list1 = Sequence(A + (2 * j, 0), j, 0, n - 1)
text0: "$ 從\;" + (LaTeX[n]) + "\;個人中選\;" + (LaTeX[k]) + "\;人排成一列，\;有幾種方法？ $"
text1: "$ 第一個位置有 " + (LaTeX[n]) + "個選擇$"
text2: "$ 第二個位置有" + (LaTeX[n - 1]) + "  個選擇$"
text3: "$ 第三個位置有" + (LaTeX[n - 2]) + "  個選擇$"
text4: "$ 第四個位置有" + (LaTeX[n - 3]) + "  個選擇$"
text5: "$ 第五個位置有" + (LaTeX[n - 4]) + "  個選擇$"
text6: "$ 第六個位置有" + (LaTeX[n - 5]) + "  個選擇$"
text7: "$ 第七個位置有" + (LaTeX[n - 6]) + "  個選擇$"
text8: "$ 方法數：\;" + (LaTeX[If[s ≥ 1, "" + n]]) + " " + (LaTeX[If[s ≥ 2, "×" + (n - 1)]]) + "" + (LaTeX[If[s ≥ 3, "×" + (n - 2)]]) + "" + (LaTeX[If[s ≥ 4, "×" + (n - 3)]]) + "" + (LaTeX[If[s ≥ 5, "×" + (n - 4)]]) + "" + (LaTeX[If[s ≥ 6, "×" + (n - 5)]]) + "" + (LaTeX[If[s ≥ 7, "×" + (n - 6)]]) + "" + (LaTeX[If[s ≟ k, "=P^" + n + "_" + k]]) + "$"
t1 = 0 (slider from 0 to 1, step 0.01)
t2 = 0 (slider from 0 to 1, step 0.01)
t3 = 0 (slider from 0 to 1, step 0.01)
listb = First(lista, k)
listc = Sequence(B + (2 * Element[listb, j] - 2, 0), j, 1, k)
C_1: Element[listc, 1] + t1 * Vector[Element[listc, 1], A]
t4 = 0 (slider from 0 to 1, step 0.01)
t5 = 0 (slider from 0 to 1, step 0.01)
t6 = 0 (slider from 0 to 1, step 0.01)
t7 = 0 (slider from 0 to 1, step 0.01)
C_4: Element[listc, 4] + t4 * Vector[Element[listc, 4], A + (6, 0)]
C_6: Element[listc, 6] + t6 * Vector[Element[listc, 6], A + (10, 0)]
C_7: Element[listc, 7] + t7 * Vector[Element[listc, 7], A + (12, 0)]
C_2: Element[listc, 2] + t2 * Vector[Element[listc, 2], A + (2, 0)]
C_3: Element[listc, 3] + t3 * Vector[Element[listc, 3], A + (4, 0)]
C_5: Element[listc, 5] + t5 * Vector[Element[listc, 5], A + (8, 0)]
listP = Sequence(Polygon[A + (2 * j, 0), A + (2 * j + 2, 0), A + (2 * j + 2, 3), A + (2 * j, 3)], j, 0, k - 1)
text9: "$ list1=" + (LaTeX[listd]) + " $
$list4=" + (LaTeX[lista]) + ",list5=" + (LaTeX[listb]) + "$
$list6=" + (LaTeX[listc]) + "$"
m = If(s < k, s ≟ s + 1, s ≟ 0)
o = If(s < k, s ≟ s + 1, s ≟ 0)