Posted by: tmk9 | September 30, 2010

Lecture 13 – Graphs

(Guest post by Thomas Klonowski)

In class on 9/29/2010 we continued to concept of graphs.

First we were given a key for Default instances (cases where it is not specified):

  • # of vertices = n
  • #of edges = m

Definitions discussed this lecture:

Path – A sequence of vertices connected by edges. Repeated vertices are allowed.

  • Good Examples:
  • V1o——–oV2——–0 V3
  • V1o——->oV2——–0 V3
  • Bad Example:
  • V1o——->oV2<——-0 V3

Path Length – Number of edges travelled

Cycle – A sequence of vertices connected by edges.

  • You can have a path with only 1 vertice (Won’t use this in class)
  • Symbolic representation: (V1,V2,………Vk-1) where Vk = V1 & (V 1, Vi + 1) Є E       1<= i <= k -1

Directed Graph – A graph with an asymmetrical relationship. I.e. Wikipedia articles. An article A may have a reference to an article B, but it does not necessarily mean article B has a reference to article A.

  • Symbolic Representation: (u,v) Є E & (v, u) Not Є E
  • Examples: In class TV Host graph, Webpages on the internet.

Undirected graph – A graph with a symmetrical relationship. I.e. Facebook. In facebook in order to add someone, they must accept your request. This can be considered a “sub-set” of a Directed graph.

  • Symbolic representation: (u,v) Є E <==> (v,u) Є E
  • Graphic representation: u o————-o v(not u o——-> v)
  • Examples: Airline route graph, routers (typically), Facebook.

Concepts talked about:

G = (V, E) where V is the vertices and E is the set of edges.

Graphs by default are undirected.

Simple path is a path with no repeated vertex.

Advertisements

Categories

%d bloggers like this: