A well-defined computational procedure that takes a set of inputs and returns a set of outputs.