Explicit steps and inputs

An algorithm describes an executable method rather than only an objective. Finding a minimum states a task; retaining a current minimum while examining successive items begins to specify a method. Input assumptions and the required output must also be stated, so the steps have a definite meaning across different instances.

References: [1]

Methods and implementations

The same algorithm can be implemented in different languages and on different machines. Code chooses representations, interfaces, and error handling, while an algorithm describes the method. A single application can combine sorting, searching, and encoding algorithms; its product name does not identify the computational methods it uses.

References: [2]

Justifying correctness

Examples help expose mistakes but do not prove correctness for all permitted inputs. Loop invariants and recursive arguments can connect each step to the required result. Randomized or approximate methods require further statements about success probability or error bounds, rather than treating plausible-looking output as an unrestricted guarantee.

References: [1]

Relating resources to input size

Analysis relates resource use to input size. Faster hardware can shorten a run without removing structural growth, such as examining every pair of items. Practical choices also depend on data distribution and access patterns. A straightforward method suitable for a small collection may become inappropriate as that collection expands.

References: [2]