generate_ssca

Contents

generate_ssca#

graph_tool.generation.generate_ssca(N, max_clique_size, p_unidirectional=0.2, max_parallel_edges=3, p_intercluster=0.5)[git][source]#

Generate a graph of the SSCA#2 benchmark.

Parameters:
Nint

Number of vertices.

max_clique_sizeint

Largest size of the cliques.

p_unidirectionalfloat (optional, default: 0.2)

Probability that an edge between two vertices of a clique is unidirectional.

max_parallel_edgesint (optional, default: 3)

Largest number of parallel edges between two vertices.

p_interclusterfloat (optional, default: 0.5)

Base probability of the edges between cliques, which decays with the distance between them.

Returns:
gGraph

The generated directed graph.

See also

generate_rmat

R-MAT model

generate_relaxed_caveman

Relaxed caveman graph

Notes

The graph of the Scalable Synthetic Compact Applications benchmark #2 [bader-design-2005] consists of directed cliques of random sizes and of sparser edges between them. The vertices are partitioned into cliques one clique at a time, with a size drawn uniformly from \(\{1,\dots,s_\text{max}\}\) (truncated to the number of vertices left), where \(s_\text{max}\) is max_clique_size, and members drawn uniformly among the vertices not yet assigned. Every pair of vertices of a clique is connected in a single direction, chosen uniformly, with probability p_unidirectional, and in both directions otherwise, and every direction receives a number of parallel edges drawn uniformly from \(\{1,\dots,m\}\), where \(m\) is max_parallel_edges. Afterwards, for every vertex \(i\) and every \(d = 2, 4, 8, \dots < N/2\), if the vertex \(j = (i + d) \bmod N\) belongs to a different clique, the edge \(i\to j\) is placed with probability \(2p/d\), where \(p\) is p_intercluster, again with a number of parallel edges drawn uniformly from \(\{1,\dots,m\}\). The probabilities decay with the distance between the vertex indices, which are unrelated to the cliques.

References

[bader-design-2005]

David A. Bader and Kamesh Madduri, “Design and implementation of the HPCS graph analysis benchmark on symmetric multiprocessors”, High Performance Computing (HiPC 2005), Lecture Notes in Computer Science 3769, 465-476 (2005), DOI: 10.1007/11602569_48 [sci-hub, @tor]

Examples

>>> g = gt.generate_ssca(1000, 10)
>>> print(g.num_vertices(), g.num_edges())
1000 13075

A smaller instance is drawn as follows:

>>> g = gt.generate_ssca(60, 6)
>>> gt.graph_draw(g, pos=gt.sfdp_layout(g),
...               output="generate_ssca-small.pdf")
<...>
../_images/generate_ssca-small.png

SSCA#2 graph with \(N=60\) vertices, cliques of at most six vertices, and the default values of the other parameters.#