Linear-Time Transitive Orientation

Linear-Time Transitive Orientation

Linear-Time Transitive Orientation Ross M. McConnell* Jeremy P. Spinradt Abstract the algorithm fails to recognize whether a graph is a The transitive orientation problem is the problem of comparability graph. The algorithm is useful because assigning a direction to each edge of a graph so that the it makes it possible to solve a number combinatorial resulting digraph is transitive. A graph is a comparability problems on comparabibty graphs where recognition is graph if such an assignment is possible. We describe an not necessary. It either provides a certificate that its O(n + m) algorithm for the transitive orientation problem, answer to the problem is correct, or it demonstrates where n and m are the number of vertices and edges of the that the input graph is not a comparability graph. It graph; full details are given in [IS]. This gives linear time fails to recognize comparability graphs only because it bounds for maximum clique and minimum vertex coloring sometimes provides a solution and certificate even when on comparability graphs, recognition of two-dimensional the input graph is not a comparability graph. partial orders, permutation graphs, cointerval graphs, and A key element in some of these corollary results is triangulated comparability graphs, and other combinatorial that if G is a graph whose complement is a comparabil- problems on comparability graphs and their complements. ity graph, the algorithm can produce a linear extension of a transitive orientation of the complement of G in 1 Introduction time that is linear in the size of G, not in the size of the complement. Given any linear order R on the vertices of A partial order may be viewed as a transitive directed a graph G, we may find for any node II the number k of acyclic graph. A comparability graph is the graph predecessors in R that are adjacent in G. The number obtained by ignoring the edge directions of a transitive of predecessors of ‘u in R that are nonadjacent in G may directed acyclic graph; it gives the comparability rela- be found by subtracting k from the number of predeces- tion for a partial order. It is well known that every par- sors of v in R. Symmetric computations can be made tial order is the intersection of a set of total orders [8]. A for successors. These observations give the following: two-dimensional partial order is a partial order that is the intersection of two linear orders, and a permuta- PROPOSITION 1.1. If G is a comparability graph, then tion graph is the corresponding comparability graph. it takes O(n+m) time to find the number of predecessors If a is a permutation of a set V, the permutation graph and sz1ccessors of each vertez of G in a transitive corresponding to w is the graph on V where a pair of orientation of G. If G is a co-comparability graph, nodes is adjacent if and only if the relative order of the then it takes O(n + m) time to find the number of pair is inverted by the permutation. These classes of predecessors and successors of each vertez of G in a graphs and partial orders arise in many combinatorial transitive orientation of the complement of G. problems. For a survey, see [12, 191. The previous algorithms for transitive orientation The following are problems that may be solved in took O(na) [25], O(6m) [ll, 13, 221, or O(rz + mlogn) linear time using the decomposition algorithm. The time [17], where 6 is the maximum degree of any bounds are new, except in the case of interval graph vertex in the graph. Our algorithm produces a linear recognition. extension of the transitive orientation, that is, a total ordering of the nodes such that whenever b is a successor 1. Recognition of permutation graphs and two- of a in the ordering, (b, a) is not an edge in the dimensional partial orders: Recognition of par- transitive orientation. Like the O(n2> algorithm of [25], tial orders of dimension k, where k is greater than two, is NP complete [29]. Recognition of two- ‘Amherst college. Current address: Department of Com- dimensional partial orders clearly reduces to recog- puter Science, Willamcttc University, Salem, OR 97302 USA, rm- nition of permutation graphs. Previous O(n3) cconne~willamctte.edu. Supportedin part by the graduate school and O(n’) algorithms for the problems have been “Algoritbmische Diskrete Mathcmatik”, which is supported by the Deutscbe Forschungsgemeinschaft, grant WE 1265/2-l given [4, 22, 25, 241. We recognize permutation IDepartment of Computer Science, Vanderbilt University, graphs by finding two total orders, R and R’, whose Nashville, TN 37235 USA, [email protected] intersection is the partial order given by a transitive 19 20 orientation of G. We use the well-known character- graph is a co-comparability graph if its complement ization that G is a permutation graph iff G and its is a comparability graph. (As we have seen, exam- complement B are both transitively orientable 1221. ples of co-comparability graphs are interval graphs The rank of a node in R is one plus the number of and permutation graphs.) Find a linear extension its predecessors in a transitive orientation of G plus of a transitive orientation of the complement of G. the number of its predecessors in a transitive ori- Label each node 21 with the length of the longest entation of its complement, Reversing the linear path in this oriented complement that begins at v. extension of the transitive orientation of the com- To spend U(n+m) time, label nodes in order, start- plement and repeating the operation gives the rank ing at the end of the linear extension. When node i of each node in R’. A linear time bound follows is reached, put it in bucket Ic, where Ic is the length from Proposition 1.1. Verifying that the graph is of the longest path that begins at i in the transitive a permutation graph thus reduces to verifying that orientation of the complement. The bucket corre- the intersection of the computed orders R and R’ sponding to i is one plus the highest bucket num- is, in fact, the assumed transitive orientation of G, ber of it8 non-neighbor8 that are already in buckets. which is easily performed in time that is linear in This is found in time proportional to the number of the size of G. neighbors of i by marking the neighbors of i, then searching downwards through the buckets, starting 2. Recognition of cointerval graphs and interva1 at the highest nonempty bucket, for an unmarked graphs: A graph is an interval graph if it is the node. intersection graph of a set of intervals on the line. A cointerval graph is the complement of an interval 5. Recognition of triangulated comparabihty graph. The bound for interval graph recognition graphs [12]: A graph is SanguZated if every cy- was previously known [2], but our algorithm gives cle of size greater than three has a chord. Interval a novel approach. If the graph is a cointerval graph, graphs are an example. Triangulated comparability then we may find the number of predecessors and graphs are the class where G is both triangulated successors of each node in a transitive orientation and a comparability graph. To recognize triangu- of the graph, and if it is an interval graph, we may lated comparability graphs, use the linear proce- do the same thing for a transitive orientation of dure of [15], which assumes that a transitive orien- the complement, by Proposition 1.1. Ordering the tation is given. beginning points by number of predecessors and endpoints by successors, then interleaving these 6. Recognition of circular permutation two lists, gives a set of intervals that realize the graphs [23]: A circular permutation graph is graph. Verifying that the intervals realize the graph a graph where each vertex of G corresponds to a gives the recognition algorithm, and this is easily chord connecting two concentric circles, and where performed in time linear in the size of G. two vertices are adjacent in the graph if and only if the corresponding chords intersect each other. 3. Maximum clique and a minimum vertex Using our bounds for transitive orientation and coloring in a comparability graph. Suppose permutation-graph recognition, R. Sritharan has an orientation F of the edges of G is given by obtained linear bounds for recognition of circular our algorithm. It is an easy exercise to color permutation graphs [27]. each vertex according to the length of the longest directed path that begins at it in (V, F), using a 2 Modular Decomposition postorder operation during a depth-first search of Let V(G) denote the vertices of a graph G. If X C is ives a coloring of the nodes of the OW 1121.Th g V(G), then G]X denotes the subgraph of G induced by input graph such that no two adjacent nodes have X. Sets X and Y overlap if they intersect, but neither the same color. If G is a comparability graph, then contains the other. the longest path in the graph (V, F) is a clique of A module of an undirected graph G is a set X G because of the transitivity of F. That the sizes of vertices such that for any 1: E V(G) - X, either of the clique and the coloring are the same gives a every element of X is adjacent to z or no element of certificate of correctness. If the longest path is not X is adjacent to a.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 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