SlideShare una empresa de Scribd logo
1 de 8
Hamiltonian Graphs


The above discussion of Eulerian graphs emphasized edges; have we concentrate on visiting
vertices. A Hamiltonian circuit in a graph G, named after the nineteenth-century Irish
mathematician William Hamilton (1805-1865), is a closed path that visits every vertex in G exactl
once. (Such a closed path must be a cycle.) If G does admit a Hamilton circuit, then G is called a
Hamiltanian graph. Note that an Eulerian circuit traverses every edge exactly once, but may
repeat vertices, while a Hamiltonian circuit visits each vertex exactly once but may repeat edges.
Figure 1-11 gives an example of a graph which is Hamiltonian but not Eulerian, and vice versa.




Although it is clear that only connected graphs can be Hamiltonian, there is no simple criterion to
tell us whether or not a graph is Hamiltonian as there is for Eulerian graphs. We do have the
following sufficient condition which is due to G. A. Dirac.

Theorem

Let G be a connected graph with n vertices. Then G is Hamiltonian if n > 3 and n < deg (v) for
each vertex v in G.

Bipartite Graphs

A graph G is said to be bipartite if its vertices V can be partitioned into two subsets M and N such
that each edge of G connects avertex of M to a vertex of N. By a complete bipartite graph, we
mean that each vertex of M isconnected toeach vertex of N; this graph is denoted by Km,n where
m is the number [ices inM andn is thenumber of vertices in N, and, for standardization, we will
assume m < n. Figure : shows the graphs K2,3, K3,3, and K2,4, Clearly the graph Km„ hasmn edges.
PLANAR GRAPHS

A graph or multigraph which can be drawn in the plane so that its edges do not cross is said to be
planar. Although the complete graph with four vertices K4 is usually pictured with crossing edges
as in Figure (a), it can also be drawn with noncrossing edges as in Figure (b); hence K4 is planar.
Tree graphs form an important class of planargraphs. This section introduces our reader to these
graphs.




Weighted Graph
  A graph is a weighted graph if an amount is assigned to every edge. Such weights may
symbolize costs, lengths or capacities, etc.The weight of the graph is the amount of the
weights given to all vertices.




Example

Example of the weighted graph is as follows,

1)What is the weight for AB in the above weighted graph figure?

Solution
The weight of AB is 12.

2)Find out the weight for ABC from the above figure.

Solution

  The weight of ABC is AB+BC

  AB= 12 and BC=3.

  So the weight of ABC is 12+3=15

  15 is the weight of ABC.

3)Find the weight of ABCD from the above weighted graph figure.

Solution

  The weight of ABCD is AB+BC+CD

  AB=12, BC=3 and CD=4

  So ABCD is 12+3+4

  The weight is 19.




Introduction
A network has points, connected by lines. In a graph, we have special names for these.
We call these points vertices (sometimes also called nodes), and the lines, edges.

Here is an example graph. The edges are red, the vertices, black.




In the graph, v1,v2,v3,v4 are vertices, and e1,e2,e3,e4,e5 are edges.
[edit] Definitions
There are several roughly equivalent definitions of a graph. Most commonly, a graph G
is defined as an ordered pair G = (V,E), where                      is called the graph's
vertex-set and                                                  is called the graph's
edge-set. Given a graph G, we often denote the vertex--set by V(G) and the edge--set by
E(G). To visualize a graph as described above, we draw n dots corresponding to vertices
             . Then, for all                   we draw a line between the dots
corresponding to vertices vi,vj if and only if there exists an edge              . Note
that the placement of the dots is generally unimportant; many different pictures can
represent the same graph.

Alternately, using the graph above as a guide, we can define a graph as an ordered triple
G = (V,E,f):

    •   a set of vertices, commonly called V
    •   a set of edges, commonly called E
    •   a relation                                 that maps to each edge a set of
        endpoints, known as the edge-endpoint relation. We say an edge          is
        incident to a vertex          iff           .

In the above example,

    •   V={v1, v2, v3, v4}
    •   E={e1, e2, e3, e4, e5}
    •   f such that e1 maps to {v1, v2}, e2 maps to {v1, v3}, e3 maps to {v1, v4}, e4 maps to
        {v2, v4}, and e5 maps to {v3, v4}.

If f is not injective — that is, if           such that                            — then we
say that G is a multigraph and we call any such edges              multiple edges.
Further, we call edges       such that | f(e) | = 1 loops. Graphs without multiple edges
or loops are known as simple graphs.

Graphs can, conceivably, be infinite as well, and thus we place no bounds on the sets V
and E. We will not look at infinite graphs here.

[edit] Directions, Weights, and Flows

We define a directed graph as a graph such that f maps into the set of ordered pairs
                       rather than into the family of two-element sets
                        . We can think of an edge         such that f(e) = (x,y) as 'pointing'
from x to y. As such we would say that x is the tail of edge e and that y is the head. This
is one of the vagaries of graph theory notation, though. We could just as easily think of x
as the head and y as the tail. To represent a directed graph, we can draw a picture as
described and shown above, but place arrows on every edge corresponding to its
direction.

In general, a weight on a graph G is some function                      .

A flow (G,c) is a directed graph G = (V,E,f) paired with a weight function such that the
weight "going into" any vertex is the same amount as the weight "going out" of that
vertex. To make this more formal, define sets

   •
   •

Then, formally stated, our requirement on the weight function is



[edit] Special Graphs




The complete graph on 6 vertices

Some graphs occur frequently enough in graph theory that they deserve special mention.
One such graphs is the complete graph on n vertices, often denoted by Kn. This graph
consists of n vertices, with each vertex connected to every other vertex, and every pair of
vertices joined by exactly one edge. Another such graph is the cycle graph on n vertices,
for n at least 3. This graph is denoted Cn and defined by V := {1,2,..,n} and E := {{1,2},
{2,3}, ..., {n-1,n},{n,1}}. Even easier is the null graph on n vertices, denoted Nn; it has n
vertices and no edges! Note that N1 = K1 and C3 = K3.

[edit] Some Terms

Two vertices are said to be adjacent if there is an edge joining them. The word incident
has two meanings:
•   An edge e is said to be incident to a vertex v if v is an endpoint of e.
    •   Two edges are also incident to each other if both are incident to the same vertex.

Two graphs G and H are said to be isomorphic if there is a one-to-one function from (or,
if you prefer, one-to-one correspondence between) the vertex set of G to the vertex set of
H such that two vertices in G are adjacent if and only if their images in H are adjacent.
(Technically, the multiplicity of the edges must also be preserved, but our definition
suffices for simple graphs.)

[edit] Subgraphs

A subgraph is a concept akin to the subset. A subgraph has a subset of the vertex set V, a
subset of the edge set E, and each edge's endpoints in the larger graph has the same edges
in the subgraph. A

A subgraph H of G is generated by the vertices {a,b,c,...}          if the edge set of H
consists of all edges in the edge set of G that joins the vertices in H = {a,b,c,...}.

File:Generated subgraph.jpg
Generated Subgraphs

A path is a sequence of edges < e1,...,eN > such that ei is adjacent to ei+1 for all i from 1 to
N-1. Two vertices are said to be connected if there is a path connecting them.




[edit] Trees and Bipartite Graphs
A tree is a graph that is (i) connected, and (ii) has no cycles. Equivalently, a tree is a
connected graph with exactly n - 1 edges, where there are n nodes in the tree.

A Bipartite graph is a graph whose nodes can be partitioned into two disjoint sets U and
W such that every edge in the graph is incident to one node in U and one node in W. A
tree is a bipartite graph.

A complete bipartite graph is a bipartite graph in which each node in U is connected to
every node in W; a complete bipartite graph in which U has n vertices and V has m
vertices is denoted Kn,m.

Adjacent,Incident,End Vertices

Self loops,Parallel edges,Degree of Vertex

Pendant Vertex : Vertex Degree one "Pendant Vertex" Isolated Vertex : Vertex Degree
zero "Isolated Vertex"
[edit] Hamiltonian and Eulerian Paths
Hamiltonian Cycles: A Hamiltonian Cycle received its name from Sir William Hamilton
who first studied the travelling salesman problem. A Hamiltonian cycle is a path that
visits every vertex once and only once i.e. it is a walk, in which no edge is repeated (a
trail) and therefore a trail in which no vertex is repeated (a path). Note also it is a cycle,
the last vertex is joined to the first.

A graph is said to be Eulerian if it is possible to traverse each edge once and only once,
i.e. it has no odd vertices or it has an even number of odd vertices (semi-Eulerian). This
has implications for the Königsberg problem. It may be easier to imagine this as if it is
possible to trace the edges of a graph with a pencil without lifting the pencil off the paper
or going over any lines.

[edit] Planar Graphs
A planar graph is an undirected graph that can be drawn on the plane or on a sphere in
such a way that no two edges cross, where an edge e = (u,v) is drawn as a continuous
curve (it need not be a straight line) from u to v.

Kuratowski proved a remarkable fact about planar graphs: A graph is planar if and only if
it does not contain a subgraph homeomorphic to K5 or to K3,3. (Two graphs are said to be
homeomorphic if we can shrink some components of each into single nodes and end up
with identical graphs. Informally, this means that non-planar-ness is caused by only two
things -- namely, having the structure of K5 or K3,3 within the graph).

[edit] Coloring Graphs

Each term, the Schedules Office in some university must assign a time slot for each final
exam. This is not easy, because some students are taking several classes with finals, and a
student can take only one test during a particular time slot. The Schedules Office wants to
avoid all conflicts, but to make the exam period as short as possible.

We can recast this scheduling problem as a question about coloring the vertices of a
graph. Create a vertex for each course with a final exam. Put an edge between two
vertices if some student is taking both courses. For example, the scheduling graph might
look like this: Next, identify each time slot with a color. For example, Monday morning
is red, Monday afternoon is blue, Tuesday morning is green, etc.

Assigning an exam to a time slot is now equivalent to coloring the corresponding vertex.
The main constraint is that adjacent vertices must get different colors; otherwise, some
student has two exams at the same time. Furthermore, in order to keep the exam period
short, we should try to color all the vertices using as few different colors as possible. For
our example graph, three colors suffice: red, green, blue.
The coloring corresponds to giving one final on Monday morning (red), two Monday
afternoon (blue), and two Tuesday morning (green).

[edit] K Coloring

Many other resource allocation problems boil down to coloring some graph. In general, a
graph G is kcolorable if each vertex can be assigned one of k colors so that adjacent
vertices get different colors. The smallest sufficient number of colors is called the
chromatic number of G. The chromatic number of a graph is generally difficult to
compute, but the following theorem provides an upper bound:

Theorem 1. A graph with maximum degree at most k is (k + 1)colorable.


Proof. We use induction on the number of vertices in the graph, which we denote by n.
Let P(n) be the proposition that an nvertex graph with maximum degree at most k is (k +
1)colorable. A 1 vertex graph has maximum degree 0 and is 1colorable, so P(1) is true.

Now assume that P(n) is true, and let G be an (n + 1)vertex graph with maximum degree
at most k. Remove a vertex v, leaving an nvertex graph G . The maximum degree of G is
at most k, and so G is (k + 1)colorable by our assumption P(n). Now add back vertex v.
We can assign v a color different from all adjacent vertices, since v has degree at most k
and k + 1 colors are available. Therefore, G is (k + 1)colorable. The theorem follows by
induction.

[edit] Weighted Graphs
A weighted graph associates a label (weight) with every edge in the graph. Weights are
usually real numbers, and often represent a "cost" associated with the edge, either in
terms of the entity that is being modeled, or an optimization problem that is being solved.

Más contenido relacionado

La actualidad más candente

On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
graphhoc
 
Lesson 13 algebraic curves
Lesson 13    algebraic curvesLesson 13    algebraic curves
Lesson 13 algebraic curves
Jean Leano
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
Victor Palmar
 

La actualidad más candente (20)

THREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRYTHREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRY
 
Lines and angles /GEOMETRY
Lines and angles /GEOMETRYLines and angles /GEOMETRY
Lines and angles /GEOMETRY
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
 
Graph algorithms
Graph algorithmsGraph algorithms
Graph algorithms
 
Three dimensional geometry
Three dimensional geometry Three dimensional geometry
Three dimensional geometry
 
INDEPENDENT AND CONNECTED DOMINATION NUMBER IN MIDDLE AND LINE GRAPHS
INDEPENDENT AND CONNECTED DOMINATION NUMBER IN MIDDLE AND LINE GRAPHSINDEPENDENT AND CONNECTED DOMINATION NUMBER IN MIDDLE AND LINE GRAPHS
INDEPENDENT AND CONNECTED DOMINATION NUMBER IN MIDDLE AND LINE GRAPHS
 
Lesson 13 algebraic curves
Lesson 13    algebraic curvesLesson 13    algebraic curves
Lesson 13 algebraic curves
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
Curve tracing
Curve tracingCurve tracing
Curve tracing
 
Graphs data Structure
Graphs data StructureGraphs data Structure
Graphs data Structure
 
COORDINATE GEOMETRY
COORDINATE GEOMETRYCOORDINATE GEOMETRY
COORDINATE GEOMETRY
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 
Types of graphs
Types of graphsTypes of graphs
Types of graphs
 
Polar Graphs: Limaçons, Roses, Lemniscates, & Cardioids
Polar Graphs: Limaçons, Roses, Lemniscates, & CardioidsPolar Graphs: Limaçons, Roses, Lemniscates, & Cardioids
Polar Graphs: Limaçons, Roses, Lemniscates, & Cardioids
 
Tracing of cartesian curve
Tracing of cartesian curveTracing of cartesian curve
Tracing of cartesian curve
 
Graph 01
Graph 01Graph 01
Graph 01
 
Line integral,Strokes and Green Theorem
Line integral,Strokes and Green TheoremLine integral,Strokes and Green Theorem
Line integral,Strokes and Green Theorem
 
Lines and angles
Lines and anglesLines and angles
Lines and angles
 

Destacado

Ddo8 Peter Anker Digital Dividend In Nl
Ddo8 Peter Anker   Digital Dividend In NlDdo8 Peter Anker   Digital Dividend In Nl
Ddo8 Peter Anker Digital Dividend In Nl
imec.archive
 
33720055
3372005533720055
33720055
dkr786
 
Intellectual property rights and entrepreneurship - UK Intellectual Property ...
Intellectual property rights and entrepreneurship - UK Intellectual Property ...Intellectual property rights and entrepreneurship - UK Intellectual Property ...
Intellectual property rights and entrepreneurship - UK Intellectual Property ...
imec.archive
 
Production Of Front Cover
Production Of Front CoverProduction Of Front Cover
Production Of Front Cover
guest03e64fb
 
Cost drivers for otr fleets newbrand1[1]
Cost drivers for otr fleets newbrand1[1]Cost drivers for otr fleets newbrand1[1]
Cost drivers for otr fleets newbrand1[1]
Rutger Gassner
 
Why drivers stay with fleets
Why drivers stay with fleetsWhy drivers stay with fleets
Why drivers stay with fleets
Rutger Gassner
 
Lucía folclore-galego
Lucía folclore-galegoLucía folclore-galego
Lucía folclore-galego
iesaguia
 
Brokerage 2007 presentation regulation
Brokerage 2007 presentation regulationBrokerage 2007 presentation regulation
Brokerage 2007 presentation regulation
imec.archive
 
Friday food 28/05 - Filip Simoens
Friday food 28/05 - Filip SimoensFriday food 28/05 - Filip Simoens
Friday food 28/05 - Filip Simoens
imec.archive
 

Destacado (20)

Ddo8 Peter Anker Digital Dividend In Nl
Ddo8 Peter Anker   Digital Dividend In NlDdo8 Peter Anker   Digital Dividend In Nl
Ddo8 Peter Anker Digital Dividend In Nl
 
Complementary trust: IDEF Registry and Kantara cross-attestation
Complementary trust: IDEF Registry and Kantara cross-attestationComplementary trust: IDEF Registry and Kantara cross-attestation
Complementary trust: IDEF Registry and Kantara cross-attestation
 
OASIS: open source and open standards: internet of things
OASIS: open source and open standards: internet of thingsOASIS: open source and open standards: internet of things
OASIS: open source and open standards: internet of things
 
Oasis cloud-law-ics-unofficial
Oasis cloud-law-ics-unofficialOasis cloud-law-ics-unofficial
Oasis cloud-law-ics-unofficial
 
Wordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob LarsenWordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob Larsen
 
Mobile National Days 2011 english
Mobile National Days 2011 englishMobile National Days 2011 english
Mobile National Days 2011 english
 
33720055
3372005533720055
33720055
 
Intellectual property rights and entrepreneurship - UK Intellectual Property ...
Intellectual property rights and entrepreneurship - UK Intellectual Property ...Intellectual property rights and entrepreneurship - UK Intellectual Property ...
Intellectual property rights and entrepreneurship - UK Intellectual Property ...
 
Production Of Front Cover
Production Of Front CoverProduction Of Front Cover
Production Of Front Cover
 
¿Cómo gestionar los Riesgos de la Innovación? Foro Cañada Blanch 2016
¿Cómo gestionar los Riesgos de la Innovación? Foro Cañada Blanch 2016¿Cómo gestionar los Riesgos de la Innovación? Foro Cañada Blanch 2016
¿Cómo gestionar los Riesgos de la Innovación? Foro Cañada Blanch 2016
 
Cost drivers for otr fleets newbrand1[1]
Cost drivers for otr fleets newbrand1[1]Cost drivers for otr fleets newbrand1[1]
Cost drivers for otr fleets newbrand1[1]
 
Administrative Cost Savings through Invoice Verifications
Administrative Cost Savings through Invoice VerificationsAdministrative Cost Savings through Invoice Verifications
Administrative Cost Savings through Invoice Verifications
 
Medición de la transferencia universitaria según los ranking internacionales
Medición de la transferencia universitaria según los ranking internacionalesMedición de la transferencia universitaria según los ranking internacionales
Medición de la transferencia universitaria según los ranking internacionales
 
Why drivers stay with fleets
Why drivers stay with fleetsWhy drivers stay with fleets
Why drivers stay with fleets
 
Q932+dfd reference fa lec
Q932+dfd reference fa lecQ932+dfd reference fa lec
Q932+dfd reference fa lec
 
Lucía folclore-galego
Lucía folclore-galegoLucía folclore-galego
Lucía folclore-galego
 
Beijing MoST standards + IPR conference Clark-OASIS-2011
Beijing MoST standards + IPR conference Clark-OASIS-2011Beijing MoST standards + IPR conference Clark-OASIS-2011
Beijing MoST standards + IPR conference Clark-OASIS-2011
 
Itep
ItepItep
Itep
 
Brokerage 2007 presentation regulation
Brokerage 2007 presentation regulationBrokerage 2007 presentation regulation
Brokerage 2007 presentation regulation
 
Friday food 28/05 - Filip Simoens
Friday food 28/05 - Filip SimoensFriday food 28/05 - Filip Simoens
Friday food 28/05 - Filip Simoens
 

Similar a Magtibay buk bind#2

1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
swapnilbs2728
 

Similar a Magtibay buk bind#2 (20)

Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
 
Graph
GraphGraph
Graph
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptx
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
FCS (graphs).pptx
FCS (graphs).pptxFCS (graphs).pptx
FCS (graphs).pptx
 
Graph ds
Graph dsGraph ds
Graph ds
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Graph-theory.ppt
Graph-theory.pptGraph-theory.ppt
Graph-theory.ppt
 
Graph.ppt
Graph.pptGraph.ppt
Graph.ppt
 

Más de Sofia Palawan

Más de Sofia Palawan (6)

Itnarrativereportformat
ItnarrativereportformatItnarrativereportformat
Itnarrativereportformat
 
Matrix print
Matrix printMatrix print
Matrix print
 
Resume kara crystal pascasio
Resume  kara crystal pascasioResume  kara crystal pascasio
Resume kara crystal pascasio
 
Resume sofia p.
Resume  sofia p.Resume  sofia p.
Resume sofia p.
 
Buwang wika
Buwang wikaBuwang wika
Buwang wika
 
GROUP5-SYLLABLES
GROUP5-SYLLABLESGROUP5-SYLLABLES
GROUP5-SYLLABLES
 

Magtibay buk bind#2

  • 1. Hamiltonian Graphs The above discussion of Eulerian graphs emphasized edges; have we concentrate on visiting vertices. A Hamiltonian circuit in a graph G, named after the nineteenth-century Irish mathematician William Hamilton (1805-1865), is a closed path that visits every vertex in G exactl once. (Such a closed path must be a cycle.) If G does admit a Hamilton circuit, then G is called a Hamiltanian graph. Note that an Eulerian circuit traverses every edge exactly once, but may repeat vertices, while a Hamiltonian circuit visits each vertex exactly once but may repeat edges. Figure 1-11 gives an example of a graph which is Hamiltonian but not Eulerian, and vice versa. Although it is clear that only connected graphs can be Hamiltonian, there is no simple criterion to tell us whether or not a graph is Hamiltonian as there is for Eulerian graphs. We do have the following sufficient condition which is due to G. A. Dirac. Theorem Let G be a connected graph with n vertices. Then G is Hamiltonian if n > 3 and n < deg (v) for each vertex v in G. Bipartite Graphs A graph G is said to be bipartite if its vertices V can be partitioned into two subsets M and N such that each edge of G connects avertex of M to a vertex of N. By a complete bipartite graph, we mean that each vertex of M isconnected toeach vertex of N; this graph is denoted by Km,n where m is the number [ices inM andn is thenumber of vertices in N, and, for standardization, we will assume m < n. Figure : shows the graphs K2,3, K3,3, and K2,4, Clearly the graph Km„ hasmn edges.
  • 2. PLANAR GRAPHS A graph or multigraph which can be drawn in the plane so that its edges do not cross is said to be planar. Although the complete graph with four vertices K4 is usually pictured with crossing edges as in Figure (a), it can also be drawn with noncrossing edges as in Figure (b); hence K4 is planar. Tree graphs form an important class of planargraphs. This section introduces our reader to these graphs. Weighted Graph A graph is a weighted graph if an amount is assigned to every edge. Such weights may symbolize costs, lengths or capacities, etc.The weight of the graph is the amount of the weights given to all vertices. Example Example of the weighted graph is as follows, 1)What is the weight for AB in the above weighted graph figure? Solution
  • 3. The weight of AB is 12. 2)Find out the weight for ABC from the above figure. Solution The weight of ABC is AB+BC AB= 12 and BC=3. So the weight of ABC is 12+3=15 15 is the weight of ABC. 3)Find the weight of ABCD from the above weighted graph figure. Solution The weight of ABCD is AB+BC+CD AB=12, BC=3 and CD=4 So ABCD is 12+3+4 The weight is 19. Introduction A network has points, connected by lines. In a graph, we have special names for these. We call these points vertices (sometimes also called nodes), and the lines, edges. Here is an example graph. The edges are red, the vertices, black. In the graph, v1,v2,v3,v4 are vertices, and e1,e2,e3,e4,e5 are edges.
  • 4. [edit] Definitions There are several roughly equivalent definitions of a graph. Most commonly, a graph G is defined as an ordered pair G = (V,E), where is called the graph's vertex-set and is called the graph's edge-set. Given a graph G, we often denote the vertex--set by V(G) and the edge--set by E(G). To visualize a graph as described above, we draw n dots corresponding to vertices . Then, for all we draw a line between the dots corresponding to vertices vi,vj if and only if there exists an edge . Note that the placement of the dots is generally unimportant; many different pictures can represent the same graph. Alternately, using the graph above as a guide, we can define a graph as an ordered triple G = (V,E,f): • a set of vertices, commonly called V • a set of edges, commonly called E • a relation that maps to each edge a set of endpoints, known as the edge-endpoint relation. We say an edge is incident to a vertex iff . In the above example, • V={v1, v2, v3, v4} • E={e1, e2, e3, e4, e5} • f such that e1 maps to {v1, v2}, e2 maps to {v1, v3}, e3 maps to {v1, v4}, e4 maps to {v2, v4}, and e5 maps to {v3, v4}. If f is not injective — that is, if such that — then we say that G is a multigraph and we call any such edges multiple edges. Further, we call edges such that | f(e) | = 1 loops. Graphs without multiple edges or loops are known as simple graphs. Graphs can, conceivably, be infinite as well, and thus we place no bounds on the sets V and E. We will not look at infinite graphs here. [edit] Directions, Weights, and Flows We define a directed graph as a graph such that f maps into the set of ordered pairs rather than into the family of two-element sets . We can think of an edge such that f(e) = (x,y) as 'pointing' from x to y. As such we would say that x is the tail of edge e and that y is the head. This is one of the vagaries of graph theory notation, though. We could just as easily think of x
  • 5. as the head and y as the tail. To represent a directed graph, we can draw a picture as described and shown above, but place arrows on every edge corresponding to its direction. In general, a weight on a graph G is some function . A flow (G,c) is a directed graph G = (V,E,f) paired with a weight function such that the weight "going into" any vertex is the same amount as the weight "going out" of that vertex. To make this more formal, define sets • • Then, formally stated, our requirement on the weight function is [edit] Special Graphs The complete graph on 6 vertices Some graphs occur frequently enough in graph theory that they deserve special mention. One such graphs is the complete graph on n vertices, often denoted by Kn. This graph consists of n vertices, with each vertex connected to every other vertex, and every pair of vertices joined by exactly one edge. Another such graph is the cycle graph on n vertices, for n at least 3. This graph is denoted Cn and defined by V := {1,2,..,n} and E := {{1,2}, {2,3}, ..., {n-1,n},{n,1}}. Even easier is the null graph on n vertices, denoted Nn; it has n vertices and no edges! Note that N1 = K1 and C3 = K3. [edit] Some Terms Two vertices are said to be adjacent if there is an edge joining them. The word incident has two meanings:
  • 6. An edge e is said to be incident to a vertex v if v is an endpoint of e. • Two edges are also incident to each other if both are incident to the same vertex. Two graphs G and H are said to be isomorphic if there is a one-to-one function from (or, if you prefer, one-to-one correspondence between) the vertex set of G to the vertex set of H such that two vertices in G are adjacent if and only if their images in H are adjacent. (Technically, the multiplicity of the edges must also be preserved, but our definition suffices for simple graphs.) [edit] Subgraphs A subgraph is a concept akin to the subset. A subgraph has a subset of the vertex set V, a subset of the edge set E, and each edge's endpoints in the larger graph has the same edges in the subgraph. A A subgraph H of G is generated by the vertices {a,b,c,...} if the edge set of H consists of all edges in the edge set of G that joins the vertices in H = {a,b,c,...}. File:Generated subgraph.jpg Generated Subgraphs A path is a sequence of edges < e1,...,eN > such that ei is adjacent to ei+1 for all i from 1 to N-1. Two vertices are said to be connected if there is a path connecting them. [edit] Trees and Bipartite Graphs A tree is a graph that is (i) connected, and (ii) has no cycles. Equivalently, a tree is a connected graph with exactly n - 1 edges, where there are n nodes in the tree. A Bipartite graph is a graph whose nodes can be partitioned into two disjoint sets U and W such that every edge in the graph is incident to one node in U and one node in W. A tree is a bipartite graph. A complete bipartite graph is a bipartite graph in which each node in U is connected to every node in W; a complete bipartite graph in which U has n vertices and V has m vertices is denoted Kn,m. Adjacent,Incident,End Vertices Self loops,Parallel edges,Degree of Vertex Pendant Vertex : Vertex Degree one "Pendant Vertex" Isolated Vertex : Vertex Degree zero "Isolated Vertex"
  • 7. [edit] Hamiltonian and Eulerian Paths Hamiltonian Cycles: A Hamiltonian Cycle received its name from Sir William Hamilton who first studied the travelling salesman problem. A Hamiltonian cycle is a path that visits every vertex once and only once i.e. it is a walk, in which no edge is repeated (a trail) and therefore a trail in which no vertex is repeated (a path). Note also it is a cycle, the last vertex is joined to the first. A graph is said to be Eulerian if it is possible to traverse each edge once and only once, i.e. it has no odd vertices or it has an even number of odd vertices (semi-Eulerian). This has implications for the Königsberg problem. It may be easier to imagine this as if it is possible to trace the edges of a graph with a pencil without lifting the pencil off the paper or going over any lines. [edit] Planar Graphs A planar graph is an undirected graph that can be drawn on the plane or on a sphere in such a way that no two edges cross, where an edge e = (u,v) is drawn as a continuous curve (it need not be a straight line) from u to v. Kuratowski proved a remarkable fact about planar graphs: A graph is planar if and only if it does not contain a subgraph homeomorphic to K5 or to K3,3. (Two graphs are said to be homeomorphic if we can shrink some components of each into single nodes and end up with identical graphs. Informally, this means that non-planar-ness is caused by only two things -- namely, having the structure of K5 or K3,3 within the graph). [edit] Coloring Graphs Each term, the Schedules Office in some university must assign a time slot for each final exam. This is not easy, because some students are taking several classes with finals, and a student can take only one test during a particular time slot. The Schedules Office wants to avoid all conflicts, but to make the exam period as short as possible. We can recast this scheduling problem as a question about coloring the vertices of a graph. Create a vertex for each course with a final exam. Put an edge between two vertices if some student is taking both courses. For example, the scheduling graph might look like this: Next, identify each time slot with a color. For example, Monday morning is red, Monday afternoon is blue, Tuesday morning is green, etc. Assigning an exam to a time slot is now equivalent to coloring the corresponding vertex. The main constraint is that adjacent vertices must get different colors; otherwise, some student has two exams at the same time. Furthermore, in order to keep the exam period short, we should try to color all the vertices using as few different colors as possible. For our example graph, three colors suffice: red, green, blue.
  • 8. The coloring corresponds to giving one final on Monday morning (red), two Monday afternoon (blue), and two Tuesday morning (green). [edit] K Coloring Many other resource allocation problems boil down to coloring some graph. In general, a graph G is kcolorable if each vertex can be assigned one of k colors so that adjacent vertices get different colors. The smallest sufficient number of colors is called the chromatic number of G. The chromatic number of a graph is generally difficult to compute, but the following theorem provides an upper bound: Theorem 1. A graph with maximum degree at most k is (k + 1)colorable. Proof. We use induction on the number of vertices in the graph, which we denote by n. Let P(n) be the proposition that an nvertex graph with maximum degree at most k is (k + 1)colorable. A 1 vertex graph has maximum degree 0 and is 1colorable, so P(1) is true. Now assume that P(n) is true, and let G be an (n + 1)vertex graph with maximum degree at most k. Remove a vertex v, leaving an nvertex graph G . The maximum degree of G is at most k, and so G is (k + 1)colorable by our assumption P(n). Now add back vertex v. We can assign v a color different from all adjacent vertices, since v has degree at most k and k + 1 colors are available. Therefore, G is (k + 1)colorable. The theorem follows by induction. [edit] Weighted Graphs A weighted graph associates a label (weight) with every edge in the graph. Weights are usually real numbers, and often represent a "cost" associated with the edge, either in terms of the entity that is being modeled, or an optimization problem that is being solved.