Random graph generator
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 defined. '''n''' is integer while '''p''' is a | + | 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 connections statistics after random graphs generator with 5000 topics and 0.05 association probability. | 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 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|center]] |
Revision as of 20:52, 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
- Create n topics
- Loop m times
- Select two random topics
- 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
- Create n topics
- For each topic combination (n * n)
- Get random number
- 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 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 connections statistics after random graphs generator with 5000 topics and 0.05 association probability.