Complexity Index of an Undirected Graph

Complexity Index of an Undirected Graph preview image

1 collaborator

Default-person Pradeep Ankem (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0 • Viewed 52 times • Downloaded 2 times • Run 0 times
Download the 'Complexity Index of an Undirected Graph' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals
 [
 bingo
 tom
 ]

to setup
  clear-all
  set-default-shape turtles "circle"
  create-turtles number-of-nodes [
    set color blue
    set size 2
  ]
  layout-circle turtles (world-width / 2 - 2)
  set tom (number-of-nodes * (number-of-nodes - 1)) / 2
  show tom

  reset-ticks
end 

;; This procedure demos the creation and deletion of edges.
;; Here we create and delete edges at random, except that
;; we try to keep the total number of links constant.

to go
  if not any? turtles [ stop ]
  ask one-of turtles
    [ create-link-with one-of other turtles ]  ;; if link already exists, nothing happens
  while [count links > number-of-links]
    [ ask one-of links [ die ] ]
  set bingo count links
  tick
end 


; Public Domain:
; To the extent possible under law, Uri Wilensky has waived all
; copyright and related or neighboring rights to this model.

There is only one version of this model, created 2 months ago by Pradeep Ankem.

Attached files

File Type Description Last updated
Complexity Index of an Undirected Graph.png preview Preview for 'Complexity Index of an Undirected Graph' 2 months ago, by Pradeep Ankem Download

This model does not have any ancestors.

This model does not have any descendants.