Slide 2
Slide 2 text
2
Algorithms
Algorithm: Any well-defined computation procedure
that takes some value, or set of values, as input and
produces some value, or set of values, as output.
Example: Sorting problem
Input: A sequence of n numbers a1
, a2
,…, an
Output: A permutation of the input sequence
such that .
'
'
2
'
1
,...,
,
n
a
a
a
'
'
2
'
1
...
n
a
a
a