that p links to p.hub += r.auth norm += square(p.hub) // calculate the sum of the squared hub values to normalise norm = sqrt(norm) for each page p in G do // then update all hub values p.hub = p.hub / norm // normalise the hub values The hub and authority values converge in the pseudocode above. The code below does not converge, because it is necessary to limit the number of steps that the algorithm runs for. One way to get around this, however, would be to normalize the hub and authority values after each "step" by dividing each authority value by the square root of the sum of the squares of all authority values, and dividing each hub value by the square root of the sum of the squares of all hub values. This is what the pseudocode above does. Non-converging pseudocode G := set of pages for each page p in G do p.auth = 1 // p.auth is the authority score of the page p p.hub = 1 // p.hub is the hub score of the page p function HubsAndAuthorities(G) for step from 1 to k do // run the algorithm for k steps for each page p in G do // update all authority values first p.auth = 0 for each page q in p.incomingNeighbors do // p.incomingNeighbors is the set of pages that link to p p.auth += q.hub for each page p in G do // then update all hub values p.hub = 0 for each page r in p.outgoingNeighbors do // p.outgoingNeighbors is the set of pages that p links to p.hub += r.auth See also PageRank References External links Create a data search engine from a relational database Search engine in C# based on HITS Link analysis Articles with example pseudocode