Linear Structure of Bipartite Permutation Graphs and the Longest Path Problem

Linear Structure of Bipartite Permutation Graphs and the Longest Path Problem

Linear Structure of Bipartite Permutation Graphs and the Longest Path Problem Ryuhei Uehara ∗ School of Information Science, JAIST, Ishikawa 923-1292, Japan Gabriel Valiente 1 Department of Software, Technical University of Catalonia, E-08034 Barcelona Abstract The class of bipartite permutation graphs is the intersection of two well known graph classes: bipartite graphs and permutation graphs. A complete bipartite decomposi- tion of a bipartite permutation graph is proposed in this note. The decomposition gives a linear structure of bipartite permutation graphs, and it can be obtained in O(n) time, where n is the number of vertices. As an application of the decompo- sition, we show an O(n) time and space algorithm for finding a longest path in a bipartite permutation graph. Key words: Bipartite permutation graphs; Graph decomposition; Linear time algorithms. 1 Introduction A large number of graph classes have been recently proposed, and the com- plexity of hard problems over these graph classes has been thoroughly investi- gated [2,11], motivated by the fact that some hard problems become efficiently ∗ Corresponding author. Fax: +81-761-51-1149. Email addresses: [email protected] (Ryuhei Uehara), [email protected] (Gabriel Valiente). 1 Partially supported by Spanish CICYT project GRAMMARS (TIN2004-07925- C03-01) and by the Japan Society for the Promotion of Science through Long- term Invitation Fellowship L05511 for visiting JAIST (Japan Advanced Institute of Science and Technology). Preprint submitted to Information Processing Letters 29 December 2006 solvable when restricted to particular graph classes. This is a very common approach to solve realistic hard problems; for example, the class of interval graphs was first studied by a molecular biologist, and it turned out that many hard problems can be solved efficiently on these graphs [5, Chapter 8]. On the other hand, from the graph theoretic point of view, these algorithms reveal and make use of graph theoretical properties of the graph classes. In this note, we focus on the class of bipartite permutation graphs. A graph is a bipartite permutation graph if it is a bipartite graph and a permutation graph. This class was investigated by Spinrad, Brandst¨adt, and Stewart [12], and some applications were also investigated by Lai and Wei [8]. We first introduce a new notion of complete bipartite decomposition of a bi- partite permutation graph. Intuitively, a bipartite permutation graph can be decomposed into an alternating sequence of complete bipartite graphs and independent sets. In the decomposition, two complete bipartite graphs are joined only if they are consecutive. Hence this decomposition allows us to ap- ply dynamic programming techniques to problems on bipartite permutation graphs. The decomposition can be computed in O(n) time for any given bi- partite permutation graph, where n is the number of vertices. (We note that a bipartite permutation graph has a simple representation taking only O(n) space, and hence we assume that it is given in such a compact representation.) In [3], Brandst¨adtand Lozin gave a similar characterization of bipartite permu- tation graphs, which from a graph theoretic point of view is a sequence of chain graphs. Each chain graph can be obtained by merging two consecutive graphs (a complete bipartite graph and an independent set) in our decomposition. Hence our result also gives a linear time algorithm for their characterization. As an application of the decomposition, we give an O(n) time and space algo- rithm for finding a longest path in a bipartite permutation graph. The longest path problem is one of the most basic problems, and it seems to be harder than the Hamiltonian path problem. The main difficulty of the longest path problem compared to the Hamiltonian path problem is the difference between “all vertices” and “the maximum number of vertices.” For the Hamiltonian path problem, we try to join all vertices, and halt if it is impossible. On the other hand, for the longest path problem, we have to choose the best vertex in each case. The computation of the best choice is hard in general; even if we know that a given graph has a Hamiltonian path, it is impossible to find a path of length n − n for any > 0 in polynomial time unless P = NP [6]. It is well known that the Hamiltonian path problem is already hard; it is NP- complete for a chordal bipartite graph [10]. Hence there are few polynomial time algorithms for the longest path problem except on trees and some small graph classes [13]. For example, the complexity of the longest path problem for the class of biconvex graphs, which properly contains the class of bipar- 2 tite permutation graphs, is still open [13]. We show an O(n) time and space algorithm for finding a longest path in a bipartite permutation graph, which improves the previously known O(n + m) time and space algorithm [13]. 2 Preliminaries The neighborhood of a vertex v in a graph G = (V, E) is the set NG(v) = {u ∈ V | {u, v} ∈ E}, and the degree of a vertex v is |NG(v)| and it is denoted by degG(v). For a vertex subset U of V , we denote by NG(U) the set {v ∈ V | v ∈ N(u) for some u ∈ U}. If no confusion can arise we will omit the index G. A vertex set I is called independent set if G contains no edges between any pair of vertices in I. For a graph G = (V, E), a sequence of distinct vertices v1, v2, . , v` is a path, denoted by (v1, v2, . , v`), if {vj, vj+1} ∈ E for each 0 < j < `. The length of a path P is the number of vertices on the path, and it is denoted by |P |. In this note, we sometimes deal with a path P as a vertex set; hence we define the length of a path by the number of vertices, and |P | always denotes a number of vertices. The longest path problem is to find a path of maximum length. A graph G = (V, E) is bipartite if V can be partitioned into two sets X and Y such that every edge joins a vertex in X and another vertex in Y . A bipartite graph G = (X, Y, E) is said to be complete if each vertex in X is adjacent to all vertices in Y . A graph G = (V, E) with |V | = {v1, v2, . , vn} is said to be a permutation graph if there is a permutation σ over {1, 2, . , n} such that {vi, vj} ∈ E if and only if (i − j)(σ−1(i) − σ−1(j)) < 0. Intuitively, each vertex v in a permutation graph corresponds to a line `v joining two points on two parallel lines L1 and L2, which is called line representation. Then, two vertices v and u are adjacent if and only if the corresponding lines `v and `u are crossing. Vertex indices give the ordering of the points on L1, and the permutation of the indices gives the ordering of the points on L2. When a permutation graph is bipartite, it is said to be a bipartite permutation graph. Hereafter, we sometimes identify the vertex v and the corresponding line `v and denote it by v in the line representation. In this paper, a given bipartite graph is denoted by G = (X, Y, E), with nx = |X|, ny = |Y |, and n = nx + ny. Let G = (X, Y, E) be a bipartite permutation graph. Then, no line x in X in- 0 tersects any other line x in X. Hence, we order vertices x1, x2, . , xnx from left to right. We also order vertices y1, y2, . , yny from left to right. In this paper, we use the standard random-access machine (RAM) model of computation 3 Ly R z x L2 L1 x1 x2 xnx y1 y2 yny Fig. 1. A chain graph (see, e.g., [4]); each simple operation takes 1 time step, the time complexity is measured by the number of operations, and the space complexity is measured by the number of required memory cells. Especially, it stores and reads each datum in a memory cell in O(1) time and space, even if it requires O(log n) bits. Under the RAM model, a bipartite permutation graph G = (X, Y, E) can be represented in O(n) space by storing the vertex orderings on L1 and L2. We use two arrays L1 and L2, which correspond to the lines L1 and L2. For each i = 1, 2 and j = 1, 2, . , n, Li(j) stores (1) a flag that indicates if the endpoint belongs to X or to Y , (2) the index of the element in X or Y , and (3) the pointer to the other endpoint on L3−i. We sometimes say u < v on L1 if the endpoint of u on L1 is to the left of the endpoint of v. For a point p (not necessarily endpoint) on L1, we also make an abuse of notation and denote by u < p on L1 that the endpoint of u on L1 is to the left of point p. A bipartite graph G = (X, Y, E) is called chain graph if the vertices can be linearly ordered by inclusion; namely, N(x1) ⊆ N(x2) ⊆ · · · ⊆ N(xnx ) and N(yny ) ⊆ · · · ⊆ N(y2) ⊆ N(y1) [7,14]. It is known that any chain graph is a bipartite permutation graph, and its linear orderings over X and Y can be computed in O(n) time [13, Lemma 7] 2 . Lemma 1 Let G = (X, Y, E) be a connected chain graph with N(x1) ⊆ N(x2) ⊆ · · · ⊆ N(xnx ) and N(yny ) ⊆ · · · ⊆ N(y2) ⊆ N(y1).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us