Researchers are studying how individuals in a small community interact and how different social structures affect the overall connectivity of the network. Three network models are explored: a random friendship model, a clustered small-world model, and a degree-based interaction model.
Define a random friendship model for 20 individuals (a Bernoulli distribution means each edge is a simple yes/no event):
In[1]:=
=BernoulliGraphDistribution[20,0.2];
Generate a random graph from the distribution:
In[2]:=
SeedRandom[1234];graph=RandomGraph
‸
Out[2]=
Highlight the three most popular people by selecting the vertices with the highest degrees:
Next we will explore a larger social connectivity graph distribution. Assume that people mostly connect within their local circles but also maintain a few random acquaintances.
Define a small-world model for 100 individuals with the given parameters:
In[6]:=
=WattsStrogatzGraphDistribution[100,0.1,20/2];
In[7]:=
g=RandomGraph
‸
Out[7]=
Compute the expected number of relations of the least-connected individual using VertexDegree: