## Algorithm: Core Concepts

20th August 2020 at 2:19pm

Algorithms (Jeff Erickson) 对算法给的定义是：

An algorithm is an explicit, precise, unambiguous, mechanically-executable sequence of elementary instructions, usually intended to accomplish a specific purpose.

$x = \displaystyle\sum_{i=0}^{m-1}X[i] \cdot 10^i$ and $y = \displaystyle\sum_{j=0}^{n-1}Y[j] \cdot 10^j$

$x \cdot y = \displaystyle\sum_{i=0}^{m-1}\sum_{j=0}^{n-1}(X[i] \cdot Y[j] \cdot 10^{i+j})$

FibonacciMultiply(X [0 .. m − 1], Y [0 .. n − 1]):
hold ← 0
for k ← 0 to n + m − 1
for all i and j such that i + j = k
hold ← hold + X [i] · Y [ j]
Z[k] ← hold mod 10
hold ← bhold/10c
return Z[0 .. m + n − 1]