Courses/Computer Science/CPSC 203/CPSC 203 2007Fall L04/CPSC 203 2007Fall L04 Lectures/Lecture 19

Jump to: navigation, search

Lecture 19

Today we turn our attention to problem solving. Problem solving is fundamental to computer science, and at the heart of programming. However, problem-solving occurs in every area of life -- from trying to deal with large scale national policy issues to fine-tuning your favorite recipe.

We will focus on providing a few tools to help you in problem solving:

  • a few definitions related to problem-solving
  • an introduction to the notion of conditional probabilities
  • an introduction to the notions of 'complexity' and 'constraint' in terms of our dots-and-edges graphics.
    • Note -- Next week, we will take some time as a group to 'debug' our solutions.

These tools will then be used to try and brainstorm a solution to the following problem: What are the keystone websites of the internet? (Note -- in biology a "keystone species" are those species that hold an ecosystem togethr -- so if something happens to those specific species, the ecosystem cannot recover).

We will illustrate the keystone species in a simple graphic at:

then transfer our intuition over to the internet.

The objectives of today's class are:

  • House Keeping
      • Group Project Presentations begin the week of Nov 26th. Will be by lab/tutorial sections. Schedule posted next monday. Group Projects websites will be marked based on version TA's download Dec 7th.
      • Assignment 2 due by midnight Nov. 23rd. TA's will focus on this for next week's tutorials.

    • Reminders:
      • Final Exam Date and Time has been set: Monday Dec 17, 12-2p.m. (room unknown).

  • Topics
    • Problem Solving Glossary (introduction).
    • Counting, Causes, Effects.
    • Complexity and Constraint (a dots and edges approach).
    • Problem Solving Excercise: An 'Algorithm' for finding keystone websites of the Internet.

Problem Solving Glossary

  • Cause/Effect
  • Conditional probability (in terms of cause/effect). The Probability of an Effect B given that a prospective cause A has already happened. Usually written as P(B/A).
  • Heuristics -- 'Rules of thumb; informal procedures'. Often not guaranteed a solution.
  • Algorithm -- A mechanical procedure. A series of steps (usually sequential) to solve a problem capable of being run on a 'universal computer'. Note -- the idea of a Turing Machine was to create a mechanical system that could determine if any particular algorithm would ever halt or not (i.e. be able to reach a solution). This is equivalent to saying, in math, could certain theorems ever be proven true?
  • Prototype -- Minimal Working Model -- Interface (e.g. a prototype car has only the parts you interact with, but no working parts)
  • Top Down Design -- Breaking a problem down into nested components (see modularity). What results is usually a 'Decision Tree', which is much like the Attack Trees previously encountered.
  • Modularity -- Building systems out of components that can be treated internally as 'black boxes' and connect to other components through clear interfaces. Often used to reduce complexity in a system.
  • Interface -- what the user can see and interact with. Interfaces SHOULD BE easy, intuitive, versatile. Good Examples: Pencil, Doorknob. Bad Examples: Universal Remotes, Many software interfaces.
  • Complexity/Constraint (in terms of dots-and-edges approach).
    • Maximum Complexity: The maximum number of paths in a system, given a set of nodes.
    • Actual Complexity: The actual number of paths in a system, as counted.
    • Relative Constraint: (Maximimum Complexity -- Actual Complexity)/Maximum Complexity (it is also called "Relative Information" for historical reasons we won't go into in this class).
      • Approaches 0 as measured Actual Complexity approaches Maximum Complexity.
      • Approaches 1, the greater the difference between Maximum and Actual Complexity.


The Structure and Dynamics of Networks. Editted by Newman, Barbasi and Watts

Ulanowicz, B. 1999. Life after newton: an ecological metaphysic. BioSystems 50. 127-142


TIA 4th Edition. Chapter 10 pp: 440-475

TIA 3rd Edn. Chapter 10 pp: 418-453