Presentation is loading. Please wait.

Presentation is loading. Please wait.

Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.

Similar presentations


Presentation on theme: "Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms."— Presentation transcript:

1 Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms

2 Vertices and Edges The circles are vertices. The lines in between the vertices are called edges. Vertices do not have to be connected to one another in order to be part of a graph. Edges do not have to connect two or more vertices. In fact, they may be redirected to one vertex thereby creating a loop.

3 Multiple Edges Multiple edges occur when there is more that one edge between two nodes. This illustration shows two edges between two of the graph’s nodes.

4 Loops A loop is when a vertex has an edge going to itself. The node on the far upper left has a loop coming from itself.

5 Undirected Graph An undirected graph is one in which the edges have no one specific direction in which they are reaching. (no arrows pointing to a specific direction on the edges).

6 Directed Graph (Digraph) A directed graph, on the other hand, does have specific directions of travel shown on each edge. (these directions are depicted by arrows).

7 Simple Graph A simple graph is one in which there are no loops and there are no multiple edges.

8 Graph versus... This is a graph. The way it differs from a multigraph is that...

9 Multigraph A multigraph may have loops and/or multiple edges.

10 Special Classes of Graphs Complete Graphs Bipartite Graphs

11 Complete Graphs A complete graph is one in which there are n nodes and O(n^2) edges. All possible edges between nodes are represented in this graph.

12 Bipartite Graph A bipartite graph is a graph that can be split in half and does not have edges between vertices in the same class.

13 Path in an Undirected Graph Take this graph for example. A path in this Graph is simply a subgraph that has no cycles, is connected and each vertex is connected to one or two other nodes.

14 Path in an Undirected Path A path would therefore look like this.

15 Path in an Undirected Graph This is not a path because the middle node on the left has more than one or two edges coming from it. A path need not cover all points.

16 Path in a Directed Graph Take this graph for an example… A path in a digraph has one vertex with an in-degree of 0 and one vertex without an out- degree of 0 and the others have in-degree 1 and out-degree 1.

17 Path in a Directed Graph Therefore, this is a path in the directed graph. Notice that it has 1 vertex with in- degree 0, 1 vertex with out-degree 0, and the others have in-degree 1 and out-degree 1. A path need not cover all points.

18 Hamiltonian Path in an Undirected Graph This is a Hamiltonian path in an undirected graph. It is a path that covers (or spans) all the vertices.

19 Hamiltonian Path in a Digraph This is a Hamiltonian path in a Digraph. Notice that all nodes are covered and that the selected edges of the graph follow the original direction and still cover all nodes.

20 Cycle in an Undirected Graph A cycle in an undirected graph is a subgraph that is connected and each node has a degree of 2.

21 Cycle in a Directed Graph A cycle in a digraph occurs in the same way as one occurs for an undirected graph. It will be the same thing for a directed graph.

22 Hamiltonian Cycle in an Undirected Graph A hamiltonian cycle is one cycle that covers all vertices of the original graph.

23 Hamiltonian Cycle for a Digraph A hamiltonian cycle for a directed graph has the same definition for as for an undirected graph.

24 Spanning Forest of a graph which is not connected A spanning forest is a subgraph where every node is covered and

25 Cyclic Graph A graph is said to be cyclical id there are any cycles in the graph.

26 Acyclical Graph This is the same graph as before but by changing the direction of one edge we have turned this graph into an acyclical one which has no cycles in it.

27 Tree A tree is a graph that has at most two edges coming from a node. Each node is therefore connected to at most 2 nodes. The direction in a tree moves downward.

28 Forest A forest is made up of more than one tree. This example shows us two different trees.


Download ppt "Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms."

Similar presentations


Ads by Google