Minimizing Edge-Crossings in a Graph by Minimizing the Total Edge Length Tristan M. Basa University of the Philippines Diliman, Quezon City Philippines +63-908-4194609

[email protected]

existing heuristics that are popularly used in this problem. Section 3 presents our heuristic in more detail, while section 4 shows some experimental results, and section 5 concludes this paper and suggests further directions of research.

ABSTRACT Minimizing edge-crossings in a graph is known to be an NPcomplete problem. In this paper, we present an approach that minimizes the number of potential crossings in a graph by minimizing the total length of edges in a graph. We show that given a general graph, by looking for a permutation of the vertices that results in the minimum total edge length, it minimizes the total edge-crossings in the graph as well. Our experimental results verify this heuristic to be effective..

2.

(1) improving the appearance of a graph drawing [3], (2) reducing the wiring congestion and crosstalk in VLSI circuits, which in turn may reduce the total wire length and the layout area [4].

Keywords Edge-crossings, minimization, heuristic, NP-complete.

1.

EXISTING HEURISTICS

The problem of minimizing the number of crossings in a specific graph has often been motivated by factors such as:

The performance of a heuristic can vary widely even on a single input graph, depending on the order in which the input is presented. This motivates us to define a presentation (of a graph G) as hG; ¼0; ¼1i, where ¼i is a permutation of Vi.

INTRODUCTION

We define the problem of edge crossing minimization as follows: given a graph G, find a permutation of vertices that minimizes the number of edge crossings in the corresponding drawing. This is important in certain applications dealing with designing chip layouts. Minimizing both area and edge-crossings are desirable. For example, a chip with a large number of crossings may have problems with capacitive coupling, i.e. interference between overlapping wires.

As any heuristic implicitly sequences the input when it reads data, the presentation captures essential information about any of the common ways of describing graph. If described as a list of neighbors for each V0 node, ¼0 describes the order of appearance of the V0 nodes while ¼1 is used to sort the adjacency lists. A list of edges is sorted using ¼0 as primary key and ¼1 as secondary key. Multiple randomly-generated presentations of a single graph G constitute an isomorphism class, an important class of experimental subjects. Quite conveniently, a presentation also yields an embedding of G: use ¼i to sequence the Vi nodes along y = i. Let C(hG; ¼0; ¼1i) denote its crossing number. The object of the crossing problem, then, is to compute the crossing number C(G) = min¼0;¼1 C(hG; ¼0; ¼1i).

The problem of edge crossing minimization in a graph layout is NP-complete [1]. As of now, no efficient heuristics are known in general graphs. It is worth noting that the heuristic proposed for such graphs may be applied to other important VLSI problems, such as the terminal assignments in channel routing problems. The number of edge crossings in a drawing of a graph G depends only on the order in which the vertices in the graph appear. Several heuristics have been considered for this problem. The median heuristic [2] is the only one for which an upper bound on the error is known, i.e., the number of crossings computed is at most three times the optimum, and was shown to perform the best in practice. The median heuristic proceeds as follows. For each vertex u in V choose y(u) to be a median of they coordinates of the neighbors of u, that is, if {v1, v2,...,vk} is the set of neighbors of u, with y(v1) ≤ y(v2) ≤ ...≤ y(vk), then y(u) = y(vm) where m = k/ 2. When two vertices map to the same location, they are arbitrarily separated by an infinitesimal amount.

Pushing this idea further, a heuristic h is a mapping from one graph presentation to another, that is h(hG; ¼0; ¼1i) = hG; ¼00 ; ¼01i and we can study its behavior statistically by looking at how a distribution on random hG; ¼0; ¼1i drawn from a class of presentations imposes a distribution on C(h(hG; ¼0; ¼1i)). Recent work at CBL y has focused on using distributions of C(h(hG0; ¼0; ¼1i)) where G0 is derived from G (or is identical to it) to characterize G and synthesize graph equivalence classes based on G for the evaluation of circuit partitioning and placement heuristics.

In this paper we present a new heuristic which takes into account the total length of edges in a graph. Section 2, we present some

1

A typical way to improve an initial ordering is to apply a heuristic for fixed layer crossing, alternating repeatedly from layer to layer. Each application of the fixed-layer heuristic is called a pass. While this is not the only possible paradigm for iterative improvement, it characterizes all three of the ones reported here, two popular previously-known heuristics and a new heuristic called adaptive insertion.

preserving the connectivity matrix in figure 2. Figure 3 is one such permutation.

The median heuristic treats the neighbors of each node as a set of integers representing their ordinal numbers on the opposite layer. Nodes are sorted using the medians of these sets as keys. Implementations of the median heuristic differ in how the median of a set of even cardinality is computed. Ordinarily, the median would be defined as the mean of the two middle elements. The median heuristic introduced and evaluated here always uses the smaller of the two candidates, but with the added condition that, in case of ties, nodes with odd degree always precede those of even degree [5]. Assuming random initial ordering and a stable sort,z the probability that the median heuristic embeds a simple path optimally is O(1=n). It embeds a simple cycle optimally every time.

Figure 1. A graph with 14 edge-crossings.

The barycenter heuristic uses the mean of the set of neighboring positions, rather than the median, as a key for sorting (the name comes from the fact that it is a one-dimensional analog of Tutte's barycenter method for drawing graphs [5]. With random initial ordering it performs poorly relative to the median on paths, cycles, and other very sparse highly-structured graphs (since these require decisive movement of degree-2 nodes). On graphs that are more random and/or have several nodes of high degree, barycenter does better than median (high-degree nodes need to be centrally located with respect to their neighbors). It has been observed that the barycenter heuristic does better than the median on random graphs of various sizes and densities. We come to the same conclusion. However, as discussed later, our implementation of the barycenter heuristic and our random graph model differ from theirs.

1

2

3

4

5

6

7

8

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

1

1

0

0

1

2

1

0

0

0

0

0

1

0

1

3

0

0

0

0

0

0

1

0

0

4

0

1

0

0

0

1

0

0

0

5

0

1

0

0

1

0

1

1

0

6

0

0

1

1

0

1

0

0

0

7

0

0

0

0

0

1

0

0

1

8

0

1

1

0

0

0

0

1

0

Figure 2. Connectivity matrix for the graph in figure 1.

Implementations allow median and barycenter to converge, that is, passes are done until no change occurs. Each pass of the median heuristic can be implemented in linear time (the keys used for sorting are integers in the range 0,…,n-1, while the barycenter requires O(m + n log n) per pass (m is the number of edges, n = n0 + n1, the number of nodes). For graphs with a constant degree bound, the barycenter heuristic can also be implemented in linear time per pass. Our experimental implementations of both median and barycenter used insertion sort, which may be the fastest method in practice because the number of inversions decreases significantly during each pass when multiple passes are done.

3.

0

METHODOLOGY

Given a graph G=(V,E), V as a set of vertices and E as the set of edges, we try to find an in-place permutation of the vertices such that the number of crossings created by the inclusion of the edges will be minimal. For example, the graph in figure 1 has 14 edgecrossings. We try to find a permutation for vertices in the graph in figure 1, such that the total length of the edges is minimum while

Figure 3. Corresponding graph with minimum edge-length.

2

We can see that the number of edge-crossings has dropped from 14 to 1 by minimizing the total length of the edges. Figure 4 shows the vertex permutation of the same graph with minimum number of edge-crossings which is zero.

Figure 5 shows the exponential growth of the running times of minimizing total edge length using list-all method. The y-axis is in terms of seconds and the x-axis correspond to the number of vertices.

Figure 5. Exponential growth Figure 4. Corresponding graph with minimum

5.

edge-crossings.

4.

EXPERIMENTS

For this experiment, for simplicity, we fix the number of vertices in the graphs (9 vertices), all with an average of 12 edgecrossings, and of different edge sets. Using a machine with a processor clocking at 3.01 GHz, and a memory of 1 Gigabyte, we tabulate the results in Table 1 which shows the average reduction in terms of edge-crossings between minimizing total edge lengths and directly minimizing edge-crossings.

In our experiments, we are always guaranteed to arrive at the minimum total edge length since we employed an exhaustive method that takes into consideration all possible permutations of vertices in the set of fixed points. However, as part of our ongoing research, if it can be proven that the problem of finding the minimum total edge length is NP-complete, then the use of it as heuristic to crossing number becomes pointless.

Table 1. Average edge-crossings on two approaches. Approach Minimizing Edge-Crossings Minimizing Total Edge Length

Ave. Edge-Crossings 0.16 1.43

6.

Table 2 shows the running times in terms of milliseconds on increasing number of vertices.

CONCLUSIONS

We have presented in this paper, a candidate heuristic for minimizing the number of edge-crossings in a graph. We have shown that by minimizing the total edge-length of a graph, we also minimize the number of edge-crossings.

Table 2. Running times on different number of vertices.

Number of Vertices 6 7 8 9 10 11 12

DISCUSSION

The intuitive reason why the heuristic works is similar to the reason why the median heuristic works. By minimizing the distance between vertices, we are minimizing the chance that another edge from another pair of vertices will cross it. In the case where vertices are mapped to a set of fixed point on a plane, finding the median translates to choosing from the set of fixed points where the distances of adjacent fixed points are minimal.

Running Time less than 1 ms. 78 ms. 828 ms. 12.9 sec. 2 mins. 46 sec. 1 hr. 16 sec. 5 hrs. 8 mins. 16 sec.

Further extension of this research should provide a proof of NPcompleteness of the proposed heuristic. The use of evolutionary algorithms to solve the problem should also be interesting. Other algorithms like greedy and simulated annealing are good candidates for heuristics as well.

7. [1]

REFERENCES M.R.Garey, D.S.Johnson, “Crossing number is NPcomplete”, SIAM J. Algebraic Discrete Methods 4, 3, 312-316, 1983.

Performing the experiment using the same machine, with vertices more than 13 became impractical as the machine was being used for other purposes as well.

[2] P.Eades, N.Wormald, “The median heuristic for drawing 2-layered networks”, Technical Report No. 69, Dept. of Computer Science, University of Queensland, St.Lucia, May 1986.

3

[3] Di Battista, G., Eades, P., Tamassia, R., and Tollis, I. G.. Graph Drawing: Algorithms for the Visualization of Graphs. Prentice Hall. 1999.

[4] Leighton, F. T. New Lower Bound Techniques for VLSI. Math. Systems Theory 17, 47{70. 1984.

4

[5] Tutte, W. T. How to Draw a Graph. Proc. London

Math. Soc. 13, 743{768. 1963.

5

Proceedings Template - WORD

As any heuristic implicitly sequences the input when it reads data, the presentation captures ... Pushing this idea further, a heuristic h is a mapping from one.

145KB Sizes 3 Downloads 180 Views

Recommend Documents

Proceedings Template - WORD
This paper presents a System for Early Analysis of SoCs (SEAS) .... converted to a SystemC program which has constructor calls for ... cores contain more critical connections, such as high-speed IOs, ... At this early stage, the typical way to.

Proceedings Template - WORD - PDFKUL.COM
multimedia authoring system dedicated to end-users aims at facilitating multimedia documents creation. ... LimSee3 [7] is a generic tool (or platform) for editing multimedia documents and as such it provides several .... produced with an XSLT transfo

Proceedings Template - WORD
Through the use of crowdsourcing services like. Amazon's Mechanical ...... improving data quality and data mining using multiple, noisy labelers. In KDD 2008.

Proceedings Template - WORD
software such as Adobe Flash Creative Suite 3, SwiSH, ... after a course, to create a fully synchronized multimedia ... of on-line viewable course presentations.

Proceedings Template - WORD
We propose to address the problem of encouraging ... Topic: A friend of yours insists that you must only buy and .... Information Seeking Behavior on the Web.

Proceedings Template - WORD
10, 11]. Dialogic instruction involves fewer teacher questions and ... achievment [1, 3, 10]. ..... system) 2.0: A Windows laptop computer system for the in-.

Proceedings Template - WORD
Universal Hash Function has over other classes of Hash function. ..... O PG. O nPG. O MG. M. +. +. +. = +. 4. CONCLUSIONS. As stated by the results in the ... 1023–1030,. [4] Mitchell, M. An Introduction to Genetic Algorithms. MIT. Press, 2005.

Proceedings Template - WORD
Experimental results on the datasets of TREC web track, OSHUMED, and a commercial web search ..... TREC data, since OHSUMED is a text document collection without hyperlink. ..... Knowledge Discovery and Data Mining (KDD), ACM.

Proceedings Template - WORD
685 Education Sciences. Madison WI, 53706-1475 [email protected] ... student engagement [11] and improve student achievement [24]. However, the quality of implementation of dialogic ..... for Knowledge Analysis (WEKA) [9] an open source data min

Proceedings Template - WORD
presented an image of a historical document and are asked to transcribe selected fields thereof. FSI has over 100,000 volunteer annotators and a large associated infrastructure of personnel and hardware for managing the crowd sourcing. FSI annotators

Proceedings Template - WORD
has existed for over a century and is routinely used in business and academia .... Administration ..... specifics of the data sources are outline in Appendix A. This.

Proceedings Template - WORD
the technical system, the users, their tasks and organizational con- ..... HTML editor employee. HTML file. Figure 2: Simple example of the SeeMe notation. 352 ...

Proceedings Template - WORD
Dept. of Computer Science. University of Vermont. Burlington, VT 05405. 802-656-9116 [email protected]. Margaret J. Eppstein. Dept. of Computer Science. University of Vermont. Burlington, VT 05405. 802-656-1918. [email protected]. ABSTRACT. T

Proceedings Template - WORD
Mar 25, 2011 - RFID. 10 IDOC with cryptic names & XSDs with long names. CRM. 8. IDOC & XSDs with long ... partners to the Joint Automotive Industry standard. The correct .... Informationsintegration in Service-Architekturen. [16] Rahm, E.

Proceedings Template - WORD
Jun 18, 2012 - such as social networks, micro-blogs, protein-protein interactions, and the .... the level-synchronized BFS are explained in [2][3]. Algorithm I: ...

Proceedings Template - WORD
information beyond their own contacts such as business services. We propose tagging contacts and sharing the tags with one's social network as a solution to ...

Proceedings Template - WORD
accounting for the gap. There was no ... source computer vision software library, was used to isolate the red balloon from the ..... D'Mello, S. et al. 2016. Attending to Attention: Detecting and Combating Mind Wandering during Computerized.

Proceedings Template - WORD
fitness function based on the ReliefF data mining algorithm. Preliminary results from ... the approach to larger data sets and to lower heritabilities. Categories and ...

Proceedings Template - WORD
non-Linux user with Opera non-Linux user with FireFox. Linux user ... The click chain model is introduced by F. Guo et al.[15]. It differs from the original cascade ...

Proceedings Template - WORD
temporal resolution between satellite sensor data, the need to establish ... Algorithms, Design. Keywords ..... cyclone events to analyze and visualize. On the ...

Proceedings Template - WORD
Many software projects use dezvelopment support systems such as bug tracking ... hosting service such as sourceforge.net that can be used at no fee. In case of ...

Proceedings Template - WORD
access speed(for the time being), small screen, and personal holding. ... that implement the WAP specification, like mobile phones. It is simpler and more widely ...

Proceedings Template - WORD
effectiveness of the VSE compare to Google is evaluated. The VSE ... provider. Hence, the VSE is a visualized layer built on top of Google as a search interface with which the user interacts .... Lexical Operators to Improve Internet Searches.

Proceedings Template - WORD
shown that mathematical modeling and computer simulation techniques can be used to study .... intersection model. Using the Java Software Development Kit, a.