Close Help Window 
Overview  This simulation enables comparison of latency and network investment tradeoffs between pointtopoint and hubandspoke random networks. Pairs of points are randomly generated on a unit disc (circle). Each pair may be directly connected, or may be connected via a central hub. Generally, for n nodes, the benefit of a hubandspoke or "star" network is that the number of connections to a hub is order (n), whereas in a fullyconnected pointtopoint network on n nodes the number of connections is order (n*n), namely 1/2n(n1). However, while the number of connections is decreased, latency is increased. Specifically, the expected value of the distance between two points selected at random on a unit disc is 128/45PI, or roughly .909. The expected value of the distance of a point selected at random on a unit circle to the center of the circle is 2/3, making the latency penalty roughly an additional 47% (1.333 / .909). 
Basic Flow 
First, select the desired graphical view: hubandspoke, pointtopoint, both, or neither.
Second, run any number of random trials, one at a time up through a thousand at a time. For each trial, a random pair of points is generated, and calculations are made regarding the distance between the points via either strategy. Lastly, view the results. The average pointtopoint distance should converge to .909=128/(45PI), whereas the hubandspoke distance should converge to 1.333=4/3. 
About  This model was written by Joe Weinman in about 200 lines of code, which are a mixture of HTML, DHTML, ASP.NET 2.0 / Visual Basic, stylesheets, and JavaScript, using Microsoft Visual Web Developer 2010. It has been tested using a variety of browsers, smartphones, and tablets. 
