Professional Documents
Culture Documents
Naeem Sajjad1
Abstract The ability to represent relational data in the constructed an embedding using barycentric representations,
form of drawings or graphs is a powerful tool which allows whose results is guaranteed to be a planar drawing of the
us to perform analysis through visual exploration. Several data graph. The idea behind Tuttes algorithm, is that if a face of
presentation problems require the drawing or display of graphs;
examples include circuit schematics and software engineering the planar graph is fixed in the plane, then suitable positions
diagrams. Force-directed graph drawing algorithms are a for the remaining vertices can be found by solving a system
special class of graph drawing algorithms used to draw the of linear equations.
simple undirected graphs in plane. Graphs drawn with these Another algorithm designed by M.J. Fruchterman and M.
algorithms tend to be aesthetically pleasing, exhibit symmetries, Reingold[3] model the vertices behavior as atomic particles
and tend to produce crossing-free layouts for planar graphs. In
this paper we are going to introduce the basic force-directed or celestial bodies, exerting attractive and repulsive forces on
graph drawing algorithms, we present the critical analysis of each other. This algorithm is actually a further modification
these algorithms. At the end of this paper a section is devoted for of the Eades[4] algorithm with a concentration on two-
comparison of all these algortihms based upon our knowledge dimensional, aesthetically-pleasing pictures of graphs by
and study of this specific domain. doing simplified simulations of physical systems. It perform
I. INTRODUCTION well at distributing vertices evenly, making edge lengths
uniform, and reflecting symmetry with additional speed and
To display the relational data in a meaningful way is simplicity.
always been a problem of graph representation. For ex- In 1984 Eades[4] proposed a mechanical model of steel
ample consider a scenario in which you need to calculate rings and springs to produce aesthetically pleasing 2D lay-
the optimal placement of electrical components inside the outs for plotters and CRT screens. The basic idea of the
electronic application which contains a large number of small model proposed is; To embed a graph we replace the vertices
connected components. These components have to be placed by steel rings and replace each edge with a spring to form
on the chip such that the number of crossings is as small as a mechanical system. The vertices are placed in some initial
possible, and the required area of the chip must not become layout and let go so that the spring forces on the rings move
too large. The problem become even more complex when the system to a minimal energy state.
several different constraints have to be satisfied as well, The 1989 algorithm of Kamada and Kawai[5] introduce a
for example the number of bends and total length of the dynamic system in which nodes of a graph are mutually
connections must be minimized as in design of Very Large connected by springs. This algorithm relate the balanced
Scale Integration (VLSI) chips[1]. A wide variety of fields layout of vertices to the dynamically balanced spring system.
each with their own requirements utilize automatic graph As a result, the degree of imbalance can be formulated as the
drawing algorithms to clarify or to display the structure of total energy of springs. Pleasing layouts can be obtained by
the information in a compact and relatively small space. decreasing the total energy of the system and the best results
As a result, graph drawing algorithms have been a focus are produced with the minimum total energy of the system.
of research from the past couple of decades providing a As described in their algorithm We regard the desirable
better quality of drawing and higher drawing performance. geometric (Euclidean) distance between two vertices in the
Several classes of graph drawing algorithms with different drawing as the graph theoretic distance between them in the
aesthetic criterias have been evolved to address the problem corresponding graph.
of planar drawings. Some of the most flexible algorithms for In 1999 Bor Plestenjak presented An algorithm for
calculating layouts of simple undirected graphs belong to drawing planar graphs[6]. This algorithm was derived from
a class known as force-directed algorithms. Also known as the Fruchterman and Reingolds spring embedding algorithm.
spring embedders, such algorithms calculate the layout of a It is as simple and efficient for the Convex Drawing[7] of
graph using only information contained within the structure 3-connected planar graphs which needs only one face of the
of the graph itself, rather than relying on domain-specific graph to draw it planarly. It takes the graph as a mechanical
knowledge. model having vertices as metal rings and edges between
An algorithm designed by Tutte [2] in 1963 was the first vertices as elastic bands of zero length. Under the influence
one of this class for obtaining a straight line crossing free of attractive forces of elastic bands, the free vertices will
drawing of 3-connected planar graphs. In this algorithm Tutte move until the final layout is planar. At the end all vertices
1 Naeem Sajjad is the student of Master of Science in Computer Science.
will lie inside or on the border of the initial polygon and what
This work was done in order to fulfill the requirements of Term Paper for is more important, it turns out there are no edge intersections.
the module of Research Methods, taught by Dr. Muhammad Adnan Hashmi This paper is organized in a way, first to explain the basic
force-directed algorithms then to present a knowledge based graph is crossing free and all faces of the graph are convex.
analysis and comparison of all presented algorithms. The main theme of the Tuttes Algorithm is that if one of
the faces of planar graph is fixed in the plane, then suitable
II. A PPLICATIONS OF G RAPH D RAWING A LGORITHMS positions for the remaining vertices, which are represented
Work in this area was done mainly in response to as a convex combination of the positions of its neighbors,
requirements of data visualization techniques and interactive can be found by solving a system of linear equations.
computer systems. Many fields in computer science, such as
software engineering, electronic circuit design and database The basic Algorithm of Tutte is described below; in this
design, have found it useful to represent data as graphs, with algorithm the force because of an edge (u, v) incident on
vertices denoting elements and edges denoting relations the vertices is proportional to the distance between vertices
between them. These graphs are normally generated by u and v.
software tools based on information in the system. As the
size of a graph generated from data or constraints grew, so Input: G = (V, E) with V = V0 intersection V1, with fixed
has the sophistication of embedding algorithms. In software vertices V0 and free vertices V1; a strictly convex polygon
engineering, the architecture of a large software system can P with V0 vertices.
be visualized as a directed graph with vertices representing
modules and edges denoting various relationships between Output: A position pv for each vertex of V, such that the
them. These systems are often hierarchical in nature fixed vertices form a convex polygon P.
and their drawings should reflect this. Furthermore, this
information can be used to make the graph drawing task Initialize V0: Place fixed vertices u V0 at corners of P;
easier [8]. Computer hardware and microchips are now
sufficiently complex that they are designed using CAD tools. Initialize V1: Place free vertices v in V1 at the origin;
It is then the responsibility of the tool to create a layout
of the logical gates and the connections between them on repeat
microchips and circuit boards. This layout should be a grid foreach free vertex v in V1
drawing. An orthogonal drawing is one in which an edge is do
a chain of horizontal and vertical segments. A grid drawing xv (1 deg(v)) (u,v)E xu;
is an orthogonal drawing in which all the vertices and yv (1 deg(v)) (u,v)E yu;
bends of edges have integer coordinates [9]. There are many until xv and yv converge for all free vertices V;
other examples of applications which use graph drawing
algorithms. Entity-relationship diagrams in database design In this model the force due to an edge (u, v) is proportional
can have a visual representation or an algebraic one. One to the distance between vertices u and v and the springs have
of the requirements of systems analysis and design tools is ideal length of zero; there are no explicit repulsive forces.
that a database description need only be entered once in The vertex set is partitioned into fixed and free vertices.
either format and the alternate format will be generated. Setting the partial derivatives of the force function to zero
There is a project management technique that uses PERT results in independent systems of linear equations for the
charts (Project Evaluation and Review Technique) to track x-coordinate and for the y-coordinate.
dependencies among tasks. These dependencies form a
directed graph from which other information can be derived,
such as a project critical path. One technique used by the
Human Genome Project analyses the gene structure by
representing raw data as a directed graph [10].
algorithmSPRING(G:graph);