7
Graph theory and Graph theory and networks networks

Graph theory and networks. Basic definitions A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Embed Size (px)

DESCRIPTION

Special Graphs  The complete graph K n is a simple graph consisting of n vertices with each joined to each of the others by an edge. Each vertex in K n has degree n – 1.  The complete bi-partite graph K m,n consists of two groups of vertices, illustrated with m vertices in one group and n in the other. Each of the m vertices is joined to each of the n vertices.  A connected graph with n vertices and n-1 arcs is called a tree.

Citation preview

Page 1: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Graph theory and Graph theory and networksnetworks

Page 2: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Basic definitionsBasic definitions A A graphgraph consists of points called consists of points called verticesvertices (or (or nodesnodes) and lines called ) and lines called

edgesedges (or (or arcsarcs). Each edge joins one vertex to another, or a vertex to ). Each edge joins one vertex to another, or a vertex to itself. A itself. A graphgraph consists of points called consists of points called verticesvertices (or (or nodesnodes) and lines ) and lines called called edgesedges (or (or arcsarcs). Each edge joins one vertex to another, or a ). Each edge joins one vertex to another, or a vertex to itself.vertex to itself.

The The degreedegree or or orderorder of a node is the number of ends of arcs at the of a node is the number of ends of arcs at the vertex.vertex.

A A connectedconnected graph is one where every vertex is linked (by a single arc or graph is one where every vertex is linked (by a single arc or a sequence of arcs) to every other.a sequence of arcs) to every other.

A A subgraphsubgraph of a graph is another graph that can be seen within it of a graph is another graph that can be seen within it (i.e. another graph consisting of some of the original vertices and (i.e. another graph consisting of some of the original vertices and arcs).arcs).

Page 3: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Special GraphsSpecial Graphs The The complete graph Kcomplete graph Knn is a simple graph consisting of n vertices with is a simple graph consisting of n vertices with

each joined to each of the others by an edge. Each vertex in Keach joined to each of the others by an edge. Each vertex in Knn has has degree n – 1. degree n – 1.

The The complete bi-partite graph Kcomplete bi-partite graph Km,nm,n consists of two groups of vertices, consists of two groups of vertices, illustrated with m vertices in one group and n in the other. Each of the m illustrated with m vertices in one group and n in the other. Each of the m vertices is joined to each of the n vertices.vertices is joined to each of the n vertices.

A connected graph with n vertices and n-1 arcs is called a A connected graph with n vertices and n-1 arcs is called a treetree..

Page 4: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Paths and cyclesPaths and cycles A walk is a sequence of edges such that the end node of one edge in A walk is a sequence of edges such that the end node of one edge in

the sequence is the start node of the next edge in the sequence.the sequence is the start node of the next edge in the sequence.

A trail is a walk such that no edge is included more than once (in A trail is a walk such that no edge is included more than once (in either direction).either direction).

A path is a trail such that no vertex is visited more than once (except A path is a trail such that no vertex is visited more than once (except that the first vertex may be the same as the last).that the first vertex may be the same as the last).

A walk, trail or path is closed if the first vertex is the same as the A walk, trail or path is closed if the first vertex is the same as the last. A cycle (or circuit) is a closed path. If a cycle visits every node last. A cycle (or circuit) is a closed path. If a cycle visits every node in the graph it is known as a Hamiltonian cycle.in the graph it is known as a Hamiltonian cycle.

Page 5: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Eulerian and semi-Eulerian graphsEulerian and semi-Eulerian graphs A trail that uses all the edges of a graph is called a A trail that uses all the edges of a graph is called a Eulerian trailEulerian trail. .

If a graph possesses a closed Eulerian trail, then the graph itself is called If a graph possesses a closed Eulerian trail, then the graph itself is called Eulerian Eulerian (i.e. a graph is called Eulerian if it is possible to start at a node, (i.e. a graph is called Eulerian if it is possible to start at a node, traverse each arc exactly once and end up where you started). This is traverse each arc exactly once and end up where you started). This is possible if and only if every node has possible if and only if every node has even ordereven order..

If a graph possesses an Eulerian trail that is not closed, the graph is If a graph possesses an Eulerian trail that is not closed, the graph is called semi-Eulerian (i.e. a graph is semi-Eulerian if it’s possible to start at called semi-Eulerian (i.e. a graph is semi-Eulerian if it’s possible to start at a node, traverse each arc exactly once and end up somewhere different a node, traverse each arc exactly once and end up somewhere different to the starting point). This is possible if and only if the graph has to the starting point). This is possible if and only if the graph has exactly exactly two odd nodestwo odd nodes..

Page 6: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

ResultResult In any graph, In any graph,

the sum of all the degrees = 2 × no. of edgesthe sum of all the degrees = 2 × no. of edges..

[By adding up all the degrees you are in effect counting all the [By adding up all the degrees you are in effect counting all the ends of the edges. Since each edge has 2 ends, the total number ends of the edges. Since each edge has 2 ends, the total number of ends will be twice the number of edges]. of ends will be twice the number of edges].

Page 7: Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins

Planar GraphsPlanar Graphs A graph is called A graph is called planarplanar if it can be drawn in the plane if it can be drawn in the plane

with no two edges crossing (except at a node).with no two edges crossing (except at a node).

Euler’s theoremEuler’s theoremFor any connected graph drawn in the plane with R For any connected graph drawn in the plane with R

regions, N nodes and A arcs:regions, N nodes and A arcs:R + N = A + 2R + N = A + 2