Courses/Computer Science/CPSC 203/CPSC 203 2008Winter L03/CPSC 203 2008Winter L03 Lectures/Lecture 4

From wiki.ucalgary.ca
Jump to: navigation, search

Lecture 4

Today we sharpen the "dots" and "edges" visual tools we have been using to model the Internet, and introduce the idea that we can build models of systems by drawing graphs (aka Dots and Edges). Along the way we will introduce some future topics in the course that use just this grapical modelling approach (e.g. Data Models in databases, Decision and Attack Trees, Circuit Diagrams, Conditional Probability etc.).


  • House Keeping
  • MIDTERM: Tuesday February 26th
    • Usual announcements
      • Extra Syllabus and Course Sheets at Front
      • Announcement for Natural Science Students
      • Term Project Intro and Tutorial Schedule on BB (quickly view term project intro).
  • Todays Goals
    • Review several Alternate Internet models constructed by the class.
    • Introduce the visual language of Dots and Edges as a way of formalizing the models you have constructed.

Lecture Glossary

  • Model -- A model is a simplified representation of a system. For example a road map, or a map of a new residential neighbourhood you might want to buy into. In a mathematical model we represent a real life situation or problem with a mathematial system (in our examples, the mathematical systems are graphs).
  • Dot ---> "Node", "Vertice", "Object"
  • Edge ---> "Relation", "Connection", "Arc", "Information flow".
  • Graph -- A collection of dots and edges
  • Subgraph -- A graph H is a subgraph of G if the nodes and edges in H are also in G.
  • Isomorphism -- Two graphs are 'isomporphic' if they have the same structure, that is you can map every node and edge in one graph to the other. Note -- this is a mathematically difficult idea. Isomorphism functions a lot like "equality" when comparing graphs.
    • Undirected Edge (--> Graphs)
    • Directed Edge (---> Directed Graphs)
    • Networks -- Directed Graphs where the edges have a value
  • Paths and Cycles -- A path is the list of nodes (and edges) by which any two nodes are connected. A path that ends with the same node it begins with is called a cycle.
  • Trees -- Formally, a "tree" is a graph in which any two nodes are connected by exactly one path. A directed tree is a graph with directed edges where every node has a single parent, and potentially multiple children.
  • Directed Acyclic Graphs (DAG) -- More complex than directed trees -- the only restriction now is that there are no cycles.
  • Connected/Disconnected -- Two nodes are connected if there is a path between them, otherwise disconnected

Dots and Edges

The various items in the glossary above are illustrated on the overhead providing key examples. The key idea here is that we can use graphs to develop visual models. These models can be mathematically formalized (which is beyond the scope of our course). But they also provide:

  1. A way to visualize a problem concretely
  2. A way to reason about the problem by looking for paths, cycles, subgraphs, isomers

and in this way, even without the mathematical formalism, you have a visual toolkit that helps you think critically about different kinds of problems.

Some General Examples

  • Graphs as Mathematical Models -- Several Islands, Several ferry boats going amongst the islands.
  • Directed Graphs as mathematical Models -- An a large firm, we identify each person as a node, and draw an arc between managers and the managed.
  • Networks as Mathematical Models -- A neighbourhood with several families. Families may like (1), disliike (-1) or be indifferent (0) to each other.

Some Examples from the Course

  • A Data Model in a Database
  • A Complex circuit
  • An Attack Tree


Resources

  • "Introduction to Graph Theory" By Richard J. Trudeau. Dover Press, 1993. Originally called, "Dots and Edges" -- if you find playing with dots and edges fun, and want to learn more --- this is the place to start. You can usually find a copy at a used bookstore's math section for < $10
  • "Introductory Graph Theory" by Gary Chartrand. Excellent discussion on the relationship between graphs and models.