- Algorithm: A precise, systematic method for producing a
- Some examples
- Long division.
- Convert binary to decimal.
- Convert decimal to binary.
- How to bring up Firefox.
- How to call someone who is listed in your contacts list.
- Whoever performs the algorithm is called an agent, and may
be a computer or a human being. (Or a trained seal for that matter.)
- Essential Properties.
- Inputs and outputs specified. Say what's needed,
and what's produced.
- Each step is precisely defined.
- No “Sweeten sufficiently,” or “Be fair.”
- Can't have the agent exercising choice.
- The agent (computer or other) can perform each step.
- No “find tomorrows high temperature” or
“enter the number I'm thinking of.”
- The algorithm must finish.
- No, “compute to the last digit the value of pi.”
- Recipes can be algorithms, but many will violate the Definiteness
- Desirable properties.
- General: Work for a class of similar problems.
- Clear and understandable.
- More examples.
- Intersect Alphabetized list.
- Binary Search
- Different algorithms for the same result may require vastly different
amounts of work.
- Search a dictionary using alphabetical order (binary search) v.
searching it in order starting at the front.
- Though we think of computers as fast, they often must handle enough data that the
choice of algorithm matters in practice.
- Programs are written in formal, precisely-defined languages.
- It's hard to be precise in human languages.