Hamiltonian Cycles and paths

Slides:



Advertisements
Similar presentations
Weighted Matching-Algorithms, Hamiltonian Cycles and TSP
Advertisements

Graphs and Finding your way in the wilderness
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Hamiltonian Cycles and paths Bin Zhou. Definitions Hamiltonian cycle (HC): is a cycle which passes once and exactly once through every vertex of G (G.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
The Theory of NP-Completeness
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
SubSea: An Efficient Heuristic Algorithm for Subgraph Isomorphism Vladimir Lipets Ben-Gurion University of the Negev Joint work with Prof. Ehud Gudes.
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
GRAPH Learning Outcomes Students should be able to:
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
Graphs Rosen, Chapter 8. Isomorphism (Rosen 560 to 563) Are two graphs G1 and G2 of equal form? That is, could I rename the vertices of G1 such that the.
An Improved Degree Based Condition for Hamiltonian Cycles November 22, 2005 November 22, 2005.
Hamiltonian Graphs By: Matt Connor Fall 2013.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
More Computational Complexity Shirley Moore CS4390/5390 Fall August 29,
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
Data Structures & Algorithms Graphs
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Hamiltonian Cycles Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
NPC.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
David Stotts Computer Science Department UNC Chapel Hill.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
The Theory of NP-Completeness
Limitation of Computation Power – P, NP, and NP-complete
Complexity Classes.
NP-completeness Ch.34.
EECS 203 Lecture 19 Graphs.
Euler and Hamiltonian Graphs
Data Structures Graphs - Terminology
CSC 172 DATA STRUCTURES.
Richard Anderson Lecture 26 NP-Completeness
Euler and Hamiltonian Graphs
Finding a Path With Largest Smallest Edge
Richard Anderson Lecture 26 NP-Completeness
Graphs Rosen, Chapter 8.
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
EECS 203 Lecture 20 More Graphs.
Discrete Maths 9. Graphs Objective
CSC 172 DATA STRUCTURES.
ICS 353: Design and Analysis of Algorithms
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graph Theory.
Richard Anderson Lecture 25 NP-Completeness
Graphs.
Hamiltonian Circuits and Paths
Hamiltonian Cycles.
Euler and Hamiltonian Graphs
The Theory of NP-Completeness
Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,
CSC 380: Design and Analysis of Algorithms
Warm Up – Tuesday Find the critical times for each vertex.
Hamiltonicity below Dirac’s condition
Concepts of Computation
Presentation transcript:

Hamiltonian Cycles and paths Bin Zhou

Definitions Hamiltonian cycle (HC): is a cycle which passes once and exactly once through every vertex of G (G can be digraph). Hamiltonian path: is a path which passes once and exactly once through every vertex of G (G can be digraph). A graph is Hamiltonian iff a Hamiltonian cycle (HC) exists.

History Invented by Sir William Rowan Hamilton in 1859 as a game Since 1936, some progress have been made Such as sufficient and necessary conditions be given

History G.A. Dirac, 1952, If G is a simple graph with n(>=3) vertices, and if the degree of each is at least 1/2n, then G is Hamiltonian O.Ore , 1960 If G is a simple graph with n(>=3) vertices, and if the sum of the degrees of each pair of non-adjacent vertices is at least n, then G is Hamiltonian

History Bondy and Chvatal , 1976 For G to be Hamiltonian, it is necessary and sufficient that [G]n be Hamiltonian. ([G]n is gotten from G by adding edges joining non-adjacent vertices whose sum of degrees is equal to, or greater than n)

History Fraudee, Dould, Jacobsen, Schelp (1989) If G is a 2-connected graph such that for every pair of nonadjacent nodes u and v, |d(u)+d(v)|>=(2n-1)/3 then G is Hamiltonian

Application Hamiltonian cycles in fault random geometric network In a network, if Hamiltonian cycles exist, the fault tolerance is better.

Hamiltonian problem is NPC This is a well known NP complete problem For general graph, we can not find an exactly linear time complexity algorithm to find a Hamiltonian cycle or path

HC algorithms For general graphs, no efficient algorithm NP-complete for perfect graphs, planar bipartite graphs, grid graphs, 3-connected planar graphs For some special graphs, exist efficient algorithms. N. Ghiba, T. Nishizeki (1989) Polynomial algorithm for 4-connected planar graphs. G.Gutin (1997) Polynomial algorithm for quasi-transitive digraphs

Some Algorithms for HC L. Pósa (1976) Rotational transformation B. Bollobás, T.I.Fenner, and A. M. Frieze Cycle extension (HAM) (1987) Silvano Martello Algorithm 595 (1983)

Two classes of algorithms Heuristic algorithm Pósa, UHC, DHC, HAM, etc Backtrack algorithm 595HAM, KTC, MultiPath

Backtrack Algorithm Recurse(Path p, endpoint e) While (e has unvisited neighbors) { GetNewNode x; (add x node to P) PruneGraph. (Prune graph. If result graph does not permit a HC forming, remove x from P and continue) FormCycle (If P includes all nodes then try to form cycle. Fail, remove x and continue; Succ, return success) BackTrack: Recurse(P,x) } Return fail.

Backtrack Algorithm Search all the potential solutions Employ pruning of some kind to restrict the amount of researching Advantage: Find all solution, can decide HC exists or not Disadvantage Worst case, needs exponential time. Normally, take a long time

Heuristic Algorithm Form cycle. Try to find HC } Initialize path P While { Find new unvisited node. If found { Extend path P and pruning on the graph. If this choice does not permit HC, remove the extended node. } else Transform Path. Try all possible endpoints of this path Form cycle. Try to find HC }

Heuristic Algorithm Advantage: Fast. Linear or low-order polynomial time Disadvantage Maybe can not find the HC

Ham heuristic algorithm Try to extend existing path and never decrease the path length Do cycle extension Do rotational transformation

Ham algorithm Start from a random node and find a neighbor to get a path P. |P|=2 Do { Change partial path array A. oldlength=|P|. While |P|==oldlength { Find neighbors of P’s endpoints.Try to extend P. For (each neighbor) do { If Extendable Extend and continue; Else Do cycle extension or rotational transformation; } Check termination condition and change P } }}

Cycle Extention Path P: x1 xi xi+1 xk u Path P’: u xi x1 xk xi+1

Rotational transformation Path P: x1 xi xi+1 xk Path P’: xi x1 xi+1 xk

Results

Results

Results

Problems The program can not check large graph due to the memory restriction May be need more conditions to decide the probability of HC exists We can solve large problem using parallel computing