Matlab simulation of BA network

1. Problem description:

  • The initial state has m0 nodes
  • 1. The principle of growth: each time a node i is added (the joining time is denoted as ti), the addition of each node brings m edges, an increase of 2m degrees
    • The degree of the old node is m, and the degree of the newly added node is m
    • Then at time t, the total number of nodes in the network is m0+t, and the total degree of the network is 2mt.
  • 2. Priority link principle: The probability of occupying an edge from m edges is proportional to the degree ki of the node each time
    • Obviously, the earlier you join (the smaller the ti), the easier it is to get more links.
    • Starting from time 0, the node degree ki in the system at each time step is continuously increasing.

2. Part of the program:

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sort the elements in the vector
% % Input: vector, output: [node number, value]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%

function [Mat_Return] = Fun_List( Line)

Num_Line = size( Line,2);
Mat_Return = zeros(Num_Line, 2);


for j= 1: Num_Line     
  Num = 1;
  Temp = Line(1);
    for i = 1: Num_Line
        if Line(i)>Temp
            Temp = Line(i);
            Num = i;           
        end 
    end 
        Mat_Return(j,:) = [Num, Temp];    
        Line(Num)=0;
end

3. Simulation conclusion:

D00008

Guess you like

Origin blog.csdn.net/ccsss22/article/details/114896852
Recommended