next up previous
Next: About this document Up: My Home Page

Graphs

A graph is an ordered pair (V,E) where V is a set of vertices and E is a set of edges (i.e. pairs of vertices).

Graphs are important because many different structures can be modelled as graphs.

Example: A network of roads, with cities as vertices and roads between cities as edges.

Example: An electronic circuit, with junctions as vertices as components as edges.

We say that tex2html_wrap_inline263 are adjacent if tex2html_wrap_inline265 .

We say that tex2html_wrap_inline267 is incident with tex2html_wrap_inline269 if either e=(v,v') or e=(v',v), for some tex2html_wrap_inline275 .

The degree of tex2html_wrap_inline277 is the number of edges which are incident upon v.

Simple Properties of Graphs

Claim 1: The sum of all the degrees of all the vertices is twice the number of edges.

Proof: Each edge contributes 1 to the degree of two distinct vertices, hence the total degree must be 2m if there are m edges.

Claim 2: Any finite graph has an even number of vertices of odd degree.

Proof: Let tex2html_wrap_inline285 be the set of even degree vertices and tex2html_wrap_inline287 the set of odd degree vertices of G.

displaymath255

The sum of the degrees of the even degree vertices is even, as is 2m. An even number minus an even number is even. The only way odd numbers sum to even is if there are an even number of them.

Implication: An even number of people have an odd number of friends!

Drawings of Graphs

The same graph can be drawn many ways:

Two graphs are isomorphic if they are the same up to the renaming of vertices. This is equivalent to saying that the two graphs can have identical drawings.

tex2html_wrap_inline293 and tex2html_wrap_inline295 are isomorphic if there exists a bijection tex2html_wrap_inline297 such that for all tex2html_wrap_inline299 we have tex2html_wrap_inline301 iff tex2html_wrap_inline303 .

Paths and Cycles

Many interesting properties of graphs can be described in terms of paths and cycles.

A walk is any alternating seuqence of vertices and incident edges.

A path is a walk with distinct vertices.

A trail is a walk with distinct edges.

A walk is closed if it starts and ends on the same vertex.

A cycle is a closed walk with distinct vertices.

A circuit is a closed walk with distinct edges.

Eulerian Circuits

Can you draw this figure without lifting your pen from the paper, or tracing a edge more than once?

To do so, we need a circuit which includes every edge, called an Eulerian circuit.

A connected graph has an Eulerian circuit iff each vertex is of even degree.

Why must each vertex be of even degree? The circuit enters and leaves each vertex by distinct edges, and all edges are used!

Hamiltonian Circuits

Can you plot a route to visit each vertex exactly once before returning home?

A cycle which visits each vertex exactly once is called a Hamiltonian cycle.

There is no efficient way to test if a graph is Hamiltonian. It is an example of a problem which is provably hard for computers to do.

Planar Graphs

A graph is planar if it can be drawn without crossing edges.

The vertices of any planar graph can be colored with at most 4 colors such that each edge connects two different colored vertices.

This fact was finally proven in 1976 with the help of a computer.




next up previous
Next: About this document Up: My Home Page

Steve Skiena
Tue Aug 24 22:45:30 EDT 1999