Ch. 10: Algorithms
You can stream the lecture, or download it. The stream may be slow, so downloading may work better for you. Also, Firefox seems to have a bug where the stream won't start unless you put its window into full-screen. Once started, you can return to the smaller picture.
  1. Algorithm: A precise, systematic method for producing a specified result.
  2. Some examples
    1. Long division.
    2. Convert binary to decimal.
    3. Convert decimal to binary.
    4. How to bring up Firefox.
    5. How to call someone who is listed in your contacts list.
  3. Whoever performs the algorithm is called an agent, and may be a computer or a human being. (Or a trained seal for that matter.)
  4. Essential Properties.
    1. Inputs and outputs specified. Say what's needed, and what's produced.
    2. Definiteness.
      1. Each step is precisely defined.
      2. No “Sweeten sufficiently,” or “Be fair.”
      3. Can't have the agent exercising choice.
    3. Effectiveness.
      1. The agent (computer or other) can perform each step.
      2. No “find tomorrows high temperature” or “enter the number I'm thinking of.”
    4. Finiteness.
      1. The algorithm must finish.
      2. No, “compute to the last digit the value of pi.”
  5. Recipes can be algorithms, but many will violate the Definiteness property.
  6. Desirable properties.
    1. General: Work for a class of similar problems.
    2. Clear and understandable.
  7. More examples.
    1. Intersect Alphabetized list.
    2. Binary Search
  8. Efficiency.
    1. Different algorithms for the same result may require vastly different amounts of work.
    2. Search a dictionary using alphabetical order (binary search) v. searching it in order starting at the front.
    3. Though we think of computers as fast, they often must handle enough data that the choice of algorithm matters in practice.
  9. Languages.
    1. Programs are written in formal, precisely-defined languages.
    2. It's hard to be precise in human languages.