Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 835 Bytes

CS401_Reflection_4_5_Algorithm.md

File metadata and controls

5 lines (3 loc) · 835 Bytes

An algorithm is a finite sequence of precise instructions for performing a computation or for solving a problem (Rosen 3.1).

Algorithms are usually evaluated by their efficiency, meaning the time required to produce the desired outcome given a sufficiently large input. An efficient algorithm should be concise, simple, and free of redundancy, ideally solving the problem in as few steps as possible.

If n is the size of the input, we can define a function A(n) to represent the running time of the algorithm. When analyzing this running time, we exclude external factors such as the platform or type of computer, assuming those conditions remain consistent. We also disregard small inputs and multiplicative constants (乘性常数, such as pi), since the focus is on the general computational logic rather than minor details.