Random graph generator

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
 
(11 intermediate revisions by one user not shown)
Line 11: Line 11:
 
# For each topic combination ('''n''' * '''n''')
 
# For each topic combination ('''n''' * '''n''')
 
## Get random number
 
## Get random number
## if random number is bigger than given limit '''p''' then create association between the topic combination
+
## if random number is bigger than given number '''p''' then create association between the topics in combination
  
Here '''n''' and '''p''' are user defined. '''n''' is integer while '''p''' is a float between 0 and 1.
+
Here '''n''' and '''p''' are user defined. '''n''' is integer while '''p''' is a floating point number between 0.0 and 1.0
  
Random graph generator may not have real life implementations but it offers nice test suite for Wandora and topics maps. It is also interesting to note that the association distribution of random topic maps are variations of bell curves rather than power law curves found in many real life graphs.
+
Random graph generator may not have real life implementations but it offers nice test suite for Wandora and topics maps. It is also interesting to note that the association distribution of random topic maps are variations of bell curves rather than power law curves found in many real life graphs. You should also note that creating very dense topic map requires much memory as the number of associations increases. Below is an example of layer connection statistics after random graphs generator with 5000 topics and 0.05 association probability. Note the number of created associations.
  
You should also note that creating very dense topic map requires much memory as the number of associations increases. Below is an example of layer connections statistics after random graphs generator with 5000 topics and 0.05 association probability.
+
[[Image:random_graph_generator_dist.gif|center]]
  
[[Image:random_graph_generator_dist.gif]]
+
Subject identifier of created topics is
 +
 
 +
http://www.wandora.org/topic/i
 +
 
 +
where '''i''' is topic's number starting from 0 and ending to '''n-1'''. Topic's base name is '''Topic i''' with same schema for '''i'''. Association type and roles are
 +
 
 +
http://www.wandora.org/topic/associationType
 +
http://www.wandora.org/topic/role1
 +
http://www.wandora.org/topic/role2
 +
 
 +
Below is a visualization of topic map created with random graph generator (50 topics and association probability of 0.05).
 +
 
 +
[[Image:random_graph_example.gif|center]]
 +
 
 +
 
 +
== See also ==
 +
 
 +
* To visualize the random graph, you can try the [[Graph topic panel]] or [[Processing topic panel]].
 +
* Once you have create the random graph, you might want to export it:
 +
** [[GraphML export]]
 +
** [[Graph Modeling Language export]]
 +
** [[GraphXML export]]
 +
** [[Export adjacency matrix]]
 +
** [[Export incidence matrix]]

Latest revision as of 19:01, 13 April 2012

Random graph generator creates a topic map with random number of topics and associations between. New topics and associations are created to current layer. Random graph generator has two different association creation algorithms. First algorithm is

  1. Create n topics
  2. Loop m times
    1. Select two random topics
    2. Create association between selected topics

Here n and m are integers given by the user. Note the possibility of two or more identical associations. Wandora's topic map model merges identical associations and the overall number of associations created by the algorithm may be smaller than m. Second algrithm relies on association probability and is

  1. Create n topics
  2. For each topic combination (n * n)
    1. Get random number
    2. if random number is bigger than given number p then create association between the topics in combination

Here n and p are user defined. n is integer while p is a floating point number between 0.0 and 1.0

Random graph generator may not have real life implementations but it offers nice test suite for Wandora and topics maps. It is also interesting to note that the association distribution of random topic maps are variations of bell curves rather than power law curves found in many real life graphs. You should also note that creating very dense topic map requires much memory as the number of associations increases. Below is an example of layer connection statistics after random graphs generator with 5000 topics and 0.05 association probability. Note the number of created associations.

Random graph generator dist.gif

Subject identifier of created topics is

http://www.wandora.org/topic/i

where i is topic's number starting from 0 and ending to n-1. Topic's base name is Topic i with same schema for i. Association type and roles are

http://www.wandora.org/topic/associationType
http://www.wandora.org/topic/role1
http://www.wandora.org/topic/role2

Below is a visualization of topic map created with random graph generator (50 topics and association probability of 0.05).

Random graph example.gif


[edit] See also

Personal tools