Counting edge crossings in a 2-layered drawing
Given a bipartite graph G=( V, W, E) with a bipartition { V, W} of a vertex set and an edge set E, a 2-layered drawing of G in the plane means that the vertices of V and W are respectively drawn as distinct points on two parallel lines and the edges as straight line segments. We consider the problem...
Saved in:
Published in | Information processing letters Vol. 91; no. 5; pp. 221 - 225 |
---|---|
Main Authors | , |
Format | Journal Article |
Language | English |
Published |
Amsterdam
Elsevier B.V
15.09.2004
Elsevier Science Elsevier Sequoia S.A |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | Given a bipartite graph
G=(
V,
W,
E) with a bipartition {
V,
W} of a vertex set and an edge set
E, a 2-layered drawing of
G in the plane means that the vertices of
V and
W are respectively drawn as distinct points on two parallel lines and the edges as straight line segments. We consider the problem of counting the number of edge crossings. In this paper, we design two algorithms to this problem based on the dynamic programming and divide-and-conquer approaches. These algorithms run in O(
n
1
n
2) time and O(
m) space and in O(min{
n
1
n
2,|
E|log(min{|
V|,|
W|})}) time and O(
m) space, respectively. Our algorithms outperform the previously fastest Θ(|
E|log(min{|
V|,|
W|})) time algorithm for dense graphs. |
---|---|
ISSN: | 0020-0190 1872-6119 |
DOI: | 10.1016/j.ipl.2004.05.001 |