Skip to main content
. 2023 Sep 10;25(9):1320. doi: 10.3390/e25091320
Algorithm 1 Reputation value calculation algorithm for nodes based on PageRank
Input:  nodes
Output:  PRx
 1:     for i=0→n−1 in nodes do      //Traverse the nodes in the network
 2:          if nodei.getCredit()<60:           //Nodes are malicious nodes
 3:                nodes = nodes − nodei          //Eliminate malicious nodes
 4:                continue                           //Go to the next cycle
 5:              end if
 6:              reputationx = crediti/votei   //Trust given by node i to node x
 7:              PRx = PRx + reputationx     //Calculate the reputation value obtained by node
x from other nodes
 8:    end for
 9: return PRx