4

Click here to load reader

[IEEE Canadian Conference on Electrical and Computer Engineering, 2005. - Saskatoon, SK, Canada (May 1-4, 2005)] Canadian Conference on Electrical and Computer Engineering, 2005. -

  • Upload
    rd

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE Canadian Conference on Electrical and Computer Engineering, 2005. - Saskatoon, SK, Canada (May 1-4, 2005)] Canadian Conference on Electrical and Computer Engineering, 2005. -

Abstract This paper was motivated by recent research in

placement algorithms for VLSI circuits and attempts tovisualize the connectivity and underlying physics asso-ciated with large networks or internets. In both cases,these are graph problems made difficult by the inherentcomplexity of the problem (NPC) in conjunction with thesize of the problem. In this work we will present two usefulalternatives for the layout of a graph in a manner asplanar as possible. The conjecture being that if the initialplacement or drawing is as close planar as possible itmakes for more efficient post or subsequent processing.The notion which makes these methods potentiallyattractive here are in part due to the underlying appli-cation where there is a dichotomy in types of nodes beingplaced.

Keywords: Graph drawing.

1. IntroductionGraphs that can be drawn without edge crossings are

called planar graphs. A graph can easily be tested to see ifit is planar, and several algorithms can be used to draw aplanar graph without crossing edges [1,2,3]. In this paperwe discuss one such algorithm and extend its applicationto non planar graphs. In affect, we want to draw the graphwith as few crossings as possible. One of the reasons fordrawing a graph with as few crossings as possible is toincrease the readability of the graph.

As it is very hard to find a drawing of a nonplanargraph with the minimum number of crossings, relatedtechniques have been developed to compute a drawingwith a small number of crossings. One such techniquedeletes a small number of edges from the given graph suchthat the resulting graph is planar. A drawing is thencomputed of this planar subgraph without crossings. Rein-sertion of the deleted edges is done in such a way that thenumber of edge crossings is minimized. However, in thiscase the number of crossings depends upon the planarsubgraph and its drawing.

Here we consider two techniques, one in detail theother in a secondary manner. The first is deterministicwhile the second is nondeterministic. The deterministic

method is a slightly modified version of Tutte’s forcedirected layout algorithm with O(V3) complexity where Vis the number of vertices in the graph. The second isnondeterministic based on a self organizing map.

2. Tutte’s AlgorithmTutte’s algorithm is a simple but elegant technique for

drawing planar graphs. The basic algorithm is as follows:

Given a graph G with n nodes, let Xn be a vector ofnode x-coordinates. Select a cycle on G containing knodes. Assign fixed locations for the k nodes on the cycle.Let Xk be a vector of the x coordinates of the k fixednodes augmented with 0s for the unfixed nodes. For theunassigned or non fixed nodes, the node positions aredetermined by the average of their neighbours, neighboursbeing defined as those adjacent. This results in the matrixequation shown below:

Alternatively, the inverse can be expressed as

The unknown x node locations Xu are simply foundfrom Xu

* = -B-1AXk*, where Xk

* represents the k dimen-sional vector of fixed node coordinates and Xu

* representsthe n-k dimensional vector of unknown coordinates. TheA matrix is the lower left (n-k) by k elements of theadjacency matrix representing G. The B matrix is thelower right (n-k) by (n-k) elements of the adjacency matrixrepresenting G, with the diagonals replaced by the vertexdegree of the node. Similarly each node’s y-coordinatescan be easily calculated. This algorithm is guaranteed todraw a planar graph if the graph is planar, more specif-ically a convex planar drawing within the initial cycle. Asa benchmark example a grid is used for illustration. Forclarity the grid is an 5x5 mesh. The original placement isshown in Figure 1. A direct implementation of Tutte’salgorithm is shown in Figure 2.

Ikxk 0kx n k–A n k– xk B n k– x n k–

Xn Xk=

I 0

B 1– A– B 1–I 0A B

I 00 I

=

NOVEL APPROACHES TO PLACEMENT

Robert D. McLeodDept. ECE

University of Manitoba,Winnipeg, Manitoba, R3T 5V6

Email: [email protected]

William KocayDept. Computer ScienceUniversity of Manitoba,

Winnipeg, Manitoba, R3T [email protected]

0-7803-8886-0/05/$20.00 ©2005 IEEECCECE/CCGEI, Saskatoon, May 2005

1931

Page 2: [IEEE Canadian Conference on Electrical and Computer Engineering, 2005. - Saskatoon, SK, Canada (May 1-4, 2005)] Canadian Conference on Electrical and Computer Engineering, 2005. -

Fig. 1. Original placement 25 node graph

Fig. 2. Planar drawing 25 node graph

Fig. 3. Reconstructed Planar GridFigure 2 is in fact planar and arguably more organized

than that of the original. It is however not evident that theunderlying topology was actually a grid. The same algorithmis run again with 4 additional edges added on the periphery ineffect forcing nodes to be placed within a desired perimeter.The result is the graph drawing shown in Figure 3. Althoughartificial or contrived the basic idea is to add edges in contrastto techniques that remove edges and reconstruct a graph fromthe remaining subgraph.

In the application domain of VLSI and telecommuni-cation networks. to notion of fixed nodes on the periphery isnot uncommon. In the case of VLSI placement the obviouscandidates for perimeter nodes are the I/O while for telecom-munication networks such as the Internet the nodes suitablefor placement on a graph drawing’s perimeter would begateways between autonomous systems.

In terms of how well the algorithm organizes nodes in anattempt to minimize crossings and yet remain semanticallycorrect the following two experiments were conducted.Firstly a relatively large test grid was created, instantiatedwith additional edges between nodes designated as thosebelonging on the perimeter. An original layout is shown inFigure 4.

The initial placement of Figure 4 resembles 4 pounds ofworms in a 3 pound can. Figure 5 illustrates the underlyingplanar graph. Figure 6 is a grid with approximately 1% addi-tional edges. These are clearly seen as crossings on the graph.Figure 7 is a similar grid with over 10% additional edges.Figure 7 also underwent an additional force directedplacement phase (repulsion) for better visualization.

Fig. 4. Original placement 225 node graph

Fig. 5. Tutte placement 225 node graph

Convex Polyhedrons(non obvious)

1932

Page 3: [IEEE Canadian Conference on Electrical and Computer Engineering, 2005. - Saskatoon, SK, Canada (May 1-4, 2005)] Canadian Conference on Electrical and Computer Engineering, 2005. -

Fig. 6. 225 node graph 1.2% Edge Perturbation

Fig. 7. 225 node graph 12% Edge PerturbationThe main observation from these types of experiments

are that this approach of selecting a cycle governed by areasonable heuristic such as gateways and I/O on theperimeter of the drawing yield reasonable drawings. Areasonable drawing being one that is substantially better thanthe original.

Two final observations from this work are:

1) For the most reasonable layout in terms of equallydistributing the nodes the nodes fixed on the perimeter orboundary should be on the order of (n1/2). Fortunately thisis not unreasonable. If fewer nodes are fixed on the periphery,the drawing of the graph collapses towards the centroid asillustrated in Figure 8.

2) As the algorithm is extremely efficient it can beiterated over the selection of fixed node locations. That is, thematrix inversion step can be done once and reused for eachinstance of fixed node locations. The remaining computationis matrix multiplication, effectively an nxn matrix with nx1matrix with a complexity of O(n2).

In general algorithms like these and the associated appli-cation heuristics have not been exploited to the full extentpossible. One possible reason may be that in previous initi-atives which used graph drawing for placement the obser-vation was that although extremely fast they tended toproduce locally optimal solutions as opposed to industriallyproven work horse algorithms such as simulated annealingwhich tended to provide considerable design space explo-ration. An extension to the graph drawing presented here anda reasonable conjecture would be to consider the iterativegeneration of a very large number of locally optimal solutionsand the subsequent design space exploration from amongthese locally optimal instances.

Another potential advantage of efficient generation of alarge number of locally optimal instances would be as inputsto techniques that derive a solution from a population ofsolutions. These algorithms are often termed evolutionary orgenetic and although do not at present have an industrial base,at some time they may as a result of their inherent paral-lelism. Evolving from a pool or suite of locally optimalsolutions is considerably more efficient that from an arbi-trarily generated solution space.

In contrast to placement algorithms such as simulatedannealing, the algorithm of Tutte’s performs extremely well ifthe optimal topology is near planar. Although not investigatedhere, extensions should include the use of Tutte’s algorithmin conjunction with optimization techniques such as thosebased on simulated annealing.

Fig. 8. 625 Nodes (collapsing towards the centroid)

3. SOM AlgorithmThis section outlines an application of a self organizing

map as a placement or graph drawing tool. In general, selforganizing maps are more typically deployed as quantizers inextracting features from data but can be extended to graphdrawing.

1933

Page 4: [IEEE Canadian Conference on Electrical and Computer Engineering, 2005. - Saskatoon, SK, Canada (May 1-4, 2005)] Canadian Conference on Electrical and Computer Engineering, 2005. -

In several examples of SOMs for placement representnodes as neurons. Each neuron/node has a weight vectorspecifying the node’s placement. In an iterative fashion exci-tations points are created over the placement area at randomlocations. A node physically closest to the excitation pointbecomes active. The excitation then propagates from theactive node to its neighbors, and subsequently to next toadjacent neighbours decreasing in strength with adjacencymatrix distance from the active node. Each excited node’sposition is adjusted toward the original excitation point inproportion to the excitation. Figure 9 illustrates the process.

Fig. 9. Example Initial PlacementFor this simple benchmark nodes located one edge away

were assigned a value of 0.5 while those 2 edges away wereassigned a value of 0.25. Nodes further were assigned a valueof zero and no notion of multiple paths were used in adjustingthe “distance”.

Fig. 10. Example Final PlacementFigure 10 is an example placement illustrating at least

the relationship or semantic preserving property of a SOM.Various tests were run on graphs of moderate size yieldingsimilar results. However, in each case fairly extensiveparameter adjustment was required. These adjustmentsranged from tailoring the “adjacency” matrix to adjusting thenumber of iterations and varying the size of the underlyingplacement space. In effect, resulting in an effort that isunlikely worthwhile for SOM graph drawing.

The differentiation of nodes within the interior or morepreferably located on the perimeter was also less easilyaccomplished as compared with the algorithm of Tutte.

A modification to the SOM discussed here would be toinclude a repulsion or negative influence as per more tradi-tional SOMs. In this manner nodes closer to the closest nodeare attracted to the excitation while those further in terms oftheir edge distances are repulsed as illustrated in Figure 11. Abreadth first traversal of the graph from the closest nodewould be used to determine distance.

Fig. 11. Effect of Influence

4. SUMMARYThis paper presented two graph drawing algorithms

suitable for drawing graphs with a reduced number ofcrossings. The considerable appeal of the algorithm due toTutte is that it is well suited to drawing graphs made up ofinterior as well as periphery nodes. In addition the complexityof the Tutte algorithm makes it well suited as a candidate forefficient design space exploration.

References[1] W. Kocay and D.L. Kreher, “Graphs, Algorithms, and

Optimization”, Chapman & Hall/CRC, CRC Press, ISBN 1-58488-396-0, 2005.

[2] R. Tamassia, G. Di Battista, and C. Batini, “Automatic graphdrawing and readability of diagrams”, IEEE Transactions onSystems, Man and Cybernetics, Volume 18 , 1, 1988, pp. 61 - 79

[3] W.T. Tutte, “How to draw a graph”, Proc. London Math. Soc.,13 (1963), pp. 743--767.

Excitation

Closest

2nd Closest

Influence

Distance (Edges)

Strengthof Attraction

Attract

Repulse

Adaptive Control Points

1934