Fuentes de Consulta
ELECTRÓNICA:
43 DGB/DCA/2013 Amplitud
While analysis of a graph can be performed without ever having a visual representation of it, it can be beneficial to see exactly what the results are indicating just as how a chart can reveal more than a table alone can.
One of the key interests in graph visualisation is in identifying methods of distributing the vertices within the viewing space such that the vertices do not overlap or obscure each other and also the number of edges which cross over each other are minimised. For instance, simply positioning vertices through the use of a PRNG could be tweaked to allow for the property of non-overlapping vertices to be met, however, it would be incredibly difficult and time consuming to position the vertices randomly with minimal edge crossings. However, deterministic algorithms can be the most suitable in some scenarios where the structure is easily defined, such as for example in a bipartite graphs, complete graphs, or tree structures. Though even still, for any arbitrary graph structural information alone may not provide any intuition as to how to position the data.
For instance, in data such as social network data it is common to find that there exists distinct groupings of vertices (cliques) that are separated by various bridging ver- tices, for example as can be seen in Figure 6.9. This leads to the issue that while a simple deterministic method is unsuitable, and further still randomised methods are also completely unsuited. This leads to the need for a method that will group the cluster but
Figure 6.9: The combined Facebook friend relation data of several PhD students from
the University of Liverpool Computer Science department.
separate each cluster from each other while still preserving locality. A common solution which was looked at is that of force directed layouts. This type of algorithm first came to prominence thanks to the work of Eades [76] though was later adapted and improved by Fruchterman and Reingold [93]. Since then there have been a number of papers on the topic providing a number of improvements in the complexity through different methods, for example: Holten and van Wijk [106] discusses the concept of edge bundling where by groupings of vertices are identified and then collapsed to reduce edge calculations and paths, Quigley [151, 152] considers grouping vertices by their location and then per- forming force direction on the groups to reduce the complexity dramatically so that it depends less on the number of vertices and more on the number groupings identified using a method such as quad trees.
However, due to time constraints this work adopted the simple, yet very effective Fruchterman and Reingold Algorithm, which is reproduced in Algorithm 10. Though
while this algorithm is considerably simplistic in comparison to its successors, it provides a very good starting point for understanding how these algorithms work and why they are so interesting. The objective of these algorithms is to separate all vertices by some distance using the principle of Coulomb’s inverse-square law to repulse each vertex from each other vertex so that no pair of vertices will be located near any other vertex. Sec- ondly the algorithm combines this with the use of Hooke’s Law to control the attraction of vertices. That being that any pair of connected vertices are attracted to each other at a force proportional to their distance. The resulting combination of these two techniques is that connected vertices will be located close to each other, and that unconnected ver- tices should be located at some distance, with the fortunate property that edge crossings will become minimised. In a social network the resulting graph should clearly show communities due to their high connectivity while at the same time ensuring that each community is placed in a position that reflects the connectivity between clusters, as can be seen in Figure 6.9. Algorithm 10:ForceDirectedLayout(V,E) for all v∈V do for all u∈V do v=v−u end for end for for all v∈V do for all u∈∆v do v=v+u end for end for for all v∈V do v=displacementv end for
This algorithm proved to be highly effective for the needs of this work and also for the third parties that had taken interest in the software. While faster algorithms will of course permit for large datasets to be rendered, this algorithm, and specifically the slightly modified version of it which reduced the run-time by only performingV2repulsion loop when vertices were within close distance, permitted the rendering of graphs with up to 10,000 vertices to be rendered in a reasonable amount of time. For most of the use cases where a rendering tends to be required, a minimal amount of vertices that can be quickly looked at and understood is critical so, of which 10,000 exceeds this minimal limit by an order of magnitude. While inevitably there will be use cases where higher numbers of vertices would be interesting to see, and this algorithm was shown to successfully handle greater numbers, the time required to generate makes most cases infeasible and better algorithms would need to be adopted.
Finally what also should be mentioned in terms of visualisation, is that through good programming practice, real time interactivity with large graphs is possible with
GraphDraw. Specifically the software makes extensive use of high quality algorithms that require linear or logarithmic time complexity to minimise processing of graph elements that are not currently in the users view ports and makes extensive use of indexing to enable for interactivity with single elements. The result of this is that not only can a user visualise a reasonably or very large graph in a way that is appealing and intuitive, but also quickly interactive with the viewing area and focus on single elements without a noticeable delay.