Graphs

Embed Size (px)

Citation preview

TERM PAPER ON GRAPH THEORYTOPIC:TRAVERSABLE GRAPH , METHODS OF FINDING TRAVERSABLE GRAPH

SUBMITTED TO :Lect.Harmanjeet Kaur ED BY :1

SUBMITT

Jagdeep Kaur MCA R277B40

Name:Class:Roll no:-

INDEX1. Introduction 2. Acknowledgement 3. Traversable graph 4. Types of traversable graph 5. Euler & Hamilton paths 6. Euler paths & circuits 7. Necessary & sufficient condition of Euler path & circuits 8. Defination & properties 9.Constructing Eulerian paths &Cycles 10. Eulerian circuit & Eulerian trail 11. Hamiltonian cycles & Hamiltonian paths 12. Hamiltonian path 13. Hamiltonian path & circuit2

It is a matter of immense pleasure that we take this opportunity to express my heartfelt gratitude to my guide Miss Harmanjeet kaur , lecturer Lovely Professional University Phagwara for the invaluable ideas, assistance & encouragement that he provided during term paper. We also wish to express our thanks to him for his helpful reviews, comments & continual support on our studies. We shall always visualize his encouraging gesture, competent guidance , constant inspiration.

3

TRAVERSABLE: Let G be a connected graph with three vertex.. As we know that a graph G is said to be traversable if it can be drawn without any break in curve & without repeating of any edge.

4

TRAVERSABLE MULTIGRAPH:- Consider a multigraph G=(V,E).If a multigraph G consists of a path which include all vertices &whose edge list contains each edge of graph exactly once.Then the multigraph G is called a traversable multigraph. The sufficient & necessary condition for a multigraph to be traversable is that it should be connected & have either zero or two vertices of odd degree. The multigraph shown in fig.

TRAVERSABLE TRAIL:- As we know that a graph G is said to be a traversable trail if there is a path which includes all the vertices & uses each edge exactly once such a graph is called a traversable trail. {a,c},{a,d},{b,c},{b,d},{c,d}.

TRAVERSABLE TRAIL:- If the multigraph G consists of a path Which includes all vertices & whose edge list contains each edge of the graph exactly once.

5

INTRODUCTION:Can we travel along the edges of a graph starting at a vertex & returning to it by traversing each edge of the graph exactly once? Similarly ,we travel along the edge of a graph starting at a vertex of the graph exactly once?Although these question seem to be similar ,the first question ask whether a graph has an Euler circuit,can be easily answered simply by examining the degree of the vertices of the graph,while the second question,which asks whether a graph has a Hamilton circuit,is quite difficult to solve for most graphs.

6

The town of konigsberg ,Prussia was divided into four sections by the branches of the Pregel river.These four sections included of the two regions on the bank of the Pregel,Kneiphof island,and the region between the two branches of the Pregel.In the eighteeth century seven bridges connected these regions. The townspeopletook long walks through town on Sundays.They wondered whether it was possible to start at some location in the town,travel across all the bridges without crossing any bridge twice,& return to the starting point.

7

8

DEFINATION:An Eulerian path, Eulerian trail or Euler walk in an undirected graph is a path that uses each edge exactly once. If such a path exists, the graph is called traversable. An Eulerian cycle, Eulerian circuit or Euler tour in an undirected graph is a cycle that uses each edge exactly once. If such a cycle exists, the graph is called Eulerian or unicursal. The cycle starts and ends at the same vertex. For directed graphs path has to be replaced with directed path and cycle with directed cycle. The definition and properties of Eulerian paths, cycles and graphs are valid for multigraphs as well.

Properties

A connected undirected graph is Eulerian if every graph vertex has an even degree. An undirected graph is Eulerian if it is connected and can be decomposed into edge-disjoint cycles.9

If an undirected graph G is Eulerian then its line graph L(G) is Eulerian too. A directed graph is Eulerian if it is connected and every vertex has equal in degree and out degree. A directed graph is Eulerian if it is connected and can be decomposed into edge-disjoint directed cycles. An undirected graph is traversable if it is connected and at most two vertices in the graph are of odd degree.

Constructing Eulerian paths and cyclesConsider a graph known to have all edges in the same component and at most two vertices of odd degree. We can construct an Eulerian path (not a cycle) out of this graph by using Fleury's algorithm, which dates to 1883. We start with a vertex of odd degreeif the graph has none, then start with any vertex. At each step we move across an edge whose deletion would not disconnect the graph, unless we have no choice, then we delete that edge. At the end of the algorithm there are no edges left, and the sequence of edges we moved across forms an Eulerian cycle if the graph has no vertices of odd degree or an Eulerian path if there are two vertices of odd degree.

Eulerian circuit and Eulerian trail

10

An Eulerian trail (pronounciation: "oy-LEHR-ee-un") is a trail that visits every edge of the graph once and only once. It can end on a vertex different from the one on which it began. An Eulerian trail AFBCDECFDAB An Eulerian circuit is an Eulerian trail that is a circuit. That is, it begins and ends on the same vertex. An Eulerian circuit AFBCDECFDA

A graph is called Eulerian when it contains an Eulerian circuit. Eulerian circuits are named for the eighteenth-century Swiss mathematician Leonhard Euler who proposed the question from which graph theory originates. Usally a multigraph is used to explore this famous Bridges of Knigsberg Problem. Euler proved a theorem that says a graph is Eulerian if and only if each of its vertices has even degree

Hamiltonian cycles and Hamiltonian paths

11

A Hamiltonian path is a path that visits every vertex once and only once, except that it might (or might not) begin and end at the same vertex.

Hamiltonian path

A Hamiltonian cycle is a Hamiltonian path that begins and ends on the same vertex and visits all the other vertices in the graph exactly once. A Hamiltonian cycle does not necessarily traverse every edge in the graph.

Hamiltonian cycle

A graph is called Hamiltonian if it contains a Hamiltonian cycle. The term Hamiltonian is derived from the name of the Irish mathematician William Rowan Hamilton who designed and marketed a puzzle whose solution essentially required finding a Hamiltonian cycle in a graph. On the surface, a Hamiltonian cycle may seem to be very much like an Eulerian circuit, but they are actually quite different. A graph that has an Eulerian circuit may or may not also contain a Hamiltonian cycle, and vice versa. One well-known problem involving Hamiltonian cycles is the problem of finding a minimal Hamiltonian cycle in a weighted12

graph. this problem is also known as the Traveling Salesperson Problem or TSP because a solution to this problem answers a question commonly asked by traveling salespeople: What is the most efficient route that I can take to visit all of my clients

A Hamiltonian cycle in a dodecahedron. Like all platonic solids, the dodecahedron is Hamiltonian. A Hamiltonian path (black) over a graph (blue). In the mathematical field of graph theory, a Hamiltonian path is a path in an undirected graph which visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a cycle in an undirected graph which visits each vertex exactly once and also returns to the starting vertex. Determining whether such paths and cycles exist in graphs is the Hamiltonian path problem which is NP-complete.Hamiltonian paths and cycles are named after13

William Rowan Hamilton who invented the Icosian Game, now also known as Hamilton's puzzle, which involves finding a Hamiltonian cycle in the edge graph of the dodecahedron. Hamilton solved this problem using the Icosian Calculus, an algebraic structure based on roots of unity with many similarities to the quaternions (also invented by Hamilton). Unfortunately, this solution does not generalize to arbitrary graphs.

HAMILTONIAN PATH:A Hamilton path through a graph is a path whose vertex list contain each vertex of the graph exactly at once,except if path is a circuit. HAMILTONIAN CIRCUIT:A Hamiltonian circuit is a path in which the initial vertex appears a second time as the terminal vertex. HAMILTONIAN GRAPH:A Hamiltonian graph is a graph that posseses a hamiltonian path. A Hamiltonian path uses each vertex exactly once but edges may not be included.

14