Random graph generator

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
Line 13: Line 13:
 
## if random number is bigger than given limit '''p''' then create association between the topic combination
 
## if random number is bigger than given limit '''p''' then create association between the topic combination
  
Here '''n''' and '''p''' are user given. '''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 float between 0 and 1.
 +
 
 +
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.

Revision as of 20:25, 8 June 2007

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. 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 limit p then create association between the topic combination

Here n and p are user defined. n is integer while p is a float between 0 and 1.

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.

Personal tools