User:Flogr/sandbox
Generating hyperbolic geometric graphs
[edit]Krioukov et al. describe a model to generate hyperbolic geometric graphs with uniformly random node distribution (as well as generalized versions) in that yield a power-law distribution and other interesting properties. The angular coordinate of each point/node is chosen uniformly random from , while the density function for the radial coordinate r is chosen according to the probability distribution :
The growth parameter controls the distribution: For , the distribution is uniform in , for smaller values the nodes are distributed more towards the center of the disk and for bigger values more towards the border. In this model, edges between nodes and exist iff . The average degree is controlled by the radius of the hyperbolic disk. It can be shown, that for the node degrees follow a power law distribution with exponent .
The image depicts randomly generated graphs for different values of and in . It can be seen how has an effect on the distribution of the nodes and on the connectivity of the graph. The native representation is used for the visualization of the graph, therefore edges are straight lines.
Quadratic complexity generator
[edit]The naive algorithm for the generation of hyperbolic geometric graphs distributes the nodes on the hyperbolic disk by choosing the angular and radial coordinates of each point are sampled randomly. For every pair of nodes it is then checked whether the distance between them is smaller than . The pseudocode looks as follows:
- for to do
- for every pair do
- if then
- if then
- return
is the number of nodes to generate, the distribution of the radial coordinate by the probability density function is achieved by using inverse transform sampling. denotes the uniform sampling of a value in the given interval. Because the algorithm checks for edges for all pairs of nodes, the runtime is quadratic. For applications where is big, this is not viable any more and algorithms with subquadratic runtime are needed.