1. For the Openflights airport network (2016), the high-energy physics citation network, , determine three separate values of γ for each network using a simple log-log plot, logarithmic binning, and...

1 answer below »
1. For the Openflights airport network (2016), the high-energy physics citation network, , determine three separate values of γ for each network using a simple log-log plot, logarithmic binning, and the complementary cumulative distribution. For each estimate, include a figure with an appropriate fitted curve and the associated r 2 value.2. Implement the preferential attachment mixture model.Generate three random networks using this model with m0 = m = 8, an initially complete graph, and α ∈ {0, 1/4, 1}.


Answered Same DayOct 03, 2021

Answer To: 1. For the Openflights airport network (2016), the high-energy physics citation network, , determine...

Sathishkumar answered on Oct 03 2021
127 Votes
import networkx as nx
import matplotlib.pyplot as plt
def generate_er(n=8, r=2):

return
nx.erdos_renyi_graph(n, r, seed=42)
def plot_er(G, n):

# Put the nodes in a circular shape
pos = nx.circular_layout(G)
#pos = nx.spring_layout(G, iterations=50, seed=42)
nx.draw(G, pos, node_color=range(50), node_size=400, cmap=plt.cm.Blues)

print(pos)
plt.show()

# Generate the ER graphs
n=50
p=0
G_er = generate_er(n, p)
pos = nx.circular_layout(G_er)
plot_er(G_er,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here