On Determining the Hamiltonicity of a graph from its all-pair-shortest-path matrix Shekh Ahammed Adnan Bashir Department of Computer Science and Engineering.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Coloring Warm-Up. A graph is 2-colorable iff it has no odd length cycles 1: If G has an odd-length cycle then G is not 2- colorable Proof: Let v 0, …,
NP-Hard Nattee Niparnan.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
Chapter 8, Part I Graph Algorithms.
Discussion #34 1/17 Discussion #34 Warshall’s and Floyd’s Algorithms.
9.2 The Traveling Salesman Problem. Let us return to the question of finding a cheapest possible cycle through all the given towns: We have n towns (points)
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Introduction to Computability Theory
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
25.All-Pairs Shortest Paths Hsu, Lih-Hsing. Computer Theory Lab. Chapter 25P.2.
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
Low Density Parity Check Codes LDPC ( Low Density Parity Check ) codes are a class of linear bock code. The term “Low Density” refers to the characteristic.
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
Graphs & Graph Algorithms 2 Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
The Shortest Path Problem
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.
Physical Mapping of DNA Shanna Terry March 2, 2004.
Chapter 6.7 Determinants. In this chapter all matrices are square; for example: 1x1 (what is a 1x1 matrix, in fact?), 2x2, 3x3 Our goal is to introduce.
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,
10.4 How to Find a Perfect Matching We have a condition for the existence of a perfect matching in a graph that is necessary and sufficient. Does this.
Generalized Derangement Graphs Hannah Jackson.  If P is a set, the bijection f: P  P is a permutation of P.  Permutations can be written in cycle notation.
Graph Algorithms Mathematical Structures for Computer Science Chapter 6 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesGraph Algorithms.
Data Structures Week 9 Introduction to Graphs Consider the following problem. A river with an island and bridges. The problem is to see if there is a way.
An Improved Degree Based Condition for Hamiltonian Cycles November 22, 2005 November 22, 2005.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
NP-Complete problems.
Graphs & Matrices Todd Cromedy & Bruce Nicometo March 30, 2004.
Shortest Path Based Sufficiency Condition for Hamiltonian Graphs
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
LIMITATIONS OF ALGORITHM POWER
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
David Stotts Computer Science Department UNC Chapel Hill.
Introduction to NP Instructor: Neelima Gupta 1.
Graph Theory Def: A graph is a set of vertices and edges G={V,E} Ex. V = {a,b,c,d,e} E = {ab,bd,ad,ed,ce,cd} Note: above is a purely mathematical definition.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
(CSC 102) Lecture 30 Discrete Structures. Graphs.
More NP-complete Problems
CSNB 143 Discrete Mathematical Structures
Mathematical Structures for Computer Science Chapter 6
Discrete Maths 9. Graphs Objective
Network Science: A Short Introduction i3 Workshop
Analysis and design of algorithm
Graphs & Graph Algorithms 2
Graph Theory.
Lecture 13 CSE 331 Oct 1, 2012.
Graph Operations And Representation
Chapter 11 Limitations of Algorithm Power
Lecture 12 CSE 331 Sep 26, 2011.
Lecture 11 CSE 331 Sep 21, 2017.
Lecture 12 CSE 331 Sep 22, 2014.
Lecture 11 CSE 331 Sep 22, 2016.
A Few Sample Reductions
Instructor: Aaron Roth
Algorithms CSCI 235, Spring 2019 Lecture 32 Graphs I
Presentation transcript:

On Determining the Hamiltonicity of a graph from its all-pair-shortest-path matrix Shekh Ahammed Adnan Bashir Department of Computer Science and Engineering (CSE), BUET Problem Specification We are given the all-pair-shortest-path matrix of a graph. We have to determine whether the graph is Hamiltonian or not without constructing the graph. For instance, we are given the all-pair-shortest-path matrix of a graph, S = By observing the number of 1’s and maximum entries of each row of S, we can assume that this is the all-pair-shortest-path matrix of a Hamiltonian graph. Then we can construct the graph and if the graph is 2-connected or not. If it is 2-connected, then the graph is Hamiltonian one Figure: Graph of the all-pair-shortest-path matrix S. A Hamiltonian cycle in this graph is Approach We have studied the structure of some known Hamiltonian graphs. We tried to find all the possible entries in the all-pair-shortest-path matrix of those Hamiltonian graph. We have yet been successful to find all possible entries in the all-pair-shortest-path matrix in the graphs proved to be Hamiltonian by Jackson [1]. Result We have found that the all-pair-shortest-path matrix of a graph proved to be Hamiltonian by Jackson [1], contains exactly k number of 1’s in each row, diagonal elements are 0, rest of the entries of each row do not exceed 5 and, n is the number of nodes So for if it is given only the all-pair-shortest-path matrix of a graph and it has one 0 in each row as diagonal element, exactly k number of 1’s in each row, and rest of the entries of the graph do not exceed 5 then we can assume the graph to be Hamiltonian. To be sure we construct the graph and check if the graph is 2-connected or not. We look at two examples. In the first example, we are given the all-pair-shortest-path matrix of a graph. In that matrix, the maximum entry in any row is 4. In the second example, we are given the all-pair-shortest-path matrix of a graph with no entry greater than 5 in any row S 1 = We note that, in the all-pair-shortest-path matrix S 1, there are only one 0 as diagonal elements, exactly 4 1’s in each row, and no entry in any row exceeds 4, and this is the all-pair-shortest- path matrix of a graph on 12 nodes and 4 = 12 / 3. So by our result, we can assume that this is the all-pair-shortest-path matrix of a Hamiltonian graph if it is of a 2-connected graph. Now to find whether the graph is 2-connected or not we construct the graph. If we find the graph to be 2-connected, then the graph is Hamiltonian Figure: Graph constructed from the all-pair shortest-path-matrix S 1 We note that the graph above is 2-connected. So S 1 is the all-pair-shortest-path matrix of a Hamiltonian graph. We consider that, G = (V, E) is a k-regular, 2-connected graph where, |V| = n and k is greater that of equal to n/3. Such a graph is Hamiltonian graph [1]. When k < n/2, two cases might arise when finding the shortest path from a certain node of G, v i to v j. To discuss this we consider two subset V i and V j of V, which respectively contains the nodes adjacent to v i and v j. We further consider that, V i and V j are non-intersecting. Now, we define a set V rest = V – V i - V j - {v i } – {v j }. We note that, |V rest | is less than or equal to k-2. Because by hypothesis, |V i | = |V j | = k. To reach from v i to v j at least one node from V rest must be used. Case 1: There exists at least one node in V rest adjacent to at least one of nodes from both of V i and V j. At this case the maximum length of the shortest path from v i to v j is 4. Case 2: There does not exist at least one node in V rest adjacent to at least one of nodes from both of V i and V j. At this case all nodes in V rest are adjacent either to nodes in V i and V rest or to nodes in V j and V rest. Since the graph is connected, v j is reachable from v i and hence in this case the maximum length of the shortest path is 5. Example of the maximum length of the shortest path is 4 Example of the maximum length of the shortest path is 5 We now look at a 6-regular, 2-connected graph with 18 nodes. Since 6 = 18 / 3, this graph is a Hamiltonian graph [1] Reference 1. Jackson B., Hamiltonian cycles in regular 2-connected graph, Journal of Combinatorial Theory, Series B 29, (1980) Discussion of the maximum shortest path length being 4 and 5 Figure: 6-regular, 2-connected Hamiltonian graph with maximum length of the shortest path 5