Date: 8 4 月 2013

$起點$

$行數=%v$

$目前位置$

$列數=%v$

$往右$

$往上$

$終點$

$捷徑問題$

依序點選2種不同箭頭可交換

控制↑→位置

s = 0
s_{13}: floor(s / 1000000000000)
s_{12}: floor(Mod[s, 1000000000000] / 100000000000)
s_{11}: floor(Mod[s, 100000000000] / 10000000000)
s_{10}: floor(Mod[s, 10000000000] / 1000000000)
s_9: floor(Mod[s, 1000000000] / 100000000)
s_8: floor(Mod[s, 100000000] / 10000000)
s_7: floor(Mod[s, 10000000] / 1000000)
s_6: floor(Mod[s, 1000000] / 100000)
s_5: floor(Mod[s, 100000] / 10000)
s_4: floor(Mod[s, 10000] / 1000)
s_3: floor(Mod[s, 1000] / 100)
s_2: floor(Mod[s, 100] / 10)
s_1 = Mod(s, 10)
A_0 = (2.24, -0.7)
a = 8 (slider from 1 to 8, step 1)
A: A_0 + (If[s_1 ≟ 1, 1, 0] + If[s_2 ≟ 1, 1, 0] + If[s_3 ≟ 1, 1, 0] + If[s_4 ≟ 1, 1, 0] + If[s_5 ≟ 1, 1, 0] + If[s_6 ≟ 1, 1, 0] + If[s_7 ≟ 1, 1, 0] + If[s_8 ≟ 1, 1, 0] + If[s_9 ≟ 1, 1, 0] + If[s_{10} ≟ 1, 1, 0] + If[s_{11} ≟ 1, 1, 0] + If[s_{12} ≟ 1, 1, 0] + If[s_{13} ≟ 1, 1, 0], If[s_1 ≟ 2, 1, 0] + If[s_2 ≟ 2, 1, 0] + If[s_3 ≟ 2, 1, 0] + If[s_4 ≟ 2, 1, 0] + If[s_5 ≟ 2, 1, 0] + If[s_6 ≟ 2, 1, 0] + If[s_7 ≟ 2, 1, 0] + If[s_8 ≟ 2, 1, 0] + If[s_9 ≟ 2, 1, 0] + If[s_{10} ≟ 2, 1, 0] + If[s_{11} ≟ 2, 1, 0] + If[s_{12} ≟ 2, 1, 0] + If[s_{13} ≟ 2, 1, 0])
b = 5 (slider from 1 to 5, step 1)
L: A + (1, 0)
U: A + (0, 1)
a_1 = 8
b_1 = 5
list1 = Sequence(Sequence[Polygon[A_0 + (i - 1, j - 1), A_0 + (i, j - 1), 4], i, 1, a_1], j, 1, b_1)
A_1: A_0 + (If[s_1 ≟ 1, 1, 0], If[s_1 ≟ 2, 1, 0])
A_2: A_1 + (If[s_2 ≟ 1, 1, 0], If[s_2 ≟ 2, 1, 0])
A_3: A_2 + (If[s_3 ≟ 1, 1, 0], If[s_3 ≟ 2, 1, 0])
A_4: A_3 + (If[s_4 ≟ 1, 1, 0], If[s_4 ≟ 2, 1, 0])
A_5: A_4 + (If[s_5 ≟ 1, 1, 0], If[s_5 ≟ 2, 1, 0])
A_6: A_5 + (If[s_6 ≟ 1, 1, 0], If[s_6 ≟ 2, 1, 0])
A_7: A_6 + (If[s_7 ≟ 1, 1, 0], If[s_7 ≟ 2, 1, 0])
A_8: A_7 + (If[s_8 ≟ 1, 1, 0], If[s_8 ≟ 2, 1, 0])
A_9: A_8 + (If[s_9 ≟ 1, 1, 0], If[s_9 ≟ 2, 1, 0])
A_{10}: A_9 + (If[s_{10} ≟ 1, 1, 0], If[s_{10} ≟ 2, 1, 0])
A_{11}: A_{10} + (If[s_{11} ≟ 1, 1, 0], If[s_{11} ≟ 2, 1, 0])
A_{12}: A_{11} + (If[s_{12} ≟ 1, 1, 0], If[s_{12} ≟ 2, 1, 0])
A_{13}: A_{12} + (If[s_{13} ≟ 1, 1, 0], If[s_{13} ≟ 2, 1, 0])
u = Vector(A_0, A_1)
v = Vector(A_1, A_2)
w = Vector(A_2, A_3)
z = Vector(A_3, A_4)
c = Vector(A_4, A_5)
d = Vector(A_5, A_6)
e = Vector(A_6, A_7)
f = Vector(A_7, A_8)
g = Vector(A_8, A_9)
h = Vector(A_9, A_{10})
i = Vector(A_{10}, A_{11})
j = Vector(A_{11}, A_{12})
k = Vector(A_{12}, A)
A_{14}: A_0 + (a_1, b_1)
m = 0
n = 0
text2: "" + (LaTeX[b_1]) + "×" + (LaTeX[a_1]) + "矩形走捷徑情況數=" + (LaTeX[b_1]) + "個「↑」和" + (LaTeX[a_1]) + "個「→」的排列情況數"
B = (0, -2)